Skip to content

Commit 6440735

Browse files
committed
app-crypt/mhash: Sync with Gentoo
It's from Gentoo commit 6d2df6f4b71756f49d6afeb99ef76b693bd39742.
1 parent 4a91665 commit 6440735

File tree

4 files changed

+38
-10
lines changed

4 files changed

+38
-10
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
https://sourceforge.net/p/mhash/patches/11/
2+
3+
Compiling mhash-0.9.9.9 on platforms (like AIX) without GNU libc compatible malloc leads to undefined symbol rpl_malloc
4+
when linking the in-mhash executables drver, frag_test, rest_test, hmac_test, keygen_test.
5+
6+
Reason is that configure.in still contains AC_FUNC_MALLOC, detecting need
7+
to "#define malloc rpl_malloc", while mhash does not provide a rpl_malloc implementation.
8+
9+
As the only use of malloc() in lib/stdfns.c does not rely on GNU libc
10+
compatible malloc actually, there is no need to check for one.
11+
--- a/configure.in
12+
+++ b/configure.in
13+
@@ -64,7 +64,6 @@ AC_CHECK_HEADERS(signal.h stdint.h stdio.h stdlib.h string.h strings.h)
14+
15+
dnl Checks for functions
16+
17+
-AC_FUNC_MALLOC
18+
AC_FUNC_MEMCMP
19+
20+
AC_CHECK_FUNCS(bcopy bzero)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Libs:-lmhash
2+
Name: mhash
3+
Version: @VERSION@
4+
Description: provides a uniform interface to several hash algorithms

sdk_container/src/third_party/portage-stable/app-crypt/mhash/metadata.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
33
<pkgmetadata>
44
<!-- maintainer-needed -->
5-
<upstream>
6-
<remote-id type="sourceforge">mhash</remote-id>
5+
<upstream>
6+
<remote-id type="sourceforge">mhash</remote-id>
77
</upstream>
88
</pkgmetadata>

sdk_container/src/third_party/portage-stable/app-crypt/mhash/mhash-0.9.9.9-r2.ebuild renamed to sdk_container/src/third_party/portage-stable/app-crypt/mhash/mhash-0.9.9.9-r3.ebuild

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Copyright 1999-2021 Gentoo Authors
1+
# Copyright 1999-2023 Gentoo Authors
22
# Distributed under the terms of the GNU General Public License v2
33

4-
EAPI=7
4+
EAPI=8
55

66
inherit autotools
77

88
DESCRIPTION="Library providing a uniform interface to a large number of hash algorithms"
9-
HOMEPAGE="http://mhash.sourceforge.net/"
9+
HOMEPAGE="https://mhash.sourceforge.net/"
1010
SRC_URI="mirror://sourceforge/mhash/${P}.tar.gz"
1111

12-
LICENSE="GPL-2"
12+
LICENSE="GPL-2+"
1313
SLOT="0"
14-
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
14+
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
1515
IUSE="static-libs"
1616

1717
BDEPEND="dev-lang/perl" # pod2html
@@ -25,6 +25,7 @@ PATCHES=(
2525
"${FILESDIR}"/${P}-force64bit-tiger.patch
2626
"${FILESDIR}"/${P}-align.patch
2727
"${FILESDIR}"/${P}-alignment.patch
28+
"${FILESDIR}"/${P}-no-malloc-check.patch
2829
)
2930

3031
DOCS=( doc/example.c doc/skid2-authentication )
@@ -38,16 +39,17 @@ src_prepare() {
3839
-e 's/--netscape//' \
3940
"${S}"/doc/Makefile.in || die
4041

42+
sed \
43+
-e "s:@VERSION@:${PV}:" \
44+
"${FILESDIR}"/${PN}.pc > ${PN}.pc || die
45+
4146
# Refresh bundled libtool (ltmain.sh)
4247
# (elibtoolize is not sufficient)
4348
# bug #668666
4449
eautoreconf
4550
}
4651

4752
src_configure() {
48-
# https://sourceforge.net/p/mhash/patches/11/
49-
export ac_cv_func_malloc_0_nonnull=yes
50-
5153
econf $(use_enable static-libs static)
5254
}
5355

@@ -59,5 +61,7 @@ src_compile() {
5961

6062
src_install() {
6163
default
64+
insinto /usr/$(get_libdir)/pkgconfig
65+
doins ${PN}.pc
6266
find "${ED}" -name '*.la' -delete || die
6367
}

0 commit comments

Comments
 (0)