From b47cdd36980d728e1dca6a1a3471b19e44963ca4 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Mon, 7 Aug 2023 22:50:18 -0700 Subject: [PATCH] New package: libxcrypt-4.4.36 --- common/shlibs | 1 + srcpkgs/libxcrypt-compat | 1 + srcpkgs/libxcrypt-devel | 1 + srcpkgs/libxcrypt/template | 72 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+) create mode 120000 srcpkgs/libxcrypt-compat create mode 120000 srcpkgs/libxcrypt-devel create mode 100644 srcpkgs/libxcrypt/template diff --git a/common/shlibs b/common/shlibs index 972c52c8f3b..0acb37e3602 100644 --- a/common/shlibs +++ b/common/shlibs @@ -43,6 +43,7 @@ libnss_dns.so.2 glibc-2.36_1 libnss_hesiod.so.2 glibc-2.36_1 libcrypt.so.1 glibc-2.36_1 libBrokenLocale.so.1 glibc-2.36_1 +libcrypt.so.2 libxcrypt-4.4.36_1 libSimGearCore.so.2020.3.17 simgear-2020.3.17_1 libSimGearScene.so.2020.3.17 simgear-2020.3.17_1 libmemusage.so glibc-2.36_1 diff --git a/srcpkgs/libxcrypt-compat b/srcpkgs/libxcrypt-compat new file mode 120000 index 00000000000..4ed34b8a6a4 --- /dev/null +++ b/srcpkgs/libxcrypt-compat @@ -0,0 +1 @@ +libxcrypt \ No newline at end of file diff --git a/srcpkgs/libxcrypt-devel b/srcpkgs/libxcrypt-devel new file mode 120000 index 00000000000..4ed34b8a6a4 --- /dev/null +++ b/srcpkgs/libxcrypt-devel @@ -0,0 +1 @@ +libxcrypt \ No newline at end of file diff --git a/srcpkgs/libxcrypt/template b/srcpkgs/libxcrypt/template new file mode 100644 index 00000000000..0b7b6fc5bfd --- /dev/null +++ b/srcpkgs/libxcrypt/template @@ -0,0 +1,72 @@ +# Template file for 'libxcrypt' +pkgname=libxcrypt +version=4.4.36 +revision=1 +archs="~*-musl" +build_style=gnu-configure +configure_args="--enable-hashes=all --disable-failure-tokens --enable-obsolete-api=no" +hostmakedepends="perl-bootstrap" +checkdepends="python3-passlib" +short_desc="Modern library for one-way hashing of passwords" +maintainer="oreo639 " +license="LGPL-2.1-or-later, BSD-3-Clause, BSD-2-Clause, 0BSD, Public Domain" +homepage="https://github.com/besser82/libxcrypt" +distfiles="https://github.com/besser82/libxcrypt/releases/download/v${version}/libxcrypt-${version}.tar.xz" +checksum=e5e1f4caee0a01de2aee26e3138807d6d3ca2b8e67287966d1fefd65e1fd8943 +make_cmd="make -C build" + +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + broken="musl already provides libcrypt" +fi + +do_configure() { + [ ! -d ${configure_builddir:=build} ] && mkdir -p ${configure_builddir} + cd ${configure_builddir} + ../configure ${configure_args} +} + +post_configure() { + configure_args="${configure_args/--enable-obsolete-api=no/} --enable-obsolete-api=glibc" + configure_builddir="compat-build" + do_configure +} + +post_build() { + make_cmd="make -C compat-build" + do_build +} + +post_check() { + make_cmd="make -C compat-build" + do_check +} + +pre_install() { + make -C compat-build DESTDIR=${DESTDIR} install + + # Don't install development files from the compat library + rm -r ${DESTDIR}/usr/{include,lib/{lib*.so,pkgconfig},share} +} + +post_install() { + vlicense LICENSING +} + +libxcrypt-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/lib/pkgconfig + vmove usr/include + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + vmove usr/share + } +} + +libxcrypt-compat_package() { + short_desc+=" - legacy compatibility" + pkg_install() { + vmove usr/lib/libcrypt.so.1* + } +}