- Fix build for recent FreeBSD 9.1, 10.0 or later. - Convert to new LIB_DEPENDS syntax. - Fix mis-adopting optionsNG.
Dear Takehiko and Udo, I have had a look at Takehiko's patch to fix some issues in the port and found a few issues with it, and the severe issue also affects devel/mutt: 1. the dependency information for Berkeley DB (I have enabled header cache for IMAP and Maildir) is for DB6 on my computer, while mutt uses -ldb4 to link and the include files from db5. This cannot possibly work reliably. I am showing the output for cd /usr/ports/mail/mutt && make, but japanese/mutt-devel has the same problem: > mutt-1.5.22 depends on shared library: libdb-6.0.so - found DB 6 as a dependency here -------------------^ (Meaning that if DB4 gets deinstalled after installing mutt, mutt will break, without port or package system knowing of the dependency.) > cc -I/usr/local/include -DPKGDATADIR=\"/usr/local/share/mutt\" > -DSYSCONFDIR=\"/usr/local/etc\" -DBINDIR=\"/usr/local/bin\" > -DMUTTLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H=1 -I. > -I. -I. -I./imap -I/usr/local/include/gpgme -I/usr/local/include > -Iintl -I/usr/include -I/usr/local/include/db5 -I/usr/local/include DB 5 header files used here -------------------^ > -I./intl -O2 -pipe -march=athlon64 -fstack-protector > -fno-strict-aliasing -MT mutt_tunnel.o -MD -MP -MF > .deps/mutt_tunnel.Tpo -c -o mutt_tunnel.o mutt_tunnel.c And now the link: > cc -I/usr/local/include -O2 -pipe -march=athlon64 -fstack-protector > -fno-strict-aliasing -L/usr/local/lib -rpath=/usr/local/lib:/usr/lib > -ltinfow -Wl,-rpath=/usr/lib:/usr/local/lib > -Wl,-rpath=/usr/lib:/usr/local/lib -fstack-protector -L/usr/lib > -L/usr/local/lib -o mutt addrbook.o alias.o attach.o base64.o > browser.o buffy.o color.o compress.o crypt.o cryptglue.o commands.o > complete.o compose.o copy.o curs_lib.o curs_main.o date.o edit.o > enter.o flags.o init.o filter.o from.o getdomain.o group.o > handler.o hash.o hdrline.o headers.o help.o hook.o keymap.o main.o > mbox.o menu.o mh.o mx.o pager.o parse.o pattern.o postpone.o > query.o recvattach.o recvcmd.o rfc822.o rfc1524.o rfc2047.o > rfc2231.o rfc3676.o score.o send.o sendlib.o signal.o sort.o > status.o system.o thread.o charset.o history.o lib.o muttlib.o > editmsg.o mbyte.o url.o ascii.o crypt-mod.o safe_asprintf.o > patchlist.o conststrings.o crypt-gpgme.o crypt-mod-pgp-gpgme.o > crypt-mod-smime-gpgme.o pgp.o pgpinvoke.o pgpkey.o pgplib.o > gnupgparse.o pgpmicalg.o pgppacket.o crypt-mod-pgp-classic.o smime.o > crypt-mod-smime-classic.o resize.o pop.o pop_lib.o pop_auth.o > bcache.o account.o mutt_socket.o mutt_tunnel.o mutt_ssl.o hcache.o > md5.o mutt_idna.o -Limap -limap -lssl -lcrypto -lz -lintl -liconv > -liconv -L/usr/local/lib -lgpgme -lassuan -lgpg-error -lidn > -L/usr/local/lib/db5 -ldb4 --tries db4 from db5 ^^^^^^ directory here. It will still succeed to link because we have -ldb4 in /usr/local/lib. This *will* break at run time because structures have changed. Include files (-I directories), Link library paths (-L directories), link library version (-ldb... version) and LIB_DEPENDS (set by the framework implicitly if USE_BDB is in effect) _MUST_ match. Both mail/mutt and japanese/mutt-devel need to be fixed such that they heed the variables set by the USE_BDB=... framework: # BDB_LIB_NAME # - This variable is automatically set to the name of the # Berkeley DB library (default: db41). ... # BDB_INCLUDE_DIR # - This variable is automatically set to the location of # the Berkeley DB include directory (default: # ${LOCALBASE}/include/db41). # BDB_LIB_DIR # - This variable is automatically set to the location of # the Berkeley DB library directory. 2. mutt is apparently at version 1.5.22 - is it possible to upgrade japanese/mutt-devel to 1.5.22 right away? Thank you. Best regards Matthias
I forgot to add instructions how to reproduce the problem: 1. install any db4 version from db42 upward (if you have one, fine!) 2. install db5, 3. install db6 4. set WITH_BDB_HIGHEST=yes in /etc/make.conf 5. attempt to build mutt.
Responsible Changed From-To: freebsd-ports-bugs->mandree I'll take it.
State Changed From-To: open->feedback Require feedback from maintainer - port is broken and needs further fixing.
[On Dec 5, Matthias Andree <mandree@FreeBSD.org> wrote:] Dear Matthias Thank you for youe review. >Dear Takehiko and Udo, > >I have had a look at Takehiko's patch to fix some issues in the port and >found a few issues with it, and the severe issue also affects devel/mutt: > >1. the dependency information for Berkeley DB (I have enabled header >cache for IMAP and Maildir) is for DB6 on my computer, while mutt uses >-ldb4 to link and the include files from db5. This cannot possibly work >reliably. How would you like such a quick hack? ================================================================ diff -urN mutt-devel/Makefile mutt-devel-ctype/Makefile --- mutt-devel/Makefile 2013-12-04 06:56:07.000000000 +0900 +++ mutt-devel-ctype/Makefile 2013-12-06 23:19:15.000000000 +0900 @@ -6,7 +6,7 @@ PORTNAME= mutt PORTVERSION= ${VERSION}.j${JP_VERSION} -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= japanese mail MASTER_SITES= ftp://ftp.mutt.org/mutt/devel/:body \ ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/devel/:body \ @@ -42,7 +42,7 @@ MAINTAINER= st@be.to COMMENT= Text-based mail client (Japanised development version) -LIB_DEPENDS= slang.2:${PORTSDIR}/japanese/libslang +LIB_DEPENDS= libslang.so:${PORTSDIR}/japanese/libslang RUN_DEPENDS= urlview:${PORTSDIR}/textproc/urlview \ ${LOCALBASE}/etc/mime.types:${PORTSDIR}/misc/mime-support @@ -62,8 +62,8 @@ AUTOMAKE_ARGS= --add-missing USE_OPENSSL= yes WRKSRC= ${WRKDIR}/mutt-${VERSION} -LDFLAGS+= -L${LOCALBASE}/lib -CONFIGURE_ENV= CC="${CC} -D_DONT_USE_CTYPE_INLINE_ ${DB_CFLAGS} -I${LOCALBASE}/include -I${LOCALBASE}/include/slang" +LDFLAGS+= -L${LOCALBASE}/lib -ltinfow +CONFIGURE_ENV= CC="${CC} -D_DONT_USE_CTYPE_INLINE_ -D_XLOCALE_CTYPE_H ${DB_CFLAGS} -I${LOCALBASE}/include -I${LOCALBASE}/include/slang" CONFIGURE_ARGS= --with-slang --enable-locales-fix \ ${ICONV_CONFIGURE_ARG} \ --without-wc-funcs \ @@ -85,20 +85,21 @@ NO_STAGE= yes .include <bsd.port.options.mk> -.if ! ${PORT_OPTIONS:MNLS} +.if ${PORT_OPTIONS:MNLS} USES+= gettext .endif .if ${PORT_OPTIONS:MCYRUS_SASL2} -LIB_DEPENDS+= sasl2:${PORTSDIR}/security/cyrus-sasl2 +LIB_DEPENDS+= libsasl2.so:${PORTSDIR}/security/cyrus-sasl2 .endif .if ${PORT_OPTIONS:MMAILDIR_HEADER_CACHE} PORT_OPTIONS+= MAILDIR_HEADER_CACHE .endif .if ${PORT_OPTIONS:MIMAP_HEADER_CACHE} USE_BDB= 42+ +CONFIGURE_SED= -e 's/BDB_VERSIONS="/&${BDB_LIB_NAME} db${BDB_VER} /' .endif .if ${PORT_OPTIONS:MIDN} -LIB_DEPENDS+= idn:${PORTSDIR}/dns/libidn +LIB_DEPENDS+= libidn.so:${PORTSDIR}/dns/libidn .endif .if ${PORT_OPTIONS:MCYRUS_SASL2} @@ -129,6 +130,10 @@ MAN5= muttrc.5 mbox.5 mmdf.5 pre-configure: +.if defined(CONFIGURE_SED) + @${REINPLACE_CMD} -E ${CONFIGURE_SED} \ + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}.ac +.endif .if ! ${PORT_OPTIONS:MDOCS} ${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-nodoc-contrib .endif ================================================================ >2. mutt is apparently at version 1.5.22 - is it possible to upgrade >japanese/mutt-devel to 1.5.22 right away? Could you please accept this quick fix first so that this port can be built on recent versions of FreeBSD? I'm aware of this latest release of mutt and working on it. Regards -- SHIOZAKI Takehiko
Author: mandree Date: Fri Dec 6 21:31:48 2013 New Revision: 335785 URL: http://svnweb.freebsd.org/changeset/ports/335785 Log: - Fix build for recent FreeBSD 9.1, 10.0 or later. - Convert to new LIB_DEPENDS syntax. - Fix mis-adopting optionsNG. - Fix inconsistency between declared LIB_DEPENDS and actual libdb version used on systems with multiple BDB versions installed. PR: 184490 Submitted by: Takehiko Shiozaki (maintainer) While here, - add LICENSE - convert to staging to avoid mutt's doc/Makefile from messing with Muttrc - convert USE_GMAKE to USES - have two files' shebang lines fixed Modified: head/japanese/mutt-devel/Makefile head/japanese/mutt-devel/pkg-plist (contents, props changed) Modified: head/japanese/mutt-devel/Makefile ============================================================================== --- head/japanese/mutt-devel/Makefile Fri Dec 6 20:56:46 2013 (r335784) +++ head/japanese/mutt-devel/Makefile Fri Dec 6 21:31:48 2013 (r335785) @@ -6,7 +6,7 @@ PORTNAME= mutt PORTVERSION= ${VERSION}.j${JP_VERSION} -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= japanese mail MASTER_SITES= ftp://ftp.mutt.org/mutt/devel/:body \ ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/devel/:body \ @@ -42,7 +42,9 @@ PATCH_DIST_STRIP= -p1 MAINTAINER= st@be.to COMMENT= Text-based mail client (Japanised development version) -LIB_DEPENDS= slang.2:${PORTSDIR}/japanese/libslang +LICENSE= GPLv2 + +LIB_DEPENDS= libslang.so:${PORTSDIR}/japanese/libslang RUN_DEPENDS= urlview:${PORTSDIR}/textproc/urlview \ ${LOCALBASE}/etc/mime.types:${PORTSDIR}/misc/mime-support @@ -56,14 +58,14 @@ MANJADATE= 20050813 FETCH_BEFORE_ARGS= -A # ha4.seikyou.ne.jp is running broken httpd NO_LATEST_LINK= yes -USE_GMAKE= yes -USES= iconv +USES= gmake iconv shebangfix +SHEBANG_FILES= smime_keys.pl contrib/smime_keys_test.pl USE_AUTOTOOLS= automake autoconf -AUTOMAKE_ARGS= --add-missing +AUTOMAKE_ARGS= --add-missing USE_OPENSSL= yes WRKSRC= ${WRKDIR}/mutt-${VERSION} -LDFLAGS+= -L${LOCALBASE}/lib -CONFIGURE_ENV= CC="${CC} -D_DONT_USE_CTYPE_INLINE_ ${DB_CFLAGS} -I${LOCALBASE}/include -I${LOCALBASE}/include/slang" +LDFLAGS+= -L${LOCALBASE}/lib -ltinfow +CONFIGURE_ENV= CC="${CC} -D_DONT_USE_CTYPE_INLINE_ -D_XLOCALE_CTYPE_H ${DB_CFLAGS} -I${LOCALBASE}/include -I${LOCALBASE}/include/slang" CONFIGURE_ARGS= --with-slang --enable-locales-fix \ ${ICONV_CONFIGURE_ARG} \ --without-wc-funcs \ @@ -82,23 +84,24 @@ CYRUS_SASL2_DESC= SASL2 authentication IMAP_HEADER_CACHE_DESC= imap header cache MAILDIR_HEADER_CACHE_DESC= maildir header cache -NO_STAGE= yes +NEED_ROOT= yes .include <bsd.port.options.mk> -.if ! ${PORT_OPTIONS:MNLS} +.if ${PORT_OPTIONS:MNLS} USES+= gettext .endif .if ${PORT_OPTIONS:MCYRUS_SASL2} -LIB_DEPENDS+= sasl2:${PORTSDIR}/security/cyrus-sasl2 +LIB_DEPENDS+= libsasl2.so:${PORTSDIR}/security/cyrus-sasl2 .endif .if ${PORT_OPTIONS:MMAILDIR_HEADER_CACHE} PORT_OPTIONS+= MAILDIR_HEADER_CACHE .endif .if ${PORT_OPTIONS:MIMAP_HEADER_CACHE} USE_BDB= 42+ +CONFIGURE_SED= -e 's/BDB_VERSIONS="/&${BDB_LIB_NAME} db${BDB_VER} /' .endif .if ${PORT_OPTIONS:MIDN} -LIB_DEPENDS+= idn:${PORTSDIR}/dns/libidn +LIB_DEPENDS+= libidn.so:${PORTSDIR}/dns/libidn .endif .if ${PORT_OPTIONS:MCYRUS_SASL2} @@ -124,11 +127,11 @@ CONFIGURE_ARGS+= --disable-hcache CONFIGURE_ARGS+= --without-qdbm .endif -NOMANCOMPRESS= yes -MAN1= flea.1 mutt.1 muttbug.1 mutt_dotlock.1 smime_keys.1 -MAN5= muttrc.5 mbox.5 mmdf.5 - pre-configure: +.if defined(CONFIGURE_SED) + @${REINPLACE_CMD} -E ${CONFIGURE_SED} \ + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}.ac +.endif .if ! ${PORT_OPTIONS:MDOCS} ${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-nodoc-contrib .endif @@ -144,21 +147,23 @@ post-configure: .if ${PORT_OPTIONS:MDOCS} post-install: - ${INSTALL_DATA} ${_DISTDIR}/INSTALL.JA-PATCH.ja ${DOCSDIR} - ${INSTALL_DATA} ${_DISTDIR}/README.JA-PATCH.ja ${DOCSDIR} - ${INSTALL_DATA} ${_DISTDIR}/manual-ja-patch.ja.txt ${DOCSDIR} - ${INSTALL_DATA} ${_DISTDIR}/usage-japanese.ja.txt ${DOCSDIR} - ${INSTALL_DATA} ${_DISTDIR}/INSTALL.JA-PATCH.ja.html ${DOCSDIR} - ${INSTALL_DATA} ${_DISTDIR}/README.JA-PATCH.ja.html ${DOCSDIR} - ${INSTALL_DATA} ${_DISTDIR}/manual-ja-patch.ja.html ${DOCSDIR} - ${INSTALL_DATA} ${_DISTDIR}/usage-japanese.ja.html ${DOCSDIR} - ${INSTALL_DATA} ${WRKDIR}/manual_ja.txt ${DOCSDIR} - ${INSTALL_DATA} ${WRKDIR}/manual_ja.tex ${DOCSDIR} - ${INSTALL_DATA} ${WRKDIR}/manual_ja.html ${DOCSDIR} - ${INSTALL_DATA} ${WRKDIR}/manual_ja.sgml ${DOCSDIR} - ${INSTALL_DATA} ${WRKDIR}/manual.ja.txt ${DOCSDIR} - ${INSTALL_DATA} ${WRKDIR}/manual.ja.html ${DOCSDIR} - ${INSTALL_DATA} ${WRKDIR}/manual.ja.sgml ${DOCSDIR} + ${INSTALL_DATA} ${_DISTDIR}/INSTALL.JA-PATCH.ja ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${_DISTDIR}/README.JA-PATCH.ja ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${_DISTDIR}/manual-ja-patch.ja.txt ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${_DISTDIR}/usage-japanese.ja.txt ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${_DISTDIR}/INSTALL.JA-PATCH.ja.html ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${_DISTDIR}/README.JA-PATCH.ja.html ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${_DISTDIR}/manual-ja-patch.ja.html ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${_DISTDIR}/usage-japanese.ja.html ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKDIR}/manual_ja.txt ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKDIR}/manual_ja.tex ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKDIR}/manual_ja.html ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKDIR}/manual_ja.sgml ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKDIR}/manual.ja.txt ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKDIR}/manual.ja.html ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKDIR}/manual.ja.sgml ${STAGEDIR}${DOCSDIR} .endif + # These are outside the path and do not belong there: + ${RM} ${STAGEDIR}${PREFIX}/etc/Muttrc ${STAGEDIR}${PREFIX}/etc/mime.types .include <bsd.port.mk> Modified: head/japanese/mutt-devel/pkg-plist ============================================================================== --- head/japanese/mutt-devel/pkg-plist Fri Dec 6 20:56:46 2013 (r335784) +++ head/japanese/mutt-devel/pkg-plist Fri Dec 6 21:31:48 2013 (r335785) @@ -8,6 +8,14 @@ bin/smime_keys @unexec if cmp -s %D/etc/Muttrc.dist %D/etc/Muttrc; then rm -f %D/etc/Muttrc; fi etc/Muttrc.dist etc/mime.types.dist +man/man1/flea.1.gz +man/man1/mutt.1.gz +man/man1/mutt_dotlock.1.gz +man/man1/muttbug.1.gz +man/man1/smime_keys.1.gz +man/man5/mbox.5.gz +man/man5/mmdf.5.gz +man/man5/muttrc.5.gz %%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT %%PORTDOCS%%%%DOCSDIR%%/ChangeLog %%PORTDOCS%%%%DOCSDIR%%/GPL _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
I have accepted the patch, and converted the port to staging to fix mutt's doc/Makefile meddling with Muttrc. Thanks for the prompt fixes.
State Changed From-To: feedback->closed Committed, with changes as explained in the PR.