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
This commit is contained in:
parent
aea8084dfb
commit
830b88b628
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=483247
4 changed files with 43 additions and 20 deletions
|
@ -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,13 +30,13 @@ BDB_CONFIGURE_ENV= DB_LIBNAME=-l${BDB_LIB_NAME}
|
|||
|
||||
DEBUG_CONFIGURE_ON= --debug=yes
|
||||
|
||||
MYSQL_BUILD_DEPENDS= mysql80-client>0:databases/mysql80-client
|
||||
MYSQL_CONFIGURE_WITH= mysql
|
||||
MYSQL_VARS= MAKE_ARGS=CFLAGS+="-I${WRKSRC} -I${LOCALBASE}/include" \
|
||||
LDFLAGS+=-L${LOCALBASE}/lib/mysql
|
||||
MANPAGES_ALL_TARGET= docs
|
||||
MANPAGES_BUILD_DEPENDS= xmlto:textproc/xmlto
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|@@CC|${CC}|;s|@@CXX|${CXX}|' ${WRKSRC}/configure
|
||||
MYSQL_CONFIGURE_WITH= mysql
|
||||
MYSQL_CFLAGS= -I${LOCALBASE}/include/mysql
|
||||
MYSQL_LDFLAGS= -L${LOCALBASE}/lib/mysql
|
||||
MYSQL_USES= mysql
|
||||
|
||||
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>
|
||||
|
|
20
mail/bmf/files/patch-Makefile.in
Normal file
20
mail/bmf/files/patch-Makefile.in
Normal file
|
@ -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)
|
|
@ -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}"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
bin/bmf
|
||||
bin/bmfconv
|
||||
%%MANPAGES%%man/man1/bmf.1.gz
|
||||
%%MANPAGES%%man/man1/bmfconv.1.gz
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
|
|
Loading…
Reference in a new issue