media-libs/gexiv2: fix vapi file generation and install
authorMarty E. Plummer <hanetzer@startmail.com>
Wed, 16 Jan 2019 20:19:56 +0000 (14:19 -0600)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 16 Jan 2019 21:00:11 +0000 (22:00 +0100)
Bug: https://bugs.gentoo.org/675294
Package-Manager: Portage-2.3.55, Repoman-2.3.12
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
Closes: https://github.com/gentoo/gentoo/pull/10850
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
media-libs/gexiv2/files/gexiv2-0.10.10-vala-fixup.patch [new file with mode: 0644]
media-libs/gexiv2/gexiv2-0.10.10-r1.ebuild [moved from media-libs/gexiv2/gexiv2-0.10.10.ebuild with 97% similarity]
media-libs/gexiv2/gexiv2-9999.ebuild

diff --git a/media-libs/gexiv2/files/gexiv2-0.10.10-vala-fixup.patch b/media-libs/gexiv2/files/gexiv2-0.10.10-vala-fixup.patch
new file mode 100644 (file)
index 0000000..daf72ef
--- /dev/null
@@ -0,0 +1,49 @@
+From: "Marty E. Plummer" <hanetzer@startmail.com>
+Date: Sun, 13 Jan 2019 13:33:32 -0600
+Subject: [PATCH] meson.build: improve handling of vapi
+
+As it currently stands the vapi files are not generatable on linux
+distros which do not provide unversioned valac/vapigen. Use instead
+meson's add_languages function to handle detection of existing vala
+toolchain, which will check the VALAC and VAPIGEN env vars.
+
+Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
+
+--- a/meson.build
++++ b/meson.build
+@@ -6,11 +6,9 @@ exiv2 = dependency('exiv2', version : '>
+ gobject = dependency('gobject-2.0', version : '>= 2.38.0')
+ gir = find_program('g-ir-scanner', required: false)
+-vapigen = find_program('vapigen', required: false)
+-vala = find_program('valac', required: false)
+ introspection_available = gir.found() and get_option('introspection')
+-vapi_available = introspection_available and vapigen.found() and get_option('vapi')
++vapi_available = introspection_available and add_languages('vala', required: false) and get_option('vapi')
+ subdir('gexiv2')
+--- a/test/meson.build
++++ b/test/meson.build
+@@ -17,15 +17,11 @@ regression_test = executable('gexiv2-reg
+ test('regression', regression_test, env : test_env)
+ if vapi_available
+-  valac = find_program('valac')
+-  if valac.found()
+-    add_languages('vala')
+-    executable('gexiv2-dump',
+-               'gexiv2-dump.vala',
+-               include_directories : include_directories('..'),
+-               dependencies : [gobject, vapi],
+-               link_with : gexiv2)
+-  endif
++  executable('gexiv2-dump',
++             'gexiv2-dump.vala',
++             include_directories : include_directories('..'),
++             dependencies : [gobject, vapi],
++             link_with : gexiv2)
+ endif
+ if python2_available
similarity index 97%
rename from media-libs/gexiv2/gexiv2-0.10.10.ebuild
rename to media-libs/gexiv2/gexiv2-0.10.10-r1.ebuild
index ad4135f9b2a5f8045e53689df08f148aad1fa159..d0fea160c6494bccacd391f29172bd2eb60afb5b 100644 (file)
@@ -48,6 +48,7 @@ PATCHES=(
        # renames meson options to current git HEAD's names, current naming scheme
        # is rather awkward
        "${FILESDIR}"/${PN}-0.10.10-meson-fixup.patch
+       "${FILESDIR}"/${PN}-0.10.10-vala-fixup.patch
 )
 
 src_prepare() {
index 2547c6a9ca911da6861cf6b747355e9cd705735f..1c6c54fc4d10d2afd5ea547032a913ad4e13dd5f 100644 (file)
@@ -57,8 +57,8 @@ src_configure() {
                $(meson_use gtk-doc gtk_doc)
                # prevents installation of python modules (uses install_data from meson
                # which does not optimize the modules
-               -Dpython2-girdir=no
-               -Dpython3-girdir=no
+               -Dpython2_girdir=no
+               -Dpython3_girdir=no
        )
        meson_src_configure
 }