Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package babl for openSUSE:Leap:16.0 checked 
in at 2025-07-23 17:50:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:16.0/babl (Old)
 and      /work/SRC/openSUSE:Leap:16.0/.babl.new.8875 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "babl"

Wed Jul 23 17:50:06 2025 rev:3 rq:1294986 version:0.1.114

Changes:
--------
--- /work/SRC/openSUSE:Leap:16.0/babl/babl.changes      2025-04-24 
10:16:58.750426542 +0200
+++ /work/SRC/openSUSE:Leap:16.0/.babl.new.8875/babl.changes    2025-07-23 
17:50:16.202962881 +0200
@@ -1,0 +2,8 @@
+Mon May 19 07:15:36 UTC 2025 - Paolo Stivanin <i...@paolostivanin.com>
+
+- Update to 0.1.114:
+  * Fix to broken TRC cache for formula based TRCs in ICC profiles.
+  * BABL_ICC_INTENT_DEFAULT added.
+  * Some broken conversions removed.
+
+-------------------------------------------------------------------

Old:
----
  babl-0.1.112.tar.xz

New:
----
  babl-0.1.114.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ babl.spec ++++++
--- /var/tmp/diff_new_pack.CHnDuD/_old  2025-07-23 17:50:16.458973496 +0200
+++ /var/tmp/diff_new_pack.CHnDuD/_new  2025-07-23 17:50:16.458973496 +0200
@@ -19,7 +19,7 @@
 %define debug_package_requires libbabl-0_1-0 = %{version}-%{release}
 
 Name:           babl
-Version:        0.1.112
+Version:        0.1.114
 Release:        0
 Summary:        Dynamic Pixel Format Translation Library
 License:        GPL-3.0-or-later AND LGPL-3.0-or-later

++++++ babl-0.1.112.tar.xz -> babl-0.1.114.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/.gitlab/run_meson_health_diff.sh 
new/babl-0.1.114/.gitlab/run_meson_health_diff.sh
--- old/babl-0.1.112/.gitlab/run_meson_health_diff.sh   1970-01-01 
01:00:00.000000000 +0100
+++ new/babl-0.1.114/.gitlab/run_meson_health_diff.sh   2025-05-08 
11:48:33.000000000 +0200
@@ -0,0 +1,167 @@
+#!/bin/bash
+
+source .gitlab/search-common-ancestor.sh
+
+diff=$(git diff -U0 --no-color "${newest_common_ancestor_sha}" -- '*.build' 
'*.py' | grep -E '^\+[^+]' | sed 's/^+//')
+
+
+#List of commonly used utilities on Unix world
+#See the context: https://gitlab.gnome.org/GNOME/gimp/-/issues/11385
+coreutils_array=(
+  ".sh"
+  "'sh'"
+  "'bash'"
+  "'\['"
+  "'arch'"
+  "'awk'"
+  "'b2sum'"
+  "'base32'"
+  "'base64'"
+  "'basename'"
+  "'basenc'"
+  "'cat'"
+  "'chcon'"
+  "'chgrp'"
+  "'chmod'"
+  "'chown'"
+  "'chroot'"
+  "'cksum'"
+  "'cmp'"
+  "'comm'"
+  "'cp'"
+  "'csplit'"
+  "'cut'"
+  "'date'"
+  "'dd'"
+  "'df'"
+  "'diff'"
+  "'dir'"
+  "'dircolors'"
+  "'dirname'"
+  "'du'"
+  "'echo'"
+  "'env'"
+  "'expand'"
+  "'expr'"
+  "'factor'"
+  "'false'"
+  "'find'"
+  "'fmt'"
+  "'fold'"
+  "'gkill'"
+  "'grep'"
+  "'groups'"
+  "'head'"
+  "'hostid'"
+  "'hostname'"
+  "'id'"
+  "'install'"
+  "'join'"
+  "'link'"
+  "'ln'"
+  "'logname'"
+  "'ls'"
+  "'md5sum'"
+  "'mkdir'"
+  "'mkfifo'"
+  "'mknod'"
+  "'mktemp'"
+  "'mv'"
+  "'nice'"
+  "'nl'"
+  "'nohup'"
+  "'nproc'"
+  "'numfmt'"
+  "'od'"
+  "'paste'"
+  "'pathchk'"
+  "'pinky'"
+  "'pr'"
+  "'printenv'"
+  "'printf'"
+  "'ptx'"
+  "'pwd'"
+  "'readlink'"
+  "'realpath'"
+  "'rm'"
+  "'rmdir'"
+  "'runcon'"
+  "'sed'"
+  "'seq'"
+  "'sha1sum'"
+  "'sha224sum'"
+  "'sha256sum'"
+  "'sha384sum'"
+  "'sha512sum'"
+  "'shred'"
+  "'shuf'"
+  "'sleep'"
+  "'sort'"
+  "'split'"
+  "'stat'"
+  "'stdbuf'"
+  "'stty'"
+  "'sum'"
+  "'sync'"
+  "'tac'"
+  "'tail'"
+  "'tee'"
+  "'test'"
+  "'timeout'"
+  "'touch'"
+  "'tr'"
+  "'true'"
+  "'truncate'"
+  "'tsort'"
+  "'tty'"
+  "'uname'"
+  "'unexpand'"
+  "'uniq'"
+  "'unlink'"
+  "'users'"
+  "'vdir'"
+  "'wc'"
+  "'who'"
+  "'whoami'"
+  "'yes'"
+)
+
+for coreutil in "${coreutils_array[@]}"; do
+  if echo "$diff" | grep -q "$coreutil"; then
+    found_coreutils+=" $coreutil"
+  fi
+done
+
+if [ "$found_coreutils" ]; then
+  echo -e '\033[31m(ERROR)\033[0m: Seems that you are trying to add an 
Unix-specific dependency to be called by Meson.'
+  echo "         Please, port to Python (which is crossplatform), your use 
of:${found_coreutils}."
+fi
+
+
+#Limited list of commonly used utilities on Windows world
+ntutils_array=(
+  ".bat"
+  ".cmd"
+  ".ps1"
+  "'cmd'"
+  "'powershell'"
+)
+
+for ntutil in "${ntutils_array[@]}"; do
+  if echo "$diff" | grep -q "$ntutil"; then
+    found_ntutils+=" $ntutil"
+  fi
+done
+
+if [ "$found_ntutils" ]; then
+  echo -e '\033[31m(ERROR)\033[0m: Seems that you are trying to add a 
NT-specific dependency to be called by Meson.'
+  echo "         Please, port to Python (which is crossplatform), your use 
of:${found_ntutils}."
+fi
+
+
+if [ "$found_coreutils" ] || [ "$found_ntutils" ]; then
+  exit 1
+fi
+
+echo 'Meson .build files are alright regarding crossplatform.'
+exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/.gitlab/search-common-ancestor.sh 
new/babl-0.1.114/.gitlab/search-common-ancestor.sh
--- old/babl-0.1.112/.gitlab/search-common-ancestor.sh  1970-01-01 
01:00:00.000000000 +0100
+++ new/babl-0.1.114/.gitlab/search-common-ancestor.sh  2025-05-08 
11:48:33.000000000 +0200
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+set -e
+
+ancestor_horizon=28  # days (4 weeks)
+
+# We need to add a new remote for the upstream target branch, since this script
+# could be running in a personal fork of the repository which has out of date
+# branches.
+#
+# Limit the fetch to a certain date horizon to limit the amount of data we get.
+# If the branch was forked from origin/main before this horizon, it should
+# probably be rebased.
+if ! git ls-remote --exit-code upstream >/dev/null 2>&1 ; then
+    git remote add upstream https://gitlab.gnome.org/GNOME/babl.git
+fi
+git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" 
+%Y-%m-%d)" upstream &> ./fetch_upstream.log
+
+# Work out the newest common ancestor between the detached HEAD that this CI 
job
+# has checked out, and the upstream target branch (which will typically be
+# `upstream/main` or `upstream/glib-2-62`).
+# `${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}` or 
`${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}`
+# are only defined if we’re running in a merge request pipeline,
+# fall back to `${CI_DEFAULT_BRANCH}` or `${CI_COMMIT_BRANCH}` respectively
+# otherwise.
+
+# add patch-origin
+git remote add patch-origin 
${CI_MERGE_REQUEST_SOURCE_PROJECT_URL:-${CI_PROJECT_URL}}
+
+source_branch="${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-${CI_COMMIT_BRANCH}}"
+git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" 
+%Y-%m-%d)" patch-origin "${source_branch}" &> ./fetch_origin.log
+
+newest_common_ancestor_sha=$(diff --old-line-format='' --new-line-format='' 
<(git rev-list --first-parent 
"upstream/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}") <(git 
rev-list --first-parent "patch-origin/${source_branch}") | head -1)
+if [ -z "${newest_common_ancestor_sha}" ]; then
+    echo "Couldn’t find common ancestor with upstream main branch. This 
typically"
+    echo "happens if you branched from main a long time ago. Please update"
+    echo "your clone, rebase, and re-push your branch."
+    exit 1
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/.gitlab-ci.yml 
new/babl-0.1.114/.gitlab-ci.yml
--- old/babl-0.1.112/.gitlab-ci.yml     1970-01-01 01:00:00.000000000 +0100
+++ new/babl-0.1.114/.gitlab-ci.yml     2025-05-08 11:48:33.000000000 +0200
@@ -0,0 +1,86 @@
+include:
+  - remote: 
'https://gitlab.gnome.org/Infrastructure/freedesktop-ci-templates/-/raw/master/templates/fedora.yml'
+
+stages:
+  - "build docker"
+  - build
+
+.fedora image:
+  variables:
+    ###
+    # IMPORTANT
+    # These are the version tags for the docker images the CI runs against.
+    # If you are hacking on them or need a them to rebuild, its enough
+    # to change any part of the string of the image you want.
+    ###
+    FDO_DISTRIBUTION_TAG: '2025-03-11.1'
+    FDO_DISTRIBUTION_VERSION: '41'
+    FDO_DISTRIBUTION_PACKAGES: >
+      git diffutils
+    FDO_UPSTREAM_REPO: gnome/babl
+
+fedora image:
+  stage: "build docker"
+  extends:
+    - .fedora image
+    - .fdo.container-build@fedora
+
+meson-health:
+  extends:
+    - .fedora image
+    - .fdo.distribution-image@fedora
+  stage: build
+  needs: ["fedora image"]
+  script:
+    - bash .gitlab/run_meson_health_diff.sh
+
+
+
+#cache:
+  #paths:
+    #- _pacman_cache
+
+#.build:
+  #stage: build
+  #image: archlinux:latest
+  #variables:
+    #PACMAN_CACHE: $CI_PROJECT_DIR/_pacman_cache
+  #artifacts:
+    #when: always
+    #paths:
+      #- _build/meson-logs
+  #before_script:
+    #- pacman -Syu --noconfirm --needed --cachedir $PACMAN_CACHE --ignore glibc
+        #base-devel
+        #git
+        #gobject-introspection
+        #meson
+        #vala
+        #pacman-contrib
+        #${EXTRA_PKGS}
+  #script:
+    #- meson _build
+        #-D enable-f16c=true
+        #-D enable-mmx=true
+        #-D enable-sse=true
+        #-D enable-sse2=true
+        #-D enable-sse4_1=true
+        #-D with-docs=true
+        #${EXTRA_OPTIONS}
+    #- ninja -C _build
+    #- ninja -C _build test
+  #after_script:
+    # Remove all cached packages but the latest version
+    #- paccache -r -k1 --cachedir $PACMAN_CACHE
+
+#latest-lcms:
+#  extends: .build
+#  variables:
+#    EXTRA_OPTIONS : "-Dwith-lcms=true"
+#    EXTRA_PKGS: "lcms2"
+
+#latest-nolcms:
+#  extends: .build
+#  variables:
+#    EXTRA_OPTIONS : "-Dwith-lcms=false"
+#    EXTRA_PKGS: ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/.gitlab-ci.yml-ignored 
new/babl-0.1.114/.gitlab-ci.yml-ignored
--- old/babl-0.1.112/.gitlab-ci.yml-ignored     2025-03-10 12:54:03.000000000 
+0100
+++ new/babl-0.1.114/.gitlab-ci.yml-ignored     1970-01-01 01:00:00.000000000 
+0100
@@ -1,48 +0,0 @@
-cache:
-  paths:
-    - _pacman_cache
-
-.build:
-  stage: build
-  image: archlinux:latest
-  variables:
-    PACMAN_CACHE: $CI_PROJECT_DIR/_pacman_cache
-  artifacts:
-    when: always
-    paths:
-      - _build/meson-logs
-  before_script:
-    - pacman -Syu --noconfirm --needed --cachedir $PACMAN_CACHE --ignore glibc
-        base-devel
-        git
-        gobject-introspection
-        meson
-        vala
-        pacman-contrib
-        ${EXTRA_PKGS}
-  script:
-    - meson _build
-        -D enable-f16c=true
-        -D enable-mmx=true
-        -D enable-sse=true
-        -D enable-sse2=true
-        -D enable-sse4_1=true
-        -D with-docs=true
-        ${EXTRA_OPTIONS}
-    - ninja -C _build
-    - ninja -C _build test
-  after_script:
-    # Remove all cached packages but the latest version
-    #- paccache -r -k1 --cachedir $PACMAN_CACHE
-
-latest-lcms:
-  extends: .build
-  variables:
-    EXTRA_OPTIONS : "-Dwith-lcms=true"
-    EXTRA_PKGS: "lcms2"
-
-latest-nolcms:
-  extends: .build
-  variables:
-    EXTRA_OPTIONS : "-Dwith-lcms=false"
-    EXTRA_PKGS: ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/NEWS new/babl-0.1.114/NEWS
--- old/babl-0.1.112/NEWS       2025-03-10 12:54:03.000000000 +0100
+++ new/babl-0.1.114/NEWS       2025-05-08 11:48:33.000000000 +0200
@@ -3,9 +3,11 @@
 the news section both in the README and the webpage.
                                                                           -->
 
+2025-05-08 babl-0.1.114                                             </dt><dd>
+Fix to broken TRC cache for formula based TRCs in ICC profiles. 
BABL_ICC_INTENT_DEFAULT added. Some broken conversions removed.
+                                                                    </dd><dt>
 2025-03-10 babl-0.1.112                                             </dt><dd>
 Fix crash for locales using neither '.' nor ',' as decimal seperator.
-Fix crash for locales using neither '.' nor ',' as decimal seperator.
                                                                     </dd><dt>
 2024-09-27 babl-0.1.110                                             </dt><dd>
 Build improvements.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/babl/babl-core.c 
new/babl-0.1.114/babl/babl-core.c
--- old/babl-0.1.112/babl/babl-core.c   2025-03-10 12:54:03.000000000 +0100
+++ new/babl-0.1.114/babl/babl-core.c   2025-05-08 11:48:33.000000000 +0200
@@ -198,7 +198,7 @@
       )
     return babl_trc ("sRGB");
 
-  snprintf (name, sizeof (name)-1, "%i.%06i  %i.%06i %i.%04i %i.%04i %i.%04i 
%i.%04i %i.%04i",
+  snprintf (name, sizeof (name)-1, "%i.%06i %i.%06i %i.%04i %i.%04i %i.%04i 
%i.%04i %i.%04i",
             (int)(g), (int)((g-(int)g) * 1000000),
             (int)(a), (int)((a-(int)a) * 1000000),
             (int)(b), (int)((b-(int)b) * 10000),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/babl/babl-fish-reference.c 
new/babl-0.1.114/babl/babl-fish-reference.c
--- old/babl-0.1.112/babl/babl-fish-reference.c 2025-03-10 12:54:03.000000000 
+0100
+++ new/babl-0.1.114/babl/babl-fish-reference.c 2025-05-08 11:48:33.000000000 
+0200
@@ -1047,7 +1047,7 @@
      if (cmyk_cmyk_no >= cmyk_cmyk_count)
      {
        cmsHPROFILE src_profile = 
cmsOpenProfileFromMem(source_space->space.icc_profile, 
source_space->space.icc_length);
-       cmsHPROFILE dst_profile = 
cmsOpenProfileFromMem(destination_space->space.icc_profile, 
source_space->space.icc_length);
+       cmsHPROFILE dst_profile = 
cmsOpenProfileFromMem(destination_space->space.icc_profile, 
destination_space->space.icc_length);
 
        cmyk_cmyk_source[cmyk_cmyk_no] = source_space;
        cmyk_cmyk_destination[cmyk_cmyk_no] = destination_space;
@@ -1385,8 +1385,6 @@
   static const void *type_float = NULL;
   static int allow_float_reference = -1;
 
-  if (!type_float) type_float = babl_type_from_id (BABL_FLOAT);
-
   /* same format in source/destination */
   if (BABL (babl->fish.source) == BABL (babl->fish.destination))
   {
@@ -1422,6 +1420,9 @@
     return;
   }
 
+  if (!type_float)
+    type_float = babl_type_from_id (BABL_FLOAT);
+
   if (allow_float_reference == -1)
     allow_float_reference = getenv ("BABL_REFERENCE_NOFLOAT") ? 0 : 1;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/babl/babl.h new/babl-0.1.114/babl/babl.h
--- old/babl-0.1.112/babl/babl.h        2025-03-10 12:54:03.000000000 +0100
+++ new/babl-0.1.114/babl/babl.h        2025-05-08 11:48:33.000000000 +0200
@@ -101,14 +101,17 @@
 const Babl * babl_space (const char *name);
 
 typedef enum {
-  BABL_ICC_INTENT_PERCEPTUAL             = 0,
-  BABL_ICC_INTENT_RELATIVE_COLORIMETRIC  = 1,
-  BABL_ICC_INTENT_SATURATION             = 2,
-  BABL_ICC_INTENT_ABSOLUTE_COLORIMETRIC  = 3,
-  BABL_ICC_INTENT_PERFORMANCE            = 32
-  // black-point compensation toggle will be added if/when support exist in 
babl
+  BABL_ICC_INTENT_PERCEPTUAL               = 0,
+  BABL_ICC_INTENT_RELATIVE_COLORIMETRIC    = 1,
+  BABL_ICC_INTENT_SATURATION               = 2,
+  BABL_ICC_INTENT_ABSOLUTE_COLORIMETRIC    = 3,
+
+  // the following are flags:
+  BABL_ICC_INTENT_PERFORMANCE              = 32
 } BablIccIntent;
 
+#define BABL_ICC_INTENT_DEFAULT   (BABL_ICC_INTENT_RELATIVE_COLORIMETRIC)
+
 /**
  * babl_space_from_icc:
  * @icc_data: pointer to icc profile in memory
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/babl/base/babl-trc.c 
new/babl-0.1.114/babl/base/babl-trc.c
--- old/babl-0.1.112/babl/base/babl-trc.c       2025-03-10 12:54:03.000000000 
+0100
+++ new/babl-0.1.114/babl/base/babl-trc.c       2025-05-08 11:48:33.000000000 
+0200
@@ -185,7 +185,7 @@
   float e = trc->lut[5];
   float f = trc->lut[6];
 
-  if (x - f > c * d)  // XXX: verify that this math is the correct inverse
+  if (x - f > c * d)
   {
     float v = _babl_trc_gamma_from_linear ((Babl *) trc, x - f);
     v = (v-b)/a;
@@ -211,7 +211,7 @@
   float e = trc->lut[5];
   float f = trc->lut[6];
 
-  if (x >= d)  // OPT can be reduced to be branchless
+  if (x >= d)
   {
     return _babl_trc_gamma_to_linear ((Babl *) trc, a * x + b) + e;
   }
@@ -411,6 +411,7 @@
               int         n_lut,
               float      *lut);
 
+
 const Babl *
 BABL_SIMD_SUFFIX (babl_trc_new) (const char *name,
               BablTRCType type,
@@ -419,12 +420,15 @@
               float      *lut)
 {
   int i=0;
-  static BablTRC trc;
+  BablTRC trc;
+  memset (&trc, 0, sizeof(trc));
   trc.instance.class_type = BABL_TRC;
   trc.instance.id         = 0;
   trc.type = type;
   trc.gamma  = gamma > 0.0    ? gamma       : 0.0;
   trc.rgamma = gamma > 0.0001 ? 1.0 / gamma : 0.0;
+  if(name)
+    strncpy (trc.name, name, sizeof (trc.name) - 1);
 
   if (n_lut )
   {
@@ -457,11 +461,11 @@
   trc_db[i]=trc;
   trc_db[i].instance.name = trc_db[i].name;
   if (name)
-    snprintf (trc_db[i].name, sizeof (trc_db[i].name), "%s", name);
+    snprintf (trc_db[i].name, sizeof (trc_db[i].name) - 1, "%s", name);
   else if (n_lut)
-    snprintf (trc_db[i].name, sizeof (trc_db[i].name), "lut-trc");
+    snprintf (trc_db[i].name, sizeof (trc_db[i].name) - 1, "lut-trc");
   else
-    snprintf (trc_db[i].name, sizeof (trc_db[i].name), "trc-%i-%f", type, 
gamma);
+    snprintf (trc_db[i].name, sizeof (trc_db[i].name) - 1, "trc-%i-%f", type, 
gamma);
 
   if (n_lut)
   {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/babl/base/babl-trc.h 
new/babl-0.1.114/babl/base/babl-trc.h
--- old/babl-0.1.112/babl/base/babl-trc.h       2025-03-10 12:54:03.000000000 
+0100
+++ new/babl-0.1.114/babl/base/babl-trc.h       2025-05-08 11:48:33.000000000 
+0200
@@ -39,6 +39,7 @@
   BablInstance     instance;
   BablTRCType      type;
   int              lut_size;
+  char             name[128];
   double           gamma;
   float            rgamma;
   float          (*fun_to_linear)(const Babl *trc, float val);
@@ -66,7 +67,6 @@
   float            poly_gamma_from_linear_x1;
   float           *lut;
   float           *inv_lut;
-  char             name[128];
   int valid_u8_lut;
   float u8_lut[256];
 } BablTRC;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/docs/meson.build 
new/babl-0.1.114/docs/meson.build
--- old/babl-0.1.112/docs/meson.build   2025-03-10 12:54:03.000000000 +0100
+++ new/babl-0.1.114/docs/meson.build   2025-05-08 11:48:33.000000000 +0200
@@ -17,20 +17,16 @@
   copy: true
 )
 
-index_html_tmp_env = [
-  'BABL_PATH=' + babl_extensions_build_dir,
-]
-
 # Don't build babl ref if cannot run compiled objects in this env
-if env_bin.found() and can_run_host_binaries
+if can_run_host_binaries
+  babl_run_env=environment()
+  babl_run_env.set('BABL_PATH', babl_extensions_build_dir)
+  
   index_html_tmp = custom_target('index.html.tmp',
+    env: babl_run_env,
     input : babl_html_dump,
     output:'index.html.tmp',
-    command: [
-      env_bin,
-      index_html_tmp_env,
-      babl_html_dump
-    ],
+    command: [babl_html_dump],
     capture: true,
   )
 else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/export-symbols 
new/babl-0.1.114/export-symbols
--- old/babl-0.1.112/export-symbols     2025-03-10 12:54:03.000000000 +0100
+++ new/babl-0.1.114/export-symbols     2025-05-08 11:48:33.000000000 +0200
@@ -66,6 +66,7 @@
 babl_type_new
 babl_trc
 babl_trc_gamma
+babl_trc_new
 babl_db_exist_by_name
 babl_db_find
 babl_db_init
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/extensions/gegl-fixups.c 
new/babl-0.1.114/extensions/gegl-fixups.c
--- old/babl-0.1.112/extensions/gegl-fixups.c   2025-03-10 12:54:03.000000000 
+0100
+++ new/babl-0.1.114/extensions/gegl-fixups.c   2025-05-08 11:48:33.000000000 
+0200
@@ -41,6 +41,7 @@
 
 #include <stdlib.h>
 #include <stdint.h>
+#include <string.h>
 
 #include "config.h"
 #include "babl.h"
@@ -510,7 +511,7 @@
 
   while (n--)
     {
-      *(unsigned int *) dst = (*(unsigned int *) src);
+      memcpy(src, dst, sizeof(unsigned int));
       src   += 4;
       dst   += 3;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/extensions/gggl-lies.c 
new/babl-0.1.114/extensions/gggl-lies.c
--- old/babl-0.1.112/extensions/gggl-lies.c     2025-03-10 12:54:03.000000000 
+0100
+++ new/babl-0.1.114/extensions/gggl-lies.c     2025-05-08 11:48:33.000000000 
+0200
@@ -249,15 +249,6 @@
 #define conv_gAF_gA8        conv_gaF_ga8
 
 static void
-conv_rgbaF_rgba16 (const Babl    *conversion,
-                   unsigned char *__restrict__ src, 
-                   unsigned char *__restrict__ dst, 
-                   long           samples)
-{
-  conv_F_16 (conversion, src, dst, samples * 4);
-}
-
-static void
 conv_rgbaF_rgbaD (const Babl    *conversion,
                   unsigned char *__restrict__ src, 
                   unsigned char *__restrict__ dst, 
@@ -961,11 +952,11 @@
   o (rgbAD, rgbAF);
   o (rgbaF, rgba8);
   o (rgba8, rgbaF);
-  o (rgbaF, rgba16);
+//  o (rgbaF, rgba16);
   o (rgba16, rgbaF);
   o (rgbAF, rgbA8);
   o (rgbA8, rgbAF);
-  o (rgbAF, rgbA16);
+//  o (rgbAF, rgbA16);
   o (rgbA16, rgbAF);
   o (rgbF, rgb8);
   o (rgb8, rgbF);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/extensions/gggl.c 
new/babl-0.1.114/extensions/gggl.c
--- old/babl-0.1.112/extensions/gggl.c  2025-03-10 12:54:03.000000000 +0100
+++ new/babl-0.1.114/extensions/gggl.c  2025-05-08 11:48:33.000000000 +0200
@@ -27,6 +27,7 @@
 #include <math.h>
 #include <string.h>
 #include <stdint.h>
+#include <string.h>
 
 #include "babl.h"
 #include "extensions/util.h"
@@ -923,9 +924,12 @@
                  long           samples)
 {
   long n = samples-1;
+  unsigned tmp;
   while (n--)
     {
-      *(unsigned int *) dst = (*(unsigned int *) src) | (255UL << 24);
+      memcpy(src, &tmp, sizeof(unsigned int));
+      tmp = tmp | (255UL << 24);
+      memcpy(&tmp, dst, sizeof(unsigned int));
       src   += 3;
       dst   += 4;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/extensions/simple.c 
new/babl-0.1.114/extensions/simple.c
--- old/babl-0.1.112/extensions/simple.c        2025-03-10 12:54:03.000000000 
+0100
+++ new/babl-0.1.114/extensions/simple.c        2025-05-08 11:48:33.000000000 
+0200
@@ -96,7 +96,7 @@
   while (n--)
     {
       float r = src[0];
-      dst[0] = (r >= 1.0f) ? 0xFFFF : ((r <= 0.0f) ? 0x0 : 0xFFFF * r + 0.5f);
+      dst[0] = (r >= 1.0f) ? 0xFFFF : ((r <= 0.0f) ? 0x0 : (0xFFFF * r + 
0.5f));
       dst += 1;
       src += 1;
     }
@@ -539,11 +539,13 @@
                       "linear", 
                        float_to_u16_x4,
                        NULL);
+  #if 0
   babl_conversion_new (babl_format ("RGBA float"),
                        babl_format ("RGBA u16"),
                       "linear", 
                        float_to_u16_x4,
                        NULL);
+  #endif
 
   babl_conversion_new (babl_format ("R'G'B' float"),
                        babl_format ("R'G'B' u16"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/git-version.h 
new/babl-0.1.114/git-version.h
--- old/babl-0.1.112/git-version.h      2025-03-10 12:54:16.210522000 +0100
+++ new/babl-0.1.114/git-version.h      2025-05-08 11:48:41.776769000 +0200
@@ -1,6 +1,6 @@
 #ifndef __BABL_GIT_VERSION_H__
 #define __BABL_GIT_VERSION_H__
 
-#define BABL_GIT_VERSION "BABL_0_1_110-7-g937c0a4"
+#define BABL_GIT_VERSION "BABL_0_1_112-24-gccc4c72"
 
 #endif /* __BABL_GIT_VERSION_H__ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/meson.build new/babl-0.1.114/meson.build
--- old/babl-0.1.112/meson.build        2025-03-10 12:54:03.000000000 +0100
+++ new/babl-0.1.114/meson.build        2025-05-08 11:48:33.000000000 +0200
@@ -1,7 +1,7 @@
 project('babl', 'c',
   license: 'LGPL3+',
-  version: '0.1.112',
-  meson_version: '>=0.55.0',
+  version: '0.1.114',
+  meson_version: '>=0.57.0',
   default_options: [
     'buildtype=debugoptimized'
   ],
@@ -173,12 +173,12 @@
 ]
 common_c_flags += cc.get_supported_arguments(extra_warnings_list)
 
-# Generate .pdb (CodeView) debug symbols (makes possible to debug with DIA SDK)
-#pdb_support = cc.has_argument('-gcodeview') and 
cc.has_link_argument('-Wl,--pdb=')
-#if platform_win32 and pdb_support
-#  common_c_flags += '-gcodeview'
-#  common_l_flags += '-Wl,--pdb='
-#endif
+# Generate native .pdb (CodeView) debug symbols (for DIA or DbgHelp debuggers 
and LLDB)
+pdb_support = cc.has_argument('-gcodeview') and 
cc.has_link_argument('-Wl,--pdb=')
+if platform_win32 and pdb_support
+  common_c_flags += '-gcodeview'
+  common_l_flags += '-Wl,--pdb='
+endif
 
 if platform_win32 and cc.get_id() == 'clang'
   # Optimize DWARF symbols to Dr. Mingw
@@ -397,7 +397,6 @@
 git_bin = find_program('git', required: false, native: true)
 
 # docs
-env_bin = find_program('env', required: false, native: true)
 rsvg_convert_bin = find_program('rsvg-convert', required: false,
   native: true)
 w3m_bin = find_program('w3m', required: false, native: true)
@@ -407,12 +406,8 @@
 # Build flags
 
 # Docs - don't build by default in cross-build environments
-#        can't build if no env binary
 build_docs = true
-if get_option('with-docs') != 'false' and not env_bin.found()
-  build_docs = false
-  warning('env is required to build documentation')
-elif get_option('with-docs') == 'auto'
+if get_option('with-docs') == 'auto'
   if meson.is_cross_build()
     build_docs = false
     message(
@@ -488,9 +483,8 @@
       [ 'ninja', 'git-version.h', ],
     )
     meson.add_dist_script(
-      [ 'sh', '-c', ' '.join(
-      [ 'cp', git_version_h.full_path(), '${MESON_DIST_ROOT}' ]
-      )]
+      python, '-c',
+      'from pathlib import Path; from shutil import copy2; import sys, os; 
target_dir = Path(os.environ.get("MESON_DIST_ROOT")); 
target_dir.mkdir(parents=True, exist_ok=True); copy2(sys.argv[1], target_dir)', 
git_version_h.full_path()
     )
   endif
 else
@@ -511,10 +505,10 @@
 # Install debug data (.pdb) on Windows
 # Ideally meson should take care of it automatically.
 # See: https://github.com/mesonbuild/meson/issues/12977
-#if platform_win32 and pdb_support
-#  install_win_debug_script = find_program('./meson_install_win_debug.sh')
-#  meson.add_install_script(install_win_debug_script)
-#endif
+if platform_win32 and pdb_support
+  install_win_debug_script = find_program('./meson_install_win_debug.py')
+  meson.add_install_script(install_win_debug_script)
+endif
 
 
################################################################################
 # Subdirs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/meson_install_win_debug.py 
new/babl-0.1.114/meson_install_win_debug.py
--- old/babl-0.1.112/meson_install_win_debug.py 1970-01-01 01:00:00.000000000 
+0100
+++ new/babl-0.1.114/meson_install_win_debug.py 2025-05-08 11:48:33.000000000 
+0200
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+import os
+import shutil
+import fnmatch
+
+for build_root, _, build_bins in os.walk(os.getenv("MESON_BUILD_ROOT")):
+  for file in build_bins:
+    if fnmatch.fnmatch(file, '*.dll') or fnmatch.fnmatch(file, '*.exe'):
+      build_bin = os.path.join(build_root, file)
+      installed_bin = None
+      for installed_root, _, installed_bins in 
os.walk(os.getenv("MESON_INSTALL_DESTDIR_PREFIX")):
+        if os.path.basename(build_bin) in installed_bins:
+          installed_bin = os.path.join(installed_root, 
os.path.basename(build_bin))
+          break
+      if installed_bin:
+        install_dir = os.path.dirname(installed_bin)
+        pdb_debug = os.path.splitext(build_bin)[0] + '.pdb'
+        print(f"Installing {pdb_debug} to {install_dir}")
+
+        # Clang correctly puts the .pdb along the $installed_bin
+        if os.path.isfile(pdb_debug):
+          if not os.getenv("MESON_INSTALL_DRY_RUN"):
+            shutil.copy2(pdb_debug, install_dir)
+        
+        # GCC dumbly puts the .pdb in $MESON_BUILD_ROOT
+        else:
+          if not os.getenv("MESON_INSTALL_DRY_RUN"):
+            for gcc_root, _, gcc_files in 
os.walk(os.getenv("MESON_BUILD_ROOT")):
+              for gcc_file in gcc_files:
+                if fnmatch.fnmatch(gcc_file, os.path.basename(pdb_debug)):
+                  shutil.copy2(os.path.join(gcc_root, gcc_file), install_dir)
+                  break
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/meson_install_win_debug.sh 
new/babl-0.1.114/meson_install_win_debug.sh
--- old/babl-0.1.112/meson_install_win_debug.sh 2025-03-10 12:54:03.000000000 
+0100
+++ new/babl-0.1.114/meson_install_win_debug.sh 1970-01-01 01:00:00.000000000 
+0100
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-find . \( -iname '*.dll' -or -iname '*.exe' \) | \
-while IFS= read -r build_bin;
-do
-  build_bin_name="${build_bin##*/}"
-  installed_bin=$(find ${MESON_INSTALL_DESTDIR_PREFIX} -iname 
"$build_bin_name")
-  if [ x"$installed_bin" != "x" ]; then
-    install_dir=$(dirname ${installed_bin})
-    pdb_debug=$(echo $build_bin|sed 's/\.\(dll\|exe\)$/.pdb/')
-    if [ -f "$pdb_debug" ]; then
-      # Note: meson hides script outputs anyway on success. But this can be
-      # useful when debugging.
-      echo Installing $pdb_debug to $install_dir
-      if [ -z "$MESON_INSTALL_DRY_RUN" ]; then
-        cp -f $pdb_debug $install_dir
-      fi
-    fi
-  fi
-done;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/meson_options.txt 
new/babl-0.1.114/meson_options.txt
--- old/babl-0.1.112/meson_options.txt  2025-03-10 12:54:03.000000000 +0100
+++ new/babl-0.1.114/meson_options.txt  2025-05-08 11:48:33.000000000 +0200
@@ -11,7 +11,7 @@
 )
 option('enable-vapi',
   type: 'boolean',
-  value: 'true', 
+  value: true, 
   description: 'Vala .vapi generation - depends on introspection'
 )
 option('gi-docgen',
@@ -23,38 +23,38 @@
 # Compiler extensions
 option('enable-mmx',
   type: 'boolean', 
-  value: 'true', 
+  value: true, 
   description: 'MMX support - disables all compiler extensons'
 )
 option('enable-sse',
   type: 'boolean',
-  value: 'true',
+  value: true,
   description: 'SSE support - depends on MMX'
 )
 option('enable-sse2',
   type: 'boolean',
-  value: 'true',
+  value: true,
   description: 'SSE2 support - depends on SSE'
 )
 option('enable-sse4_1',
   type: 'boolean',
-  value: 'true',
+  value: true,
   description: 'SSE4.1 support - depends on SSE2'
 )
 option('enable-avx2',
   type: 'boolean',
-  value: 'true',
+  value: true,
   description: 'AVX2 support - depends on SSE4.1'
 )
 option('enable-f16c',
   type: 'boolean',
-  value: 'true',
+  value: true,
   description: 'Hardware half-float support - depends on SSE'
 )
 
 # Optional dependencies
 option('with-lcms',
   type: 'boolean',
-  value: 'true', 
+  value: true, 
   description: 'build with lcms'
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/tests/common.inc 
new/babl-0.1.114/tests/common.inc
--- old/babl-0.1.112/tests/common.inc   2025-03-10 12:54:03.000000000 +0100
+++ new/babl-0.1.114/tests/common.inc   2025-05-08 11:48:33.000000000 +0200
@@ -17,7 +17,7 @@
       for (size_t c = 0; c < 
sizeof(expected_pix[i])/sizeof(expected_pix[i][0]); c++) \
       if (result[c] != expected_pix[i][c])       \
         {       \
-          printf (" %s failed #%li[%li]  got %i expected %i\n", test_name, i, 
c, result[c], expected_pix[i][c]);       \
+          printf (" %s failed #%zu[%zu]  got %i expected %i\n", test_name, i, 
c, result[c], expected_pix[i][c]);       \
           OK = 0;          \
           babl_introspect((Babl *)fish); \
         }       \
@@ -39,7 +39,7 @@
       for (size_t c = 0; c < 
sizeof(expected_pix[i])/sizeof(expected_pix[i][0]); c++) \
       if (fabs(result[c] - expected_pix[i][c]) > max_error)       \
         {       \
-          printf (" %s failed #%li[%li]  got %lf expected %lf\n", test_name, 
i, c, result[c], expected_pix[i][c]);       \
+          printf (" %s failed #%zu[%zu]  got %lf expected %lf\n", test_name, 
i, c, result[c], expected_pix[i][c]);       \
           OK = 0;          \
           babl_introspect((Babl *)fish); \
         }       \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/tests/meson.build 
new/babl-0.1.114/tests/meson.build
--- old/babl-0.1.112/tests/meson.build  2025-03-10 12:54:03.000000000 +0100
+++ new/babl-0.1.114/tests/meson.build  2025-05-08 11:48:33.000000000 +0200
@@ -25,6 +25,7 @@
   'transparent',
   'alpha_symmetric_transform',
   'types',
+  'trcs',
   'xyz_to_lab'
 ]
 if platform_unix
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/babl-0.1.112/tests/trcs.c 
new/babl-0.1.114/tests/trcs.c
--- old/babl-0.1.112/tests/trcs.c       1970-01-01 01:00:00.000000000 +0100
+++ new/babl-0.1.114/tests/trcs.c       2025-05-08 11:48:33.000000000 +0200
@@ -0,0 +1,94 @@
+#include "config.h"
+#include <math.h>
+#include "babl-internal.h"
+
+int OK = 1;
+
+int main (void)
+{
+  const Babl * trc;
+  babl_init ();
+
+  trc = babl_trc_new (NULL, BABL_TRC_FORMULA_GAMMA, 2.2, 0, NULL);
+  for (float a = 0.0f; a <= 1.0f; a+=0.1f)
+  {
+    float b = babl_trc_to_linear (trc, a);
+    float c = babl_trc_from_linear (trc, b);
+    if (fabsf (a-c) > 0.01)
+    {
+      OK = 0;
+      printf ("!!");
+    }
+    printf ("%s %f:%f:%f\n", babl_get_name (trc), a, b, c);
+  }
+
+  trc = babl_trc_new (NULL, BABL_TRC_FORMULA_GAMMA, 0.2, 0, NULL);
+  for (float a = 0.0f; a <= 1.0f; a+=0.1f)
+  {
+    float b = babl_trc_to_linear (trc, a);
+    float c = babl_trc_from_linear (trc, b);
+    if (fabsf (a-c) > 0.01)
+    {
+      OK = 0;
+      printf ("!!");
+    }
+    printf ("%s %f:%f:%f\n", babl_get_name (trc), a, b, c);
+  }
+
+  if(0){
+     /*
+         mostly symmetric, but fails on some of the low colors, test-case from 
#66
+
+discont 0.000000:0.000000:0.000000
+!!discont 0.025000:0.000000:0.000000
+!!discont 0.050000:0.000000:0.000000
+discont 0.075000:1.743565:0.075000
+discont 0.100000:3.392027:0.100000
+discont 0.125000:5.708076:0.125000
+discont 0.150000:8.752512:0.150000
+discont 0.175000:12.579302:0.175000
+discont 0.200000:17.237312:0.200000
+discont 0.225000:22.771437:0.225000
+discont 0.250000:29.223341:0.250000
+
+      */
+
+    float params[8] = {2.4, 255.0 / 15 / 1.055, 0.055 / 1.055, 0, 15.0/255, 0, 
0};
+    trc = babl_trc_new ("discont", BABL_TRC_FORMULA_SRGB, params[0], 0, 
params);
+    for (float a = 0.0f; a <= 1.0f; a+=0.025f)
+    {
+      float b = babl_trc_to_linear (trc, a);
+      float c = babl_trc_from_linear (trc, b);
+      if (fabsf (a-c) > 0.01)
+      {
+        OK = 0;
+        printf ("!!");
+      }
+      printf ("%s %f:%f:%f\n", babl_get_name (trc), a, b, c);
+    }
+  }
+
+
+  {
+    float params[8] = {2.4, 0.947, 0.052, 0.077, 0.040, 0, 0};
+    const Babl *srgb_trc = babl_trc ("sRGB");
+    trc = babl_trc_new ("fake-srgb", BABL_TRC_FORMULA_SRGB, params[0], 0, 
params);
+    for (float a = 0.0f; a <= 1.0f; a+=0.025f)
+    {
+      float b = babl_trc_to_linear (trc, a);
+      float c = babl_trc_from_linear (trc, b);
+
+      float d = babl_trc_to_linear (srgb_trc, a);
+      float e = babl_trc_from_linear (srgb_trc, d);
+      if (fabsf (a-c) > 0.01)
+      {
+        OK = 0;
+        printf ("!!");
+      }
+      printf ("%s %f:  %f:%f    %s  %f:%f    \n", babl_get_name (trc), a, b, 
c,  babl_get_name (srgb_trc),   d, e);
+    }
+  }
+  babl_exit ();
+
+  return !OK;
+}

Reply via email to