ports/131681: Add OPTIONS framework to gpac-libgpac port

Josh Carroll josh.carroll at gmail.com
Sat Feb 14 21:15:23 UTC 2009


Here is an updated patch which adds a LIB_DEPEND for the libGL port if
the OPENGL option is selected (which is the default).

Thanks,
Josh


--- Makefile.orig	2009-02-13 20:55:45.000000000 -0500
+++ Makefile	2009-02-14 15:41:15.000000000 -0500
@@ -27,9 +27,25 @@
 LIBVER=	1

 CONFIGURE_ARGS=	--cc="${CC}" \
-		--extra-cflags="${CFLAGS} ${PTHREAD_CFLAGS} -fPIC" \
+		--enable-pic \
+		--extra-cflags="${CFLAGS} ${PTHREAD_CFLAGS}" \
 		--extra-ldflags="${LDFLAGS} ${PTHREAD_LIBS}"

+OPTIONS=	OPENGL	"OpenGL support" on \
+			IPV6	"IPv6 support" on
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITHOUT_OPENGL)
+CONFIGURE_ARGS+=	--disable-opengl
+.else
+LIB_DEPENDS+=	GL.1:${PORTSDIR}/graphics/libGL
+.endif
+
+.if defined(WITHOUT_IPV6)
+CONFIGURE_ARGS+=	--disable-ipv6
+.endif
+
 post-patch:
 	${CHMOD} +x ${WRKSRC}/configure

@@ -41,4 +57,4 @@
 	${LN} -sf libgpac.so.${LIBVER} ${PREFIX}/lib/libgpac.so
 	${INSTALL_DATA} ${INSTALL_WRKSRC}/libgpac_static.a ${PREFIX}/lib

-.include <bsd.port.mk>
+.include <bsd.port.post.mk>



More information about the freebsd-ports-bugs mailing list