Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package babl for openSUSE:Factory checked in at 2025-10-08 18:12:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/babl (Old) and /work/SRC/openSUSE:Factory/.babl.new.11973 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "babl" Wed Oct 8 18:12:29 2025 rev:69 rq:1309399 version:0.1.116 Changes: -------- --- /work/SRC/openSUSE:Factory/babl/babl.changes 2025-05-23 14:29:41.566400276 +0200 +++ /work/SRC/openSUSE:Factory/.babl.new.11973/babl.changes 2025-10-08 18:12:41.737813038 +0200 @@ -1,0 +2,7 @@ +Mon Oct 6 13:38:57 UTC 2025 - Paolo Stivanin <[email protected]> + +- Update to 0.1.116: + * build process updates + * script cleanups + +------------------------------------------------------------------- Old: ---- babl-0.1.114.tar.xz New: ---- babl-0.1.116.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ babl.spec ++++++ --- /var/tmp/diff_new_pack.5GIdS0/_old 2025-10-08 18:12:43.485885999 +0200 +++ /var/tmp/diff_new_pack.5GIdS0/_new 2025-10-08 18:12:43.513887167 +0200 @@ -1,7 +1,7 @@ # # spec file for package babl # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %define debug_package_requires libbabl-0_1-0 = %{version}-%{release} Name: babl -Version: 0.1.114 +Version: 0.1.116 Release: 0 Summary: Dynamic Pixel Format Translation Library License: GPL-3.0-or-later AND LGPL-3.0-or-later ++++++ babl-0.1.114.tar.xz -> babl-0.1.116.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/.gitlab/check_dead_branches.sh new/babl-0.1.116/.gitlab/check_dead_branches.sh --- old/babl-0.1.114/.gitlab/check_dead_branches.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/babl-0.1.116/.gitlab/check_dead_branches.sh 2025-10-02 13:12:47.000000000 +0200 @@ -0,0 +1,42 @@ +#!/bin/sh + +printf "\e[0Ksection_start:`date +%s`:branch_check[collapsed=false]\r\e[0KChecking for dead branches\n" +git branch -r | grep -v 'origin/HEAD' | grep -v "origin/$CI_DEFAULT_BRANCH" | while IFS= read remote_branch; do + remote_branch=$(printf "%s\n" "$remote_branch" | sed 's/^ *//;s/ *$//') + branch_name=$(printf "%s\n" "$remote_branch" | sed 's|origin/||') + + # NOT CHECKING + ## Skip old stable branches + #if echo "$branch_name" | grep -q "PATTERN" || [ "$branch_name" = "NAME" ]; then + # printf "\033[33m(SKIP)\033[0m: $branch_name is a snapshot of $CI_DEFAULT_BRANCH but no problem\n" + # continue + #fi + ## Skip recently created branches + if [ "$(git rev-parse "$remote_branch")" = "$(git rev-parse "$CI_COMMIT_SHA")" ]; then + printf "\033[33m(SKIP)\033[0m: $branch_name is identical to $CI_DEFAULT_BRANCH but no problem\n" + continue + fi + + # CHECKING + ## Check: merge-base + if git merge-base --is-ancestor "$remote_branch" "$CI_COMMIT_SHA"; then + printf "\033[31m(ERROR)\033[0m: $branch_name is fully merged into $CI_DEFAULT_BRANCH (via git merge-base)\n" + touch 'dead_branch' + continue + fi + ## Fallback check: cherry + cherry_output=$(git cherry "$CI_COMMIT_SHA" "$remote_branch") + if [ -z "$(printf "%s\n" "$cherry_output" | grep '^+')" ]; then + printf "\033[31m(ERROR)\033[0m: $branch_name is fully merged into $CI_DEFAULT_BRANCH (via git cherry)\n" + touch 'dead_branch' + continue + fi +done + +if [ -f "dead_branch" ]; then + printf " Please delete the merged branches\n" + exit 1 +else + printf '(INFO): All branches are organized.\n' +fi +printf "\e[0Ksection_end:`date +%s`:branch_check\r\e[0K\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/.gitlab/run_meson_health_diff.sh new/babl-0.1.116/.gitlab/run_meson_health_diff.sh --- old/babl-0.1.114/.gitlab/run_meson_health_diff.sh 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/.gitlab/run_meson_health_diff.sh 2025-10-02 13:12:47.000000000 +0200 @@ -1,167 +1,218 @@ -#!/bin/bash +#!/bin/sh -source .gitlab/search-common-ancestor.sh +. .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 +# CHECK SCRIPTS RUNNED BY MESON (ALL OSes) +printf "\e[0Ksection_start:`date +%s`:nonunix_test[collapsed=false]\r\e[0KChecking for non-Unix compatibility\n" +diff=$(git diff -U0 --no-color "${newest_common_ancestor_sha}" \ + | awk ' + /^diff --git a\/.*\.(build|py)/ { + sub(/^diff --git a\//, "", $0) + sub(/ b\/.*$/, "", $0) + file = $0 + next + } + /^\+[^+]/ && file != "" { + print file ":" substr($0, 2) + } + ') + +## List of commonly used utilities on Unix world +## See the context: https://gitlab.gnome.org/GNOME/gimp/-/issues/11385 +coreutils_list=" + \.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_list; do if echo "$diff" | grep -q "$coreutil"; then - found_coreutils+=" $coreutil" + found_coreutils="$(echo "$found_coreutils $coreutil" | sed 's|\\||g')" 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}." + printf "$diff\n" + printf '\033[31m(ERROR)\033[0m: Seems that you are trying to add an Unix-specific dependency to be called by Meson.\n' + printf " Please, port to Python (which is crossplatform), your use of:${found_coreutils}.\n" fi - -#Limited list of commonly used utilities on Windows world -ntutils_array=( - ".bat" - ".cmd" - ".ps1" - "'cmd'" - "'powershell'" -) - -for ntutil in "${ntutils_array[@]}"; do +## Limited list of commonly used utilities on Windows world +ntutils_list=" + \.bat \ + \.cmd \ + \.ps1 \ + 'cmd' \ + 'powershell' +" +for ntutil in $ntutils_list; do if echo "$diff" | grep -q "$ntutil"; then - found_ntutils+=" $ntutil" + found_ntutils="$(echo "$found_ntutils $ntutil" | sed 's|\\||g')" 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}." + printf "$diff\n" + printf '\033[31m(ERROR)\033[0m: Seems that you are trying to add a NT-specific dependency to be called by Meson.\n' + printf " Please, port to Python (which is crossplatform), your use of:${found_ntutils}.\n" +fi + +if [ -z "$found_coreutils" ] && [ -z "$found_ntutils" ]; then + printf '(INFO): Meson .build and .py files are alright regarding being crossplatform.\n' +fi +printf "\e[0Ksection_end:`date +%s`:nonunix_test\r\e[0K\n" + + +# CHECK SCRIPTS NOT RUN BY MESON (UNIX ONLY) +# Shell scripts have potential portability issues if: +# 1) contain bash shebang or are called by bash; +# 2) contain bashisms. +printf "\e[0Ksection_start:`date +%s`:unix_test[collapsed=false]\r\e[0KChecking for Unix portability (optional)\n" +diff=$(git diff -U0 --no-color "${newest_common_ancestor_sha}" \ + | awk ' + /^diff --git a\// { + sub(/^diff --git a\//, "", $0) + sub(/ b\/.*$/, "", $0) + file = $0 + next + } + /^\+[^+]/ && file != "" { + print file ":" substr($0, 2) + } + ') + +## Check shebang and external call (1) +echo "$diff" | grep -E '#!\s*/usr/bin/env\s+bash|#!\s*/(usr/bin|bin)/bash(\s|$)' && found_bashism='extrinsic_bashism' +echo "$diff" | grep -E "bash\s+.*\.sh" && found_bashism='extrinsic_bashism' + +## Check content with shellcheck and checkbashisms (2) +for sh_script in $(find "$CI_PROJECT_DIR" -type d -name .git -prune -o -type f \( ! -name '*.ps1' ! -name '*.c' -exec grep -lE '^#!\s*/usr/bin/env\s+(sh|bash)|^#!\s*/(usr/bin|bin)/(sh|bash)(\s|$)' {} \; -o -name '*.sh' ! -exec grep -q '^#!' {} \; -print \)); do + shellcheck --severity=warning --shell=sh -x "$sh_script" | grep -v 'set option posix is' | grep -vE '.*http.*SC[0-9]+.*POSIX' | grep --color=always -B 2 -E 'SC[0-9]+.*POSIX' && found_bashism='intrinsic_bashism' + checkbashisms -f $sh_script || found_bashism='intrinsic_bashism' +done + +if [ "$found_bashism" ]; then + printf '\033[33m(WARNING)\033[0m: Seems that you added a Bash-specific code (aka "bashism").\n' + printf " It is recommended to make it POSIX-compliant (which is portable).\n" +else + printf '(INFO): Shell .sh files are alright regarding being portable.\n' fi +printf "\e[0Ksection_end:`date +%s`:unix_test\r\e[0K\n" -if [ "$found_coreutils" ] || [ "$found_ntutils" ]; then +if [ "$found_coreutils" ] || [ "$found_ntutils" ] || [ "$found_bashism" ]; 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.114/.gitlab/search-common-ancestor.sh new/babl-0.1.116/.gitlab/search-common-ancestor.sh --- old/babl-0.1.114/.gitlab/search-common-ancestor.sh 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/.gitlab/search-common-ancestor.sh 2025-10-02 13:12:47.000000000 +0200 @@ -1,6 +1,4 @@ -#!/bin/bash - -set -e +#!/bin/sh ancestor_horizon=28 # days (4 weeks) @@ -14,7 +12,7 @@ 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 +git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" upstream > ./fetch_upstream.log 2>&1 # 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 @@ -28,10 +26,12 @@ 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 +git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" patch-origin "${source_branch}" > ./fetch_origin.log 2>&1 -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 +git rev-list --first-parent "upstream/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}" > "temp_upstream" 2>&1 +git rev-list --first-parent "patch-origin/${source_branch}" > "temp_patch-origin" 2>&1 +newest_common_ancestor_sha=$(diff --old-line-format='' --new-line-format='' "temp_upstream" "temp_patch-origin" | head -n 1) +if [ -z "${newest_common_ancestor_sha}" ] || [ "${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." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/.gitlab-ci.yml new/babl-0.1.116/.gitlab-ci.yml --- old/babl-0.1.114/.gitlab-ci.yml 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/.gitlab-ci.yml 2025-10-02 13:12:47.000000000 +0200 @@ -1,11 +1,16 @@ -include: - - remote: 'https://gitlab.gnome.org/Infrastructure/freedesktop-ci-templates/-/raw/master/templates/fedora.yml' +workflow: + auto_cancel: + on_new_commit: interruptible -stages: - - "build docker" - - build -.fedora image: +include: + - project: Infrastructure/freedesktop-ci-templates + file: templates/fedora.yml + +.fedora: + extends: .fdo.distribution-image@fedora + interruptible: true + needs: ["docker-image"] variables: ### # IMPORTANT @@ -13,74 +18,58 @@ # 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_TAG: '2025-03-26.2' FDO_DISTRIBUTION_VERSION: '41' FDO_DISTRIBUTION_PACKAGES: > - git diffutils - FDO_UPSTREAM_REPO: gnome/babl + meson lcms2-devel git diffutils shellcheck devscripts + FDO_UPSTREAM_REPO: $CI_PROJECT_PATH + + +stages: + - dependencies + - build + - analysis -fedora image: - stage: "build docker" + +docker-image: extends: - - .fedora image + - .fedora - .fdo.container-build@fedora + needs: [] + stage: dependencies + variables: + GIT_STRATEGY: none -meson-health: - extends: - - .fedora image - - .fdo.distribution-image@fedora +fedora-x86_64: + extends: .fedora stage: build - needs: ["fedora image"] script: - - bash .gitlab/run_meson_health_diff.sh - + - meson --buildtype debug + --fatal-meson-warnings + --default-library=both + _build + - ninja -C _build + artifacts: + name: "babl-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" + when: always + paths: + - "_build/meson-logs" + expire_in: 8 days +meson-health: + extends: .fedora + stage: analysis + script: + - sh .gitlab/run_meson_health_diff.sh + allow_failure: true -#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: "" +branches-check: + extends: .fedora + rules: + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS == null && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH' + stage: analysis + variables: + GIT_DEPTH: "0" + script: + - sh .gitlab/check_dead_branches.sh + allow_failure: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/NEWS new/babl-0.1.116/NEWS --- old/babl-0.1.114/NEWS 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/NEWS 2025-10-02 13:12:47.000000000 +0200 @@ -3,6 +3,9 @@ the news section both in the README and the webpage. --> +2025-10-02 babl-0.1.116 </dt><dd> +Many improvements for MSVC, and meson cleanups. + </dd><dt> 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> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/babl/babl-cache.c new/babl-0.1.116/babl/babl-cache.c --- old/babl-0.1.114/babl/babl-cache.c 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/babl/babl-cache.c 2025-10-02 13:12:47.000000000 +0200 @@ -27,6 +27,19 @@ #include "git-version.h" #ifdef _WIN32 +#ifndef S_IRWXU + #define S_IRWXU 0000700 +#endif +#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG) + #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif +#if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR) + #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif +#define strtok_r strtok_s +#endif + +#ifdef _WIN32 #define FALLBACK_CACHE_PATH "C:/babl-fishes.txt" #else #define FALLBACK_CACHE_PATH "/tmp/babl-fishes.txt" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/babl/babl-extension.c new/babl-0.1.116/babl/babl-extension.c --- old/babl-0.1.114/babl/babl-extension.c 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/babl/babl-extension.c 2025-10-02 13:12:47.000000000 +0200 @@ -129,7 +129,9 @@ #include <dirent.h> #include <sys/types.h> #include <sys/stat.h> +#ifndef _WIN32 #include <unistd.h> +#endif #ifdef HAVE_DLFCN_H #ifndef WIN32 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/babl/babl-format.c new/babl-0.1.116/babl/babl-format.c --- old/babl-0.1.114/babl/babl-format.c 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/babl/babl-format.c 2025-10-02 13:12:47.000000000 +0200 @@ -21,6 +21,11 @@ #include <stdarg.h> #include <math.h> +#ifdef _WIN64 +#include <basetsd.h> +typedef SSIZE_T ssize_t; +#endif + #define NEEDS_BABL_DB #include "babl-internal.h" #include "babl-db.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/babl/babl-icc.c new/babl-0.1.116/babl/babl-icc.c --- old/babl-0.1.114/babl/babl-icc.c 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/babl/babl-icc.c 2025-10-02 13:12:47.000000000 +0200 @@ -21,6 +21,10 @@ #include <stdio.h> #include <stdlib.h> +#ifdef _WIN32 +#define strdup _strdup +#endif + typedef struct ICC { char *data; int length; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/babl/babl-internal.c new/babl-0.1.116/babl/babl-internal.c --- old/babl-0.1.114/babl/babl-internal.c 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/babl/babl-internal.c 2025-10-02 13:12:47.000000000 +0200 @@ -58,7 +58,12 @@ int babl_hmpf_on_name_lookups = 0; #include <sys/types.h> +#ifndef _WIN32 #include <unistd.h> +#else +#include <process.h> +#define getpid _getpid +#endif int babl_backtrack (void) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/babl/babl-util.c new/babl-0.1.116/babl/babl-util.c --- old/babl-0.1.114/babl/babl-util.c 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/babl/babl-util.c 2025-10-02 13:12:47.000000000 +0200 @@ -26,7 +26,7 @@ #include <sys/stat.h> #include "babl-internal.h" -#ifdef __WIN32__ +#ifdef _WIN32 #include <windows.h> #include <wchar.h> #else @@ -35,7 +35,7 @@ #include <dirent.h> #endif -#ifdef __WIN32__ +#ifdef _WIN32 static LARGE_INTEGER start_time; static LARGE_INTEGER timer_freq; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/babl/babl.c new/babl-0.1.116/babl/babl.c --- old/babl-0.1.114/babl/babl.c 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/babl/babl.c 2025-10-02 13:12:47.000000000 +0200 @@ -67,7 +67,7 @@ sep2 = strrchr (filename, BABL_DIR_SEPARATOR[0]); if (sep2 != NULL) { - if (strcasecmp (sep2 + 1, "bin") == 0) + if (_stricmp (sep2 + 1, "bin") == 0) { char* filename_tmp; *(++sep2) = '\0'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/babl/meson.build new/babl-0.1.116/babl/meson.build --- old/babl-0.1.114/babl/meson.build 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/babl/meson.build 2025-10-02 13:12:47.000000000 +0200 @@ -27,7 +27,7 @@ name: '-Wl,--version-script', args: ['-shared', '-Wl,--version-script=' + meson.current_source_dir() / 'test-gnu.map'] - ) + ) and cc.get_argument_syntax() != 'msvc' babl_link_args = [ '-Wl,--version-script=' + version_script[0].full_path() ] @@ -45,6 +45,10 @@ # Clang on msys/mingw babl_link_args = [] endif +elif cc.get_argument_syntax() == 'msvc' + babl_link_args = [ + '/VERSION:' + api_version + ] else error( 'Linker doesn\'t support --version-script or -exported_symbols_list' @@ -135,6 +139,7 @@ babl_sources, include_directories: babl_includes, c_args: babl_c_args, + vs_module_defs: meson.project_source_root() / 'export-symbols.def', link_whole: babl_base, link_args: babl_link_args, link_with: simd_extra, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/babl.pc.in new/babl-0.1.116/babl.pc.in --- old/babl-0.1.114/babl.pc.in 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/babl.pc.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: babl -Description: Dynamic, any to any, pixel format conversion library -Version: @BABL_REAL_VERSION@ -Cflags: -I${includedir}/@PACKAGE_NAME@-@BABL_API_VERSION@ -Libs: -L${libdir} -l@PACKAGE_NAME@-@BABL_API_VERSION@ -Libs.private: @MATH_LIB@ @THREAD_LIB@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/bin/babl.c new/babl-0.1.116/bin/babl.c --- old/babl-0.1.114/bin/babl.c 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/bin/babl.c 2025-10-02 13:12:47.000000000 +0200 @@ -29,9 +29,10 @@ #include <babl/babl.h> -static const Babl * babl_cli_get_space (const char *path, - BablIccIntent intent); -static void babl_cli_print_usage (FILE *stream); +static const Babl * babl_cli_get_space (const char *path, + BablIccIntent intent); +static void babl_cli_print_version (FILE *stream); +static void babl_cli_print_usage (FILE *stream); int @@ -141,6 +142,13 @@ return 0; } + else if (strcmp (argv[i], "--version") == 0 || + strcmp (argv[i], "-v") == 0) + { + babl_cli_print_version (stdout); + + return 0; + } else if (strcmp (argv[i], "--from") == 0 || strcmp (argv[i], "-f") == 0) { @@ -304,6 +312,11 @@ { /* Pass. */ } + else if (strcmp (argv[i], "--version") == 0 || + strcmp (argv[i], "-v") == 0) + { + /* Pass. */ + } else if (strcmp (argv[i], "--from") == 0 || strcmp (argv[i], "-f") == 0) { @@ -604,6 +617,14 @@ } static void +babl_cli_print_version (FILE *stream) +{ + fprintf (stream, + BABL_VERSION + "\n"); +} + +static void babl_cli_print_usage (FILE *stream) { fprintf (stream, @@ -613,6 +634,8 @@ " Options:\n" " -h, --help this help information\n" "\n" + " -v, --version Babl version\n" + "\n" " -f, --from input Babl format\n" "\n" " -t, --to output Babl format\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/build/archlinux/PKGBUILD new/babl-0.1.116/build/archlinux/PKGBUILD --- old/babl-0.1.114/build/archlinux/PKGBUILD 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/build/archlinux/PKGBUILD 1970-01-01 01:00:00.000000000 +0100 @@ -1,48 +0,0 @@ -# Maintainer: Alexander Hunziker <[email protected]> -# Contributor: Alessio Biancalana <[email protected]> -# Contributor: Massimiliano Torromeo <[email protected]> -# Contributor: Salamandar <[email protected]> - -_pkgname=babl -pkgname="${_pkgname}-git" -pkgver=0.1.38.23.g5aa4a51 -pkgrel=1 -pkgdesc="babl is a dynamic, any to any, pixel format translation library." -arch=('i686' 'x86_64') -url="https://www.gegl.org/babl" -license=('LGPL3') -depends=('glibc') -makedepends=('meson') -provides=("babl=${pkgver}") -conflicts=('babl') -options=(!libtool) -source=(git://git.gnome.org/babl) -md5sums=('SKIP') - -_gitname=babl - -build() { - mkdir "${srcdir}/build" -p - - meson "${srcdir}/${_gitname}"\ - "${srcdir}/build" \ - --prefix=/usr \ - -Dbuildtype=release \ - -Db_lto=true \ - -Dwith-docs=false - - ninja -C "${srcdir}/build" -} - -package() { - DESTDIR="${pkgdir}" ninja -C "${srcdir}/build" install -} - -pkgver() { - cd "${_gitname}" - git describe --always | sed -e 's/BABL_//g' -e 's/[_-]/./g' -} - -check() { - meson test -C "${srcdir}/build" -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/build/buildbot/suppressed-warnings.txt new/babl-0.1.116/build/buildbot/suppressed-warnings.txt --- old/babl-0.1.114/build/buildbot/suppressed-warnings.txt 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/build/buildbot/suppressed-warnings.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -# This is a 'suppressionFile' for the 'Test' buildbot build step - -# These doesn't seem like important warnings, we typically get them -# during make distcheck when the test install is performed -: ^libtool: install: warning: relinking `.*'$ -: ^libtool: install: warning: remember to run `libtool --finish .*_inst.*'$ - -# Comes from AM_PROG_LIBTOOL, not much we can do -: ^configure.ac:105: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body$ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/build/mingw/PKGBUILD new/babl-0.1.116/build/mingw/PKGBUILD --- old/babl-0.1.114/build/mingw/PKGBUILD 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/build/mingw/PKGBUILD 1970-01-01 01:00:00.000000000 +0100 @@ -1,49 +0,0 @@ -# Maintainer: Alexander Hunziker <[email protected]> -# Contributor: Alessio Biancalana <[email protected]> -# Contributor: Massimiliano Torromeo <[email protected]> -# Contributor: Salamandar <[email protected]> - -_pkgname=babl -pkgname="${MINGW_PACKAGE_PREFIX}-${_pkgname}-git" -pkgver=0.1.38.29.gd6e78b1 -pkgrel=1 -pkgdesc="babl is a dynamic, any to any, pixel format translation library." -arch=('i686' 'x86_64') -url="https://www.gegl.org/babl" -license=('LGPL3') -makedepends=( - "${MINGW_PACKAGE_PREFIX}-meson" -) -provides=("${MINGW_PACKAGE_PREFIX}-babl=${pkgver}") -conflicts=("${MINGW_PACKAGE_PREFIX}-babl") -options=(!libtool) -#source=(git://git.gnome.org/babl) -source=(git+https://github.com/salamandar/babl) -md5sums=('SKIP') -_gitname=babl - -build() { - mkdir "${srcdir}/build" -p - - meson "${srcdir}/${_gitname}"\ - "${srcdir}/build" \ - --prefix=/${MINGW_PREFIX} \ - --buildtype=release \ - -Db_lto=true \ - -Dwith-docs=false - - ninja -C "${srcdir}/build" -} - -package() { - DESTDIR="${pkgdir}" ninja -C "${srcdir}/build" install -} - -pkgver() { - cd "${_gitname}" - git describe --always | sed -e 's/BABL_//g' -e 's/[_-]/./g' -} - -check() { - meson test -C "${srcdir}/build" -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/export-symbols new/babl-0.1.116/export-symbols --- old/babl-0.1.114/export-symbols 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/export-symbols 1970-01-01 01:00:00.000000000 +0100 @@ -1,92 +0,0 @@ -babl_component -babl_component_new -babl_conversion_get_destination_space -babl_conversion_get_source_space -babl_conversion_new -babl_chromatic_adaptation_matrix -babl_cpu_accel_get_support -babl_exit -babl_fast_fish -babl_fish -babl_format -babl_format_exists -babl_format_get_bytes_per_pixel -babl_format_get_model -babl_format_get_n_components -babl_format_get_space -babl_format_get_type -babl_format_get_encoding -babl_format_has_alpha -babl_format_is_format_n -babl_format_is_palette -babl_format_n -babl_format_new -babl_format_with_space -babl_free -babl_get_model_flags -babl_get_name -babl_get_name -babl_get_user_data -babl_get_version -babl_init -babl_introspect -babl_malloc -babl_model -babl_model_is -babl_model_with_space -babl_model_new -babl_new_palette -babl_new_palette_with_space -babl_palette_reset -babl_palette_set_palette -babl_process -babl_process_rows -babl_sampling -babl_set_user_data -babl_space -babl_space_from_rgbxyz_matrix -babl_space_from_chromaticities -babl_space_from_icc -babl_space_get -babl_space_get_icc -babl_space_get_rgbtoxyz -babl_space_get_rgb_luminance -babl_space_to_xyz -babl_space_from_xyz -babl_space_to_icc -babl_space_with_trc -babl_space_is_cmyk -babl_space_is_gray -babl_space_is_rgb -babl_space_get_gamma -babl_icc_make_space -babl_icc_get_key -babl_ticks -babl_type -babl_type_new -babl_trc -babl_trc_gamma -babl_trc_new -babl_db_exist_by_name -babl_db_find -babl_db_init -babl_db_exist_by_id -babl_db_each -babl_formats_count -babl_format_class_for_each -babl_gc -babl_model_class_for_each -babl_type_class_for_each -babl_conversion_class_for_each -babl_set_extender -babl_extension_quiet_log -babl_fish_path -babl_fish_get_process -babl_extender -babl_class_name -babl_sanity -babl_type_is_symmetric -babl_model_is_symmetric -babl_fish_db -babl_polynomial_approximate_gamma -babl_backtrack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/export-symbols.def new/babl-0.1.116/export-symbols.def --- old/babl-0.1.114/export-symbols.def 1970-01-01 01:00:00.000000000 +0100 +++ new/babl-0.1.116/export-symbols.def 2025-10-02 13:12:47.000000000 +0200 @@ -0,0 +1,93 @@ +EXPORTS + babl_component + babl_component_new + babl_conversion_get_destination_space + babl_conversion_get_source_space + babl_conversion_new + babl_chromatic_adaptation_matrix + babl_cpu_accel_get_support + babl_exit + babl_fast_fish + babl_fish + babl_format + babl_format_exists + babl_format_get_bytes_per_pixel + babl_format_get_model + babl_format_get_n_components + babl_format_get_space + babl_format_get_type + babl_format_get_encoding + babl_format_has_alpha + babl_format_is_format_n + babl_format_is_palette + babl_format_n + babl_format_new + babl_format_with_space + babl_free + babl_get_model_flags + babl_get_name + babl_get_name + babl_get_user_data + babl_get_version + babl_init + babl_introspect + babl_malloc + babl_model + babl_model_is + babl_model_with_space + babl_model_new + babl_new_palette + babl_new_palette_with_space + babl_palette_reset + babl_palette_set_palette + babl_process + babl_process_rows + babl_sampling + babl_set_user_data + babl_space + babl_space_from_rgbxyz_matrix + babl_space_from_chromaticities + babl_space_from_icc + babl_space_get + babl_space_get_icc + babl_space_get_rgbtoxyz + babl_space_get_rgb_luminance + babl_space_to_xyz + babl_space_from_xyz + babl_space_to_icc + babl_space_with_trc + babl_space_is_cmyk + babl_space_is_gray + babl_space_is_rgb + babl_space_get_gamma + babl_icc_make_space + babl_icc_get_key + babl_ticks + babl_type + babl_type_new + babl_trc + babl_trc_gamma + babl_trc_new + babl_db_exist_by_name + babl_db_find + babl_db_init + babl_db_exist_by_id + babl_db_each + babl_formats_count + babl_format_class_for_each + babl_gc + babl_model_class_for_each + babl_type_class_for_each + babl_conversion_class_for_each + babl_set_extender + babl_extension_quiet_log + babl_fish_path + babl_fish_get_process + babl_extender + babl_class_name + babl_sanity + babl_type_is_symmetric + babl_model_is_symmetric + babl_fish_db + babl_polynomial_approximate_gamma + babl_backtrack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/extensions/gggl.c new/babl-0.1.116/extensions/gggl.c --- old/babl-0.1.114/extensions/gggl.c 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/extensions/gggl.c 2025-10-02 13:12:47.000000000 +0200 @@ -927,9 +927,9 @@ unsigned tmp; while (n--) { - memcpy(src, &tmp, sizeof(unsigned int)); + memcpy(&tmp, src, sizeof(unsigned int)); tmp = tmp | (255UL << 24); - memcpy(&tmp, dst, sizeof(unsigned int)); + memcpy(dst, &tmp, sizeof(unsigned int)); src += 3; dst += 4; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/extensions/meson.build new/babl-0.1.116/extensions/meson.build --- old/babl-0.1.114/extensions/meson.build 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/extensions/meson.build 2025-10-02 13:12:47.000000000 +0200 @@ -20,6 +20,9 @@ ] if platform_win32 babl_ext_link_args += no_undefined + if cc.get_argument_syntax() == 'msvc' + babl_ext_link_args += '/EXPORT:init' + endif endif autosimd_extensions = [ @@ -71,7 +74,7 @@ ] foreach ext : extensions - shared_library( + shared_module( ext[0], ext[0] + '.c', c_args: [ext[1], '-DBABL_SIMDFREE' ], @@ -88,7 +91,7 @@ if host_cpu_family == 'x86_64' foreach ext : autosimd_extensions - shared_library( + shared_module( 'x86-64-v2-' + ext[0], ext[0] + '.c', c_args: [ext[1]] + x86_64_v2_flags, @@ -103,7 +106,7 @@ endforeach foreach ext : autosimd_extensions - shared_library( + shared_module( 'x86-64-v3-' + ext[0], ext[0] + '.c', c_args: [ext[1]] + x86_64_v3_flags, @@ -121,7 +124,7 @@ foreach ext : autosimd_extensions - shared_library( + shared_module( 'arm-neon-' + ext[0], ext[0] + '.c', c_args: [ext[1]] + arm_neon_flags, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/gen_babl_map.py new/babl-0.1.116/gen_babl_map.py --- old/babl-0.1.114/gen_babl_map.py 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/gen_babl_map.py 2025-10-02 13:12:47.000000000 +0200 @@ -9,11 +9,15 @@ with open(export_symbols, 'r') as syms, \ open(version_file, 'w') as version: version.write("V0_1_0 {\n global:\n") + next(syms) for sym in syms: - version.write(" {};\n".format(sym.strip())) + final_sym = sym.replace(' ', '') + version.write(" {};\n".format(final_sym.strip())) version.write(" local:\n *;\n};\n") with open(export_symbols, 'r') as syms, \ open(version_file_clang, 'w') as version: + next(syms) for sym in syms: - version.write("_{}\n".format(sym.strip())) + final_sym = sym.replace(' ', '') + version.write("_{}\n".format(final_sym.strip())) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/git-version.h new/babl-0.1.116/git-version.h --- old/babl-0.1.114/git-version.h 2025-05-08 11:48:41.776769000 +0200 +++ new/babl-0.1.116/git-version.h 2025-10-02 13:13:34.441733600 +0200 @@ -1,6 +1,6 @@ #ifndef __BABL_GIT_VERSION_H__ #define __BABL_GIT_VERSION_H__ -#define BABL_GIT_VERSION "BABL_0_1_112-24-gccc4c72" +#define BABL_GIT_VERSION "BABL_0_1_116" #endif /* __BABL_GIT_VERSION_H__ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/meson.build new/babl-0.1.116/meson.build --- old/babl-0.1.114/meson.build 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/meson.build 2025-10-02 13:12:47.000000000 +0200 @@ -1,6 +1,6 @@ project('babl', 'c', license: 'LGPL3+', - version: '0.1.114', + version: '0.1.116', meson_version: '>=0.57.0', default_options: [ 'buildtype=debugoptimized' @@ -28,7 +28,7 @@ buildtype = get_option('buildtype') babl_prefix = get_option('prefix') -babl_libdir = join_paths(babl_prefix, get_option('libdir')) +babl_libdir = babl_prefix / get_option('libdir') project_build_root = meson.current_build_dir() project_source_root = meson.current_source_dir() @@ -163,6 +163,11 @@ ) +supress_warnings_list = [ + '-Wno-implicit-function-declaration', +] +common_c_flags += cc.get_supported_arguments(supress_warnings_list) + extra_warnings_list = [ '-Wdeclaration-after-statement', '-Winit-self', @@ -173,22 +178,46 @@ ] common_c_flags += cc.get_supported_arguments(extra_warnings_list) -# 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=' + +# DEBUG SYMBOLS +debugging_format = 'Disabled' +if get_option('buildtype') == 'debug' or get_option('buildtype') == 'debugoptimized' + if not platform_win32 + # DWARF symbols for GCC and LLDB on Unix + debugging_format = 'Native' + elif cc.get_argument_syntax() == 'msvc' + # CodeView symbols for DIA or DbgHelp debuggers and LLDB on Windows + debugging_format = 'Native' + elif platform_win32 and get_option('win-debugging') == 'native' and cc.has_argument('-gcodeview') and cc.has_link_argument('-Wl,--pdb=') and cc.get_id() == 'clang' + # CodeView symbols for DIA or DbgHelp debuggers and LLDB on Windows + debugging_format = 'Native' + common_c_flags += '-gcodeview' + common_l_flags += '-Wl,--pdb=' + else + # DWARF symbols for GCC and LLDB on Windows (fallback) + debugging_format = 'DWARF' + if cc.get_id() == 'clang' + # Optimize DWARF symbols to Dr. Mingw + # https://github.com/jrfonseca/drmingw/issues/42 + common_c_flags += '-gdwarf-aranges' + endif + endif endif + if platform_win32 and cc.get_id() == 'clang' - # Optimize DWARF symbols to Dr. Mingw - # https://github.com/jrfonseca/drmingw/issues/42 - common_c_flags += '-gdwarf-aranges' # Workaround to get colored output # https://github.com/msys2/MINGW-packages/issues/2988 common_c_flags += '-fansi-escape-codes' endif +if cc.get_argument_syntax() == 'msvc' + #Needed otherwise MSVC get angry with the headers provided by UCRT + common_c_flags += ['/D_USE_MATH_DEFINES'] + #Supress recommendations about Microsoft-specific safe functions + common_c_flags += ['/D_CRT_SECURE_NO_WARNINGS'] +endif + add_project_arguments(common_c_flags, language: 'c') # Linker arguments @@ -498,14 +527,14 @@ authors_file = files('AUTHORS') news_file = files('NEWS') todo_file = files('TODO') -export_symbols_file = files('export-symbols') +export_symbols_file = files('export-symbols.def') gen_babl_map_file = files('gen_babl_map.py') ################################################################################ # 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 +if platform_win32 and debugging_format == 'Native' and cc.get_argument_syntax() != 'msvc' install_win_debug_script = find_program('./meson_install_win_debug.py') meson.add_install_script(install_win_debug_script) endif @@ -592,6 +621,7 @@ 'gi-docgen' : build_gi_docgen, 'Introspection' : build_gir, 'VALA support' : build_vapi, + 'Debug symbols format' : debugging_format, }, section: 'Optional features' ) summary( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/meson_install_win_debug.py new/babl-0.1.116/meson_install_win_debug.py --- old/babl-0.1.114/meson_install_win_debug.py 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/meson_install_win_debug.py 2025-10-02 13:12:47.000000000 +0200 @@ -1,32 +1,25 @@ #!/usr/bin/env python3 import os import shutil -import fnmatch +import re +import sys +import json + +if not os.path.isfile("build.ninja"): + print("\033[31m(ERROR)\033[0m: Script called standalone. This script should be only called from build systems.") + sys.exit(1) -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 +# This .py script should not even exist +# Ideally meson should take care of it automatically. +# See: https://github.com/mesonbuild/meson/issues/12977 +with open("meson-info/intro-installed.json", "r") as f: + build_installed = json.load(f) +for build_bin, installed_bin in build_installed.items(): + if build_bin.endswith((".dll", ".exe")): + pdb_debug = os.path.splitext(build_bin)[0] + ".pdb" + install_dir = os.path.dirname(installed_bin) + if os.path.isfile(pdb_debug): + if not os.getenv("MESON_INSTALL_DRY_RUN"): + print(f"Installing {pdb_debug} to {install_dir}") + shutil.copy2(pdb_debug, install_dir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/meson_options.txt new/babl-0.1.116/meson_options.txt --- old/babl-0.1.114/meson_options.txt 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/meson_options.txt 2025-10-02 13:12:47.000000000 +0200 @@ -19,6 +19,12 @@ value: 'auto', description: 'Build developer documentation (uses gi-docgen)' ) +option('win-debugging', + type: 'combo', + choices: ['native', 'dwarf'], + value: 'native', + description: 'Build with native/CodeView debug symbols or with DWARF' +) # Compiler extensions option('enable-mmx', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/subprojects/.gitignore new/babl-0.1.116/subprojects/.gitignore --- old/babl-0.1.114/subprojects/.gitignore 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/subprojects/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -# Ignore all subdirectories -**/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/subprojects/lcms2.wrap new/babl-0.1.116/subprojects/lcms2.wrap --- old/babl-0.1.114/subprojects/lcms2.wrap 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/subprojects/lcms2.wrap 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -[wrap-file] -directory = Little-CMS-2.12 -source_url = https://github.com/mm2/Little-CMS/archive/refs/tags/2.12.tar.gz -source_filename = lcms2-2.12.tar.gz -source_hash = e501f1482fc424550ef3abbf86bf1c66090e1661249e89552d39ed5bf935df66 -patch_filename = lcms2_2.12-2_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/lcms2_2.12-2/get_patch -patch_hash = 3ac6944ac4b8d8507b85961d98cb287532945183d0e8f094c77810e793b6bebe - -[provide] -lcms2 = liblcms2_dep - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/tests/conversions.c new/babl-0.1.116/tests/conversions.c --- old/babl-0.1.114/tests/conversions.c 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/tests/conversions.c 2025-10-02 13:12:47.000000000 +0200 @@ -19,6 +19,10 @@ #include "config.h" #include "babl-internal.h" +#ifdef _WIN32 +#define putenv _putenv +#endif + static const struct { const char *from_format; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/tests/meson.build new/babl-0.1.116/tests/meson.build --- old/babl-0.1.114/tests/meson.build 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/tests/meson.build 2025-10-02 13:12:47.000000000 +0200 @@ -25,13 +25,13 @@ 'transparent', 'alpha_symmetric_transform', 'types', - 'trcs', 'xyz_to_lab' ] if platform_unix test_names += [ 'concurrency-stress-test', 'palette-concurrency-stress-test', + 'trcs', ] endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.114/tools/babl-verify.c new/babl-0.1.116/tools/babl-verify.c --- old/babl-0.1.114/tools/babl-verify.c 2025-05-08 11:48:33.000000000 +0200 +++ new/babl-0.1.116/tools/babl-verify.c 2025-10-02 13:12:47.000000000 +0200 @@ -13,6 +13,7 @@ * arg is ignored (i.e. same as always 1). */ #define setenv(name,value,overwrite) _putenv_s(name, value) +#define putenv _putenv #endif int
