Resurrect mail/milter-manager, it reportedly works fine with the Ruby 2.5

which is the defuault version.

Clean up the port while here.

Reported by:	Matthew D. Fuller
This commit is contained in:
Rene Ladan 2019-05-13 19:02:49 +00:00
parent 753388101e
commit c2e1f33936
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=501584
11 changed files with 461 additions and 1 deletions

1
MOVED
View file

@ -12727,7 +12727,6 @@ graphics/qslim||2019-05-09|Has expired: Broken for more than 6 months
graphics/rawstudio||2019-05-09|Has expired: Broken for more than 6 months
graphics/tulip||2019-05-09|Has expired: Broken for more than 6 months
lang/qore||2019-05-09|Has expired: Broken for more than 6 months
mail/milter-manager||2019-05-09|Has expired: Broken for more than 6 months
math/goblin||2019-05-09|Has expired: Broken for more than 6 months
math/mosesdecoder||2019-05-09|Has expired: Broken for more than 6 months
multimedia/asdcplib||2019-05-09|Has expired: Broken for more than 6 months

View file

@ -227,6 +227,7 @@
SUBDIR += milter-bogom
SUBDIR += milter-callback
SUBDIR += milter-greylist
SUBDIR += milter-manager
SUBDIR += milter-regex
SUBDIR += milter-skem
SUBDIR += mime-construct

View file

@ -0,0 +1,57 @@
# Created by: Hirohisa Yamaguchi <umq@ueo.co.jp>
# $FreeBSD$
PORTNAME= milter-manager
PORTVERSION= 2.1.1
CATEGORIES= mail ruby
MASTER_SITES= OSDN/${PORTNAME}/67935
MAINTAINER= ports@FreeBSD.org
COMMENT= Super milter that can invoke several milters selectively
LICENSE= AGPLv3 GFDL GPLv3 LGPL3
LICENSE_COMB= multi
BROKEN_RUBY24= Build succeeds, but using binary results in segmentation fault
BUILD_DEPENDS= rubygem-glib2>0:devel/rubygem-glib2
LIB_DEPENDS= libev.so:devel/libev
RUN_DEPENDS= rubygem-glib2>0:devel/rubygem-glib2
USES= compiler:c++11-lang gettext gmake gnome libtool pathfix pkgconfig
USE_GNOME= glib20 intltool
USE_LDCONFIG= yes
USE_RC_SUBR= milter-manager
USE_RUBY= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-libev \
--with-package-platform=freebsd
CPPFLAGS+= -I${LOCALBASE}/include
LIBS+= -L${LOCALBASE}/lib
INSTALL_TARGET= install-strip
OPTIONS_DEFINE= DOCS EXAMPLES
PORTDOCS= *
PORTEXAMPLES= *
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
CONFIGURE_ARGS+=--with-html-dir=${DOCSDIR}
.else
CONFIGURE_ARGS+=--with-html-dir=${WRKDIR}/doc
.endif
.if ! ${PORT_OPTIONS:MEXAMPLES}
EXAMPLESDIR= ${WRKDIR}/examples
.endif
post-patch:
@${FIND} ${WRKSRC} -type f -name Makefile.in -exec \
${REINPLACE_CMD} -e "s#\$$(datadir)/@PACKAGE@#${DATADIR}#" \
-e "s#\$$(datarootdir)/\$$(PACKAGE)#${DATADIR}#" {} +
@${REINPLACE_CMD} -e "s#\\\\\$$(pkgdatadir)/sample#${EXAMPLESDIR}#" ${WRKSRC}/configure
@${RM} -r ${WRKSRC}/binding/ruby/glib-2.2.5
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1521370741
SHA256 (milter-manager-2.1.1.tar.gz) = 315170b261f7557a896dd5607e785279a293c81ce1f7116906102f8376b120c6
SIZE (milter-manager-2.1.1.tar.gz) = 6619833

View file

@ -0,0 +1,154 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: milter-manager
# REQUIRE: LOGIN
# BEFORE: mail
# KEYWORD: shutdown
# Define these miltermanager_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/miltermanager
#
# miltermanager_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable milter-manager
# miltermanager_cfgdir (str): Configuration directory. see milter-manager(1)
# miltermanager_profiles (list): Set to "" by default.
# Define your profiles here.
# miltermanager_debug (str): Run the milter in debug mode(can run one instance only).
#
# miltermanager_${profile}_* : Variables per profile.
#
# all parameters below now can be set in milter-manager.conf(5).
# miltermanager_uid (str): Set username to run milter.
# miltermanager_gid (str): Set groupname to run milter.
# miltermanager_socket_gid (str): Set groupname to access the socket.
# miltermanager_socket (str): Path to the milter socket in socketspec.
# Sockets must be different from each other.
# miltermanager_flags (str): Flags passed to start command.
. /etc/rc.subr
name="miltermanager"
rcvar=miltermanager_enable
extra_commands="reload"
start_precmd="manager_precmd"
stop_postcmd="manager_postcmd"
command="%%PREFIX%%/sbin/milter-manager"
_piddir="/var/run/milter-manager"
pidfile="${_piddir}/pid"
load_rc_config $name
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
: ${miltermanager_enable="NO"}
: ${miltermanager_cfgdir="%%PREFIX%%/etc/milter-manager"}
: ${miltermanager_uid="mailnull"}
: ${miltermanager_gid="mail"}
: ${miltermanager_socket_gid="mail"}
: ${miltermanager_debug="NO"}
# Options other than above can be set with $miltermanager_flags.
# see milter-manager documentation for detail.
if [ -n "$2" ]; then
profile="$2"
if [ "x${miltermanager_profiles}" != "x" ]; then
pidfile="${_piddir}/${profile}.pid"
eval miltermanager_enable="\${miltermanager_${profile}_enable:-${miltermanager_enable}}"
eval miltermanager_cfgdir="\${miltermanager_${profile}_cfgdir:-}"
if [ ! -d "${miltermanager_cfgdir}" ];then
echo "You must set config directory for (miltermanager_${profile}_cfgdir)"
exit 1
fi
eval miltermanager_socket="\${miltermanager_${profile}_socket:-}"
command_args="--pid-file ${pidfile}"
if [ -d "${miltermanager_cfgdir}" ];then
command_args="${command_args} --config-dir=${miltermanager_cfgdir}"
fi
if [ -n "${miltermanager_uid}" ] ; then
command_args="${command_args} --user-name ${miltermanager_uid}"
fi
if [ -n "${miltermanager_gid}" ] ; then
command_args="${command_args} --group-name ${miltermanager_gid}"
fi
if [ -n "${miltermanager_socket_gid}" ] ; then
command_args="${command_args} --unix-socket-group ${miltermanager_socket_gid}"
fi
if [ -n "${miltermanager_socket}" ] ; then
command_args="${command_args} --connection-spec ${miltermanager_socket}"
fi
command_args="${command_args} --daemon"
else
echo "$0: extra argument ignored"
fi
else
if [ "x${miltermanager_profiles}" != "x" -a "x$1" != "x" ]; then
if [ "x$1" != "xrestart" ]; then
for profile in ${miltermanager_profiles}; do
echo "===> miltermanager profile: ${profile}"
%%PREFIX%%/etc/rc.d/milter-manager $1 ${profile}
retcode="$?"
if [ "0${retcode}" -ne 0 ]; then
failed="${profile} (${retcode}) ${failed:-}"
else
success="${profile} ${success:-}"
fi
done
exit 0
else
restart_precmd=""
fi
else
command_args="--pid-file ${pidfile}"
if [ -d "${miltermanager_cfgdir}" ];then
command_args="${command_args} --config-dir=${miltermanager_cfgdir}"
fi
if [ -n "${miltermanager_uid}" ] ; then
command_args="${command_args} --user-name ${miltermanager_uid}"
fi
if [ -n "${miltermanager_gid}" ] ; then
command_args="${command_args} --group-name ${miltermanager_gid}"
fi
if [ -n "${miltermanager_socket_gid}" ] ; then
command_args="${command_args} --unix-socket-group ${miltermanager_socket_gid}"
fi
if [ -n "${miltermanager_socket}" ] ; then
command_args="${command_args} --connection-spec ${miltermanager_socket}"
fi
if checkyesno miltermanager_debug ; then
command_args="${command_args} --verbose"
else
command_args="${command_args} --daemon"
fi
fi
fi
manager_precmd ()
{
if [ ! -d ${_piddir} ] ; then
mkdir -p ${_piddir}
fi
if [ -n "${miltermanager_uid}" ] ; then
chown ${miltermanager_uid} ${_piddir}
fi
if [ -n "${miltermanager_gid}" ] ; then
chgrp ${miltermanager_gid} ${_piddir}
fi
}
manager_postcmd ()
{
# just if the directory is empty
rmdir ${_piddir} > /dev/null 2>&1
}
run_rc_command "$1"

View file

@ -0,0 +1,11 @@
--- Makefile.in.orig 2018-03-18 11:34:18 UTC
+++ Makefile.in
@@ -510,7 +510,7 @@ SUBDIRS = $(am__append_1) milter libmilt
data test po build doc html license package vendor
pkgconfigdir = $(prefix)/libdata/pkgconfig
pkgconfig_DATA = milter-core.pc milter-client.pc milter-server.pc \
- milter-manager.pc libmilter.pc $(am__append_2)
+ milter-manager.pc $(am__append_2)
EXTRA_DIST = \
autogen.sh \
gpg_uid \

View file

@ -0,0 +1,8 @@
--- binding/ruby/test/run-test.sh.orig 2015-06-15 05:13:40 UTC
+++ binding/ruby/test/run-test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Copyright (C) 2011 Kouhei Sutou <kou@clear-code.com>
#

View file

@ -0,0 +1,11 @@
--- configure.orig 2017-06-28 06:21:45 UTC
+++ configure
@@ -14803,7 +14803,7 @@ fi
end
end
ruby_glib2_path = ruby_glib2_gem.full_gem_path
- print("-I ", File.join(ruby_glib2_path, "ext", "glib2"))')
+ print("-I ", File.join(ruby_glib2_path, "lib"))')
if test $? -eq 0; then
CFLAGS="$CFLAGS $RUBY_GLIB2_CFLAGS"
else

View file

@ -0,0 +1,18 @@
--- libev-4.19/ev.c.orig 2016-07-20 07:58:51 UTC
+++ libev-4.19/ev.c
@@ -1022,12 +1022,12 @@ ecb_inline uint64_t ecb_rotr64 (uint64_t
}
#endif
-#if ECB_GCC_VERSION(4,5)
+#if ECB_GCC_VERSION(4,5) || defined __clang__
#define ecb_unreachable() __builtin_unreachable ()
#else
/* this seems to work fine, but gcc always emits a warning for it :/ */
- ecb_inline void ecb_unreachable (void) ecb_noreturn;
- ecb_inline void ecb_unreachable (void) { }
+ ecb_inline ecb_noreturn ecb_unreachable (void);
+ ecb_inline ecb_noreturn ecb_unreachable (void) { }
#endif
/* try to tell the compiler that some condition is definitely true */

View file

@ -0,0 +1,5 @@
milter manager protects you from spam mails and virus mails effectively
with milter. milter manager has embedded Ruby interpreter to control
milters flexibly.
WWW: https://milter-manager.osdn.jp/

View file

@ -0,0 +1,193 @@
bin/milter-manager-log-analyzer
bin/milter-performance-check
bin/milter-report-statistics
bin/milter-test-client
bin/milter-test-client-libmilter
bin/milter-test-server
etc/cron.d/milter-manager-log
%%ETCDIR%%/applicable-conditions/authentication.conf
%%ETCDIR%%/applicable-conditions/dnsbl.conf
%%ETCDIR%%/applicable-conditions/remote-network.conf
%%ETCDIR%%/applicable-conditions/restrict-accounts.conf
%%ETCDIR%%/applicable-conditions/s25r.conf
%%ETCDIR%%/applicable-conditions/sendmail-compatible.conf
%%ETCDIR%%/applicable-conditions/stress.conf
%%ETCDIR%%/applicable-conditions/trust.conf
%%ETCDIR%%/defaults/debian.conf
%%ETCDIR%%/defaults/freebsd.conf
%%ETCDIR%%/defaults/pkgsrc.conf
%%ETCDIR%%/defaults/redhat.conf
%%ETCDIR%%/milter-manager.conf
%%ETCDIR%%/models/example.rb
include/milter-manager/libmilter/libmilter/mfapi.h
include/milter-manager/libmilter/libmilter/mfdef.h
include/milter-manager/milter/client.h
include/milter-manager/milter/client/milter-client-context.h
include/milter-manager/milter/client/milter-client-enum-types.h
include/milter-manager/milter/client/milter-client-objects.h
include/milter-manager/milter/client/milter-client-private.h
include/milter-manager/milter/client/milter-client-runner.h
include/milter-manager/milter/client/milter-client-single-thread-runner.h
include/milter-manager/milter/client/milter-client.h
include/milter-manager/milter/core.h
include/milter-manager/milter/core/milter-agent.h
include/milter-manager/milter/core/milter-command-decoder.h
include/milter-manager/milter/core/milter-command-encoder.h
include/milter-manager/milter/core/milter-connection.h
include/milter-manager/milter/core/milter-decoder.h
include/milter-manager/milter/core/milter-encoder.h
include/milter-manager/milter/core/milter-enum-types.h
include/milter-manager/milter/core/milter-error-emittable.h
include/milter-manager/milter/core/milter-esmtp.h
include/milter-manager/milter/core/milter-event-loop.h
include/milter-manager/milter/core/milter-finished-emittable.h
include/milter-manager/milter/core/milter-glib-event-loop.h
include/milter-manager/milter/core/milter-headers.h
include/milter-manager/milter/core/milter-libev-event-loop.h
include/milter-manager/milter/core/milter-logger.h
include/milter-manager/milter/core/milter-macros-requests.h
include/milter-manager/milter/core/milter-memory-profile.h
include/milter-manager/milter/core/milter-message-result.h
include/milter-manager/milter/core/milter-option.h
include/milter-manager/milter/core/milter-protocol-agent.h
include/milter-manager/milter/core/milter-protocol.h
include/milter-manager/milter/core/milter-reader.h
include/milter-manager/milter/core/milter-reply-decoder.h
include/milter-manager/milter/core/milter-reply-encoder.h
include/milter-manager/milter/core/milter-reply-signals.h
include/milter-manager/milter/core/milter-session-result.h
include/milter-manager/milter/core/milter-syslog-logger.h
include/milter-manager/milter/core/milter-utils.h
include/milter-manager/milter/core/milter-version.h
include/milter-manager/milter/core/milter-writer.h
include/milter-manager/milter/manager.h
include/milter-manager/milter/manager/milter-manager-applicable-condition.h
include/milter-manager/milter/manager/milter-manager-child.h
include/milter-manager/milter/manager/milter-manager-children.h
include/milter-manager/milter/manager/milter-manager-configuration.h
include/milter-manager/milter/manager/milter-manager-control-command-decoder.h
include/milter-manager/milter/manager/milter-manager-control-command-encoder.h
include/milter-manager/milter/manager/milter-manager-control-protocol.h
include/milter-manager/milter/manager/milter-manager-control-reply-decoder.h
include/milter-manager/milter/manager/milter-manager-control-reply-encoder.h
include/milter-manager/milter/manager/milter-manager-controller-context.h
include/milter-manager/milter/manager/milter-manager-controller.h
include/milter-manager/milter/manager/milter-manager-egg.h
include/milter-manager/milter/manager/milter-manager-enum-types.h
include/milter-manager/milter/manager/milter-manager-launch-command-decoder.h
include/milter-manager/milter/manager/milter-manager-launch-command-encoder.h
include/milter-manager/milter/manager/milter-manager-launch-protocol.h
include/milter-manager/milter/manager/milter-manager-leader.h
include/milter-manager/milter/manager/milter-manager-module-impl.h
include/milter-manager/milter/manager/milter-manager-module.h
include/milter-manager/milter/manager/milter-manager-objects.h
include/milter-manager/milter/manager/milter-manager-process-launcher.h
include/milter-manager/milter/manager/milter-manager-reply-decoder.h
include/milter-manager/milter/manager/milter-manager-reply-encoder.h
include/milter-manager/milter/manager/milter-manager-reply-protocol.h
include/milter-manager/milter/manager/milter-manager.h
include/milter-manager/milter/server.h
include/milter-manager/milter/server/milter-server-context.h
include/milter-manager/milter/server/milter-server-enum-types.h
lib/libmilter-client.so
lib/libmilter-client.so.0
lib/libmilter-client.so.0.0.0
lib/libmilter-core.so
lib/libmilter-core.so.0
lib/libmilter-core.so.0.0.0
lib/libmilter-manager.so
lib/libmilter-manager.so.0
lib/libmilter-manager.so.0.0.0
lib/libmilter-server.so
lib/libmilter-server.so.0
lib/libmilter-server.so.0.0.0
lib/milter-manager/binding/ext/milter_client.so
lib/milter-manager/binding/ext/milter_core.so
lib/milter-manager/binding/ext/milter_manager.so
lib/milter-manager/binding/ext/milter_server.so
lib/milter-manager/binding/ext/rb-milter-client.h
lib/milter-manager/binding/ext/rb-milter-core.h
lib/milter-manager/binding/ext/rb-milter-server.h
lib/milter-manager/binding/lib/milter.rb
lib/milter-manager/binding/lib/milter/client.rb
lib/milter-manager/binding/lib/milter/client/command-line.rb
lib/milter-manager/binding/lib/milter/client/composite-session.rb
lib/milter-manager/binding/lib/milter/client/configuration.rb
lib/milter-manager/binding/lib/milter/client/context-state.rb
lib/milter-manager/binding/lib/milter/client/envelope-address.rb
lib/milter-manager/binding/lib/milter/client/fallback-session.rb
lib/milter-manager/binding/lib/milter/client/mail-transaction-shelf.rb
lib/milter-manager/binding/lib/milter/client/session-context.rb
lib/milter-manager/binding/lib/milter/client/session.rb
lib/milter-manager/binding/lib/milter/client/testing.rb
lib/milter-manager/binding/lib/milter/core.rb
lib/milter-manager/binding/lib/milter/core/callback.rb
lib/milter-manager/binding/lib/milter/core/compatible.rb
lib/milter-manager/binding/lib/milter/core/logger.rb
lib/milter-manager/binding/lib/milter/core/macro.rb
lib/milter-manager/binding/lib/milter/core/path.rb
lib/milter-manager/binding/lib/milter/core/socket-address.rb
lib/milter-manager/binding/lib/milter/manager.rb
lib/milter-manager/binding/lib/milter/manager/address-matcher.rb
lib/milter-manager/binding/lib/milter/manager/breaker.rb
lib/milter-manager/binding/lib/milter/manager/child-context.rb
lib/milter-manager/binding/lib/milter/manager/clamav-milter-config-parser.rb
lib/milter-manager/binding/lib/milter/manager/condition-table.rb
lib/milter-manager/binding/lib/milter/manager/connection-check-context.rb
lib/milter-manager/binding/lib/milter/manager/debian-detector.rb
lib/milter-manager/binding/lib/milter/manager/debian-init-detector.rb
lib/milter-manager/binding/lib/milter/manager/debian-systemd-detector.rb
lib/milter-manager/binding/lib/milter/manager/detector.rb
lib/milter-manager/binding/lib/milter/manager/enma-socket-detector.rb
lib/milter-manager/binding/lib/milter/manager/exception.rb
lib/milter-manager/binding/lib/milter/manager/file-reader.rb
lib/milter-manager/binding/lib/milter/manager/freebsd-rc-detector.rb
lib/milter-manager/binding/lib/milter/manager/init-detector.rb
lib/milter-manager/binding/lib/milter/manager/milter-greylist-config-parser.rb
lib/milter-manager/binding/lib/milter/manager/netstat-connection-checker.rb
lib/milter-manager/binding/lib/milter/manager/opendkim-config-parser.rb
lib/milter-manager/binding/lib/milter/manager/pkgsrc-rc-detector.rb
lib/milter-manager/binding/lib/milter/manager/policy-manager.rb
lib/milter-manager/binding/lib/milter/manager/postfix-cidr-table.rb
lib/milter-manager/binding/lib/milter/manager/postfix-condition-table-parser.rb
lib/milter-manager/binding/lib/milter/manager/postfix-regexp-table.rb
lib/milter-manager/binding/lib/milter/manager/rcng-detector.rb
lib/milter-manager/binding/lib/milter/manager/redhat-detector.rb
lib/milter-manager/binding/lib/milter/manager/redhat-init-detector.rb
lib/milter-manager/binding/lib/milter/manager/redhat-systemd-detector.rb
lib/milter-manager/binding/lib/milter/manager/redhat-upstart-detector.rb
lib/milter-manager/binding/lib/milter/manager/rmilter-socket-detector.rb
lib/milter-manager/binding/lib/milter/manager/rspamd-proxy-detector.rb
lib/milter-manager/binding/lib/milter/manager/systemd-detector.rb
lib/milter-manager/binding/lib/milter/server.rb
lib/milter-manager/binding/lib/milter/server/testing.rb
lib/milter-manager/libmilter.so
lib/milter-manager/libmilter.so.1
lib/milter-manager/libmilter.so.1.0.1
lib/milter-manager/module/configuration/milter-manager-ruby-configuration.so
libdata/pkgconfig/milter-client.pc
libdata/pkgconfig/milter-core.pc
libdata/pkgconfig/milter-manager.pc
libdata/pkgconfig/milter-server.pc
man/ja/man1/milter-manager-log-analyzer.1.gz
man/ja/man1/milter-manager.1.gz
man/ja/man1/milter-performance-check.1.gz
man/ja/man1/milter-report-statistics.1.gz
man/ja/man1/milter-test-client.1.gz
man/ja/man1/milter-test-server.1.gz
man/man1/milter-manager-log-analyzer.1.gz
man/man1/milter-manager.1.gz
man/man1/milter-performance-check.1.gz
man/man1/milter-report-statistics.1.gz
man/man1/milter-test-client.1.gz
man/man1/milter-test-server.1.gz
sbin/milter-manager
%%DATADIR%%/license/fdl.txt
%%DATADIR%%/license/gpl.txt
%%DATADIR%%/license/lgpl.txt
%%DATADIR%%/license/ruby.ja.txt
%%DATADIR%%/license/ruby.txt
%%DATADIR%%/munin/plugins/milter_manager_
%%DATADIR%%/munin/plugins/milter_manager_memory
%%DATADIR%%/munin/plugins/postfix_processes
%%DATADIR%%/munin/plugins/sendmail_processes