[Slackbuilds-users] faust.SlackBuild problem

Matteo Bernardini matteo.bernardini at gmail.com
Thu Aug 25 09:25:00 UTC 2016


2016-08-25 11:09 GMT+02:00 George Vlahavas <vlahavas at gmail.com>:
>
> On Thu, 25 Aug 2016, George Vlahavas wrote:
>
>> Hi,
>>
>> in the faust.SlackBuild, $ARCH is never set. You'll need to add something
>> like this close to the top:
>>
>> if [ -z "$ARCH" ]; then
>>  case "$( uname -m )" in
>>    i?86) ARCH=i586 ;;
>>    arm*) ARCH=arm ;;
>>       *) ARCH=$( uname -m ) ;;
>>  esac
>> fi
>>
>> Regards,
>>
>> George
>>
>
> Actually there are more problems with it. CFLAGS are never set properly and
> libraries get installed under /usr/lib in 64bit systems...

hi George,

please check the attached patch (I'll put the maintainer in cc).

Matteo
-------------- next part --------------
--- ./faust.SlackBuild.orig	2016-08-24 12:02:28.086919485 +0200
+++ ./faust.SlackBuild	2016-08-25 11:20:55.579483919 +0200
@@ -24,14 +24,36 @@
 
 PRGNAM=faust
 VERSION=${VERSION:-0.9.58}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
 TAG=${TAG:-_SBo}
 
+if [ -z "$ARCH" ]; then
+  case "$( uname -m )" in
+    i?86) ARCH=i586 ;;
+    arm*) ARCH=arm ;;
+       *) ARCH=$( uname -m ) ;;
+  esac
+fi
+
 CWD=$(pwd)
 TMP=${TMP:-/tmp/SBo}
 PKG=$TMP/package-$PRGNAM
 OUTPUT=${OUTPUT:-/tmp}
 
+if [ "$ARCH" = "i586" ]; then
+  SLKCFLAGS="-O2 -march=i586 -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 
 
 rm -rf $PKG
@@ -43,10 +65,48 @@
 unzip $CWD/$PRGNAM-$VERSION.zip
 chown -R root:root .
 find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+  -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Add some fixes (thanks to the fedora folks!)
+# For installation in the correct location and for preserving timestamps:
+# The Makefile normally puts noarch files in $prefix/lib. We change
+# this to $prefix/share
+sed -i \
+  -e 's|/lib/|/share/|g' \
+  -e 's| -r | -pr |' \
+  -e 's| -m | -pm |' \
+  Makefile
+sed -i 's|/lib|/share|g' compiler/parser/enrobage.cpp
+sed -i 's|install |install -pm 755 |' tools/faust2appls/Makefile
+
+# Fix optflags
+sed -i "s|-O3|$SLKCFLAGS|" \
+  compiler/Makefile.unix \
+  architecture/osclib/faust/Makefile \
+  architecture/osclib/oscpack/Makefile
+
+# Fix permissions
+chmod -x compiler/draw/device/SVGDev.* architecture/VST/PkgInfo
+chmod +x tools/faust2appls/faust2*
+chmod -x tools/faust2pd/faust2*
+
+# Fix encoding
+for i in examples syntax-highlighting; do
+  iconv -f iso8859-1 -t utf8 $i/README -o tmpfile
+  touch -r $i/README tmpfile
+  mv -f tmpfile $i/README
+done
+
+# To distinguish doc files
+for i in changelog license readme; do
+  mv architecture/osclib/faust/$i.txt architecture/osclib/faust/$i.faustOSC.txt
+done
+for i in CHANGES LICENSE README TODO; do
+  mv architecture/osclib/oscpack/$i architecture/osclib/oscpack/$i.osscpack.txt
+done
 
 make PREFIX=/usr DESTDIR=$PKG
 make install PREFIX=/usr DESTDIR=$PKG


More information about the SlackBuilds-users mailing list