Files
ports/mail/anubis/Makefile
T
Joseph Mingrone bc45b7ec88 Emacs Lisp ports framework: Overhaul
This overhaul introduces four key changes to the elisp ports framework:

1. Remove support for packaged byte-compiled elisp.

   The primary motivation is to remove a large number of flavor-specific
   packages and to simplify the ports tree.  As an example, supporting
   byte-compiled elisp for devel/tablist required six packages, one for
   each flavor of editors/emacs and editors/emacs-devel.  With over 100
   elisp ports and requests for new Emacs flavors, this was
   unmanageable.

2. Install configuration to integrate with Emacs's native compilation
   machinery, allowing elisp from ports to be compiled into the standard
   cache under the user's home directory.

   This matches the behavior of GNU ELPA packages and generally results
   in a faster experience.  Speedups vary depending on the
   characteristics of the elisp code, but are often reported to be 2.5
   to 5 times faster than byte-compiled code.

3. Perform byte compilation on the target host, but only when native
   compilation is unavailable.  Compilation is initiated when Emacs
   starts, and the resulting .elc files are cached under the user's
   home directory.

4. Load all autoload files installed by FreeBSD elisp ports.  This
   mirrors what package.el does for ELPA packages, ensuring that
   autoloaded functions are available without requiring users to
   explicitly load each package.

Users with elisp packages (*-emacs_*) installed should consult the
2026-04-11 UPDATING entry for instructions on handling the transition.

Reviewed by:	ashish, Benjamin Jacobs <freebsd@dev.thsi.be>, dinoex,
		mandree, mce, nobutaka, Pat Maddox <pat@patmaddox.com>,
		rhurlin
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D56001
2026-04-11 13:03:58 -03:00

113 lines
2.6 KiB
Makefile

PORTNAME= anubis
PORTVERSION= 4.3
PORTREVISION= 9
CATEGORIES= mail
MASTER_SITES= GNU
MAINTAINER= jhale@FreeBSD.org
COMMENT= Outgoing SMTP mail processor
WWW= https://www.gnu.org/software/anubis/
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libgnutls.so:security/gnutls \
libgcrypt.so:security/libgcrypt \
libgpg-error.so:security/libgpg-error \
libgsasl.so:security/libgsasl
USES= autoreconf charsetfix cpe gettext-tools gmake localbase \
makeinfo pkgconfig shebangfix
CHARSETFIX_MAKEFILEIN= gnulib.mk
CPE_VENDOR= gnu
SHEBANG_FILES= contrib/msg2smtp.pl
USE_RC_SUBR= anubis
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share
CONFIGURE_ARGS= --with-emacs=no \
--with-gnutls \
--with-gsasl
INFO= anubis
PORTEXAMPLES= 1anubisrc 2anubisrc
OPTIONS_DEFINE= NLS EXAMPLES EMACS GUILE GNUPG LIBWRAP PCRE PAM \
SOCKS TEST
DB_DESC= Database backend
OPTIONS_GROUP= DB
OPTIONS_GROUP_DB= GDBM MYSQL PGSQL
OPTIONS_DEFAULT= GDBM GNUPG GUILE
OPTIONS_SUB= yes
NO_OPTIONS_SORT= yes
.if !exists(/usr/include/tcpd.h)
OPTIONS_EXCLUDE+= LIBWRAP
.endif
.if !exists(/usr/lib/libpam.so)
OPTIONS_EXCLUDE+= PAM
.endif
EMACS_DESC= Install EMACS lisp
EMACS_USES= emacs
GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm
GDBM_CONFIGURE_WITH= gdbm
GNUPG_LIB_DEPENDS= libgpgme.so:security/gpgme
GNUPG_CONFIGURE_WITH= gpgme
GUILE_USES= guile:2.2,alias
GUILE_CONFIGURE_WITH= guile
GUILE_PORTEXAMPLES= anubis.scm anubisrc.guile
LIBWRAP_CONFIGURE_WITH= tcp-wrappers
MYSQL_USES= mysql
MYSQL_CONFIGURE_WITH= mysql
MYSQL_VARS= REQUIRE+=mysql
NLS_CONFIGURE_ENABLE= nls
PAM_CONFIGURE_WITH= pam
PAM_PORTEXAMPLES= pam
PCRE_LIB_DEPENDS= libpcre.so:devel/pcre
PCRE_CONFIGURE_WITH= pcre
PGSQL_USES= pgsql
PGSQL_CONFIGURE_WITH= postgres
PGSQL_VARS= REQUIRE+=postgresql
SOCKS_CONFIGURE_WITH= socks-proxy
TEST_TEST_TARGET= check
.include <bsd.port.options.mk>
# Default requirement for anubis rc script
REQUIRE+= mail
SUB_LIST+= REQUIRE="${REQUIRE}"
post-install-EMACS-on::
@${MKDIR} ${STAGEDIR}${PREFIX}/${EMACS_SITE_LISPDIR}/anubis
${INSTALL_DATA} ${WRKSRC}/elisp/anubis-mode.el \
${STAGEDIR}${PREFIX}/${EMACS_SITE_LISPDIR}/anubis
post-patch-TEST-off:
@${REINPLACE_CMD} -e 's| tests||' ${WRKSRC}/Makefile.am
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/*rc ${STAGEDIR}${EXAMPLESDIR}
.if ${PORT_OPTIONS:MGUILE}
cd ${WRKSRC}/examples && \
${INSTALL_DATA} ${GUILE_PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}
.endif
.if ${PORT_OPTIONS:MPAM}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/pam
${INSTALL_DATA} ${WRKSRC}/examples/pam/anubis* ${STAGEDIR}${EXAMPLESDIR}/pam
.endif
.include <bsd.port.mk>