diff options
author | 2022-10-18 20:18:35 +0300 | |
---|---|---|
committer | 2022-10-19 04:14:13 +0100 | |
commit | 884319a75efc97f367338fc9d2f099e7bc1b2b6b (patch) | |
tree | 256600a7bc57e43c99e3caacbe60d013aac0c36e /sys-libs/libxcrypt | |
parent | font.eclass: check for dir existence in _update_fontcache (diff) | |
download | gentoo-884319a75efc97f367338fc9d2f099e7bc1b2b6b.tar.gz gentoo-884319a75efc97f367338fc9d2f099e7bc1b2b6b.tar.bz2 gentoo-884319a75efc97f367338fc9d2f099e7bc1b2b6b.zip |
sys-libs/libxcrypt: add headers-only install
While bootstrapping a pure LLVM based toolchain, compiler-rt-sanitizers
depends on crypt.h, but libxcrypt cannot be built yet because
it requires a working compiler runtime, so the solution is:
1. Install libxcrypt headers-only
2. Build compiler-rt-sanitizers & the rest of llvm/clang
3. Build full libxcrypt
Thus we add the ability to install libxcrypt headers-only,
similar to how glibc does it.
Closes: https://bugs.gentoo.org/877567
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Closes: https://github.com/gentoo/gentoo/pull/27840
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/libxcrypt')
-rw-r--r-- | sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild | 18 | ||||
-rw-r--r-- | sys-libs/libxcrypt/metadata.xml | 1 |
2 files changed, 17 insertions, 2 deletions
diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild index 3f390bf67ca3..430e3dc385ed 100644 --- a/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild +++ b/sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild @@ -21,7 +21,7 @@ fi LICENSE="LGPL-2.1+ public-domain BSD BSD-2" SLOT="0/1" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="+compat split-usr static-libs system test" +IUSE="+compat split-usr static-libs system test headers-only" REQUIRED_USE="split-usr? ( system )" RESTRICT="!test? ( test )" @@ -209,10 +209,18 @@ multilib_src_configure() { *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";; esac - ECONF_SOURCE="${S}" econf "${myconf[@]}" + if use headers-only; then + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC is sane. + headers_only_flags="CC=$(tc-getBUILD_CC)" + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" "${headers_only_flags}" } src_compile() { + use headers-only && return + multibuild_foreach_variant multilib-minimal_src_compile } @@ -227,6 +235,7 @@ src_test() { src_install() { multibuild_foreach_variant multilib-minimal_src_install + use headers-only || \ ( shopt -s failglob || die "failglob failed" @@ -250,6 +259,11 @@ src_install() { } multilib_src_install() { + if use headers-only; then + emake DESTDIR="${D}" install-nodist_includeHEADERS + return + fi + emake DESTDIR="${D}" install # Don't install the libcrypt.so symlink for the "compat" version diff --git a/sys-libs/libxcrypt/metadata.xml b/sys-libs/libxcrypt/metadata.xml index 36921daf30b5..cef5e501f632 100644 --- a/sys-libs/libxcrypt/metadata.xml +++ b/sys-libs/libxcrypt/metadata.xml @@ -13,6 +13,7 @@ <use> <flag name="compat">Build with compatibility interfaces for other crypt implementations</flag> <flag name="system">Install as system libcrypt.so rather than to an alternate directory (will collide with <pkg>sys-libs/glibc</pkg>'s version)</flag> + <flag name="headers-only">Build and install only the headers.</flag> </use> <upstream> <remote-id type="github">besser82/libxcrypt</remote-id> |