diff options
Diffstat (limited to 'media-libs/gexiv2')
-rw-r--r-- | media-libs/gexiv2/Manifest | 7 | ||||
-rw-r--r-- | media-libs/gexiv2/files/0.14.0-clean-up-python-support.patch | 175 | ||||
-rw-r--r-- | media-libs/gexiv2/gexiv2-0.12.2.ebuild | 4 | ||||
-rw-r--r-- | media-libs/gexiv2/gexiv2-0.14.0.ebuild (renamed from media-libs/gexiv2/gexiv2-0.13.0.ebuild) | 24 |
4 files changed, 197 insertions, 13 deletions
diff --git a/media-libs/gexiv2/Manifest b/media-libs/gexiv2/Manifest index 5dbf4ec27cd0..efbb2ed3d2f7 100644 --- a/media-libs/gexiv2/Manifest +++ b/media-libs/gexiv2/Manifest @@ -1,5 +1,6 @@ +AUX 0.14.0-clean-up-python-support.patch 7005 BLAKE2B 623b003ab5c03ed86585ac662c5ddae0857bc09ddf28f5a42ea40f60601758111bcb408f38bfaa1aa081d882750d343eef355977da2ee84b3a9675d560243e11 SHA512 3de9ec1e11e859b393e16ae9d6a15e98157869b8b9cb2e939e8642eb4f38e9aaca05c969094dae001425475113ce4dc0224d3bcffd72a581b310174d039d1fd8 DIST gexiv2-0.12.2.tar.xz 378428 BLAKE2B bb3fd6310cdb76f3e88bb31e018d78013bb626559b9e95bf59688601388cff10739c20c431fa9539c1d24c9045d2b3590a0f783a994d3b8966c4df12e9127f4e SHA512 850bf41f6180b0fdd050ab08da6e3bbd8d25ffc25a1f48e17a1d7a65771893cc79fba9cbd6718bf1754251ac4a4754983f0ab8f006a05f8c4a15085846d001a5 -DIST gexiv2-0.13.0.tar.xz 387188 BLAKE2B 25550fd0b711e1363da1f6144af482709b52b0334e326a211919fcc97ccaef1832978a31d8d7ec111caf3f3b9b4db3537d818d35199da2e0b6250098c6d99d01 SHA512 dcd94a8e8ab7e3764bf652514222c3cce4537bf2658905405a25d1dd18878e67343060f5b1cf9fd8b11acf4dd2b727a9d49a0d8f379838c60c92de69f0bed2c5 -EBUILD gexiv2-0.12.2.ebuild 1792 BLAKE2B d340d1c9249a8d40f1033354fc784f2257076ab156c92da315ee42ba5e1288b7386d53720e3c9a41f8c15ef8919f7207ebab6c69700e87fa2e929a87cb48b7a8 SHA512 06cf3a12ce5f33132433134da2fde272c0151e76189e51b058fcb94942de869ecacbc11571387f5d90c6fdb0c960de8c075f93c88f97b014024104d0d04fd784 -EBUILD gexiv2-0.13.0.ebuild 1812 BLAKE2B 4da38dce9112359317b4f5f732847991a03c51833cac03c7fdf30565bc495fd0285f1cd1134a3aad68967c457c7a97a228e637d3d42f4bf16a8bfd141814d320 SHA512 78a839a2294d065fbb93fd6bec8edf0bab434e1ad20b0cb3919344a5dcd9ed62945b3295db3082a8d2d92092dbeec1f784713f9f21492386d1461bf78bacea9f +DIST gexiv2-0.14.0.tar.xz 387288 BLAKE2B bdbb4547486a248cd9c6559276ebac20d3af5211474b86eb6ebfb3a8c76670ff7c2d162435e0cbcb270f96c64f5bc1eedc2d63c021b65f57e1ad9ec8cf9a4bf8 SHA512 d745ae2d8ddcf0c8a2a7980eaa489f9b520af54242c5e4ddded9c3ae4a579c824c8cb659bd7e985ffa09f9fe37bdf73d6d9181d456711e0953b73023eb0f9f50 +EBUILD gexiv2-0.12.2.ebuild 1793 BLAKE2B 8251109fe8ea27a5fe4023479b1dfd0e0db1bf34635e2d79b6ec6bfe8830aca3faa5d6de1caa2b597de1f2fa3fc1b29903955fe4c72d2d06f2b8837664faec28 SHA512 7491b8132f9673955e896bf81d444a944dcaf306d253fb367966f142ab084f1b8dbd17f6dab7472ca920f51a481ac211b30eea07f3fd80c5b71028c72c273afc +EBUILD gexiv2-0.14.0.ebuild 1876 BLAKE2B 9040e4426967ca972118ebd0dd32af8f8989af05c9f00d12c8065121e745acbe153f5cd677a749f500190151f5f9f0cffb5495e8b3f0c7dd0a57b55d5834a704 SHA512 6e8a1883f4a7b29e45815d6a8c0da4f35a2c619d4adaee915c65b20763226765090ea4bcf7ad3c29999b5cb3db39a38ca8b69b50c0da4f67c0500dde424e6803 MISC metadata.xml 514 BLAKE2B 55bceb7ce8a3c1298a712d2340a166baeabac51ac09a248561c8f8c41b1696380f5d1307437dfab1b677e3e92950a028c20e115008cb359f31b354d01e0b13ee SHA512 63267566c28b52bcf4fe5359df76363767ae590f933e4936770ab0aa5fb43304c1d21c9e37acb81a4fcd0522135a364328379c6a27d3dead37a5f0d858e0672b 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.12.2.ebuild b/media-libs/gexiv2/gexiv2-0.12.2.ebuild index 391e3904bcea..5fc59d4f31ce 100644 --- a/media-libs/gexiv2/gexiv2-0.12.2.ebuild +++ b/media-libs/gexiv2/gexiv2-0.12.2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_COMPAT=( python3_{8..10} ) inherit meson python-r1 vala diff --git a/media-libs/gexiv2/gexiv2-0.13.0.ebuild b/media-libs/gexiv2/gexiv2-0.14.0.ebuild index 00f117fc268d..2de5eadc27cc 100644 --- a/media-libs/gexiv2/gexiv2-0.13.0.ebuild +++ b/media-libs/gexiv2/gexiv2-0.14.0.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7..10} ) +PYTHON_COMPAT=( python3_{8..10} ) inherit meson python-r1 vala @@ -32,22 +32,30 @@ 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}] ) + 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 ) + 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_src_prepare + use vala && vala_setup } src_configure() { |