I found this libtommath diff in an old tree.  We're building
libtommath as a static lib only, but we don't have to.  Here is the
resulting diff taking care of math/libtommath, textproc/clit (sic) and
the moarvm/nqp/rakudo stack.

Details:
- I prefer to add post-test instead of depending on gcov
- doesn't build with base libtool, so use upstream libtool
- -fPIC is correctly added by gnu libtool, no need to add it in the
   Makefile
- nqp doesn't link with libtommath directly but uses it through the
  shared lib from moarvm, hence the mere removal of BUILD_DEPENDS.

Pascal: I guess you'd like to have a look, even if the changes appear
mechanical.

ok?


Index: math/libtommath/Makefile
===================================================================
RCS file: /home/cvs/ports/math/libtommath/Makefile,v
diff -u -p -r1.13 Makefile
--- math/libtommath/Makefile    30 Sep 2025 07:43:29 -0000      1.13
+++ math/libtommath/Makefile    5 Nov 2026 16:29:33 -0000
@@ -1,10 +1,13 @@
 COMMENT =              number theoretic multiple-precision integer library
 CATEGORIES =           math
-HOMEPAGE =             http://libtom.net/
+HOMEPAGE =             https://www.libtom.net/
 
 GH_ACCOUNT =           libtom
 GH_PROJECT =           libtommath
 GH_TAGNAME =           v1.3.0
+REVISION =             0
+
+SHARED_LIBS +=  tommath                   0.0 # 4.0
 
 # WTFPL
 PERMIT_PACKAGE =       Yes
@@ -17,12 +20,14 @@ MAKE_FLAGS =                CC="${CC}" \
 FAKE_FLAGS =           DESTDIR=${WRKINST}${PREFIX} \
                        LIBPATH=/lib \
                        INCPATH=/include
+USE_LIBTOOL =          gnu
 USE_GMAKE =            Yes
-MAKE_FILE =            makefile.unix
+MAKE_FILE =            makefile.shared
 
 ALL_TARGET =           default
-TEST_TARGET =          coverage
 
-CFLAGS +=              -fPIC
+# actually run tests
+post-test:
+       cd ${WRKBUILD} && ${SETENV} ${LIBTOOL} --mode=execute ./test
 
 .include <bsd.port.mk>
Index: math/libtommath/pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/math/libtommath/pkg/PLIST,v
diff -u -p -r1.6 PLIST
--- math/libtommath/pkg/PLIST   29 Sep 2025 17:52:32 -0000      1.6
+++ math/libtommath/pkg/PLIST   5 Nov 2026 16:29:33 -0000
@@ -1,3 +1,5 @@
 include/tommath.h
 @static-lib lib/libtommath.a
+lib/libtommath.la
+@lib lib/libtommath.so.${LIBtommath_VERSION}
 lib/pkgconfig/libtommath.pc
Index: lang/moarvm/Makefile
===================================================================
RCS file: /home/cvs/ports/lang/moarvm/Makefile,v
diff -u -p -r1.37 Makefile
--- lang/moarvm/Makefile        14 Dec 2025 21:12:55 -0000      1.37
+++ lang/moarvm/Makefile        5 Nov 2026 16:49:58 -0000
@@ -5,6 +5,7 @@ COMMENT =               virtual machine for nqp/rakud
 V =                    2025.11
 DISTNAME =             MoarVM-$V
 PKGNAME =              moarvm-$V
+REVISION =             0
 
 SHARED_LIBS =          moar    16.0
 
@@ -20,15 +21,15 @@ PERMIT_PACKAGE =    Yes
 COMPILER =             base-clang ports-gcc
 COMPILER_LANGS =       c
 
-WANTLIB =              atomic_ops c ffi kvm m pthread uv zstd
+WANTLIB =              atomic_ops c ffi kvm m pthread tommath uv zstd
 
 SITES =                        https://moarvm.org/releases/
 
-BUILD_DEPENDS =                math/libtommath>=1.2.0
-LIB_DEPENDS =          devel/libffi \
+LIB_DEPENDS =          archivers/zstd \
+                       devel/libffi \
                        devel/boehm-gc,-atomic \
                        devel/libuv \
-                       archivers/zstd
+                       math/libtommath>=1.3.0p0
 
 MAKE_FLAGS =           NOISY=1
 
Index: lang/nqp/Makefile
===================================================================
RCS file: /home/cvs/ports/lang/nqp/Makefile,v
diff -u -p -r1.37 Makefile
--- lang/nqp/Makefile   14 Dec 2025 21:13:10 -0000      1.37
+++ lang/nqp/Makefile   5 Nov 2026 16:54:54 -0000
@@ -2,6 +2,7 @@ COMMENT =               Not Quite Perl
 
 V =                    2025.11
 DISTNAME =             nqp-$V
+REVISION =             0
 
 MOAR_VERSION =         $V
 
@@ -28,7 +29,6 @@ DISTFILES =           nqp-$V.tar.gz
 DISTFILES.rakudo =     rakudo-${RAKUDO_VERSION}.tar.gz
 EXTRACT_ONLY =         ${DISTFILES}
 
-BUILD_DEPENDS =                math/libtommath
 LIB_DEPENDS =          lang/moarvm>=${MOAR_VERSION}
 
 CONFIGURE_STYLE =      simple
Index: lang/rakudo/Makefile
===================================================================
RCS file: /home/cvs/ports/lang/rakudo/Makefile,v
diff -u -p -r1.45 Makefile
--- lang/rakudo/Makefile        14 Dec 2025 21:13:24 -0000      1.45
+++ lang/rakudo/Makefile        5 Nov 2026 16:45:47 -0000
@@ -2,6 +2,7 @@ COMMENT =               Rakudo compiler for the Raku 
 
 V =                    2025.11
 DISTNAME =             rakudo-$V
+REVISION =             0
 
 NQP_VERSION =          $V
 
@@ -17,13 +18,13 @@ PERMIT_PACKAGE =    Yes
 COMPILER =             base-clang ports-gcc
 COMPILER_LANGS =       c
 
-WANTLIB += atomic_ops c ffi kvm m moar pthread uv zstd
+WANTLIB += atomic_ops c ffi kvm m moar pthread tommath uv zstd
 
 SITES =                https://rakudo.org/dl/rakudo/
 
-BUILD_DEPENDS =        lang/nqp>=${NQP_VERSION} \
+BUILD_DEPENDS =        lang/nqp>=${NQP_VERSION}
+LIB_DEPENDS =  lang/moarvm \
                math/libtommath
-LIB_DEPENDS =  lang/moarvm
 RUN_DEPENDS =  lang/nqp>=${NQP_VERSION}
 
 CONFIGURE_STYLE =      simple
Index: textproc/clit/Makefile
===================================================================
RCS file: /home/cvs/ports/textproc/clit/Makefile,v
diff -u -p -r1.7 Makefile
--- textproc/clit/Makefile      29 Sep 2025 17:52:32 -0000      1.7
+++ textproc/clit/Makefile      5 Nov 2026 16:32:10 -0000
@@ -1,7 +1,7 @@
 COMMENT =              convert Microsoft Reader files to OEBPS packages
 V =                    1.8
 DISTNAME =             clit${V:S/.//}src
-REVISION =             2
+REVISION =             3
 PKGNAME =              clit-1.8
 CATEGORIES =           textproc converters print
 
@@ -10,14 +10,14 @@ HOMEPAGE =          http://www.convertlit.com/
 # GPLv2+
 PERMIT_PACKAGE =       Yes
 
-WANTLIB =              c
+WANTLIB =              c tommath
 
 SITES =                        ${HOMEPAGE}
 EXTRACT_SUFX =         .zip
 
 WRKDIST =              ${WRKDIR}/${DISTNAME:src=}
 
-BUILD_DEPENDS =                math/libtommath
+LIB_DEPENDS =          math/libtommath
 
 post-patch:
        mv ${WRKDIR}/lib ${WRKDIST}


-- 
jca

Reply via email to