commit:     a0ce4d344c0b65b115bd7f52567073c80295835e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May 13 02:28:57 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 13 02:34:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0ce4d34

sys-libs/ncurses-compat: add 6.4_p20230401

Sync with sys-libs/ncurses and add a note about bumping with sys-libs/ncurses.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/ncurses-compat/Manifest                   |  21 ++
 .../ncurses-compat-6.4_p20230401.ebuild            | 330 +++++++++++++++++++++
 2 files changed, 351 insertions(+)

diff --git a/sys-libs/ncurses-compat/Manifest b/sys-libs/ncurses-compat/Manifest
index 61cb703f5feb..970c740d699e 100644
--- a/sys-libs/ncurses-compat/Manifest
+++ b/sys-libs/ncurses-compat/Manifest
@@ -1 +1,22 @@
 DIST ncurses-6.2.tar.gz 3425862 BLAKE2B 
6680cd7a369a4cb8234442a70869c283f0db6db9d7da1da2a7a5c519eb862a2c9b9411957d99f9ebb5089cad00b42e1ca6bc0784327461113df2eeaec695913c
 SHA512 
4c1333dcc30e858e8a9525d4b9aefb60000cfc727bc4a1062bace06ffc4639ad9f6e54f6bdda0e3a0e5ea14de995f96b52b3327d9ec633608792c99a1e8d840d
+DIST ncurses-6.4-20230107.patch.gz 196232 BLAKE2B 
8751142f825a4b79413986e45bc160d49cc9ccef23ae542c59a74435e251de82bdc8f450df14db0867b8679b5ecb81f0fb9abda662a82fb033a7eb5e079ee308
 SHA512 
970670d8eee50d44b8c7f29daf4c6a575beff3b4fafe12fff786cbd7ac03edeb1e7dae99c8064de99c166e9b3d7811f035ecf75c0eaffb382127cc9df5388d9b
+DIST ncurses-6.4-20230107.patch.gz.asc 729 BLAKE2B 
483156747c88de46d131cf1f4e460972f95f689baaec0fb4c7c9966bec6e53d41285261761af17cbd8a9543108095587e598e3fe2fe21d76dc4fedde85a3eb0a
 SHA512 
e14d0a27dae59e95f503bf1a569b0cc3115755043eb0cb4fa481e90bf24d097fae675e08c1247c0746fbb5c03c363dc88e6a60c0e9d6abb278df4e8d581749b1
+DIST ncurses-6.4-20230114.patch.gz 179019 BLAKE2B 
8e7290f41133177275249c084c93a5fe6cb1dcd75e4deea0e44dbdd79774a364705bcd20b30b735996e19e861b5cde2216b5ce7c8d89066095d7c06ce38e5454
 SHA512 
202c02b09bf21d5c8341fc0e8a30a2c906f0e260a4d536f1332f978ebbe4d93250b832c6449a81ffdc9e030802f064237f39fd0f473e75e61cc77e15232c9a01
+DIST ncurses-6.4-20230114.patch.gz.asc 729 BLAKE2B 
dbb676160938bf5a65780a446bdffc8521410d216609d38817ea8977ea0f244dc221ec33a0475e05542fba4be7349f0948e9fa32be7fd439e57721b6a6e08fe3
 SHA512 
bfa1b6856fdf503aa17bac83ba0170009242ac950d46bb8789fb0e0f68c406fed364104565351df70ab58b12bbf8aedd4e587df3bd7ee69a6a0c287f67fd0c3b
+DIST ncurses-6.4-20230121.patch.gz 44888 BLAKE2B 
355b2f283b978a2aadee0f4e1bc1694eb8d4ef559014d86b1ef05ab818a8852192b09976336ecd73f2610e87a8a3ccd4f799e6e0585ec4a2a8e85abbbae2f467
 SHA512 
7bee1b23afff48b5319a60f9e90cfd7593c0a107bcd5606da8e765b4d38904a6f732fe8077ecfac45ee2daceed301026ef3fb67435cae1d94ef5fec01440c100
+DIST ncurses-6.4-20230121.patch.gz.asc 729 BLAKE2B 
ddd69de4d17066b79ed9c99dfafcd051ebfb32cc31b5ea88fe013b991ca91e3bf4d00fbb36bd73b5d2ff0d4fdf33525b14bbe6ccb5216af5459e276e161a716b
 SHA512 
f0a6eb2c81782c2d2da6d15b82a3167e4209887b868efe2e36708ffba93c987f358828d353a4b211f5fe6c1abce90b42e7d6dd2cb6ad322de78bbe2ceb04e1ad
+DIST ncurses-6.4-20230128.patch.gz 119721 BLAKE2B 
e91942151653415ba09e384c683a2d13854c6a751fbb4b60ee74245e71207f98d7a89b000e93cc3555f302dba2c5ca55d8313cab2197dc4074251044ef7b4eae
 SHA512 
fffc86e953213ddc9bbe5c6a51bd60725ef75655452d03a53a38bfd5ca318d4801bb9ae4244e7e14ca8c77a9aa6fba298f45a01ae26a964cfc3300268f87c479
+DIST ncurses-6.4-20230128.patch.gz.asc 729 BLAKE2B 
0faa8eb037867b99e7ea6f23c99d487426986cf9e5bc5a89179bd1ad4f363c5621d7c81214f4e38eed4ddbce9cd2cb569ff700325585e56ba706c7f1b56cabd6
 SHA512 
9cc84a4e32b7a67965106e8f414f87a160b632d49a5489880cd4f3f43daa7043d33894b22a16efdef5cd04914cf69019a1abefc8b9234ba2a92d1dc7c46f72fa
+DIST ncurses-6.4-20230211.patch.gz 13004 BLAKE2B 
1935bee908c20f065f93100745755177012a49709bca3b14edb0414aa1493dbd6c52313a16ed04b58dff635fb6e853c39e3e3fe2b47ac5662fc274d59976ae94
 SHA512 
f70ad2605dfe867d8cdcbd6516c759bbf5422bf297d1ee0fb20b2b4262177cb018b7612c735efeccf8794a6fde55e388e4c9ef0bed41e9c467902835c6bf678e
+DIST ncurses-6.4-20230211.patch.gz.asc 729 BLAKE2B 
42a64222042021f85a70d88555cdb6854abcc0202fd3580fff0984aee1d6154bb995d6357ed45cbb90ba92c17c32d8fd573ba0c59d37e9add2d7ece68044ac52
 SHA512 
27930c85a4ff2cb83c54def0fdf8f1765c4d1ca36935b26022bfe48ab6e87f39c6e45b8d1427d448e0a7b2bae864b00811ac9f1f1ab9f97d4c8f4b001dc2cb01
+DIST ncurses-6.4-20230218.patch.gz 146502 BLAKE2B 
571cf7f5df5eeef21ab719ea2e941a431751ffd973de11783b96bea1ff6162f9fbbd3c3616d4c63906135cb4a6f16f8ee1a566743760c20bf026c2f378d57ce6
 SHA512 
7c8cec6437bef737235cf0a684646d3b6bf38c66314c14d5f07ec5dc2ca20e3036ffbd9900bb5c45e48929b1454711de412b77e527a7df643dd4403a5abfc787
+DIST ncurses-6.4-20230218.patch.gz.asc 729 BLAKE2B 
ca55b37bf6e647c5e39eaba1174c9c9699ffa77fc7ec1b53771586303184cf4b64cf5def844fc87d563a847109d7b00beac17e758a9803350831ebe14d36b0d9
 SHA512 
5471a2c8389742c0c8b74f1c27e9b97012c5d5eb0256fbd4bb904daab685614fe2506b5a204d958273eb66b56c5ff4b5e5aba8e28f59e2fe0cba392dde59b473
+DIST ncurses-6.4-20230225.patch.gz 68561 BLAKE2B 
ab80ea189f975e6fc0c2a1dd22898e2d4dde6bf2767ed47000c534430af09948266188cf54a527aabdfa6f4b5df4946c8bc3afdd7869bcccc75429b3e828b48a
 SHA512 
fed222bbdb5d3c472ec7283f5612e12d6b1806c49ca5d1dc7dde68bbf72e8b1fe9c31a4737b6bbcf721d97babc9156a524d127f9e3d6c41547813bef70fb247d
+DIST ncurses-6.4-20230225.patch.gz.asc 729 BLAKE2B 
f7b4ff7fe78a69ec20c79225cce7bee628476663600129e5eee0c0f1ef2f0783e46485f57a774847851e6e192231610405ff923dcafd68c1dcc3d2ec622f0b78
 SHA512 
937a4bb33acf0c86b201145f2abe65e5b7defe63c064aeb2b7cb8869494c02a5d50af3f048dd758ea39b828b8cdd0dac54004dc41cd609afcf3de71454195135
+DIST ncurses-6.4-20230311.patch.gz 15262 BLAKE2B 
b3ca38dc63d64dd59af08b4c642c5b081eb137db6d7590a92f29c55be7148b26032553e1b72b0977394608ac144a12dfa0f919d943d41fd6ff419f8e568c655d
 SHA512 
17662557194e81668dac748bce1240276d48e09df2416934da9660861154137024aee989287e9aac17b884e9707cf1c86c438cbcc583902af8a5ecc5a5e08140
+DIST ncurses-6.4-20230311.patch.gz.asc 729 BLAKE2B 
c5f513390bae7cbd5cf9d6a6f67c00161cb7c1712ebfa7ee9b27b391dbdb8f9386fc55daaa25b34c55955cc0362191256a2288b85d2d1dd9ff945561a2850449
 SHA512 
2b0f9ec58e011bb969397018258519b09a5af42ac49b7609677f983c1d69543aaeb052fb762d358b3fcfba7a3d40c01f61f3a680102d10f76958750b531a89d2
+DIST ncurses-6.4-20230401.patch.gz 5172 BLAKE2B 
bf4a9d9bcecc2fa91191139a4f1aa39aa4f08346986fe14f43b7dc4cbdaed767d198f426c8517024c5d4fe481a45c6d7e0a0b62d35cd72250e08da47edcbe86e
 SHA512 
dd3d89cabec528c95c4b065a32d3496210571b0baaab079c2b381563f374072630aab0ec919c26e10ea476b7aebf1eab45ea25f8b4dfcd8172f44270d03c9cc9
+DIST ncurses-6.4-20230401.patch.gz.asc 729 BLAKE2B 
18588b7cc4e3f256a4e9aa9e6221e54b1a29711df01784397b1055d9fea8ae5f1bb544a8acfd660ef1b7d72ccae1ab94b61f38ba19159e4efc7563a79e93fbb3
 SHA512 
bf9da77a0da1640d883e0a6ac7f807995f3678eaa054255e8591dbe9a2c4cebb43d8d2781b8ddf7c7432a38f63eb72d519445edcc2721a01d7a785964adee8a1
+DIST ncurses-6.4.tar.gz 3612591 BLAKE2B 
47fd9c2d27f44fa9942552881a471e5067465dbace40bf68b28998dded0556127a1d8662b96de4de4fd76c1c8b98bdae796036553ab4b05ca9f160839d841ba3
 SHA512 
1c2efff87a82a57e57b0c60023c87bae93f6718114c8f9dc010d4c21119a2f7576d0225dab5f0a227c2cfc6fb6bdbd62728e407f35fce5bf351bb50cf9e0fd34
+DIST ncurses-6.4.tar.gz.sig 438 BLAKE2B 
e6a78b8d0cbce1577205b49b0260394094632cefd95294813c7e4e51a2908e8599a9f24b3b648e42ba16c015fb9424b2a82236f58aac3bf96f5400a50482e44e
 SHA512 
f2a7859725b4d5d62f68006338d56598ac6b38a1448983108906e192f0ec922be287cc89bcc79c1ae49ebc80c967af3dd077427f35ae579b00d445c882414fed
+DIST ncurses-6.4_p20230408-patches.tar.xz 80472 BLAKE2B 
0ba8156ebd4f1691fec7bc1b800ef39ce6a4210573c027dd437919cdcd7c995830116da06c69f31c65923845a4d5c88e974673fac38acce5813f7d6cdc646e3e
 SHA512 
32960e2cc4cd9dc60c38b49f46c5ce2c02179479abb66ca29f63cd06475ae8e26299a78b5f06762d114aefbbca3ba6fbebe7093a58106eeaa40cf500d21633a4

diff --git a/sys-libs/ncurses-compat/ncurses-compat-6.4_p20230401.ebuild 
b/sys-libs/ncurses-compat/ncurses-compat-6.4_p20230401.ebuild
new file mode 100644
index 000000000000..d1aafe577432
--- /dev/null
+++ b/sys-libs/ncurses-compat/ncurses-compat-6.4_p20230401.ebuild
@@ -0,0 +1,330 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# This version is just for the ABI .5 library.
+# sys-libs/ncurses-compat can be bumped with sys-libs/ncurses as upstream
+# provide a configure option (which we use here) for the ABI version.
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/thomasdickey.asc
+inherit flag-o-matic toolchain-funcs multilib multilib-minimal verify-sig
+
+MY_PV="${PV:0:3}"
+MY_P="${PN/-compat}-${MY_PV}"
+MY_PN="${PN/-compat}"
+
+DESCRIPTION="Console display library (ABI version 5)"
+HOMEPAGE="https://www.gnu.org/software/ncurses/ 
https://invisible-island.net/ncurses/";
+SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz"
+
+# Keep invisible-mirror.net here as some users reported 403 forbidden with 
invisible-island.net
+SRC_URI="
+       mirror://gnu/ncurses/${MY_P}.tar.gz
+       https://invisible-island.net/archives/${PN}/${MY_P}.tar.gz
+       https://invisible-mirror.net/archives/${PN}/${MY_P}.tar.gz
+       verify-sig? ( mirror://gnu/ncurses/${MY_P}.tar.gz.sig )
+"
+
+GENTOO_PATCH_DEV=sam
+GENTOO_PATCH_PV=6.4_p20230408
+GENTOO_PATCH_NAME=${MY_PN}-${GENTOO_PATCH_PV}-patches
+
+# Populated below in a loop. Do not add patches manually here.
+UPSTREAM_PATCHES=()
+
+if [[ ${PV} == *_p* ]] ; then
+       # Sometimes, after releases, there's no megapatch available yet.
+       #
+       # From upstream README at e.g. 
https://invisible-island.net/archives/ncurses/6.3/:
+       #
+       #       "At times (generally to mark a relatively stable point), I 
create a rollup
+       #       patch, which consists of all changes from the release through 
the current date."
+       #
+       # Also, from 
https://lists.gnu.org/archive/html/bug-ncurses/2019-08/msg00039.html,
+       # the patches are considered to be acceptable to use after some 
testing. They
+       # are both for development but also bug fixes.
+       #
+       # This array should contain a list of all the snapshots since the last
+       # release if there's no megapatch available yet.
+       PATCH_DATES=(
+               20230107
+               20230114
+               20230121
+               20230128
+               20230211
+               20230218
+               20230225
+               20230311
+
+               # Latest patch is just _pN = $(ver_cut 4)
+               $(ver_cut 4)
+       )
+
+       if [[ -z ${PATCH_DATES[@]} ]] ; then
+               SRC_URI+=" 
https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz";
+               SRC_URI+=" verify-sig? ( 
https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz.asc";
+
+               # If we have a rollup patch, use that instead of the individual 
ones.
+               UPSTREAM_PATCHES+=( "${WORKDIR}"/${P/_p/-}-patch.sh )
+       else
+               patch_url=
+               my_patch_index=
+
+               # We keep a bunch of mirrors here as we've had reports of 
invisible*.net
+               # being 403 forbidden for some users.
+               urls=(
+                       
"https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-%s";
+                       
"https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-%s";
+                       
"https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${MY_P}-%s";
+               )
+
+               for ((my_patch_index=0; my_patch_index < "${#PATCH_DATES[@]}"; 
my_patch_index++)); do
+                       for url in "${urls[@]}" ; do
+                               patch_url="$(printf ${urls} 
${PATCH_DATES[${my_patch_index}]}.patch.gz)"
+                               SRC_URI+=" ${patch_url}"
+                               SRC_URI+=" verify-sig? ( ${patch_url}.asc )"
+                       done
+
+                       UPSTREAM_PATCHES+=( 
"${WORKDIR}"/${MY_P}-${PATCH_DATES[${my_patch_index}]}.patch )
+               done
+
+               unset patch_url
+               unset my_patch_index
+               unset urls
+       fi
+fi
+
+SRC_URI+=" 
https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${GENTOO_PATCH_NAME}.tar.xz";
+
+LICENSE="MIT"
+# The subslot reflects the SONAME.
+SLOT="5/5"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv 
~s390 ~sparc ~x86"
+IUSE="gpm +stack-realign tinfo unicode"
+
+DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
+# Block the ncurses-5 that installs the same lib. #557472
+RDEPEND="
+       ${DEPEND}
+       !<sys-libs/ncurses-6:0
+       !sys-libs/ncurses:5
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+       "${UPSTREAM_PATCHES[@]}"
+
+       # When rebasing Gentoo's patchset, please use git from a clean
+       # src_prepare with upstream patches already applied. git am --reject
+       # the existing patchset and rebase as required. This makes it easier
+       # to manage future rebasing & adding new patches.
+       #
+       # For the same reasons, please include the original configure.in 
changes,
+       # NOT just the generated results!
+       "${WORKDIR}"/${GENTOO_PATCH_NAME}
+)
+
+src_unpack() {
+       # Avoid trying to verify our own patchset tarball, there's no point
+       if use verify-sig ; then
+               local file
+               for file in ${A} ; do
+                       if [[ ${file} == ${MY_P}.tar.gz ]] ; then
+                               verify-sig_verify_detached "${DISTDIR}"/${file} 
"${DISTDIR}"/${file}.sig
+                       else
+                               [[ ${file} == 
@(*${GENTOO_PATCH_NAME}.tar.xz|*.asc|*.sig) ]] && continue
+
+                               verify-sig_verify_detached "${DISTDIR}"/${file} 
"${DISTDIR}"/${file}.asc
+                       fi
+               done
+       fi
+
+       default
+}
+
+src_configure() {
+       # bug #115036
+       unset TERMINFO
+
+       tc-export_build_env BUILD_{CC,CXX,CPP}
+
+       # bug #214642
+       BUILD_CPPFLAGS+=" -D_GNU_SOURCE"
+
+       # Build the various variants of ncurses -- narrow, wide, and threaded. 
#510440
+       # Order matters here -- we want unicode/thread versions to come last so 
that the
+       # binaries in /usr/bin support both wide and narrow.
+       # The naming is also important as we use these directly with filenames 
and when
+       # checking configure flags.
+       NCURSES_TARGETS=(
+               ncurses
+               $(usev unicode 'ncursesw')
+       )
+
+       # When installing ncurses, we have to use a compatible version of tic.
+       # This comes up when cross-compiling, doing multilib builds, upgrading,
+       # or installing for the first time.  Build a local copy of tic whenever
+       # the host version isn't available. bug #249363, bug #557598
+       if ! has_version -b "~sys-libs/${P}:0" ; then
+               local lbuildflags="-static"
+
+               # some toolchains don't quite support static linking
+               local dbuildflags="-Wl,-rpath,${WORKDIR}/lib"
+               case ${CHOST} in
+                       *-darwin*)  dbuildflags=     ;;
+                       *-aix*)     dbuildflags=     ;;
+               esac
+               echo "int main() {}" | \
+                       $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& 
/dev/null \
+                       || lbuildflags="${dbuildflags}"
+
+               # We can't re-use the multilib BUILD_DIR because we run outside 
of it.
+               BUILD_DIR="${WORKDIR}" \
+               CC=${BUILD_CC} \
+               CXX=${BUILD_CXX} \
+               CPP=${BUILD_CPP} \
+               CHOST=${CBUILD} \
+               CFLAGS=${BUILD_CFLAGS} \
+               CXXFLAGS=${BUILD_CXXFLAGS} \
+               CPPFLAGS=${BUILD_CPPFLAGS} \
+               LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
+               do_configure cross --without-shared --with-normal
+       fi
+       multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+       if [[ ${ABI} == x86 ]] ; then
+               # For compatibility with older binaries at slight performance 
cost.
+               # bug #616402
+               use stack-realign && append-flags -mstackrealign
+       fi
+
+       local t
+       for t in "${NCURSES_TARGETS[@]}" ; do
+               do_configure "${t}"
+       done
+}
+
+do_configure() {
+       local target=$1
+       shift
+
+       mkdir "${BUILD_DIR}/${target}" || die
+       cd "${BUILD_DIR}/${target}" || die
+
+       local conf=(
+               # We need the basic terminfo files in /etc, bug #37026.  We will
+               # add '--with-terminfo-dirs' and then populate /etc/terminfo in
+               # src_install() ...
+               ##--with-rel-version=5.9 ??
+               --with-abi-version=5
+               
--with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
+
+               # Now the rest of the various standard flags.
+               --without-hashed-db
+               --disable-pc-files
+               --with-shared
+               --without-hashed-db
+               --without-ada
+               --without-cxx
+               --without-cxx-binding
+               --without-debug
+               --without-profile
+               # The configure script uses ldd to parse the linked output which
+               # is flaky for cross-compiling/multilib/ldd versions/etc...
+               $(use_with gpm gpm libgpm.so.1)
+               --disable-termcap
+               --enable-symlinks
+               --with-manpage-format=normal
+               --enable-const
+               --enable-colorfgbg
+               --enable-echo
+               --disable-warnings
+               --without-assertions
+               --enable-leaks
+               --without-expanded
+               --with-macros
+               --without-progs
+               --without-tests
+               --without-trace
+               $(use_with tinfo termlib)
+
+               # The chtype/mmask-t settings below are to retain ABI compat
+               # with ncurses-5.4 so dont change em !
+               --with-chtype=long
+               --with-mmask-t=long
+               --disable-ext-colors
+               --disable-ext-mouse
+               --without-{pthread,reentrant}
+       )
+
+       if [[ ${target} == ncurses*w ]] ; then
+               conf+=( --enable-widec )
+       else
+               conf+=( --disable-widec )
+       fi
+
+       # Make sure each variant goes in a unique location.
+       if [[ ${target} != "ncurses" ]] ; then
+               conf+=( --includedir="${EPREFIX}"/usr/include/${target} )
+       fi
+       # See comments in src_configure.
+       if [[ ${target} != "cross" ]] ; then
+               local cross_path="${WORKDIR}/cross"
+               [[ -d ${cross_path} ]] && export 
TIC_PATH="${cross_path}/progs/tic"
+       else
+               conf+=( --with-progs )
+       fi
+
+       ECONF_SOURCE="${S}" econf "${conf[@]}" "$@"
+}
+
+src_compile() {
+       # See comments in src_configure.
+       if ! has_version -b "~sys-libs/${P}:0" ; then
+               BUILD_DIR="${WORKDIR}" do_compile cross -C progs 
tic$(get_exeext)
+       fi
+
+       multilib-minimal_src_compile
+}
+
+multilib_src_compile() {
+       local t
+       for t in "${NCURSES_TARGETS[@]}" ; do
+               do_compile "${t}"
+       done
+}
+
+do_compile() {
+       local target=$1
+       shift
+
+       cd "${BUILD_DIR}/${target}" || die
+
+       # A little hack to fix parallel builds ... they break when
+       # generating sources so if we generate the sources first (in
+       # non-parallel), we can then build the rest of the package
+       # in parallel.  This is not really a perf hit since the source
+       # generation is quite small.
+       emake -j1 sources
+
+       # For some reason, sources depends on pc-files which depends on
+       # compiled libraries which depends on sources which ...
+       # Manually delete the pc-files file so the install step will
+       # create the .pc files we want.
+       rm -f misc/pc-files || die
+       emake "$@"
+}
+
+multilib_src_install() {
+       local target lib
+       for target in "${NCURSES_TARGETS[@]}" ; do
+               cd "${BUILD_DIR}/${target}/lib" || die
+               for lib in *5.9 ; do
+                       newlib.so "${lib}" "${lib%%.9}"
+               done
+       done
+}

Reply via email to