aboutsummaryrefslogtreecommitdiff
path: root/sci
diff options
context:
space:
mode:
authorluis <luis@370017ae-e619-0410-ac65-c121f96126d4>2007-02-04 01:25:25 +0000
committerluis <luis@370017ae-e619-0410-ac65-c121f96126d4>2007-02-04 01:25:25 +0000
commit49b563bb9c4980f69a91485a7b64ffa7b24b7f13 (patch)
tree443e6f98c4d063adc7c9209aa52726305bc366f6 /sci
parent27ec339d203739b284098a232274d7a8934f7207 (diff)
downloadslackbuilds-49b563bb9c4980f69a91485a7b64ffa7b24b7f13.tar.gz
slackbuilds-49b563bb9c4980f69a91485a7b64ffa7b24b7f13.tar.bz2
Updating SlackBuilds: gtkwave, ivi
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1000 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'sci')
-rwxr-xr-xsci/electronics/gtkwave/gtkwave.SlackBuild44
-rwxr-xr-xsci/electronics/ivi/ivi.SlackBuild22
2 files changed, 16 insertions, 50 deletions
diff --git a/sci/electronics/gtkwave/gtkwave.SlackBuild b/sci/electronics/gtkwave/gtkwave.SlackBuild
index ac330113..15c80c81 100755
--- a/sci/electronics/gtkwave/gtkwave.SlackBuild
+++ b/sci/electronics/gtkwave/gtkwave.SlackBuild
@@ -18,31 +18,16 @@ fi
# Set variables
SRC_NAME="gtkwave"
PKG_NAME="gtkwave"
-ARCH=${ARCH:=i486}
-VERSION=${VERSION:=3.0.20}
+ARCH="i486"
+VERSION= # Only the -current version is available for download.
+ #+The version being built can only be defined after
+ #+decompressing the downloaded source.
BUILD=${BUILD:=1ls}
SRC_DIR=${SRC_DIR:=$CWD}
TMP=${TMP:=/tmp}
PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
PREFIX=${PREFIX:=/usr}
-PKG_SRC="$SRC_DIR/$SRC_NAME-$VERSION"
-
-# Set system libraries' path and optmization flags based on $ARCH
-LIBDIR="$PREFIX/lib"
-
-if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
-elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686"
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2"
- LIBDIR="$PREFIX/lib64"
-fi
# Set error codes (used by createpkg)
ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
@@ -51,7 +36,7 @@ ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
# Clean up any leftovers of previous builds
-rm -rf "$PKG_SRC" 2> /dev/null
+rm -rf "$SRC_DIR/$SRC_NAME"-3.* 2> /dev/null
rm -rf "$PKG" 2> /dev/null
# Create directories, if necessary
@@ -63,32 +48,31 @@ mkdir -p "$REPOS" || exit $ERROR_MKDIR
SRC="$SRC_NAME-current.tar.gz"
URL="http://home.nc.rr.com/gtkwave/$SRC"
-if [ ! -f "$SRC_DIR/$SRC" ]; then
+if [ ! -f "$SRC_DIR/$SRC" ] || ! gzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
# Check if GTKWave should be built for GTK+-2.x (default,
#+if both are available) or 1.x
-pkg-config gtk+-2.0 --libs
+pkg-config gtk+-2.0 --libs 1> /dev/null 2> /dev/null
if [ $? == 0 ]; then
GTK_VERSION=2
else
- gtk-config --libs
+ gtk-config --libs 1> /dev/null 2> /dev/null
if [ $? == 0 ]; then
GTK_VERSION=1
else
echo "ERROR: GTKWave requires either GTK+-1.x or 2.x"
- exit 1
+ exit $ERROR_CONF
fi
fi
-# Untar, configure, compile and install
+# Untar, define $VERSION, configure, compile and install
cd "$SRC_DIR"
tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
-cd "$PKG_SRC"
-CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- echo $GTK_VERSION | ./configure || exit $ERROR_CONF
+VERSION="$(ls -d "$SRC_DIR/$SRC_NAME"-3.* | cut -d "-" -f 2)"
+cd "$SRC_NAME-$VERSION"
+echo $GTK_VERSION | ./configure || exit $ERROR_CONF
make || exit $ERROR_MAKE
make install prefix="$PKG/$PREFIX" || exit $ERROR_INSTALL
@@ -150,5 +134,5 @@ makepkg -l y -c n "$REPOS/$PKG_NAME-$VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MK
# Delete source and build directories, if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf "$PKG_SRC" "$PKG"
+ rm -rf "$SRC_DIR/$SRC_NAME-$VERSION" "$PKG"
fi
diff --git a/sci/electronics/ivi/ivi.SlackBuild b/sci/electronics/ivi/ivi.SlackBuild
index 3b732c0e..a9311080 100755
--- a/sci/electronics/ivi/ivi.SlackBuild
+++ b/sci/electronics/ivi/ivi.SlackBuild
@@ -18,7 +18,7 @@ fi
# Set variables
SRC_NAME="ivi"
PKG_NAME="ivi"
-ARCH=${ARCH:=i486}
+ARCH="i486"
SRC_VERSION="0.4-pre-20031121"
PKG_VERSION="0.4_20031121"
BUILD=${BUILD:=1ls}
@@ -29,22 +29,6 @@ REPOS=${REPOS:=$TMP}
PREFIX=${PREFIX:=/usr}
PKG_SRC="$SRC_DIR/$SRC_NAME-$SRC_VERSION"
-# Set system libraries' path and optmization flags based on $ARCH
-LIBDIR="$PREFIX/lib"
-
-if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
-elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686"
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2"
- LIBDIR="$PREFIX/lib64"
-fi
-
# Set error codes (used by createpkg)
ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
@@ -73,9 +57,7 @@ cd "$SRC_DIR"
tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
cd "$PKG_SRC"
patch -Np1 < "$CWD/ivi-0.4-pre-20031121-gcc3.4.patch" || exit $ERROR_PATCH
-CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure --enable-release || exit $ERROR_CONF
+./configure --enable-release || exit $ERROR_CONF
make || exit $ERROR_MAKE
make install prefix="$PKG/$PREFIX/share/ivi" || exit $ERROR_INSTALL