summaryrefslogtreecommitdiff
path: root/development/fpc
diff options
context:
space:
mode:
Diffstat (limited to 'development/fpc')
-rw-r--r--development/fpc/fpc.SlackBuild47
-rw-r--r--development/fpc/fpc.info12
-rw-r--r--development/fpc/slack-desc2
3 files changed, 36 insertions, 25 deletions
diff --git a/development/fpc/fpc.SlackBuild b/development/fpc/fpc.SlackBuild
index f6bdf874e1..858756f41f 100644
--- a/development/fpc/fpc.SlackBuild
+++ b/development/fpc/fpc.SlackBuild
@@ -24,24 +24,34 @@
# Modified by the SlackBuilds.org project.
PRGNAM=fpc
-VERSION=${SRCVER:-2.2.4}
-ARCH=${ARCH:-i386}
+VERSION=${SRCVER:-2.4.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "x86_64" ]; then
+if [ "$ARCH" = "i486" ]; then
+ ARCH=i386
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
ARCH=x86_64
LIBDIRSUFFIX="64"
- echo "NOTICE: $ARCH is UNSUPPORTED."
- exit
else
- ARCH=i386
- LIBDIRSUFFIX=""
+ printf "$ARCH is not supported...\n"
+ exit 1
fi
set -e
@@ -70,10 +80,11 @@ tar xvf $CWD/$PRGNAM-$VERSION.$ARCH-linux.tar
# Install program
cd $PKG/usr
-for file in `ls $TMP/$PRGNAM-$VERSION/binary/*tar.gz`
+for file in $(ls $TMP/$PRGNAM-$VERSION/binary/*tar.gz)
do
tar xvf $file
done
+[ "$LIBDIRSUFFIX" = "64" ] && mv $PKG/usr/lib $PKG/usr/lib${LIBDIRSUFFIX}
cd $PKG/usr/bin
if [ "$ARCH" = "x86_64" ]; then
@@ -85,18 +96,20 @@ fi
# copy docs
mv $PKG/usr/share/doc $PKG/usr/doc
rmdir $PKG/usr/share
-mv $TMP/$PRGNAM-$VERSION/docs/share/doc/fpdocs-$VERSION/*.pdf \
- $PKG/usr/doc/$PRGNAM-$VERSION/
+# No idea why, but the pdf docs are in different places depending on arch
+if [ "$ARCH" = "x86_64" ]; then
+ mv $TMP/$PRGNAM-$VERSION/docs/doc/*.pdf $PKG/usr/doc/$PRGNAM-$VERSION
+else
+ mv $TMP/$PRGNAM-$VERSION/docs/share/doc/fpdocs-$VERSION/*.pdf \
+ $PKG/usr/doc/$PRGNAM-$VERSION/
+fi
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+find $PKG/usr/doc -type d -name '.svn' | xargs rm -rf
-# Strip binaries and libraries.
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-# Compress man pages.
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
# Create compiler config file.
mkdir -p $PKG/etc $PKG/usr/lib$LIBDIRSUFFIX/fpc/$VERSION/ide/text
@@ -109,8 +122,6 @@ sed -i -e "s:$PKG::g" $PKG/etc/fpc.cfg
sed -i -e "s:$PKG::g" $PKG/usr/lib$LIBDIRSUFFIX/fpc/$VERSION/ide/text/fp.cfg
mv $PKG/etc/fpc.cfg $PKG/etc/fpc.cfg.new
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
diff --git a/development/fpc/fpc.info b/development/fpc/fpc.info
index dfe0fa7c31..a9869c7e54 100644
--- a/development/fpc/fpc.info
+++ b/development/fpc/fpc.info
@@ -1,10 +1,10 @@
PRGNAM="fpc"
-VERSION="2.2.4-0"
+VERSION="2.4.0"
HOMEPAGE="http://www.freepascal.org/"
-DOWNLOAD="http://downloads.sourceforge.net/freepascal/fpc-2.2.4.i386-linux.tar"
-MD5SUM="dad8cb132bbefdc52b0f93e56484ea29"
-DOWNLOAD_x86_64="http://downloads.sourceforge.net/freepascal/fpc-2.2.4.x86_64-linux.tar"
-MD5SUM_x86_64="UNSUPPORTED"
+DOWNLOAD="http://downloads.sourceforge.net/freepascal/fpc-2.4.0.i386-linux.tar"
+MD5SUM="5f38071d4bc560425f08905c14c1a68c"
+DOWNLOAD_x86_64="http://downloads.sourceforge.net/freepascal/fpc-2.4.0.x86_64-linux.tar"
+MD5SUM_x86_64="80fc3434f2d2af25af8c5e4dcf98723b"
MAINTAINER="Andre Barboza"
EMAIL="bmg.andre@gmail.com"
-APPROVED="dsomero"
+APPROVED="rworkman"
diff --git a/development/fpc/slack-desc b/development/fpc/slack-desc
index 296ebf5b6a..32b2f91c07 100644
--- a/development/fpc/slack-desc
+++ b/development/fpc/slack-desc
@@ -16,4 +16,4 @@ fpc: systems are supported: Linux, FreeBSD, Mac OS X/Darwin, DOS, Win32,
fpc: Win64, WinCE, OS/2, Netware (libc and classic) and MorphOS.
fpc:
fpc: Homepage: http://www.freepascal.org/
-fpc:
+fpc: