#
# 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
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
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