It looks like the -Werror flag is giving you a problem. Builds fine here on Slackware 13.37. It seems that the gentoo and archlinux build scripts actually gets rid of -Werror. You might want to try this in the slackbuild right before cmake is ran.
Code:
--- physfs.SlackBuild.orig 2011-11-04 17:31:00.000000000 -0700
+++ physfs.SlackBuild 2012-04-09 19:39:25.406019188 -0700
@@ -65,6 +65,8 @@
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
+sed -i 's|-Werror||' CMakeLists.txt
+
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \