summaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2005-02-28 21:09:05 +0000
committerkrion <krion@FreeBSD.org>2005-02-28 21:09:05 +0000
commitdec82a1d8fee4d75a8bde26ad669886a75ecbd27 (patch)
treed16ff76515649534095f7ecabc260321bec485a6 /Mk
parent6fd76e0b83b7099284dcdc79fc133093106f7051 (diff)
downloadFreeBSD-ports-dec82a1d8fee4d75a8bde26ad669886a75ecbd27.zip
FreeBSD-ports-dec82a1d8fee4d75a8bde26ad669886a75ecbd27.tar.gz
* Add info files to TMPPLIST, only if INFO is specified. [1]
* Fix PATH problems during README.html generation if "make -DPORTSTOP readmes" is defined. [2] * Add support for early rcNG startup scripts. [3] * Remove duplicate USE_XLIB handling. [4] * Add check for USE_PYTHON_(BUILD|RUN), and include bsd.python.mk if both are specified. [5] * Use PRE-INSTALL target for SUB_FILES and SUB_LIST. [6] * Introduce bsd.gstreamer.mk and utilize new macros: USE_GSTREAMER/WANT_GSTREAMER. [7] PR: ports/77634 [1], ports/77592 [2], ports/77385 [3], ports/77557 [4], ports/77344 [5], ports/77211 [6], ports/77838 [7] Submitted by: krion [1] [2], Florent Thoumie <flz@xbsd.org> [3] [6], pav [4], lofi [5], ahze [7]
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.gstreamer.mk227
-rw-r--r--Mk/bsd.port.mk62
-rw-r--r--Mk/bsd.port.subdir.mk2
3 files changed, 267 insertions, 24 deletions
diff --git a/Mk/bsd.gstreamer.mk b/Mk/bsd.gstreamer.mk
new file mode 100644
index 0000000..50e3d96
--- /dev/null
+++ b/Mk/bsd.gstreamer.mk
@@ -0,0 +1,227 @@
+#-*- mode: Fundamental; tab-width: 4; -*-
+# ex:ts=4
+#
+# bsd.gstreamer.mk - Support for gstreamer-plugins-based ports.
+#
+# Created by: Michael Johnson <ahze@FreeBSD.org>
+# Date: 4 Oct 2004
+#
+# $FreeBSD$
+#
+
+.if !defined(_POSTMKINCLUDED) && !defined(Gstreamer_Pre_Include)
+
+Gstreamer_Include_MAINTAINER= gnome@FreeBSD.org
+Gstreamer_Pre_Include= bsd.gstreamer.mk
+
+.endif
+
+# Ports can use the following:
+#
+# USE_GSTREAMER= dvd lame flac
+#
+# If you want to use USE_GSTREAMER after <bsd.port.pre.mk>
+# you must follow one of the examples listed below
+#
+# WANT_GSTREAMER= yes
+# .include <bsd.port.pre.mk>
+# .if defined(WITH_VORBIS)
+# USE_GSTREAMER+= vorbis
+# .endif
+#
+# or
+# USE_GSTREAMER= yes
+# .include <bsd.port.pre.mk>
+# .if defined(WITH_FAAD)
+# USE_GSTREAMER+= faad
+# .endif
+#
+#
+# USE_GSTREAMER=yes will always add a dependency to
+# gstreamer-plugins
+#
+
+# "Normal" dependencies and variables
+#
+
+GSTREAMER_PORT= ${PORTSDIR}/multimedia/gstreamer-plugins
+_GST_LIB_BASE= ${X11BASE}/lib/gstreamer-${GST_VERSION}
+GST_VERSION= 0.8
+GST_SHLIB_VERSION= 1
+
+#
+# These are the current supported gstreamer-plugins modules
+#
+_USE_GSTREAMER_ALL= a52dec aalib artsd audiofile cdaudio cdparanoia dirac \
+ dts dv dvd esound faac faad ffmpeg flac gdkpixbuf \
+ gnomevfs gsm hermes ivorbis jack jpeg jpeg-mmx ladspa \
+ lame libcaca libfame libmng libpng libvisual mad mikmod \
+ mpeg2dec mpeg2enc mplex musepack musicbrainz nas sdl \
+ shout sidplay smoothwave sndfile speex theora ogg pango \
+ polypaudio swfdec vorbis xine xvid
+
+# other plugins
+OTHER_GSTREAMER_PLUGINS+= core yes
+_USE_GSTREAMER_ALL+= ${OTHER_GSTREAMER_PLUGINS}
+
+core_DEPENDS= multimedia/gstreamer-plugins-core
+core_PLIST= .gstreamer-plugins-core
+core_GST_EXT= .keep
+
+yes_DEPENDS= multimedia/gstreamer-plugins
+yes_PLIST= libgstac3parse
+
+# Audio Plugins Section
+a52dec_DEPENDS= audio/gstreamer-plugins-a52dec
+
+artsd_DEPENDS= audio/gstreamer-plugins-artsd
+artsd_PLIST= libgstartsdsink
+
+audiofile_DEPENDS= audio/gstreamer-plugins-audiofile
+
+cdaudio_DEPENDS= audio/gstreamer-plugins-cdaudio
+
+cdparanoia_DEPENDS= audio/gstreamer-plugins-cdparanoia
+
+esound_DEPENDS= audio/gstreamer-plugins-esound
+esound_PLIST= libgstesd
+
+faac_DEPENDS= audio/gstreamer-plugins-faac
+
+faad_DEPENDS= audio/gstreamer-plugins-faad
+
+flac_DEPENDS= audio/gstreamer-plugins-flac
+
+gsm_DEPENDS= audio/gstreamer-plugins-gsm
+
+ivorbis_DEPENDS= audio/gstreamer-plugins-ivorbis
+
+jack_DEPENDS= audio/gstreamer-plugins-jack
+
+ladspa_DEPENDS= audio/gstreamer-plugins-ladspa
+
+lame_DEPENDS= audio/gstreamer-plugins-lame
+
+mad_DEPENDS= audio/gstreamer-plugins-mad
+
+mikmod_DEPENDS= audio/gstreamer-plugins-mikmod
+
+musepack_DEPENDS= audio/gstreamer-plugins-musepack
+
+musicbrainz_DEPENDS= audio/gstreamer-plugins-musicbrainz
+musicbrainz_PLIST= libgsttrm
+
+nas_DEPENDS= audio/gstreamer-plugins-nas
+nas_PLIST= libgstnassink
+
+ogg_DEPENDS= audio/gstreamer-plugins-ogg
+
+polypaudio_DEPENDS= audio/gstreamer-plugins-polypaudio
+polypaudio_PLIST= libpolypaudio
+
+shout_DEPENDS= audio/gstreamer-plugins-shout
+
+sidplay_DEPENDS= audio/gstreamer-plugins-sidplay
+sidplay_PLIST= libgstsid
+
+smoothwave_DEPENDS= audio/gstreamer-plugins-smoothwave
+
+sndfile_DEPENDS= audio/gstreamer-plugins-sndfile
+
+speex_DEPENDS= audio/gstreamer-plugins-speex
+
+vorbis_DEPENDS= audio/gstreamer-plugins-vorbis
+
+
+# Devel Plugins Section
+gnomevfs_DEPENDS= devel/gstreamer-plugins-gnomevfs
+
+sdl_DEPENDS= devel/gstreamer-plugins-sdl
+sdl_PLIST= libgstsdlvideosink
+
+# Graphics Plugins Section
+aalib_DEPENDS= graphics/gstreamer-plugins-aalib
+aalib_PLIST= libgstaasink
+
+gdkpixbuf_DEPENDS= graphics/gstreamer-plugins-gdkpixbuf
+
+hermes_DEPENDS= graphics/gstreamer-plugins-hermes
+hermes_PLIST= libgsthermescolorspace
+
+jpeg_DEPENDS= graphics/gstreamer-plugins-jpeg
+
+jpeg-mmx_DEPENDS= graphics/gstreamer-plugins-jpeg-mmx
+jpeg-mmx_PLIST= libgstjpeg
+
+libcaca_DEPENDS= graphics/gstreamer-plugins-libcaca
+libcaca_PLIST= libgstcacasink
+
+libmng_DEPENDS= graphics/gstreamer-plugins-libmng
+libmng_PLIST= libgstmng
+
+libpng_DEPENDS= graphics/gstreamer-plugins-libpng
+libpng_PLIST= libgstpng
+
+libvisual_DEPNDS= graphics/gstreamer-plugins-libvisual
+
+swfdec_DEPENDS= graphics/gstreamer-plugins-swfdec
+
+theora_DEPENDS= multimedia/gstreamer-plugins-theora
+
+# Multimedia Plugins Section
+dirac_DEPENDS= multimedia/gstreamer-plugins-dirac
+
+dts_DEPENDS= multimedia/gstreamer-plugins-dts
+dts_PLIST= libgstdtsdec
+
+ffmpeg_DEPENDS= multimedia/gstreamer-ffmpeg
+
+libcaca_PLIST= libgstcacasink
+
+dv_DEPENDS= multimedia/gstreamer-plugins-dv
+dv_PLIST= libgstdv
+
+dvd_DEPENDS= multimedia/gstreamer-plugins-dvd
+dvd_PLIST= libgstdvdnavsrc
+
+libfame_DEPENDS= multimedia/gstreamer-plugins-libfame
+
+mpeg2dec_DEPENDS= multimedia/gstreamer-plugins-mpeg2dec
+
+mpeg2enc_DEPENDS= multimedia/gstreamer-plugins-mpeg2enc
+
+mplex_DEPENDS= multimedia/gstreamer-plugins-mplex
+
+xine_DEPENDS= multimedia/gstreamer-plugins-xine
+
+xvid_DEPENDS= multimedia/gstreamer-plugins-xvid
+
+# X11-Toolkits Plugins Section
+pango_DEPENDS= x11-toolkits/gstreamer-plugins-pango
+pango_PLIST= libgsttextoverlay
+
+.if defined(_POSTMKINCLUDED) && !defined(Gstreamer_Post_Include)
+Gstreamer_Post_Include= bsd.gstreamer.mk
+
+# defined ext_PLIST="" for each port that uses auto plist
+.for ext in ${USE_GSTREAMER}
+${ext}_PLIST?=
+${ext}_GST_EXT?= .so
+.endfor
+
+.for ext in ${USE_GSTREAMER}
+. if ${_USE_GSTREAMER_ALL:M${ext}}!= "" && exists(${PORTSDIR}/${${ext}_DEPENDS})
+. if ${${ext}_PLIST} != ""
+BUILD_DEPENDS+= ${_GST_LIB_BASE}/${${ext}_PLIST}${${ext}_GST_EXT}:${PORTSDIR}/${${ext}_DEPENDS}
+RUN_DEPENDS+= ${_GST_LIB_BASE}/${${ext}_PLIST}${${ext}_GST_EXT}:${PORTSDIR}/${${ext}_DEPENDS}
+. else
+BUILD_DEPENDS+= ${_GST_LIB_BASE}/libgst${ext}.so:${PORTSDIR}/${${ext}_DEPENDS}
+RUN_DEPENDS+= ${_GST_LIB_BASE}/libgst${ext}.so:${PORTSDIR}/${${ext}_DEPENDS}
+. endif
+. else
+BROKEN= "Unknown gstreamer-plugin -- ${ext}"
+. endif
+.endfor
+
+# The End
+.endif
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index f63e3a3..5705203 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -386,9 +386,14 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# routines found in etc/rc.subr and may need to
# depend on the sysutils/rc_subr port.
# If this is set to a list of files, these files will be
-# automatically added to ${SUB_FILES} and some "variable=value"
+# automatically added to ${SUB_FILES}, some %%VAR%%'s will
+# automatically be expanded, they will be installed in
+# ${PREFIX}/etc/rc.d and added to the packing list.
# pairs will be added to ${SUB_LIST}. These files will be
# installed in ${PREFIX}/etc/rc.d and added to the packing list.
+# RC_ORDER - List of rcNG startup scripts to be called early in the boot
+# process. This acts exactly like USE_RC_SUBR except that
+# scripts are installed in /etc/rc.d.
# RC_SUBR - Set to path of rc.subr.
# Default: ${LOCALBASE}/etc/rc.subr.
##
@@ -1300,7 +1305,7 @@ PERL= ${LOCALBASE}/bin/perl
.include "${PORTSDIR}/Mk/bsd.php.mk"
.endif
-.if defined(USE_PYTHON)
+.if defined(USE_PYTHON) || defined(USE_PYTHON_BUILD) || defined(USE_PYTHON_RUN)
.include "${PORTSDIR}/Mk/bsd.python.mk"
.endif
@@ -1320,6 +1325,10 @@ PERL= ${LOCALBASE}/bin/perl
.include "${PORTSDIR}/Mk/bsd.gnome.mk"
.endif
+.if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER)
+.include "${PORTSDIR}/Mk/bsd.gstreamer.mk"
+.endif
+
.if defined(USE_SDL) || defined(WANT_SDL)
.include "${PORTSDIR}/Mk/bsd.sdl.mk"
.endif
@@ -1462,17 +1471,20 @@ CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
.endif
.endif
-.if defined(USE_RC_SUBR)
+.if defined(USE_RC_SUBR) || defined(USE_RCORDER)
.if ${OSVERSION} < 500037
RUN_DEPENDS+= ${LOCALBASE}/etc/rc.subr:${PORTSDIR}/sysutils/rc_subr
RC_SUBR= ${LOCALBASE}/etc/rc.subr
.else
RC_SUBR= /etc/rc.subr
.endif
-.if ${USE_RC_SUBR:U} != "YES"
SUB_LIST+= RC_SUBR=${RC_SUBR}
+.if defined(USE_RC_SUBR) && ${USE_RC_SUBR:U} != "YES"
SUB_FILES+= ${USE_RC_SUBR}
.endif
+.if defined(USE_RCORDER)
+SUB_FILES+= ${USE_RCORDER}
+.endif
.endif
.if defined(USE_ICONV)
@@ -1737,14 +1749,6 @@ LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
.endif # USE_PGSQL
-.if defined(USE_XLIB)
-LIB_DEPENDS+= X11.6:${X_LIBRARIES_PORT}
-# Add explicit X options to avoid problems with false positives in configure
-.if defined(GNU_CONFIGURE)
-CONFIGURE_ARGS+=--x-libraries=${X11BASE}/lib --x-includes=${X11BASE}/include
-.endif
-.endif
-
# XXX: (not yet): .if defined(USE_AUTOTOOLS)
.include "${PORTSDIR}/Mk/bsd.autotools.mk"
# XXX: (not yet): .endif
@@ -1753,6 +1757,10 @@ CONFIGURE_ARGS+=--x-libraries=${X11BASE}/lib --x-includes=${X11BASE}/include
.include "${PORTSDIR}/Mk/bsd.gnome.mk"
.endif
+.if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER)
+.include "${PORTSDIR}/Mk/bsd.gstreamer.mk"
+.endif
+
.if defined(USE_SDL) || defined(WANT_SDL)
.include "${PORTSDIR}/Mk/bsd.sdl.mk"
.endif
@@ -3702,8 +3710,8 @@ _BUILD_SEQ= build-message pre-build pre-build-script do-build \
post-build post-build-script
_INSTALL_DEP= build
_INSTALL_SEQ= install-message check-conflicts \
- run-depends lib-depends pre-install pre-install-script \
- apply-slist generate-plist check-already-installed
+ run-depends lib-depends apply-slist pre-install \
+ pre-install-script generate-plist check-already-installed
_INSTALL_SUSEQ= check-umask install-mtree pre-su-install \
pre-su-install-script do-install post-install \
post-install-script add-plist-info add-plist-docs \
@@ -4811,6 +4819,7 @@ add-plist-docs:
add-plist-info:
# Process GNU INFO files at package install/deinstall time
+.if defined(INFO)
.for i in ${INFO}
install-info --quiet ${PREFIX}/${INFO_PATH}/$i.info ${PREFIX}/${INFO_PATH}/dir
@${ECHO_CMD} "@unexec install-info --delete %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
@@ -4825,6 +4834,7 @@ add-plist-info:
@${ECHO_CMD} "@unexec rmdir %D/info 2> /dev/null || true" >> ${TMPPLIST}
.endif
.endif
+.endif
# If we're installing into a non-standard PREFIX, we need to remove that directory at
# deinstall-time
@@ -4837,16 +4847,22 @@ add-plist-post:
.if !target(install-rc-script)
install-rc-script:
-.if defined(USE_RC_SUBR)
-.if ${USE_RC_SUBR:U} != "YES"
- @${ECHO_CMD} "===> Installing startup script(s) in ${PREFIX}/etc/rc.d"
- @if ${EGREP} -qe '^@cw?d' ${TMPPLIST} && \
- [ "`${SED} -En -e '/^@cw?d[ ]*/s,,,p' ${TMPPLIST} | ${TAIL} -n 1`" != "${PREFIX}" ]; then \
- ${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \
- fi
+.if defined(USE_RCORDER) || defined(USE_RC_SUBR) && ${USE_RC_SUBR:U} != "YES"
+.if defined(USE_RCORDER)
+ @${ECHO_CMD} "===> Installing early rcNG startup script(s)"
+ @${ECHO_CMD} "@cwd /" >> ${TMPPLIST}
+ @for i in ${USE_RCORDER}; do \
+ ${INSTALL_SCRIPT} ${WRKDIR}/$${i} /etc/rc.d/$${i%.sh}; \
+ ${ECHO_CMD} "etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \
+ done
+ @${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}
+.endif
+.if defined(USE_RC_SUBR) && ${USE_RC_SUBR:U} != "YES"
+ @${ECHO_CMD} "===> Installing rcNG startup script(s)"
+ @${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}
@for i in ${USE_RC_SUBR}; do \
- ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d; \
- ${ECHO_CMD} etc/rc.d/$${i} >> ${TMPPLIST}; \
+ ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d/$${i%.sh}.sh; \
+ ${ECHO_CMD} "etc/rc.d/$${i%.sh}.sh" >> ${TMPPLIST}; \
done
.endif
.else
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk
index 8370cdd..8d01b37 100644
--- a/Mk/bsd.port.subdir.mk
+++ b/Mk/bsd.port.subdir.mk
@@ -239,7 +239,7 @@ describe:
.if defined(PORTSTOP)
readmes: readme ${SUBDIR:S/^/_/:S/$/.readmes/}
@${ECHO_MSG} "===> Creating README.html for all ports"
- @perl ${.CURDIR}/Tools/make_readmes < ${.CURDIR}/${INDEXFILE}
+ @perl ${PORTSDIR}/Tools/make_readmes < ${PORTSDIR}/${INDEXFILE}
.else
readmes: readme
.endif
OpenPOWER on IntegriCloud