meta-agl-bsp: backport: gstreamer1.0 v1.4.5 recipes
[AGL/meta-agl.git] / meta-agl-bsp / meta-rcar-gen3 / recipes-multimedia / gstreamer / gstreamer1.0-plugins.inc
1 SUMMARY = "Plugins for the GStreamer multimedia framework 1.x"
2 HOMEPAGE = "http://gstreamer.freedesktop.org/"
3 BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
4 SECTION = "multimedia"
5 DEPENDS = "gstreamer1.0"
6
7 inherit autotools pkgconfig gobject-introspection
8
9 GSTREAMER_1_0_DEBUG ?= "--disable-debug"
10 GSTREAMER_1_0_GIT_BRANCH ?= "master"
11 EXTRA_OECONF = "--disable-valgrind ${GSTREAMER_1_0_DEBUG} --disable-examples "
12
13 ## SRC_URI_append = " file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch"
14
15 delete_pkg_m4_file() {
16         # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
17         rm "${S}/common/m4/pkg.m4" || true
18 }
19
20 do_configure[prefuncs] += " delete_pkg_m4_file"
21
22 acpaths = "-I ${S}/common/m4 -I ${S}/m4"
23
24 LIBV = "1.0"
25 require gst-plugins-package.inc
26
27 PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc orc-native"
28
29 export ORCC = "${STAGING_DIR_NATIVE}${bindir}/orcc"
30
31 PACKAGES_DYNAMIC = "^${PN}-.*"
32
33 # apply gstreamer hack after Makefile.in.in in source is replaced by our version from
34 # ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in, but before configure is executed 
35 # http://lists.linuxtogo.org/pipermail/openembedded-core/2012-November/032233.html
36 oe_runconf_prepend() {
37         if [ -e ${S}/po/Makefile.in.in ]; then
38                 sed -i -e "1a\\" -e 'GETTEXT_PACKAGE = @GETTEXT_PACKAGE@' ${S}/po/Makefile.in.in
39         fi
40 }
41
42 SRC_URI = "${@get_gst_srcuri(d)}"
43
44 def get_gst_srcuri(d):
45     # check if expected prefix is present
46     prefix = "gstreamer1.0-"
47     bpn = d.getVar("BPN", True)
48     if not bpn.startswith(prefix):
49         bb.fatal('Invalid GStreamer 1.0 plugin package name "%s" : must start with "%s"' % (bpn, prefix))
50
51     # replaced prefix with "gst-", which is what is used for the tarball and repository filenames
52     gstpkg_basename = "gst-" + bpn[len(prefix):]
53     pv = d.getVar("PV", True)
54     branch = d.getVar("GSTREAMER_1_0_GIT_BRANCH", True)
55
56     if pv == "git":
57         s = "git://anongit.freedesktop.org/gstreamer/%s;branch=%s" % (gstpkg_basename, branch)
58     else:
59         s = "http://gstreamer.freedesktop.org/src/%s/%s-%s.tar.xz" % (gstpkg_basename, gstpkg_basename, pv)
60     return s
61
62 delete_liblink_m4_file() {
63         # This m4 file contains nastiness which conflicts with libtool 2.2.2
64         rm "${S}/m4/lib-link.m4" || true
65 }
66
67 do_configure[prefuncs] += " delete_liblink_m4_file "
68