diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-06-21 17:50:24 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-06-21 17:50:24 +0100 |
commit | feb0daf81d888e9160f9f94502de09b66f2a63fd (patch) | |
tree | b6e5c40ce2abef3da27ed50a023153f475e0ddef /dev-lang/gnat-gpl | |
parent | 9452a6e87b6c2c70513bc47a2470bf9f1168920e (diff) |
gentoo resync : 21.06.2020
Diffstat (limited to 'dev-lang/gnat-gpl')
-rw-r--r-- | dev-lang/gnat-gpl/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la | 334 | ||||
-rw-r--r-- | dev-lang/gnat-gpl/files/fix_libtool_files.sh | 66 |
3 files changed, 0 insertions, 402 deletions
diff --git a/dev-lang/gnat-gpl/Manifest b/dev-lang/gnat-gpl/Manifest index d796118bab9d..21e25b58b334 100644 --- a/dev-lang/gnat-gpl/Manifest +++ b/dev-lang/gnat-gpl/Manifest @@ -1,7 +1,5 @@ -AUX awk/fixlafiles.awk-no_gcc_la 8473 BLAKE2B dab27fa6914f4efb7b11b51970823dc619bae056fa527f7d1a6e85153754eb47c57ba85b7bda18bc37870fb7c54747d5bbedc0b36268b65c22900ec583d71ffd SHA512 eacc3a19252d2f729d7afcff4c20ceecfcc212bb041e07fb5a98b5224a4a9ac4c1f5ebb1be6058033f2e38a1da7eef5d8a8c9a349f7073e2b2e339566e0cf9fc AUX c89 412 BLAKE2B 04236b6a32e8819c65713821e769d5bf55f194fb6bdaa61c48ad09c7e13e123d3e4725394b3a922445efaa951849f4e87f96e34a55d3e229dbedc50ca1816f44 SHA512 71d33a147339d8d70a62aa22a95d3e70e445d8435d6ac05893f7da19ae851b89bea851f6ce213fbd22470f13572ae13b83cf02f0621333f07d7b0c68a79b7924 AUX c99 446 BLAKE2B 061fcbef85149de611c4692c99c2c5ebeeef045637b999dbea0d1922398e16361cedbd461ed6aaf0c49c6269900a4c346f5026d8c22780044e1cc8afee74be4e SHA512 bf3b0eb1125d5e89b433954fcbf805cd86dec5a6eeb23df685ebf3ff83a610573f2ffcec65d893244c845936a73918387cba026710c65c854b2c94a78b007989 -AUX fix_libtool_files.sh 1521 BLAKE2B 32e267764269241a540f43c11e9d4a016f393a8b9bedd3843e2336ff70ec324dce0bd6e2549ed6e0e2b1779f3475c6ada6fce0db3e4bdca69f44a70e5f4cd576 SHA512 9ad874b70c5133b055a1afac0449934c3fb92ed348c41f8762580ee27477748df7e208e254687dc7dd2b0432c35d183cb0e561a332cfa5f85885f1922ffd5996 AUX gcc-configure-LANG.patch 2052 BLAKE2B 28c36f4992e41305ee421dade5eaaac34e3bdc523665b03f360f2bc01e8f69e9dc48052edb80dece63ab561e80325b4f125502482eb16f7324f1c03670021550 SHA512 a694c7ac2f45cc657097ff5b0cf1356ac88a9c06035c9ba15167e9d444844d0d8a478eb1b9b62195dd063774f79697b9148b9cdb6c261640b472c291061b2129 AUX gcc-configure-texinfo.patch 341 BLAKE2B d2ea3b2ea08f5d3a498ba27d0fb95e325097e2104e55caa28b66515cb48662649140d90b639369aedc54b2b1178fa4b49cda442f5f504e09d88a2efa45a5057c SHA512 e8d34c5077409df5495cf0c5fbf5e77f841c5698108fa6a5fde33eb28202c685603bdefd8368918e55f30c4b995e895d71d64c715c1ec2b017e09eb2c54c09ff AUX gcc-spec-env-r1.patch 3148 BLAKE2B 30ceb113a510092a907b445c4b2131f148f7fef54a00a88b5c389bbf93b8b61bc12c86a07df03d57280759e5485ac0cd89ea69826ace01b5720681ca3102640b SHA512 ecae71577543772cfe1711f1b4a8815c0b5d706ebd01edacd1f07586637d4805e25771f970a6e6d1bb696d4b1b5ef3e0036088a96a9f6beff7ddaee704175d16 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 deleted file mode 100644 index 066c8d21681f..000000000000 --- a/dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la +++ /dev/null @@ -1,334 +0,0 @@ -# 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/fix_libtool_files.sh b/dev-lang/gnat-gpl/files/fix_libtool_files.sh deleted file mode 100644 index 28f9beb36bac..000000000000 --- a/dev-lang/gnat-gpl/files/fix_libtool_files.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/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 <old-gcc-version> [--oldarch <old-CHOST>] - - Where <old-gcc-version> 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 <old-CHOST>' 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 |