Bump version to 0.36.9
[cygport.git] / cygclass / gstreamer.cygclass
blob5244f9cfc12381e16046eab5f19ed4045044f973
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
25 #  SYNOPSIS
26 #  inherit gstreamer
27 #  DESCRIPTION
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.
37 #****
39 case ${PN} in
40 *gstreamer*) ORIG_PN=${ORIG_PN:-gst-${PN#*gstreamer*-}} ;;
41 esac
43 #****o* gstreamer.cygclass/HOMEPAGE (gstreamer)
44 #  DEFINITION
45 HOMEPAGE="https://gstreamer.freedesktop.org/"
46 #****
48 #****o* gstreamer.cygclass/SRC_URI (gstreamer)
49 #  DESCRIPTION
50 #  Download location for the upstream source tarball.
51 #****
52 case ${PV} in
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"
59 esac
61 #****o* gstreamer.cygclass/GIT_URI (gstreamer)
62 #  NOTE
63 #  git.cygclass must be inherit()ed last for this to have any effect.
64 #  DEFINITION
65 GIT_URI="git://anongit.freedesktop.org/git/gstreamer/${ORIG_PN}"
66 #****
68 DIFF_EXCLUDES="common m4 po autoregen.sh stamp-h.in"
70 #****d* gstreamer.cygclass/GST_PLUGINDIR
71 #  DESCRIPTION
72 #  Installation path for GStreamer plugins.
73 #****
74 case ${PV} in
75 0.*)            GST_PLUGINDIR="$(__host_prefix)/lib/gstreamer-${PV[1]}.${PV[2]}" ;;
76 *)              GST_PLUGINDIR="$(__host_prefix)/lib/gstreamer-${PV[1]}.0" ;;
77 esac
79 #****C* gstreamer.cygclass/gstreamer_autoreconf
80 #  SYNOPSIS
81 #  cd $S
82 #  gstreamer_autoreconf
83 #  DESCRIPTION
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.
86 #  WARNING
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.
92 #  REQUIRES
93 #  autoconf, automake, gettext-devel, libtool, pkg-config
94 #  SEE ALSO
95 #  cygautoreconf
96 #****
97 gstreamer_autoreconf() {
98         # gstreamer packages require a custom autogen.sh
99         if [ ! -f autogen.sh ]
100         then
101         error "Could not find autogen.sh"
102         fi
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"
111         gnuconfigize .
114 gst_autoreconf() { gstreamer_autoreconf ; }
116 readonly -f gstreamer_autoreconf gst_autoreconf