summaryrefslogtreecommitdiff
path: root/source/d/gcc/gcc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/gcc/gcc.SlackBuild')
-rwxr-xr-xsource/d/gcc/gcc.SlackBuild44
1 files changed, 37 insertions, 7 deletions
diff --git a/source/d/gcc/gcc.SlackBuild b/source/d/gcc/gcc.SlackBuild
index 6f93f767..6c2cdfc7 100755
--- a/source/d/gcc/gcc.SlackBuild
+++ b/source/d/gcc/gcc.SlackBuild
@@ -2,7 +2,7 @@
# GCC package build script (written by volkerdi@slackware.com)
#
# Copyright 2003, 2004 Slackware Linux, Inc., Concord, California, USA
-# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -57,7 +57,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=gcc
SRCVER=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
VERSION=$(echo $SRCVER | cut -f 1 -d _)
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# How many jobs to run in parallel:
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -84,6 +84,7 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "gcc-objc-$VERSION-$ARCH-$BUILD.txz"
echo "gcc-go-$VERSION-$ARCH-$BUILD.txz"
echo "gcc-brig-$VERSION-$ARCH-$BUILD.txz"
+ echo "gcc-gdc-$VERSION-$ARCH-$BUILD.txz"
exit 0
fi
@@ -144,14 +145,15 @@ PKG6=$TMP/package-gcc-objc
#PKG7=$TMP/package-gcc-g++-gch
PKG8=$TMP/package-gcc-go
PKG9=$TMP/package-gcc-brig
+PKG10=$TMP/package-gcc-gdc
# Clear the build locations:
rm -rf $TMP/gcc.build.lnx
-rm -rf $PKG{1,2,3,4,6,8,9}
-mkdir -p $PKG{1,2,3,4,6,8,9}/usr/doc/gcc-$VERSION
+rm -rf $PKG{1,2,3,4,6,8,9,10}
+mkdir -p $PKG{1,2,3,4,6,8,9,10}/usr/doc/gcc-$VERSION
# Insert package descriptions:
-mkdir -p $PKG{1,2,3,4,6,8,9}/install
+mkdir -p $PKG{1,2,3,4,6,8,9,10}/install
cat $CWD/slack-desc.gcc > $PKG1/install/slack-desc
cat $CWD/slack-desc.gcc-g++ > $PKG2/install/slack-desc
cat $CWD/slack-desc.gcc-gfortran > $PKG3/install/slack-desc
@@ -160,6 +162,7 @@ cat $CWD/slack-desc.gcc-objc > $PKG6/install/slack-desc
#cat $CWD/slack-desc.gcc-g++-gch > $PKG7/install/slack-desc
cat $CWD/slack-desc.gcc-go > $PKG8/install/slack-desc
cat $CWD/slack-desc.gcc-brig > $PKG9/install/slack-desc
+cat $CWD/slack-desc.gcc-gdc > $PKG10/install/slack-desc
( cd gcc-$SRCVER || exit 1
@@ -249,6 +252,14 @@ cat $CWD/slack-desc.gcc-brig > $PKG9/install/slack-desc
fi
)
+ mkdir -p $PKG10/usr/doc/gcc-${VERSION}/gcc/d
+ ( cd d || exit 0
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG10/usr/doc/gcc-${VERSION}/gcc/d/ChangeLog
+ touch -r ChangeLog $PKG10/usr/doc/gcc-${VERSION}/gcc/d/ChangeLog
+ fi
+ )
+
) || exit 1
mkdir -p $PKG3/usr/doc/gcc-${VERSION}/libgfortran
@@ -325,7 +336,7 @@ cat $CWD/slack-desc.gcc-brig > $PKG9/install/slack-desc
--infodir=/usr/info \
--enable-shared \
--enable-bootstrap \
- --enable-languages=ada,brig,c,c++,fortran,go,lto,objc \
+ --enable-languages=ada,brig,c,c++,d,fortran,go,lto,objc \
--enable-threads=posix \
--enable-checking=release \
--enable-objc-gc \
@@ -578,7 +589,24 @@ rm -f $PKG1/{,usr/}lib${LIBDIRSUFFIX}/*.la
mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/brig1 usr/libexec/gcc/$TARGET/$VERSION
mkdir -p usr/man/man1
mv $PKG1/usr/man/man1/gccbrig.1.gz usr/man/man1
-)
+) || exit 1
+
+# gcc-gdc:
+( cd $PKG10
+ mkdir -p usr/bin
+ mv $PKG1/usr/bin/gdc $PKG1/usr/bin/*-gdc usr/bin
+ mkdir -p usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgdruntime* usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgphobos* usr/lib${LIBDIRSUFFIX}
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/d21 usr/libexec/gcc/$TARGET/$VERSION
+ mkdir -p usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/d usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mkdir -p usr/info
+ mv $PKG1/usr/info/gdc.info.gz usr/info
+ mkdir -p usr/man/man1
+ mv $PKG1/usr/man/man1/gdc.1.gz usr/man/man1
+) || exit 1
# Generate packages:
( cd $PKG1
@@ -595,6 +623,8 @@ rm -f $PKG1/{,usr/}lib${LIBDIRSUFFIX}/*.la
makepkg -l y -c n $TMP/gcc-go-$VERSION-$ARCH-$BUILD.txz )
( cd $PKG9
makepkg -l y -c n $TMP/gcc-brig-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG10
+ makepkg -l y -c n $TMP/gcc-gdc-$VERSION-$ARCH-$BUILD.txz )
echo
echo "Slackware GCC package build complete!"