Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jun 2026 20:21:51 +0000
From:      Nuno Teixeira <eduardo@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 823cc40719c3 - main - net-p2p/amule: Switch to security/cryptopp-modern dependency
Message-ID:  <6a34535f.3a195.2ebaba2f@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=823cc40719c3925b7ba516385a33e5d9310d5f29

commit 823cc40719c3925b7ba516385a33e5d9310d5f29
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2026-06-18 18:50:59 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2026-06-18 20:21:09 +0000

    net-p2p/amule: Switch to security/cryptopp-modern dependency
    
    - Add upstream patch to fix cryptopp-modern version detection
    - Remove segmentation fault fix used with security/cryptopp dependency
    - Pet portclippy
---
 net-p2p/amule/Makefile                             | 14 ++--
 .../amule/files/patch-fix-cryptopp-modern-version  | 78 ++++++++++++++++++++++
 2 files changed, 82 insertions(+), 10 deletions(-)

diff --git a/net-p2p/amule/Makefile b/net-p2p/amule/Makefile
index 98c203d9b474..7f9757a0dc8f 100644
--- a/net-p2p/amule/Makefile
+++ b/net-p2p/amule/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	amule
 DISTVERSION=	3.0.0
+PORTREVISION=	1
 CATEGORIES=	net-p2p
 
 MAINTAINER=	eduardo@FreeBSD.org
@@ -9,17 +10,16 @@ WWW=		https://github.com/amule-project/amule
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/docs/COPYING
 
-LIB_DEPENDS=	libcryptopp.so:security/cryptopp \
-		libcurl.so:ftp/curl \
-		libzstd.so:archivers/zstd
+BUILD_DEPENDS=	cryptopp-modern>0:security/cryptopp-modern
+LIB_DEPENDS=	libcurl.so:ftp/curl
 
 USES=		cmake:testing gettext-runtime gnome localbase:ldflags pkgconfig \
 		readline
 USE_GITHUB=	yes
 GH_ACCOUNT=	amule-org
 USE_GNOME=	glib20
-USE_WX=		3.2
 USE_RC_SUBR=	amuled
+USE_WX=		3.2
 
 CMAKE_ON=	BUILD_ALC BUILD_ALCC BUILD_AMULECMD BUILD_DAEMON BUILD_ED2K \
 		BUILD_WXCAS
@@ -64,10 +64,4 @@ PLIST_SUB+=	AMULESKIN=""
 PLIST_SUB+=	AMULESKIN="@comment "
 .endif
 
-# Fix segmentation fault, PR 266866
-# See also 5a19c08: ("security/cryptopp: Update to 8.7.0")
-.if ${ARCH} == i386 || ${ARCH} == amd64
-CXXFLAGS+=	-DCRYPTOPP_DISABLE_ASM
-.endif
-
 .include <bsd.port.mk>
diff --git a/net-p2p/amule/files/patch-fix-cryptopp-modern-version b/net-p2p/amule/files/patch-fix-cryptopp-modern-version
new file mode 100644
index 000000000000..a14c646b75e7
--- /dev/null
+++ b/net-p2p/amule/files/patch-fix-cryptopp-modern-version
@@ -0,0 +1,78 @@
+From ad4dacd28d0510f2bfaa4dd8a38c6b24844de85e Mon Sep 17 00:00:00 2001
+From: got3nks <got3nks@users.noreply.github.com>
+Date: Tue, 16 Jun 2026 00:56:34 +0200
+Subject: [PATCH] cmake: accept cryptopp-modern's calendar CRYPTOPP_VERSION
+
+Two CRYPTOPP_VERSION encodings exist in the wild:
+
+  - Classic Crypto++ (weidai11/cryptopp/config_ver.h:53):
+        MAJOR*100 + MINOR*10 + REVISION
+    so 8.9.0 -> 890, max for v1.x..v9.x is 999.
+
+  - cryptopp-modern (https://github.com/cryptopp-modern/cryptopp-modern,
+    calendar versioning per config_ver.h:50):
+        YEAR*10000 + MONTH*100 + INCREMENT
+    so the 2026.6 build is 20260600. Always >= 20,240,000 for any
+    release from 2024 onwards.
+
+The previous regex pass parsed 20260600 as "2.0.26.0.600" and tripped
+MIN_CRYPTOPP_VERSION ("5.6"), making cryptopp-modern unbuildable
+against aMule -- the symptom reported in issue #167.
+
+The gap between 9,999 and 20,000,000 makes a single magnitude check
+enough to disambiguate the two encodings without collision risk now
+or in any realistic future, and would also gracefully accept a
+hypothetical classic Crypto++ 10.x.y in the 1000-9999 range as
+"clearly newer than MIN_CRYPTOPP_VERSION".
+
+Refs: #167
+---
+ cmake/cryptopp.cmake | 35 ++++++++++++++++++++++++++++-------
+ 1 file changed, 28 insertions(+), 7 deletions(-)
+
+diff --git cmake/cryptopp.cmake cmake/cryptopp.cmake
+index 722d8646be..ac5421a80b 100644
+--- cmake/cryptopp.cmake
++++ cmake/cryptopp.cmake
+@@ -158,13 +158,34 @@ if (NOT CRYPTOPP_VERSION)# AND CRYPTO_COMPLETE)
+ 		RUN_OUTPUT_VARIABLE CRYPTOPP_VERSION
+ 	)
+ 
+-	string (REGEX REPLACE "([0-9])([0-9])([0-9])" "\\1.\\2.\\3" CRYPTOPP_VERSION "${CRYPTOPP_VERSION}")
+-
+-	if (${CRYPTOPP_VERSION} VERSION_LESS ${MIN_CRYPTOPP_VERSION})
+-		message (FATAL_ERROR "crypto++ version ${CRYPTOPP_VERSION} is too old")
++	# Two CRYPTOPP_VERSION encodings exist in the wild:
++	#
++	#   - Classic Crypto++ (weidai11/cryptopp/config_ver.h:53):
++	#         MAJOR*100 + MINOR*10 + REVISION
++	#     so 8.9.0 → 890, max for v1.x..v9.x is 999.
++	#
++	#   - cryptopp-modern (cryptopp-modern/cryptopp-modern, calendar
++	#     versioning per their config_ver.h:50 doc comment):
++	#         YEAR*10000 + MONTH*100 + INCREMENT
++	#     so the 2026.6 build is 20260600. Always ≥ 20,240,000 for any
++	#     release from 2024 onwards.
++	#
++	# The gap between 9,999 and 20,000,000 is enormous, so a single
++	# numeric threshold disambiguates without risk of collision either
++	# now or in any realistic future (and would also gracefully accept
++	# a hypothetical classic Crypto++ 10.x.y in the 1000-9999 range as
++	# "clearly newer than MIN_CRYPTOPP_VERSION").
++	if (CRYPTOPP_VERSION GREATER_EQUAL 10000)
++		MESSAGE (STATUS "crypto++ version ${CRYPTOPP_VERSION} (calendar / cryptopp-modern variant) -- OK")
+ 	else()
+-		MESSAGE (STATUS "crypto++ version ${CRYPTOPP_VERSION} -- OK")
+-		set (CRYPTOPP_CONFIG_FILE ${CRYPTOPP_CONFIG_FILE} CACHE STRING "Path to config.h of crypto-lib" FORCE)
+-		set (CRYPTOPP_VERSION ${CRYPTOPP_VERSION} CACHE STRING "Version of cryptopp" FORCE)
++		string (REGEX REPLACE "([0-9])([0-9])([0-9])" "\\1.\\2.\\3" CRYPTOPP_VERSION "${CRYPTOPP_VERSION}")
++
++		if (${CRYPTOPP_VERSION} VERSION_LESS ${MIN_CRYPTOPP_VERSION})
++			message (FATAL_ERROR "crypto++ version ${CRYPTOPP_VERSION} is too old")
++		else()
++			MESSAGE (STATUS "crypto++ version ${CRYPTOPP_VERSION} -- OK")
++		endif()
+ 	endif()
++	set (CRYPTOPP_CONFIG_FILE ${CRYPTOPP_CONFIG_FILE} CACHE STRING "Path to config.h of crypto-lib" FORCE)
++	set (CRYPTOPP_VERSION ${CRYPTOPP_VERSION} CACHE STRING "Version of cryptopp" FORCE)
+ endif()


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a34535f.3a195.2ebaba2f>