babl: 0.1.106 → 0.1.108

https://gitlab.gnome.org/GNOME/babl/-/compare/BABL_0_1_106...BABL_0_1_108

Co-authored-by: Jan Tojnar <jtojnar@gmail.com>
This commit is contained in:
Ersei Saggi
2024-04-28 18:17:33 +02:00
committed by Jan Tojnar
co-authored by Jan Tojnar
parent f2b20c3df8
commit 2609cc866d
2 changed files with 51 additions and 7 deletions
+22 -7
View File
@@ -1,30 +1,36 @@
{ stdenv
, lib
, fetchpatch
, fetchurl
, meson
, ninja
, pkg-config
, gi-docgen
, gobject-introspection
, lcms2
, vala
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "babl";
version = "0.1.106";
version = "0.1.108";
outputs = [ "out" "dev" ];
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "https://download.gimp.org/pub/babl/${lib.versions.majorMinor version}/babl-${version}.tar.xz";
hash = "sha256-0yUTXTME8IjBNMxiABOs8DXeLl0SWlCi2RBU5zd8QV8=";
url = "https://download.gimp.org/pub/babl/${lib.versions.majorMinor finalAttrs.version}/babl-${finalAttrs.version}.tar.xz";
hash = "sha256-Jt7+neqresTQ4HbKtJwqDW69DfDDH9IJklpfB+3uFHU=";
};
patches = [
# Allow overriding path to dev output that will be hardcoded e.g. in pkg-config file.
./dev-prefix.patch
];
nativeBuildInputs = [
meson
ninja
pkg-config
gi-docgen
gobject-introspection
vala
];
@@ -33,6 +39,15 @@ stdenv.mkDerivation rec {
lcms2
];
mesonFlags = [
"-Dprefix-dev=${placeholder "dev"}"
];
postFixup = ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput "share/doc" "$devdoc"
'';
meta = with lib; {
description = "Image pixel format conversion library";
mainProgram = "babl";
@@ -42,4 +57,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.unix;
};
}
})
@@ -0,0 +1,29 @@
diff --git a/meson.build b/meson.build
index 2350a1f..56f015d 100644
--- a/meson.build
+++ b/meson.build
@@ -551,7 +551,7 @@ pkgconfig.generate(
variables: [
'datadir=${prefix}/share',
'pluginsdir=${libdir}/@0@'.format(lib_name),
- 'girdir=${datadir}/gir-1.0',
+ 'girdir=@0@/share/gir-1.0'.format(get_option('prefix-dev')),
'typelibdir=${libdir}/girepository-1.0',
],
uninstalled_variables: [
diff --git a/meson_options.txt b/meson_options.txt
index f9d558c..3cac593 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -9,6 +9,11 @@ option('enable-gir',
choices: ['auto', 'true', 'false'],
description: 'gobject introspection .gir generation'
)
+option('prefix-dev',
+ type: 'string',
+ value: '',
+ description: 'Like prefix but for dev output of the package'
+)
option('enable-vapi',
type: 'boolean',
value: 'true',