summaryrefslogtreecommitdiff
path: root/sys-libs/uclibc-ng
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-01 03:04:39 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-01 03:04:39 +0000
commit407525b571b48cfd65e1ad7a02d250a927c967c9 (patch)
tree844bea44d85dc7218f54970af1c42cc9d55c3f1a /sys-libs/uclibc-ng
parent89c6c06b8c42107dd231687a1012354e7d3039fc (diff)
gentoo resync : 01.12.2017
Diffstat (limited to 'sys-libs/uclibc-ng')
-rw-r--r--sys-libs/uclibc-ng/Manifest13
-rw-r--r--sys-libs/uclibc-ng/uclibc-ng-1.0.19.ebuild408
-rw-r--r--sys-libs/uclibc-ng/uclibc-ng-1.0.22.ebuild411
-rw-r--r--sys-libs/uclibc-ng/uclibc-ng-1.0.23.ebuild411
-rw-r--r--sys-libs/uclibc-ng/uclibc-ng-1.0.24-r1.ebuild412
-rw-r--r--sys-libs/uclibc-ng/uclibc-ng-1.0.24.ebuild411
-rw-r--r--sys-libs/uclibc-ng/uclibc-ng-1.0.27.ebuild (renamed from sys-libs/uclibc-ng/uclibc-ng-1.0.20.ebuild)2
7 files changed, 3 insertions, 2065 deletions
diff --git a/sys-libs/uclibc-ng/Manifest b/sys-libs/uclibc-ng/Manifest
index 659841ef6ed7..33895a626687 100644
--- a/sys-libs/uclibc-ng/Manifest
+++ b/sys-libs/uclibc-ng/Manifest
@@ -1,19 +1,10 @@
AUX uclibc-compat-r1.patch 814 BLAKE2B 75fe9c5321171f3e378200e1c4d11792b3ea047fb4e62460cfd03db1fc761a7e711565ba97afd507a5996d3adbe83e08152a28464310098599867bcc642c1c53 SHA512 35eedbf33282285ae362a6e1b71f91a19ded8b18792f706b3d7e9c68221a61db238d84772a793cf086001272eda1b227043b90e8ef31c27796ffe837ccad11d0
AUX uclibc-ng-update-reboot_h.patch 1254 BLAKE2B 48b75fb4312a093fcb1c2eca4a12cea043dcb2874296d2238530268546571495f6954e8aca1f4217381f1d91146bb8e2fc0aaa253136b1b92c0803784464728f SHA512 605cabbbe19c3b2c442d7629c5adc340dd8899ca484b3d495d719a2fab68ef881973043c663211a61fba167ff0bdaa12f8534545da8e3049ab27ab1439477964
-DIST uClibc-ng-1.0.19.tar.bz2 2748768 SHA256 139c495d8f71ec31da97e0330b056302ff40f0acba66988fcd737cfb4eb445ed SHA512 d385eca25c4a356b01b6d7acaef63daeeb172769d6306525fb95f62e818aca354cf04fae15af65bc346f19dcfdc601f87e52a8dc95f528d7392648d1b056fe63 WHIRLPOOL 1cc6b64df85df5f9e8c15c9cad3ed5641add20f402657a7d9c6283527ba7feac3c90ce293f2b15578c6d816c19018467336e50cd469a46482c2e4168f2addaf5
-DIST uClibc-ng-1.0.20.tar.bz2 2414313 SHA256 0d0ee9d4df82958f65088f446ffd7548d88deb1f1b949f9ec3e673decb910597 SHA512 c0d4fc442f087d9bf994a7b84fa12cfae96f2980061cbb39b1c2cf243692d44fcab79d4a686ac5a7889b9081682aa13d013da0ad99cb30ad2b7150bdb19de0de WHIRLPOOL 16035dd540629aa453e023b6ea96eab5e577579e7bb940ed3411107ffd12bc78148e7a14222184207ae40633d30871d9e583c3456a04cc28b96dfd40b287e713
-DIST uClibc-ng-1.0.22.tar.bz2 2435181 SHA256 430bebc26545022c5c3e9cebd4ee682db0053b94235e0be5df7eeab7ff19a9e0 SHA512 d29a14813f6b795fbd380a9593742f696cd32ec8fd22001ce092382ca0059357bc921b8eac7d0a6ae2a9cab724b0ddd15f9959ec789b4824a5db820cbd00b6e7 WHIRLPOOL 14336e9e159585472a9a01cb69acc0cb59d8df89769e532c4deec4c1a6a0056d8ff091904163ad9ab29c2c5107fe57f3241c8d4e898fe831f21b1a8e685aaec1
-DIST uClibc-ng-1.0.23.tar.bz2 2350186 SHA256 3eeb53a2aa5a32f455fb9d197f7b598f2ff46bbf35d72073f5e554e70c17c782 SHA512 eca892a0773cfbabaf5037347b1969706c040c903c93c612d2e0aca8d66b51d6d1cb7f3811a688898bc7e25ca235cc14b6bbd741c51dc135300a0e1408c6d1c3 WHIRLPOOL 1fb96469fb7860c05660fae7e58e9c60704cd76ad163a4c46e402e98ada35041a2069f6573498cf596a754044c08f30b4e3fd8fcba2d92c48ee7a7af9376af79
-DIST uClibc-ng-1.0.24.tar.bz2 2299126 SHA256 d7a3ddc0af8f750abd74e2f677664faafd491f40b62ae0676957e411ca203782 SHA512 4d25035f2355a2b5549fa89cdd7754fc20c6a5a1001a06a81ee47de18855db368e412eb10e38dcbe2e364d3108cefe50029379a3e222972ceced3b693f4ffcc4 WHIRLPOOL 05932258636f041ee12ca2aeec332098e4f61fff92f055a30d024fe7cc953014b93b0ba231cdca2bc0a600e526155734266a71f2f95135dfa305b984f2f2bcd5
DIST uClibc-ng-1.0.25.tar.bz2 2234505 SHA256 e20d4a2c78cd76554747e58f35220301afb0fb600ed18f8c9096c98179120a8b SHA512 3bc5e3f0626a529a688e56649b34c48d0ddf733c09279c84fad0954880aa7c0ec3440664811196d11bbc3f05cbea99f3ba47efaad7f315a55ba3d8d587d3b313 WHIRLPOOL f422d05e1d9aa6ae0ecfc0b7808dd115614877d5a602effdc815123e61808b43558c9a9a530ef4ef918bbd5793bb77eb690660f563bc1f97120cc2a3c0b3650b
DIST uClibc-ng-1.0.26.tar.bz2 2285709 SHA256 899e2ae37ba9266d20fc2bf290cece484455555b284140b6442c24a24cddb909 SHA512 48c37ab2000af13848ef007ce89f226bded5188f37839c11371bab48497670d30d39fda2a031c6aff95f429a4abadc431ddd77c0e023810a341e2c2d2645f71b WHIRLPOOL 32527dde77f30d1394271978e311fdc6ed69ef47b65d00f19efdf37b700a2dca4e6fc5b126c4cfa05321baf2a47fa1335d8d1843991e78eb1d44f4bfe032f818
-EBUILD uclibc-ng-1.0.19.ebuild 10508 BLAKE2B d41bfe9613aa44638014f7b41c871faa6545b30871611660bf9632d2002d0b6ba4684b711355f0854cfdad0787ab56be299577bfad419538f55ea4db078ec162 SHA512 5fd93b8bb7eb4ccab058b67934481a2a7de2b8cec4a46f404b50bd572f4a5318a85cbd1799f662a27528c2131db7207d6268c3fc4bda6a58e34822ab43966b8c
-EBUILD uclibc-ng-1.0.20.ebuild 10564 BLAKE2B 975ecd8e3e5365fa9868448ebfe3d0914f4f9fdf7e2b6e19b70fbfd2b612c282242116782f465e44790e276c5c90dc08a6bfc869d2d8d5a0a03beaf423217f98 SHA512 ec54d3cf80a5a8ed9349ce7a180e64bd78fe52d76fa86d77652080f784fab8507904a2f7a05e8d5139aa003f2f5dfadca9400e2f79ec1957fadc67acf1446016
-EBUILD uclibc-ng-1.0.22.ebuild 10606 BLAKE2B 44781fb1d645046c3563b177bce3f2422a801f822d3051e9e80e6d07cfa834e9f59ffbcfdf8f09a4427d018dd67f4cdbfe5e38b5fcf53423bed7d7471fde7490 SHA512 cd2a8b16097a17769eedccb64c093837b24949c22bbe946f16b981ab1ff83ac99c20cf783840f67526aa63252cc52f4ec8b2a4819df0e876d1c047bdccd36c9e
-EBUILD uclibc-ng-1.0.23.ebuild 10608 BLAKE2B 0c76d08595425f856d03186802ece7d6e7924c5fc360f5abb49d35f03c17df41dce63f4853d7c7e0af4043299addc2d6e1f1e1008c3d20d60da41b8d1dc90001 SHA512 f4f6590534f3a66efe3b57ea0e7d9fb9c89caea5bef51d69597094059f66467b7d70d1aed0829a7d948e8d4dce1895d25efa33c8495a93619fbb637ba2ee800e
-EBUILD uclibc-ng-1.0.24-r1.ebuild 10656 BLAKE2B 5bd7d3209efa2d89f063ceb9246e72148866cee3fce5de0a7881a1ee3619e24dc08604189134dac5a505ad4457f371a68317e9f1a9c0a69335e03a552ac4785c SHA512 a12884773b033251dcc8b77606aa7579a649152a94e48e246cce4480a5d7d2a1f48e28cd0cff3b43661b1226b252964233dc41b6d771ac6c346eb61f44f01645
-EBUILD uclibc-ng-1.0.24.ebuild 10606 BLAKE2B 44781fb1d645046c3563b177bce3f2422a801f822d3051e9e80e6d07cfa834e9f59ffbcfdf8f09a4427d018dd67f4cdbfe5e38b5fcf53423bed7d7471fde7490 SHA512 cd2a8b16097a17769eedccb64c093837b24949c22bbe946f16b981ab1ff83ac99c20cf783840f67526aa63252cc52f4ec8b2a4819df0e876d1c047bdccd36c9e
+DIST uClibc-ng-1.0.27.tar.bz2 2306274 BLAKE2B 64ad0634ca548960ad3ff003d98981853b0658cad75fcf3b7391b5b965656dc15daa06ae312ca34672caa47a2a3e33fbe6291c94df10547eef5dc395c2cbd0cc SHA512 bf8f56f75465f7b793e0356df495a00a41ed2478ea90e8d686e8591dcb1bb75be27fadedd8adf2494f5053ceefa4b0ba2223758efa2a920ea0f55bf104e433a2
EBUILD uclibc-ng-1.0.25.ebuild 10564 BLAKE2B 975ecd8e3e5365fa9868448ebfe3d0914f4f9fdf7e2b6e19b70fbfd2b612c282242116782f465e44790e276c5c90dc08a6bfc869d2d8d5a0a03beaf423217f98 SHA512 ec54d3cf80a5a8ed9349ce7a180e64bd78fe52d76fa86d77652080f784fab8507904a2f7a05e8d5139aa003f2f5dfadca9400e2f79ec1957fadc67acf1446016
EBUILD uclibc-ng-1.0.26.ebuild 10564 BLAKE2B 975ecd8e3e5365fa9868448ebfe3d0914f4f9fdf7e2b6e19b70fbfd2b612c282242116782f465e44790e276c5c90dc08a6bfc869d2d8d5a0a03beaf423217f98 SHA512 ec54d3cf80a5a8ed9349ce7a180e64bd78fe52d76fa86d77652080f784fab8507904a2f7a05e8d5139aa003f2f5dfadca9400e2f79ec1957fadc67acf1446016
+EBUILD uclibc-ng-1.0.27.ebuild 10568 BLAKE2B 1b3cf3038036a04aaaadd9826aaf1656f41e3a654a2c9148001e8a86dbf024a2e61df16536489857380fae20f0db25cbf36c3b97d023908bec5df1327b3cb1b5 SHA512 0dd24ced837a0190a10c92fe512398ad4166d79db995e5e46e827d3f40e89798817aad6dbae0f03b2f392b636140c0701012ca6ab5fd16f58adef44cad79f34f
EBUILD uclibc-ng-9999.ebuild 10568 BLAKE2B 3a0756acc5dd8431d1f0eef6ccd70331979aeeb1bff787121811c0d4a2888a521439d5fe11d6134202ab2f889fce1b13439663a6c463b9b00f5243f404f4d72c SHA512 a37488a645cd5f69f4dff6cf98533775bedf81cac1630eb4c0818ff2065a2286182a55e2473defff0c6b65d23038ede8914bd2ce62431644bda6c60d955b8eab
MISC metadata.xml 877 BLAKE2B 191277020e32edd39fc3a1594aaf3fad65ca7b48a2f0df3f0e381d3c7cc5451c09f9ad87a6da9e75b146c2ebe209918d699519582fc64fb8c3b7ae2e51eaf507 SHA512 3988e346916b283836e5c3d094eec4f25c66763e4e10a6413fe97f98629e1f14b67d6013f13f9ca2e2712dd638567973c02e6ebcce3554c55caf5483c3c9dfd4
diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.19.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.19.ebuild
deleted file mode 100644
index 9069233fee33..000000000000
--- a/sys-libs/uclibc-ng/uclibc-ng-1.0.19.ebuild
+++ /dev/null
@@ -1,408 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit flag-o-matic multilib savedconfig toolchain-funcs versionator
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng"
- inherit git-r3
- MY_P=uclibc-ng-${PV}
-else
- MY_P=uClibc-ng-${PV}
-fi
-
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc-ng.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER=""
- SRC_URI="http://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2"
- KEYWORDS="-* amd64 arm ~mips ppc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 rpc crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage
-# will delete the ld.so sym link prematurely and break the system. So we
-# will hard block and give manual migration instructions.
-# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using
-# the breakout library. The disadvantage here is that we have to sprinkle
-# LDFAGS=-liconv on build systems that need to link against libiconv.
-RDEPEND="
- !!sys-libs/uclibc
- iconv? ( dev-libs/libiconv )"
-
-S=${WORKDIR}/${MY_P}
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CHOST} == ${CTARGET} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-make_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-
-make_config() {
- restore_config .config
- if [ -f .config ]; then
- make_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=$1 defconfig >/dev/null
-
- local defs_{y,n}
-
- # These are forced off
- defs_n=(
- DOASSERTS
- DODEBUG_PT
- HAS_NO_THREADS
- PROPOLICE_BLOCK_ABRT
- SSP_QUICK_CANARY
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_CTYPE_UNSAFE
- UCLIBC_HAS_LOCALE
- UCLIBC_HAS_SSP_COMPAT
- )
-
- # These are forced on
- defs_y=(
- COMPAT_ATEXIT
- DO_C99_MATH
- DO_XSI_MATH
- FORCE_SHAREABLE_TEXT_SEGMENTS
- LDSO_GNU_HASH_SUPPORT
- LDSO_PRELINK_SUPPORT
- LDSO_PRELOAD_FILE_SUPPORT
- LDSO_RUNPATH_OF_EXECUTABLE
- LDSO_STANDALONE_SUPPORT
- MALLOC_GLIBC_COMPAT
- PROPOLICE_BLOCK_SEGV
- PTHREADS_DEBUG_SUPPORT
- UCLIBC_HAS_ARC4RANDOM
- UCLIBC_HAS_BACKTRACE
- UCLIBC_HAS_BSD_RES_CLOSE
- UCLIBC_HAS_CONTEXT_FUNCS
- UCLIBC_HAS_CTYPE_CHECKED
- UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
- UCLIBC_HAS_FENV
- UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
- UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
- UCLIBC_HAS_FOPEN_LARGEFILE_MODE
- UCLIBC_HAS_FTS
- UCLIBC_HAS_FTW
- UCLIBC_HAS_GETPT
- UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
- UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_HEXADECIMAL_FLOATS
- UCLIBC_HAS_LIBNSL_STUB
- UCLIBC_HAS_LIBRESOLV_STUB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_NFTW
- UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
- UCLIBC_HAS_OBSTACK
- UCLIBC_HAS_PRINTF_M_SPEC
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_SHA256_CRYPT_IMPL
- UCLIBC_HAS_SHA512_CRYPT_IMPL
- UCLIBC_HAS_SSP
- UCLIBC_HAS_STUBS
- UCLIBC_HAS_SYS_ERRLIST
- UCLIBC_HAS_SYS_SIGLIST
- UCLIBC_HAS_THREADS_NATIVE
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMP
- UCLIBC_HAS_UTMPX
- UCLIBC_HAS_WCHAR
- UCLIBC_HAS_WORDEXP
- UCLIBC_NTP_LEGACY
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV2_LEGACY
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- )
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- kconfig_q_opt debug DODEBUG
- kconfig_q_opt debug SUPPORT_LD_DEBUG
- kconfig_q_opt debug UCLIBC_HAS_PROFILING
-
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
-
- kconfig_q_opt rpc UCLIBC_HAS_RPC
- kconfig_q_opt rpc UCLIBC_HAS_FULL_RPC
- kconfig_q_opt rpc UCLIBC_HAS_REENTRANT_RPC
-
- kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_SSP
-
- local count def
- for count in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s|${def}=y|# ${def} is not set|g" .config
- done
- make_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \
- -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \
- -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \
- -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \
- .config || die
-
- make_oldconfig
-}
-
-pkg_setup() {
- # Make sure our CHOST is a uclibc toolchain for native compiling
- if [[ ${CHOST} == ${CTARGET} ]]; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-
- # uClibc-ng doesn't carry old Linux threads, and since we force
- # threading our only choice is NPTL which requires i486 and later.
- [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)."
-}
-
-src_prepare() {
- local version subversion extraversion
-
- # uclibc-ng tries to create a two sym link with ld.so,
- # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-<version>.so
- # where MAJOR_VERSION != 0 indicates the ABI verison.
- # We want to get rid of this and just have ABI = 0.
- eapply "${FILESDIR}"/uclibc-compat-r1.patch
-
- # We need to change the major.minor.sublevel of uclibc-ng.
- # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking.
- # If we really want the ABI bump, we'll have to hack the gcc
- # spec file and change the '*link:' rule.
- version=( $(get_version_components) )
- if [[ -z ${version[1]} ]]; then
- subversion=0
- extraversion=0
- else
- subversion=${version[1]}
- if [[ -z ${version[2]} ]]; then
- extraversion=0
- else
- extraversion=.${version[2]}
- fi
- fi
-
- sed -i \
- -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \
- -e "/^MINOR_VERSION/s|:=.*|:= ${version[0]}|" \
- -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \
- -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \
- Rules.mak || die
-
- eapply_user
-}
-
-src_configure() {
- # Map our toolchain arch name to the name expected by uClibc-ng.
- local target=$(tc-arch)
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm";;
- mips) target="mips";;
- ppc) target="powerpc";;
- x86) target="i386";;
- esac
-
- # Do arch specific configuration by changing the defaults in
- # extra/Configs/Config.<arch>. If these are not overridden
- # by an save .config, they will be selected by default.
-
- # For i386, i486, i586 and i686
- local cpu
- if [[ ${target} == "i386" ]]; then
- [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86"
- sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \
- extra/Configs/Config.i386 || die
- fi
-
- # For arm
- if [[ ${target} == "arm" ]]; then
- sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm
- fi
-
- # We set HOSTCC to the proper tuple rather than just 'gcc'
- sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak
-
- make_config ${target}
-
- einfo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "ABI: ${ABI}"
- einfo "ENDIAN: $(uclibc_endian)"
- einfo
-}
-
-src_compile() {
- emake headers
- just_headers && return 0
-
- emake
- if is_crosscompile ; then
- emake -C utils hostutils
- else
- emake utils
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels
- # normal vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target}
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig
- newbin utils/ldd.host ${CTARGET}-ldd
- fi
- return 0
- fi
-
- dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0
-
- emake DESTDIR="${D}" install_utils
- dobin extra/scripts/getent
- dodoc README docs/*.txt
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.22.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.22.ebuild
deleted file mode 100644
index c0d6e8d09535..000000000000
--- a/sys-libs/uclibc-ng/uclibc-ng-1.0.22.ebuild
+++ /dev/null
@@ -1,411 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit flag-o-matic multilib savedconfig toolchain-funcs versionator
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng"
- inherit git-r3
- MY_P=uclibc-ng-${PV}
-else
- MY_P=uClibc-ng-${PV}
-fi
-
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc-ng.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER=""
- SRC_URI="http://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2"
- #KEYWORDS="-* ~amd64 ~arm ~mips ~ppc ~x86"
- KEYWORDS="-* ~amd64 ~arm ~ppc ~x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 rpc symlink-compat crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage
-# will delete the ld.so sym link prematurely and break the system. So we
-# will hard block and give manual migration instructions.
-# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using
-# the breakout library. The disadvantage here is that we have to sprinkle
-# LDFAGS=-liconv on build systems that need to link against libiconv.
-RDEPEND="
- !!sys-libs/uclibc
- iconv? ( dev-libs/libiconv )"
-
-S=${WORKDIR}/${MY_P}
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CHOST} == ${CTARGET} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-make_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-
-make_config() {
- restore_config .config
- if [ -f .config ]; then
- make_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=$1 defconfig >/dev/null
-
- local defs_{y,n}
-
- # These are forced off
- defs_n=(
- DOASSERTS
- DODEBUG_PT
- HAS_NO_THREADS
- PROPOLICE_BLOCK_ABRT
- SSP_QUICK_CANARY
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_CTYPE_UNSAFE
- UCLIBC_HAS_LOCALE
- UCLIBC_HAS_SSP_COMPAT
- )
-
- # These are forced on
- defs_y=(
- COMPAT_ATEXIT
- DO_C99_MATH
- DO_XSI_MATH
- FORCE_SHAREABLE_TEXT_SEGMENTS
- LDSO_GNU_HASH_SUPPORT
- LDSO_PRELINK_SUPPORT
- LDSO_PRELOAD_FILE_SUPPORT
- LDSO_RUNPATH_OF_EXECUTABLE
- LDSO_STANDALONE_SUPPORT
- MALLOC_GLIBC_COMPAT
- PROPOLICE_BLOCK_SEGV
- PTHREADS_DEBUG_SUPPORT
- UCLIBC_HAS_ARC4RANDOM
- UCLIBC_HAS_BACKTRACE
- UCLIBC_HAS_BSD_RES_CLOSE
- UCLIBC_HAS_CONTEXT_FUNCS
- UCLIBC_HAS_CTYPE_CHECKED
- UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
- UCLIBC_HAS_FENV
- UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
- UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
- UCLIBC_HAS_FOPEN_LARGEFILE_MODE
- UCLIBC_HAS_FTS
- UCLIBC_HAS_FTW
- UCLIBC_HAS_GETPT
- UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
- UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_HEXADECIMAL_FLOATS
- UCLIBC_HAS_LIBNSL_STUB
- UCLIBC_HAS_LIBRESOLV_STUB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_NFTW
- UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
- UCLIBC_HAS_OBSTACK
- UCLIBC_HAS_PRINTF_M_SPEC
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_SHA256_CRYPT_IMPL
- UCLIBC_HAS_SHA512_CRYPT_IMPL
- UCLIBC_HAS_SSP
- UCLIBC_HAS_STUBS
- UCLIBC_HAS_SYS_ERRLIST
- UCLIBC_HAS_SYS_SIGLIST
- UCLIBC_HAS_THREADS_NATIVE
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMP
- UCLIBC_HAS_UTMPX
- UCLIBC_HAS_WCHAR
- UCLIBC_HAS_WORDEXP
- UCLIBC_NTP_LEGACY
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV2_LEGACY
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- )
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- kconfig_q_opt debug DODEBUG
- kconfig_q_opt debug SUPPORT_LD_DEBUG
- kconfig_q_opt debug UCLIBC_HAS_PROFILING
-
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
-
- kconfig_q_opt rpc UCLIBC_HAS_RPC
- kconfig_q_opt rpc UCLIBC_HAS_FULL_RPC
- kconfig_q_opt rpc UCLIBC_HAS_REENTRANT_RPC
-
- kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_SSP
-
- local count def
- for count in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s|${def}=y|# ${def} is not set|g" .config
- done
- make_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \
- -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \
- -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \
- -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \
- .config || die
-
- make_oldconfig
-}
-
-pkg_setup() {
- # Make sure our CHOST is a uclibc toolchain for native compiling
- if [[ ${CHOST} == ${CTARGET} ]]; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-
- # uClibc-ng doesn't carry old Linux threads, and since we force
- # threading our only choice is NPTL which requires i486 and later.
- [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)."
-}
-
-src_prepare() {
- local version subversion extraversion
-
- # uclibc-ng tries to create a two sym link with ld.so,
- # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-<version>.so
- # where MAJOR_VERSION != 0 indicates the ABI verison.
- # We want to get rid of this and just have ABI = 0.
- eapply "${FILESDIR}"/uclibc-compat-r1.patch
-
- # We need to change the major.minor.sublevel of uclibc-ng.
- # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking.
- # If we really want the ABI bump, we'll have to hack the gcc
- # spec file and change the '*link:' rule.
- version=( $(get_version_components) )
- if [[ -z ${version[1]} ]]; then
- subversion=0
- extraversion=0
- else
- subversion=${version[1]}
- if [[ -z ${version[2]} ]]; then
- extraversion=0
- else
- extraversion=.${version[2]}
- fi
- fi
-
- sed -i \
- -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \
- -e "/^MINOR_VERSION/s|:=.*|:= ${version[0]}|" \
- -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \
- -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \
- Rules.mak || die
-
- eapply_user
-}
-
-src_configure() {
- # Map our toolchain arch name to the name expected by uClibc-ng.
- local target=$(tc-arch)
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm";;
- mips) target="mips";;
- ppc) target="powerpc";;
- x86) target="i386";;
- esac
-
- # Do arch specific configuration by changing the defaults in
- # extra/Configs/Config.<arch>. If these are not overridden
- # by an save .config, they will be selected by default.
-
- # For i386, i486, i586 and i686
- local cpu
- if [[ ${target} == "i386" ]]; then
- [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86"
- sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \
- extra/Configs/Config.i386 || die
- fi
-
- # For arm
- if [[ ${target} == "arm" ]]; then
- sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm
- fi
-
- # We set HOSTCC to the proper tuple rather than just 'gcc'
- sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak
-
- make_config ${target}
-
- einfo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "ABI: ${ABI}"
- einfo "ENDIAN: $(uclibc_endian)"
- einfo
-}
-
-src_compile() {
- emake headers
- just_headers && return 0
-
- emake
- if is_crosscompile ; then
- emake -C utils hostutils
- else
- emake utils
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels
- # normal vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target}
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig
- newbin utils/ldd.host ${CTARGET}-ldd
- fi
- return 0
- fi
-
- if use symlink-compat; then
- dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0
- fi
-
- emake DESTDIR="${D}" install_utils
- dobin extra/scripts/getent
- dodoc README docs/*.txt
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.23.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.23.ebuild
deleted file mode 100644
index d10bebbe0baf..000000000000
--- a/sys-libs/uclibc-ng/uclibc-ng-1.0.23.ebuild
+++ /dev/null
@@ -1,411 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit flag-o-matic multilib savedconfig toolchain-funcs versionator
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng"
- inherit git-r3
- MY_P=uclibc-ng-${PV}
-else
- MY_P=uClibc-ng-${PV}
-fi
-
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc-ng.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER=""
- SRC_URI="http://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2"
- #KEYWORDS="-* ~amd64 ~arm ~mips ~ppc ~x86"
- KEYWORDS="-* amd64 arm ~mips ppc x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 rpc symlink-compat crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage
-# will delete the ld.so sym link prematurely and break the system. So we
-# will hard block and give manual migration instructions.
-# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using
-# the breakout library. The disadvantage here is that we have to sprinkle
-# LDFAGS=-liconv on build systems that need to link against libiconv.
-RDEPEND="
- !!sys-libs/uclibc
- iconv? ( dev-libs/libiconv )"
-
-S=${WORKDIR}/${MY_P}
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CHOST} == ${CTARGET} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-make_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-
-make_config() {
- restore_config .config
- if [ -f .config ]; then
- make_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=$1 defconfig >/dev/null
-
- local defs_{y,n}
-
- # These are forced off
- defs_n=(
- DOASSERTS
- DODEBUG_PT
- HAS_NO_THREADS
- PROPOLICE_BLOCK_ABRT
- SSP_QUICK_CANARY
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_CTYPE_UNSAFE
- UCLIBC_HAS_LOCALE
- UCLIBC_HAS_SSP_COMPAT
- )
-
- # These are forced on
- defs_y=(
- COMPAT_ATEXIT
- DO_C99_MATH
- DO_XSI_MATH
- FORCE_SHAREABLE_TEXT_SEGMENTS
- LDSO_GNU_HASH_SUPPORT
- LDSO_PRELINK_SUPPORT
- LDSO_PRELOAD_FILE_SUPPORT
- LDSO_RUNPATH_OF_EXECUTABLE
- LDSO_STANDALONE_SUPPORT
- MALLOC_GLIBC_COMPAT
- PROPOLICE_BLOCK_SEGV
- PTHREADS_DEBUG_SUPPORT
- UCLIBC_HAS_ARC4RANDOM
- UCLIBC_HAS_BACKTRACE
- UCLIBC_HAS_BSD_RES_CLOSE
- UCLIBC_HAS_CONTEXT_FUNCS
- UCLIBC_HAS_CTYPE_CHECKED
- UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
- UCLIBC_HAS_FENV
- UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
- UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
- UCLIBC_HAS_FOPEN_LARGEFILE_MODE
- UCLIBC_HAS_FTS
- UCLIBC_HAS_FTW
- UCLIBC_HAS_GETPT
- UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
- UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_HEXADECIMAL_FLOATS
- UCLIBC_HAS_LIBNSL_STUB
- UCLIBC_HAS_LIBRESOLV_STUB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_NFTW
- UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
- UCLIBC_HAS_OBSTACK
- UCLIBC_HAS_PRINTF_M_SPEC
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_SHA256_CRYPT_IMPL
- UCLIBC_HAS_SHA512_CRYPT_IMPL
- UCLIBC_HAS_SSP
- UCLIBC_HAS_STUBS
- UCLIBC_HAS_SYS_ERRLIST
- UCLIBC_HAS_SYS_SIGLIST
- UCLIBC_HAS_THREADS_NATIVE
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMP
- UCLIBC_HAS_UTMPX
- UCLIBC_HAS_WCHAR
- UCLIBC_HAS_WORDEXP
- UCLIBC_NTP_LEGACY
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV2_LEGACY
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- )
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- kconfig_q_opt debug DODEBUG
- kconfig_q_opt debug SUPPORT_LD_DEBUG
- kconfig_q_opt debug UCLIBC_HAS_PROFILING
-
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
-
- kconfig_q_opt rpc UCLIBC_HAS_RPC
- kconfig_q_opt rpc UCLIBC_HAS_FULL_RPC
- kconfig_q_opt rpc UCLIBC_HAS_REENTRANT_RPC
-
- kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_SSP
-
- local count def
- for count in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s|${def}=y|# ${def} is not set|g" .config
- done
- make_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \
- -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \
- -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \
- -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \
- .config || die
-
- make_oldconfig
-}
-
-pkg_setup() {
- # Make sure our CHOST is a uclibc toolchain for native compiling
- if [[ ${CHOST} == ${CTARGET} ]]; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-
- # uClibc-ng doesn't carry old Linux threads, and since we force
- # threading our only choice is NPTL which requires i486 and later.
- [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)."
-}
-
-src_prepare() {
- local version subversion extraversion
-
- # uclibc-ng tries to create a two sym link with ld.so,
- # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-<version>.so
- # where MAJOR_VERSION != 0 indicates the ABI verison.
- # We want to get rid of this and just have ABI = 0.
- eapply "${FILESDIR}"/uclibc-compat-r1.patch
-
- # We need to change the major.minor.sublevel of uclibc-ng.
- # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking.
- # If we really want the ABI bump, we'll have to hack the gcc
- # spec file and change the '*link:' rule.
- version=( $(get_version_components) )
- if [[ -z ${version[1]} ]]; then
- subversion=0
- extraversion=0
- else
- subversion=${version[1]}
- if [[ -z ${version[2]} ]]; then
- extraversion=0
- else
- extraversion=.${version[2]}
- fi
- fi
-
- sed -i \
- -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \
- -e "/^MINOR_VERSION/s|:=.*|:= ${version[0]}|" \
- -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \
- -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \
- Rules.mak || die
-
- eapply_user
-}
-
-src_configure() {
- # Map our toolchain arch name to the name expected by uClibc-ng.
- local target=$(tc-arch)
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm";;
- mips) target="mips";;
- ppc) target="powerpc";;
- x86) target="i386";;
- esac
-
- # Do arch specific configuration by changing the defaults in
- # extra/Configs/Config.<arch>. If these are not overridden
- # by an save .config, they will be selected by default.
-
- # For i386, i486, i586 and i686
- local cpu
- if [[ ${target} == "i386" ]]; then
- [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86"
- sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \
- extra/Configs/Config.i386 || die
- fi
-
- # For arm
- if [[ ${target} == "arm" ]]; then
- sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm
- fi
-
- # We set HOSTCC to the proper tuple rather than just 'gcc'
- sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak
-
- make_config ${target}
-
- einfo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "ABI: ${ABI}"
- einfo "ENDIAN: $(uclibc_endian)"
- einfo
-}
-
-src_compile() {
- emake headers
- just_headers && return 0
-
- emake
- if is_crosscompile ; then
- emake -C utils hostutils
- else
- emake utils
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels
- # normal vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target}
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig
- newbin utils/ldd.host ${CTARGET}-ldd
- fi
- return 0
- fi
-
- if use symlink-compat; then
- dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0
- fi
-
- emake DESTDIR="${D}" install_utils
- dobin extra/scripts/getent
- dodoc README docs/*.txt
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.24-r1.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.24-r1.ebuild
deleted file mode 100644
index de763355387d..000000000000
--- a/sys-libs/uclibc-ng/uclibc-ng-1.0.24-r1.ebuild
+++ /dev/null
@@ -1,412 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit flag-o-matic multilib savedconfig toolchain-funcs versionator
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng"
- inherit git-r3
- MY_P=uclibc-ng-${PV}
-else
- MY_P=uClibc-ng-${PV}
-fi
-
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc-ng.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER=""
- SRC_URI="http://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2"
- #KEYWORDS="-* ~amd64 ~arm ~mips ~ppc ~x86"
- KEYWORDS="-* ~amd64 ~arm ~ppc ~x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 rpc symlink-compat crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage
-# will delete the ld.so sym link prematurely and break the system. So we
-# will hard block and give manual migration instructions.
-# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using
-# the breakout library. The disadvantage here is that we have to sprinkle
-# LDFAGS=-liconv on build systems that need to link against libiconv.
-RDEPEND="
- !!sys-libs/uclibc
- iconv? ( dev-libs/libiconv )"
-
-S=${WORKDIR}/${MY_P}
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CHOST} == ${CTARGET} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-make_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-
-make_config() {
- restore_config .config
- if [ -f .config ]; then
- make_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=$1 defconfig >/dev/null
-
- local defs_{y,n}
-
- # These are forced off
- defs_n=(
- DOASSERTS
- DODEBUG_PT
- HAS_NO_THREADS
- PROPOLICE_BLOCK_ABRT
- SSP_QUICK_CANARY
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_CTYPE_UNSAFE
- UCLIBC_HAS_LOCALE
- UCLIBC_HAS_SSP_COMPAT
- )
-
- # These are forced on
- defs_y=(
- COMPAT_ATEXIT
- DO_C99_MATH
- DO_XSI_MATH
- FORCE_SHAREABLE_TEXT_SEGMENTS
- LDSO_GNU_HASH_SUPPORT
- LDSO_PRELINK_SUPPORT
- LDSO_PRELOAD_FILE_SUPPORT
- LDSO_RUNPATH_OF_EXECUTABLE
- LDSO_STANDALONE_SUPPORT
- MALLOC_GLIBC_COMPAT
- PROPOLICE_BLOCK_SEGV
- PTHREADS_DEBUG_SUPPORT
- UCLIBC_HAS_ARC4RANDOM
- UCLIBC_HAS_BACKTRACE
- UCLIBC_HAS_BSD_RES_CLOSE
- UCLIBC_HAS_CONTEXT_FUNCS
- UCLIBC_HAS_CTYPE_CHECKED
- UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
- UCLIBC_HAS_FENV
- UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
- UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
- UCLIBC_HAS_FOPEN_LARGEFILE_MODE
- UCLIBC_HAS_FTS
- UCLIBC_HAS_FTW
- UCLIBC_HAS_GETPT
- UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
- UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_HEXADECIMAL_FLOATS
- UCLIBC_HAS_LIBNSL_STUB
- UCLIBC_HAS_LIBRESOLV_STUB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_NFTW
- UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
- UCLIBC_HAS_OBSTACK
- UCLIBC_HAS_PRINTF_M_SPEC
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_SHA256_CRYPT_IMPL
- UCLIBC_HAS_SHA512_CRYPT_IMPL
- UCLIBC_HAS_SSP
- UCLIBC_HAS_STUBS
- UCLIBC_HAS_SYS_ERRLIST
- UCLIBC_HAS_SYS_SIGLIST
- UCLIBC_HAS_THREADS_NATIVE
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMP
- UCLIBC_HAS_UTMPX
- UCLIBC_HAS_WCHAR
- UCLIBC_HAS_WORDEXP
- UCLIBC_NTP_LEGACY
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV2_LEGACY
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- )
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- kconfig_q_opt debug DODEBUG
- kconfig_q_opt debug SUPPORT_LD_DEBUG
- kconfig_q_opt debug UCLIBC_HAS_PROFILING
-
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
-
- kconfig_q_opt rpc UCLIBC_HAS_RPC
- kconfig_q_opt rpc UCLIBC_HAS_FULL_RPC
- kconfig_q_opt rpc UCLIBC_HAS_REENTRANT_RPC
-
- kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_SSP
-
- local count def
- for count in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s|${def}=y|# ${def} is not set|g" .config
- done
- make_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \
- -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \
- -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \
- -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \
- .config || die
-
- make_oldconfig
-}
-
-pkg_setup() {
- # Make sure our CHOST is a uclibc toolchain for native compiling
- if [[ ${CHOST} == ${CTARGET} ]]; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-
- # uClibc-ng doesn't carry old Linux threads, and since we force
- # threading our only choice is NPTL which requires i486 and later.
- [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)."
-}
-
-src_prepare() {
- local version subversion extraversion
-
- # uclibc-ng tries to create a two sym link with ld.so,
- # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-<version>.so
- # where MAJOR_VERSION != 0 indicates the ABI verison.
- # We want to get rid of this and just have ABI = 0.
- eapply "${FILESDIR}"/uclibc-compat-r1.patch
- eapply "${FILESDIR}"/${PN}-update-reboot_h.patch
-
- # We need to change the major.minor.sublevel of uclibc-ng.
- # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking.
- # If we really want the ABI bump, we'll have to hack the gcc
- # spec file and change the '*link:' rule.
- version=( $(get_version_components) )
- if [[ -z ${version[1]} ]]; then
- subversion=0
- extraversion=0
- else
- subversion=${version[1]}
- if [[ -z ${version[2]} ]]; then
- extraversion=0
- else
- extraversion=.${version[2]}
- fi
- fi
-
- sed -i \
- -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \
- -e "/^MINOR_VERSION/s|:=.*|:= ${version[0]}|" \
- -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \
- -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \
- Rules.mak || die
-
- eapply_user
-}
-
-src_configure() {
- # Map our toolchain arch name to the name expected by uClibc-ng.
- local target=$(tc-arch)
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm";;
- mips) target="mips";;
- ppc) target="powerpc";;
- x86) target="i386";;
- esac
-
- # Do arch specific configuration by changing the defaults in
- # extra/Configs/Config.<arch>. If these are not overridden
- # by an save .config, they will be selected by default.
-
- # For i386, i486, i586 and i686
- local cpu
- if [[ ${target} == "i386" ]]; then
- [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86"
- sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \
- extra/Configs/Config.i386 || die
- fi
-
- # For arm
- if [[ ${target} == "arm" ]]; then
- sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm
- fi
-
- # We set HOSTCC to the proper tuple rather than just 'gcc'
- sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak
-
- make_config ${target}
-
- einfo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "ABI: ${ABI}"
- einfo "ENDIAN: $(uclibc_endian)"
- einfo
-}
-
-src_compile() {
- emake headers
- just_headers && return 0
-
- emake
- if is_crosscompile ; then
- emake -C utils hostutils
- else
- emake utils
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels
- # normal vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target}
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig
- newbin utils/ldd.host ${CTARGET}-ldd
- fi
- return 0
- fi
-
- if use symlink-compat; then
- dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0
- fi
-
- emake DESTDIR="${D}" install_utils
- dobin extra/scripts/getent
- dodoc README docs/*.txt
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.24.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.24.ebuild
deleted file mode 100644
index c0d6e8d09535..000000000000
--- a/sys-libs/uclibc-ng/uclibc-ng-1.0.24.ebuild
+++ /dev/null
@@ -1,411 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit flag-o-matic multilib savedconfig toolchain-funcs versionator
-
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng"
- inherit git-r3
- MY_P=uclibc-ng-${PV}
-else
- MY_P=uClibc-ng-${PV}
-fi
-
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc-ng.org/"
-if [[ ${PV} != "9999" ]] ; then
- PATCH_VER=""
- SRC_URI="http://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2"
- #KEYWORDS="-* ~amd64 ~arm ~mips ~ppc ~x86"
- KEYWORDS="-* ~amd64 ~arm ~ppc ~x86"
-fi
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug hardened iconv ipv6 rpc symlink-compat crosscompile_opts_headers-only"
-RESTRICT="strip"
-
-# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage
-# will delete the ld.so sym link prematurely and break the system. So we
-# will hard block and give manual migration instructions.
-# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using
-# the breakout library. The disadvantage here is that we have to sprinkle
-# LDFAGS=-liconv on build systems that need to link against libiconv.
-RDEPEND="
- !!sys-libs/uclibc
- iconv? ( dev-libs/libiconv )"
-
-S=${WORKDIR}/${MY_P}
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CHOST} == ${CTARGET} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-alt_build_kprefix() {
- if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then
- echo /usr/include
- else
- echo /usr/${CTARGET}/usr/include
- fi
-}
-
-just_headers() {
- use crosscompile_opts_headers-only && is_crosscompile
-}
-
-uclibc_endian() {
- # XXX: this wont work for a toolchain which is bi-endian, but we
- # dont have any such thing at the moment, so not a big deal
- touch "${T}"/endian.s
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o
- case $(file "${T}"/endian.o) in
- *" MSB "*) echo "BIG";;
- *" LSB "*) echo "LITTLE";;
- *) echo "NFC";;
- esac
- rm -f "${T}"/endian.{s,o}
-}
-
-kconfig_q_opt() {
- local flag=$1; shift
- case ${flag} in
- y|n) ;;
- *) flag=$(usex ${flag} y n) ;;
- esac
-
- local var="defs_${flag}"
- eval "${var}+=( $* )"
-}
-
-get_opt() {
- (
- unset ${1}
- . ${2:-"${S}"/.config}
- echo ${!1}
- )
-}
-
-make_oldconfig() {
- yes "" 2>/dev/null | emake -s oldconfig >/dev/null
-}
-
-make_config() {
- restore_config .config
- if [ -f .config ]; then
- make_oldconfig
- return 0
- else
- ewarn "Could not locate user configfile, so we will save a default one"
- fi
-
- emake ARCH=$1 defconfig >/dev/null
-
- local defs_{y,n}
-
- # These are forced off
- defs_n=(
- DOASSERTS
- DODEBUG_PT
- HAS_NO_THREADS
- PROPOLICE_BLOCK_ABRT
- SSP_QUICK_CANARY
- SUPPORT_LD_DEBUG_EARLY
- UCLIBC_HAS_CTYPE_UNSAFE
- UCLIBC_HAS_LOCALE
- UCLIBC_HAS_SSP_COMPAT
- )
-
- # These are forced on
- defs_y=(
- COMPAT_ATEXIT
- DO_C99_MATH
- DO_XSI_MATH
- FORCE_SHAREABLE_TEXT_SEGMENTS
- LDSO_GNU_HASH_SUPPORT
- LDSO_PRELINK_SUPPORT
- LDSO_PRELOAD_FILE_SUPPORT
- LDSO_RUNPATH_OF_EXECUTABLE
- LDSO_STANDALONE_SUPPORT
- MALLOC_GLIBC_COMPAT
- PROPOLICE_BLOCK_SEGV
- PTHREADS_DEBUG_SUPPORT
- UCLIBC_HAS_ARC4RANDOM
- UCLIBC_HAS_BACKTRACE
- UCLIBC_HAS_BSD_RES_CLOSE
- UCLIBC_HAS_CONTEXT_FUNCS
- UCLIBC_HAS_CTYPE_CHECKED
- UCLIBC_HAS_EXTRA_COMPAT_RES_STATE
- UCLIBC_HAS_FENV
- UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE
- UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
- UCLIBC_HAS_FOPEN_LARGEFILE_MODE
- UCLIBC_HAS_FTS
- UCLIBC_HAS_FTW
- UCLIBC_HAS_GETPT
- UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
- UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
- UCLIBC_HAS_GNU_GLOB
- UCLIBC_HAS_HEXADECIMAL_FLOATS
- UCLIBC_HAS_LIBNSL_STUB
- UCLIBC_HAS_LIBRESOLV_STUB
- UCLIBC_HAS_LIBUTIL
- UCLIBC_HAS_NFTW
- UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
- UCLIBC_HAS_OBSTACK
- UCLIBC_HAS_PRINTF_M_SPEC
- UCLIBC_HAS_PROGRAM_INVOCATION_NAME
- UCLIBC_HAS_RESOLVER_SUPPORT
- UCLIBC_HAS_SHA256_CRYPT_IMPL
- UCLIBC_HAS_SHA512_CRYPT_IMPL
- UCLIBC_HAS_SSP
- UCLIBC_HAS_STUBS
- UCLIBC_HAS_SYS_ERRLIST
- UCLIBC_HAS_SYS_SIGLIST
- UCLIBC_HAS_THREADS_NATIVE
- UCLIBC_HAS_TZ_FILE_READ_MANY
- UCLIBC_HAS_UTMP
- UCLIBC_HAS_UTMPX
- UCLIBC_HAS_WCHAR
- UCLIBC_HAS_WORDEXP
- UCLIBC_NTP_LEGACY
- UCLIBC_SUPPORT_AI_ADDRCONFIG
- UCLIBC_SUSV2_LEGACY
- UCLIBC_SUSV3_LEGACY
- UCLIBC_SUSV3_LEGACY_MACROS
- UCLIBC_SUSV4_LEGACY
- UCLIBC_USE_NETLINK
- )
-
- sed -i -e '/ARCH_.*_ENDIAN/d' .config
- kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
-
- kconfig_q_opt debug DODEBUG
- kconfig_q_opt debug SUPPORT_LD_DEBUG
- kconfig_q_opt debug UCLIBC_HAS_PROFILING
-
- kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
-
- kconfig_q_opt rpc UCLIBC_HAS_RPC
- kconfig_q_opt rpc UCLIBC_HAS_FULL_RPC
- kconfig_q_opt rpc UCLIBC_HAS_REENTRANT_RPC
-
- kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK
- kconfig_q_opt hardened UCLIBC_BUILD_NOW
- kconfig_q_opt hardened UCLIBC_BUILD_PIE
- kconfig_q_opt hardened UCLIBC_BUILD_RELRO
- kconfig_q_opt hardened UCLIBC_BUILD_SSP
-
- local count def
- for count in 1 2 ; do
- # Run twice as some config opts depend on others being enabled first.
- for def in ${defs_y[@]} ; do
- sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config
- done
- for def in ${defs_n[@]} ; do
- sed -i -e "s|${def}=y|# ${def} is not set|g" .config
- done
- make_oldconfig
- done
-
- einfo "Enabled options:"
- for def in ${defs_y[@]} ; do
- einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
- done
- einfo "Disabled options:"
- for def in ${defs_n[@]} ; do
- einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
- done
-
- # setup build and run paths
- sed -i \
- -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \
- -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \
- -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \
- -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \
- -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \
- -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \
- .config || die
-
- make_oldconfig
-}
-
-pkg_setup() {
- # Make sure our CHOST is a uclibc toolchain for native compiling
- if [[ ${CHOST} == ${CTARGET} ]]; then
- case ${CHOST} in
- *-uclinux*|*-uclibc*) ;;
- *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
- esac
- fi
-
- # uClibc-ng doesn't carry old Linux threads, and since we force
- # threading our only choice is NPTL which requires i486 and later.
- [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)."
-}
-
-src_prepare() {
- local version subversion extraversion
-
- # uclibc-ng tries to create a two sym link with ld.so,
- # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-<version>.so
- # where MAJOR_VERSION != 0 indicates the ABI verison.
- # We want to get rid of this and just have ABI = 0.
- eapply "${FILESDIR}"/uclibc-compat-r1.patch
-
- # We need to change the major.minor.sublevel of uclibc-ng.
- # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking.
- # If we really want the ABI bump, we'll have to hack the gcc
- # spec file and change the '*link:' rule.
- version=( $(get_version_components) )
- if [[ -z ${version[1]} ]]; then
- subversion=0
- extraversion=0
- else
- subversion=${version[1]}
- if [[ -z ${version[2]} ]]; then
- extraversion=0
- else
- extraversion=.${version[2]}
- fi
- fi
-
- sed -i \
- -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \
- -e "/^MINOR_VERSION/s|:=.*|:= ${version[0]}|" \
- -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \
- -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \
- Rules.mak || die
-
- eapply_user
-}
-
-src_configure() {
- # Map our toolchain arch name to the name expected by uClibc-ng.
- local target=$(tc-arch)
- case ${target} in
- amd64) target="x86_64";;
- arm) target="arm";;
- mips) target="mips";;
- ppc) target="powerpc";;
- x86) target="i386";;
- esac
-
- # Do arch specific configuration by changing the defaults in
- # extra/Configs/Config.<arch>. If these are not overridden
- # by an save .config, they will be selected by default.
-
- # For i386, i486, i586 and i686
- local cpu
- if [[ ${target} == "i386" ]]; then
- [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86"
- sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \
- extra/Configs/Config.i386 || die
- fi
-
- # For arm
- if [[ ${target} == "arm" ]]; then
- sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm
- fi
-
- # We set HOSTCC to the proper tuple rather than just 'gcc'
- sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak
-
- make_config ${target}
-
- einfo
- einfo "Runtime Prefix: /"
- einfo "Devel Prefix: /usr"
- einfo "Kernel Prefix: $(alt_build_kprefix)"
- einfo "CBUILD: ${CBUILD}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
- einfo "ABI: ${ABI}"
- einfo "ENDIAN: $(uclibc_endian)"
- einfo
-}
-
-src_compile() {
- emake headers
- just_headers && return 0
-
- emake
- if is_crosscompile ; then
- emake -C utils hostutils
- else
- emake utils
- fi
-}
-
-src_test() {
- is_crosscompile && return 0
-
- # assert test fails on pax/grsec enabled kernels
- # normal vfork test fails in sandbox (both glibc/uclibc)
- emake UCLIBC_ONLY=1 check
-}
-
-src_install() {
- local sysroot=${D}
- is_crosscompile && sysroot+="/usr/${CTARGET}"
-
- local target="install"
- just_headers && target="install_headers"
- emake DESTDIR="${sysroot}" ${target}
-
- save_config .config
-
- # remove files coming from kernel-headers
- rm -rf "${sysroot}"/usr/include/{linux,asm*}
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
- newbin utils/ldconfig.host ${CTARGET}-ldconfig
- newbin utils/ldd.host ${CTARGET}-ldd
- fi
- return 0
- fi
-
- if use symlink-compat; then
- dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0
- dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0
- fi
-
- emake DESTDIR="${D}" install_utils
- dobin extra/scripts/getent
- dodoc README docs/*.txt
-}
-
-pkg_postinst() {
- is_crosscompile && return 0
-
- if [ ! -e "${ROOT}"/etc/TZ ] ; then
- ewarn "Please remember to set your timezone in /etc/TZ"
- mkdir -p "${ROOT}"/etc
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
- [ "${ROOT}" != "/" ] && return 0
- # update cache before reloading init
- ldconfig
- # reload init ...
- /sbin/telinit U 2>/dev/null
-}
diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.20.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.27.ebuild
index 89d2e3727161..3cd7177086ee 100644
--- a/sys-libs/uclibc-ng/uclibc-ng-1.0.20.ebuild
+++ b/sys-libs/uclibc-ng/uclibc-ng-1.0.27.ebuild
@@ -18,7 +18,7 @@ HOMEPAGE="http://www.uclibc-ng.org/"
if [[ ${PV} != "9999" ]] ; then
PATCH_VER=""
SRC_URI="http://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2"
- KEYWORDS="-* amd64 arm ~mips ppc x86"
+ KEYWORDS="-* ~amd64 ~arm ~mips ~ppc ~x86"
fi
LICENSE="LGPL-2"