summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2022-03-27 11:22:30 -0700
committerMatt Turner <mattst88@gentoo.org>2022-03-27 11:28:16 -0700
commit21bf129424d68a2315450390c633a6f9ff938bb8 (patch)
treef9f1009e050f3ae88a3ee1d2eb6cb9ac4a5bb7d8 /media-libs/gexiv2
parentnet-libs/webkit-gtk: Disable USE_ANGLE_WEBGL (diff)
downloadgentoo-21bf129424d68a2315450390c633a6f9ff938bb8.tar.gz
gentoo-21bf129424d68a2315450390c633a6f9ff938bb8.tar.bz2
gentoo-21bf129424d68a2315450390c633a6f9ff938bb8.zip
media-libs/gexiv2: Version bump to 0.14.0
Closes: https://bugs.gentoo.org/811810 Closes: https://bugs.gentoo.org/835781 Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'media-libs/gexiv2')
-rw-r--r--media-libs/gexiv2/Manifest1
-rw-r--r--media-libs/gexiv2/files/0.14.0-clean-up-python-support.patch175
-rw-r--r--media-libs/gexiv2/gexiv2-0.14.0.ebuild82
3 files changed, 258 insertions, 0 deletions
diff --git a/media-libs/gexiv2/Manifest b/media-libs/gexiv2/Manifest
index 96ab6312326a..2e89005c9c5a 100644
--- a/media-libs/gexiv2/Manifest
+++ b/media-libs/gexiv2/Manifest
@@ -1,2 +1,3 @@
DIST gexiv2-0.12.2.tar.xz 378428 BLAKE2B bb3fd6310cdb76f3e88bb31e018d78013bb626559b9e95bf59688601388cff10739c20c431fa9539c1d24c9045d2b3590a0f783a994d3b8966c4df12e9127f4e SHA512 850bf41f6180b0fdd050ab08da6e3bbd8d25ffc25a1f48e17a1d7a65771893cc79fba9cbd6718bf1754251ac4a4754983f0ab8f006a05f8c4a15085846d001a5
DIST gexiv2-0.13.0.tar.xz 387188 BLAKE2B 25550fd0b711e1363da1f6144af482709b52b0334e326a211919fcc97ccaef1832978a31d8d7ec111caf3f3b9b4db3537d818d35199da2e0b6250098c6d99d01 SHA512 dcd94a8e8ab7e3764bf652514222c3cce4537bf2658905405a25d1dd18878e67343060f5b1cf9fd8b11acf4dd2b727a9d49a0d8f379838c60c92de69f0bed2c5
+DIST gexiv2-0.14.0.tar.xz 387288 BLAKE2B bdbb4547486a248cd9c6559276ebac20d3af5211474b86eb6ebfb3a8c76670ff7c2d162435e0cbcb270f96c64f5bc1eedc2d63c021b65f57e1ad9ec8cf9a4bf8 SHA512 d745ae2d8ddcf0c8a2a7980eaa489f9b520af54242c5e4ddded9c3ae4a579c824c8cb659bd7e985ffa09f9fe37bdf73d6d9181d456711e0953b73023eb0f9f50
diff --git a/media-libs/gexiv2/files/0.14.0-clean-up-python-support.patch b/media-libs/gexiv2/files/0.14.0-clean-up-python-support.patch
new file mode 100644
index 000000000000..0e2fbaa33fe8
--- /dev/null
+++ b/media-libs/gexiv2/files/0.14.0-clean-up-python-support.patch
@@ -0,0 +1,175 @@
+https://gitlab.gnome.org/GNOME/gexiv2/-/merge_requests/64
+
+From 7e36a7dfeadfff134beabf502ca4d551f505fd8e Mon Sep 17 00:00:00 2001
+From: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
+Date: Fri, 24 Sep 2021 11:48:34 -0400
+Subject: [PATCH] clean up python support
+
+- fix always failing gexiv2 test due to missing import gi
+- actually use override during testing
+- fix totally ignoring gexiv2 test status
+- fix broken build with -Dpython3=false
+- remove unnecessary configure_file
+- remove misleading explanation of -Dpython3=false (it also disables
+ installing GExiv2.py)
+- remove unnecessary python3_girdir
+---
+ meson.build | 21 +++++--------------
+ meson_options.txt | 1 -
+ test/meson.build | 13 +++---------
+ test/python/{gexiv2.py.in => gexiv2.py} | 3 ++-
+ test/python/meson.build | 10 ---------
+ .../{test_metadata.py.in => test_metadata.py} | 4 ++--
+ test/python3-test.in | 4 ----
+ 7 files changed, 12 insertions(+), 44 deletions(-)
+ rename test/python/{gexiv2.py.in => gexiv2.py} (94%)
+ rename test/python/{test_metadata.py.in => test_metadata.py} (99%)
+ delete mode 100755 test/python3-test.in
+
+diff --git a/meson.build b/meson.build
+index 42f70cb..3f9426f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -23,7 +23,6 @@ gio = dependency('gio-2.0', version : '>= 2.46.0')
+ cc = meson.get_compiler('c')
+ cpp = meson.get_compiler('cpp')
+ math = cc.find_library('m', required : false)
+-python3 = import('python').find_installation('python3', modules: 'gi', required: get_option('python3'))
+
+ bmff_test = '''#include <exiv2/exiv2.hpp>
+ #ifndef EXV_ENABLE_BMFF
+@@ -48,24 +47,14 @@ if get_option('gtk_doc')
+ subdir('docs')
+ endif
+
+-if get_option('python3') == false
+- warning('\'python3\' is disabled, any Python tests will not be run.')
+-else
++if get_option('python3')
+ if get_option('introspection') == false
+ error('Build option \'python3\' requires \'introspection\' to be enabled.')
+ endif
+-
+- girdir = get_option('python3_girdir')
+- if girdir == 'auto'
+- python3_output = run_command(python3, ['-c', 'import gi; print(gi._overridesdir)'])
+- if python3_output.returncode() != 0
+- error('Finding the Python 3 gi/override path: ' + python3_output.stderr())
+- endif
+- girdir = python3_output.stdout().strip()
+- endif
+-
+- message('Installing \'GExiv2.py\' into \'' + girdir + '\'')
+- python3.install_sources('GExiv2.py', subdir : girdir)
++ python3 = import('python').find_installation('python3', modules: 'gi')
++ python3.install_sources('GExiv2.py', subdir: 'gi/overrides')
++else
++ python3 = disabler()
+ endif
+
+ subdir('test')
+diff --git a/meson_options.txt b/meson_options.txt
+index 5e76789..edb3cfd 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -2,5 +2,4 @@ option('gtk_doc', type: 'boolean', value: false, description: 'Enable or disable
+ option('introspection', type: 'boolean', value : true, description: 'Enable or disable GObject Introspection')
+ option('vapi', type: 'boolean', value: true, description: 'Enable or disable generation of vala vapi file')
+ option('tools', type: 'boolean', value: true, description: 'Enable or disable building the commandline tools')
+-option('python3_girdir', type: 'string', value : 'auto', description : 'Installation dir for PyGObject3 overrides (default = auto)')
+ option('python3', type: 'boolean', value : true, description : 'Enable or disable using Python 3 (and PyGObject module)')
+diff --git a/test/meson.build b/test/meson.build
+index c4f287d..0ae50ed 100644
+--- a/test/meson.build
++++ b/test/meson.build
+@@ -1,12 +1,11 @@
+ test_sample_path = join_paths(meson.current_source_dir(), 'data')
+-python_module_path = join_paths(meson.current_build_dir(), 'python')
+
+ test_env = environment()
+ test_env.set('G_SLICE', 'always-malloc')
+ test_env.set('TEST_DATA_DIR', test_sample_path)
+ test_env.prepend('GI_TYPELIB_PATH', typelib_path)
+ test_env.prepend('LD_LIBRARY_PATH', typelib_path)
+-test_env.prepend('PYTHONPATH', python_module_path)
++test_env.prepend('PYTHONPATH', join_paths(meson.current_source_dir(), 'python'))
+
+ regression_test = executable('gexiv2-regression', 'gexiv2-regression.c',
+ dependencies : [gobject, gio, math],
+@@ -19,11 +18,5 @@ regression_test = executable('gexiv2-regression', 'gexiv2-regression.c',
+
+ test('regression', regression_test, env : test_env)
+
+-subdir('python')
+-
+-python3_test_conf = configuration_data()
+-python3_test_conf.set('PYTHON3_PATH', python3.path())
+-python3_test = configure_file(input: 'python3-test.in',
+- output : 'python3-test',
+- configuration: python3_test_conf)
+-test('python3', find_program(python3_test), env : test_env)
++test('python3-gexiv2', python3, args: ['-m', 'unittest', 'gexiv2'], env: test_env)
++test('python3-metadata', python3, args: ['-m', 'unittest', 'test_metadata'], env: test_env)
+diff --git a/test/python/gexiv2.py.in b/test/python/gexiv2.py
+similarity index 94%
+rename from test/python/gexiv2.py.in
+rename to test/python/gexiv2.py
+index 4e01ff5..503815c 100644
+--- a/test/python/gexiv2.py.in
++++ b/test/python/gexiv2.py
+@@ -22,7 +22,8 @@
+ import unittest
+ import os
+
+-gi.require_version('GExiv2', '@PROJECT_API_VERSION@')
++import gi.overrides
++gi.overrides.__path__.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
+ from gi.repository import GExiv2
+
+
+diff --git a/test/python/meson.build b/test/python/meson.build
+index 783ba0b..e69de29 100644
+--- a/test/python/meson.build
++++ b/test/python/meson.build
+@@ -1,10 +0,0 @@
+-python_conf = configuration_data()
+-python_conf.set('PROJECT_API_VERSION', project_api_version)
+-
+-gexiv2_py_file = configure_file(input: 'gexiv2.py.in',
+- output : 'gexiv2.py',
+- configuration: python_conf)
+-
+-test_metadata_py_file = configure_file(input: 'test_metadata.py.in',
+- output : 'test_metadata.py',
+- configuration: python_conf)
+diff --git a/test/python/test_metadata.py.in b/test/python/test_metadata.py
+similarity index 99%
+rename from test/python/test_metadata.py.in
+rename to test/python/test_metadata.py
+index 45d9d45..8d4296c 100644
+--- a/test/python/test_metadata.py.in
++++ b/test/python/test_metadata.py
+@@ -30,8 +30,8 @@ import tempfile
+
+ PY3K = sys.version_info[0] == 3
+
+-import gi
+-gi.require_version('GExiv2', '@PROJECT_API_VERSION@')
++import gi.overrides
++gi.overrides.__path__.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
+ from gi.repository import GExiv2, GLib
+ from fractions import Fraction
+
+diff --git a/test/python3-test.in b/test/python3-test.in
+deleted file mode 100755
+index 6fb3bf8..0000000
+--- a/test/python3-test.in
++++ /dev/null
+@@ -1,4 +0,0 @@
+-#!/bin/sh
+-
+-'@PYTHON3_PATH@' -m unittest gexiv2
+-'@PYTHON3_PATH@' -m unittest test_metadata
+--
+2.34.1
+
diff --git a/media-libs/gexiv2/gexiv2-0.14.0.ebuild b/media-libs/gexiv2/gexiv2-0.14.0.ebuild
new file mode 100644
index 000000000000..2de5eadc27cc
--- /dev/null
+++ b/media-libs/gexiv2/gexiv2-0.14.0.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit meson python-r1 vala
+
+DESCRIPTION="GObject-based wrapper around the Exiv2 library"
+HOMEPAGE="https://wiki.gnome.org/Projects/gexiv2"
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/gexiv2.git"
+ inherit git-r3
+else
+ SRC_URI="mirror://gnome/sources/${PN}/$(ver_cut 1-2)/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+LICENSE="LGPL-2.1+ GPL-2"
+SLOT="0"
+IUSE="gtk-doc +introspection python static-libs test +vala"
+REQUIRED_USE="
+ python? ( introspection ${PYTHON_REQUIRED_USE} )
+ test? ( python introspection )
+ vala? ( introspection )
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=media-gfx/exiv2-0.26:=
+ >=dev-libs/glib-2.46.0:2
+ introspection? ( >=dev-libs/gobject-introspection-1.54:= )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-util/glib-utils
+ gtk-doc? (
+ dev-util/gtk-doc
+ app-text/docbook-xml-dtd:4.3
+ )
+ test? ( media-gfx/exiv2[xmp] )
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-clean-up-python-support.patch
+)
+
+src_prepare() {
+ default
+ use vala && vala_setup
+}
+
+src_configure() {
+ local emesonargs=(
+ $(meson_use gtk-doc gtk_doc)
+ $(meson_use introspection)
+ $(meson_use vala vapi)
+ -Dtools=false # requires vala, freshly promoted tool that some other distros don't ship yet either
+ # Prevents installation of python modules (uses install_data from meson
+ # which does not optimize the modules)
+ -Dpython3=false
+ )
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ if use python ; then
+ python_moduleinto gi/overrides/
+ python_foreach_impl python_domodule GExiv2.py
+ python_foreach_impl python_optimize
+ fi
+}