summaryrefslogtreecommitdiff
path: root/gcj/Pkgfile
blob: f644fcd27c348d2cf65b4c019b8b299e2023db75 (plain)
    1 # Description: GNU Java Compiler.
    2 # URL: http://gcc.gnu.org/
    3 # Maintainer: Danny Rawlins, monster dot romster at gmail dot com
    4 # Packager: Aaron Marks, nymacro at gmail dot com
    5 # Depends On: alsa-lib
    6 
    7 name=gcj
    8 version=4.3.2
    9 release=1
   10 source=(ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$version/gcc-{core,g++,java}-$version.tar.bz2
   11 	$name-4.2.3-nocheck-fixincludes.patch)
   12 
   13 build() {
   14 	patch -d gcc-$version -p 1 -i $SRC/$name-4.2.3-nocheck-fixincludes.patch
   15 
   16 	sed -i gcc-$version/gcc/version.c \
   17 		-e 's|VERSUFFIX ""|VERSUFFIX " (CRUX)"|'
   18 
   19 	mkdir build
   20 	cd build
   21 
   22 	../gcc-$version/configure \
   23 		--prefix=/usr \
   24 		--libexecdir=/usr/lib \
   25 		--enable-languages=java \
   26 		--enable-threads=posix \
   27 		--enable-__cxa_atexit \
   28 		--enable-clocale=gnu \
   29 		--enable-shared \
   30 		--disable-nls \
   31 		--with-x=no \
   32 		--enable-version-specific-runtime-libs
   33 
   34 	make bootstrap
   35 	make check
   36 	make -j 1 DESTDIR=$PKG install
   37 
   38 	ln -sf /usr/libexec/gcc/i686-pc-linux-gnu/$version/jc1 $PKG/usr/bin/jc1
   39 	
   40 	# remove un-needed files
   41 	find $PKG -name 'README' -delete
   42 
   43 	rm \
   44 		$PKG/usr/lib/libiberty.a \
   45 		$PKG/usr/bin/*-linux-gnu-* \
   46 		$PKG/usr/man/man1/{cpp,g++,gcc,gcov}.1
   47 
   48 	rm -r \
   49 		$PKG/usr/info \
   50 		$PKG/usr/man/man7 \
   51 		$PKG/usr/lib/gcc/*/$version/install-tools
   52 
   53 	# remove files already on the system out of the port
   54 	for i in $(pkginfo -l gcc |sed -e "s|^|/|"); do
   55 		if [ -e "$i" ] && [ ! -d "$i" ]; then
   56 			if [ -e "$PKG$i" ]; then
   57 				rm "$PKG$i"
   58 			fi
   59 		fi
   60 	done
   61 
   62 	# Remove empty directories
   63 	find $PKG -depth -empty -delete
   64 
   65 	# remove build links from *.la files
   66 	for i in `find $PKG -name '*.la' | sed -e "s|$PKG|/|"`; do
   67 		sed -i "s|-L$SRC[^ ]* ||g" $PKG/$i
   68 	done
   69 }

Generated by cgit