aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2023-08-09 11:30:18 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2023-08-09 11:30:18 +0000
commit7ad6ea4dd46d3e3ed04f0652923e6c98d6ffef76 (patch)
treedbffa37981189d268fc7c576a7d5704b880d2330
parent61f83846779f393ac96ea6cbdde8f973995f7f00 (diff)
mfmod_openmetrics: new port had been added (+)
Loadable module for mailfromd which adds OpenMetrics support to the mail filtering language (MFL). Requested by: maintainer
-rw-r--r--mail/Makefile1
-rw-r--r--mail/mfmod_openmetrics/Makefile36
-rw-r--r--mail/mfmod_openmetrics/distinfo3
-rw-r--r--mail/mfmod_openmetrics/files/patch-mfmod__openmetrics.c20
-rw-r--r--mail/mfmod_openmetrics/pkg-descr2
5 files changed, 62 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index 4abacbef5e1a..152720912a44 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -227,6 +227,7 @@
SUBDIR += mew
SUBDIR += mew-devel
SUBDIR += mfmod_ldap
+ SUBDIR += mfmod_openmetrics
SUBDIR += mfmod_pcre
SUBDIR += milter-bogom
SUBDIR += milter-callback
diff --git a/mail/mfmod_openmetrics/Makefile b/mail/mfmod_openmetrics/Makefile
new file mode 100644
index 000000000000..ae904fd1e41a
--- /dev/null
+++ b/mail/mfmod_openmetrics/Makefile
@@ -0,0 +1,36 @@
+PORTNAME= mfmod_openmetrics
+PORTVERSION= 1.2
+CATEGORIES= mail
+MASTER_SITES= http://download.gnu.org.ua/pub/release/${PORTNAME}/ \
+ http://download.gnu.org.ua/pub/alpha/${PORTNAME}/
+
+MAINTAINER= zeus@gnu.org.ua
+COMMENT= OpenMetrics support loadable module for mailfromd
+WWW= https://puszcza.gnu.org.ua/projects/mfmod_openmetrics/
+
+LICENSE= GPLv3+
+
+BUILD_DEPENDS= ${LOCALBASE}/include/mailfromd/mfmod.h:mail/mailfromd
+LIB_DEPENDS= libgdbm.so:databases/gdbm \
+ libmicrohttpd.so:www/libmicrohttpd
+
+USES= libtool localbase
+GNU_CONFIGURE= yes
+INSTALL_TARGET= install-strip
+TEST_TARGET= check
+
+INFO= ${PORTNAME}
+PLIST_FILES= lib/mailfromd/mfmod_openmetrics.so \
+ share/mailfromd/openmetrics.mfl
+PORTDOCS= NEWS README
+
+OPTIONS_DEFINE= DOCS
+
+post-patch:
+ @${REINPLACE_CMD} -e '/sed -n/s,p},p;},' ${WRKSRC}/configure
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/mail/mfmod_openmetrics/distinfo b/mail/mfmod_openmetrics/distinfo
new file mode 100644
index 000000000000..114a3de5dcc2
--- /dev/null
+++ b/mail/mfmod_openmetrics/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1687803559
+SHA256 (mfmod_openmetrics-1.2.tar.gz) = fb77badaf0a667577a170562706e14558e6bf4529955052d1fe837c7ca83c55f
+SIZE (mfmod_openmetrics-1.2.tar.gz) = 508393
diff --git a/mail/mfmod_openmetrics/files/patch-mfmod__openmetrics.c b/mail/mfmod_openmetrics/files/patch-mfmod__openmetrics.c
new file mode 100644
index 000000000000..753e9a6eb357
--- /dev/null
+++ b/mail/mfmod_openmetrics/files/patch-mfmod__openmetrics.c
@@ -0,0 +1,20 @@
+--- mfmod_openmetrics.c.orig 2023-02-10 08:24:56 UTC
++++ mfmod_openmetrics.c
+@@ -992,7 +992,7 @@ openmetrics_set(long count, MFMOD_PARAM *p, MFMOD_PARA
+ /*
+ * Server
+ */
+-static int
++static enum MHD_Result
+ reassemble_get_args(void *cls, enum MHD_ValueKind kind,
+ const char *key, const char *value)
+ {
+@@ -1373,7 +1373,7 @@ http_response(struct MHD_Connection *conn,
+ return ret;
+ }
+
+-static int
++static enum MHD_Result
+ openmetrics_httpd_handler(void *cls,
+ struct MHD_Connection *conn,
+ const char *url, const char *method,
diff --git a/mail/mfmod_openmetrics/pkg-descr b/mail/mfmod_openmetrics/pkg-descr
new file mode 100644
index 000000000000..424a8781bd77
--- /dev/null
+++ b/mail/mfmod_openmetrics/pkg-descr
@@ -0,0 +1,2 @@
+This package is a loadable module for mailfromd which adds OpenMetrics
+support to the mail filtering language (MFL).