2012-12-09 21:36:23 +00:00
|
|
|
# Created by: Dmitry Marakasov <amdmi3@amdmi3.ru>
|
2006-01-14 20:38:18 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= gnash
|
2012-06-15 06:21:13 +00:00
|
|
|
PORTVERSION= 0.8.10
|
2014-07-07 20:32:06 +00:00
|
|
|
PORTREVISION= 13
|
2006-01-14 20:38:18 +00:00
|
|
|
CATEGORIES= graphics
|
2012-06-15 06:21:13 +00:00
|
|
|
MASTER_SITES= GNU/${PORTNAME}/${PORTVERSION}/
|
2006-01-14 20:38:18 +00:00
|
|
|
|
2014-07-18 19:30:26 +00:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2006-01-14 20:38:18 +00:00
|
|
|
COMMENT= GNU Flash movie player
|
|
|
|
|
2013-12-12 11:14:49 +00:00
|
|
|
LIB_DEPENDS= libboost_thread.so:${PORTSDIR}/devel/boost-libs \
|
|
|
|
libjpeg.so:${PORTSDIR}/graphics/jpeg \
|
|
|
|
libcurl.so:${PORTSDIR}/ftp/curl \
|
|
|
|
libgif.so:${PORTSDIR}/graphics/giflib \
|
|
|
|
libspeex.so:${PORTSDIR}/audio/speex \
|
|
|
|
libnspr4.so:${PORTSDIR}/devel/nspr
|
2006-01-14 20:38:18 +00:00
|
|
|
|
2008-05-24 18:57:14 +00:00
|
|
|
CONFLICTS= gnash-devel-[0-9]*
|
|
|
|
|
2014-07-07 20:32:06 +00:00
|
|
|
USES= tar:bzip2 pkgconfig gmake libtool
|
2012-06-15 06:21:13 +00:00
|
|
|
USE_AUTOTOOLS= libltdl
|
2006-05-08 05:46:58 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2007-09-21 22:12:11 +00:00
|
|
|
WANT_SDL= yes
|
2014-03-01 21:23:14 +00:00
|
|
|
USE_GCC= any
|
2007-09-21 22:12:11 +00:00
|
|
|
WANT_GSTREAMER= yes
|
2013-09-01 22:50:06 +00:00
|
|
|
USE_GNOME= libxml2
|
2010-10-01 11:01:37 +00:00
|
|
|
USE_XORG= x11 xau xdmcp xext xi xinerama ice sm xv
|
2011-09-06 15:31:55 +00:00
|
|
|
INSTALLS_ICONS= yes
|
2013-12-15 19:19:19 +00:00
|
|
|
SYSCONFIGDIR= ${PREFIX}/etc
|
2006-01-14 20:38:18 +00:00
|
|
|
|
2010-10-01 11:01:37 +00:00
|
|
|
# jemalloc leads to infinite recursion on FreeBSD
|
2007-09-21 22:12:11 +00:00
|
|
|
CONFIGURE_ARGS= --with-boost-incl="${LOCALBASE}/include" \
|
|
|
|
--with-boost-lib="${LOCALBASE}/lib" \
|
2012-06-18 06:11:54 +00:00
|
|
|
--disable-testsuite \
|
2011-09-06 15:31:55 +00:00
|
|
|
--with-plugins-install=prefix \
|
2013-12-15 19:19:19 +00:00
|
|
|
--sysconfdir="${SYSCONFIGDIR}" \
|
2013-07-06 16:33:21 +00:00
|
|
|
--disable-kparts3 \
|
2010-10-01 11:01:37 +00:00
|
|
|
--disable-jemalloc \
|
|
|
|
--disable-silent-rules
|
2006-01-14 20:38:18 +00:00
|
|
|
|
2008-10-14 19:49:31 +00:00
|
|
|
GNASHVER= ${PORTVERSION}
|
2009-09-28 01:32:40 +00:00
|
|
|
CONFIG_FILES= gnashpluginrc gnashrc
|
2008-06-18 23:24:27 +00:00
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${GNASHVER}
|
|
|
|
PLIST_SUB+= GNASHVER="${GNASHVER}"
|
|
|
|
|
2007-09-21 22:12:11 +00:00
|
|
|
USE_LDCONFIG= ${PREFIX}/lib/gnash
|
2006-01-14 20:38:18 +00:00
|
|
|
|
2014-08-04 03:40:14 +00:00
|
|
|
OPTIONS_DEFINE= PLUGIN CYGNAL VAAPI DOCS
|
2013-10-26 08:23:57 +00:00
|
|
|
OPTIONS_SINGLE= MEDIA GUI RENDERER
|
|
|
|
OPTIONS_SINGLE_MEDIA= FFMPEG FFMPEG2 GSTREAMER
|
2013-07-06 16:33:21 +00:00
|
|
|
OPTIONS_SINGLE_GUI= GTK2 KDE4
|
2012-06-15 06:21:13 +00:00
|
|
|
OPTIONS_SINGLE_RENDERER=AGG OPENGL CAIRO
|
2013-10-29 06:54:13 +00:00
|
|
|
OPTIONS_DEFAULT=GTK2 PLUGIN AGG FFMPEG VAAPI
|
2012-06-15 06:21:13 +00:00
|
|
|
|
|
|
|
NO_OPTIONS_SORT=yes
|
2013-12-15 19:19:19 +00:00
|
|
|
OPTIONS_SUB= yes
|
2012-06-30 11:37:57 +00:00
|
|
|
PLUGIN_DESC= browser plugin
|
|
|
|
CYGNAL_DESC= Cygnal media server
|
|
|
|
AGG_DESC= AGG renderer
|
2013-10-29 06:54:13 +00:00
|
|
|
OPENGL_DESC= OpenGL renderer
|
2012-06-30 11:37:57 +00:00
|
|
|
CAIRO_DESC= Cairo renderer (experimental)
|
2013-10-26 08:23:57 +00:00
|
|
|
FFMPEG_DESC= ffmpeg0 media handler
|
2013-10-29 06:54:13 +00:00
|
|
|
FFMPEG2_DESC= ffmpeg2 media handler (broken)
|
2012-06-30 11:37:57 +00:00
|
|
|
GSTREAMER_DESC= GStreamer media handler
|
|
|
|
VAAPI_DESC= VAAPI support (requires FFMPEG)
|
2007-09-21 22:12:11 +00:00
|
|
|
|
2013-12-15 19:19:19 +00:00
|
|
|
CYGNAL_CONFIGURE_ENABLE= cygnal
|
|
|
|
|
2009-03-06 03:10:17 +00:00
|
|
|
.include <bsd.port.options.mk>
|
2007-09-21 22:12:11 +00:00
|
|
|
|
2014-01-25 13:41:26 +00:00
|
|
|
.if ${OSVERSION} > 1000000
|
|
|
|
BROKEN= unable to link in libboost_system
|
|
|
|
.endif
|
|
|
|
|
2007-09-21 22:12:11 +00:00
|
|
|
# Cygnal option processing
|
2012-06-15 06:21:13 +00:00
|
|
|
.if ${PORT_OPTIONS:MCYGNAL}
|
2009-09-28 01:32:40 +00:00
|
|
|
CONFIG_FILES+= cygnalrc
|
2007-09-21 22:12:11 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# NLS option processing (not sure if --disable-nls actually has any effect)
|
2012-06-15 06:21:13 +00:00
|
|
|
.if ${PORT_OPTIONS:MNLS}
|
2013-04-24 18:10:30 +00:00
|
|
|
USES+= gettext
|
2007-09-21 22:12:11 +00:00
|
|
|
PLIST_SUB+= NLS=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-nls
|
|
|
|
PLIST_SUB+= NLS="@comment "
|
2007-03-16 12:01:58 +00:00
|
|
|
.endif
|
|
|
|
|
2009-03-06 03:10:17 +00:00
|
|
|
#
|
|
|
|
# Plugin configuration
|
|
|
|
#
|
2012-06-15 06:21:13 +00:00
|
|
|
.if ${PORT_OPTIONS:MGTK2} && ${PORT_OPTIONS:MPLUGIN}
|
2013-12-15 19:19:19 +00:00
|
|
|
USES+= webplugin:native
|
|
|
|
WEBPLUGIN_NAME= gnash
|
|
|
|
WEBPLUGIN_FILES= libgnashplugin.so
|
|
|
|
WEBPLUGIN_DIR=${_WEBPLUGIN_LIBDIR:S,^${LOCALBASE}/,${PREFIX}/,}/${WEBPLUGIN_NAME}
|
2009-03-06 03:10:17 +00:00
|
|
|
PLIST_SUB+= NPAPI=""
|
2013-12-15 19:19:19 +00:00
|
|
|
CONFIGURE_ARGS+=--with-npapi-plugindir="${WEBPLUGIN_DIR}"
|
2012-12-09 21:36:23 +00:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/xulrunner:${PORTSDIR}/www/libxul
|
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/bin/xulrunner:${PORTSDIR}/www/libxul
|
2009-03-06 03:10:17 +00:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= NPAPI="@comment "
|
|
|
|
CONFIGURE_ARGS+= --disable-npapi
|
|
|
|
.endif
|
|
|
|
|
2012-06-15 06:21:13 +00:00
|
|
|
.if ${PORT_OPTIONS:MKDE4} && ${PORT_OPTIONS:MPLUGIN}
|
2009-03-06 03:10:17 +00:00
|
|
|
PLIST_SUB+= KPARTS4=""
|
|
|
|
USE_LDCONFIG+= ${KDE4_PREFIX}/lib/kde4
|
2011-09-06 15:31:55 +00:00
|
|
|
CONFIGURE_ARGS+= --with-kde4_prefix=${PREFIX}/kde4
|
2009-03-06 03:10:17 +00:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= KPARTS4="@comment "
|
|
|
|
CONFIGURE_ARGS+= --disable-kparts4
|
|
|
|
.endif
|
|
|
|
|
2007-09-21 22:12:11 +00:00
|
|
|
#
|
|
|
|
# GUI options processing
|
|
|
|
#
|
|
|
|
GNASH_GUIS=
|
|
|
|
|
2012-06-15 06:21:13 +00:00
|
|
|
.if ${PORT_OPTIONS:MGTK2}
|
2014-05-11 06:09:10 +00:00
|
|
|
USE_GNOME+= gtk20 atk gconf2
|
2007-09-21 22:12:11 +00:00
|
|
|
GNASH_GUIS+= gtk
|
|
|
|
.endif
|
|
|
|
|
2012-06-15 06:21:13 +00:00
|
|
|
.if ${PORT_OPTIONS:MKDE4}
|
2009-03-06 03:10:17 +00:00
|
|
|
GNASH_GUIS+= kde4
|
2012-06-06 06:44:37 +00:00
|
|
|
USE_QT4= moc_build
|
2010-10-01 11:01:37 +00:00
|
|
|
QT_NONSTANDARD= yes
|
2009-03-06 03:10:17 +00:00
|
|
|
USE_KDE4= kdehier kdelibs
|
|
|
|
CONFIGURE_ENV+= KDE4_CONFIG="${KDE4_PREFIX}/bin/kde4-config"
|
|
|
|
.endif
|
|
|
|
|
2008-05-24 18:57:14 +00:00
|
|
|
.if ${GNASH_GUIS} == ""
|
2013-07-06 16:33:21 +00:00
|
|
|
IGNORE= needs at least one GUI enabled. Please rerun 'make config' and enable GTK or KDE4
|
2008-05-24 18:57:14 +00:00
|
|
|
.endif
|
|
|
|
|
2010-10-01 11:01:37 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-gui=`${ECHO} ${GNASH_GUIS} | ${TR} ' ' ,`
|
2007-09-21 22:12:11 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Renderer options processing
|
|
|
|
#
|
2010-10-01 11:01:37 +00:00
|
|
|
GNASH_RENDERERS=
|
|
|
|
|
2013-07-06 16:33:21 +00:00
|
|
|
.if ${PORT_OPTIONS:MAGG}
|
2013-12-15 19:19:19 +00:00
|
|
|
LIB_DEPENDS+= libagg.so:${PORTSDIR}/graphics/agg
|
2010-10-01 11:01:37 +00:00
|
|
|
GNASH_RENDERERS+= agg
|
|
|
|
.endif
|
|
|
|
|
2013-07-06 16:33:21 +00:00
|
|
|
.if ${PORT_OPTIONS:MOPENGL}
|
2007-09-21 22:12:11 +00:00
|
|
|
USE_GL= yes
|
2010-10-01 11:01:37 +00:00
|
|
|
GNASH_RENDERERS+= ogl
|
2012-06-15 06:21:13 +00:00
|
|
|
.if ${PORT_OPTIONS:MGTK2}
|
2013-12-15 19:19:19 +00:00
|
|
|
LIB_DEPENDS+= libgdkglext-x11-1.0.so:${PORTSDIR}/x11-toolkits/gtkglext
|
2012-06-15 06:21:13 +00:00
|
|
|
.endif
|
2010-10-01 11:01:37 +00:00
|
|
|
.endif
|
|
|
|
|
2012-06-15 06:21:13 +00:00
|
|
|
.if ${PORT_OPTIONS:MCAIRO}
|
2013-07-06 16:33:21 +00:00
|
|
|
.if ${PORT_OPTIONS:MKDE4}
|
|
|
|
IGNORE= doesn't support Cairo renderer with KDE4 gui. Please rerun 'make config' and select different renderer or disable KDE4 GUI
|
2012-06-15 06:21:13 +00:00
|
|
|
.endif
|
2013-12-15 19:19:19 +00:00
|
|
|
LIB_DEPENDS+= libcairo.so:${PORTSDIR}/graphics/cairo
|
2010-10-01 11:01:37 +00:00
|
|
|
GNASH_RENDERERS+= cairo
|
2007-09-21 22:12:11 +00:00
|
|
|
.endif
|
|
|
|
|
2010-10-01 11:01:37 +00:00
|
|
|
.if ${GNASH_RENDERERS} == ""
|
|
|
|
IGNORE= needs at least one renderer enabled. Please rerun 'make config' and enable AGG, OPENGL or CAIRO
|
|
|
|
.endif
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+= --enable-renderer=`${ECHO} ${GNASH_RENDERERS} | ${TR} ' ' ,`
|
|
|
|
|
2011-03-10 06:29:13 +00:00
|
|
|
#
|
|
|
|
# Hardware acceleration options processing
|
|
|
|
#
|
2012-06-15 06:21:13 +00:00
|
|
|
.if ${PORT_OPTIONS:MVAAPI}
|
2013-10-26 08:23:57 +00:00
|
|
|
.if empty(PORT_OPTIONS:MFFMPEG) && empty(PORT_OPTIONS:MFFMPEG2)
|
2013-07-06 16:33:21 +00:00
|
|
|
IGNORE= VAAPI currently works only with FFMPEG. Please rerun 'make config' and enable FFMPEG
|
2012-06-15 06:21:13 +00:00
|
|
|
.endif
|
2013-12-15 19:19:19 +00:00
|
|
|
LIB_DEPENDS+= libva.so:${PORTSDIR}/multimedia/libva
|
2011-03-10 06:29:13 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --enable-hwaccel=none # XVideo
|
|
|
|
.endif
|
|
|
|
|
2007-09-21 22:12:11 +00:00
|
|
|
#
|
|
|
|
# Media handler options processing
|
|
|
|
#
|
2013-10-26 08:23:57 +00:00
|
|
|
.if ${PORT_OPTIONS:MFFMPEG2} && empty(PORT_OPTIONS:MFFMPEG) && empty(PORT_OPTIONS:MGSTREAMER)
|
|
|
|
LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
|
|
|
|
CONFIGURE_ARGS+= --enable-media=ffmpeg \
|
2013-10-29 06:54:13 +00:00
|
|
|
--with-ffmpeg-incl=${LOCALBASE}/include/libavcodec \
|
|
|
|
--with-ffmpeg-lib=${LOCALBASE}/lib
|
2013-10-26 08:23:57 +00:00
|
|
|
USE_SDL+= sdl
|
|
|
|
MAKE_ARGS+= INCLUDES="-I${LOCALBASE}/include/ffmpeg"
|
|
|
|
.elif ${PORT_OPTIONS:MFFMPEG} && empty(PORT_OPTIONS:MFFMPEG2) && empty(PORT_OPTIONS:MGSTREAMER)
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/ffmpeg0.patch
|
2013-10-10 01:38:20 +00:00
|
|
|
LIB_DEPENDS+= libavcodec0.so:${PORTSDIR}/multimedia/ffmpeg0
|
|
|
|
CONFIGURE_ARGS+= --enable-media=ffmpeg \
|
|
|
|
--with-ffmpeg-incl=${LOCALBASE}/include/ffmpeg0/libavcodec \
|
|
|
|
--with-ffmpeg-lib=${LOCALBASE}/lib/ffmpeg0
|
2007-09-21 22:12:11 +00:00
|
|
|
USE_SDL+= sdl
|
2013-10-10 01:38:20 +00:00
|
|
|
MAKE_ARGS+= INCLUDES="-I${LOCALBASE}/include/ffmpeg0"
|
2013-10-26 08:23:57 +00:00
|
|
|
.elif ${PORT_OPTIONS:MGSTREAMER} && empty(PORT_OPTIONS:MFFMPEG) && empty(PORT_OPTIONS:MFFMPEG2)
|
2007-09-21 22:12:11 +00:00
|
|
|
USE_GSTREAMER= yes
|
|
|
|
CONFIGURE_ARGS+= --enable-media=gst
|
2008-10-15 10:03:02 +00:00
|
|
|
USE_SDL+= sdl
|
2013-10-26 08:23:57 +00:00
|
|
|
.else
|
2007-09-21 22:12:11 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-media=none
|
2008-05-24 18:57:14 +00:00
|
|
|
IGNORE= can't be built with multiple media handlers enabled. Please rerun 'make config' and leave one or none of them (ffmpeg|gstreamer)
|
|
|
|
.endif
|
|
|
|
|
2009-03-06 03:10:17 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2009-09-28 02:51:50 +00:00
|
|
|
pre-everything::
|
2012-06-15 06:21:13 +00:00
|
|
|
.if ${PORT_OPTIONS:MOPENGL}
|
2009-09-28 02:51:50 +00:00
|
|
|
@${ECHO_CMD} "OpenGL support is currently broken (Gnash hangs using 100% CPU). Use at your own risk"
|
|
|
|
@sleep 3
|
|
|
|
.endif
|
2006-04-27 06:41:12 +00:00
|
|
|
|
2006-01-14 20:38:18 +00:00
|
|
|
post-patch:
|
2013-12-15 19:19:19 +00:00
|
|
|
${REINPLACE_CMD} -e '/^PTHREAD_[LC][IF]*=/ d; s|-lpthread|${PTHREAD_LIBS}|' \
|
2012-06-18 06:11:54 +00:00
|
|
|
-e '/KDE4_APPSDATADIR=/ s|share/kde4|share|' \
|
|
|
|
-e 's|/usr/local|${LOCALBASE}|g; \
|
2008-06-01 20:51:44 +00:00
|
|
|
s|/lib64|/lib|g; \
|
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 17:56:05 +00:00
|
|
|
s|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/configure \
|
2007-09-21 22:12:11 +00:00
|
|
|
${WRKSRC}/macros/libslist ${WRKSRC}/macros/incllist
|
2013-12-15 19:19:19 +00:00
|
|
|
${REINPLACE_CMD} -e '/^pkgconfigdir =/ s|libdir)|exec_prefix)/libdata|' \
|
2009-09-28 01:32:40 +00:00
|
|
|
${WRKSRC}/Makefile.in
|
2013-12-15 19:19:19 +00:00
|
|
|
${REINPLACE_CMD} -e '/^man1dir =/ s|=.*|= ${MAN1PREFIX}/man/man1|' \
|
2010-02-20 19:39:58 +00:00
|
|
|
${WRKSRC}/doc/C/Makefile.in
|
2008-05-24 18:57:14 +00:00
|
|
|
|
|
|
|
post-install:
|
2009-09-28 01:32:40 +00:00
|
|
|
.for conf in ${CONFIG_FILES}
|
2013-12-15 19:19:19 +00:00
|
|
|
${MV} ${STAGEDIR}/${SYSCONFIGDIR}/${conf} ${STAGEDIR}${SYSCONFIGDIR}/${conf}.dist
|
2009-09-28 01:32:40 +00:00
|
|
|
.endfor
|
2012-06-15 06:21:13 +00:00
|
|
|
.if ${PORT_OPTIONS:MPLUGIN}
|
|
|
|
.if ${PORT_OPTIONS:MGTK2}
|
2013-12-15 19:19:19 +00:00
|
|
|
cd ${INSTALL_WRKSRC}/plugin && \
|
2014-06-25 05:35:31 +00:00
|
|
|
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install-plugin
|
2008-05-24 18:57:14 +00:00
|
|
|
.endif
|
2012-06-15 06:21:13 +00:00
|
|
|
.if ${PORT_OPTIONS:MKDE4}
|
2013-12-15 19:19:19 +00:00
|
|
|
cd ${INSTALL_WRKSRC}/plugin/klash4 && \
|
2014-06-25 05:35:31 +00:00
|
|
|
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install-plugin
|
2009-03-06 03:10:17 +00:00
|
|
|
.endif
|
2007-09-21 22:12:11 +00:00
|
|
|
.endif
|
2006-01-14 20:38:18 +00:00
|
|
|
|
2006-04-27 06:41:12 +00:00
|
|
|
.include <bsd.port.post.mk>
|