diff options
Diffstat (limited to 'libraries/yajl/yajl.SlackBuild')
-rw-r--r-- | libraries/yajl/yajl.SlackBuild | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/libraries/yajl/yajl.SlackBuild b/libraries/yajl/yajl.SlackBuild index ba28f56da295e..14301e2e20630 100644 --- a/libraries/yajl/yajl.SlackBuild +++ b/libraries/yajl/yajl.SlackBuild @@ -5,7 +5,7 @@ # Written by Eugene Wissner <belka.ew@gmail.com> PRGNAM=yajl -VERSION=${VERSION:-1.0.9} +VERSION=${VERSION:-2.0.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -24,22 +24,26 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi -set -e # Exit on most errors +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION +rm -rf lloyd-$PRGNAM-f4b2b1a +tar xvf $CWD/lloyd-$PRGNAM-$VERSION-0-gf4b2b1a.tar.gz +cd lloyd-$PRGNAM-f4b2b1a chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -47,12 +51,18 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr +mkdir build +cd build + cmake .. \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX:STRING="$LIBDIRSUFFIX" \ + -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -make -j1 DESTDIR=$PKG install + make DESTDIR=$PKG install +cd - find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true |