gcc: add gcj support; closes #102.

This commit is contained in:
Juan RP 2013-07-21 09:07:15 +02:00
parent c69352020a
commit 42ba8bd3e6
6 changed files with 111 additions and 43 deletions

View file

@ -43,6 +43,9 @@ libbz2.so.1 bzip2-1.0.5_1
libarchive.so.12 libarchive-3.0.2_1
libarchive.so.13 libarchive-3.1.2_1
libgcc_s.so.1 libgcc-4.4.0_1
libgcj.so.13 libgcj-4.7.3_4
libgcj-tools.so.13 libgcj-4.7.3_4
libgij.so.13 libgcj-4.7.3_4
libperl.so perl-5.12.0_1
libmp.so.3 gmp-5.0.1_1
libgmp.so.10 gmp-5.0.1_1

1
srcpkgs/gcc-gcj Symbolic link
View file

@ -0,0 +1 @@
gcc

View file

@ -2,7 +2,7 @@
pkgname=gcc
_majorver=4.7
version=${_majorver}.3
revision=3
revision=4
short_desc="The GNU C Compiler"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://gcc.gnu.org"
@ -11,6 +11,9 @@ distfiles="http://ftp.gnu.org/pub/gnu/gcc/gcc-$version/gcc-$version.tar.bz2"
checksum=2f7c37eb4fc14422ff2358a9ef59c974a75ab41204ef0e49fc34ab1d8981a9c3
hostmakedepends="perl flex"
if [ -z "$CROSS_BUILD" ]; then
hostmakedepends+=" zip unzip"
fi
makedepends="zlib-devel gmp-devel mpfr-devel mpc-devel ppl-devel>=1.0 cloog-devel isl-devel"
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
@ -49,7 +52,8 @@ do_configure() {
fi
_args+=" --host=$XBPS_CROSS_TRIPLET"
else
_langs="c,c++,objc,obj-c++,fortran,go,lto"
_langs="c,c++,objc,obj-c++,fortran,go,lto,java"
_args+=" --enable-java-gc=boehm --enable-fast-character"
fi
./configure --prefix=/usr --mandir=/usr/share/man \
@ -70,7 +74,8 @@ do_build() {
do_install() {
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
vmkdir usr/lib
cd ${DESTDIR}/usr && ln -sf lib lib64
cd ${DESTDIR}/usr
ln -sf lib lib64
fi
cd ${wrksrc}
make DESTDIR=${DESTDIR} install
@ -79,17 +84,21 @@ do_install() {
# from the same series work automagically.
mv ${DESTDIR}/usr/lib/gcc/${_triplet}/${version} \
${DESTDIR}/usr/lib/gcc/${_triplet}/${_majorver}
cd ${DESTDIR}/usr/lib/gcc/${_triplet} && ln -sf ${_majorver} ${version}
cd ${DESTDIR}/usr/lib/gcc/${_triplet}
ln -sf ${_majorver} ${version}
# Ditto for c++ headers.
mv ${DESTDIR}/usr/include/c++/${version} \
${DESTDIR}/usr/include/c++/${_majorver}
cd ${DESTDIR}/usr/include/c++ && ln -sf ${_majorver} ${version}
cd ${DESTDIR}/usr/include/c++
ln -sf ${_majorver} ${version}
# cc symlink.
cd ${DESTDIR}/usr/bin && ln -sf gcc cc
cd ${DESTDIR}/usr/bin
ln -sf gcc cc
# rpcgen wants /lib/cpp, make a symlink.
cd ${DESTDIR}/usr/lib && ln -sf ../bin/cpp .
cd ${DESTDIR}/usr/lib
ln -sf ../bin/cpp .
rm -f ${DESTDIR}/usr/lib64
@ -131,7 +140,6 @@ gcc-c++-multilib_package() {
depends="gcc-c++>=${_majorver} gcc-multilib>=${_majorver} libstdc++32-devel>=${_majorver}"
short_desc="GCC C++ compiler (multilib files)"
noverifyrdeps=yes
pkg_install() {
vmkdir usr/lib/gcc/${_triplet}/${_majorver}/32
mv ${DESTDIR}/usr/lib32/libstdc++.a \
@ -145,7 +153,6 @@ gcc-multilib_package() {
depends="gcc>=${_majorver} libgcc32>=${_majorver} libgomp32>=${_majorver} libitm32>=${_majorver} zlib32 glibc32-devel"
short_desc="GCC C compiler (multilib files)"
noverifyrdeps=yes
pkg_install() {
vmove usr/lib/gcc/${_triplet}/${_majorver}/32
vmove "usr/lib32/libssp*.a"
@ -157,7 +164,6 @@ gcc-objc-multilib_package() {
depends="gcc-multilib>=${_majorver} gcc-objc>=${_majorver} libobjc32>=${_majorver}"
short_desc="The GNU Objective-C compiler (multilib files)"
noverifyrdeps=yes
pkg_install() {
vmkdir usr/lib/gcc/${_triplet}/${_majorver}/32
mv ${DESTDIR}/usr/lib32/libobjc*.a \
@ -168,12 +174,23 @@ gcc-objc-multilib_package() {
libgcc32_package() {
short_desc="GCC version ${version} shared library support (32bit)"
noverifyrdeps=yes
pkg_install() {
vmove "usr/lib32/libgcc_s.so*"
}
}
libgcj32_package() {
short_desc="GCC Java library ${version} shared library support (32bit)"
noverifyrdeps=yes
pkg_install() {
vmove "usr/lib32/libgcj*.so*"
vmove "usr/lib32/libgij.so*"
vmove usr/lib32/gcj-${version}-13
vmove usr/lib32/logging.properties
vmove usr/lib32/security/classpath.security
}
}
libgomp32_package() {
depends="libgcc32 glibc32"
short_desc="GCC OpenMP v3.0 shared support library (32bit)"
@ -187,7 +204,6 @@ libitm32_package() {
depends="libgcc32"
short_desc="GCC Transactional Memory support library (32bit)"
noverifyrdeps=yes
pkg_install() {
vmove "usr/lib32/libitm*"
}
@ -196,7 +212,6 @@ libitm32_package() {
libmudflap32-devel_package() {
depends="gcc-multilib glibc32-devel libmudflap32"
short_desc="GCC 32bit mudflap support libraries (development files)"
pkg_install() {
vmove "usr/lib32/libmudflap*.a"
}
@ -206,7 +221,6 @@ libmudflap32_package() {
depends="gcc-multilib glibc32"
short_desc="GCC mudflap shared support libraries (32bit)"
noverifyrdeps=yes
pkg_install() {
vmove "usr/lib32/libmudflap*.so*"
}
@ -216,7 +230,6 @@ libobjc32_package() {
depends="libgcc32 glibc32"
short_desc="GCC Objective-C shared library support (32bit)"
noverifyrdeps=yes
pkg_install() {
vmove "usr/lib32/libobjc.so*"
}
@ -226,7 +239,6 @@ libssp32_package() {
depends="glibc32"
short_desc="GCC SSP shared library support (32bit)"
noverifyrdeps=yes
pkg_install() {
vmove "usr/lib32/libssp.so*"
}
@ -236,7 +248,6 @@ libstdc++32-devel_package() {
depends="libstdc++-devel libstdc++32"
short_desc="GCC Standard C++ Library (32bit) development files"
noverifyrdeps=yes
pkg_install() {
vmove usr/include/c++/${_majorver}/${_triplet}/32
}
@ -246,7 +257,6 @@ libstdc++32_package() {
depends="libgcc32 glibc32 libstdc++"
short_desc="GCC Standard C++ Library (32bit)"
noverifyrdeps=yes
pkg_install() {
vmove "usr/lib32/libstdc++.so*"
}
@ -257,10 +267,35 @@ fi # !x86_64
# Disabled packages in cross builds.
if [ -z "$CROSS_BUILD" ]; then
gcc-gcj_package() {
depends="gcc>=${_majorver} libgcj-devel>=${_majorver}"
short_desc="GCC Java compiler frontend"
pkg_install() {
for f in gcj jv-convert gjarsigner gjar grmic jcf-dump \
gtnameserv gcjh gnative2ascii gserialver gkeytool \
gij grmiregistry grmid gorbd gcj-dbtool gjavah \
gc-analyze gappletviewer rebuild-gcj-db aot-compile; do
vmove usr/bin/${f}
done
for f in gcj jv-convert gjarsigner gjar grmic jcf-dump gjdoc \
gtnameserv gcjh gnative2ascii gserialver gkeytool \
gij grmiregistry grmid gorbd gcj-dbtool gjavah \
gc-analyze gappletviewer rebuild-gcj-db aot-compile; do
if [ -f ${DESTDIR}/usr/share/man/man1/${f}.1 ]; then
vmove usr/share/man/man1/${f}.1
fi
done
vmove usr/bin/${_triplet}-gcj
vmove usr/lib/gcc/${_triplet}/${_majorver}/jc1
vmove usr/lib/gcc/${_triplet}/${_majorver}/jvgenmain
vmove usr/share/info/gcj.info
touch ${PKGDESTDIR}/usr/share/info/dir
}
}
gcc-fortran_package() {
depends="gcc>=${_majorver} libgfortran-devel>=${_majorver}"
short_desc="GCC Fortran compiler frontend"
pkg_install() {
for f in gfortran ${_triplet}-gfortran; do
vmove usr/bin/${f}
@ -268,6 +303,7 @@ gcc-fortran_package() {
vmove usr/lib/gcc/${_triplet}/${_majorver}/f951
vmove usr/lib/gcc/${_triplet}/${_majorver}/finclude
vmove usr/share/info/gfortran.info
touch ${PKGDESTDIR}/usr/share/info/dir
vmove usr/share/man/man1/gfortran.1
}
}
@ -275,13 +311,13 @@ gcc-fortran_package() {
gcc-go_package() {
depends="gcc>=${_majorver} libgo-devel>=${_majorver}"
short_desc="GCC Go compiler frontend"
pkg_install() {
for f in gccgo ${_triplet}-gccgo; do
vmove usr/bin/${f}
done
vmove usr/lib/gcc/${_triplet}/${_majorver}/go1
vmove usr/share/info/gccgo.info
touch ${PKGDESTDIR}/usr/share/info/dir
vmove usr/share/man/man1/gccgo.1
vmove usr/lib/go
}
@ -290,7 +326,6 @@ gcc-go_package() {
gcc-objc++_package() {
depends="gcc-c++>=${_majorver} gcc-objc>=${_majorver}"
short_desc="GCC Objective-C++ support"
pkg_install() {
vmove usr/lib/gcc/${_triplet}/${_majorver}/cc1objplus
}
@ -299,17 +334,46 @@ gcc-objc++_package() {
gcc-objc_package() {
depends="gcc>=${_majorver} libobjc>=${_majorver}"
short_desc="GCC Objective-C support"
pkg_install() {
vmove usr/lib/gcc/${_triplet}/${_majorver}/include/objc
vmove usr/lib/gcc/${_triplet}/${_majorver}/cc1obj
}
}
libgcj-devel_package() {
short_desc="GCC Java library ${version} - development files"
pkg_install() {
vmove usr/include/c++/${_majorver}/gnu
vmove usr/include/c++/${_majorver}/java
vmove usr/include/c++/${_majorver}/javax
vmove usr/include/c++/${_majorver}/sun
vmove usr/include/c++/${_majorver}/gcj
vmove usr/include/c++/${_majorver}/org
vmove usr/lib/gcc/${_triplet}/${_majorver}/plugin/include/java
vmove "usr/lib/gcc/${_triplet}/${_majorver}/include/jni*"
vmove "usr/lib/gcc/${_triplet}/${_majorver}/include/gcj*"
vmove "usr/lib/gcc/${_triplet}/${_majorver}/include/jvm*"
vmove "usr/lib/gcc/${_triplet}/${_majorver}/include/jawt*"
vmove usr/lib/pkgconfig/libgcj-4.7.pc
}
}
libgcj_package() {
short_desc="GCC Java library ${version} shared library support"
pkg_install() {
vmove "usr/lib/libgcj*.so*"
vmove "usr/lib/libgij.so*"
vmove usr/lib/gcj-${version}-13
vmove usr/lib/logging.properties
vmove usr/lib/libgcj.spec
vmove usr/lib/security/classpath.security
vmove usr/share/java
}
}
libgfortran-devel_package() {
depends="libgfortran>=${_majorver}"
short_desc="GCC Fortran library ${version} - development files"
pkg_install() {
vmove usr/lib/libgfortran.a
vmove usr/lib/gcc/${_triplet}/${_majorver}/libgfortranbegin.a
@ -318,7 +382,6 @@ libgfortran-devel_package() {
libgfortran_package() {
short_desc="GCC Fortran library ${version} shared library support"
pkg_install() {
vmove "usr/lib/libgfortran.so*"
vmove usr/lib/libgfortran.spec
@ -329,7 +392,6 @@ libgfortran_package() {
libgo-devel_package() {
depends="libgo>=${_majorver}"
short_desc="GCC Go library ${version} shared library support - development files"
pkg_install() {
vmove usr/lib/libgo.a
vmove usr/lib/libgobegin.a
@ -338,7 +400,6 @@ libgo-devel_package() {
libgo_package() {
short_desc="Go library ${version} shared library support"
pkg_install() {
vmove "usr/lib/libgo.so*"
vinstall ${wrksrc}/COPYING.RUNTIME 644 usr/share/licenses/$pkgname RUNTIME.LIBRARY.EXCEPTION
@ -348,7 +409,6 @@ libgo_package() {
libobjc-devel_package() {
depends="libobjc>=${_majorver}"
short_desc="GCC Objective-C shared library support (development files)"
pkg_install() {
vmove "usr/lib/libobjc.*a"
}
@ -356,7 +416,6 @@ libobjc-devel_package() {
libobjc_package() {
short_desc="GCC Objective-C shared library support"
pkg_install() {
vmove "usr/lib/libobjc.so*"
vinstall ${wrksrc}/COPYING.RUNTIME 644 usr/share/licenses/$pkgname RUNTIME.LIBRARY.EXCEPTION
@ -366,17 +425,16 @@ libobjc_package() {
libquadmath-devel_package() {
depends="libquadmath>=${_majorver}"
short_desc="GCC quadmath shared support library (development files)"
pkg_install() {
vmove "/usr/lib/gcc/${_triplet}/${_majorver}/include/quadmath*"
vmove "usr/lib/gcc/${_triplet}/${_majorver}/include/quadmath*"
vmove "usr/lib/libquadmath*.a"
vmove usr/share/info/libquadmath.info
touch ${PKGDESTDIR}/usr/share/info/dir
}
}
libquadmath_package() {
short_desc="GCC quad match ${version} shared library support"
pkg_install() {
vmove "usr/lib/libquadmath.so*"
vinstall ${wrksrc}/COPYING.RUNTIME 644 usr/share/licenses/$pkgname RUNTIME.LIBRARY.EXCEPTION
@ -388,7 +446,6 @@ fi # !CROSS_BUILD
libgcc_package() {
short_desc="GCC version ${version} shared library support"
noverifyrdeps=yes
pkg_install() {
vmove "usr/lib/libgcc_s.so*"
vinstall ${wrksrc}/COPYING.RUNTIME 644 usr/share/licenses/$pkgname RUNTIME.LIBRARY.EXCEPTION
@ -398,17 +455,16 @@ libgcc_package() {
libgomp-devel_package() {
depends="libgomp>=${_majorver}"
short_desc="GCC OpenMP v3.0 shared support library - development files"
pkg_install() {
vmove usr/lib/libgomp.a
vmove usr/share/info/libgomp.info
touch ${PKGDESTDIR}/usr/share/info/dir
}
}
libgomp_package() {
short_desc="GCC OpenMP v3.0 shared support library"
replaces="gcc>=4.6.3<4.6.3_3"
pkg_install() {
vmove usr/lib/gcc/${_triplet}/${_majorver}/include/omp.h
vmove "usr/lib/libgomp*.so*"
@ -419,17 +475,16 @@ libgomp_package() {
libitm_package() {
short_desc="GCC Transactional Memory support library"
pkg_install() {
vmove "usr/lib/libitm.*"
vmove usr/share/info/libitm.info
touch ${PKGDESTDIR}/usr/share/info/dir
}
}
libmudflap-devel_package() {
depends="libmudflap>=${_majorver}"
short_desc="GCC mudflap shared support library (development files)"
pkg_install() {
vmove "usr/lib/libmudflap*.a"
}
@ -437,7 +492,6 @@ libmudflap-devel_package() {
libmudflap_package() {
short_desc="GCC mudflap shared support library"
pkg_install() {
vmove "usr/lib/libmudflap*.so*"
vinstall ${wrksrc}/COPYING.RUNTIME 644 usr/share/licenses/$pkgname RUNTIME.LIBRARY.EXCEPTION
@ -447,7 +501,6 @@ libmudflap_package() {
libssp-devel_package() {
depends="glibc-devel libssp>=${_majorver}"
short_desc="GCC SSP library support"
pkg_install() {
vmove "usr/lib/libssp*.a"
vmove usr/lib/gcc/${_triplet}/${_majorver}/include/ssp
@ -456,7 +509,6 @@ libssp-devel_package() {
libssp_package() {
short_desc="GCC SSP shared library support"
pkg_install() {
vmove "usr/lib/libssp.so*"
vinstall ${wrksrc}/COPYING.RUNTIME 644 usr/share/licenses/$pkgname RUNTIME.LIBRARY.EXCEPTION
@ -466,18 +518,21 @@ libssp_package() {
libstdc++-devel_package() {
depends="libstdc++>=${_majorver}"
short_desc="GCC Standard C++ Library (development files)"
pkg_install() {
vmove "usr/lib/libstdc++.*a"
vmove "usr/lib/libsupc++.*"
for f in ${DESTDIR}/usr/include/c++/${_majorver}/*; do
[ "$(basename $f)" = "${_triplet}" ] && continue
vmove usr/include/c++/${_majorver}/$(basename $f)
done
vmove usr/include/c++/${_majorver}/${_triplet}/bits
vmove "usr/include/c++/${_majorver}/*.h"
cd ${PKGDESTDIR}/usr/include/c++
ln -sf ${_majorver} ${version}
}
}
libstdc++_package() {
short_desc="GCC Standard C++ Library"
pkg_install() {
vmove "usr/lib/libstdc++.so*"
vmove usr/share/locale/fr/LC_MESSAGES/libstdc++.mo
@ -489,7 +544,6 @@ libstdc++_package() {
gcc-c++_package() {
depends="gcc>=${_majorver} libstdc++-devel>=${_majorver}"
short_desc="GCC C++ support"
pkg_install() {
for f in g++ c++ ${_triplet}-g++ ${_triplet}-c++; do
vmove usr/bin/${f}
@ -502,6 +556,13 @@ gcc-c++_package() {
gcc_package() {
depends="binutils libgomp>=${_majorver} libitm>=${_majorver} libssp-devel>=${_majorver}"
pkg_install() {
if [ -d ${DESTDIR}/usr/lib/pkgconfig ]; then
rmdir ${DESTDIR}/usr/lib/pkgconfig
fi
if [ -d ${DESTDIR}/usr/lib/security ]; then
rmdir ${DESTDIR}/usr/lib/security
fi
rm -rf ${DESTDIR}/usr/include/c++
vmove all
}
}

1
srcpkgs/libgcj Symbolic link
View file

@ -0,0 +1 @@
gcc

1
srcpkgs/libgcj-devel Symbolic link
View file

@ -0,0 +1 @@
gcc

1
srcpkgs/libgcj32 Symbolic link
View file

@ -0,0 +1 @@
gcc