[Slackbuilds-users] build fixes for LiVES, avidemux, vice

Matteo Bernardini matteo.bernardini at sns.it
Mon May 31 06:35:43 UTC 2010


sorry if I hasn't been clear about the build issues I found with the new 
13.1 repository (I'm still too enthusiastic about having a git repo to 
play with :) ), I'll try to list them in a ordered form:

-----------------------------------------

LiVES

the package is created with a /usr/bin/lives link that points in the 
build directory: I managed to fix it adding an additional manual link 
creation to the slackbuild.
I also added the miscellaneous cleanups following the template.

http://github.com/Ponce/slackbuilds/commit/8302768d094c5f4ac084c3a652e95ce283183e06

-----------------------------------------
diff --git a/multimedia/LiVES/LiVES.SlackBuild 
b/multimedia/LiVES/LiVES.SlackBuild
index eac024b..4be6aa6 100644
--- a/multimedia/LiVES/LiVES.SlackBuild
+++ b/multimedia/LiVES/LiVES.SlackBuild
@@ -9,10 +9,19 @@

  PRGNAM=LiVES
  VERSION=1.1.8
-ARCH=${ARCH:-i486}
  BUILD=${BUILD:-1}
  TAG=${TAG:-_SBo}

+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+  case "$( uname -m )" in
+    i?86) ARCH=i486 ;;
+    arm*) ARCH=arm ;;
+    # Unless $ARCH is already set, use uname -m for all other archs:
+       *) ARCH=$( uname -m ) ;;
+  esac
+fi
+
  CWD=$(pwd)
  TMP=${TMP:-/tmp/SBo}
  PKG=$TMP/package-$PRGNAM
@@ -24,9 +33,12 @@ if [ "$ARCH" = "i486" ]; then
  elif [ "$ARCH" = "i686" ]; then
    SLKCFLAGS="-O2 -march=i686 -mtune=i686"
    LIBDIRSUFFIX=""
- elif [ "$ARCH" = "x86_64" ]; then
+elif [ "$ARCH" = "x86_64" ]; then
    SLKCFLAGS="-O2 -fPIC"
    LIBDIRSUFFIX="64"
+else
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX=""
  fi

  set -e
@@ -55,6 +67,10 @@ CFLAGS="$SLKCFLAGS" \
  make docdir=/usr/doc/$PRGNAM-$VERSION
  make install-strip docdir=/usr/doc/$PRGNAM-$VERSION DESTDIR=$PKG

+# fix wrong link to lives-exe binary
+rm $PKG/usr/bin/lives
+ln -s /usr/bin/lives-exe $PKG/usr/bin/lives
+
  mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  cp -a COPYING INSTALL NEWS $PKG/usr/doc/$PRGNAM-$VERSION
  cat $CWD/$PRGNAM.SlackBuild > 
$PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-----------------------------------------


avidemux

-----------------------------------------

the package has a wrong md5sum in the info file, installs library in the 
wrong path on x86_64 and doesn't build the plugins: took the fixes from 
alien bob's buildscript and applied

http://github.com/Ponce/slackbuilds/commit/0e6157ab1b20474e96bf110b0d23087837a8bfc3

-----------------------------------------
diff --git a/multimedia/avidemux/avidemux.SlackBuild 
b/multimedia/avidemux/avidemux.SlackBuild
index b05768d..9ab8f66 100644
--- a/multimedia/avidemux/avidemux.SlackBuild
+++ b/multimedia/avidemux/avidemux.SlackBuild
@@ -74,6 +74,11 @@ chmod -R a-s,u+w,go+r-w .
  #Patch that installs i18n in the correct place even if we compile with 
qt4 support
  cat $CWD/avidemux-2.5.1-i18n.patch | patch -p1 --verbose --backup 
--suffix=.orig

+if [ "$ARCH" = "x86_64" ]; then
+  # Some paths are incorrectly hardcoded to "lib":
+  sed -i -e "s/Dir=\"lib\"/Dir=\"lib${LIBDIRSUFFIX}\"/" $(grep -lr 
'Dir="lib"' .)
+fi
+
  mkdir build
  cd build

@@ -121,6 +126,23 @@ cd build
    make DESTDIR=$PKG install/strip
  cd ..

+mkdir -p build_plugins
+cd build_plugins
+  cmake \
+    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DMAN_INSTALL_DIR=/usr/man \
+    -DSYSCONF_INSTALL_DIR=/etc \
+    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+    -DAVIDEMUX_SOURCE_DIR=$(cd .. ; pwd) \
+    -DAVIDEMUX_CORECONFIG_DIR=$(cd .. ; pwd)/build/config \
+    -DAVIDEMUX_INSTALL_PREFIX=$(cd .. ; pwd)/build \
+    ../plugins
+  make
+  make DESTDIR=$PKG install/strip
+cd -
+
  mkdir -p $PKG/usr/man/man1
  cat man/avidemux.1 | gzip -9c > $PKG/usr/man/man1/avidemux.1.gz

diff --git a/multimedia/avidemux/avidemux.info 
b/multimedia/avidemux/avidemux.info
index 4ed9891..8622274 100644
--- a/multimedia/avidemux/avidemux.info
+++ b/multimedia/avidemux/avidemux.info
@@ -3,8 +3,8 @@ VERSION="2.5.2"
  HOMEPAGE="http://avidemux.org"
  DOWNLOAD="http://downloads.sourceforge.net/avidemux/avidemux_2.5.2.tar.gz"
  DOWNLOAD_x86_64=""
-MD5SUM="22467c9ea5476d94cbd505685b4c11e7"
+MD5SUM="9027e1324c06e833e6c3c22298503cc7"
  MD5SUM_x86_64=""
  MAINTAINER="Niklas 'Nille' Åkerström"
  EMAIL="Nille.kungen[AT]gmail.com"
-APPROVED="michiel"
+APPROVED=""
-----------------------------------------

vice

-----------------------------------------

it looks like build breaks because of the new gcc, I managed to add a 
patch from here
http://lists.rpmfusion.org/pipermail/rpmfusion-commits/2009-April/004561.html 
and I applied the fixes from the default template

http://github.com/Ponce/slackbuilds/commit/db3ddaa8211290fdbc19438dc680599be40508cc

-----------------------------------------
diff --git a/system/vice/patches/vice-gcc-4.4.patch 
b/system/vice/patches/vice-gcc-4.4.patch
new file mode 100644
index 0000000..505d736
--- /dev/null
+++ b/system/vice/patches/vice-gcc-4.4.patch
@@ -0,0 +1,11 @@
+--- src/arch/unix/joy.c
++++ src/arch/unix/joy.c
+@@ -124,7 +124,7 @@
+ #define JS_DATA_TYPE joystick
+ #define JS_RETURN    sizeof(struct joystick)
+ int     use_old_api=1;
+-#elif
++#else
+ #error Unknown Joystick
+ #endif
+
diff --git a/system/vice/vice.SlackBuild b/system/vice/vice.SlackBuild
index f29eece..ea01802 100644
--- a/system/vice/vice.SlackBuild
+++ b/system/vice/vice.SlackBuild
@@ -24,10 +24,19 @@

  PRGNAM=vice
  VERSION=2.1
-ARCH=${ARCH:-i486}
  BUILD=${BUILD:-1}
  TAG=${TAG:-_SBo}

+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+  case "$( uname -m )" in
+    i?86) ARCH=i486 ;;
+    arm*) ARCH=arm ;;
+    # Unless $ARCH is already set, use uname -m for all other archs:
+       *) ARCH=$( uname -m ) ;;
+  esac
+fi
+
  CWD=$(pwd)
  TMP=${TMP:-/tmp/SBo}
  PKG=$TMP/package-$PRGNAM
@@ -41,7 +50,10 @@ elif [ "$ARCH" = "i686" ]; then
    LIBDIRSUFFIX=""
  elif [ "$ARCH" = "x86_64" ]; then
    SLKCFLAGS="-O2 -fPIC"
-  LIBDIRSUFFIX=64
+  LIBDIRSUFFIX="64"
+else
+  SLKCFLAGS="-O2"
+  LIBDIRSUFFIX=""
  fi

  set -e # Exit on most errors
@@ -66,6 +78,9 @@ patch -p1 <$CWD/patches/vice-fix-help.patch
  # Use /usr/lib64 on 64-bit Slackware
  [ "$ARCH" == "x86_64" ] && patch -p1 < $CWD/patches/vice-2.1-64bit.patch

+# patch for gcc 4.4
+patch -p0 < $CWD/patches/vice-gcc-4.4.patch
+
  CFLAGS="$SLKCFLAGS" \
  CXXFLAGS="$SLKCFLAGS" \
  ./configure \
-----------------------------------------




More information about the SlackBuilds-users mailing list