diff options
author | Tupone Alfredo <tupone@gentoo.org> | 2017-03-11 21:46:03 +0100 |
---|---|---|
committer | Tupone Alfredo <tupone@gentoo.org> | 2017-03-11 21:46:03 +0100 |
commit | 0e7760adbc27b6b5670263587ce1f623e569db65 (patch) | |
tree | 1122bd7113eaa40650ce489e9dab411f4cf7cc4f /dev-lang/gnat-gpl | |
parent | dev-python/simpleeval: Version bumps to 0.9.5 (diff) | |
download | gentoo-0e7760adbc27b6b5670263587ce1f623e569db65.tar.gz gentoo-0e7760adbc27b6b5670263587ce1f623e569db65.tar.bz2 gentoo-0e7760adbc27b6b5670263587ce1f623e569db65.zip |
dev-lang/gnat-gpl: Add gnat-gpl-2016
Package-Manager: portage-2.3.3
Diffstat (limited to 'dev-lang/gnat-gpl')
-rw-r--r-- | dev-lang/gnat-gpl/Manifest | 9 | ||||
-rw-r--r-- | dev-lang/gnat-gpl/files/gcc-spec-env-r1.patch | 87 | ||||
-rw-r--r-- | dev-lang/gnat-gpl/files/gnat-gpl-2016-gentoo.patch | 39 | ||||
-rw-r--r-- | dev-lang/gnat-gpl/gnat-gpl-2016.ebuild | 149 | ||||
-rw-r--r-- | dev-lang/gnat-gpl/metadata.xml | 33 |
5 files changed, 317 insertions, 0 deletions
diff --git a/dev-lang/gnat-gpl/Manifest b/dev-lang/gnat-gpl/Manifest new file mode 100644 index 000000000000..fcd03aafe762 --- /dev/null +++ b/dev-lang/gnat-gpl/Manifest @@ -0,0 +1,9 @@ +DIST ecj-4.5.jar 1470676 SHA256 98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e WHIRLPOOL db54206cfd5eba935e707b8d36ebac40f3c4ed3c1f06ede794288cbdd9c7da9d90c0898e8c98b383af276ea4c1b40c861ebd9e1fc1dce712946184321339d3ad +DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 SHA256 f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 SHA512 779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517 WHIRLPOOL 8a1e45aad9d306cb19de93c63b5854a97e629d90852feb6861dcfca042b6257705304fc13ad65655a4cb227d36b83fc6063648c94f270821574ee0e85307094e +DIST gcc-4.9-gpl-2016-src.tar.gz 76361760 SHA256 285bc949c689e5f2ea8c036c599080bd7cd51ac7b5eeffb645a0f685e1e091ab SHA512 da1e26b4dbbe0ec634eab4e64d1cdb2632300c24f0885bc72fb57edba6ce29ab92b04eaedd8f8077ea623f1ef1428f53616e8c8d6630328d9790d968b60c67cf WHIRLPOOL d16a49baa883b15e88c6f6b771be1a1a8b461c44c395f937b25d5e61efab2b3698bfa242dc14241907ee00802fc2d2c28b55f171d66287e706cf11c3efba6f58 +DIST gcc-4.9.4-patches-1.0.tar.bz2 22266 SHA256 1a394abb77c75e2212896ad3a62ae1f6bfd3660b1c176c608298733c740a00e4 SHA512 cc2407221f858bad38b57d31f635314f91794293695e23d255685d8bec20b9db19c7dc76bbf5e8184c2ba0ccb530958b09bae4d8a402ca27cadf463f46bfb995 WHIRLPOOL c74e5273c718020b591911d589d8eff5e366c902c479e566f966577efcbf424b19669a54843b2ddd60c51c81fd2851bc86aec1c647482b4789a518f01dd62561 +DIST gcc-4.9.4-piepatches-v0.6.4.tar.bz2 14414 SHA256 c67b56f04c653e6a19e36abed8391f8b6bed426bfcfc907237cc37f02dbb5015 SHA512 243fa272ea0e49f700a76508bab3e03bbb353bcb930581b2f87f9a47df5cd3880e29f20b71612b21190adc463849e1e6ac2a38a49c0002b562d93d436f538285 WHIRLPOOL 1e5959441210af6f690398efab96444ab11d136238a9428912e8441eaf0509fe6db359a8aca92a446fce0c75777385475af73b20165a8593f9969e3a25fd0b0f +DIST gcc-4.9.4-uclibc-patches-1.0.tar.bz2 2618 SHA256 95f290d0b68114d835515afc424d6096476a45665671784aa71a7a506296e465 SHA512 5a1f44caa9261f4947101379628143869b31dec67fa28605e8e1f3894d4b7120c3f68ba6deb59da7a74fa906e27ab32cd3767761837dc3dfebc37865d349d6db WHIRLPOOL e46b08737cfdc235bfb80117e0389f3969167adf59bcba2a0a1094a20eab2b62f0c952dac44781e43957cb1507cd4e80f37bd8aecbc55dbda6382d93b3a4cf94 +DIST gcc-4.9.4.tar.bz2 90097606 SHA256 6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092 SHA512 93abb78e16277454f41a8e9810f41f66c0fdffdc539a762ff6b67d3037f78db971378683fd2ebf707d1d51c059fad2161fe42d110c330027f40214b7db0f3efe WHIRLPOOL e20045126c21a3edea1fa4a2185ec2bc5feec77ddf967ab9d1e8c33322ad4eafe013bfcaab1ed4e35971d3b70ef373ea3585ebb089c9bbf91bbfca1f1da71236 +DIST gcc-interface-4.9-gpl-2016-src.tar.gz 339037 SHA256 56d7a90c80ff33aa99960b959b281567fd2d9692db78fc07b2827d2905780e20 SHA512 507df314d1890c228c19f458bd51197377deaaa2d6082fe1e71b62b683252ee5fba4adfe2386246e14618b1c77288e0dcb5bf501e2daaca249b6299462c2f6bd WHIRLPOOL e889172210928849cb704562ed2b229748a6779842ebaa29d77dd282a0dee9509b70483bbfe25e0e2137eba00dbb4fedb4ebabfa7639bda25791c52176c50215 +DIST gnat-gpl-2016-src.tar.gz 8857249 SHA256 b23780ab981e3b981c668b79b066ce56bab62a950b83f10c60a2bd5ac0fcb6d5 SHA512 4a5cb58ede5b4ae2887e64f0f2e12e0e06470d320796f06d02f7ddd932ff0d3b40e6d3e98a81138fff6906548a55153c2a186ff4a6e3d23b9dbe01ca582da1f8 WHIRLPOOL b0a7c7ba0de0cc5ca439bba7ed94f597004343b5cecb0b3be76e332e8d90a3e5265dbfee421b1d117f13031082636f364de3f989689562a824dd27a567dd8bd0 diff --git a/dev-lang/gnat-gpl/files/gcc-spec-env-r1.patch b/dev-lang/gnat-gpl/files/gcc-spec-env-r1.patch new file mode 100644 index 000000000000..a58926836e4e --- /dev/null +++ b/dev-lang/gnat-gpl/files/gcc-spec-env-r1.patch @@ -0,0 +1,87 @@ +2013-08-22 Magnus Granberg <zorry@gentoo.org> + + * gcc/gcc.c (main): Add support for external spec file via the GCC_SPECS env var + and move the process of the user specifed specs. + + This allows us to easily control pie/ssp defaults with gcc-config profiles. + Original patch by Rob Holland + Extended to support multiple entries separated by ':' by Kevin F. Quinn + Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill + Modified to process the GCC_SPECS env var befor DRIVER_SELF_SPECS by Magnus Granberg + +--- gcc-4.8-20130210/gcc/gcc.c 2013-02-05 16:55:31.000000000 +0100 ++++ gcc-4.8-20130210-work/gcc/gcc.c 2013-07-26 02:32:14.625089864 +0200 +@@ -6427,6 +6428,48 @@ main (int argc, char **argv) + do_option_spec (option_default_specs[i].name, + option_default_specs[i].spec); + ++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32)) ++ /* Add specs listed in GCC_SPECS. Note; in the process of separating ++ * each spec listed, the string is overwritten at token boundaries ++ * (':') with '\0', an effect of strtok_r(). ++ */ ++ specs_file = getenv ("GCC_SPECS"); ++ if (specs_file && (strlen(specs_file) > 0)) ++ { ++ char *spec, *saveptr; ++ for (spec=strtok_r(specs_file,":",&saveptr); ++ spec!=NULL; ++ spec=strtok_r(NULL,":",&saveptr)) ++ { ++ struct user_specs *user = (struct user_specs *) ++ xmalloc (sizeof (struct user_specs)); ++ user->next = (struct user_specs *) 0; ++ user->filename = spec; ++ if (user_specs_tail) ++ user_specs_tail->next = user; ++ else ++ user_specs_head = user; ++ user_specs_tail = user; ++ } ++ } ++#endif ++ /* Process any user specified specs in the order given on the command ++ * line. */ ++ for (uptr = user_specs_head; uptr; uptr = uptr->next) ++ { ++ char *filename = find_a_file (&startfile_prefixes, uptr->filename, ++ R_OK, true); ++ read_specs (filename ? filename : uptr->filename, false, true); ++ } ++ /* Process any user self specs. */ ++ { ++ struct spec_list *sl; ++ for (sl = specs; sl; sl = sl->next) ++ if (sl->name_len == sizeof "self_spec" - 1 ++ && !strcmp (sl->name, "self_spec")) ++ do_self_spec (*sl->ptr_spec); ++ } ++ + /* Process DRIVER_SELF_SPECS, adding any new options to the end + of the command line. */ + +@@ -6535,24 +6578,6 @@ main (int argc, char **argv) + PREFIX_PRIORITY_LAST, 0, 1); + } + +- /* Process any user specified specs in the order given on the command +- line. */ +- for (uptr = user_specs_head; uptr; uptr = uptr->next) +- { +- char *filename = find_a_file (&startfile_prefixes, uptr->filename, +- R_OK, true); +- read_specs (filename ? filename : uptr->filename, false, true); +- } +- +- /* Process any user self specs. */ +- { +- struct spec_list *sl; +- for (sl = specs; sl; sl = sl->next) +- if (sl->name_len == sizeof "self_spec" - 1 +- && !strcmp (sl->name, "self_spec")) +- do_self_spec (*sl->ptr_spec); +- } +- + if (compare_debug) + { + enum save_temps save; diff --git a/dev-lang/gnat-gpl/files/gnat-gpl-2016-gentoo.patch b/dev-lang/gnat-gpl/files/gnat-gpl-2016-gentoo.patch new file mode 100644 index 000000000000..b715a006c218 --- /dev/null +++ b/dev-lang/gnat-gpl/files/gnat-gpl-2016-gentoo.patch @@ -0,0 +1,39 @@ +--- patch/09_all_default-ssp.patch.old 2017-01-08 16:14:09.377755019 +0100 ++++ patch/09_all_default-ssp.patch 2017-01-08 16:15:48.792764201 +0100 +@@ -78,14 +78,14 @@ + optimizing. The default value is 32. + --- a/gcc/cp/lang-specs.h + +++ b/gcc/cp/lang-specs.h +-@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3. If not see ++@@ -46,7 +46,7 @@ + %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ + cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ + %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ + - %(cc1_options) %2\ + + %(cc1_options) %(ssp_default) %2\ +- %{!fsyntax-only:%{!fdump-ada-spec*:-o %g.s %{!o*:--output-pch=%i.gch}\ +- %W{o*:--output-pch=%*}}%V}}}}", ++ %{!fsyntax-only:-o %g.s %{!fdump-ada-spec*:%{!fdump-xref*:%{!o*:--output-pch=%i.gch}\ ++ %W{o*:--output-pch=%*}}}%V}}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, + @@ -57,11 +57,11 @@ along with GCC; see the file COPYING3. If not see + %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ +@@ -151,14 +151,14 @@ + /* This contains cpp options which are not passed when the preprocessor + output will be used by another program. */ + @@ -1015,9 +1024,9 @@ static const struct compiler default_compilers[] = +- %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ ++ %{save-temps*|fdump-scos|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ + %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ + cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ + - %(cc1_options)}\ + + %(cc1_options) %(ssp_default)}\ +- %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ +-- cc1 %(cpp_unique_options) %(cc1_options)}}}\ +-+ cc1 %(cpp_unique_options) %(cc1_options) %(ssp_default)}}}\ ++ %{!save-temps*:%{!fdump-scos:%{!traditional-cpp:%{!no-integrated-cpp:\ ++- cc1 %(cpp_unique_options) %(cc1_options)}}}}\ +++ cc1 %(cpp_unique_options) %(cc1_options) %(ssp_default)}}}}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1}, + {"-", + "%{!E:%e-E or -x required when input is from standard input}\ diff --git a/dev-lang/gnat-gpl/gnat-gpl-2016.ebuild b/dev-lang/gnat-gpl/gnat-gpl-2016.ebuild new file mode 100644 index 000000000000..284966919b4a --- /dev/null +++ b/dev-lang/gnat-gpl/gnat-gpl-2016.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PATCH_VER="1.0" +UCLIBC_VER="1.0" + +# Hardened gcc 4 stuff +PIE_VER="0.6.4" +SPECS_VER="0.2.0" +SPECS_GCC_VER="4.4.3" +# arch/libc configurations known to be stable with {PIE,SSP}-by-default +PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64" +PIE_UCLIBC_STABLE="x86 arm amd64 mips ppc ppc64" +SSP_STABLE="amd64 x86 mips ppc ppc64 arm" +# uclibc need tls and nptl support for SSP support +# uclibc need to be >= 0.9.33 +SSP_UCLIBC_STABLE="x86 amd64 mips ppc ppc64 arm" +#end Hardened stuff + +TOOLCHAIN_GCC_PV=4.9.4 +GCC_FILESDIR=${PORTDIR}/sys-devel/gcc/files + +inherit eutils toolchain-funcs toolchain + +REL=4.9 +MYP=gcc-${REL}-gpl-${PV}-src + +DESCRIPTION="GNAT Ada Compiler - GPL version" +HOMEPAGE="http://libre.adacore.com/" +SRC_URI+=" mirror://libreadacore/57399304c7a447658e0aff7f -> ${P}-src.tar.gz + mirror://libreadacore/573992d4c7a447658d00e1db -> ${MYP}.tar.gz + mirror://libreadacore/57399232c7a447658e0aff7d + -> gcc-interface-${REL}-gpl-${PV}-src.tar.gz" + +LICENSE+=" GPL-2 GPL-3" +SLOT="${PV}" +KEYWORDS="~amd64" + +RDEPEND="!sys-devel/gcc:${TOOLCHAIN_GCC_PV}" +DEPEND="${RDEPEND} + elibc_glibc? ( >=sys-libs/glibc-2.8 ) + >=sys-devel/binutils-2.20" + +S="${WORKDIR}"/${MYP} + +FSFGCC=gcc-${TOOLCHAIN_GCC_PV} + +GCC_A_FAKEIT="${P}-src.tar.gz + ${MYP}.tar.gz + ${FSFGCC}.tar.bz2 + gcc-interface-${REL}-gpl-${PV}-src.tar.gz" + +pkg_setup() { + GCC=${ADA:-$(tc-getCC)} + local gnatmake=${GCC/gcc/gnatmake} + if [[ -z "$(type ${gnatmake} 2>/dev/null)" ]] ; then + eerror "You need a gcc compiler that provides the Ada Compiler:" + eerror "1) use gcc-config to select the right compiler or" + eerror "2) set the ADA variable to the c/c++/ada compiler" + die "ada compiler not available" + fi +} + +src_prepare() { + mv ../gnat-gpl-${PV}-src/src/ada gcc/ || die + mv ../gcc-interface-${REL}-gpl-${PV}-src gcc/ada/gcc-interface || die + + mv ../${FSFGCC}/gcc/doc/gcc.info gcc/doc/ || die + mv ../${FSFGCC}/libjava . || die + rm -r ../${FSFGCC} || die + + cd .. + epatch "${FILESDIR}"/${P}-gentoo.patch + rm patch/10_all_default-fortify-source.patch + rm piepatch/34_all_gcc48_config_i386.patch + cd - + + if has_version '<sys-libs/glibc-2.12' ; then + ewarn "Your host glibc is too old; disabling automatic fortify." + ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315" + EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch" + fi + + toolchain_src_prepare + + use vanilla && return 0 + #Use -r1 for newer piepatchet that use DRIVER_SELF_SPECS for the hardened specs. + [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env-r1.patch +} + +src_configure() { + export PATH=/opt/gnat-gpl-bin-2016/bin:${PATH} + export PATH=/opt/gnat-gpl-bin-2015/bin:${PATH} + export PATH=/opt/gnat-gpl-bin-2014/bin:${PATH} + toolchain_src_configure --enable-languages=ada --disable-libada +} + +src_compile() { + unset ADAFLAGS + toolchain_src_compile + gcc_do_make "-C gcc gnatlib-shared" + ln -s gcc ../build/prev-gcc || die + ln -s x86_64-pc-linux-gnu ../build/prev-x86_64-pc-linux-gnu || die + gcc_do_make "-C gcc gnattools" +} + +src_install() { + toolchain_src_install + cd "${D}"${BINPATH} + for x in gnat*; do + # For some reason, g77 gets made instead of ${CTARGET}-g77... + # this should take care of that + if [[ -f ${x} ]] ; then + # In case they're hardlinks, clear out the target first + # otherwise the mv below will complain. + rm -f ${CTARGET}-${x} + mv ${x} ${CTARGET}-${x} + fi + + if [[ -f ${CTARGET}-${x} ]] ; then + if ! is_crosscompile ; then + ln -sf ${CTARGET}-${x} ${x} + dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \ + /usr/bin/${x}-${GCC_CONFIG_VER} + fi + # Create versioned symlinks + dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \ + /usr/bin/${CTARGET}-${x}-${GCC_CONFIG_VER} + fi + + if [[ -f ${CTARGET}-${x}-${GCC_CONFIG_VER} ]] ; then + rm -f ${CTARGET}-${x}-${GCC_CONFIG_VER} + ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${GCC_CONFIG_VER} + fi + done +} + +pkg_postinst () { + toolchain_pkg_postinst + einfo "This package provide the GNAT compiler with gcc for ada/c/c++" + einfo "Even if the c/c++ compilers are using almost the same patched" + einfo "source as the sys-devel/gcc package its use is not extensively" + einfo "tested." + einfo "Using this the c/c++ compiler to update your system, except for ada" + einfo "related packages, is not supported" +} diff --git a/dev-lang/gnat-gpl/metadata.xml b/dev-lang/gnat-gpl/metadata.xml new file mode 100644 index 000000000000..0267c7c78496 --- /dev/null +++ b/dev-lang/gnat-gpl/metadata.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>tupone@gentoo.org</email> + <name>Tupone Alfredo</name> + </maintainer> + <use> + <flag name="awt">Useful only when building GCJ, this enables Abstract + Window Toolkit (AWT) peer support on top of GTK+</flag> + <flag name="cilk">Support the Cilk Plus language (C/C++ based languages for parallel programming)</flag> + <flag name="fixed-point">Enable fixed-point arithmetic support for MIPS + targets in gcc (Warning: significantly increases compile time!) + </flag> + <flag name="go">Build the GCC Go language frontend.</flag> + <flag name="graphite">Add support for the framework for loop + optimizations based on a polyhedral intermediate representation</flag> + <flag name="libssp">Build SSP support into a dedicated library rather + than use the code in the C library (DO NOT ENABLE THIS IF YOU DON'T + KNOW WHAT IT DOES)</flag> + <flag name="nopie">Disable PIE support (NOT FOR GENERAL USE)</flag> + <flag name="nossp">Disable SSP support (NOT FOR GENERAL USE)</flag> + <flag name="objc">Build support for the Objective C code language + </flag> + <flag name="objc++">Build support for the Objective C++ language</flag> + <flag name="objc-gc">Build support for the Objective C code language + Garbage Collector</flag> + <flag name="regression-test">Run the testsuite and install the results + (requires FEATURES=test)</flag> + <flag name="sanitize">Build support for various sanitizer functions (ASAN/TSAN/etc...)</flag> + <flag name="vtv">Build support for virtual table verification (a C++ hardening feature)</flag> + </use> +</pkgmetadata> |