From 840eef562eb4a15b2d202689479b984ef3e77d17 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:14:38 +0100 Subject: [PATCH] app-crypt/rhash: Sync with gentoo It's from gentoo commit be3ac74c8316881622238f55bc498d5886bef527. --- .../portage-stable/app-crypt/rhash/Manifest | 2 +- .../rhash/files/darwin-triplet.patch | 23 +++++ .../rhash/files/freebsd-triplet.patch | 23 +++++ .../rhash/files/rhash-1.4.2-clang.patch | 80 ++++++++++++++++ .../app-crypt/rhash/metadata.xml | 3 +- .../app-crypt/rhash/rhash-1.3.5.ebuild | 94 ------------------- .../app-crypt/rhash/rhash-1.3.6-r1.ebuild | 12 +-- .../app-crypt/rhash/rhash-1.4.2.ebuild | 86 +++++++++++++++++ 8 files changed, 221 insertions(+), 102 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/darwin-triplet.patch create mode 100644 sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/freebsd-triplet.patch create mode 100644 sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/rhash-1.4.2-clang.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.5.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.4.2.ebuild diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/Manifest b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/Manifest index f3404d7c09..29794e046d 100644 --- a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/Manifest @@ -1,2 +1,2 @@ -DIST rhash-1.3.5-src.tar.gz 316867 BLAKE2B 3ffbf2ec5aef24ef63455e21c3efcae043a321a78be522a26bd25086111430071a496ab3775ff9b4956da7304df8d8e552a061f3306a7a683be5fc65ea3fd1c4 SHA512 e8450aab0c16bfb975bf4aeee218740fb4d86d5514e426b70c3edb84e4d63865cd4051939aa95c24a87a78baaedc49e40bb509b2610e89ca3745930808b3ef6c DIST rhash-1.3.6-src.tar.gz 328097 BLAKE2B c74993d183f0f2e479f0bd5831a9f653b9bd17bbed4d1ba896f6e33db98b7141175cd3c688dc41dfd8ec4b98acb51255ae5b795435cbc9dfb5ab77573cb25543 SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6 +DIST rhash-1.4.2-src.tar.gz 416853 BLAKE2B 06322825116cb00aa4987b01610d967eb57c94aa29b43348ec2c31f053fd471a900fcee776714263213e9a79eaf389b2e79d7b34a5afd3e98d68198193b5cbe7 SHA512 41df57e8b3f32c93d8e6f2ac668b32aaa23eb2eaf90a83f109e61e511404a5036ea88bcf2854e19c1ade0f61960e0d9edf01f3d82e1c645fed36579e9d7a6a25 diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/darwin-triplet.patch b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/darwin-triplet.patch new file mode 100644 index 0000000000..49b7e121d8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/darwin-triplet.patch @@ -0,0 +1,23 @@ +From 35a830d1968465e4ecb079273f032b754bac6c66 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sun, 25 Mar 2018 17:40:49 +0100 +Subject: [PATCH] configure: Add target OS clause for Darwin + +These triplets can also have a version number suffix, for example, +x86_64-apple-darwin16. +--- + configure | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure b/configure +index 5b6b710..2d8ac42 100755 +--- a/configure ++++ b/configure +@@ -410,6 +410,7 @@ else + amigaos) TARGET_OS=AmigaOS ;; + mingw32*) TARGET_OS=MINGW32 ;; + wine) TARGET_OS=Wine ;; ++ darwin*) TARGET_OS=Darwin ;; + esac + } + TARGET_OS="UNKNOWN" diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/freebsd-triplet.patch b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/freebsd-triplet.patch new file mode 100644 index 0000000000..94b615824b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/freebsd-triplet.patch @@ -0,0 +1,23 @@ +From 14db7f9ee87e05450853ba0e1d8e83cc34aef3e4 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sat, 24 Mar 2018 13:51:56 +0000 +Subject: [PATCH] configure: Match FreeBSD triplets with versions + +Triplets such as x86_64-unknown-freebsd11.1 are common. +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 8ebb929..5b6b710 100755 +--- a/configure ++++ b/configure +@@ -398,7 +398,7 @@ else + part=$(echo $BUILD_TARGET | cut -d '-' -f $component) + case "$(echo $part | tr '[A-Z]' '[a-z]')" in + linux) TARGET_OS=Linux ;; +- freebsd) TARGET_OS=FreeBSD ;; ++ freebsd*) TARGET_OS=FreeBSD ;; + gnu/kfreebsd) TARGET_OS=FreeBSD ;; + netbsd) TARGET_OS=NetBSD ;; + bsd/os) TARGET_OS=BSD/OS ;; diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/rhash-1.4.2-clang.patch b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/rhash-1.4.2-clang.patch new file mode 100644 index 0000000000..460e73a6ac --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/rhash-1.4.2-clang.patch @@ -0,0 +1,80 @@ +From 4dc506066cf1727b021e6352535a8bb315c3f8dc Mon Sep 17 00:00:00 2001 +From: Aleksey +Date: Sat, 17 Jul 2021 18:39:41 +0300 +Subject: [PATCH] configure: fix clang detection on macOS + +--- + configure | 58 +++++++++++++++++++++++++++---------------------------- + 1 file changed, 28 insertions(+), 30 deletions(-) + +diff --git a/configure b/configure +index 59d432b..111270a 100755 +--- a/configure ++++ b/configure +@@ -519,38 +519,36 @@ else + elif run_cmd "$CC --version"; then + cc_name_tmp=$($CC --version 2>&1 | head -n 1 | cut -d ' ' -f 1) + fi +- if test -n "${cc_name_tmp}"; then +- if echo "$cc_name_tmp" | grep -q "gcc"; then +- cc_name=$cc_name_tmp +- start_check "$CC version" +- cc_vendor=gnu +- cc_version=$($CC -dumpversion 2>&1) +- if ! echo $cc_version | grep -q '^[0-9][0-9]*\.[0-9]'; then +- cc_v2=$($CC -dumpfullversion -dumpversion 2>/dev/null) +- if echo $cc_v2 | grep -q '^[0-9][0-9]*\.[0-9]'; then +- cc_version=$cc_v2 +- fi ++ if echo "$cc_name_tmp" | grep -q "gcc"; then ++ cc_name=$cc_name_tmp ++ start_check "$CC version" ++ cc_vendor=gnu ++ cc_version=$($CC -dumpversion 2>&1) ++ if ! echo $cc_version | grep -q '^[0-9][0-9]*\.[0-9]'; then ++ cc_v2=$($CC -dumpfullversion -dumpversion 2>/dev/null) ++ if echo $cc_v2 | grep -q '^[0-9][0-9]*\.[0-9]'; then ++ cc_version=$cc_v2 + fi +- case $cc_version in +- 2.96*) +- cc_fail=yes +- ;; +- *) +- _cc_major=$(echo $cc_version | cut -d '.' -f 1) +- _cc_minor=$(echo $cc_version | cut -d '.' -f 2) +- _cc_mini=$(echo $cc_version | cut -d '.' -f 3) +- ;; +- esac +- finish_check "$cc_name $cc_version" +- break +- fi +- if echo "$cc_name_tmp" | grep -q "clang"; then +- start_check "$CC version" +- cc_vendor=clang +- cc_version=$($CC -dumpversion 2>&1) +- finish_check "clang $cc_version" +- break + fi ++ case $cc_version in ++ 2.96*) ++ cc_fail=yes ++ ;; ++ *) ++ _cc_major=$(echo $cc_version | cut -d '.' -f 1) ++ _cc_minor=$(echo $cc_version | cut -d '.' -f 2) ++ _cc_mini=$(echo $cc_version | cut -d '.' -f 3) ++ ;; ++ esac ++ finish_check "$cc_name $cc_version" ++ break ++ elif $CC --version 2>&1 | grep -q "clang"; then ++ start_check "$CC version" ++ cc_vendor=clang ++ cc_version=$($CC -dumpversion 2>&1) ++ finish_check "clang $cc_version" ++ break ++ else + cc_name_tmp=$($CC -V 2>&1 | head -n 1 | cut -d ' ' -f 2,3) + if test "$cc_name_tmp" = "Sun C"; then + start_check "$CC version" diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/metadata.xml b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/metadata.xml index a6651d883c..95929f11fd 100644 --- a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/metadata.xml @@ -1,5 +1,5 @@ - + chewi@gentoo.org @@ -8,6 +8,7 @@ rhash rhash/RHash + cpe:/a:rhash_project:rhash https://github.com/rhash/RHash/issues diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.5.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.5.ebuild deleted file mode 100644 index 20186f92ba..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.5.ebuild +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs multilib-minimal - -DESCRIPTION="Console utility and library for computing and verifying file hash sums" -HOMEPAGE="http://rhash.anz.ru/" -SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" -IUSE="debug nls libressl ssl static-libs" - -RDEPEND=" - ssl? ( - !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) -)" - -DEPEND="${RDEPEND} - nls? ( sys-devel/gettext )" - -S="${WORKDIR}/RHash-${PV}" - -src_prepare() { - default - - # Install /etc stuff inside the Prefix - sed -i -e 's:\$(DESTDIR)/etc:\$(DESTDIR)/$(SYSCONFDIR):g' Makefile || die - - if use elibc_Darwin ; then - local ver_script='-Wl,--version-script,exports.sym,-soname,$(SONAME)' - local install_name='-install_name $(LIBDIR)/$(SONAME)' - sed -i -e '/^\(SONAME\|SHAREDLIB\)/s/\.so\.\([0-9]\+\)/.\1.dylib/' \ - -e '/^SOLINK/s/\.so/.dylib/' \ - -e "s:${ver_script}:${install_name}:" \ - librhash/Makefile \ - Makefile || die - fi - - if use elibc_SunOS ; then - # https://sourceware.org/bugzilla/show_bug.cgi?id=12548 - # skip the export.sym for now - sed -i -e 's/,--version-script,exports.sym//' librhash/Makefile || die - fi - - multilib_copy_sources -} - -multilib_src_compile() { - local ADDCFLAGS=( - $(use debug || echo -DNDEBUG) - $(use nls && echo -DUSE_GETTEXT) - $(use ssl && echo -DOPENSSL_RUNTIME -rdynamic) - ) - - local ADDLDFLAGS=( - $(use ssl && echo -ldl) - ) - - use elibc_Darwin || use elibc_DragonFly || - use elibc_NetBSD || use elibc_OpenBSD || use elibc_SunOS && - ADDLDFLAGS+=( $(use nls && echo -lintl) ) - - emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" \ - ADDCFLAGS="${ADDCFLAGS[*]}" ADDLDFLAGS="${ADDLDFLAGS[*]}" \ - PREFIX="${EPREFIX}"/usr LIBDIR='$(PREFIX)'/$(get_libdir) \ - build-shared $(use static-libs && echo lib-static) -} - -myemake() { - emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr \ - LIBDIR='$(PREFIX)'/$(get_libdir) SYSCONFDIR="${EPREFIX}"/etc "${@}" -} - -multilib_src_install() { - myemake -C librhash install-lib-shared install-so-link - multilib_is_native_abi && myemake install-shared - use static-libs && myemake install-lib-static -} - -multilib_src_install_all() { - myemake -C librhash install-headers - use nls && myemake install-gmo - einstalldocs -} - -multilib_src_test() { - cd tests || die - LD_LIBRARY_PATH=$(pwd)/../librhash ./test_rhash.sh --full ../rhash_shared || die "tests failed" -} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.6-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.6-r1.ebuild index 24efa67054..9dfdd81943 100644 --- a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.6-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.6-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -6,18 +6,17 @@ EAPI=6 inherit toolchain-funcs multilib-minimal DESCRIPTION="Console utility and library for computing and verifying file hash sums" -HOMEPAGE="http://rhash.anz.ru/" +HOMEPAGE="http://rhash.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x64-solaris ~x86-solaris" -IUSE="debug nls libressl ssl static-libs" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" +IUSE="debug nls ssl static-libs" RDEPEND=" ssl? ( - !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) + dev-libs/openssl:0=[${MULTILIB_USEDEP}] )" DEPEND="${RDEPEND} @@ -28,6 +27,7 @@ S="${WORKDIR}/RHash-${PV}" PATCHES=( "${FILESDIR}"/unquote-cc.patch "${FILESDIR}"/${P}-no_echon.patch + "${FILESDIR}"/{freebsd,darwin}-triplet.patch ) src_prepare() { diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.4.2.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.4.2.ebuild new file mode 100644 index 0000000000..efcfab85db --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.4.2.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs multilib-minimal + +DESCRIPTION="Console utility and library for computing and verifying file hash sums" +HOMEPAGE="http://rhash.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug nls ssl static-libs" + +RDEPEND=" + ssl? ( + dev-libs/openssl:0=[${MULTILIB_USEDEP}] +)" + +DEPEND=" + ${RDEPEND} +" + +BDEPEND=" + nls? ( sys-devel/gettext ) +" + +S="${WORKDIR}/RHash-${PV}" + +PATCHES=( + "${FILESDIR}"/${P}-clang.patch +) + +src_prepare() { + default + + if [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] ; then + # we lack posix_memalign + sed -i -e '/if _POSIX_VERSION/s/if .*$/if 0/' \ + librhash/util.h || die + fi + + multilib_copy_sources +} + +multilib_src_configure() { + set -- \ + ./configure \ + --target="${CHOST}" \ + --cc="$(tc-getCC)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + --prefix="${EPREFIX}"/usr \ + --libdir="${EPREFIX}"/usr/$(get_libdir) \ + --sysconfdir="${EPREFIX}"/etc \ + --disable-openssl-runtime \ + --disable-static \ + --enable-lib-shared \ + $(use_enable debug) \ + $(use_enable nls gettext) \ + $(use_enable ssl openssl) \ + $(use_enable static-libs lib-static) + + echo "${@}" + "${@}" || die "configure failed" +} + +# We would add compile-gmo to the build targets but install-gmo always +# recompiles unconditionally. :( +# (note from sam: this might be fixed in >1.4.2? +# https://github.com/rhash/RHash/commit/9e4eeb1268149b24b7fbe0fc0fe91e3a266e6261) + +multilib_src_install() { + # -j1 needed due to race condition. + emake DESTDIR="${D}" -j1 \ + install{,-lib-headers,-pkg-config} \ + $(use nls && echo install-gmo) \ + $(use kernel_Winnt || echo install-lib-so-link) +} + +multilib_src_test() { + emake test +}