Stealth dependency in textproc/redland

Mel Flynn mel.flynn+fbsd.ports at mailing.thruhere.net
Wed Sep 16 16:59:47 UTC 2009


On Wednesday 16 September 2009 15:36:36 Chuck Swiger wrote:
> Hi, Mel--
> 
> On Sep 16, 2009, at 5:46 AM, Mel Flynn wrote:
> > the naughty rasqal/configure will try to find libgmp and link with
> > it if found
> 
> [ ... ]
> 
> > I traced this to the now absent libgmp.so.8. I'm a little short on
> > time, but
> > if needed can patch and PR it. Would you like this through OPTIONS
> > asking for
> > libgmp or disable it all together?
> 
> Thanks for the report.  It's probably best to have an OPTION which
> controls whether to pull in libgmp and list as a dependency, or
> disable it from being used.  If you write a patch, I'll be happy to
> review, otherwise I'll try to add something along those lines when I
> get a chance...

Ok, patch attached. Thanks to Jan Henrik Sylvester for pointing at mpfr as 
well. I don't believe it's necessary to recompile direct consumers of redland 
if any of the math options change, but this is untested by me. I verified 
output of make clean config configure for all possible combinations.
-- 
Mel
-------------- next part --------------
Index: textproc/redland/Makefile
===================================================================
RCS file: /home/ncvs/ports/textproc/redland/Makefile,v
retrieving revision 1.34
diff -u -r1.34 Makefile
--- textproc/redland/Makefile	22 Aug 2009 00:37:06 -0000	1.34
+++ textproc/redland/Makefile	16 Sep 2009 16:43:07 -0000
@@ -8,7 +8,7 @@
 
 PORTNAME=	redland
 PORTVERSION=	1.0.7
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	textproc
 MASTER_SITES=	SF/librdf/${PORTNAME}/${PORTVERSION} \
 		http://librdf.org/dist/source/
@@ -43,6 +43,9 @@
 MAN3=		librasqal.3 redland.3
 
 OPTIONS+=	MYSQL "Use MySQL instead of BDB" off
+OPTIONS+=	MPFR  "Use MPFR library for decimals (implies GMP)" off
+OPTIONS+=	GMP   "Use Gnu MP library for decimals" off
+
 
 .include <bsd.port.pre.mk>
 
@@ -55,6 +58,19 @@
 PLIST_SUB+=	MYSQL="@comment "
 .endif
 
+# Set to mpfr if MPFR is on, gmp if only GMP is on and none if neither.
+# This guards against $user setting both GMP and MPFR, since we can't be
+# very verbose in explaining our options.
+.if defined(WITH_MPFR)
+CONFIGURE_ARGS+=	--with-decimal=mpfr
+LIB_DEPENDS+=	mpfr.3:${PORTSDIR}/math/mpfr
+.elif defined(WITH_GMP)
+CONFIGURE_ARGS+=	--with-decimal=gmp
+LIB_DEPENDS+=	gmp.8:${PORTSDIR}/math/gmp4
+.else
+CONFIGURE_ARGS+=	--with-decimal=none
+.endif
+
 pre-everything::
 	@${ECHO_CMD} "You can choose BDB version by setting WITH_BDB_VER to one off:"
 	@${ECHO_CMD} "3 40 41 42 43 44 3+ 40+ 41+ 42+ 43+ 44+ (current: ${BDB_VER})"


More information about the freebsd-ports mailing list