aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/gpac-libgpac
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2010-03-31 19:59:25 +0800
committermm <mm@FreeBSD.org>2010-03-31 19:59:25 +0800
commit0fd54cf758dffe359274f6474ee5dc40713d5a11 (patch)
treeff28f141e79262d5aa457df84856d32121641336 /multimedia/gpac-libgpac
parente957b343b93f99690856e1f547d8ff4cc3b4520a (diff)
downloadfreebsd-ports-gnome-0fd54cf758dffe359274f6474ee5dc40713d5a11.tar.gz
freebsd-ports-gnome-0fd54cf758dffe359274f6474ee5dc40713d5a11.tar.zst
freebsd-ports-gnome-0fd54cf758dffe359274f6474ee5dc40713d5a11.zip
- Correctly process png and jpeg dependencies
- Add png, jpeg and OpenSSL to OPTIONS - Add fix for png v14
Diffstat (limited to 'multimedia/gpac-libgpac')
-rw-r--r--multimedia/gpac-libgpac/Makefile41
-rw-r--r--multimedia/gpac-libgpac/files/patch-src-media_tools-img.c11
2 files changed, 45 insertions, 7 deletions
diff --git a/multimedia/gpac-libgpac/Makefile b/multimedia/gpac-libgpac/Makefile
index e7cad9224fd3..c9ce28762b4b 100644
--- a/multimedia/gpac-libgpac/Makefile
+++ b/multimedia/gpac-libgpac/Makefile
@@ -7,7 +7,7 @@
PORTNAME= gpac
PORTVERSION= 0.4.5
-PORTREVISION= 3
+PORTREVISION= 4
PORTEPOCH= 1
CATEGORIES= multimedia
MASTER_SITES= SF/${PORTNAME}/GPAC/GPAC%20${PORTVERSION}
@@ -27,12 +27,22 @@ BUILD_WRKSRC= ${WRKSRC}/src
INSTALL_WRKSRC= ${WRKSRC}/bin/gcc
LIBVER= 1
-OPTIONS= IPV6 "IPv6 support" on \
- OPENGL "OpenGL support" on
+OPTIONS= IPV6 "IPv6 support" on \
+ JPEG "JPEG support" on \
+ OPENGL "OpenGL support" on \
+ OPENSSL "OpenSSL support" on \
+ PNG "PNG support" on
+
+CFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS= --cc="${CC}" --X11-path="${X11BASE}" \
--extra-cflags="${CFLAGS}" --extra-ldflags="${LDFLAGS}" \
- --enable-pic
+ --enable-pic \
+ --use-js=no --use-a52=no --use-faad=no --use-ffmpeg=no \
+ --use-ft=no --use-mad=no --use-ogg=no \
+ --use-openjpeg=no --use-theora=no --usr-vorbis=no
+
CONFIGURE_ENV+= LIBVER="${LIBVER}" PTHREAD_LIBS="${PTHREAD_LIBS}"
.include <bsd.port.pre.mk>
@@ -41,17 +51,34 @@ CONFIGURE_ENV+= LIBVER="${LIBVER}" PTHREAD_LIBS="${PTHREAD_LIBS}"
CONFIGURE_ARGS+= --disable-ipv6
.endif
+.if !defined(WITHOUT_JPEG)
+LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg
+CONFIGURE_ARGS+= --use-jpeg=local
+.else
+CONFIGURE_ARGS+= --use-jpeg=no
+.endif
+
.if defined(WITHOUT_OPENGL)
CONFIGURE_ARGS+= --disable-opengl
.else
USE_GL= gl glu
.endif
+.if !defined(WITHOUT_OPENSSL)
+USE_OPENSSL= yes
+.else
+CONFIGURE_ARGS+= --disable-ssl
+.endif
+
+.if !defined(WITHOUT_PNG)
+LIB_DEPENDS+= png.6:${PORTSDIR}/graphics/png
+CONFIGURE_ARGS+= --use-png=local
+.else
+CONFIGURE_ARGS+= --use-png=no
+.endif
+
post-patch:
${CHMOD} +x ${WRKSRC}/configure
- @${REINPLACE_CMD} -e 's|#define _LARGEFILE64_SOURCE||g' \
- ${WRKSRC}/include/gpac/setup.h
- ${RM} ${WRKSRC}/include/gpac/setup.h.bak
do-install:
${MKDIR} ${PREFIX}/include/gpac
diff --git a/multimedia/gpac-libgpac/files/patch-src-media_tools-img.c b/multimedia/gpac-libgpac/files/patch-src-media_tools-img.c
new file mode 100644
index 000000000000..43a34f264345
--- /dev/null
+++ b/multimedia/gpac-libgpac/files/patch-src-media_tools-img.c
@@ -0,0 +1,11 @@
+--- src/media_tools/img.c.orig 2010-03-31 10:03:24.806360005 +0000
++++ src/media_tools/img.c 2010-03-31 10:05:39.430477556 +0000
+@@ -551,7 +551,7 @@
+ /* Allocate/initialize the image information data. REQUIRED */
+ info_ptr = png_create_info_struct(png_ptr);
+ if (info_ptr == NULL) {
+- png_destroy_write_struct(&png_ptr, png_infopp_NULL);
++ png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
+ return GF_IO_ERR;
+ }
+