forked from ports/contrib
74 lines
1.8 KiB
Plaintext
74 lines
1.8 KiB
Plaintext
# Description: GDC is a D language front end for the GNU Compiler Collection.
|
|
# URL: http://dgcc.sourceforge.net/
|
|
# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
|
|
# Packager: Danny Rawlins, monster dot romster at gmail dot com
|
|
|
|
name=gdc
|
|
version=0.24
|
|
gcc_version=4.1.2
|
|
release=2
|
|
source=(http://downloads.sourceforge.net/project/dgcc/$name-$version-src.tar.bz2
|
|
ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$gcc_version/gcc-{core,g++}-$gcc_version.tar.bz2
|
|
gdc-$gcc_version-nocheck-fixincludes.patch
|
|
gdc-$gcc_version-fixinc.patch)
|
|
|
|
build() {
|
|
patch -d gcc-$gcc_version -p1 -i $SRC/gdc-$gcc_version-nocheck-fixincludes.patch
|
|
patch -d gcc-$gcc_version -p1 -i $SRC/gdc-$gcc_version-fixinc.patch
|
|
|
|
sed -i -e 's|VERSUFFIX ""|VERSUFFIX " (CRUX)"|' \
|
|
gcc-$gcc_version/gcc/version.c
|
|
|
|
mkdir build
|
|
cd build
|
|
mv $SRC/d $SRC/gcc-$gcc_version/gcc/d
|
|
|
|
(
|
|
cd ../gcc-$gcc_version
|
|
./gcc/d/setup-gcc.sh
|
|
)
|
|
|
|
../gcc-$gcc_version/configure \
|
|
--prefix=/usr \
|
|
--libexecdir=/usr/lib \
|
|
--enable-languages=d \
|
|
--enable-threads=posix \
|
|
--enable-__cxa_atexit \
|
|
--enable-clocale=gnu \
|
|
--enable-shared \
|
|
--disable-nls \
|
|
--with-x=no
|
|
|
|
make bootstrap
|
|
make check
|
|
make DESTDIR=$PKG install
|
|
|
|
rm \
|
|
$PKG/usr/lib/libiberty.a \
|
|
$PKG/usr/bin/*-linux-gnu-* \
|
|
$PKG/usr/lib/gcc/*/$gcc_version/include/README \
|
|
$PKG/usr/man/man1/{cpp,gcc,gcov}.1
|
|
|
|
rm -r \
|
|
$PKG/usr/info \
|
|
$PKG/usr/lib/gcc/*/$gcc_version/install-tools \
|
|
$PKG/usr/man/man7
|
|
|
|
# remove files already on the system out of the port
|
|
for i in $(pkginfo -l gcc |sed -e "s|^|/|"); do
|
|
if [ -e "$i" ] && [ ! -d "$i" ]; then
|
|
if [ -e "$PKG$i" ]; then
|
|
rm "$PKG$i"
|
|
fi
|
|
fi
|
|
done
|
|
|
|
# Remove empty directories
|
|
find $PKG -depth -empty -exec rm -r {} \;
|
|
|
|
# remove build paths from *.la files
|
|
for i in $(find $PKG -name '*.la' | sed -e "s|$PKG|/|"); do
|
|
sed -i "s|-L$SRC[^ ]* ||g" $PKG/$i
|
|
done
|
|
}
|