diff options
author | George Shapovalov <george@gentoo.org> | 2003-06-17 21:51:49 +0000 |
---|---|---|
committer | George Shapovalov <george@gentoo.org> | 2003-06-17 21:51:49 +0000 |
commit | 83122f112c57bd7c621d4481b74ca43a2efa325d (patch) | |
tree | 90114d7ea9dfc4a39658bdbae886b1641f90ad9a /dev-lang/gnat | |
parent | new package - GNU Ada compiler (diff) | |
download | historical-83122f112c57bd7c621d4481b74ca43a2efa325d.tar.gz historical-83122f112c57bd7c621d4481b74ca43a2efa325d.tar.bz2 historical-83122f112c57bd7c621d4481b74ca43a2efa325d.zip |
new package - GNU Ada compiler
Diffstat (limited to 'dev-lang/gnat')
-rw-r--r-- | dev-lang/gnat/Manifest | 6 | ||||
-rw-r--r-- | dev-lang/gnat/files/digest-gnat-3.14p | 3 | ||||
-rw-r--r-- | dev-lang/gnat/files/digest-gnat-3.15p | 3 | ||||
-rw-r--r-- | dev-lang/gnat/gnat-3.14p.ebuild | 156 | ||||
-rw-r--r-- | dev-lang/gnat/gnat-3.15p.ebuild | 152 |
5 files changed, 317 insertions, 3 deletions
diff --git a/dev-lang/gnat/Manifest b/dev-lang/gnat/Manifest index 6f385d2d7829..0ba7a25a4fc9 100644 --- a/dev-lang/gnat/Manifest +++ b/dev-lang/gnat/Manifest @@ -1,5 +1,5 @@ -MD5 981a4dc673c13863b938aaea8d63f7c6 gnat-3.14p.ebuild 5339 -MD5 ed3f5914ed0bad0719551af83891cb8a gnat_inst.log 96002 -MD5 619f99d2a8e83959c2a204bc13ddf085 gnat-3.15p.ebuild 5427 +MD5 332d79b0cddb0dfcb80bc77487f36918 gnat-3.14p.ebuild 5673 +MD5 1a97361a67f8ec2a5365eeb9eb643749 ChangeLog 577 +MD5 5b9c3801b8c96f4433c13adf4437819a gnat-3.15p.ebuild 5668 MD5 59500f81e672cff22232586fc278547b files/digest-gnat-3.14p 213 MD5 737e39907fb4f28640a1b4cbbc1cdc78 files/digest-gnat-3.15p 216 diff --git a/dev-lang/gnat/files/digest-gnat-3.14p b/dev-lang/gnat/files/digest-gnat-3.14p new file mode 100644 index 000000000000..8b9d432fb928 --- /dev/null +++ b/dev-lang/gnat/files/digest-gnat-3.14p @@ -0,0 +1,3 @@ +MD5 a2b3f62b0b6307544994c4c4453fe0d7 gnat-3.14p-src.tgz 4867781 +MD5 34e704180060521914fe3970e72ea759 gnat-3.14p-i686-pc-linux-gnu-bin.tar.gz 10804984 +MD5 23ce8b5d276e2eab421416564f9dc8a3 gcc-2.8.1.tar.bz2 6304274 diff --git a/dev-lang/gnat/files/digest-gnat-3.15p b/dev-lang/gnat/files/digest-gnat-3.15p new file mode 100644 index 000000000000..51bea9353199 --- /dev/null +++ b/dev-lang/gnat/files/digest-gnat-3.15p @@ -0,0 +1,3 @@ +MD5 cf8b9cccc867e318bccaaa2dce384028 gnat-3.15p-src.tgz 5553434 +MD5 57c060cd1ccef8b1ae9165b11d98780a gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.gz 13482938 +MD5 23ce8b5d276e2eab421416564f9dc8a3 gcc-2.8.1.tar.bz2 6304274 diff --git a/dev-lang/gnat/gnat-3.14p.ebuild b/dev-lang/gnat/gnat-3.14p.ebuild new file mode 100644 index 000000000000..13a1ab21d18f --- /dev/null +++ b/dev-lang/gnat/gnat-3.14p.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/gnat/gnat-3.14p.ebuild,v 1.1 2003/06/17 21:51:48 george Exp $ +# +# Never replace this with the Ada compiler in the gcc tree. They are based +# on the same source but this is the official validated compiler from ACT. +# The one in gcc (3-branch) is currently broken! +# If you want to try that one install it under a different name and use +# gnatmake --GCC=othername (if you use gnatmake). +# The official statement from ACT is that they will continiue to release +# GNAT, so they will release a version based on gcc 3 when it is working. +# +# It is possible to at least install this on sparc too, I have seen +# unofficial bootstrap compilers for ppc as well. As I don't have access to +# a sparc or a ppc running linux I won't try to add support for them. +# If you have access to any of these it should be fairly easy to add support +# for it. +# + +DESCRIPTION="GNAT Ada Compiler" +DEPEND="app-shells/tcsh" +RDEPEND="" +SRC_URI="http://gd.tuwien.ac.at/languages/ada/gnat/${PV}/${P}-src.tgz + http://gd.tuwien.ac.at/languages/ada/gnat/${PV}/${P}-i686-pc-linux-gnu-bin.tar.gz + ftp://gcc.gnu.org/pub/gcc/old-releases/gcc-2/gcc-2.8.1.tar.bz2" +HOMEPAGE="http://www.gnat.com/" + +SLOT="GNAT-3.14p" +KEYWORDS="~x86" +LICENSE="GMGPL" +IUSE="" + +S="${WORKDIR}/gcc-2.8.1" +GNATDIR="${WORKDIR}/${P}-src" +GNATBOOT="${WORKDIR}/boot" +GNATBOOTINST="${WORKDIR}/${P}-i686-pc-linux-gnu-bin" + +src_unpack() { + unpack ${A} + + # Install the bootstrap compiler + cd "${GNATBOOTINST}" + echo $'\n'3$'\n'${GNATBOOT}$'\n' | ./doconfig > doconfig.log 2>&1 + ./doinstall + + # Prepare the gcc source directory + cd "${S}" + patch -p0 < "${GNATDIR}/src/gcc-281.dif" + touch cstamp-h.in + mv "${GNATDIR}/src/ada" "${S}" + for i in `find ${S}/ada -name '*.ad[sb]'`; do \ + sed -i -e "s/\"gcc\"/\"gnatgcc\"/g" ${i}; \ + done + cd "${S}/ada" + touch treeprs.ads a-[es]info.h nmake.ad[bs] +} + +src_compile() { + # GCC 2.8.1 doesn't like fancy flags + export CFLAGS="-O2" + + # Set some paths to our bootstrap compiler. + export GCC_EXEC_PREFIX="${GNATBOOT}/lib/gcc-lib/i686-pc-linux-gnu/2.8.1" + export ADA_INCLUDE_PATH="${GNATBOOT}/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/adainclude" + export ADA_OBJECTS_PATH="${GNATBOOT}/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/adalib" + OLDPATH="${PATH}" + export PATH="${GNATBOOT}/bin:${PATH}" + export LDFLAGS="-L${GNATBOOT}/lib/gcc-lib/i686-pc-linux-gnu/2.8.1 -L${GNATBOOTINST}" + + # Make $local_prefix point to $prefix + sed -i -e "s/@local_prefix@/@prefix@/" "${S}/Makefile.in" + + # Configure gcc + cd "${S}" + ./configure --prefix=/usr --program-prefix=gnat \ + --host="${CHOST}" --build="${CHOST}" --target="${CHOST}" \ + --infodir=/usr/share/info \ + --mandir=/usr/share/man || die "./configure failed" + + # Make sure we don't overwrite the existing gcc + sed -i -e "s/\$(bindir)\/gcov/\$(bindir)\/gnatgcov/" "${S}/Makefile" + sed -i -e "s/alias)-gcc/alias)-gnatgcc/g" "${S}/Makefile" + + # Compile it by first using the bootstrap compiler and then bootstrapping + # our own version. Finally compile the libraries and tools. + make CC="gcc" LANGUAGES="c ada gcov" + make CC="gcc" LANGUAGES="c ada gcov" bootstrap + make CC="gcc" GNATLIBCFLAGS="${CFLAGS}" gnatlib + make CC="gcc" gnattools +} + +src_install() { + export PATH="${GNATBOOT}/bin:${PATH}" + export LDFLAGS="-L${GNATBOOT}/lib/gcc-lib/i686-pc-linux-gnu/2.8.1 -L${GNATBOOTINST}" + + # Install gnatgcc, tools and native threads library + make prefix="${D}/usr" \ + LANGUAGES="c ada gcov" GCC_INSTALL_NAME=gnatgcc \ + install-common install-libgcc install-gnatlib install-driver || die + touch "${D}/usr/lib/gcc-lib/${CHOST}/2.8.1/include/float.h" + + + # Install the FSU threads library + cd "${D}/usr/lib/gcc-lib/${CHOST}/2.8.1" + mkdir rts-native + mkdir rts-fsu + + # Copy the native threads library + cp -r adalib rts-native + cp -r adainclude rts-native + #remove circular symlinks + cd rts-native/adalib/ + rm -f libgnarl.so libgnat.so + cd "${S}" + rm stamp-gnatlib1 + + + # Compile and install the FSU threads library + make CC=gcc CFLAGS="-O2" GNATLIBCFLAGS="-fPIC -O2" THREAD_KIND=fsu gnatlib + make prefix="${D}/usr" install-gnatlib + cd "${D}/usr/lib/gcc-lib/${CHOST}/2.8.1" + mv adalib adainclude rts-fsu + cd rts-fsu/adalib/ + rm -f libgnarl.so libgnat.so + + # Install the precompiled FSU library from the binary distribution + cp "${GNATBOOTINST}/libgthreads.a" "${D}/usr/lib/gcc-lib/${CHOST}/2.8.1" + cp "${GNATBOOTINST}/libmalloc.a" "${D}/usr/lib/gcc-lib/${CHOST}/2.8.1" + + # Make native threads the default + dosym /usr/lib/gcc-lib/${CHOST}/2.8.1/rts-native/adalib \ + /usr/lib/gcc-lib/${CHOST}/2.8.1/ + dosym /usr/lib/gcc-lib/${CHOST}/2.8.1/rts-native/adainclude \ + /usr/lib/gcc-lib/${CHOST}/2.8.1/ + + cp "${GNATBOOTINST}/gnathtml.pl" "${D}/usr/bin" + chmod +x "${D}/usr/bin" +} + +pkg_postinst() { + # Notify the user what changed + einfo "" + einfo "Both the native-threads and the FSU-threads libraries have been" + einfo "installed. The native-threads version is the default on linux." + einfo "If you want to use FSU-threads (required if you are using Annex D)" + einfo "you must set the following two environment variables:" + einfo "ADA_INCLUDE_PATH=/usr/lib/gcc-lib/${CHOST}/2.8.1/rts-fsu/adainclude:\$ADA_INCLUDE_PATH" + einfo "ADA_OBJECTS_PATH=/usr/lib/gcc-lib/${CHOST}/2.8.1/rts-fsu/adalib:\$ADA_OBJECTS_PATH" + einfo "or use the -aI/usr/lib/gcc-lib/${CHOST}/2.8.1/rts-fsu/adainclude" + einfo "-aO/usr/lib/gcc-lib/${CHOST}/2.8.1/rts-fsu/adalib" + einfo "or you can give gnatmake the following switch: --RTS=fsu" + einfo "" + einfo "The compiler has been installed as gnatgcc, and the coverage testing" + einfo "tool as gnatgcov." + einfo "" +} diff --git a/dev-lang/gnat/gnat-3.15p.ebuild b/dev-lang/gnat/gnat-3.15p.ebuild new file mode 100644 index 000000000000..78eb84d7d825 --- /dev/null +++ b/dev-lang/gnat/gnat-3.15p.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/gnat/gnat-3.15p.ebuild,v 1.1 2003/06/17 21:51:48 george Exp $ +# +# Never replace this with the Ada compiler in the gcc tree. They are based +# on the same source but this is the official validated compiler from ACT. +# The one in gcc (3-branch) is currently broken! +# If you want to try that one install it under a different name and use +# gnatmake --GCC=othername (if you use gnatmake). +# The official statement from ACT is that they will continiue to release +# GNAT, so they will release a version based on gcc 3 when it is working. +# +# It is possible to at least install this on sparc too, I have seen +# unofficial bootstrap compilers for ppc as well. As I don't have access to +# a sparc or a ppc running linux I won't try to add support for them. +# If you have access to any of these it should be fairly easy to add support +# for it. +# + +DESCRIPTION="GNAT Ada Compiler" +DEPEND="app-shells/tcsh" +RDEPEND="" +SRC_URI="http://gd.tuwien.ac.at/languages/ada/gnat/${PV}/${P}-src.tgz + http://gd.tuwien.ac.at/languages/ada/gnat/${PV}/${P}-i686-pc-redhat71-gnu-bin.tar.gz + ftp://gcc.gnu.org/pub/gcc/old-releases/gcc-2/gcc-2.8.1.tar.bz2" +HOMEPAGE="http://www.gnat.com/" + +SLOT="GNAT-3.15p" +KEYWORDS="~x86" +LICENSE="GMGPL" +IUSE="" + +S="${WORKDIR}/gcc-2.8.1" +GNATDIR="${WORKDIR}/${P}-src" +GNATBOOT="${WORKDIR}/boot" +GNATBOOTINST="${WORKDIR}/${P}-i686-pc-linux-gnu-bin" + +src_unpack() { + unpack ${A} + + # Install the bootstrap compiler + cd "${GNATBOOTINST}" + echo $'\n'3$'\n'${GNATBOOT}$'\n' | ./doconfig > doconfig.log 2>&1 + ./doinstall + + # Prepare the gcc source directory + cd "${S}" + patch -p0 < "${GNATDIR}/src/gcc-281.dif" + touch cstamp-h.in + mv "${GNATDIR}/src/ada" "${S}" + for i in `find ${S}/ada -name '*.ad[sb]'`; do \ + sed -i -e "s/\"gcc\"/\"gnatgcc\"/g" ${i}; \ + done + cd "${S}/ada" + touch treeprs.ads a-[es]info.h nmake.ad[bs] +} + +src_compile() { + # GCC 2.8.1 doesn't like fancy flags + export CFLAGS="-O2" + + # Set some paths to our bootstrap compiler. + export GCC_EXEC_PREFIX="${GNATBOOT}/lib/gcc-lib/i686-pc-linux-gnu/2.8.1" + export ADA_INCLUDE_PATH="${GNATBOOT}/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/adainclude" + export ADA_OBJECTS_PATH="${GNATBOOT}/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/adalib" + OLDPATH="${PATH}" + export PATH="${GNATBOOT}/bin:${PATH}" + export LDFLAGS="-L${GNATBOOT}/lib/gcc-lib/i686-pc-linux-gnu/2.8.1 -L${GNATBOOTINST}" + + # Make $local_prefix point to $prefix + sed -i -e "s/@local_prefix@/@prefix@/" "${S}/Makefile.in" + + # Configure gcc + cd "${S}" + ./configure --prefix=/usr --program-prefix=gnat \ + --host="${CHOST}" --build="${CHOST}" --target="${CHOST}" \ + --infodir=/usr/share/info \ + --mandir=/usr/share/man || die "./configure failed" + + # Make sure we don't overwrite the existing gcc + sed -i -e "s/\$(bindir)\/gcov/\$(bindir)\/gnatgcov/" "${S}/Makefile" + sed -i -e "s/alias)-gcc/alias)-gnatgcc/g" "${S}/Makefile" + + # Compile it by first using the bootstrap compiler and then bootstrapping + # our own version. Finally compile the libraries and tools. + make CC="gcc" LANGUAGES="c ada gcov" + make CC="gcc" LANGUAGES="c ada gcov" bootstrap + make CC="gcc" GNATLIBCFLAGS="${CFLAGS}" gnatlib + make CC="gcc" gnattools + +} + +src_install() { + export PATH="${GNATBOOT}/bin:${PATH}" + export LDFLAGS="-L${GNATBOOT}/lib/gcc-lib/i686-pc-linux-gnu/2.8.1 -L${GNATBOOTINST}" + + # Install gnatgcc, tools and native threads library + make prefix="${D}/usr" LANGUAGES="c ada gcov" GCC_INSTALL_NAME=gnatgcc \ + install-common install-libgcc install-gnatlib install-driver || die + touch "${D}/usr/lib/gcc-lib/${CHOST}/2.8.1/include/float.h" + + # Install the FSU threads library + cd "${D}/usr/lib/gcc-lib/${CHOST}/2.8.1" + mkdir rts-native + mkdir rts-fsu + + # Copy the native threads library + cp -r adalib rts-native + cp -r adainclude rts-native + #remove circular symlinks + rm -f rts-native/adalib/{libgnarl.so,libgnat.so} + cd "${S}" + rm stamp-gnatlib1 + + # Compile and install the FSU threads library + make CC=gcc CFLAGS="-O2" GNATLIBCFLAGS="-fPIC -O2" THREAD_KIND=fsu gnatlib + make prefix="${D}/usr" install-gnatlib + cd "${D}/usr/lib/gcc-lib/${CHOST}/2.8.1" + mv adalib adainclude rts-fsu + rm -f rts-fsu/adalib/{libgnarl.so,libgnat.so} + + # Install the precompiled FSU library from the binary distribution + cp "${GNATBOOTINST}/libgthreads.a" "${D}/usr/lib/gcc-lib/${CHOST}/2.8.1" + cp "${GNATBOOTINST}/libmalloc.a" "${D}/usr/lib/gcc-lib/${CHOST}/2.8.1" + + cp "${GNATBOOTINST}/gnathtml.pl" "${D}/usr/bin" + chmod +x "${D}/usr/bin" + + # Make native threads the default + dosym /usr/lib/gcc-lib/${CHOST}/2.8.1/rts-native/adalib \ + /usr/lib/gcc-lib/${CHOST}/2.8.1/ + dosym /usr/lib/gcc-lib/${CHOST}/2.8.1/rts-native/adainclude \ + /usr/lib/gcc-lib/${CHOST}/2.8.1/ +} + +pkg_postinst() { + # Notify the user what changed + einfo "" + einfo "Both the native-threads and the FSU-threads libraries have been" + einfo "installed. The native-threads version is the default on linux." + einfo "If you want to use FSU-threads (required if you are using Annex D)" + einfo "you must set the following two environment variables:" + einfo "ADA_INCLUDE_PATH=/usr/lib/gcc-lib/${CHOST}/2.8.1/rts-fsu/adainclude:\$ADA_INCLUDE_PATH" + einfo "ADA_OBJECTS_PATH=/usr/lib/gcc-lib/${CHOST}/2.8.1/rts-fsu/adalib:\$ADA_OBJECTS_PATH" + einfo "or use the -aI/usr/lib/gcc-lib/${CHOST}/2.8.1/rts-fsu/adainclude" + einfo "-aO/usr/lib/gcc-lib/${CHOST}/2.8.1/rts-fsu/adalib" + einfo "or you can give gnatmake the following switch: --RTS=fsu" + einfo "" + einfo "The compiler has been installed as gnatgcc, and the coverage testing" + einfo "tool as gnatgcov." + einfo "" +} |