diff options
author | dsomero <xgizzmo@gmail.com> | 2010-05-23 16:51:53 -0400 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-23 23:30:04 -0500 |
commit | ba5daa58d0d363ee26511faec0952ec5c82fc8bf (patch) | |
tree | f907807041664555e912b94de8b11ba1b218eb03 /libraries/physfs | |
parent | 56a20fa7d2df4c6418c0977f6baee98b55583c87 (diff) | |
download | slackbuilds-ba5daa58d0d363ee26511faec0952ec5c82fc8bf.tar.gz |
libraries/physfs: Miscellaneous cleanups.
Cleaned up build and added some fixes for slackware 13.1.
Diffstat (limited to 'libraries/physfs')
-rw-r--r-- | libraries/physfs/physfs.SlackBuild | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/libraries/physfs/physfs.SlackBuild b/libraries/physfs/physfs.SlackBuild index 8fa100fdbc..52e6dce031 100644 --- a/libraries/physfs/physfs.SlackBuild +++ b/libraries/physfs/physfs.SlackBuild @@ -24,10 +24,19 @@ PRGNAM=physfs VERSION=2.0.0 -ARCH=${ARCH:-i486} BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -42,7 +51,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" -fi +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -55,11 +66,17 @@ chmod -R a-s,u+w,go+r-w . # LIB_SUFFIX is ignored work around it. sed -i -e "s|DESTINATION lib|DESTINATION lib${LIBDIRSUFFIX}|g" \ + -e "s:-Werror::" \ CMakeLists.txt cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DPHYSFS_ARCHIVE_7Z=OFF \ + -DPHYSFS_BUILD_SHARED=ON \ + -DPHYSFS_BUILD_TEST=OFF \ + -DPHYSFS_BUILD_WX_TEST=OFF \ + -DPHYSFS_INTERNAL_ZLIB=OFF \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DLIB_SUFFIX:STRING=${LIBDIRSUFFIX} || exit 1 |