commit:     3477a359837b2d9e363cbe943580d0e7b807ea95
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Fri Feb 14 12:09:39 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 19 11:15:51 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3477a359

net-libs/canlock: add 3.3.1, QA_SKIP Annex K functions

Also, transform sed to patch and correctly explain what this patch
does and why: removes building of a test executable that's dependent
on static libraries

Closes: https://bugs.gentoo.org/900086
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40567
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/canlock/Manifest                          |  1 +
 net-libs/canlock/canlock-3.3.1.ebuild              | 63 ++++++++++++++++++++++
 .../files/canlock-3.3.1-disable-shatest.patch      | 24 +++++++++
 3 files changed, 88 insertions(+)

diff --git a/net-libs/canlock/Manifest b/net-libs/canlock/Manifest
index 59fb34a61891..2ff935d2fcc0 100644
--- a/net-libs/canlock/Manifest
+++ b/net-libs/canlock/Manifest
@@ -1 +1,2 @@
 DIST libcanlock-3.3.0.tar.bz2 625796 BLAKE2B 
001512a6d2d226aed93882de8d8f4f02a066cc67e6f21b411b8e1ee2ff0d4580732c90a6fc2756a79f992629cd18fbc319510960c39f33284c86bebfed3d4216
 SHA512 
100d2b4bf3eadedb7da230317cd37b2c1b259bbd783099a74e0d75fdc6ecddb8a6fd854a2b272bda3629bcf1ac1ae2b3d5657fca9137c17e38aad88f30e4c81c
+DIST libcanlock-3.3.1.tar.bz2 636161 BLAKE2B 
dc0f58eb3f4b745aeff4e495f58f7821b0b3580dad53c6c7d77a9cfe8042ec757aade0938db3a05713c9a646922890c2a0130c579df110b632179a8a1c043864
 SHA512 
31ce1b46d38ab673607952fa6885da5a5b6a324e1ca791ae54cdd180c5e8809562c72443073f8a0cbdce6dc0f54742fd0845e46f7b58f0ef63a9207b51b2b2cc

diff --git a/net-libs/canlock/canlock-3.3.1.ebuild 
b/net-libs/canlock/canlock-3.3.1.ebuild
new file mode 100644
index 000000000000..fab41df475c8
--- /dev/null
+++ b/net-libs/canlock/canlock-3.3.1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="A library for creating and verifying Usenet cancel locks"
+HOMEPAGE="https://micha.freeshell.org/libcanlock/";
+SRC_URI="https://micha.freeshell.org/lib${PN}/src/lib${P}.tar.bz2";
+S="${WORKDIR}/lib${P}"
+
+LICENSE="BSD MIT"
+SLOT="0/3"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="header-parser +legacy"
+
+BDEPEND="
+       app-alternatives/lex
+       app-alternatives/yacc
+"
+
+DOCS=( ChangeLog{,_V{0..2}} README TODO doc/sec_review.txt )
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+       # Annex K functions, bug #900086
+       # optional, not implemented anywhere we care about
+       memset_s
+       explicit_memset
+)
+
+PATCHES=( "${FILESDIR}/${P}-disable-shatest.patch" )
+
+src_prepare() {
+       default
+
+       eautoreconf
+}
+
+src_configure() {
+       local econf_args=(
+               --enable-pc-files
+               $(use_enable header-parser hp)
+               $(use_enable legacy legacy-api)
+       )
+
+       econf "${econf_args[@]}"
+}
+
+src_test() {
+       emake check
+}
+
+src_install() {
+       default
+       find "${ED}" -name '*.la' -delete || die
+
+       # keep old header location for compability with canlock v2
+       use legacy && dosym ./libcanlock-3/canlock.h /usr/include/canlock.h
+
+       # required for =net-nntp/tin-2.6.0
+       dosym ./libcanlock-3.pc /usr/$(get_libdir)/pkgconfig/libcanlock3.pc
+}

diff --git a/net-libs/canlock/files/canlock-3.3.1-disable-shatest.patch 
b/net-libs/canlock/files/canlock-3.3.1-disable-shatest.patch
new file mode 100644
index 000000000000..c9b1d425b870
--- /dev/null
+++ b/net-libs/canlock/files/canlock-3.3.1-disable-shatest.patch
@@ -0,0 +1,24 @@
+shatest depends on static library, we don't build this package static
+Transformed from sed
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -41,10 +41,10 @@
+ # 
==============================================================================
+ # Rules to build test programs
+ 
+-check_PROGRAMS = shatest canlocktest canlocktest_multi canlocktest_legacy
++check_PROGRAMS = canlocktest canlocktest_multi canlocktest_legacy
+ CLEANFILES = shatest_check.sh
+ 
+ # This is required because shatest always return 0 status (even if tests 
failed)
+ check_SCRIPTS = shatest_check.sh
+ 
+ # Attention: Linking against the static library is intended here!
+@@ -72,6 +72,6 @@
+ # 
==============================================================================
+ # Executables to run for "make check"
+ 
+-TESTS = shatest shatest_check.sh canlocktest canlocktest_multi \
++TESTS = shatest_check.sh canlocktest canlocktest_multi \
+         canlocktest_legacy
+ 

Reply via email to