commit:     5afaba988181f7c862b059fc47ba33fd237b7e85
Author:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  8 20:34:34 2024 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Sun Sep  8 20:43:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5afaba98

dev-db/kyotocabinet: add 1.2.80

Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 dev-db/kyotocabinet/Manifest                       |  1 +
 .../files/kyotocabinet-1.2.80-flags.patch          | 34 +++++++++++
 dev-db/kyotocabinet/kyotocabinet-1.2.80.ebuild     | 69 ++++++++++++++++++++++
 3 files changed, 104 insertions(+)

diff --git a/dev-db/kyotocabinet/Manifest b/dev-db/kyotocabinet/Manifest
index cc68343464c7..849036560f45 100644
--- a/dev-db/kyotocabinet/Manifest
+++ b/dev-db/kyotocabinet/Manifest
@@ -1,2 +1,3 @@
 DIST kyotocabinet-1.2.77.tar.gz 949326 BLAKE2B 
faacde57e8c7fed3fb232ea6fd12b668f2d2ee352cd357d5e16e0d1740cd8f73e223964249efeae50f3ea5d0672117b2410b91ba557ebe1ac7ba4075ac28deab
 SHA512 
f38794c11faa3f4b64097a2e314307e1a6b75ddc495103647ebe52786a689336754496e7083697417ea90436e7fad681f16440975abec9ae917874aa25153e0f
 DIST kyotocabinet-1.2.79.tar.gz 943804 BLAKE2B 
8a12e6dd953a1ba995d5a60126fb2682a07be390698bf98535633af894573aafc63b55497dc869cad14eceb14824ceb4f8c471b9aa1dad51944c35eac0cf4912
 SHA512 
9243192c81d3aa37cc8c80eb3bdf235192a0919b134cededa2b4178be515d148916e7405e094cbcdd7dbf13bf38a569bf21863afac7cc05d6418cca5853a2ff4
+DIST kyotocabinet-1.2.80.tar.gz 942543 BLAKE2B 
0a2c5e14fe1362d69d5676c9a8b203bee5a7f7c077d5a9fcb90b5697f0d0cfa5081d0547bff84493f4e1e3fdf5b263f6e4929aeae816e2f567236afaa905fd14
 SHA512 
9fe0a92c9a76db5ce06ef4d5a551c05930f2a9c065ab695b030fdaf45692bfe88d91f1b75791f50d0772c699567744cd74f3ef407172874d4bba467989d54328

diff --git a/dev-db/kyotocabinet/files/kyotocabinet-1.2.80-flags.patch 
b/dev-db/kyotocabinet/files/kyotocabinet-1.2.80-flags.patch
new file mode 100644
index 000000000000..d331bca2c55f
--- /dev/null
+++ b/dev-db/kyotocabinet/files/kyotocabinet-1.2.80-flags.patch
@@ -0,0 +1,34 @@
+--- a/configure.in
++++ b/configure.in
+@@ -202,28 +202,6 @@ test -n "$LDFLAGS" && MYLDFLAGS="$LDFLAGS $MYLDFLAGS"
+ # Byte order
+ AC_C_BIGENDIAN(MYCPPFLAGS="$MYCPPFLAGS -D_MYBIGEND")
+ 
+-# System-depending optimization
+-printf 'checking for 64-bit availability... '
+-if printf 'int main(void) {return 0;}' | $CC -xc -m64 -o config.tmp - 
>config.tmp 2>&1
+-then
+-  MYCFLAGS="-m64 $MYCFLAGS"
+-  MYCXXFLAGS="-m64 $MYCXXFLAGS"
+-  printf 'yes\n'
+-else
+-  printf 'no\n'
+-fi
+-if test "$enable_opt" != "no"
+-then
+-  printf 'checking for CPU optimization availability... '
+-  if printf 'int main(void) {return 0;}' | $CC -xc -march=native -o 
config.tmp - >config.tmp 2>&1
+-  then
+-    MYCFLAGS="-march=native $MYCFLAGS"
+-    MYCXXFLAGS="-march=native $MYCXXFLAGS"
+-    printf 'yes\n'
+-  else
+-    printf 'no\n'
+-  fi
+-fi
+ printf 'checking for useless warnings... '
+ if printf 'int main(void) {return 0;}' | $CC -xc \
+   -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -o config.tmp - 
>config.tmp 2>&1
+-- 
+2.44.2
+

diff --git a/dev-db/kyotocabinet/kyotocabinet-1.2.80.ebuild 
b/dev-db/kyotocabinet/kyotocabinet-1.2.80.ebuild
new file mode 100644
index 000000000000..3872117c7f2c
--- /dev/null
+++ b/dev-db/kyotocabinet/kyotocabinet-1.2.80.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="A straightforward implementation of DBM"
+HOMEPAGE="https://dbmx.net/kyotocabinet/";
+SRC_URI="https://dbmx.net/kyotocabinet/pkg/${P}.tar.gz";
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv 
~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="debug doc examples +lzma +lzo static-libs"
+
+DEPEND="sys-libs/zlib[static-libs?]
+       lzma? ( app-arch/xz-utils:=[static-libs?] )
+       lzo? ( dev-libs/lzo:=[static-libs?] )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/fix_configure-1.2.62.patch
+       "${FILESDIR}"/${PN}-1.2.76-configure-8-byte-atomics.patch
+       "${FILESDIR}"/${PN}-1.2.80-flags.patch
+       "${FILESDIR}"/${PN}-1.2.79-initialize-parameter-error-clang16.patch
+)
+
+src_prepare() {
+       default
+
+       sed -i -e "/DOCDIR/d" Makefile.in || die
+       tc-export AR
+
+       mv configure.in configure.ac || die
+       eautoreconf
+}
+
+src_configure() {
+       # We need to set LD_LIBRARY_PATH which will be assigned to RUNENV later
+       # used by test suite
+       LD_LIBRARY_PATH=. \
+       econf $(use_enable debug) \
+               $(use_enable static-libs static) \
+               $(use_enable !static-libs shared) \
+               $(use_enable lzma) \
+               $(use_enable lzo)
+}
+
+src_test() {
+       emake -j1 check
+}
+
+src_install() {
+       default
+
+       if ! use static-libs; then
+               find "${ED}" -name '*.a' -delete || die
+       fi
+
+       if use doc; then
+               dodoc -r doc/*
+       fi
+
+       if use examples; then
+               docinto example
+               dodoc example/*
+       fi
+}

Reply via email to