commit:     9240e5af8d9a2cd9452b4ca6c37a44a1f8e61be2
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 25 11:16:51 2023 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Dec 25 11:16:51 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9240e5af

sys-devel/native-cctools-5-r1: port to EAPI=8, cleanup

Closes: https://bugs.gentoo.org/919474
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 sys-devel/native-cctools/files/aix-2/ld            | 143 ---------------------
 sys-devel/native-cctools/files/aix-2/mkexpfile     |  70 ----------
 sys-devel/native-cctools/files/aix-2/nm            |   6 -
 ...cctools-5.ebuild => native-cctools-5-r1.ebuild} |   4 +-
 4 files changed, 1 insertion(+), 222 deletions(-)

diff --git a/sys-devel/native-cctools/files/aix-2/ld 
b/sys-devel/native-cctools/files/aix-2/ld
deleted file mode 100644
index 8f9841ef32ee..000000000000
--- a/sys-devel/native-cctools/files/aix-2/ld
+++ /dev/null
@@ -1,143 +0,0 @@
-#! /usr/bin/env /bin/ksh
-# Copyright 1999-2018 Gentoo Foundation; Distributed under the GPL v2
-
-# Upon '-soname' and similar flags, create a "shared library" on AIX being an
-# archive file containing an Import File and the shared object file, as in:
-# http://lists.gnu.org/archive/html/libtool/2011-01/msg00023.html
-# with updates in:
-# http://lists.gnu.org/archive/html/libtool/2011-02/msg00000.html
-#
-# This helper script is meant not depend on anything Gentoo specific.
-
-ld=/usr/ccs/bin/ld
-ar=/usr/ccs/bin/ar
-strip=/usr/ccs/bin/strip
-dump=/usr/sbin/dump
-awk=/usr/bin/awk
-rm=/usr/bin/rm
-mkdir=/usr/bin/mkdir
-mv=/usr/bin/mv
-ln=/usr/bin/ln
-
-oldargs=
-output=
-soname=
-newargs=
-OBJECT_MODE=${OBJECT_MODE:-32}
-
-while [[ $# -gt 0 ]]
-do
-       arg=$1
-       shift
-       case ${arg} in
-       -rpath=*)
-               arg="-R${arg#-rpath=}"
-       ;;
-       esac
-       oldargs="${oldargs} '${arg}'"
-       case ${arg} in
-       -o)
-               newargs="${newargs} -o '$1'"
-               output=$1
-               oldargs="${oldargs} '$1'"
-               shift
-               ;;
-       -bM:SRE)
-               newargs="${newargs} '-G' '-bernotok'"
-               ;;
-       -soname=*)
-               soname=${arg#-soname=}
-               ;;
-       -h*)
-               soname=${arg#-h}
-               ;;
-       -soname|-h)
-               soname=$1
-               shift
-               ;;
-       -b32)
-               newargs="${newargs} '${arg}'"
-               OBJECT_MODE=32
-               ;;
-       -b64)
-               newargs="${newargs} '${arg}'"
-               OBJECT_MODE=64
-               ;;
-       *)
-               newargs="${newargs} '${arg}'"
-               ;;
-       esac
-done
-
-if [[ -z ${output} || -z ${soname} ]]; then
-       eval "exec ${ld} ${oldargs}"
-       exit 1
-fi
-
-# Running ld against the orginal target file to retain
-# ld error message when there's a problem with it:
-eval "${ld} -o '${output}' ${newargs}" || exit 1
-
-workdir="${output}.$$"
-
-${rm} -rf "${workdir}" || exit 1
-trap "${rm} -rf '${workdir}'" 0
-
-case ${soname} in
-*\(*\))
-       shro=${soname#*\(}
-       shro=${shro%\)}
-       shri=${shro%.*}.imp
-       ;;
-*\[*\])
-       shro=${soname#*\[}
-       shro=${shro%\]}
-       shri=${shro%.*}.imp
-       ;;
-none) # loadable only module, not linkable: no import file
-       shro='shr.o'
-       soname="${output##*/}(${shro})"
-       shri=
-       ;;
-auto)
-       shro='shr.o'
-       soname=${output##*/}
-       if [[ ${soname} == lib*.so* ]]; then
-               # linkable library: need import file
-               shri=${shro%.*}.imp
-       else
-               # loadable only module, not linkable: no import file
-               shri=
-       fi
-       soname="${soname}(${shro})"
-       ;;
-*)
-       shro='shr.o'
-       shri=${shro%.*}.imp
-       soname="${soname}(${shro})"
-       ;;
-esac
-
-export OBJECT_MODE
-
-${mkdir} "${workdir}" || exit 1
-${strip} -e "${output}" || exit 1
-if [[ -n ${shri} ]]; then
-       ${dump} -Tv "${output}" > "${workdir}"/syms || exit 1
-       ${awk} '
-               BEGIN {
-                       print "#! '"${soname}"'"
-                       print "# '"${OBJECT_MODE}"'"
-               }
-               {
-                       if ($4 == "EXP" || $4 == "ImpExp") {
-                               print $8
-                       } else
-                       if ($4 == "wEXP") {
-                               print $8" weak"
-                       }
-               }' <"${workdir}"/syms > "${workdir}"/${shri} || exit 1
-fi
-${mv} "${output}" "${workdir}/${shro}" || exit 1
-${ar} rc "${output}" ${shri:+"${workdir}/${shri}"} "${workdir}/${shro}" || 
exit 1
-exit 0

diff --git a/sys-devel/native-cctools/files/aix-2/mkexpfile 
b/sys-devel/native-cctools/files/aix-2/mkexpfile
deleted file mode 100644
index 4e79e4647b06..000000000000
--- a/sys-devel/native-cctools/files/aix-2/mkexpfile
+++ /dev/null
@@ -1,70 +0,0 @@
-#! /bin/sh
-
-nm="${0%mkexpfile}nm"
-showwith=
-expfile="ld.aix.exports.$$"
-srcobjs=
-
-# /bin/sort does not allow TMPDIR to be longer than 85 characters
-test ${#TMPDIR} -le 85 || TMPDIR=/tmp export TMPDIR
-
-while test $# -gt 0
-do
-    arg=$1
-    shift
-
-    case ${arg} in
-    --) for arg in "$@"
-       do
-         srcobjs="${srcobjs} '${arg}'"
-       done
-       break
-       ;;
-    --show-with=*) showwith="${arg#--show-with=}" ;;
-    -o)  expfile="${1}"; shift ;;
-    -o*) expfile="${arg#-o}"; ;;
-    *)   srcobjs="${srcobjs} '${arg}'" ;;
-    esac
-done
-
-/bin/rm -f "${expfile}" || exit 1
-
-if ! type "${nm}" >/dev/null 2>&1
-then
-    case ${nm} in
-    *-nm) nm=${nm##*/} ;; # use "powerpc-ibm-aix7.1.0.0-nm" from PATH
-    */nm|nm) nm=/usr/ccs/bin/nm ;; # native anyway
-    esac
-    type "${nm}" >/dev/null || exit 1 # let 'type' yell when necessary
-fi
-
-if "${nm}" -V 2>&1 | /bin/grep 'GNU' >/dev/null
-then
-    eval "${nm}" -Bpg ${srcobjs} |
-      /bin/awk '{
-       if ((($2 == "T") || ($2 == "D") || ($2 == "B") || ($2 == "W")) && 
(substr($3,1,1) != ".")) {
-         if ($2 == "W") {
-           print $3 " weak"
-         } else {
-           print $3
-         }
-       }
-      }' |
-      /bin/sort -u > "${expfile}" || exit 1
-else
-    eval "${nm}" -PCpgl ${srcobjs} |
-      /bin/awk '{
-       if ((($2 == "T") || ($2 == "D") || ($2 == "B") || ($2 == "W") || ($2 == 
"V") || ($2 == "Z")) && (substr($1,1,1) != ".")) {
-         if (($2 == "W") || ($2 == "V") || ($2 == "Z")) {
-           print $1 " weak"
-         } else {
-           print $1
-         }
-       }
-      }' |
-     /bin/sort -u > "${expfile}" || exit 1
-fi
-
-echo "${showwith}${expfile}"
-
-exit 0

diff --git a/sys-devel/native-cctools/files/aix-2/nm 
b/sys-devel/native-cctools/files/aix-2/nm
deleted file mode 100644
index 5ba1d650d23a..000000000000
--- a/sys-devel/native-cctools/files/aix-2/nm
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/sh
-
-# /usr/bin/sort (used by nm) cannot work with TMPDIR longer than 85 characters.
-test ${#TMPDIR} -le 85 || TMPDIR=/tmp export TMPDIR
-
-exec /usr/ccs/bin/nm ${1+"$@"}

diff --git a/sys-devel/native-cctools/native-cctools-5.ebuild 
b/sys-devel/native-cctools/native-cctools-5-r1.ebuild
similarity index 99%
rename from sys-devel/native-cctools/native-cctools-5.ebuild
rename to sys-devel/native-cctools/native-cctools-5-r1.ebuild
index 11840006b901..6ebf381895db 100644
--- a/sys-devel/native-cctools/native-cctools-5.ebuild
+++ b/sys-devel/native-cctools/native-cctools-5-r1.ebuild
@@ -1,9 +1,7 @@
 # Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="6"
-
-inherit eutils
+EAPI="8"
 
 DESCRIPTION="Host OS native assembler as and static linker ld"
 HOMEPAGE="https://prefix.gentoo.org/";

Reply via email to