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@yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40567
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
NHOrus
2025-02-14 16:09:39 +04:00
committed by Sam James
parent 1f191a3a50
commit 3477a35983
3 changed files with 88 additions and 0 deletions

View File

@@ -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

View File

@@ -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
}

View File

@@ -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