* [gentoo-commits] repo/gentoo:master commit in: net-libs/canlock/files/, net-libs/canlock/
@ 2020-02-09 18:50 David Seifert
0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2020-02-09 18:50 UTC (permalink / raw
To: gentoo-commits
commit: 3ada0824ef15d33b4347b84cfafc1dd96404eb2f
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 9 18:49:45 2020 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Feb 9 18:49:45 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ada0824
net-libs/canlock: Port to EAPI 7
Package-Manager: Portage-2.3.88, Repoman-2.3.20
Signed-off-by: David Seifert <soap <AT> gentoo.org>
net-libs/canlock/canlock-2b.ebuild | 36 ++++++++----------
net-libs/canlock/files/canlock-2b-make.patch | 56 +++++++++++++++-------------
2 files changed, 47 insertions(+), 45 deletions(-)
diff --git a/net-libs/canlock/canlock-2b.ebuild b/net-libs/canlock/canlock-2b.ebuild
index 9d58b0a2dc6..d54ed58f370 100644
--- a/net-libs/canlock/canlock-2b.ebuild
+++ b/net-libs/canlock/canlock-2b.ebuild
@@ -1,43 +1,39 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=7
-inherit eutils multilib toolchain-funcs
+inherit toolchain-funcs
MY_P="${P/-/_}"
+
DESCRIPTION="A library for creating and verifying Usenet cancel locks"
HOMEPAGE="https://packages.qa.debian.org/c/canlock.html"
-SRC_URI="mirror://debian/pool/main/c/${PN}/${MY_P}.orig.tar.gz
+SRC_URI="
+ mirror://debian/pool/main/c/${PN}/${MY_P}.orig.tar.gz
mirror://debian/pool/main/c/${PN}/${MY_P}-6.diff.gz"
LICENSE="BSD MIT"
SLOT="0"
KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
-IUSE="static-libs"
-
-S=${WORKDIR}/${P/-/}
-src_prepare() {
- epatch "${WORKDIR}"/${MY_P}-6.diff \
- "${FILESDIR}"/${P}-make.patch
-}
+S="${WORKDIR}/${P/-/}"
-src_compile() {
- local targets="shared"
- if use static-libs || use test ; then
- targets+=" static"
- fi
+PATCHES=(
+ "${WORKDIR}"/${MY_P}-6.diff
+ "${FILESDIR}"/${P}-make.patch
+)
- emake CC="$(tc-getCC)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" ${targets}
+src_configure() {
+ tc-export CC
}
src_install() {
- use static-libs && dolib.a src/libcanlock.a
dolib.so src/libcanlock.so.2.0.0
dosym libcanlock.so.2.0.0 /usr/$(get_libdir)/libcanlock.so.2
dosym libcanlock.so.2.0.0 /usr/$(get_libdir)/libcanlock.so
- insinto /usr/include
- doins include/canlock.h
+
+ doheader include/canlock.h
+
dodoc CHANGES README doc/HOWTO
}
diff --git a/net-libs/canlock/files/canlock-2b-make.patch b/net-libs/canlock/files/canlock-2b-make.patch
index 492b88bee14..da90c738af6 100644
--- a/net-libs/canlock/files/canlock-2b-make.patch
+++ b/net-libs/canlock/files/canlock-2b-make.patch
@@ -1,30 +1,30 @@
---- canlock2b/Makefile
-+++ canlock2b/Makefile
-@@ -1,33 +1,35 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,38 +1,39 @@
-CFLAGS = -Iinclude
-LDFLAGS = -L. -lcanlock
-+CFLAGS += -Iinclude
-+LIBS = -L. -lcanlock
- CC = gcc
+-CC = gcc
-STATIC_LIB = libcanlock.a
++CPPFLAGS += -Iinclude
++LDLIBS = -L./src -lcanlock
-all: hmactest canlocktest $(STATIC_LIB)
-+all: shared static
++all: shared
-sha1test: t/sha1test.c $(STATIC_LIB)
- $(CC) $(CFLAGS) t/$@.c -o $@ $(LDFLAGS)
+sha1test: t/sha1test.c shared
-+ $(CC) $(CFLAGS) t/$@.c -o $@ $(LIBS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) t/$@.c -o $@ $(LDLIBS)
-hmactest: t/hmactest.c $(STATIC_LIB)
- $(CC) $(CFLAGS) t/$@.c -o $@ $(LDFLAGS)
+hmactest: t/hmactest.c shared
-+ $(CC) $(CFLAGS) t/$@.c -o $@ $(LIBS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) t/$@.c -o $@ $(LDLIBS)
-canlocktest: t/canlocktest.c $(STATIC_LIB)
- $(CC) $(CFLAGS) t/$@.c -o $@ $(LDFLAGS)
+canlocktest: t/canlocktest.c shared
-+ $(CC) $(CFLAGS) t/$@.c -o $@ $(LIBS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) t/$@.c -o $@ $(LDLIBS)
-$(STATIC_LIB):
- cd src && make
@@ -49,20 +49,25 @@
-
-test: all
+
-+test: hmactest canlocktest
++check: hmactest canlocktest
@echo "hmactest: "
- @./hmactest > t/hmactest.out || echo hmm
+- @./hmactest > t/hmactest.out || echo hmm
++ @LD_LIBRARY_PATH=src/ ./hmactest > t/hmactest.out || echo hmm
@diff t/hmactest.shouldbe t/hmactest.out && echo " Pass." || (echo " **FAIL**" ; exit 1)
---- canlock2b/src/Makefile
-+++ canlock2b/src/Makefile
-@@ -1,9 +1,11 @@
+ @echo "=-=-=-="
+ @echo "canlocktest: "
+- @./canlocktest > t/canlocktest.out
++ @LD_LIBRARY_PATH=src/ ./canlocktest > t/canlocktest.out
+ @diff t/canlocktest.shouldbe t/canlocktest.out && echo " Pass." || (echo " **FAIL**" ; exit 1)
+ @echo "=-=-=-="
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -1,32 +1,35 @@
-LIBOBJS = base64.lo canlock.lo hmac_sha1.lo sha1.lo
- CC = gcc
-+AR = ar
-+RANLIB = ranlib
+-CC = gcc
LIBTOOL = libtool
-CFLAGS = -I../include
-+CFLAGS += -I../include
++CPPFLAGS += -I../include
SOURCES = base64.c canlock.c hmac_sha1.c sha1.c
-OBJS = base64.o canlock.o hmac_sha1.o sha1.o
+OBJS := $(SOURCES:.c=.o)
@@ -70,8 +75,10 @@
SHARELINKFLAGS = -Wl,-soname -Wl,libcanlock.so.2
SHAREDFLAGS = -fPIC -DPIC
LIBS = libcanlock.a libcanlock.so.2.0.0
-@@ -11,22 +13,25 @@
+ INSTALL = install
++.SUFFIXES: .c .o .h .lo
++
all: $(LIBS)
-libcanlock.a:
@@ -83,11 +90,8 @@
-libcanlock.so.2.0.0:
- $(CC) $(CFLAGS) $(SHAREDFLAGS) -c $(SOURCES)
- $(CC) -shared $(OBJS) $(SHARELINKFLAGS) -o libcanlock.so.2.0.0
-+%.o: %.c
-+ $(CC) $(CFLAGS) -c -o $@ $<
-+
-+%.lo: %.c
-+ $(CC) $(CFLAGS) $(SHAREDFLAGS) -c -o $@ $<
++.c.lo:
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(SHAREDFLAGS) -c -o $@ $<
+
+libcanlock.a: $(OBJS)
+ $(AR) cru libcanlock.a $(OBJS)
@@ -95,6 +99,8 @@
+
+libcanlock.so.2.0.0: $(LIBOBJS)
+ $(CC) -shared $(LIBOBJS) $(LDFLAGS) $(SHARELINKFLAGS) -o libcanlock.so.2.0.0
++ ln -s libcanlock.so.2.0.0 libcanlock.so
++ ln -s libcanlock.so.2.0.0 libcanlock.so.2
install: all
$(INSTALL) libcanlock.so.2.0.0 $(DESTDIR)/usr/lib
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/canlock/files/, net-libs/canlock/
@ 2025-02-19 11:16 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-02-19 11:16 UTC (permalink / raw
To: gentoo-commits
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
+
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-19 11:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19 11:16 [gentoo-commits] repo/gentoo:master commit in: net-libs/canlock/files/, net-libs/canlock/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2020-02-09 18:50 David Seifert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox