ports/131681: Add OPTIONS framework to gpac-libgpac port
Josh Carroll
josh.carroll at gmail.com
Sat Feb 14 20:10:01 UTC 2009
>Number: 131681
>Category: ports
>Synopsis: Add OPTIONS framework to gpac-libgpac port
>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 Feb 14 20:10:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Josh Carroll
>Release: 7.1-RELEASE/amd64
>Organization:
n/a
>Environment:
FreeBSD pflog.net 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Sat Jan 3 09:49:18 EST 2009 root at pflog.net:/usr/obj/usr/src/sys/PFLOG amd64
>Description:
I wanted to disable IPv6 and OpenGL support for the gpac-libgpac port, but there were no existing knobs.
So I added OPTIONS support to this port and added two configurable options to enable/disable IPV6 and OpenGL. Both default to "on" and thus the port should build by default with the same options as before.
I also made a minor change to the CONFIGURE_ARGS to add --enable-pic rather than manually adding -fPIC to the --extra-ldflags option.
Below is the plain text of the patch (in case the attachment does not work - I seem to have problems attaching patches to PRs - user error, I know).
Thanks!
Josh
>How-To-Repeat:
n/a
>Fix:
diff -urN gpac-libgpac.old/Makefile gpac-libgpac/Makefile
--- gpac-libgpac.old/Makefile 2009-02-14 13:52:47.000000000 -0500
+++ gpac-libgpac/Makefile 2009-02-14 14:54:56.000000000 -0500
@@ -27,9 +27,22 @@
LIBVER= 1
CONFIGURE_ARGS= --cc="${CC}" \
- --extra-cflags="${CFLAGS} ${PTHREAD_CFLAGS} -fPIC" \
- --extra-ldflags="${LDFLAGS} ${PTHREAD_LIBS}" \
- --disable-opengl
+ --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
+.endif
+
+.if defined(WITHOUT_IPV6)
+CONFIGURE_ARGS+= --disable-ipv6
+.endif
post-patch:
${CHMOD} +x ${WRKSRC}/configure
@@ -42,4 +55,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>
Patch attached with submission follows:
diff -urN gpac-libgpac.old/Makefile gpac-libgpac/Makefile
--- gpac-libgpac.old/Makefile 2009-02-14 13:52:47.000000000 -0500
+++ gpac-libgpac/Makefile 2009-02-14 14:54:56.000000000 -0500
@@ -27,9 +27,22 @@
LIBVER= 1
CONFIGURE_ARGS= --cc="${CC}" \
- --extra-cflags="${CFLAGS} ${PTHREAD_CFLAGS} -fPIC" \
- --extra-ldflags="${LDFLAGS} ${PTHREAD_LIBS}" \
- --disable-opengl
+ --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
+.endif
+
+.if defined(WITHOUT_IPV6)
+CONFIGURE_ARGS+= --disable-ipv6
+.endif
post-patch:
${CHMOD} +x ${WRKSRC}/configure
@@ -42,4 +55,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>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list