summaryrefslogtreecommitdiffstats
path: root/ham/7plus/7plus.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'ham/7plus/7plus.SlackBuild')
-rw-r--r--ham/7plus/7plus.SlackBuild17
1 files changed, 11 insertions, 6 deletions
diff --git a/ham/7plus/7plus.SlackBuild b/ham/7plus/7plus.SlackBuild
index d61b297708..7157cb7a47 100644
--- a/ham/7plus/7plus.SlackBuild
+++ b/ham/7plus/7plus.SlackBuild
@@ -58,16 +58,12 @@ 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
@@ -76,8 +72,9 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-unzip $CWD/7pl225sr.zip
-mv 7plsrc.225 $PRGNAM-$VERSION
+mkdir $PRGNAM-$VERSION
+# the readme suggests forcing plain text for correct newlines (-aa)
+unzip -j -aa $CWD/7pl225sr.zip "7plsrc.225/*" -d $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -86,6 +83,14 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# some extra includes
+patch -p1 --verbose <$CWD/C-includes.patch
+
+# fixes to get x86_64 to compile
+sed -i "s,^CFLAGS = -O2,& $SLKCFLAGS -fcommon," linux.mak
+sed -i "s,^LDFLAGS = -s,& -fcommon," linux.mak
+sed -i "s,^DEFINES =,& -D__i386__," linux.mak
+
make -f linux.mak
install -D -g root -o root -m 0755 7plus $PKG/usr/bin/7plus