Date: Sat, 7 Dec 2013 11:27:59 -0500 (EST) From: Adam Weinberger <adamw@FreeBSD.org> To: FreeBSD-gnats-submit@freebsd.org Cc: stefan@FreeBSD.org Subject: ports/184579: Use OPTIONS and mandate GCC for mail/spamprobe [patch] Message-ID: <20131207162759.959D011FDB5@apnoea.adamw.org> Resent-Message-ID: <201312071730.rB7HU0JO038383@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 184579 >Category: ports >Synopsis: Use OPTIONS and mandate GCC for mail/spamprobe [patch] >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Dec 07 17:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Adam Weinberger >Release: FreeBSD 9.2-STABLE i386 >Organization: >Environment: System: FreeBSD apnoea.adamw.org 9.2-STABLE FreeBSD 9.2-STABLE #0: Sat Nov 30 11:45:56 EST 2013 root@apnoea.adamw.org:/usr/obj/usr/src/sys/PEEP i386 >Description: mail/spamprobe requires a combination of WITHOUT_XYZ's, and if a library is installed, it'll link against it even if you ask it not to. The defaults are also a bit overkill (automatically using bdb and libpbl). The Makefile specifies GCC for >= 10, but I can't get it to build with clang on 9. So, I've just made USE_GCC the default here. >How-To-Repeat: >Fix: --- spamprobe.patch begins here --- Index: Makefile =================================================================== --- Makefile (revision 335833) +++ Makefile (working copy) @@ -12,56 +12,48 @@ GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-default-8bit +USE_GCC= any PLIST_FILES= bin/spamprobe man/man1/spamprobe.1.gz -.include <bsd.port.pre.mk> +OPTIONS_DEFINE= GIF JPEG PNG +OPTIONS_MULTI= DATABASE +OPTIONS_MULTI_DATABASE= PBL BDB +OPTIONS_DEFAULT=PBL GIF JPEG PNG +PBL_DESC= PBL database support (author's recommended data store) -.if ${OSVERSION} >= 1000024 -USE_GCC= yes -.endif +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib # PBL support -.if !defined(WITHOUT_PBL) -BUILD_DEPENDS+= ${LOCALBASE}/include/pbl.h:${PORTSDIR}/databases/libpbl -CONFIGURE_ARGS+= --with-pbl=${LOCALBASE} -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -lpbl -.endif +PBL_BUILD_DEPENDS= ${LOCALBASE}/lib/libpbl.a:${PORTSDIR}/databases/libpbl +PBL_RUN_DEPENDS+= ${PBL_BUILD_DEPENDS} +PBL_CONFIGURE_WITH= pbl +PBL_LDFLAGS= -lpbl # BerkleyDB support -.if !defined(WITHOUT_BDB) -USE_BDB= 40+ -CONFIGURE_ARGS+= --enable-cdb -CPPFLAGS+= -I${BDB_INCLUDE_DIR} -DUSE_DB=1 -LDFLAGS+= -L${LOCALBASE}/lib -l${BDB_LIB_NAME} -.endif +BDB_CONFIGURE_ENABLE= cdb +BDB_CONFIGURE_WITH= db +BDB_CPPFLAGS= -DUSE_DB=1 # giflib support -.if defined(WITHOUT_UNGIF) -CONFIGURE_ARGS+= --without-gif -.else -LIB_DEPENDS+= gif.5:${PORTSDIR}/graphics/giflib -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -.endif +GIF_CONFIGURE_WITH= gif +GIF_LIB_DEPENDS= libgif.so:${PORTSDIR}/graphics/giflib # PNG support -.if defined(WITHOUT_PNG) -CONFIGURE_ARGS+= --without-png -.else -LIB_DEPENDS+= png15:${PORTSDIR}/graphics/png -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -.endif +PNG_CONFIGURE_WITH= png +PNG_LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png # JPEG support -.if defined(WITHOUT_JPEG) -CONFIGURE_ARGS+= --without-jpeg -.else -LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib +JPEG_CONFIGURE_WITH=jpeg +JPEG_LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MBDB} +USE_BDB= 40+ +CPPFLAGS+= -I${BDB_INCLUDE_DIR} +LDFLAGS+= -l${BDB_LIB_NAME} .endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> --- spamprobe.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131207162759.959D011FDB5>