Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Oct 2018 09:26:13 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r483247 - in head/mail/bmf: . files
Message-ID:  <201810280926.w9S9QD7H030631@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sun Oct 28 09:26:13 2018
New Revision: 483247
URL: https://svnweb.freebsd.org/changeset/ports/483247

Log:
  Cleanup mail/bmf
  
  - Cleanup MYSQL option: properly declare libmysqlclient dependency,
    unbreak with other mysql version/variants
  - Respect CC and CFLAGS
  - Remove post-patch and simplify with BINARY_ALIAS
  - Do not strip binaries twice
  - Generate manpages and install them again
  
  PR:		232493

Added:
  head/mail/bmf/files/patch-Makefile.in   (contents, props changed)
Modified:
  head/mail/bmf/Makefile
  head/mail/bmf/files/patch-configure
  head/mail/bmf/pkg-plist

Modified: head/mail/bmf/Makefile
==============================================================================
--- head/mail/bmf/Makefile	Sun Oct 28 09:12:04 2018	(r483246)
+++ head/mail/bmf/Makefile	Sun Oct 28 09:26:13 2018	(r483247)
@@ -3,6 +3,7 @@
 
 PORTNAME=	bmf
 PORTVERSION=	0.84
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	SF
 
@@ -14,9 +15,12 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 HAS_CONFIGURE=	yes
 ALL_TARGET=	apps
+BINARY_ALIAS=	gcc=${CC} g++=${CXX}
+CONFIGURE_ENV=	CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
 
-OPTIONS_DEFINE=	BDB DEBUG DOCS MYSQL
-OPTIONS_DEFAULT=BDB
+OPTIONS_DEFINE=	BDB DEBUG DOCS MANPAGES MYSQL
+OPTIONS_DEFAULT=BDB MANPAGES
+OPTIONS_SUB=	yes
 
 BDB_USES=		bdb
 BDB_CONFIGURE_WITH=	libdb
@@ -26,14 +30,14 @@ BDB_CONFIGURE_ENV=	DB_LIBNAME=-l${BDB_LIB_NAME}
 
 DEBUG_CONFIGURE_ON=	--debug=yes
 
-MYSQL_BUILD_DEPENDS=	mysql80-client>0:databases/mysql80-client
+MANPAGES_ALL_TARGET=	docs
+MANPAGES_BUILD_DEPENDS=	xmlto:textproc/xmlto
+
 MYSQL_CONFIGURE_WITH=	mysql
-MYSQL_VARS=		MAKE_ARGS=CFLAGS+="-I${WRKSRC} -I${LOCALBASE}/include" \
-			LDFLAGS+=-L${LOCALBASE}/lib/mysql
+MYSQL_CFLAGS=		-I${LOCALBASE}/include/mysql
+MYSQL_LDFLAGS=		-L${LOCALBASE}/lib/mysql
+MYSQL_USES=		mysql
 
-post-patch:
-	@${REINPLACE_CMD} -e 's|@@CC|${CC}|;s|@@CXX|${CXX}|' ${WRKSRC}/configure
-
 do-install:
 	(cd ${WRKSRC} ; ${INSTALL_PROGRAM} bmf bmfconv ${STAGEDIR}${PREFIX}/bin)
 
@@ -41,7 +45,7 @@ do-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
 
-post-install:
-	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/bmf ${STAGEDIR}${PREFIX}/bin/bmfconv
+do-install-MANPAGES-on:
+	cd ${WRKSRC} && ${INSTALL_MAN} bmf.1 bmfconv.1 ${STAGEDIR}${PREFIX}/man/man1
 
 .include <bsd.port.mk>

Added: head/mail/bmf/files/patch-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/bmf/files/patch-Makefile.in	Sun Oct 28 09:26:13 2018	(r483247)
@@ -0,0 +1,20 @@
+--- Makefile.in.orig	2002-10-09 16:41:56 UTC
++++ Makefile.in
+@@ -28,7 +28,7 @@ bmf.o: bmf.c
+ 	$(CC) $(CFLAGS) -DPACKAGE=\"bmf\" -DVERSION=\"$(VERSION)\" -c $<
+ 
+ bmf.1: bmf.xml
+-	xsltproc --docbook db2man/docbook.xsl bmf.xml
++	xmlto --skip-validation man bmf.xml
+ 
+ bmfconv: bmfconv.o dbmysql.o dbdb.o dbtext.o dbh.o lex.o vec.o str.o
+ 	$(CC) -o $@ bmfconv.o dbmysql.o dbdb.o dbtext.o dbh.o lex.o vec.o str.o $(LDFLAGS)
+@@ -37,7 +37,7 @@ bmfconv.o: bmfconv.c
+ 	$(CC) $(CFLAGS) -DPACKAGE=\"bmfconv\" -DVERSION=\"$(VERSION)\" -c $<
+ 
+ bmfconv.1: bmfconv.xml
+-	xsltproc --docbook db2man/docbook.xsl bmfconv.xml
++	xmlto man bmfconv.xml
+ 
+ install: checkroot bmf bmf.1 bmfconv bmfconv.1
+ 	[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)

Modified: head/mail/bmf/files/patch-configure
==============================================================================
--- head/mail/bmf/files/patch-configure	Sun Oct 28 09:12:04 2018	(r483246)
+++ head/mail/bmf/files/patch-configure	Sun Oct 28 09:26:13 2018	(r483247)
@@ -1,21 +1,18 @@
 --- configure.orig	2002-10-09 16:29:26 UTC
 +++ configure
-@@ -128,16 +128,16 @@ case "$UNAME_S" in
-       CCDBG="-DNDEBUG"
+@@ -129,15 +129,15 @@ case "$UNAME_S" in
        LDDBG=""
      fi
--    CC=gcc
-+    CC=cc
-     CFLAGS="$CCDBG -D_UNIX -D_BSD=$OSVER -Wall"
--    CXX=g++
-+    CXX=c++
+     CC=gcc
+-    CFLAGS="$CCDBG -D_UNIX -D_BSD=$OSVER -Wall"
++    CFLAGS="$CCDBG -D_UNIX -D_BSD=$OSVER -Wall $CFLAGS"
+     CXX=g++
      CXXFLAGS=${CFLAGS}
      AR=ar
      ARFLAGS="-rc"
--    LD=gcc
+     LD=gcc
 -    LDFLAGS="$LDDBG"
-+    LD=cc
-+    LDFLAGS="${LDFLAGS}"
++    LDFLAGS="$LDDBG $LDFLAGS"
      SYSLIBS=""
 -    LIBDB_LIB=""
 +    LIBDB_LIB="${DB_LIBNAME}"

Modified: head/mail/bmf/pkg-plist
==============================================================================
--- head/mail/bmf/pkg-plist	Sun Oct 28 09:12:04 2018	(r483246)
+++ head/mail/bmf/pkg-plist	Sun Oct 28 09:26:13 2018	(r483247)
@@ -1,3 +1,5 @@
 bin/bmf
 bin/bmfconv
+%%MANPAGES%%man/man1/bmf.1.gz
+%%MANPAGES%%man/man1/bmfconv.1.gz
 %%PORTDOCS%%%%DOCSDIR%%/README



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810280926.w9S9QD7H030631>