1 ################################################################################
3 # gstreamer.cygclass - common functions for building GStreamer components
5 # Part of cygport - Cygwin packaging application
6 # Copyright (C) 2006-2020 Cygport authors
7 # Provided by the Cygwin project <https://cygwin.com/>
9 # cygport is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # cygport is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with cygport. If not, see <https://www.gnu.org/licenses/>.
22 ################################################################################
24 #****h* Cygclasses/gstreamer.cygclass
28 # GStreamer is a modular multimedia framework, using plugins to support
29 # a wide variety of audio and video formats, effects, and input/output.
30 # Being based on GObject it is heavily used within GNOME, but it also sees
31 # some use as a backend for KDE Phonon.
33 # GStreamer components include the core libraries and command-line tools,
34 # several sets of plugins, and Python bindings. This cygclass defines
35 # variables and functions which are common to all GStreamer components,
36 # and is also the basis of gst-plugins.cygclass.
40 *gstreamer*) ORIG_PN=${ORIG_PN:-gst-${PN#*gstreamer*-}} ;;
43 #****o* gstreamer.cygclass/HOMEPAGE (gstreamer)
45 HOMEPAGE="https://gstreamer.freedesktop.org/"
48 #****o* gstreamer.cygclass/SRC_URI (gstreamer)
50 # Download location for the upstream source tarball.
53 0.[0-9].*|0.10.*|0.11.?)
54 SRC_URI="https://gstreamer.freedesktop.org/src/${ORIG_PN}/${ORIG_PN}-${PV}.tar.bz2"
57 SRC_URI="https://gstreamer.freedesktop.org/src/${ORIG_PN}/${ORIG_PN}-${PV}.tar.xz"
61 #****o* gstreamer.cygclass/GIT_URI (gstreamer)
63 # git.cygclass must be inherit()ed last for this to have any effect.
65 GIT_URI="git://anongit.freedesktop.org/git/gstreamer/${ORIG_PN}"
68 DIFF_EXCLUDES="common m4 po autoregen.sh stamp-h.in"
70 #****d* gstreamer.cygclass/GST_PLUGINDIR
72 # Installation path for GStreamer plugins.
75 0.*) GST_PLUGINDIR="$(__host_prefix)/lib/gstreamer-${PV[1]}.${PV[2]}" ;;
76 *) GST_PLUGINDIR="$(__host_prefix)/lib/gstreamer-${PV[1]}.0" ;;
79 #****C* gstreamer.cygclass/gstreamer_autoreconf
82 # gstreamer_autoreconf
84 # Updates the build system with the included autogen.sh script, which is
85 # shipped in each tarball, which makes sure that all necessary steps are taken.
87 # Skipping this step is strongly discouraged. Patches to configure.ac, aclocal
88 # macros, or Makefile.am files will not take effect until their tools have been
89 # regenerated. Also, Cygwin's libtool package often includes patches which
90 # are not yet available in the latest upstream release, so libraries may not
91 # be built optimally, or even correctly, without this step having been run.
93 # autoconf, automake, gettext-devel, libtool, pkg-config
97 gstreamer_autoreconf() {
98 # gstreamer packages require a custom autogen.sh
99 if [ ! -f autogen.sh ]
101 error "Could not find autogen.sh"
104 __config_set with_aclocal 1
105 __config_set with_autoconf 1
106 __config_set with_autoheader 1
107 __config_set with_automake 1
108 __config_set with_libtool 1
110 NOCONFIGURE=1 ./autogen.sh || error "autogen.sh failed"
114 gst_autoreconf() { gstreamer_autoreconf ; }
116 readonly -f gstreamer_autoreconf gst_autoreconf