From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-lang/gnat-gpl/Manifest | 27 ++ .../gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la | 334 +++++++++++++++++++++ dev-lang/gnat-gpl/files/c89 | 20 ++ dev-lang/gnat-gpl/files/c99 | 21 ++ dev-lang/gnat-gpl/files/fix_libtool_files.sh | 66 ++++ dev-lang/gnat-gpl/files/gcc-configure-LANG.patch | 64 ++++ .../gnat-gpl/files/gcc-configure-texinfo.patch | 16 + dev-lang/gnat-gpl/files/gcc-spec-env-r1.patch | 87 ++++++ dev-lang/gnat-gpl/files/gnat-gpl-2016-gentoo.patch | 57 ++++ dev-lang/gnat-gpl/files/gnat-gpl-2017-gentoo.patch | 32 ++ dev-lang/gnat-gpl/gnat-gpl-2016.ebuild | 191 ++++++++++++ dev-lang/gnat-gpl/gnat-gpl-2017.ebuild | 176 +++++++++++ dev-lang/gnat-gpl/metadata.xml | 36 +++ 13 files changed, 1127 insertions(+) create mode 100644 dev-lang/gnat-gpl/Manifest create mode 100644 dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la create mode 100644 dev-lang/gnat-gpl/files/c89 create mode 100644 dev-lang/gnat-gpl/files/c99 create mode 100644 dev-lang/gnat-gpl/files/fix_libtool_files.sh create mode 100644 dev-lang/gnat-gpl/files/gcc-configure-LANG.patch create mode 100644 dev-lang/gnat-gpl/files/gcc-configure-texinfo.patch create mode 100644 dev-lang/gnat-gpl/files/gcc-spec-env-r1.patch create mode 100644 dev-lang/gnat-gpl/files/gnat-gpl-2016-gentoo.patch create mode 100644 dev-lang/gnat-gpl/files/gnat-gpl-2017-gentoo.patch create mode 100644 dev-lang/gnat-gpl/gnat-gpl-2016.ebuild create mode 100644 dev-lang/gnat-gpl/gnat-gpl-2017.ebuild create mode 100644 dev-lang/gnat-gpl/metadata.xml (limited to 'dev-lang/gnat-gpl') diff --git a/dev-lang/gnat-gpl/Manifest b/dev-lang/gnat-gpl/Manifest new file mode 100644 index 000000000000..1f89994164b6 --- /dev/null +++ b/dev-lang/gnat-gpl/Manifest @@ -0,0 +1,27 @@ +AUX awk/fixlafiles.awk-no_gcc_la 8473 SHA256 4a89173240d6cdc9cab174bf024e2c8028545f8bc734be519e0f83265e954319 SHA512 eacc3a19252d2f729d7afcff4c20ceecfcc212bb041e07fb5a98b5224a4a9ac4c1f5ebb1be6058033f2e38a1da7eef5d8a8c9a349f7073e2b2e339566e0cf9fc WHIRLPOOL 616201542fe2413e45c6adffab9f0e7584a488075d8a288bb171fd27972f2a74e3422193e1b16f76773582e5013cbd3c5beb32f88d9160e43d787cdf248197ac +AUX c89 412 SHA256 29ad5dd697135c2892067e780447894dc1cd071708157e46d21773ab99c5022c SHA512 71d33a147339d8d70a62aa22a95d3e70e445d8435d6ac05893f7da19ae851b89bea851f6ce213fbd22470f13572ae13b83cf02f0621333f07d7b0c68a79b7924 WHIRLPOOL d9707a2be8da7a709b54fcb1154cfa05e479f8c3bdd6173822ee1f1bc265b2a0d04741c0685bfb0db68e1e4297fb032d2f8ff94da88014575d947054474d8295 +AUX c99 446 SHA256 057b348cf5be9b4fb9db99a4549f6433c89d21e5f91dc5e46b0b4dc6b70432f5 SHA512 bf3b0eb1125d5e89b433954fcbf805cd86dec5a6eeb23df685ebf3ff83a610573f2ffcec65d893244c845936a73918387cba026710c65c854b2c94a78b007989 WHIRLPOOL b888038b96615c7a0363555b407a3de2c1f17e34428fa16dfbf56fcf68875d6bcdecbc61b545d7f71842ff1909a3ffeff17165fa7f56b48f95adae22f5f8bff1 +AUX fix_libtool_files.sh 1521 SHA256 3b39299e79f51a97c50aead633f690f8f0b34a24fe94b89d5331dccd57bd2dc5 SHA512 9ad874b70c5133b055a1afac0449934c3fb92ed348c41f8762580ee27477748df7e208e254687dc7dd2b0432c35d183cb0e561a332cfa5f85885f1922ffd5996 WHIRLPOOL 78649c3f8dd1e89dd24c4ca4188cc019fbb3bf1b5665cf306a441a647855043dec37fad733cbe5e7cac6329d4c7bb5274ba73e141fa3853b56693399ef1efaef +AUX gcc-configure-LANG.patch 2052 SHA256 63de6d2dcfe14f21d147abeb1390405b9220c03f8e968f482d4b4c1cf279c88b SHA512 a694c7ac2f45cc657097ff5b0cf1356ac88a9c06035c9ba15167e9d444844d0d8a478eb1b9b62195dd063774f79697b9148b9cdb6c261640b472c291061b2129 WHIRLPOOL 3cc1ec912fb192ff1058de5b93e49a994ba30d1501a932290dd5b3df1cd783875621cda56edeb41894cd5fa10c04917e693a40a60be8d742ddd7992bf5d8afeb +AUX gcc-configure-texinfo.patch 337 SHA256 74b73a7ecec2d88889876b4db480cd173632f49d5396bb8e5b3c93673f9b5b98 SHA512 a15fba8bf2ff02bdeca54d6f186bfa08c1079c6a8ba0a3beef154483ce5c1b8c497e7ffeec32371968f0037e0ff8384609eb0c367d0155a4e5a7eef8aad084d5 WHIRLPOOL 39d008aad06f7621e4e5db15f5e85a59e583b43f8d247029bd4944466bb60a9795bda157d185c45c329294078e282703a243aad5c468d90c77665dd6336870d4 +AUX gcc-spec-env-r1.patch 3148 SHA256 da0a6442eb42bce58cbdc7858b110a2e65fc5bd5b4b780b9b491033de6e302fa SHA512 ecae71577543772cfe1711f1b4a8815c0b5d706ebd01edacd1f07586637d4805e25771f970a6e6d1bb696d4b1b5ef3e0036088a96a9f6beff7ddaee704175d16 WHIRLPOOL 3535605998eabccdee71ba396ed5cefbb8b0a8cb073101f6444c7d01233f3b3904c1b29f4daf0a3417c68de8dbd62a0b7dc367cacfcbfa0c4ee1b69b7df8c6fb +AUX gnat-gpl-2016-gentoo.patch 2811 SHA256 fb29461b45d5a4804b65e074db9c5dc6719b6fc886d6b196c6fe1bff090e93b5 SHA512 ba147b3cb4374eb3c8fe530b92a5ffa564170d8df26dc455a48dae3ec92ca0fee9525cb67229855b34c8b8d48a985a083f7ea70ec2b4d13f652296f04c03e4a0 WHIRLPOOL f226c0e10d9f67c9fbd23a4f272eb52d3a721a49cf2afe2966444d1ff74dedc899fb5eecf9163f5b174366bd258f1ce666e64fbb822fe8b8058b496a80e3c0f9 +AUX gnat-gpl-2017-gentoo.patch 1271 SHA256 7ac86f73f10367d0edc12ea845a9e5ffd4db3d8f95387ce9736151276cfba876 SHA512 a5bacdc4fc4911f8e2b325ed10c8b03d3d992462756192255e1a365f914359fd9b3b50104722761ad5007fae2f62d9bb0258262304e47b4d38e5a7ea27392b85 WHIRLPOOL 3e2a555586a822083bcfcd5132541aa580a3a8f44ac9171415c8ca05f1925be5f5dc2728b38935fdba106844d04078beabfb26cb2d26149f3117853f9f885145 +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-6-gpl-2017-src.tar.gz 88045488 SHA256 6a45ffc4096772aeb8d7cf673dde8cfb6ae270855fb4ee4b325fe88c61cce90e SHA512 bf8f786b5ad28a6b7d184fb5263424b7ed62154e308e259b61c24a577efdae56939fbaabc1fc53a0f467702c1e6d8598dc6e489ce074724799130a793cfb146e WHIRLPOOL 8ca2ca993a606b4b0e9182809aca9ece2afa4e49f7510a1fca6e73faa78e8c05c4eaeca605a295dd8851ef57d584c2197dd93ad08f4a7a1b5de117187c5f50aa +DIST gcc-6.3.0-patches-1.0.tar.bz2 7596 SHA256 6c880468ffa4ad2b324fd18c762dbdf10646089c8ab865c228e166f99a0e049c SHA512 8fc96086bd3da3726687ee9d180d3b5d0a7d5814141d44eac8eb01566a783ec780c8fb8f55f75d6e9c9006b2e407e20cdb5835d541b0b66a47dd60642861734c WHIRLPOOL b1bce94d6134db6c9aff4298c6c7af003e39d0411aa40cd027d2c7d6a256971c81fb557e85b25f1107e9a474cb7d772c3bc62a7a4ab7ff7fca5eeae5b2ca0c94 +DIST gcc-6.3.0.tar.bz2 99903185 SHA256 f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f SHA512 234dd9b1bdc9a9c6e352216a7ef4ccadc6c07f156006a59759c5e0e6a69f0abcdc14630eff11e3826dd6ba5933a8faa43043f3d1d62df6bd5ab1e82862f9bf78 WHIRLPOOL e79a2d6ad199396b6efd835c1129d049a367174ea33dd3b6247d72461f117c2dd81e5a66f3dd6427ce500e768d3a4453efd0debcb56966d00c7df79d05d54b7d +DIST gcc-interface-4.9-gpl-2016-src.tar.gz 339037 SHA256 56d7a90c80ff33aa99960b959b281567fd2d9692db78fc07b2827d2905780e20 SHA512 507df314d1890c228c19f458bd51197377deaaa2d6082fe1e71b62b683252ee5fba4adfe2386246e14618b1c77288e0dcb5bf501e2daaca249b6299462c2f6bd WHIRLPOOL e889172210928849cb704562ed2b229748a6779842ebaa29d77dd282a0dee9509b70483bbfe25e0e2137eba00dbb4fedb4ebabfa7639bda25791c52176c50215 +DIST gcc-interface-6-gpl-2017-src.tar.gz 347016 SHA256 dbc4f1cae33fb82d21284af5ea05746e7240f0c9a9a6313c1b69a75ba7a903e2 SHA512 5833303fce5bf812ccbc71f3d3726c0cb877937d75327edb15097c0b7dba58024a52688392906695ab92fb4e5d7a6623671eac9a05d17937dc0270bafcde920a WHIRLPOOL d3e51c9ff876c11c9a15235d8fa7e0d52d36b3e27dc2f2cdaf956511b26d481b25fee25ee7d741c3dcc0334c5f6ce5ec1517d1aac5e1b626dba40d5a1f4299a7 +DIST gnat-gpl-2014-x86_64-linux-bin.tar.gz 236253400 SHA256 8063a8c94df556991474af0f6b479868db7fcea0118f49bc7606db36faeab733 SHA512 5e40a251baac3d0ace78352956ca21a7d294d902d344a9ed7a8d376e900468c283721ebfb773adfedbf4d623ace02536505c0147815a0c1908933ad611ea085e WHIRLPOOL 7287a0cf19ea770dfce492c216850eeaa95edd1846ce813fb44542a5681afc9bacb710ad6bc41cb43d56087d08bb93d525808274ee36f45e66a7ca9da39907b2 +DIST gnat-gpl-2016-src.tar.gz 8857249 SHA256 b23780ab981e3b981c668b79b066ce56bab62a950b83f10c60a2bd5ac0fcb6d5 SHA512 4a5cb58ede5b4ae2887e64f0f2e12e0e06470d320796f06d02f7ddd932ff0d3b40e6d3e98a81138fff6906548a55153c2a186ff4a6e3d23b9dbe01ca582da1f8 WHIRLPOOL b0a7c7ba0de0cc5ca439bba7ed94f597004343b5cecb0b3be76e332e8d90a3e5265dbfee421b1d117f13031082636f364de3f989689562a824dd27a567dd8bd0 +DIST gnat-gpl-2017-src.tar.gz 8783473 SHA256 91c9733fb8f8ca4c42fbcab3bc8a54fc83083126f6e6b630c9a36f3654537c29 SHA512 ae7314a2241107ed4d962dce08306eeb34c5f11e26183935bbb1ccf3a5eb011d6457c1b6fcded93dd0ee9ba31d791971ebe2a5a5a0ae04ff80d87a670325a098 WHIRLPOOL cf98ed36553ddfb54502f10898016017e387920bea074395c3a84047c2ec707734a9299de8c5f2f1931a53e04c24e67f8ab017437fbee7b7a658a6c0bca46e35 +EBUILD gnat-gpl-2016.ebuild 5391 SHA256 2bc49d974cd2ee40fe559879501eaa0c10baeb0b7e772841e5af94ab678ddb0c SHA512 2d30b7cc8b317acc0e371ecbdb0c181c4d8ac18713ee183b2d92be79e1a513a667732417bc0e535e0cc344a00a2bafe47d1c20fd271aa8e55b3422b2e98f7f3e WHIRLPOOL dba91e1132ffed0b9fe6e5ea09d620cb218b2ac6d70b5cb1ff8faccbd5326fe83f3061f849206d510551d1fe95fd47ad5e58fa3081997be424d30a44377f7d71 +EBUILD gnat-gpl-2017.ebuild 4781 SHA256 d8c663ab49f1376ea1aafea2b7443089a754bf964deef3f867c67d7d78fe7979 SHA512 53a1067987480d55264ae95d54d9dfaaf0783d0f971b2b2ce3c6fb9fb6e062255b068c6b515f88f18a28e34540681d871978778bc1136d922639ff98b24b8315 WHIRLPOOL 0a592ade339d4b8e8511bde33162c54adf0d446c0399fffafeafda7f8fe885ba618a224352ca202776150a06ae942b622dad0f30aa401921ed2e9dcc8facd7eb +MISC metadata.xml 1960 SHA256 e89966798d686642e6452627f8f9c5a924524c35e57141ab0acd961ff8b0c771 SHA512 04f14bcdd96ae4f6e285abfd07de89828eb989ce779aa59decf689920a179d859ffe809d7960e9c3599c2f6fff6ab2aafbb54458da07fa91841c61e0dfca47ab WHIRLPOOL b45fdd92bf46b667af11fe863387fed2ea95545983b60e66e2f831bfd4e3581d892f94161a6991741b2c5075e4ba4f3e60fe1a068f701b84b22d15048858a731 diff --git a/dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la b/dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la new file mode 100644 index 000000000000..066c8d21681f --- /dev/null +++ b/dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la @@ -0,0 +1,334 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# +# Helper functions +# +function printn(string) { + printf("%s", string) +} +function einfo(string) { + printf(" \033[32;01m*\033[0m %s\n", string) +} +function einfon(string) { + printf(" \033[32;01m*\033[0m %s", string) +} +function ewarn(string) { + printf(" \033[33;01m*\033[0m %s\n", string) +} +function ewarnn(string) { + printf(" \033[33;01m*\033[0m %s", string) +} +function eerror(string) { + printf(" \033[31;01m*\033[0m %s\n", string) +} + +# +# assert(condition, errmsg) +# assert that a condition is true. Otherwise exit. +# +function assert(condition, string) { + if (! condition) { + printf("%s:%d: assertion failed: %s\n", + FILENAME, FNR, string) > "/dev/stderr" + _assert_exit = 1 + exit 1 + } +} + +# +# system(command, return) +# wrapper that normalizes return codes ... +# +function dosystem(command, ret) { + ret = 0 + ret = system(command) + if (ret == 0) + return 1 + else + return 0 +} + +# +# parse_ld_conf(config_file) +# +function parse_ld_conf(conf, pipe, ldsoconf_data, CHILD, y) { + pipe = "cd /etc; cat " conf " | sort 2>/dev/null" + while(((pipe) | getline ldsoconf_data) > 0) { + if (ldsoconf_data ~ /^[[:space:]]*#/) + continue + if (ldsoconf_data == "") + continue + + # Handle the "include" keyword + if (ldsoconf_data ~ /^include /) { + sub(/^include /, "", ldsoconf_data) + parse_ld_conf(ldsoconf_data) + continue + } + + # Remove any trailing comments + sub(/#.*$/, "", ldsoconf_data) + # Remove any trailing spaces + sub(/[[:space:]]+$/, "", ldsoconf_data) + # Eat duplicate slashes + sub(/\/\//, "/", ldsoconf_data) + # Prune trailing / + sub(/\/$/, "", ldsoconf_data) + + # + # Drop the directory if its a child directory of + # one that was already added ... + # For example, if we have: + # /usr/lib /usr/libexec /usr/lib/mozilla /usr/lib/nss + # We really just want to save /usr/lib /usr/libexec + # + CHILD = 0 + for (y in DIRLIST) { + if (ldsoconf_data ~ "^" DIRLIST[y] "(/|$)") { + CHILD = 1 + break + } + } + if (CHILD) continue + + DIRLIST[++LIBCOUNT] = ldsoconf_data + } + close(pipe) +} + +BEGIN { + # + # Get our variables from environment + # + OLDVER = ENVIRON["OLDVER"] + OLDCHOST = ENVIRON["OLDCHOST"] + + if (OLDVER == "") { + eerror("Could not get OLDVER!"); + exit 1 + } + + # Setup some sane defaults + LIBCOUNT = 2 + HAVE_GCC34 = 0 + DIRLIST[1] = "/lib" + DIRLIST[2] = "/usr/lib" + + # + # Walk /etc/ld.so.conf to discover all our library paths + # + parse_ld_conf("/etc/ld.so.conf") + + # + # Get line from gcc's output containing CHOST + # + pipe = "gcc -print-file-name=libgcc.a 2>/dev/null" + if ((!((pipe) | getline TMP_CHOST)) || (TMP_CHOST == "")) { + close(pipe) + + # If we fail to get the CHOST, see if we can get the CHOST + # portage thinks we are using ... + pipe = "/usr/bin/portageq envvar 'CHOST'" + assert(((pipe) | getline CHOST), "(" pipe ") | getline CHOST") + } else { + # Check pre gcc-3.4.x versions + CHOST = gensub("^.+lib/gcc-lib/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST) + + if (CHOST == TMP_CHOST || CHOST == "") { + # Check gcc-3.4.x or later + CHOST = gensub("^.+lib/gcc/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST); + + if (CHOST == TMP_CHOST || CHOST == "") + CHOST = "" + else + HAVE_GCC34 = 1 + } + } + close(pipe) + + if (CHOST == "") { + eerror("Could not get gcc's CHOST!") + exit 1 + } + + if (OLDCHOST != "") + if (OLDCHOST == CHOST) + OLDCHOST = "" + + GCCLIBPREFIX_OLD = "/usr/lib/gcc-lib/" + GCCLIBPREFIX_NEW = "/usr/lib/gcc/" + + if (HAVE_GCC34) + GCCLIBPREFIX = GCCLIBPREFIX_NEW + else + GCCLIBPREFIX = GCCLIBPREFIX_OLD + + GCCLIB = GCCLIBPREFIX CHOST + + if (OLDCHOST != "") { + OLDGCCLIB1 = GCCLIBPREFIX_OLD OLDCHOST + OLDGCCLIB2 = GCCLIBPREFIX_NEW OLDCHOST + } + + # Get current gcc's version + pipe = "gcc -dumpversion" + assert(((pipe) | getline NEWVER), "(" pipe ") | getline NEWVER)") + close(pipe) + + if (NEWVER == "") { + eerror("Could not get gcc's version!") + exit 1 + } + + # Nothing to do ? + # NB: Do not check for (OLDVER == NEWVER) anymore, as we might need to + # replace libstdc++.la .... + if ((OLDVER == "") && (OLDCHOST == "")) + exit 0 + + # + # Ok, now let's scan for the .la files and actually fix them up + # + for (x = 1; x <= LIBCOUNT; x++) { + # Do nothing if the target dir is gcc's internal library path + if (DIRLIST[x] ~ GCCLIBPREFIX_OLD || + DIRLIST[x] ~ GCCLIBPREFIX_NEW) + continue + + einfo(" [" x "/" LIBCOUNT "] Scanning " DIRLIST[x] " ...") + + pipe = "find " DIRLIST[x] "/ -name '*.la' 2>/dev/null" + while (((pipe) | getline la_files) > 0) { + + # Do nothing if the .la file is located in gcc's internal lib path + if (la_files ~ GCCLIBPREFIX_OLD || + la_files ~ GCCLIBPREFIX_NEW) + continue + + CHANGED = 0 + CHOST_CHANGED = 0 + + # See if we need to fix the .la file + while ((getline la_data < (la_files)) > 0) { + if (OLDCHOST != "") { + if ((gsub(OLDGCCLIB1 "[/[:space:]]+", + GCCLIB, la_data) > 0) || + (gsub(OLDGCCLIB2 "[/[:space:]]+", + GCCLIB, la_data) > 0)) { + CHANGED = 1 + CHOST_CHANGED = 1 + } + } + if (OLDVER != NEWVER) { + if ((gsub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "[/[:space:]]*", + GCCLIB "/" NEWVER, la_data) > 0) || + (gsub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "[/[:space:]]*", + GCCLIB "/" NEWVER, la_data) > 0)) + CHANGED = 1 + } + # We now check if we have libstdc++.la, as we remove the + # libtool linker scripts for gcc ... + # We do this last, as we only match the new paths + if (gsub(GCCLIB "/" NEWVER "/libstdc\\+\\+\\.la", + "-lstdc++", la_data) > 0) + CHANGED = 1 + } + close(la_files) + + # Do the actual changes in a second loop, as we can then + # verify that CHOST_CHANGED among things is correct ... + if (CHANGED) { + ewarnn(" FIXING: " la_files " ...[") + + # Clear the temp file (removing rather than '>foo' is better + # out of a security point of view?) + dosystem("rm -f " la_files ".new") + + while ((getline la_data < (la_files)) > 0) { + if (OLDCHOST != "") { + tmpstr = gensub(OLDGCCLIB1 "([/[:space:]]+)", + GCCLIB "\\1", "g", la_data) + tmpstr = gensub(OLDGCCLIB2 "([/[:space:]]+)", + GCCLIB "\\1", "g", tmpstr) + + if (la_data != tmpstr) { + printn("c") + la_data = tmpstr + } + + if (CHOST_CHANGED > 0) { + # We try to be careful about CHOST changes outside + # the gcc library path (meaning we cannot match it + # via /GCCLIBPREFIX CHOST/) ... + + # Catch: + # + # dependency_libs=' -L/usr/CHOST/{bin,lib}' + # + gsub("-L/usr/" OLDCHOST "/", + "-L/usr/" CHOST "/", la_data) + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc-lib/CHOST/VER/../../../../CHOST/lib' + # + la_data = gensub("(" GCCLIB "/[^[:space:]]+)/" OLDCHOST "/", + "\\1/" CHOST "/", "g", la_data) + } + } + + if (OLDVER != NEWVER) { + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc/CHOST/VER' + # + tmpstr = gensub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "([/[:space:]]+)", + GCCLIB "/" NEWVER "\\1", "g", la_data) + tmpstr = gensub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "([/[:space:]]+)", + GCCLIB "/" NEWVER "\\1", "g", tmpstr) + + if (la_data != tmpstr) { + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc-lib/../../CHOST/lib' + # + # in cases where we have gcc34 + tmpstr = gensub(GCCLIBPREFIX_OLD "(../../" CHOST "/lib)", + GCCLIBPREFIX "\\1", "g", tmpstr) + tmpstr = gensub(GCCLIBPREFIX_NEW "(../../" CHOST "/lib)", + GCCLIBPREFIX "\\1", "g", tmpstr) + printn("v") + la_data = tmpstr + } + } + + # We now check if we have libstdc++.la, as we remove the + # libtool linker scripts for gcc and any referencese in any + # libtool linker scripts. + # We do this last, as we only match the new paths + tmpstr = gensub(GCCLIB "/" NEWVER "/libstdc\\+\\+\\.la", + "-lstdc++", "g", la_data); + if (la_data != tmpstr) { + printn("l") + la_data = tmpstr + } + + print la_data >> (la_files ".new") + } + + if (CHANGED) + print "]" + + close(la_files) + close(la_files ".new") + + assert(dosystem("mv -f " la_files ".new " la_files), + "dosystem(\"mv -f " la_files ".new " la_files "\")") + } + } + + close(pipe) + } +} + +# vim:ts=4 diff --git a/dev-lang/gnat-gpl/files/c89 b/dev-lang/gnat-gpl/files/c89 new file mode 100644 index 000000000000..cee0325f50f1 --- /dev/null +++ b/dev-lang/gnat-gpl/files/c89 @@ -0,0 +1,20 @@ +#! /bin/sh + +# Call the appropriate C compiler with options to accept ANSI/ISO C +# The following options are the same (as of gcc-2.95): +# -ansi +# -std=c89 +# -std=iso9899:1990 + +for i; do + case "$i" in + -ansi|-std=c89|-std=iso9899:1990) + ;; + -std=*) + echo >&2 "`basename $0` called with non ANSI/ISO C90 option $i" + exit 1 + ;; + esac +done + +exec gcc -std=c89 -pedantic -U_FORTIFY_SOURCE "$@" diff --git a/dev-lang/gnat-gpl/files/c99 b/dev-lang/gnat-gpl/files/c99 new file mode 100644 index 000000000000..c9542095e385 --- /dev/null +++ b/dev-lang/gnat-gpl/files/c99 @@ -0,0 +1,21 @@ +#! /bin/sh + +# Call the appropriate C compiler with options to accept ANSI/ISO C +# The following options are the same (as of gcc-3.3): +# -std=c99 +# -std=c9x +# -std=iso9899:1999 +# -std=iso9899:199x + +for i; do + case "$i" in + -std=c9[9x]|-std=iso9899:199[9x]) + ;; + -ansi|-std=*) + echo >&2 "`basename $0` called with non ANSI/ISO C99 option $i" + exit 1 + ;; + esac +done + +exec gcc -std=c99 -pedantic -U_FORTIFY_SOURCE ${1+"$@"} diff --git a/dev-lang/gnat-gpl/files/fix_libtool_files.sh b/dev-lang/gnat-gpl/files/fix_libtool_files.sh new file mode 100644 index 000000000000..28f9beb36bac --- /dev/null +++ b/dev-lang/gnat-gpl/files/fix_libtool_files.sh @@ -0,0 +1,66 @@ +#!/bin/sh +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +usage() { +cat << "USAGE_END" +Usage: fix_libtool_files.sh [--oldarch ] + + Where is the version number of the + previous gcc version. For example, if you updated to + gcc-3.2.1, and you had gcc-3.2 installed, run: + + # fix_libtool_files.sh 3.2 + + If you updated to gcc-3.2.3, and the old CHOST was i586-pc-linux-gnu + but you now have CHOST as i686-pc-linux-gnu, run: + + # fix_libtool_files.sh 3.2 --oldarch i586-pc-linux-gnu + + Note that if only the CHOST and not the version changed, you can run + it with the current version and the '--oldarch ' arguments, + and it will do the expected: + + # fix_libtool_files.sh `gcc -dumpversion` --oldarch i586-pc-linux-gnu + +USAGE_END + exit 1 +} + +case $2 in +--oldarch) [ $# -ne 3 ] && usage ;; +*) [ $# -ne 1 ] && usage ;; +esac + +ARGV1=$1 +ARGV2=$2 +ARGV3=$3 + +. /etc/profile || exit 1 + +if [ ${EUID:-0} -ne 0 ] ; then + echo "${0##*/}: Must be root." + exit 1 +fi + +# make sure the files come out sane +umask 0022 + +OLDCHOST= +[ "${ARGV2}" = "--oldarch" ] && OLDCHOST=${ARGV3} + +AWKDIR="/usr/share/gcc-data" + +if [ ! -r "${AWKDIR}/fixlafiles.awk" ] ; then + echo "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!" + exit 1 +fi + +OLDVER=${ARGV1} + +export OLDVER OLDCHOST + +echo "Scanning libtool files for hardcoded gcc library paths..." +exec gawk -f "${AWKDIR}/fixlafiles.awk" + +# vim:ts=4 diff --git a/dev-lang/gnat-gpl/files/gcc-configure-LANG.patch b/dev-lang/gnat-gpl/files/gcc-configure-LANG.patch new file mode 100644 index 000000000000..d1b1b0353662 --- /dev/null +++ b/dev-lang/gnat-gpl/files/gcc-configure-LANG.patch @@ -0,0 +1,64 @@ +The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in +option parsing, it may break. + +http://bugs.gentoo.org/103483 + +--- configure ++++ configure +@@ -54,6 +54,19 @@ + infodir='${prefix}/info' + mandir='${prefix}/man' + ++# NLS nuisances. ++for as_var in \ ++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ++ LC_TELEPHONE LC_TIME ++do ++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then ++ eval $as_var=C; export $as_var ++ else ++ unset $as_var ++ fi ++done ++ + # Initialize some other variables. + subdirs= + MFLAGS= MAKEFLAGS= +@@ -452,16 +463,6 @@ + esac + done + +-# NLS nuisances. +-# Only set these to C if already set. These must not be set unconditionally +-# because not all systems understand e.g. LANG=C (notably SCO). +-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +-# Non-C LC_CTYPE values break the ctype check. +-if test "${LANG+set}" = set; then LANG=C; export LANG; fi +-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +- + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -rf conftest* confdefs.h + # AIX cpp loses on an empty file, so make sure it contains at least a newline. +@@ -1850,6 +1850,19 @@ + # Compiler output produced by configure, useful for debugging + # configure, is in ./config.log if it exists. + ++# NLS nuisances. ++for as_var in \ ++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ++ LC_TELEPHONE LC_TIME ++do ++ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then ++ eval \$as_var=C; export \$as_var ++ else ++ unset \$as_var ++ fi ++done ++ + ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" + for ac_option + do diff --git a/dev-lang/gnat-gpl/files/gcc-configure-texinfo.patch b/dev-lang/gnat-gpl/files/gcc-configure-texinfo.patch new file mode 100644 index 000000000000..ddc098ddbd58 --- /dev/null +++ b/dev-lang/gnat-gpl/files/gcc-configure-texinfo.patch @@ -0,0 +1,16 @@ +Chances are quite good that the installed makeinfo is sufficient. +So ignore false positives where the makeinfo installed is so new +that it violates the cheesy version grep. + +http://bugs.gentoo.org/198182 + +--- configure ++++ configure +@@ -3573,6 +3573,6 @@ + : + else +- MAKEINFO="$MISSING makeinfo" ++ : + fi + ;; + 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 + + * 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..ba037507aff3 --- /dev/null +++ b/dev-lang/gnat-gpl/files/gnat-gpl-2016-gentoo.patch @@ -0,0 +1,57 @@ +--- 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}\ +--- gcc-4.9-gpl-2016-src/gcc/ada/osint.adb.old 2017-03-10 21:58:02.600710156 +0100 ++++ gcc-4.9-gpl-2016-src/gcc/ada/osint.adb 2017-03-10 21:59:38.033983293 +0100 +@@ -2229,14 +2229,11 @@ + for J in Start_Of_Prefix .. Name_Len - Prog'Length + 1 loop + if Name_Buffer (J .. J + Prog'Length - 1) = Prog then + End_Of_Prefix := J - 1; ++ Start_Of_Suffix := J + Prog'Length; + exit; + end if; + end loop; + +- if End_Of_Prefix > 1 then +- Start_Of_Suffix := End_Of_Prefix + Prog'Length + 1; +- end if; +- + -- Create the new program name + + return new String' diff --git a/dev-lang/gnat-gpl/files/gnat-gpl-2017-gentoo.patch b/dev-lang/gnat-gpl/files/gnat-gpl-2017-gentoo.patch new file mode 100644 index 000000000000..442e1ad76577 --- /dev/null +++ b/dev-lang/gnat-gpl/files/gnat-gpl-2017-gentoo.patch @@ -0,0 +1,32 @@ +--- patch/13_all_default-ssp-fix.patch.old 2017-06-14 11:29:28.997183865 +0200 ++++ patch/13_all_default-ssp-fix.patch 2017-06-14 12:24:15.042271863 +0200 +@@ -39,9 +39,9 @@ + %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\ + %{fsyntax-only:-o %j} %{-param*}\ + + %{nostdlib:-nostdlib}\ +- %{coverage:-fprofile-arcs -ftest-coverage}"; ++ %{coverage:-fprofile-arcs -ftest-coverage}\ ++ %{fdump-scos:-fpreserve-decisions-generic}"; + +- static const char *asm_options = + --- a/gcc/params.def 2016-03-30 09:47:40.000000000 +0200 + +++ b/gcc/params.def 2016-09-19 12:56:58.443179039 +0200 + @@ -673,7 +673,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT, +--- gcc-6-gpl-2017-src/gcc/ada/osint.adb.old 2017-03-10 21:58:02.600710156 +0100 ++++ gcc-6-gpl-2017-src/gcc/ada/osint.adb 2017-03-10 21:59:38.033983293 +0100 +@@ -2229,14 +2229,11 @@ + for J in Start_Of_Prefix .. Name_Len - Prog'Length + 1 loop + if Name_Buffer (J .. J + Prog'Length - 1) = Prog then + End_Of_Prefix := J - 1; ++ Start_Of_Suffix := J + Prog'Length; + exit; + end if; + end loop; + +- if End_Of_Prefix > 1 then +- Start_Of_Suffix := End_Of_Prefix + Prog'Length + 1; +- end if; +- + -- Create the new program name + + return new String' 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..89ff9031378a --- /dev/null +++ b/dev-lang/gnat-gpl/gnat-gpl-2016.ebuild @@ -0,0 +1,191 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 + +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+=" + http://mirrors.cdn.adacore.com/art/57399304c7a447658e0aff7f + -> ${P}-src.tar.gz + http://mirrors.cdn.adacore.com/art/573992d4c7a447658d00e1db + -> ${MYP}.tar.gz + http://mirrors.cdn.adacore.com/art/57399232c7a447658e0aff7d + -> gcc-interface-${REL}-gpl-${PV}-src.tar.gz + bootstrap? ( http://mirrors.cdn.adacore.com/art/564b3ebec8e196b040fbe66c -> + gnat-gpl-2014-x86_64-linux-bin.tar.gz )" + +LICENSE+=" GPL-2 GPL-3" +SLOT="${TOOLCHAIN_GCC_PV}" +KEYWORDS="~amd64" +IUSE="bootstrap" + +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} + +pkg_setup() { + if use bootstrap; then + GCC="${WORKDIR}"/gnat-gpl-2014-x86_64-linux-bin/bin/gcc + else + GCC=${ADA:-$(tc-getCC)} + fi + CC=${GCC} + local base=$(basename ${GCC}) + CXX="${base/gcc/g++}" + GNATMAKE="${base/gcc/gnatmake}" + GNATBIND="${base/gcc/gnatbind}" + if [[ ${base} != ${GCC} ]] ; then + local path=$(dirname ${GCC}) + GNATMAKE="${path}/${GNATMAKE}" + GNATBIND="${path}/${GNATBIND}" + CXX="${path}/${CXX}" + fi + if ! use bootstrap && [[ -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 bootstrap use flag" + die "ada compiler not available" + fi +} + +src_unpack() { + GCC_A_FAKEIT="${P}-src.tar.gz + ${MYP}.tar.gz + ${FSFGCC}.tar.bz2 + gcc-interface-${REL}-gpl-${PV}-src.tar.gz" + if use bootstrap; then + GCC_A_FAKEIT="${GCC_A_FAKEIT} gnat-gpl-2014-x86_64-linux-bin.tar.gz" + fi + + toolchain_src_unpack + if use bootstrap; then + rm gnat-gpl-2014-x86_64-linux-bin/libexec/gcc/x86_64-pc-linux-gnu/4.7.4/ld || die + fi +} + +src_prepare() { + mv ../gnat-gpl-${PV}-src/src/ada gcc/ || die + mv ../gcc-interface-${REL}-gpl-${PV}-src gcc/ada/gcc-interface || die + + sed -i \ + -e "s:gnatmake:${GNATMAKE}:g" \ + gcc/ada/Make-generated.in || die "sed failed" + + sed -i \ + -e "/xoscons/s:gnatmake:${GNATMAKE}:g" \ + gcc/ada/gcc-interface/Makefile.in || die "sed failed" + + 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 '=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() { + local trueGCC_BRANCH_VER=${GCC_BRANCH_VER} + GCC_BRANCH_VER=$(gcc-version) + downgrade_arch_flags + GCC_BRANCH_VER=${trueGCC_BRANCH_VER} + toolchain_src_configure \ + --enable-languages=ada \ + --disable-libada \ + CC=${GCC} \ + GNATBIND=${GNATBIND} \ + GNATMAKE=yes +} + +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 provide the GNAT compiler with gcc for ada/c/c++ and more" + einfo "Set the ADA variables to gcc-${TOOLCHAIN_GCC_PV} in your make.conf" + 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, and not supported for updating your system, except for ada" + einfo "related packages" +} diff --git a/dev-lang/gnat-gpl/gnat-gpl-2017.ebuild b/dev-lang/gnat-gpl/gnat-gpl-2017.ebuild new file mode 100644 index 000000000000..50234668a010 --- /dev/null +++ b/dev-lang/gnat-gpl/gnat-gpl-2017.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +PATCH_VER="1.0" + +TOOLCHAIN_GCC_PV=6.3.0 + +inherit eutils toolchain-funcs toolchain + +REL=6 +MYP=gcc-${REL}-gpl-${PV}-src + +DESCRIPTION="GNAT Ada Compiler - GPL version" +HOMEPAGE="http://libre.adacore.com/" +SRC_URI+=" + http://mirrors.cdn.adacore.com/art/591adbb4c7a4473fcc4532a3 + -> ${P}-src.tar.gz + http://mirrors.cdn.adacore.com/art/591adb65c7a4473fcbb153ac + -> ${MYP}.tar.gz + http://mirrors.cdn.adacore.com/art/591adbc5c7a4473fcbb153ae + -> gcc-interface-${REL}-gpl-${PV}-src.tar.gz + bootstrap? ( + http://mirrors.cdn.adacore.com/art/564b3ebec8e196b040fbe66c -> + gnat-gpl-2014-x86_64-linux-bin.tar.gz + )" + +LICENSE+=" GPL-2 GPL-3" +SLOT="${TOOLCHAIN_GCC_PV}" +KEYWORDS="~amd64" +IUSE="bootstrap" + +RDEPEND="!sys-devel/gcc:${TOOLCHAIN_GCC_PV}" +DEPEND="${RDEPEND} + elibc_glibc? ( >=sys-libs/glibc-2.13 ) + >=sys-devel/binutils-2.20" + +S="${WORKDIR}"/${MYP} +PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )" +FSFGCC=gcc-${TOOLCHAIN_GCC_PV} + +pkg_setup() { + toolchain_pkg_setup + if use bootstrap; then + GCC="${WORKDIR}"/gnat-gpl-2014-x86_64-linux-bin/bin/gcc + else + GCC=${ADA:-$(tc-getCC)} + fi + + gnatbase=$(basename ${GCC}) + gnatpath=$(dirname ${GCC}) + + GNATMAKE=${gnatbase/gcc/gnatmake} + if [[ ${gnatpath} != "." ]] ; then + GNATMAKE="${gnatpath}/${GNATMAKE}" + fi + + if ! use bootstrap && [[ -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 bootstrap use flag" + die "ada compiler not available" + fi +} + +src_unpack() { + GCC_A_FAKEIT=" + ${P}-src.tar.gz + ${MYP}.tar.gz + gcc-interface-${REL}-gpl-${PV}-src.tar.gz" + if use bootstrap; then + GCC_A_FAKEIT="${GCC_A_FAKEIT} gnat-gpl-2014-x86_64-linux-bin.tar.gz" + fi + + toolchain_src_unpack + if use bootstrap; then + rm gnat-gpl-2014-x86_64-linux-bin/libexec/gcc/x86_64-pc-linux-gnu/4.7.4/ld || die + fi +} + +src_prepare() { + CC=${GCC} + CXX="${gnatbase/gcc/g++}" + GNATBIND="${gnatbase/gcc/gnatbind}" + GNATLINK="${gnatbase/gcc/gnatlink}" + GNATLS="${gnatbase/gcc/gnatls}" + if [[ ${gnatpath} != "." ]] ; then + CXX="${gnatpath}/${CXX}" + GNATBIND="${gnatpath}/${GNATBIND}" + GNATLINK="${gnatpath}/${GNATLINK}" + GNATLS="${gnatpath}/${GNATLS}" + fi + mkdir bin || die + ln -s $(which ${GCC}) bin/gcc || die + ln -s $(which ${CXX}) bin/g++ || die + ln -s $(which ${GNATMAKE}) bin/gnatmake || die + ln -s $(which ${GNATBIND}) bin/gnatbind || die + ln -s $(which ${GNATLINK}) bin/gnatlink || die + ln -s $(which ${GNATLS}) bin/gnatls || die + + echo ${TOOLCHAIN_GCC_PV} > gcc/BASE-VER + + cd .. + mv gnat-gpl-${PV}-src/src/ada ${MYP}/gcc/ || die + mv gcc-interface-${REL}-gpl-${PV}-src ${MYP}/gcc/ada/gcc-interface || die + epatch "${FILESDIR}"/${P}-gentoo.patch + cd - + sed -i \ + -e 's:$(P) ::g' \ + gcc/ada/gcc-interface/Makefile.in \ + || die "sed failed" + toolchain_src_prepare +} + +src_configure() { + export PATH=${PWD}/bin:${PATH} + local trueGCC_BRANCH_VER=${GCC_BRANCH_VER} + GCC_BRANCH_VER=$(gcc-version) + downgrade_arch_flags + GCC_BRANCH_VER=${trueGCC_BRANCH_VER} + 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 provide the GNAT compiler with gcc for ada/c/c++ and more" + einfo "Set the ADA variables to ${CTARGET}-gcc-${TOOLCHAIN_GCC_PV} in" + einfo "your make.conf" + 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, and not supported for updating your system, except for ada" + einfo "related packages" +} diff --git a/dev-lang/gnat-gpl/metadata.xml b/dev-lang/gnat-gpl/metadata.xml new file mode 100644 index 000000000000..5018efb098ac --- /dev/null +++ b/dev-lang/gnat-gpl/metadata.xml @@ -0,0 +1,36 @@ + + + + + tupone@gentoo.org + Tupone Alfredo + + + Useful only when building GCJ, this enables Abstract + Window Toolkit (AWT) peer support on top of GTK+ + Support the Cilk Plus language (C/C++ based languages for parallel programming) + Enable fixed-point arithmetic support for MIPS + targets in gcc (Warning: significantly increases compile time!) + + Build the GCC Go language frontend. + Add support for the framework for loop + optimizations based on a polyhedral intermediate representation + Enable support for Intel Memory Protection Extensions (MPX) + 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) + Disable PIE support (NOT FOR GENERAL USE) + Disable SSP support (NOT FOR GENERAL USE) + Build support for the Objective C code language + + Build support for the Objective C++ language + Build support for the Objective C code language + Garbage Collector + Build GCC using Profile Guided Optimization (PGO) + Run the testsuite and install the results + (requires FEATURES=test) + Build support for various sanitizer functions (ASAN/TSAN/etc...) + Build packages with stack smashing protector on by default + Build support for virtual table verification (a C++ hardening feature) + + -- cgit v1.2.3