Skip to content

Commit

Permalink
- Enable staging, simplifying the port, especially the PLIST code
Browse files Browse the repository at this point in the history
- Make port work with installed db6 for header caches

PR:		ports/185081
Submitted by:	Udo Schweigert <udo.schweigert (at) siemens.com> (maintainer)
  • Loading branch information
thierry-FreeBSD committed Feb 3, 2014
1 parent 78e0783 commit 1cefc53
Show file tree
Hide file tree
Showing 10 changed files with 161 additions and 354 deletions.
1 change: 0 additions & 1 deletion mail/mutt-lite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ CONFLICTS= ja-mutt-[0-9]* ja-mutt-devel-[0-9]* mutt-[0-9]* mutt-devel-[0-9]* mut

MUTT_LITE= yes

NO_STAGE= yes
.include "${MASTERDIR}/Makefile"
104 changes: 27 additions & 77 deletions mail/mutt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

PORTNAME= mutt
PORTVERSION= 1.5.22
PORTREVISION= 0
CATEGORIES+= mail ipv6
MASTER_SITES= ftp://ftp.mutt.org/mutt/devel/ \
ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/devel/ \
Expand All @@ -15,7 +14,6 @@ MASTER_SITES= ftp://ftp.mutt.org/mutt/devel/ \
ftp://ftp3.mutt.org.ua/pub/mutt/mutt-${VVV_PATCH_VERSION}/:vvv \
http://www.spinnaker.de/mutt/compressed/:rr \
http://lunar-linux.org/~tchan/mutt/:tchan
DISTNAME= mutt-${PORTVERSION}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}

Expand All @@ -42,6 +40,10 @@ CONFIGURE_ARGS= --disable-fcntl --with-ssl=${OPENSSLBASE} \
--with-docdir=${DOCSDIR} --sysconfdir=${PREFIX}/etc \
--enable-external-dotlock --enable-pop --enable-imap \
--disable-warnings

USES+= shebangfix
SHEBANG_FILES= doc/gen-map-doc smime_keys.pl contrib/smime_keys_test.pl

.if defined(MUTT_CONFIGURE_ARGS)
CONFIGURE_ARGS+= ${MUTT_CONFIGURE_ARGS}
.endif
Expand Down Expand Up @@ -103,11 +105,6 @@ OPTIONS_DEFAULT= COMPRESSED_FOLDERS HTML ICONV MAILBOX_MANPAGES \
NLS XML SMTP
.endif

PLIST= ${WRKDIR}/PLIST
PKGMESSAGE= ${WRKDIR}/pkg-message
SCRIPTS_ENV= WRKDIR="${WRKDIR}"

NO_STAGE= yes
.include <bsd.port.options.mk>

DW_PATCH_VERSION= 1.5.6
Expand All @@ -131,6 +128,7 @@ AC_PATCH_VERSION= ${PORTVERSION}

.if defined (LITE)
PKGNAMESUFFIX= -lite
PLIST_SUB+= MBOXMAN=""
.endif

# XXX
Expand Down Expand Up @@ -165,7 +163,7 @@ LIB_DEPENDS+= libslang.so:${PORTSDIR}/devel/libslang2
.endif

.if ${PORT_OPTIONS:MNCURSES}
USES= ncurses
USES+= ncurses
.endif

.if ! ${PORT_OPTIONS:MSGMLFORMAT} || ! ${PORT_OPTIONS:MXML} || !defined(XML_USED) \
Expand All @@ -175,9 +173,10 @@ XML_USED= no

.if ${PORT_OPTIONS:MNLS}
USES+= gettext
SCRIPTS_ENV+= NLS="yes"
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment "
.endif

.if ${PORT_OPTIONS:MSASL}
Expand All @@ -198,7 +197,6 @@ post-patch::
.if ${PORT_OPTIONS:MSIGNATURE_MENU}
IGNORE= the WITH_SIGNATURE_MENU does not work at the moment
XML_NEEDED= yes
SCRIPTS_ENV+= SIGNATURE_MENU="yes"
post-patch::
@${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-signature-menu
.endif
Expand Down Expand Up @@ -310,12 +308,16 @@ DISTFILES+= patch-${VVV_PATCH_VERSION}.vvv.nntp_ru.gz:vvv
CONFIGURE_ARGS+= --enable-nntp
XML_NEEDED= yes
CATEGORIES+= news
SCRIPTS_ENV+= NNTP="yes"
PLIST_SUB+= NNTP=""
pre-patch::
@${GUNZIP_CMD} -c ${DISTDIR}/${DIST_SUBDIR}/patch-${VVV_PATCH_VERSION}.vvv.nntp.gz > ${WRKDIR}/patch-nntp
@${REINPLACE_CMD} -E '/^diff.*\/doc\/manual.txt$$/,/^diff/d' \
${WRKDIR}/patch-nntp
@${PATCH} ${PATCH_ARGS} -p1 < ${WRKDIR}/patch-nntp
post-install:
${INSTALL_MAN} ${WRKSRC}/ChangeLog.nntp ${STAGEDIR}${DOCSDIR}
.else
PLIST_SUB+= NNTP="@comment "
.endif

.if ${PORT_OPTIONS:MQUOTE_PATCH}
Expand Down Expand Up @@ -355,11 +357,6 @@ post-patch::
.endif

WRKSRC= ${WRKDIR}/${DISTNAME:S/i$//}
MAN1= mutt.1 mutt_dotlock.1 flea.1 muttbug.1 pgpewrap.1 pgpring.1 smime_keys.1
MAN5= muttrc.5
.if ${PORT_OPTIONS:MMAILBOX_MANPAGES}
MAN5+= mbox.5 mmdf.5
.endif

post-patch::
@${REINPLACE_CMD} -e 's,/usr/bin/gpg,${LOCALBASE}/bin/gpg,g' \
Expand All @@ -368,9 +365,6 @@ post-patch::
${WRKSRC}/contrib/pgp6.rc
@${REINPLACE_CMD} -E -e 's|@samplesdir@|${EXAMPLESDIR}|g' \
${WRKSRC}/contrib/Makefile.am
.if ! ${PORT_OPTIONS:MMAILBOX_MANPAGES}
@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-no-mbox-manpage
.endif

pre-configure::
@(cd ${WRKSRC}; ${SETENV} ${AUTOMAKE_ENV} ${ACLOCAL} -I m4)
Expand All @@ -380,16 +374,10 @@ pre-configure::
${WRKSRC}/imap/auth_gss.c
.endif

.if ${PORT_OPTIONS:MSLAVE_HTML_PAGES}
SCRIPTS_ENV+= SLAVE_HTML_PAGES="${SLAVE_HTML_PAGES}"
.endif

.if ${PORT_OPTIONS:MCOMPRESSED_FOLDERS}
SCRIPTS_ENV+= COMPRESSED_FOLDERS="yes"
.endif

.if ${PORT_OPTIONS:MQUOTE_PATCH}
SCRIPTS_ENV+= QUOTE_PATCH="yes"
PLIST_SUB+= COMPRESS=""
.else
PLIST_SUB+= COMPRESS="@comment "
.endif

.if ${PORT_OPTIONS:MIMAP_HEADER_CACHE} || ${PORT_OPTIONS:MMAILDIR_HEADER_CACHE}
Expand All @@ -399,6 +387,9 @@ LIB_DEPENDS+= libtokyocabinet.so:${PORTSDIR}/databases/tokyocabinet
.else
USE_BDB= 42+
CONFIGURE_ARGS+= --enable-hcache --without-gdbm --with-bdb
CONFIGURE_SED= -e 's/BDB_VERSIONS="/&${BDB_LIB_NAME} db${BDB_VER} /'
pre-configure::
@${REINPLACE_CMD} -E ${CONFIGURE_SED} ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}.ac
.endif
.else
CONFIGURE_ARGS+= --disable-hcache
Expand All @@ -408,36 +399,25 @@ CONFIGURE_ARGS+= --disable-hcache
CONFIGURE_ARGS+= --without-qdbm
.endif

.if ${PORT_OPTIONS:MSIDEBAR_PATCH}
SCRIPTS_ENV+= SIDEBAR_PATCH="yes"
.endif

.if ${PORT_OPTIONS:MIFDEF_PATCH}
SCRIPTS_ENV+= IFDEF_PATCH="yes"
.endif

.if ${PORT_OPTIONS:MREVERSE_REPLY_PATCH}
SCRIPTS_ENV+= REVERSE_REPLY_PATCH="yes"
.endif

.if defined (XML_NEEDED) && ${PORT_OPTIONS:MXML}
XML_USED= yes
.endif
.if ${PORT_OPTIONS:MHTML}
XML_USED= yes
.endif

.if ${PORT_OPTIONS:MDOCS} || ${XML_USED} == yes
INSTALL_DOCS= yes
.if ${PORT_OPTIONS:MMAILBOX_MANPAGES}
PLIST_SUB+= MBOXMAN=""
.else
INSTALL_DOCS= no
PLIST_SUB+= MBOXMAN="@comment "
.endif

.if ${INSTALL_DOCS} == yes
SCRIPTS_ENV+= PORTDOCS="yes"
.if ${PORT_OPTIONS:MHTML}
SCRIPTS_ENV+= HTML="yes"
PLIST_SUB+= HTML=""
.else
PLIST_SUB+= HTML="@comment "
.endif
.if ${PORT_OPTIONS:MDOCS} || ${XML_USED} == yes
post-build:
@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-doc-ref
@${REINPLACE_CMD} -E -e 's|\$$\{PREFIX\}|${PREFIX}|g' \
Expand All @@ -448,42 +428,16 @@ post-build:
-e 's|\$$\{DOCSDIR\}|${DOCSDIR}|g' \
-e 's|\$$\{EXAMPLESDIR\}|${EXAMPLESDIR}|g' \
${WRKSRC}/doc/muttrc.man
.else # ! INSTALL_DOCS
post-patch::
.if ${PORT_OPTIONS:MMAILBOX_MANPAGES}
@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-nodoc-mailbox-contrib
.else
@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-nodoc-contrib
.endif
.endif # ! INSTALL_DOCS

.if ${XML_USED} == yes
BUILD_DEPENDS+= xsltproc:${PORTSDIR}/textproc/libxslt \
${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl \
lynx:${PORTSDIR}/www/lynx
post-patch::
@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-doc-xml
.endif

pre-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/generate-plist > ${PLIST}

post-install:
${INSTALL_DATA} ${WRKSRC}/doc/Muttrc ${PREFIX}/etc/Muttrc.dist
.if ${INSTALL_DOCS} == yes
@${ECHO} "===> Installing Mutt documentation"
@${MKDIR} ${DOCSDIR} && ${CHMOD} a+rx ${DOCSDIR}
@cd ${WRKSRC}/doc ; ${INSTALL_MAN} manual.txt PGP-Notes.txt \
../ABOUT-NLS ../contrib/language* ${DOCSDIR}
.if ${PORT_OPTIONS:MNNTP}
@cd ${WRKSRC} ; ${INSTALL_MAN} ChangeLog.nntp ${DOCSDIR}
.endif
.if ${PORT_OPTIONS:MHTML}
@${MKDIR} ${DOCSDIR}/html && ${CHMOD} a+rx ${DOCSDIR}/html
${INSTALL_MAN} ${WRKSRC}/doc/*.html ${DOCSDIR}/html
.endif
.endif
.if ${PORT_OPTIONS:MSLANG}
PKGMESSAGE= ${WRKDIR}/pkg-message
@${ECHO} "=====================================================" > ${PKGMESSAGE}
@${ECHO} "You have installed ${PORTNAME} with SLANG support." >> ${PKGMESSAGE}
@${ECHO} "This may work for a color terminal only when defining" >> ${PKGMESSAGE}
Expand All @@ -492,8 +446,4 @@ post-install:
@${ECHO} "=====================================================" >> ${PKGMESSAGE}
.endif

.if !defined(BATCH) && ${PORT_OPTIONS:MSLANG}
@${CAT} ${PKGMESSAGE}
@${ECHO}
.endif
.include <bsd.port.mk>
11 changes: 0 additions & 11 deletions mail/mutt/files/extra-patch-doc-xml

This file was deleted.

29 changes: 0 additions & 29 deletions mail/mutt/files/extra-patch-no-mbox-manpage

This file was deleted.

28 changes: 0 additions & 28 deletions mail/mutt/files/extra-patch-nodoc-contrib

This file was deleted.

28 changes: 0 additions & 28 deletions mail/mutt/files/extra-patch-nodoc-mailbox-contrib

This file was deleted.

23 changes: 2 additions & 21 deletions mail/mutt/files/patch-02
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
--- doc/Makefile.am.orig 2013-10-18 06:48:24.000000000 +0200
+++ doc/Makefile.am 2013-10-18 12:30:09.000000000 +0200
@@ -48,7 +48,7 @@

all: makedoc-all

-makedoc-all: mutt.1 smime_keys.1 muttrc.man manual.html stamp-doc-rc stamp-doc-chunked manual.txt pgpewrap.1 pgpring.1
+makedoc-all: mutt.1 smime_keys.1 muttrc.man pgpewrap.1 pgpring.1

install-data-local: makedoc-all instdoc
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1
@@ -73,9 +73,6 @@
$(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir) ; \
done
-$(INSTALL) -m 644 manual.txt $(DESTDIR)$(docdir)
- -for f in $(HTML_DOCFILES) ; do \
- $(INSTALL) -m 644 $$f $(DESTDIR)$(docdir) ; \
- done
$(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir)/Muttrc.dist
-if [ -f $(DESTDIR)$(pkgdatadir)/Muttrc ] ; then \
mv $(DESTDIR)$(pkgdatadir)/Muttrc* $(DESTDIR)$(sysconfdir) ; \
@@ -106,9 +103,7 @@
+++ doc/Makefile.am 2013-12-22 00:01:17.000000000 +0100
@@ -106,9 +106,7 @@

check:
manual.txt: manual.html
Expand Down
14 changes: 14 additions & 0 deletions mail/mutt/files/patch-staging-Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- Makefile.am.orig 2013-12-20 12:47:32.000000000 +0100
+++ Makefile.am 2013-12-20 12:52:38.000000000 +0100
@@ -156,11 +156,6 @@
rm -f $(DESTDIR)$(bindir)/mutt.dotlock ; \
ln -sf $(DESTDIR)$(bindir)/mutt_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \
fi
- if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test x@DOTLOCK_GROUP@ != x ; then \
- chgrp @DOTLOCK_GROUP@ $(DESTDIR)$(bindir)/mutt_dotlock && \
- chmod @DOTLOCK_PERMISSION@ $(DESTDIR)$(bindir)/mutt_dotlock || \
- { echo "Can't fix mutt_dotlock's permissions! This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \
- fi

install-data-local:
$(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
Loading

0 comments on commit 1cefc53

Please sign in to comment.