Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package babl for openSUSE:Factory checked in at 2026-04-25 21:35:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/babl (Old) and /work/SRC/openSUSE:Factory/.babl.new.11940 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "babl" Sat Apr 25 21:35:10 2026 rev:72 rq:1348796 version:0.1.126 Changes: -------- --- /work/SRC/openSUSE:Factory/babl/babl.changes 2026-03-22 14:11:24.199461641 +0100 +++ /work/SRC/openSUSE:Factory/.babl.new.11940/babl.changes 2026-04-25 21:35:12.844506667 +0200 @@ -1,0 +2,6 @@ +Mon Apr 20 18:34:41 UTC 2026 - Bjørn Lie <[email protected]> + +- Update to version 0.1.126: + + It is now possible to build with MSVC. + +------------------------------------------------------------------- Old: ---- babl-0.1.124.tar.xz New: ---- babl-0.1.126.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ babl.spec ++++++ --- /var/tmp/diff_new_pack.Lbs7br/_old 2026-04-25 21:35:13.504533524 +0200 +++ /var/tmp/diff_new_pack.Lbs7br/_new 2026-04-25 21:35:13.504533524 +0200 @@ -19,7 +19,7 @@ %define debug_package_requires libbabl-0_1-0 = %{version}-%{release} Name: babl -Version: 0.1.124 +Version: 0.1.126 Release: 0 Summary: Dynamic Pixel Format Translation Library License: GPL-3.0-or-later AND LGPL-3.0-or-later ++++++ babl-0.1.124.tar.xz -> babl-0.1.126.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/NEWS new/babl-0.1.126/NEWS --- old/babl-0.1.124/NEWS 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/NEWS 2026-04-09 20:58:59.000000000 +0200 @@ -4,6 +4,9 @@ --> +2026-04-09 babl-0.1.126 </dt><dd> +It is now possible to build with MSVC. + </dd><dt> 2026-03-10 babl-0.1.124 </dt><dd> DisplayP3 pre-defined colorspace, build and sanity improvements for CI and windows. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/babl/babl-extension.c new/babl-0.1.126/babl/babl-extension.c --- old/babl-0.1.124/babl/babl-extension.c 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/babl/babl-extension.c 2026-04-09 20:58:59.000000000 +0200 @@ -290,7 +290,8 @@ path = babl_strcat (path, entry); if ((extension = strrchr (entry, '.')) != NULL && - !strcmp (extension, SHREXT)) + !strcmp (extension, SHREXT) && + strncmp (entry, BABL_LIBRARY, strlen (BABL_LIBRARY))) { int excluded = 0; for (int i = 0; ctx->exclusion_patterns[i]; i++) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/babl/babl-fish-path.c new/babl-0.1.126/babl/babl-fish-path.c --- old/babl-0.1.124/babl/babl-fish-path.c 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/babl/babl-fish-path.c 2026-04-09 20:58:59.000000000 +0200 @@ -127,8 +127,13 @@ } } -#define BABL_LIKELY(x) __builtin_expect(!!(x), 1) -#define BABL_UNLIKELY(x) __builtin_expect(!!(x), 0) +#ifdef _MSC_VER + #define BABL_LIKELY(x) (x) + #define BABL_UNLIKELY(x) (x) +#else + #define BABL_LIKELY(x) __builtin_expect(!!(x), 1) + #define BABL_UNLIKELY(x) __builtin_expect(!!(x), 0) +#endif static float timings[256] = {0,}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/babl/babl-format.c new/babl-0.1.126/babl/babl-format.c --- old/babl-0.1.124/babl/babl-format.c 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/babl/babl-format.c 2026-04-09 20:58:59.000000000 +0200 @@ -21,7 +21,7 @@ #include <stdarg.h> #include <math.h> -#ifdef _WIN64 +#ifdef _WIN32 #include <basetsd.h> typedef SSIZE_T ssize_t; #endif @@ -36,6 +36,7 @@ babl_format_destruct (void *babl) { BablFormat *format = babl; + BablInstance *instance = babl; if (format->image_template != NULL) { babl_set_destructor (format->image_template, NULL); @@ -45,6 +46,11 @@ } if (format->from_list) babl_free (format->from_list); + if (instance->doc) + { + babl_free ((char*)instance->doc); + instance->doc = NULL; + } return 0; } @@ -270,9 +276,9 @@ int id = 0; int planar = 0; BablModel *model = (BablModel *)babl_model ("Y"); - BablComponent *component [components]; - BablSampling *sampling [components]; - const BablType *type [components]; + BablComponent **component = babl_malloc (sizeof (BablComponent *) * components); + BablSampling **sampling = babl_malloc (sizeof (BablSampling *) * components); + const BablType **type = babl_malloc (sizeof (const BablType *) * components); char *name = NULL; for (i = 0; i<components; i++) @@ -290,6 +296,9 @@ * returning the preexistent one instead. */ babl_free (name); + babl_free (component); + babl_free (sampling); + babl_free ((void *) type); return babl; } @@ -299,6 +308,9 @@ babl_space("sRGB"), component, sampling, type, NULL); + babl_free (component); + babl_free (sampling); + babl_free ((void *) type); babl_format_set_is_format_n (babl); babl_db_insert (db, babl); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/babl/babl-image.c new/babl-0.1.126/babl/babl-image.c --- old/babl-0.1.124/babl/babl-image.c 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/babl/babl-image.c 2026-04-09 20:58:59.000000000 +0200 @@ -107,10 +107,11 @@ case BABL_FORMAT: components = format->format.components; -#if 1 +#if defined(__GNUC__) || defined(__clang__) babl = __atomic_exchange_n (&format->format.image_template, NULL, __ATOMIC_ACQ_REL); #else + /* MSVC lacks the GCC atomic builtin used here; keep the fallback path. */ /* todo: add a configure check for the above gcc extension and use a mutex if we do not have it? */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/babl/babl.c new/babl-0.1.126/babl/babl.c --- old/babl-0.1.124/babl/babl.c 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/babl/babl.c 2026-04-09 20:58:59.000000000 +0200 @@ -114,12 +114,14 @@ if (_stricmp (sep2 + 1, "bin") == 0) { char* filename_tmp; + size_t tmp_size; + *(++sep2) = '\0'; - filename_tmp = babl_malloc (sizeof (char) * (strlen (filename) + - strlen (BABL_DIR_SEPARATOR BABL_LIBRARY) + 4)); - strcpy_s (filename_tmp, strlen(filename) + 1, filename); + tmp_size = strlen (filename) + strlen (BABL_DIR_SEPARATOR BABL_LIBRARY) + 4; + filename_tmp = babl_malloc (sizeof (char) * tmp_size); + strcpy_s (filename_tmp, tmp_size, filename); babl_free (filename); - strcat (filename_tmp, "lib" BABL_DIR_SEPARATOR BABL_LIBRARY); + strcat_s (filename_tmp, tmp_size, "lib" BABL_DIR_SEPARATOR BABL_LIBRARY); filename = filename_tmp; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/babl/base/babl-rgb-converter.c new/babl-0.1.126/babl/base/babl-rgb-converter.c --- old/babl-0.1.124/babl/base/babl-rgb-converter.c 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/babl/base/babl-rgb-converter.c 2026-04-09 20:58:59.000000000 +0200 @@ -201,7 +201,7 @@ uint8_t *rgb_in_u8 = (void*)src_char; uint8_t *rgb_out_u8 = (void*)dst_char; - float rgba_out[4*samples]; + float *rgba_out = babl_malloc (sizeof (float) * 4 * samples); for (i = 0; i < samples; i++) { @@ -221,6 +221,8 @@ rgb_out_u8[i*3+c] = rgba_out[i*4+c] * 255.0f; } + babl_free (rgba_out); + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/bin/babl.c new/babl-0.1.126/bin/babl.c --- old/babl-0.1.124/bin/babl.c 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/bin/babl.c 2026-04-09 20:58:59.000000000 +0200 @@ -68,6 +68,7 @@ if (argc == 1) { babl_cli_print_usage (stderr); + babl_exit (); return 2; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/extensions/gegl-fixups.c new/babl-0.1.126/extensions/gegl-fixups.c --- old/babl-0.1.124/extensions/gegl-fixups.c 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/extensions/gegl-fixups.c 2026-04-09 20:58:59.000000000 +0200 @@ -49,6 +49,12 @@ #include "base/util.h" #include "extensions/util.h" +#if defined(_MSC_VER) && !defined(__clang__) +#define BABL_ATTRIBUTE_UNUSED +#else +#define BABL_ATTRIBUTE_UNUSED __attribute__((unused)) +#endif + /* lookup tables used in conversion */ @@ -184,7 +190,7 @@ } -static inline void __attribute__((unused)) +static inline void BABL_ATTRIBUTE_UNUSED conv_8_F (const Babl *conversion, unsigned char *src, unsigned char *dst, @@ -233,7 +239,7 @@ } -static void __attribute__((unused)) +static void BABL_ATTRIBUTE_UNUSED conv_rgbaF_rgba8 (const Babl *conversion, unsigned char *src, unsigned char *dst, @@ -267,7 +273,7 @@ #define conv_rgbaF_rgbP8 conv_rgbaF_rgba8 -static void __attribute__((unused)) +static void BABL_ATTRIBUTE_UNUSED conv_rgbF_rgb8 (const Babl *conversion, unsigned char *src, unsigned char *dst, @@ -276,7 +282,7 @@ conv_F_8g (conversion, src, dst, samples * 3); } -static void __attribute__((unused)) +static void BABL_ATTRIBUTE_UNUSED conv_gaF_ga8 (const Babl *conversion, unsigned char *src, unsigned char *dst, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/git-version.h new/babl-0.1.126/git-version.h --- old/babl-0.1.124/git-version.h 2026-03-10 16:57:03.478251200 +0100 +++ new/babl-0.1.126/git-version.h 2026-04-09 20:59:19.212086200 +0200 @@ -1,6 +1,6 @@ #ifndef __BABL_GIT_VERSION_H__ #define __BABL_GIT_VERSION_H__ -#define BABL_GIT_VERSION "BABL_0_1_124" +#define BABL_GIT_VERSION "BABL_0_1_124-16-g1f819ad" #endif /* __BABL_GIT_VERSION_H__ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/meson.build new/babl-0.1.126/meson.build --- old/babl-0.1.124/meson.build 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/meson.build 2026-04-09 20:58:59.000000000 +0200 @@ -1,6 +1,6 @@ project('babl', 'c', license: 'LGPL3+', - version: '0.1.124', + version: '0.1.126', meson_version: '>=0.60.0', default_options: [ 'buildtype=debugoptimized' @@ -211,6 +211,12 @@ common_c_flags += ['/D_USE_MATH_DEFINES'] endif +if cc.get_id() == 'msvc' + common_c_flags += ['/std:c11'] + common_c_flags += ['/experimental:c11atomics'] + common_c_flags += ['/D__restrict__=__restrict'] +endif + add_project_arguments(common_c_flags, language: 'c') # Linker arguments @@ -469,12 +475,12 @@ # Build relocatable babl relocatable = false -if get_option('relocatable').auto() +if get_option('relocatable-bundle') == 'platform-default' if platform_win32 or platform_osx relocatable = true endif else - relocatable = get_option('relocatable').enabled() + relocatable = (get_option('relocatable-bundle') == 'yes') endif conf.set('ENABLE_RELOCATABLE', relocatable) @@ -575,6 +581,8 @@ subdir('bin') if not platform_osx and host_cpu_family != 'x86' + nm = find_program('nm', required: false) + # Verify .def files for Windows linking. # We check this on non-Windows platform on CI, and on Windows itself. custom_target('check-def-files', @@ -584,6 +592,7 @@ depends: [ babl ], + env: nm.found() ? { 'NM': nm.full_path() } : {}, output: [ 'check-def-files', ], command: [ python, meson.project_source_root() / 'tools' / 'defcheck.py', '@INPUT@', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/meson_install_win_debug.py new/babl-0.1.126/meson_install_win_debug.py --- old/babl-0.1.124/meson_install_win_debug.py 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/meson_install_win_debug.py 2026-04-09 20:58:59.000000000 +0200 @@ -17,7 +17,11 @@ build_installed = json.load(f) for build_bin, installed_bin in build_installed.items(): if build_bin.endswith((".dll", ".exe")): + #Clang generates the .pdb on binary build dir pdb_debug = os.path.splitext(build_bin)[0] + ".pdb" + #GCC generates the .pdb on build root dir + if not os.path.isfile(pdb_debug): + pdb_debug = os.path.join(os.getenv("MESON_BUILD_ROOT"), os.path.splitext(os.path.basename(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"): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/meson_options.txt new/babl-0.1.126/meson_options.txt --- old/babl-0.1.124/meson_options.txt 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/meson_options.txt 2026-04-09 20:58:59.000000000 +0200 @@ -25,8 +25,12 @@ value: 'native', description: 'Build with native/CodeView debug symbols or with DWARF' ) -option('relocatable', type: 'feature', value: 'auto', - description: 'build with resources considered bundled under the same prefix (auto: platform defaults)') + +option('relocatable-bundle', + type: 'combo', value: 'platform-default', + description: 'build with resources considered bundled under the same prefix', + choices: [ 'yes', 'no', 'platform-default' ] +) # Compiler extensions option('enable-mmx', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/tools/babl-benchmark.c new/babl-0.1.126/tools/babl-benchmark.c --- old/babl-0.1.124/tools/babl-benchmark.c 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/tools/babl-benchmark.c 2026-04-09 20:58:59.000000000 +0200 @@ -61,14 +61,26 @@ { double start = i * 1.0 / width; if (start < fraction) +#ifndef _WIN32 strcat (ret, block[8]); +#else + strcat_s (ret, sizeof(ret), block[8]); +#endif else { double miss = (start - fraction) * width; if (miss < 1.0) +#ifndef _WIN32 strcat (ret, block[(int)((1.0-miss) * 8.999)]); +#else + strcat_s (ret, sizeof(ret), block[(int)((1.0-miss) * 8.999)]); +#endif else +#ifndef _WIN32 strcat (ret, block[0]); +#else + strcat_s (ret, sizeof(ret), block[0]); +#endif } } return ret; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/babl-0.1.124/tools/defcheck.py new/babl-0.1.126/tools/defcheck.py --- old/babl-0.1.124/tools/defcheck.py 2026-03-10 16:56:45.000000000 +0100 +++ new/babl-0.1.126/tools/defcheck.py 2026-04-09 20:58:59.000000000 +0200 @@ -28,9 +28,9 @@ """ -import os, sys, subprocess, shutil +import os, sys, subprocess, shutil, glob -from os import path +from os import getenv, path def_files = sys.argv[1:] @@ -42,7 +42,7 @@ have_errors = 0 libextension = ".so" -command = "nm --defined-only --extern-only " +command = getenv("NM", default="nm") + " --defined-only --extern-only " libprefix = "lib" platform_linux = True @@ -59,6 +59,9 @@ basename, extension = name.split (".") libname = path.join(os.getcwd(), directory, libprefix + basename + "-*" + libextension) + matches = glob.glob(libname) + if matches: + libname = matches[0] #FIXME: This leaks to ninja stdout, which should not happen #print ("platform: " + sys.platform + " - extracting symbols from " + libname) @@ -85,6 +88,7 @@ status, nm = subprocess.getstatusoutput (command + libname) if status != 0: print("trouble reading {} - has it been compiled?".format(libname)) + print(nm) have_errors = -1 continue @@ -101,10 +105,13 @@ found = False nmsymbols = "" for s in objnm: - if s == " Ordinal RVA Name": + if "Ordinal Hint Name" in s or " Ordinal RVA Name" in s: found = True elif found: - nmsymbols += s + s = s.strip() + if not s: + break + nmsymbols += " 0 0 " + s.split()[-1] # Keep the [2::3] logic happy # else: skip this line else: # Windows MSVC
