gexiv2 0.12.0
Closes #37804. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
6526d7643c
commit
bed3ae955d
1 changed files with 53 additions and 5 deletions
|
@ -1,9 +1,8 @@
|
|||
class Gexiv2 < Formula
|
||||
desc "GObject wrapper around the Exiv2 photo metadata library"
|
||||
homepage "https://wiki.gnome.org/Projects/gexiv2"
|
||||
url "https://download.gnome.org/sources/gexiv2/0.10/gexiv2-0.10.10.tar.xz"
|
||||
sha256 "7d9ad7147ab51ab691edf043c44a0a44de4088c48a12d9c23c26939710e66ce1"
|
||||
revision 1
|
||||
url "https://download.gnome.org/sources/gexiv2/0.12/gexiv2-0.12.0.tar.xz"
|
||||
sha256 "58f539b0386f36300b76f3afea3a508de4914b27e78f58ee4d142486a42f926a"
|
||||
|
||||
bottle do
|
||||
sha256 "9d493db238b17a55c2715d6d76bf6ce5aff790e2c4367952ea752d507e04407d" => :mojave
|
||||
|
@ -12,7 +11,7 @@ class Gexiv2 < Formula
|
|||
end
|
||||
|
||||
depends_on "gobject-introspection" => :build
|
||||
depends_on "meson-internal" => :build
|
||||
depends_on "meson" => :build
|
||||
depends_on "ninja" => :build
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "python" => :build
|
||||
|
@ -20,14 +19,21 @@ class Gexiv2 < Formula
|
|||
depends_on "exiv2"
|
||||
depends_on "glib"
|
||||
|
||||
# submitted upstream as https://gitlab.gnome.org/GNOME/gexiv2/merge_requests/10
|
||||
patch :DATA
|
||||
|
||||
def install
|
||||
pyver = Language::Python.major_minor_version "python3"
|
||||
|
||||
mkdir "build" do
|
||||
system "meson", "--prefix=#{prefix}", "-Dpython3-girdir=#{lib}/python#{pyver}/site-packages/gi/overrides", ".."
|
||||
system "meson", "--prefix=#{prefix}", "-Dpython3_girdir=#{lib}/python#{pyver}/site-packages/gi/overrides", ".."
|
||||
system "ninja"
|
||||
system "ninja", "install"
|
||||
end
|
||||
|
||||
# to be removed when https://gitlab.gnome.org/GNOME/gobject-introspection/issues/222 is fixed
|
||||
inreplace share/"gir-1.0/GExiv2-0.10.gir", "@rpath", lib.to_s
|
||||
system "g-ir-compiler", "--output=#{lib}/girepository-1.0/GExiv2-0.10.typelib", share/"gir-1.0/GExiv2-0.10.gir"
|
||||
end
|
||||
|
||||
test do
|
||||
|
@ -50,3 +56,45 @@ class Gexiv2 < Formula
|
|||
system "./test"
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
diff --git a/gexiv2/meson.build b/gexiv2/meson.build
|
||||
index 196b298..12abf92 100644
|
||||
--- a/gexiv2/meson.build
|
||||
+++ b/gexiv2/meson.build
|
||||
@@ -2,6 +2,13 @@ pkg = import('pkgconfig')
|
||||
|
||||
as_version = meson.project_version().split('.')
|
||||
|
||||
+libversion = '2.0.0'
|
||||
+libversion_arr = libversion.split('.')
|
||||
+darwin_version_major = libversion_arr[0].to_int()
|
||||
+darwin_version_minor = libversion_arr[1].to_int()
|
||||
+darwin_version_micro = libversion_arr[2].to_int()
|
||||
+darwin_versions = [darwin_version_major + darwin_version_minor + 1, '@0@.@1@'.format(darwin_version_major + darwin_version_minor + 1, darwin_version_micro)]
|
||||
+
|
||||
gexiv2_include_dir = join_paths(get_option('includedir'), 'gexiv2')
|
||||
|
||||
config = configuration_data()
|
||||
@@ -53,7 +60,8 @@ gexiv2 = library('gexiv2',
|
||||
[version_header] +
|
||||
enum_sources,
|
||||
include_directories : include_directories('..'),
|
||||
- version: '2.0.0',
|
||||
+ version: libversion,
|
||||
+ darwin_versions: darwin_versions,
|
||||
dependencies : [gobject, exiv2, gio],
|
||||
install : true)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 601afc1..b84255f 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -2,6 +2,7 @@ project(
|
||||
'gexiv2',
|
||||
['c', 'cpp'],
|
||||
version : '0.12.0',
|
||||
+ meson_version : '>=0.48',
|
||||
default_options : [
|
||||
'cpp_std=c++11'
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue