From 9969ce022275667b6e1938c6a9ac3cc2d94a8017 Mon Sep 17 00:00:00 2001 From: Rafael Grether Date: Tue, 1 Jul 2025 21:38:17 +0000 Subject: [PATCH] irc/anope-devel: add port: Set of IRC services for IRC networks (development version) Anope is a set of Services for IRC networks that allows users to manage their nicks and channels in a secure and efficient way, and administrators to manage their network with powerful tools. Anope currently works with: - InspIRCd 3 or later - UnrealIRCd 6 or later - ircd-hybrid 8.2.34 or later - ircd-ratbox 3 or later - ngIRCd 19.2 or later - Plexus 3 or later - Solanum (all versions) Anope could also work with some of the daemons derived by the ones listed above, but there's no support for them if they work or don't work. For mysql support, please install -mysql FLAVOR. Changes from stable version of the port: - Updated PCRE to PCRE2 lib dependency - Mysql is now a Flavor - New option group Regex, Crypto Hashing and TLS - Added xmlrpc module - Added Argon2 crypt module - Added Posix crypt module Co-authored-by: Siva Mahadevan PR: 278819 Reported by: Siva Mahadevan , Rafael Grether (new maintainer) --- irc/anope-devel/Makefile | 108 +++++++++++++ irc/anope-devel/distinfo | 3 + irc/anope-devel/files/anope.in | 27 ++++ irc/anope-devel/files/pkg-message.in | 19 +++ irc/anope-devel/pkg-descr | 17 ++ irc/anope-devel/pkg-plist | 224 +++++++++++++++++++++++++++ 6 files changed, 398 insertions(+) create mode 100644 irc/anope-devel/Makefile create mode 100644 irc/anope-devel/distinfo create mode 100644 irc/anope-devel/files/anope.in create mode 100644 irc/anope-devel/files/pkg-message.in create mode 100644 irc/anope-devel/pkg-descr create mode 100644 irc/anope-devel/pkg-plist diff --git a/irc/anope-devel/Makefile b/irc/anope-devel/Makefile new file mode 100644 index 000000000000..5b63b6fcc80b --- /dev/null +++ b/irc/anope-devel/Makefile @@ -0,0 +1,108 @@ +PORTNAME= anope +DISTVERSION= 2.1.16 +CATEGORIES= irc +PKGNAMESUFFIX= -devel-${FLAVOR} + +MAINTAINER= devnull@apt322.org +COMMENT= Set of IRC services for IRC networks (development version) +WWW= https://www.anope.org/ + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/docs/COPYING + +CONFLICTS_INSTALL= anope + +FLAVORS= default mysql +FLAVOR?= ${FLAVORS:[1]} + +USES= cmake localbase:ldflags +USE_GITHUB= yes +USE_RC_SUBR= anope + +CMAKE_ARGS= -DINSTDIR:STRING="${PREFIX}/anope" +CFLAGS_amd64= -fPIC +SUB_FILES= pkg-message + +OPTIONS_DEFINE= NLS LDAP SQLITE REDIS XMLRPC +OPTIONS_DEFAULT= OPENSSL SQLITE +OPTIONS_GROUP= REGEX CRYPT +OPTIONS_GROUP_REGEX= PCRE2 POSIX TRE +OPTIONS_GROUP_CRYPT= ENC_POSIX ENC_ARGON +OPTIONS_SINGLE= TLS +OPTIONS_SINGLE_TLS= OPENSSL GNUTLS +OPTIONS_SUB= yes + +PCRE2_DESC= Perl Compatible Regular Expressions (v2) Support +POSIX_DESC= POSIX Basic Regular Expression Support +TRE_DESC= TRE Regex Support +XMLRPC_DESC= Allow modules to send and receive XMLRPC +CRYPT_DESC= Crypt Hashing Module +ENC_ARGON_DESC= Argon2 hashing algorithm via libargon2 +ENC_POSIX_DESC= Posix crypto hashing + +NLS_USES= gettext +LDAP_USES= ldap +OPENSSL_USES= ssl + +LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 + +SQLITE_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 +XMLRPC_LIB_DEPENDS= libxmlrpc.so:net/xmlrpc-c +GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls +PCRE2_LIB_DEPENDS= libpcre2-8.so:devel/pcre2 +ENC_ARGON_LIB_DEPENDS= libargon2.so:security/libargon2 +TRE_LIB_DEPENDS= libtre.so:textproc/libtre + +REDIS_RUN_DEPENDS= redis>0:databases/redis + +.if ${FLAVOR} == mysql +USES+= mysql +CMAKE_ARGS+= -DEXTRA_LIBS:STRING="${LOCALBASE}/lib/mysql/" +PLIST_SUB+= MYSQL="" +.else +PLIST_SUB+= MYSQL="@comment " +.endif + +post-patch: +# Avoid conflict with C++20 by adding -bin suffix + @${REINPLACE_CMD} -i .c++20 's/version /version-bin /' \ + ${WRKSRC}/include/CMakeLists.txt +.if ${FLAVOR} == mysql + ${LN} -s ${WRKSRC}/modules/extra/mysql.cpp ${WRKSRC}/modules/ +.endif + +post-patch-OPENSSL-on: + ${LN} -s ${WRKSRC}/modules/extra/ssl_openssl.cpp ${WRKSRC}/modules/ + +post-patch-GNUTLS-on: + ${LN} -s ${WRKSRC}/modules/extra/ssl_gnutls.cpp ${WRKSRC}/modules/ + +post-patch-LDAP-on: + ${LN} -s ${WRKSRC}/modules/extra/ldap.cpp ${WRKSRC}/modules/ + +post-patch-PCRE2-on: + ${LN} -s ${WRKSRC}/modules/extra/regex_pcre2.cpp ${WRKSRC}/modules/ + +post-patch-POSIX-on: + ${LN} -s ${WRKSRC}/modules/extra/regex_posix.cpp ${WRKSRC}/modules/ + +post-patch-TRE-on: + ${LN} -s ${WRKSRC}/modules/extra/regex_tre.cpp ${WRKSRC}/modules/ + +post-patch-SQLITE-on: + ${LN} -s ${WRKSRC}/modules/extra/sqlite.cpp ${WRKSRC}/modules/ + +post-patch-XMLRPC-on: + ${LN} -s ${WRKSRC}/modules/extra/xmlrpc.cpp ${WRKSRC}/modules/ + +post-patch-ENC_ARGON-on: + ${LN} -s ${WRKSRC}/modules/extra/enc_argon2.cpp ${WRKSRC}/modules/ + +post-patch-ENC_POSIX-on: + ${LN} -s ${WRKSRC}/modules/extra/enc_posix.cpp ${WRKSRC}/modules/ + +post-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/anope/data/backups + @${MKDIR} ${STAGEDIR}${PREFIX}/anope/logs + +.include diff --git a/irc/anope-devel/distinfo b/irc/anope-devel/distinfo new file mode 100644 index 000000000000..d4ae020b49e6 --- /dev/null +++ b/irc/anope-devel/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1751384030 +SHA256 (anope-anope-2.1.16_GH0.tar.gz) = dffc17e39b21216a064738931de078bb9328d5a615d4173399213c5730c2a933 +SIZE (anope-anope-2.1.16_GH0.tar.gz) = 1505103 diff --git a/irc/anope-devel/files/anope.in b/irc/anope-devel/files/anope.in new file mode 100644 index 000000000000..b36c8cde38f4 --- /dev/null +++ b/irc/anope-devel/files/anope.in @@ -0,0 +1,27 @@ +#!/bin/sh + +# PROVIDE: anope +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable anope: +# anope_enable=YES +# + +. /etc/rc.subr + +name=anope +rcvar=anope_enable + +load_rc_config $name + +: ${anope_enable:=NO} +: ${anope_user:=nobody} + +command=%%PREFIX%%/anope/bin/anope +pidfile=%%PREFIX%%/anope/data/anope.pid +extra_commands=reload + +run_rc_command "$1" + diff --git a/irc/anope-devel/files/pkg-message.in b/irc/anope-devel/files/pkg-message.in new file mode 100644 index 000000000000..077a8926ef41 --- /dev/null +++ b/irc/anope-devel/files/pkg-message.in @@ -0,0 +1,19 @@ +[ +{ type: install + message: <