diff options
author | jkim <jkim@FreeBSD.org> | 2009-02-20 07:20:57 +0800 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2009-02-20 07:20:57 +0800 |
commit | 34098b184afce41d3c776e973b30c3a211abffc6 (patch) | |
tree | cf4b2030cc81e224de1070faa2d14f0a51921601 /multimedia/gpac-libgpac | |
parent | 46f2eac7bdcdb9d24b95f2e9b8459d5023801aeb (diff) | |
download | freebsd-ports-gnome-34098b184afce41d3c776e973b30c3a211abffc6.tar.gz freebsd-ports-gnome-34098b184afce41d3c776e973b30c3a211abffc6.tar.zst freebsd-ports-gnome-34098b184afce41d3c776e973b30c3a211abffc6.zip |
- Make IPv6 and OpenGL optional but turn them on by default[1].
- Fix build with OpenGL and register its dependency when it is enabled.
- Move FreeBSD-specific stuff into configure script from src/Makefile.
- Make portlint happy with PKGNAMESUFFIX.
PR: ports/131681[1], ports/131713, ports/131789
Diffstat (limited to 'multimedia/gpac-libgpac')
-rw-r--r-- | multimedia/gpac-libgpac/Makefile | 31 | ||||
-rw-r--r-- | multimedia/gpac-libgpac/files/patch-configure | 66 | ||||
-rw-r--r-- | multimedia/gpac-libgpac/files/patch-src_Makefile | 19 |
3 files changed, 89 insertions, 27 deletions
diff --git a/multimedia/gpac-libgpac/Makefile b/multimedia/gpac-libgpac/Makefile index 45c2465073e6..0069c49d9dad 100644 --- a/multimedia/gpac-libgpac/Makefile +++ b/multimedia/gpac-libgpac/Makefile @@ -5,13 +5,14 @@ # $FreeBSD$ # -PORTNAME= gpac-libgpac +PORTNAME= gpac PORTVERSION= 0.4.5 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= multimedia MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} -MASTER_SITE_SUBDIR= gpac -DISTNAME= gpac-${DISTVERSION} +MASTER_SITE_SUBDIR=${PORTNAME} +PKGNAMESUFFIX= -libgpac MAINTAINER= multimedia@FreeBSD.org COMMENT= Gpac MPEG-4 Systems library and headers @@ -26,10 +27,24 @@ BUILD_WRKSRC= ${WRKSRC}/src INSTALL_WRKSRC= ${WRKSRC}/bin/gcc LIBVER= 1 -CONFIGURE_ARGS= --cc="${CC}" \ - --extra-cflags="${CFLAGS} ${PTHREAD_CFLAGS} -fPIC" \ - --extra-ldflags="${LDFLAGS} ${PTHREAD_LIBS}" \ - --disable-opengl +OPTIONS= IPV6 "IPv6 support" on \ + OPENGL "OpenGL support" on + +CONFIGURE_ARGS= --cc="${CC}" --X11-path="${X11BASE}" \ + --extra-cflags="${CFLAGS}" --extra-ldflags="${LDFLAGS}" +CONFIGURE_ENV+= LIBVER="${LIBVER}" PTHREAD_LIBS="${PTHREAD_LIBS}" + +.include <bsd.port.pre.mk> + +.if defined(WITHOUT_IPV6) +CONFIGURE_ARGS+= --disable-ipv6 +.endif + +.if defined(WITHOUT_OPENGL) +CONFIGURE_ARGS+= --disable-opengl +.else +USE_GL= gl glu +.endif post-patch: ${CHMOD} +x ${WRKSRC}/configure @@ -42,4 +57,4 @@ do-install: ${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> diff --git a/multimedia/gpac-libgpac/files/patch-configure b/multimedia/gpac-libgpac/files/patch-configure new file mode 100644 index 000000000000..1054925d4691 --- /dev/null +++ b/multimedia/gpac-libgpac/files/patch-configure @@ -0,0 +1,66 @@ +--- configure.orig 2008-12-02 13:04:42.000000000 -0500 ++++ configure 2009-02-19 15:16:18.000000000 -0500 +@@ -33,6 +33,7 @@ + make="make" + strip="strip" + cpu=`uname -m` ++targetos=`uname -s` + debuginfo="no" + sdl_path="" + sdl_local="no" +@@ -222,7 +223,9 @@ + if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then + if [ -z "`echo $CFLAGS | grep -- -m32`" ]; then + cpu="x86_64" +- libdir="lib64" ++ if [ x"$targetos" != x"FreeBSD" ]; then ++ libdir="lib64" ++ fi + #that's a bit crude... + PIC_CFLAGS="-fPIC -DPIC" + want_pic="yes" +@@ -280,7 +283,6 @@ + source_path="`cd \"$source_path\"; pwd`" + fi + # OS specific +-targetos=`uname -s` + case $targetos in + BeOS) + js_flags=-DXP_BEOS +@@ -317,8 +319,8 @@ + FreeBSD) + make="gmake" + LDFLAGS="$LDFLAGS -export-dynamic" +-CFLAGS="$CFLAGS -pthread" +-GPAC_SH_FLAGS=-pthread ++DYN_LIB_SUFFIX="so.$LIBVER" ++GPAC_SH_FLAGS="$PTHREAD_LIBS" + freebsd="yes" + js_flags="-DXP_UNIX -I/usr/include/js" + ;; +@@ -1111,6 +1113,8 @@ + LINK3D="-lopengl32 -lglu32" + elif test "$darwin" = "yes" ; then + LINK3D="-lgl -lglu" ++ elif test "$freebsd" = "yes" ; then ++ LINK3D="-lGL -lGLU" + else + LINK3D="-lGL -lglut" + fi +@@ -1673,7 +1677,7 @@ + echo "USE_X11_XV=$has_x11_xv" >> config.mak + fi + +-if test "$is_64" = "yes"; then ++if test "$is_64" = "yes" -a "$freebsd" = "no" ; then + echo "X11_LIB_PATH=$X11_PATH/lib64" >> config.mak + else + echo "X11_LIB_PATH=$X11_PATH/lib" >> config.mak +@@ -1805,6 +1809,6 @@ + fi + + echo '%.opic : %.c' >> config.mak +-echo ' $(CC) $(CFLAGS) $(PIC_CFLAGS) -c $< -o $@' >> config.mak ++echo " \$(CC) \$(CFLAGS) \$(PIC_CFLAGS) $INCL3D -c \$< -o \$@" >> config.mak + + echo "Done - type 'make help' for make info, 'make' to build" diff --git a/multimedia/gpac-libgpac/files/patch-src_Makefile b/multimedia/gpac-libgpac/files/patch-src_Makefile deleted file mode 100644 index eddf97c1fdc5..000000000000 --- a/multimedia/gpac-libgpac/files/patch-src_Makefile +++ /dev/null @@ -1,19 +0,0 @@ ---- src/Makefile.orig Tue Jul 11 11:53:44 2006 -+++ src/Makefile Wed Aug 9 09:57:59 2006 -@@ -35,6 +35,7 @@ - ifeq ($(DISABLE_SVG), no) - LIBGPAC_SCENE+=scenegraph/svg_attributes.o scenegraph/svg_nodes.o scenegraph/svg_tools.o scenegraph/svg_types.o scenegraph/svg_smjs.o scenegraph/smil_anim.o scenegraph/smil_timing.o scenegraph/svg_properties.o - endif -+EXTRALIBS+=-Wl,-soname,$(LIB) - - - ## libgpac objects gathering: src/mcrypt -@@ -137,7 +138,7 @@ - - - ##libgpac library output --LIB=libgpac.$(DYN_LIB_SUFFIX) -+LIB=libgpac.$(DYN_LIB_SUFFIX).1 - ifeq ($(CONFIG_WIN32),yes) - #LDFLAGS+=-export-symbols libgpac.def - else |