1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-28 10:08:24 +00:00

- use STAGEDIR

- use USE_WEBPLUGINS
- use OPT_* flags
- clean LIB_DEPENDS
This commit is contained in:
Dirk Meyer 2013-12-15 19:19:19 +00:00
parent e0b7e496b4
commit 23f18f31d2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=336568
2 changed files with 38 additions and 52 deletions

View File

@ -18,7 +18,6 @@ LIB_DEPENDS= libboost_thread.so:${PORTSDIR}/devel/boost-libs \
libnspr4.so:${PORTSDIR}/devel/nspr
CONFLICTS= gnash-devel-[0-9]*
NO_STAGE= yes
USE_BZIP2= yes
USES= gmake pkgconfig
@ -31,13 +30,14 @@ WANT_GSTREAMER= yes
USE_GNOME= libxml2
USE_XORG= x11 xau xdmcp xext xi xinerama ice sm xv
INSTALLS_ICONS= yes
SYSCONFIGDIR= ${PREFIX}/etc
# jemalloc leads to infinite recursion on FreeBSD
CONFIGURE_ARGS= --with-boost-incl="${LOCALBASE}/include" \
--with-boost-lib="${LOCALBASE}/lib" \
--disable-testsuite \
--with-plugins-install=prefix \
--sysconfdir="${WRKDIR}/etc" \
--sysconfdir="${SYSCONFIGDIR}" \
--disable-kparts3 \
--disable-jemalloc \
--disable-silent-rules
@ -50,10 +50,6 @@ PLIST_SUB+= GNASHVER="${GNASHVER}"
USE_LDCONFIG= ${PREFIX}/lib/gnash
MAN1= cygnal.1 findmicrophones.1 findwebcams.1 \
flvdumper.1 gnash.1 gprocessor.1 \
rtmpget.1 soldumper.1
OPTIONS_DEFINE= PLUGIN CYGNAL VAAPI
OPTIONS_SINGLE= MEDIA GUI RENDERER
OPTIONS_SINGLE_MEDIA= FFMPEG FFMPEG2 GSTREAMER
@ -62,6 +58,7 @@ OPTIONS_SINGLE_RENDERER=AGG OPENGL CAIRO
OPTIONS_DEFAULT=GTK2 PLUGIN AGG FFMPEG VAAPI
NO_OPTIONS_SORT=yes
OPTIONS_SUB= yes
PLUGIN_DESC= browser plugin
CYGNAL_DESC= Cygnal media server
AGG_DESC= AGG renderer
@ -72,16 +69,13 @@ FFMPEG2_DESC= ffmpeg2 media handler (broken)
GSTREAMER_DESC= GStreamer media handler
VAAPI_DESC= VAAPI support (requires FFMPEG)
CYGNAL_CONFIGURE_ENABLE= cygnal
.include <bsd.port.options.mk>
# Cygnal option processing
.if ${PORT_OPTIONS:MCYGNAL}
PLIST_SUB+= CYGNAL=""
CONFIGURE_ARGS+= --enable-cygnal
CONFIG_FILES+= cygnalrc
.else
PLIST_SUB+= CYGNAL="@comment "
CONFIGURE_ARGS+= --disable-cygnal
.endif
# NLS option processing (not sure if --disable-nls actually has any effect)
@ -97,11 +91,12 @@ PLIST_SUB+= NLS="@comment "
# Plugin configuration
#
.if ${PORT_OPTIONS:MGTK2} && ${PORT_OPTIONS:MPLUGIN}
USE_WEBPLUGINS= native
WEBPLUGINS_FILES= libgnashplugin.so
.include "${PORTSDIR}/www/firefox/Makefile.webplugins"
USES+= webplugin:native
WEBPLUGIN_NAME= gnash
WEBPLUGIN_FILES= libgnashplugin.so
WEBPLUGIN_DIR=${_WEBPLUGIN_LIBDIR:S,^${LOCALBASE}/,${PREFIX}/,}/${WEBPLUGIN_NAME}
PLIST_SUB+= NPAPI=""
CONFIGURE_ARGS+=--with-npapi-plugindir="${WEBPLUGINS_DIR}"
CONFIGURE_ARGS+=--with-npapi-plugindir="${WEBPLUGIN_DIR}"
BUILD_DEPENDS+= ${LOCALBASE}/bin/xulrunner:${PORTSDIR}/www/libxul
RUN_DEPENDS+= ${LOCALBASE}/bin/xulrunner:${PORTSDIR}/www/libxul
.else
@ -126,22 +121,14 @@ GNASH_GUIS=
.if ${PORT_OPTIONS:MGTK2}
USE_GNOME= gtk20 atk gconf2
GNASH_GUIS+= gtk
PLIST_SUB+= GTK=""
MAN1+= gnash-gtk-launcher.1 gtk-gnash.1
.else
PLIST_SUB+= GTK="@comment "
.endif
.if ${PORT_OPTIONS:MKDE4}
GNASH_GUIS+= kde4
PLIST_SUB+= KDE4=""
USE_QT4= moc_build
QT_NONSTANDARD= yes
USE_KDE4= kdehier kdelibs
CONFIGURE_ENV+= KDE4_CONFIG="${KDE4_PREFIX}/bin/kde4-config"
MAN1+= gnash-qt-launcher.1 kde4-gnash.1
.else
PLIST_SUB+= KDE4="@comment "
.endif
.if ${GNASH_GUIS} == ""
@ -156,7 +143,7 @@ CONFIGURE_ARGS+=--enable-gui=`${ECHO} ${GNASH_GUIS} | ${TR} ' ' ,`
GNASH_RENDERERS=
.if ${PORT_OPTIONS:MAGG}
LIB_DEPENDS+= agg:${PORTSDIR}/graphics/agg
LIB_DEPENDS+= libagg.so:${PORTSDIR}/graphics/agg
GNASH_RENDERERS+= agg
.endif
@ -164,7 +151,7 @@ GNASH_RENDERERS+= agg
USE_GL= yes
GNASH_RENDERERS+= ogl
.if ${PORT_OPTIONS:MGTK2}
LIB_DEPENDS+= gtkglext-x11-1.0:${PORTSDIR}/x11-toolkits/gtkglext
LIB_DEPENDS+= libgdkglext-x11-1.0.so:${PORTSDIR}/x11-toolkits/gtkglext
.endif
.endif
@ -172,7 +159,7 @@ LIB_DEPENDS+= gtkglext-x11-1.0:${PORTSDIR}/x11-toolkits/gtkglext
.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
.endif
LIB_DEPENDS+= cairo.2:${PORTSDIR}/graphics/cairo
LIB_DEPENDS+= libcairo.so:${PORTSDIR}/graphics/cairo
GNASH_RENDERERS+= cairo
.endif
@ -189,11 +176,9 @@ CONFIGURE_ARGS+= --enable-renderer=`${ECHO} ${GNASH_RENDERERS} | ${TR} ' ' ,`
.if empty(PORT_OPTIONS:MFFMPEG) && empty(PORT_OPTIONS:MFFMPEG2)
IGNORE= VAAPI currently works only with FFMPEG. Please rerun 'make config' and enable FFMPEG
.endif
LIB_DEPENDS+= va:${PORTSDIR}/multimedia/libva
PLIST_SUB+= VAAPI=""
LIB_DEPENDS+= libva.so:${PORTSDIR}/multimedia/libva
.else
CONFIGURE_ARGS+= --enable-hwaccel=none # XVideo
PLIST_SUB+= VAAPI="@comment "
.endif
#
@ -223,12 +208,6 @@ CONFIGURE_ARGS+= --enable-media=none
IGNORE= can't be built with multiple media handlers enabled. Please rerun 'make config' and leave one or none of them (ffmpeg|gstreamer)
.endif
.if ${PORT_OPTIONS:MGSTREAMER}
PLIST_SUB+= GSTREAMER=""
.else
PLIST_SUB+= GSTREAMER="@comment "
.endif
.include <bsd.port.pre.mk>
pre-everything::
@ -238,33 +217,28 @@ pre-everything::
.endif
post-patch:
@${REINPLACE_CMD} -e '/^PTHREAD_[LC][IF]*=/ d; s|-lpthread|${PTHREAD_LIBS}|' \
${REINPLACE_CMD} -e '/^PTHREAD_[LC][IF]*=/ d; s|-lpthread|${PTHREAD_LIBS}|' \
-e '/KDE4_APPSDATADIR=/ s|share/kde4|share|' \
-e 's|/usr/local|${LOCALBASE}|g; \
s|/lib64|/lib|g; \
s|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/configure \
${WRKSRC}/macros/libslist ${WRKSRC}/macros/incllist
@${REINPLACE_CMD} -e '/^pkgconfigdir =/ s|libdir)|exec_prefix)/libdata|' \
${REINPLACE_CMD} -e '/^pkgconfigdir =/ s|libdir)|exec_prefix)/libdata|' \
${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e '/^man1dir =/ s|=.*|= ${MAN1PREFIX}/man/man1|' \
${REINPLACE_CMD} -e '/^man1dir =/ s|=.*|= ${MAN1PREFIX}/man/man1|' \
${WRKSRC}/doc/C/Makefile.in
post-install:
.for conf in ${CONFIG_FILES}
@${INSTALL_DATA} ${WRKDIR}/etc/${conf} ${PREFIX}/etc/${conf}.dist
if [ ! -f ${PREFIX}/etc/${conf} ]; then \
${INSTALL_DATA} ${PREFIX}/etc/${conf}.dist \
${PREFIX}/etc/${conf}; \
fi
${MV} ${STAGEDIR}/${SYSCONFIGDIR}/${conf} ${STAGEDIR}${SYSCONFIGDIR}/${conf}.dist
.endfor
.if ${PORT_OPTIONS:MPLUGIN}
.if ${PORT_OPTIONS:MGTK2}
${MKDIR} ${WEBPLUGINS_DIR}
@cd ${INSTALL_WRKSRC}/plugin && \
cd ${INSTALL_WRKSRC}/plugin && \
${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} install-plugin
.endif
.if ${PORT_OPTIONS:MKDE4}
@cd ${INSTALL_WRKSRC}/plugin/klash4 && \
cd ${INSTALL_WRKSRC}/plugin/klash4 && \
${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} install-plugin
.endif
.endif

View File

@ -1,6 +1,6 @@
bin/gnash
%%GTK%%bin/gnash-gtk-launcher
%%GTK%%bin/gtk-gnash
%%GTK2%%bin/gnash-gtk-launcher
%%GTK2%%bin/gtk-gnash
%%KDE4%%bin/gnash-qt-launcher
%%KDE4%%bin/kde4-gnash
bin/gprocessor
@ -10,7 +10,7 @@ bin/rtmpget
%%CYGNAL%%bin/cygnal
%%CYGNAL%%bin/flvdumper
%%CYGNAL%%bin/soldumper
%%NPAPI%%%%WEBPLUGINS_DIR%%/libgnashplugin.so
%%NPAPI%%%%WEBPLUGIN_DIR%%/libgnashplugin.so
%%CYGNAL%%@unexec if cmp -s %D/etc/cygnalrc.dist %D/etc/cygnalrc; then rm -f %D/etc/cygnalrc; fi
%%CYGNAL%%etc/cygnalrc.dist
%%CYGNAL%%@exec if [ ! -f %B/cygnalrc ]; then cp -p %D/%F %B/cygnalrc; fi
@ -214,15 +214,27 @@ lib/gnash/libgnashrender.so
lib/gnash/libgnashsound-%%GNASHVER%%.so
lib/gnash/libgnashsound.so
libdata/pkgconfig/gnash.pc
%%GTK%%share/applications/gnash.desktop
%%GTK2%%share/applications/gnash.desktop
%%KDE4%%share/applications/klash.desktop
man/man1/cygnal.1.gz
man/man1/findmicrophones.1.gz
man/man1/findwebcams.1.gz
man/man1/flvdumper.1.gz
man/man1/gnash.1.gz
man/man1/gprocessor.1.gz
man/man1/rtmpget.1.gz
man/man1/soldumper.1.gz
%%GTK2%%man/man1/gnash-gtk-launcher.1.gz
%%GTK2%%man/man1/gtk-gnash.1.gz
%%KDE4%%man/man1/gnash-qt-launcher.1
%%KDE4%%man/man1/kde4-gnash.1
%%DATADIR%%/GnashG.png
%%DATADIR%%/gnash-splash.swf
%%DATADIR%%/gnash_128_96.ico
%%DOCSDIR%%/gnashref.html
%%DOCSDIR%%/gnashuser.html
%%DOCSDIR%%/images/rtmp.png
%%GTK%%share/icons/hicolor/32x32/apps/gnash.xpm
%%GTK2%%share/icons/hicolor/32x32/apps/gnash.xpm
%%KDE4%%share/icons/hicolor/32x32/apps/klash.xpm
share/locale/cs/LC_MESSAGES/gnash.mo
share/locale/da/LC_MESSAGES/gnash.mo
@ -255,4 +267,4 @@ share/locale/zh_TW/LC_MESSAGES/gnash.mo
@dirrm include/gnash/asobj
@dirrm include/gnash
%%KPARTS4%%@dirrm kde4/share/apps/klash
%%NPAPI%%@dirrmtry %%WEBPLUGINS_DIR%%
%%NPAPI%%@dirrmtry %%WEBPLUGIN_DIR%%