diff options
Diffstat (limited to 'sys-libs/musl')
-rw-r--r-- | sys-libs/musl/Manifest | 13 | ||||
-rw-r--r-- | sys-libs/musl/files/ldconfig.in | 144 | ||||
-rw-r--r-- | sys-libs/musl/files/ldconfig.in-r1 | 155 | ||||
-rw-r--r-- | sys-libs/musl/musl-1.2.2-r3.ebuild | 151 | ||||
-rw-r--r-- | sys-libs/musl/musl-1.2.2-r4.ebuild | 167 | ||||
-rw-r--r-- | sys-libs/musl/musl-1.2.2-r6.ebuild | 167 | ||||
-rw-r--r-- | sys-libs/musl/musl-1.2.2-r7.ebuild | 2 | ||||
-rw-r--r-- | sys-libs/musl/musl-1.2.2-r8.ebuild | 2 | ||||
-rw-r--r-- | sys-libs/musl/musl-1.2.3.ebuild | 2 | ||||
-rw-r--r-- | sys-libs/musl/musl-9999.ebuild | 2 |
10 files changed, 8 insertions, 797 deletions
diff --git a/sys-libs/musl/Manifest b/sys-libs/musl/Manifest index b0c202750245..8352de4eb2b5 100644 --- a/sys-libs/musl/Manifest +++ b/sys-libs/musl/Manifest @@ -1,5 +1,3 @@ -AUX ldconfig.in 2552 BLAKE2B c94f9900e8582d707519171c4b61079c801b60c555677b1740b04adbdec9645578b9a8fc91f11413072568f316c795e46a332970f3d2dde5272b0c49a5d60a78 SHA512 59f1b57361196363d3f127366764f05d26c23dbe3d3dbcdba9bd3c8ca26a671fd713b96d31c509d22805c57ada2b596d979a3f5795bcf0a4d3ac7d168f3bf377 -AUX ldconfig.in-r1 2930 BLAKE2B a0b0d4715d9b4c83c4e7036d466dae854c2da1e2393a48cf1c05789a59426f6809118d5ac266a7eb558010c8c47d344b93c8c86847d9d0158d3885b6076e3bf6 SHA512 7e5b5e396965c7e677168f0974460565dd0302639835ca7b0fbf1198e911dc2818dd64424e0e217a710545cbeeb4c31877f05034f16737a822eb02520c258c4e AUX ldconfig.in-r2 2970 BLAKE2B a6b93ebbbe0caa07a1d32af07d810e1d95d47f2246573e77dfd14edba4403a9d90fd92a7428754c68036ffdbc7e82b926d95538f6617a76a247ab5c9a3c3ba1b SHA512 5b97f473ead0def43656b42511af77c427237e6c36f8d2afad8241ef4e948ed5f0a58dc9e65205c393b530ac810ee1e9f2db008534707283bca0fac2951fe4f9 AUX ldconfig.in-r3 3093 BLAKE2B 146374fe711c660a61e4a23f89ae066e78b8bca6884719c058981069ab92833d7f660b7bd78e7c8b86112944706823f0260d7c63f19d64960f27f44b4e95a6a3 SHA512 ba021cf7d52c001d6ef9a54a91de93240cd7eef9f7a6d7a48ae0c58f934aaea6796979ce80e1cfa9bdc6008023108f3c226440360f8e3134fc23f7fdac0e55b1 AUX musl-1.2.2-gethostid.patch 1028 BLAKE2B fbe554e681c8f0e4bff6ec6fe97c88fd3c7f84ac07580b5f6cfef13b6b27c985f4f0e1d7722f397c59e655b8cd864fa845f9af2aa0eaa9287349f41e71f7a257 SHA512 d2959ef272e3a2742efec3983a41705cfa6424110dbc1eb53a912492cf067881cdbcb8cd864757e6450dda9b47e0cca7dbe3a86d3e6e74e7f33fb7d1723edfde @@ -11,11 +9,8 @@ DIST musl-1.2.2.tar.gz.asc 490 BLAKE2B 8eb21bcfcbaf9d567c0a2bba468055d4ed86a9fb3 DIST musl-1.2.3.tar.gz 1058642 BLAKE2B b7f667eeb6b9f612c086cb44e69b34da4361b8cb76819fb65f10ef7dd55f48d2f37a32d698dcada965c7c76c3c1cd5621447c4240b6ab2e5b39b2d214e7e302b SHA512 9332f713d3eb7de4369bc0327d99252275ee52abf523ee34b894b24a387f67579787f7c72a46cf652e090cffdb0bc3719a4e7b84dca66890b6a37f12e8ad089c DIST musl-1.2.3.tar.gz.asc 490 BLAKE2B 4de3d2b2f4e748795b71e144df3ac073c68b0b1b5d40c7a4c3507cc3700c1f47a4ec745f644fa78d82de4cd1915b80be7ac1071fdfd6d468e01361c49ded065d SHA512 01a857dbc3981c90244d4d1d883efe51986652ca5734a741c9d1a4d06c5a22831e85520ac67212268b70c22049317a8f39b3219be182e7e67741add428ac5bc6 DIST musl-getent-93a08815f8598db442d8b766b463d0150ed8e2ab.c 11656 BLAKE2B 1b7bf7102a1eb91a8cb881ed8ca65eb8eed911dd50238e97dc2952d89d4c6ebed6bfd046a2b38776c550b2872ab54ced8cb452fcc2ad56e5616f722debda761f SHA512 7f5b9d934d82deb5f8b23e16169a5d9b99ccab3a4708df06a95d685e1b24a3a3e69b3dcf4942f2f66c12a3d4bf0c5827e2ee2e8c4d7b1997359fccc2ac212dee -EBUILD musl-1.2.2-r3.ebuild 3814 BLAKE2B 037af7d810ace77441369b4dc9a8513298167bbe7af7a010ad22f6ff7e99aba2cac0b6b8befd51f080fb3c695452ec7a3cecbdeb46cbfd06d2aef2415a96c28e SHA512 48cb68039a1cc61b230d2c9b549f01c40607ef2a0726589e558e412311f7e1ae988c7328f86b61b148ba88f2f107c72b2829ccd8ba16567a52a3840f2286d477 -EBUILD musl-1.2.2-r4.ebuild 4442 BLAKE2B 1cfdf66f7c975e164161cb90d98f20187c2d3ae0a24914206222c7255714a2cd10c4034a6b34018e3c79a2ec6385012c29f39d525ab83ab9b737a04453232e65 SHA512 340f60f7f73702510251a1df1af6a38af715678bad3606aab1e29c132bf5bb5805c39d916a1ff95c5e492a38b1d9a2ba3ae24560287d2fca647aa338eede2de7 -EBUILD musl-1.2.2-r6.ebuild 4457 BLAKE2B 9fde176fc9b78c29480eb8aa85a1b9decd777976c6c44ca298762fb1dd71ee8144a6dede69d82b69eebad48990b8da4522df2818370aac5dc8c7a1436172154c SHA512 fedb1929ffd0f6282c9103567b1f7813b4da523fdfe678cdce3792c8bdb2b866decccb57c4850eb92e6161894ad9409fb3b9b0fe477f8520cefecb3844bbc5b3 -EBUILD musl-1.2.2-r7.ebuild 4457 BLAKE2B 377ee3688dcd2d84bc6d3fc951e5cf158db7a90199a539ecabfc3a5e74294251903ee0097473ad778578bf9e4157e1339dd6955934f78e99b638049380b5cd92 SHA512 95c9be188d0bdb1a550d0b99b36075d67d989211a4890486a60b88becbe30f03cf45102d3e5172a38246c12c9878b90e145438f9f2cddc8a0e61e535935488ca -EBUILD musl-1.2.2-r8.ebuild 4770 BLAKE2B 9370f99e4dd0a9269787e2daa1749cb1d39b1d2833887d9b69909185f378e8ef5f04f436103e22e3d93b0c233634f479f7530735cdd01c21ac49807c78e59b22 SHA512 3cb5199c935725f56f8a4425114ab766514d61a9c37d5043fe9474e2bc8e5f2ab52a84c8ea0b229059227df8f0bb0e0700ea2b0f2810f4df7f1c461b6fdd5ed7 -EBUILD musl-1.2.3.ebuild 4771 BLAKE2B d6fd446c557bd0e5c776a45aecbca6ad7f290138ad7cc55c93e6beab24fbe01b6ba78294ad94a8f70bc8e72400b79fc292547da8c3c8b7637f25ef5367b1de18 SHA512 e9843b04a7b02d0bc1ed0dcc25d5fe20da15ba3d5165ea7603e187945a6a334a4201c11bfc0e5889723f427efad3910e75bc3ece7f993f292c225306a10d042c -EBUILD musl-9999.ebuild 4771 BLAKE2B d6fd446c557bd0e5c776a45aecbca6ad7f290138ad7cc55c93e6beab24fbe01b6ba78294ad94a8f70bc8e72400b79fc292547da8c3c8b7637f25ef5367b1de18 SHA512 e9843b04a7b02d0bc1ed0dcc25d5fe20da15ba3d5165ea7603e187945a6a334a4201c11bfc0e5889723f427efad3910e75bc3ece7f993f292c225306a10d042c +EBUILD musl-1.2.2-r7.ebuild 4453 BLAKE2B 83ec6285f4249b59c69527d09366a7d64a92b571f81a414867ec3693a6901b9bd8a3bb0f7bdfac176c02447836e5ad18dc5ee7a2baa89cc66848bfb8db26dab1 SHA512 ab2f45a6990f29df081136e2dd16da78e9b96a6382daab9743448537ec7039b86f9c720364aefacc82675751147d5cb568ac1e3320c08555202561dfda65b481 +EBUILD musl-1.2.2-r8.ebuild 4766 BLAKE2B 1e9150602dc0a85f6315f4a3590ab18ecb71eeb970dfa5eb586f4922923ca119a9096fdd72bb758cf7d66bcdf7e0df3b2f6d3278a254c452d82e76a4446db59f SHA512 a92051a1bfde9f45b593d4651927255a42f85af4f5271359b933eba46317c0edd5744b63e1c0b1f775c00008979e7473ea029895d1c11ec9a683a2f45a89e389 +EBUILD musl-1.2.3.ebuild 4767 BLAKE2B d4de42b424cf647216c05f629b2aa5958ddfbb9d03c70b7b41277d4879d3e13b8e3a740d1fa30c4ecc773f5084a35868b0e938877497864080bb5e6e3dcee12c SHA512 2bc3fe1994254d28219f32ce96be8ac1f26e8f837569f98ea6a3f414cd1eb07aae4dec41c796374c1e12a262e377129668d47e32351d6ada89aa0e263cba9dd7 +EBUILD musl-9999.ebuild 4767 BLAKE2B d4de42b424cf647216c05f629b2aa5958ddfbb9d03c70b7b41277d4879d3e13b8e3a740d1fa30c4ecc773f5084a35868b0e938877497864080bb5e6e3dcee12c SHA512 2bc3fe1994254d28219f32ce96be8ac1f26e8f837569f98ea6a3f414cd1eb07aae4dec41c796374c1e12a262e377129668d47e32351d6ada89aa0e263cba9dd7 MISC metadata.xml 559 BLAKE2B 8b1093a5278f716b8e21467b325e373a790f54c8ab71b92adc4c87dd569a92b20e08009372065f0f27ced39e3361c9e5e5a2e1bff271753d280439fabbddd3a4 SHA512 a35c13ea32ac8f26984bdb0d70d28a4285f34e32a2b0b17ad98fe3f357fb46c87a1e853377630d4da58fd5953de3fdeb02ee89181394e1815f5e0bbba4cd9f92 diff --git a/sys-libs/musl/files/ldconfig.in b/sys-libs/musl/files/ldconfig.in deleted file mode 100644 index 19c94d85353a..000000000000 --- a/sys-libs/musl/files/ldconfig.in +++ /dev/null @@ -1,144 +0,0 @@ -#!/bin/bash -e -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -ROOT="/" - -LDSO_CONF="/etc/ld.so.conf" -if [[ ! -e $LDSO_CONF ]]; then - echo "$LDSO_CONF not found" >&2 - exit 1 -fi - -LDSO_CONF_DIR=$(dirname $LDSO_CONF) - -VERBOSE=0 - -UPDATE_LINKS=1 - -get_options() { - while getopts "vnNXf:C:r:p" opt "$@"; do - case $opt in - v) - echo "ldconfig for musl in Gentoo" - VERBOSE=1 - ;; - r) - ROOT=$OPTARG - ;; - f) - LDSO_CONF=$OPTARG - ;; - X) - UPDATE_LINKS=0 - ;; - \?) - echo "Invalid option: -$opt" >&2 - exit 1 - ;; - n|N|C|p) - echo "Unimplemented option: -$opt" >&2 - exit 1 - ;; - esac - done - - if [[ $UPDATE_LINKS == 1 ]]; then - echo "Updating links is not implemented." - fi -} - - -repeated() { - local l=$1 - local drs="${@:2}" - for m in $drs; do - [[ $m == $l ]] && return 0 - done - return 1 -} - -expand() { - # We are assuming the ld.so.conf's 'include' is not recursive - local f line l - local glob="$LDSO_CONF_DIR/$1" - local drs="${@:2} " - - for f in $glob; do - [[ ! -f $f ]] && continue - while read line; do - line=${line%%#*} - line=${line//:/ } - line=${line//,/ } - for l in $line; do - #We must add this whether or not the directory exists - repeated $l $drs && continue - drs+=" $l " - done - done < $f - done - - echo $drs -} - -read_ldso_conf() { - local drs=" " - - while read line; do - # Sanitize the line - see ldconfig(8) for delimiters - # Note: bash read turns tabs into spaces and read already - # delimits on newlines with the default $IFS - line=${line%%#*} # Remove comments - line=${line//:/ } # Change colon delimiter to space - line=${line//,/ } # Change comma delimiter to space - - next=0 - for l in $line; do - if [[ $next == 1 ]]; then - next=0 - drs=$(expand $l $drs) - elif [[ $l == "include" ]]; then - next=1 - else - # glibc's ldconfig silently skips non directories - if [[ -d $l ]]; then - repeated $l $drs && continue - drs+=" $l " - fi - fi - done - done < $1 - - echo $drs -} - -sanitize() { - local drs=$@ - - repeated "/lib" $drs || drs="/lib $drs" - repeated "/usr/lib" $drs || drs="/usr/lib $drs" - - echo $drs -} - -get_options "$@" -drs=$(read_ldso_conf "$LDSO_CONF") -drs=$(sanitize $drs) - -ARCH=@@ARCH@@ -LDSO_PATH="/lib/ld-musl-${ARCH}.so.1" -if [[ ! -e $LDSO_PATH ]]; then - echo "$LDSO_PATH not found" >&2 - exit 1 -fi - -LDSO_ARCH=$(basename $LDSO_PATH) -LDSO_NAME=${LDSO_ARCH%.so.1} -ETC_LDSO_PATH=/etc/${LDSO_NAME}.path - -X=$(mktemp -p /tmp ${LDSO_NAME}.XXXXXX) -for d in $drs; do - echo $d >> $X -done -chmod 644 $X -mv $X $ETC_LDSO_PATH diff --git a/sys-libs/musl/files/ldconfig.in-r1 b/sys-libs/musl/files/ldconfig.in-r1 deleted file mode 100644 index 7bf254dfd91c..000000000000 --- a/sys-libs/musl/files/ldconfig.in-r1 +++ /dev/null @@ -1,155 +0,0 @@ -#!/bin/bash -e -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -ROOT="/" -LDSO_CONF="/etc/ld.so.conf" - -VERBOSE=0 - -UPDATE_LINKS=1 - -get_options() { - while getopts "vnNXf:C:r:p" opt "$@"; do - case $opt in - v) - echo "ldconfig for musl in Gentoo" - VERBOSE=1 - ;; - r) - ROOT=${OPTARG} - LDSO_CONF=${ROOT}${LDSO_CONF} - LDSO_CONF_DIR=$(dirname ${LDSO_CONF}) - ;; - f) - LDSO_CONF=${OPTARG} - ;; - X) - UPDATE_LINKS=0 - ;; - \?) - echo "Invalid option: -${opt}" >&2 - exit 1 - ;; - n|N|C|p) - echo "Unimplemented option: -${opt}" >&2 - exit 1 - ;; - esac - done - - if [[ ${UPDATE_LINKS} == 1 ]]; then - echo "Updating links is not implemented." - fi -} - - -repeated() { - local l=${1} - local drs="${@:2}" - for m in ${drs}; do - [[ ${m} == ${l} ]] && return 0 - done - return 1 -} - -expand() { - # We are assuming the ld.so.conf's 'include' is not recursive - local f line l - local glob="${LDSO_CONF_DIR}/${1}" - local drs="${@:2} " - - for f in ${glob}; do - [[ ! -f ${f} ]] && continue - while read line; do - line=${line%%#*} - line=${line//:/ } - line=${line//,/ } - for l in ${line}; do - # We must add this whether or not the directory exists - repeated ${l} ${drs} && continue - drs+=" ${l} " - done - done < ${f} - done - - echo ${drs} -} - -read_ldso_conf() { - local drs=" " - - while read line; do - # Sanitize the line - see ldconfig(8) for delimiters - # Note: bash read turns tabs into spaces and read already - # delimits on newlines with the default $IFS - line=${line%%#*} # Remove comments - line=${line//:/ } # Change colon delimiter to space - line=${line//,/ } # Change comma delimiter to space - - next=0 - for l in ${line}; do - if [[ ${next} == 1 ]]; then - next=0 - drs=$(expand ${l} ${drs}) - elif [[ ${l} == "include" ]]; then - next=1 - else - # glibc's ldconfig silently skips non directories - if [[ -d ${l} ]]; then - repeated ${l} ${drs} && continue - drs+=" ${l} " - fi - fi - done - done < ${1} - - echo ${drs} -} - -sanitize() { - local drs=$@ - - repeated "/lib" ${drs} || drs="/lib ${drs}" - repeated "/usr/lib" ${drs} || drs="/usr/lib ${drs}" - - echo ${drs} -} - -changed() { - [[ -f ${ETC_LDSO_PATH} ]] || return 0 - local current=$(<${ETC_LDSO_PATH}) - current=${current//$'\n'/ } - [[ ${current} != ${drs} ]] || return 1 -} - -get_options "$@" - -if [[ ! -e ${LDSO_CONF} ]]; then - echo "${LDSO_CONF} not found" >&2 - exit 1 -fi - -LDSO_CONF_DIR=$(dirname ${LDSO_CONF}) - -drs=$(read_ldso_conf "${LDSO_CONF}") -drs=$(sanitize ${drs}) - -ARCH=@@ARCH@@ -LDSO_PATH="${ROOT}/lib/ld-musl-${ARCH}.so.1" -if [[ ! -e ${LDSO_PATH} ]]; then - echo "${LDSO_PATH} not found" >&2 - exit 1 -fi - -LDSO_ARCH=$(basename ${LDSO_PATH}) -LDSO_NAME=${LDSO_ARCH%.so.1} -ETC_LDSO_PATH="${ROOT}/etc/${LDSO_NAME}.path" - -changed || exit 0 -X=$(mktemp -p /tmp ${LDSO_NAME}.XXXXXX) -for d in ${drs}; do - echo ${d} >> ${X} -done -chmod 644 ${X} -mv ${X} ${ETC_LDSO_PATH} diff --git a/sys-libs/musl/musl-1.2.2-r3.ebuild b/sys-libs/musl/musl-1.2.2-r3.ebuild deleted file mode 100644 index 5d2851eac250..000000000000 --- a/sys-libs/musl/musl-1.2.2-r3.ebuild +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic toolchain-funcs -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="git://git.musl-libc.org/musl" - inherit git-r3 -else - SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz" - KEYWORDS="-* amd64 arm arm64 ~mips ppc ppc64 x86" -fi -GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab" -GETENT_FILE="musl-getent-${GETENT_COMMIT}.c" -SRC_URI+=" - https://dev.gentoo.org/~blueness/musl-misc/getconf.c - https://gitlab.alpinelinux.org/alpine/aports/-/raw/${GETENT_COMMIT}/main/musl/getent.c -> ${GETENT_FILE} - https://dev.gentoo.org/~blueness/musl-misc/iconv.c -" - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety" -HOMEPAGE="https://musl.libc.org" -LICENSE="MIT LGPL-2 GPL-2" -SLOT="0" -IUSE="headers-only" - -QA_SONAME="/usr/lib/libc.so" -QA_DT_NEEDED="/usr/lib/libc.so" - -is_crosscompile() { - [[ ${CHOST} != ${CTARGET} ]] -} - -just_headers() { - use headers-only && is_crosscompile -} - -pkg_setup() { - if [ ${CTARGET} == ${CHOST} ] ; then - case ${CHOST} in - *-musl*) ;; - *) die "Use sys-devel/crossdev to build a musl toolchain" ;; - esac - fi - - # fix for #667126, copied from glibc ebuild - # make sure host make.conf doesn't pollute us - if is_crosscompile || tc-is-cross-compiler ; then - CHOST=${CTARGET} strip-unsupported-flags - fi -} - -src_unpack() { - if [[ ${PV} == 9999 ]]; then - git-r3_src_unpack - else - unpack "${P}.tar.gz" - fi - mkdir misc || die - cp "${DISTDIR}"/getconf.c misc/getconf.c || die - cp "${DISTDIR}/${GETENT_FILE}" misc/getent.c || die - cp "${DISTDIR}"/iconv.c misc/iconv.c || die -} - -src_prepare() { - default - - # Expand gethostid instead of being just a stub - eapply "${FILESDIR}/${PN}-1.2.2-gethostid.patch" -} - -src_configure() { - tc-getCC ${CTARGET} - just_headers && export CC=true - - local sysroot - is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET} - ./configure \ - --target=${CTARGET} \ - --prefix=${sysroot}/usr \ - --syslibdir=${sysroot}/lib \ - --disable-gcc-wrapper || die -} - -src_compile() { - emake obj/include/bits/alltypes.h - just_headers && return 0 - - emake - if [[ ${CATEGORY} != cross-* ]] ; then - emake -C "${T}" getconf getent iconv \ - CC="$(tc-getCC)" \ - CFLAGS="${CFLAGS}" \ - CPPFLAGS="${CPPFLAGS}" \ - LDFLAGS="${LDFLAGS}" \ - VPATH="${WORKDIR}/misc" - fi - - $(tc-getCC) ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die - $(tc-getAR) -rcs libssp_nonshared.a libssp_nonshared.o || die -} - -src_install() { - local target="install" - just_headers && target="install-headers" - emake DESTDIR="${D}" ${target} - just_headers && return 0 - - # musl provides ldd via a sym link to its ld.so - local sysroot - is_crosscompile && sysroot=/usr/${CTARGET} - local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*) - dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd - - if [[ ${CATEGORY} != cross-* ]] ; then - # Fish out of config: - # ARCH = ... - # SUBARCH = ... - # and print $(ARCH)$(SUBARCH). - local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak) - [[ -e "${D}"/lib/ld-musl-${arch}.so.1 ]] || die - cp "${FILESDIR}"/ldconfig.in "${T}" || die - sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die - into / - dosbin "${T}"/ldconfig - into /usr - dobin "${T}"/getconf - dobin "${T}"/getent - dobin "${T}"/iconv - echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die - doenvd "${T}"/00musl - dolib.a libssp_nonshared.a - fi -} - -pkg_postinst() { - is_crosscompile && return 0 - - [ "${ROOT}" != "/" ] && return 0 - - ldconfig || die -} diff --git a/sys-libs/musl/musl-1.2.2-r4.ebuild b/sys-libs/musl/musl-1.2.2-r4.ebuild deleted file mode 100644 index 868577f61ad2..000000000000 --- a/sys-libs/musl/musl-1.2.2-r4.ebuild +++ /dev/null @@ -1,167 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit eapi8-dosym flag-o-matic toolchain-funcs -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="git://git.musl-libc.org/musl" - inherit git-r3 -else - SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz" - KEYWORDS="-* amd64 arm arm64 ~mips ppc ppc64 x86" -fi -GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab" -GETENT_FILE="musl-getent-${GETENT_COMMIT}.c" -SRC_URI+=" - https://dev.gentoo.org/~blueness/musl-misc/getconf.c - https://gitlab.alpinelinux.org/alpine/aports/-/raw/${GETENT_COMMIT}/main/musl/getent.c -> ${GETENT_FILE} - https://dev.gentoo.org/~blueness/musl-misc/iconv.c -" - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety" -HOMEPAGE="https://musl.libc.org" -LICENSE="MIT LGPL-2 GPL-2" -SLOT="0" -IUSE="headers-only" - -QA_SONAME="/usr/lib/libc.so" -QA_DT_NEEDED="/usr/lib/libc.so" - -is_crosscompile() { - [[ ${CHOST} != ${CTARGET} ]] -} - -just_headers() { - use headers-only && is_crosscompile -} - -pkg_setup() { - if [ ${CTARGET} == ${CHOST} ] ; then - case ${CHOST} in - *-musl*) ;; - *) die "Use sys-devel/crossdev to build a musl toolchain" ;; - esac - fi - - # fix for #667126, copied from glibc ebuild - # make sure host make.conf doesn't pollute us - if is_crosscompile || tc-is-cross-compiler ; then - CHOST=${CTARGET} strip-unsupported-flags - fi -} - -src_unpack() { - if [[ ${PV} == 9999 ]]; then - git-r3_src_unpack - else - unpack "${P}.tar.gz" - fi - mkdir misc || die - cp "${DISTDIR}"/getconf.c misc/getconf.c || die - cp "${DISTDIR}/${GETENT_FILE}" misc/getent.c || die - cp "${DISTDIR}"/iconv.c misc/iconv.c || die -} - -src_prepare() { - default - - # Expand gethostid instead of being just a stub - eapply "${FILESDIR}/${PN}-1.2.2-gethostid.patch" -} - -src_configure() { - tc-getCC ${CTARGET} - just_headers && export CC=true - - local sysroot - is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET} - ./configure \ - --target=${CTARGET} \ - --prefix=${sysroot}/usr \ - --syslibdir=${sysroot}/lib \ - --disable-gcc-wrapper || die -} - -src_compile() { - emake obj/include/bits/alltypes.h - just_headers && return 0 - - emake - if [[ ${CATEGORY} != cross-* ]] ; then - emake -C "${T}" getconf getent iconv \ - CC="$(tc-getCC)" \ - CFLAGS="${CFLAGS}" \ - CPPFLAGS="${CPPFLAGS}" \ - LDFLAGS="${LDFLAGS}" \ - VPATH="${WORKDIR}/misc" - fi - - $(tc-getCC) ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die - $(tc-getAR) -rcs libssp_nonshared.a libssp_nonshared.o || die -} - -src_install() { - local target="install" - just_headers && target="install-headers" - emake DESTDIR="${D}" ${target} - just_headers && return 0 - - # musl provides ldd via a sym link to its ld.so - local sysroot - is_crosscompile && sysroot=/usr/${CTARGET} - local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*) - dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd - - if [[ ${CATEGORY} != cross-* ]] ; then - # Fish out of config: - # ARCH = ... - # SUBARCH = ... - # and print $(ARCH)$(SUBARCH). - local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak) - - if [[ ! -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] ; then - # During cross (using crossdev), when emerging sys-libs/musl, - # if /usr/lib/libc.so.1 doesn't exist on the system, installation - # would fail. - # - # The musl build system seems to create a symlink: - # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute) - # During cross, there's no guarantee that the host is using musl - # so that file may not exist. Use a relative symlink within ${D} - # instead. - dosym8 -r /usr/lib/libc.so /lib/ld-musl-${arch}.so.1 - - # If it's still a dead symlnk, OK, we really do need to abort. - [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die - fi - - cp "${FILESDIR}"/ldconfig.in "${T}" || die - sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die - into / - dosbin "${T}"/ldconfig - into /usr - dobin "${T}"/getconf - dobin "${T}"/getent - dobin "${T}"/iconv - echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die - doenvd "${T}"/00musl - dolib.a libssp_nonshared.a - fi -} - -pkg_postinst() { - is_crosscompile && return 0 - - [ "${ROOT}" != "/" ] && return 0 - - ldconfig || die -} diff --git a/sys-libs/musl/musl-1.2.2-r6.ebuild b/sys-libs/musl/musl-1.2.2-r6.ebuild deleted file mode 100644 index 79a60682c79f..000000000000 --- a/sys-libs/musl/musl-1.2.2-r6.ebuild +++ /dev/null @@ -1,167 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit eapi8-dosym flag-o-matic toolchain-funcs -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="git://git.musl-libc.org/musl" - inherit git-r3 -else - SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz" - KEYWORDS="-* amd64 arm arm64 ~mips ppc ppc64 x86" -fi -GETENT_COMMIT="93a08815f8598db442d8b766b463d0150ed8e2ab" -GETENT_FILE="musl-getent-${GETENT_COMMIT}.c" -SRC_URI+=" - https://dev.gentoo.org/~blueness/musl-misc/getconf.c - https://gitlab.alpinelinux.org/alpine/aports/-/raw/${GETENT_COMMIT}/main/musl/getent.c -> ${GETENT_FILE} - https://dev.gentoo.org/~blueness/musl-misc/iconv.c -" - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety" -HOMEPAGE="https://musl.libc.org" -LICENSE="MIT LGPL-2 GPL-2" -SLOT="0" -IUSE="headers-only" - -QA_SONAME="/usr/lib/libc.so" -QA_DT_NEEDED="/usr/lib/libc.so" - -is_crosscompile() { - [[ ${CHOST} != ${CTARGET} ]] -} - -just_headers() { - use headers-only && is_crosscompile -} - -pkg_setup() { - if [ ${CTARGET} == ${CHOST} ] ; then - case ${CHOST} in - *-musl*) ;; - *) die "Use sys-devel/crossdev to build a musl toolchain" ;; - esac - fi - - # fix for #667126, copied from glibc ebuild - # make sure host make.conf doesn't pollute us - if is_crosscompile || tc-is-cross-compiler ; then - CHOST=${CTARGET} strip-unsupported-flags - fi -} - -src_unpack() { - if [[ ${PV} == 9999 ]]; then - git-r3_src_unpack - else - unpack "${P}.tar.gz" - fi - mkdir misc || die - cp "${DISTDIR}"/getconf.c misc/getconf.c || die - cp "${DISTDIR}/${GETENT_FILE}" misc/getent.c || die - cp "${DISTDIR}"/iconv.c misc/iconv.c || die -} - -src_prepare() { - default - - # Expand gethostid instead of being just a stub - eapply "${FILESDIR}/${PN}-1.2.2-gethostid.patch" -} - -src_configure() { - tc-getCC ${CTARGET} - just_headers && export CC=true - - local sysroot - is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET} - ./configure \ - --target=${CTARGET} \ - --prefix=${sysroot}/usr \ - --syslibdir=${sysroot}/lib \ - --disable-gcc-wrapper || die -} - -src_compile() { - emake obj/include/bits/alltypes.h - just_headers && return 0 - - emake - if [[ ${CATEGORY} != cross-* ]] ; then - emake -C "${T}" getconf getent iconv \ - CC="$(tc-getCC)" \ - CFLAGS="${CFLAGS}" \ - CPPFLAGS="${CPPFLAGS}" \ - LDFLAGS="${LDFLAGS}" \ - VPATH="${WORKDIR}/misc" - fi - - $(tc-getCC) ${CFLAGS} -c -o libssp_nonshared.o "${FILESDIR}"/stack_chk_fail_local.c || die - $(tc-getAR) -rcs libssp_nonshared.a libssp_nonshared.o || die -} - -src_install() { - local target="install" - just_headers && target="install-headers" - emake DESTDIR="${D}" ${target} - just_headers && return 0 - - # musl provides ldd via a sym link to its ld.so - local sysroot - is_crosscompile && sysroot=/usr/${CTARGET} - local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*) - dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd - - if [[ ${CATEGORY} != cross-* ]] ; then - # Fish out of config: - # ARCH = ... - # SUBARCH = ... - # and print $(ARCH)$(SUBARCH). - local arch=$(awk '{ k[$1] = $3 } END { printf("%s%s", k["ARCH"], k["SUBARCH"]); }' config.mak) - - if [[ ! -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] ; then - # During cross (using crossdev), when emerging sys-libs/musl, - # if /usr/lib/libc.so.1 doesn't exist on the system, installation - # would fail. - # - # The musl build system seems to create a symlink: - # ${D}/lib/ld-musl-${arch}.so.1 -> /usr/lib/libc.so.1 (absolute) - # During cross, there's no guarantee that the host is using musl - # so that file may not exist. Use a relative symlink within ${D} - # instead. - dosym8 -r /usr/lib/libc.so /lib/ld-musl-${arch}.so.1 - - # If it's still a dead symlnk, OK, we really do need to abort. - [[ -e "${ED}"/lib/ld-musl-${arch}.so.1 ]] || die - fi - - cp "${FILESDIR}"/ldconfig.in-r1 "${T}"/ldconfig.in || die - sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die - into / - dosbin "${T}"/ldconfig - into /usr - dobin "${T}"/getconf - dobin "${T}"/getent - dobin "${T}"/iconv - echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die - doenvd "${T}"/00musl - dolib.a libssp_nonshared.a - fi -} - -pkg_postinst() { - is_crosscompile && return 0 - - [ "${ROOT}" != "/" ] && return 0 - - ldconfig || die -} diff --git a/sys-libs/musl/musl-1.2.2-r7.ebuild b/sys-libs/musl/musl-1.2.2-r7.ebuild index e03ad57480ff..de91db9af87b 100644 --- a/sys-libs/musl/musl-1.2.2-r7.ebuild +++ b/sys-libs/musl/musl-1.2.2-r7.ebuild @@ -161,7 +161,7 @@ src_install() { pkg_postinst() { is_crosscompile && return 0 - [ "${ROOT}" != "/" ] && return 0 + [ -n "${ROOT}" ] && return 0 ldconfig || die } diff --git a/sys-libs/musl/musl-1.2.2-r8.ebuild b/sys-libs/musl/musl-1.2.2-r8.ebuild index c83d3cbb6c04..ee20a7659de3 100644 --- a/sys-libs/musl/musl-1.2.2-r8.ebuild +++ b/sys-libs/musl/musl-1.2.2-r8.ebuild @@ -167,7 +167,7 @@ src_install() { pkg_postinst() { is_crosscompile && return 0 - [ "${ROOT}" != "/" ] && return 0 + [ -n "${ROOT}" ] && return 0 ldconfig || die } diff --git a/sys-libs/musl/musl-1.2.3.ebuild b/sys-libs/musl/musl-1.2.3.ebuild index 26ac4bb3ec3b..07ab1388cef8 100644 --- a/sys-libs/musl/musl-1.2.3.ebuild +++ b/sys-libs/musl/musl-1.2.3.ebuild @@ -167,7 +167,7 @@ src_install() { pkg_postinst() { is_crosscompile && return 0 - [ "${ROOT}" != "/" ] && return 0 + [ -n "${ROOT}" ] && return 0 ldconfig || die } diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild index 26ac4bb3ec3b..07ab1388cef8 100644 --- a/sys-libs/musl/musl-9999.ebuild +++ b/sys-libs/musl/musl-9999.ebuild @@ -167,7 +167,7 @@ src_install() { pkg_postinst() { is_crosscompile && return 0 - [ "${ROOT}" != "/" ] && return 0 + [ -n "${ROOT}" ] && return 0 ldconfig || die } |