2013-04-23 16:20:25 +02:00
|
|
|
# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
|
2008-11-07 20:51:26 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= gmerlin-avdecoder
|
2012-07-22 10:46:59 +02:00
|
|
|
PORTVERSION= 1.2.0
|
2014-12-25 21:54:41 +01:00
|
|
|
PORTREVISION= 13
|
2008-11-07 20:51:26 +01:00
|
|
|
CATEGORIES= multimedia
|
2009-08-22 02:28:34 +02:00
|
|
|
MASTER_SITES= SF/gmerlin/${PORTNAME}/${PORTVERSION}
|
2008-11-07 20:51:26 +01:00
|
|
|
|
2013-10-09 14:27:35 +02:00
|
|
|
MAINTAINER= wg@FreeBSD.org
|
2008-11-07 20:51:26 +01:00
|
|
|
COMMENT= General purpose media decoding library
|
|
|
|
|
2012-07-22 11:13:00 +02:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2012-07-26 07:40:22 +02:00
|
|
|
BUILD_DEPENDS= ${LOCALBASE}/include/linux/dvb/frontend.h:${PORTSDIR}/multimedia/v4l_compat
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS= libgavl.so:${PORTSDIR}/multimedia/gavl
|
2008-11-07 20:51:26 +01:00
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
OPTIONS_DEFINE= A52 CDIO DCA DVDREAD FAAD FFMPEG FLAC GMERLIN MAD \
|
|
|
|
MJPEGTOOLS MPEG2 MUSEPACK OPENJPEG OPTIMIZED_CFLAGS PNG \
|
2014-07-16 05:00:46 +02:00
|
|
|
SAMBA SCHROEDINGER SPEEX THEORA TIFF VDPAU VORBIS DOCS
|
2012-07-22 10:46:59 +02:00
|
|
|
OPTIONS_DEFAULT= A52 CDIO DCA DVDREAD FAAD FFMPEG FLAC GMERLIN MAD \
|
|
|
|
MJPEGTOOLS MPEG2 MUSEPACK OPENJPEG OPTIMIZED_CFLAGS PNG \
|
|
|
|
SAMBA SCHROEDINGER SPEEX THEORA TIFF VDPAU VORBIS
|
|
|
|
DVDREAD_DESC= libdvdread support
|
|
|
|
GMERLIN_DESC= gmerlin support
|
|
|
|
SAMBA_DESC= Samba support using libsmbclient
|
2008-11-07 20:51:26 +01:00
|
|
|
|
2014-05-02 16:16:49 +02:00
|
|
|
USES= gettext libtool pathfix pkgconfig
|
2011-08-10 16:30:37 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2012-07-22 10:46:59 +02:00
|
|
|
CONFIGURE_ARGS= --with-cpuflags=none --without-doxygen
|
2011-08-10 16:30:37 +02:00
|
|
|
USE_LDCONFIG= yes
|
2008-11-07 20:51:26 +01:00
|
|
|
|
2013-10-16 15:06:17 +02:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include/ffmpeg0 -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib/ffmpeg0 -L${LOCALBASE}/lib
|
2011-08-10 16:30:37 +02:00
|
|
|
|
2013-10-09 14:27:35 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2008-11-09 22:31:07 +01:00
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MGMERLIN}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libgmerlin.so:${PORTSDIR}/multimedia/gmerlin
|
2008-11-09 22:31:07 +01:00
|
|
|
PLIST_SUB+= GMERLIN=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-gmerlin
|
|
|
|
PLIST_SUB+= GMERLIN="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MFFMPEG}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libavcodec0.so:${PORTSDIR}/multimedia/ffmpeg0
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-libavcodec --disable-libpostproc --disable-libswscale --disable-libavformat
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MTHEORA}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libtheora.so:${PORTSDIR}/multimedia/libtheora
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
2011-08-10 16:30:37 +02:00
|
|
|
CONFIGURE_ARGS+=--disable-theoradec
|
2008-11-07 20:51:26 +01:00
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MSPEEX}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libspeex.so:${PORTSDIR}/audio/speex
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-speex
|
|
|
|
.endif
|
|
|
|
|
2013-10-09 14:27:35 +02:00
|
|
|
.if ${PORT_OPTIONS:MMJPEGTOOLS}
|
2014-04-24 09:52:30 +02:00
|
|
|
LIB_DEPENDS+= liblavjpeg.so:${PORTSDIR}/multimedia/mjpegtools
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-mjpegtools
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MVORBIS}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libvorbis.so:${PORTSDIR}/audio/libvorbis
|
2008-11-07 20:51:26 +01:00
|
|
|
CONFIGURE_ARGS+=--with-vorbis=${LOCALBASE}
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-vorbis
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MMPEG2}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libmpeg2.so:${PORTSDIR}/multimedia/libmpeg2
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-libmpeg2
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MTIFF}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libtiff.so:${PORTSDIR}/graphics/tiff
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-libtiff
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MSAMBA}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libsmbclient.so:${PORTSDIR}/net/samba-libsmbclient
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-samba
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MPNG}
|
2014-12-25 20:04:25 +01:00
|
|
|
LIB_DEPENDS+= libpng.so:${PORTSDIR}/graphics/png
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-libpng
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MFAAD}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libfaad.so:${PORTSDIR}/audio/faad
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-faad2
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MDVDREAD}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libdvdread.so:${PORTSDIR}/multimedia/libdvdread
|
2009-08-12 05:23:23 +02:00
|
|
|
PLIST_SUB+= DVDREAD=""
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-dvdread
|
2009-08-12 05:23:23 +02:00
|
|
|
PLIST_SUB+= DVDREAD="@comment "
|
2008-11-07 20:51:26 +01:00
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MFLAC}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libFLAC.so:${PORTSDIR}/audio/flac
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-flac
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MMUSEPACK}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libmpcdec.so:${PORTSDIR}/audio/musepack
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-musepack
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MMAD}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libmad.so:${PORTSDIR}/audio/libmad
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-mad
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MA52}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= liba52.so:${PORTSDIR}/audio/liba52
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-liba52
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MDCA}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libdca.so:${PORTSDIR}/multimedia/libdca
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
# error in configure
|
|
|
|
CONFIGURE_ARGS+=--disable-libcda --disable-libdca
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MCDIO}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libcdio.so:${PORTSDIR}/sysutils/libcdio
|
2011-08-10 16:30:37 +02:00
|
|
|
PLIST_SUB+= CDIO=""
|
2008-11-07 20:51:26 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-libcdio
|
2011-08-10 16:30:37 +02:00
|
|
|
PLIST_SUB+= CDIO="@comment "
|
2009-08-12 05:23:23 +02:00
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MOPENJPEG}
|
2014-05-26 16:42:44 +02:00
|
|
|
LIB_DEPENDS+= libopenjpeg.so:${PORTSDIR}/graphics/openjpeg15
|
2009-08-12 05:23:23 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-openjpeg
|
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MSCHROEDINGER}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libschroedinger-1.0.so:${PORTSDIR}/multimedia/schroedinger
|
2009-08-12 05:23:23 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-schroedinger
|
2008-11-07 20:51:26 +01:00
|
|
|
.endif
|
|
|
|
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MVDPAU}
|
2013-10-09 14:27:35 +02:00
|
|
|
LIB_DEPENDS+= libvdpau.so:${PORTSDIR}/multimedia/libvdpau
|
2012-07-22 10:46:59 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-vdpau
|
|
|
|
.endif
|
|
|
|
|
2008-11-07 20:51:26 +01:00
|
|
|
# vendor ocflags from configure
|
2012-07-22 10:46:59 +02:00
|
|
|
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
|
2008-11-07 20:51:26 +01:00
|
|
|
CFLAGS+= -O3 -funroll-all-loops -ffast-math
|
|
|
|
CXXFLAGS+= -O3 -funroll-all-loops -ffast-math
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-patch:
|
2013-10-09 14:27:35 +02:00
|
|
|
@${REINPLACE_CMD} -E -e \
|
2011-08-10 16:30:37 +02:00
|
|
|
's|-O3 -funroll-all-loops -ffast-math||g; \
|
|
|
|
/LIBS/ s|-ldl||g; \
|
2013-10-09 14:27:35 +02:00
|
|
|
s|^LDFLAGS="|&$${LDFLAGS} |' \
|
|
|
|
-e 's|^(.*PKG_CONFIG.*)libavcodec(.*)|\1libavcodec0\2|g' \
|
|
|
|
-e 's|^(.*PKG_CONFIG.*)libavformat(.*)|\1libavformat0\2|g' \
|
|
|
|
-e 's|^(.*PKG_CONFIG.*)libavutil(.*)|\1libavutil0\2|g' \
|
|
|
|
-e 's|^(.*PKG_CONFIG.*)libpostproc(.*)|\1libpostproc0\2|g' \
|
|
|
|
-e 's|^(.*PKG_CONFIG.*)libswscale(.*)|\1libswscale0\2|g' \
|
|
|
|
${WRKSRC}/configure
|
2011-08-10 16:30:37 +02:00
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
's|#if DVDREAD_VERSION < 905|#if DVDREAD_VERSION < 904|' ${WRKSRC}/configure
|
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
'/^LIBS = / s|$$| @LIBINTL@ -lz|' ${WRKSRC}/tests/Makefile.in
|
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
's|malloc.h|stdlib.h|' ${WRKSRC}/lib/in_smb.c
|
2008-11-07 20:51:26 +01:00
|
|
|
|
|
|
|
post-install:
|
2013-10-09 14:27:35 +02:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
|
2008-11-07 20:51:26 +01:00
|
|
|
|
2013-10-09 14:27:35 +02:00
|
|
|
.include <bsd.port.mk>
|