summaryrefslogtreecommitdiff
path: root/development/sdcc/sdcc.SlackBuild
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2014-08-30 15:30:39 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-08-30 15:30:39 +0700
commitc4d68ee9292cb3b437fef3c6aec654118cc970b2 (patch)
tree3676d79c4fa26aa58424d7dc4939a668603d30e7 /development/sdcc/sdcc.SlackBuild
parent91d4642d9d1cac495da30a3f6305085cdac851a8 (diff)
downloadslackbuilds-c4d68ee9292cb3b437fef3c6aec654118cc970b2.tar.gz
development/sdcc: Updated for version 3.4.0 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/sdcc/sdcc.SlackBuild')
-rw-r--r--development/sdcc/sdcc.SlackBuild56
1 files changed, 44 insertions, 12 deletions
diff --git a/development/sdcc/sdcc.SlackBuild b/development/sdcc/sdcc.SlackBuild
index 09675b6835..05fb845662 100644
--- a/development/sdcc/sdcc.SlackBuild
+++ b/development/sdcc/sdcc.SlackBuild
@@ -2,10 +2,28 @@
# Slackware build script for sdcc
-# Written by Grissiom <chaos.proton@gmail.com>
+# Copyright 2014 Kyle Guinn <elyk03@gmail.com>, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=sdcc
-VERSION=${VERSION:-3.0.0}
+VERSION=${VERSION:-3.4.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -22,6 +40,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+DOCS="COPYING ChangeLog"
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -36,16 +56,14 @@ else
LIBDIRSUFFIX=""
fi
-ENABLE_PIC=${ENABLE_PIC:-no}
-
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM
+rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-src-$VERSION.tar.bz2
-cd $PRGNAM
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -53,22 +71,36 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-if [ "$ENABLE_PIC" = 'no' ]; then
- enable_pic='--disable-pic-port --disable-pic16-port'
-else
- enable_pic='--enable-pic-port --enable-pic16-port'
+# A few Makefiles install (copy) the source tree _after_ building, and
+# accidentally install a bunch of build byproducts which they try to clean
+# up afterwards. Delete some byproducts that they missed.
+for patch in $CWD/patches/* ; do
+ patch -p1 < $patch
+done
+
+# Requires lyx, latex2html, possibly others. Untested.
+if [ "${ENABLE_DOC:-no}" != 'no' ]; then
+ enable_doc='--enable-doc'
+fi
+
+# Requires gputils.
+if [ "${ENABLE_PIC:-no}" = 'no' ]; then
+ enable_pic='--disable-pic14-port --disable-pic16-port'
fi
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --libdir=/usr/lib${LIBDIRSUFFIX}/$PRGNAM \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
+ --infodir=/usr/info \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux \
+ --enable-libgc \
+ $enable_doc \
$enable_pic
make
@@ -78,7 +110,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install