]> gitweb.fluxo.info Git - slackbuilds.git/commitdiff
gnuradio version bump and small improvement
authorrafael2k <rafael2k@370017ae-e619-0410-ac65-c121f96126d4>
Sun, 14 Dec 2008 19:40:03 +0000 (19:40 +0000)
committerrafael2k <rafael2k@370017ae-e619-0410-ac65-c121f96126d4>
Sun, 14 Dec 2008 19:40:03 +0000 (19:40 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2012 370017ae-e619-0410-ac65-c121f96126d4

media/radio/gnuradio/gnuradio.SlackBuild

index 1c37e56a5c4395482487e0a1f7dc9fd1c8cfb6c0..589f3d64a54b5f7fb88655b316aadbd2efaac97d 100755 (executable)
@@ -16,7 +16,7 @@
 #
 # slackbuild for gnuradio, by Silvio Rhatto - rhatto at riseup.net
 # requires: boost swig fftw sdcc cppunit jack numpy wxWidgets wxPython 
-# tested: gnuradio-3.1.2
+# tested: gnuradio-3.1.3
 #
 
 # Look for slackbuildrc
@@ -90,14 +90,23 @@ tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TA
 PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
 cd "$PKG_SRC"
 
+# get boost version
+boost="`basename $(ls /var/log/packages/boost-[0-9]* 2> /dev/null)`"
+
+if [ -z "$boost" ]; then
+  echo Error: missing boost package
+  exit $ERROR_CONF
+fi
+
+pack="`basename $boost | sed -e 's/-[^-]*-[^-]*-[^-]*$//'`"
+boost_version="`echo $boost | sed -e "s/^$pack-//" | cut -d "-" -f 1 | \
+                              sed -e 's/\./_/g' -e 's/\([0-9]\+\)_\([0-9]\+\)_0/\1_\2/'`"
+
 CFLAGS="$SLKCFLAGS" \
   CXXFLAGS="$SLKCFLAGS" \
   ./configure \
-  --prefix="$PREFIX" --libdir="$LIBDIR" --sysconfdir=/etc $CONF_OPTIONS || exit $ERROR_CONF
-
-if [ "$ARCH" == "x86_64" ] && [ "$PKG_VERSION" == "3.1.2" ]; then
-  sed -i -e 's/-L\/usr\/lib /-L\/usr\/lib64 /g' gr-audio-alsa/src/Makefile
-fi
+  --prefix="$PREFIX" --libdir="$LIBDIR" --sysconfdir=/etc \
+  --with-boost-include-dir=/usr/include/boost-$boost_version --enable-doxygen $CONF_OPTIONS || exit $ERROR_CONF
 
 # Compile
 make $NUMJOBS || exit $ERROR_MAKE
@@ -191,15 +200,9 @@ mkuser() {
   fi
 }
 
-config etc/gnuradio/conf.d/gnuradio-core.conf.new ; config etc/gnuradio/conf.d/gr-audio-alsa.conf.new ; config etc/gnuradio/conf.d/gr-audio-jack.conf.new ; etc/gnuradio/conf.d/gr-audio-oss.conf.new ; config etc/gnuradio/conf.d/gr-wxgui.conf.new
+config etc/gnuradio/conf.d/gnuradio-core.conf.new ; config etc/gnuradio/conf.d/gr-audio-alsa.conf.new ; config etc/gnuradio/conf.d/gr-audio-jack.new ; etc/gnuradio/conf.d/gr-audio-oss.conf.new ; config etc/gnuradio/conf.d/gr-wxgui.conf.new
 EOSCRIPT
 
-# Copy slack-required
-mkdir -p "$PKG/install" || exit $ERROR_MKDIR
-if [ -f "$CWD/slack-required" ]; then
-  cp $CWD/slack-required $PKG/install
-fi
-
 # Build the package
 cd "$PKG"
 makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG