diff --git a/ports/babl/msvc-restrict-compat.patch b/ports/babl/msvc-restrict-compat.patch new file mode 100644 index 00000000000000..fecdbf6ac95e7b --- /dev/null +++ b/ports/babl/msvc-restrict-compat.patch @@ -0,0 +1,210 @@ +diff --git a/babl/babl-extension.c b/babl/babl-extension.c +index 772cf60..45013a4 100644 +--- a/babl/babl-extension.c ++++ b/babl/babl-extension.c +@@ -290,7 +290,8 @@ dir_foreach (const char *base_path, + 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 --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c +index 5c03ea9..f436c9a 100644 +--- a/babl/babl-fish-path.c ++++ b/babl/babl-fish-path.c +@@ -127,8 +127,13 @@ babl_gc (void) + } + } + +-#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 --git a/babl/babl-format.c b/babl/babl-format.c +index df44b1f..f6d399e 100644 +--- a/babl/babl-format.c ++++ b/babl/babl-format.c +@@ -21,7 +21,7 @@ + #include + #include + +-#ifdef _WIN64 ++#ifdef _WIN32 + #include + typedef SSIZE_T ssize_t; + #endif +@@ -276,9 +276,9 @@ babl_format_n (const Babl *btype, + 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; iformat.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 --git a/babl/base/babl-rgb-converter.c b/babl/base/babl-rgb-converter.c +index 52f912d..3d89a2b 100644 +--- a/babl/base/babl-rgb-converter.c ++++ b/babl/base/babl-rgb-converter.c +@@ -201,7 +201,7 @@ universal_nonlinear_rgb_u8_converter (const Babl *conversion, + 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 @@ universal_nonlinear_rgb_u8_converter (const Babl *conversion, + rgb_out_u8[i*3+c] = rgba_out[i*4+c] * 255.0f; + } + ++ babl_free (rgba_out); ++ + } + + +diff --git a/extensions/gegl-fixups.c b/extensions/gegl-fixups.c +index e8fd785..ca3bbc1 100644 +--- a/extensions/gegl-fixups.c ++++ b/extensions/gegl-fixups.c +@@ -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 @@ conv_F_8g (const Babl *conversion, + } + + +-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 @@ conv_rgbaF_rgb8 (const Babl *conversion, + } + + +-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 @@ conv_rgbaF_rgba8 (const Babl *conversion, + + #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_rgbF_rgb8 (const Babl *conversion, + 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 --git a/meson.build b/meson.build +index a1b46c0..8d6d7b4 100644 +--- a/meson.build ++++ b/meson.build +@@ -209,6 +209,12 @@ 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'] + 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') +diff --git a/babl/babl.c b/babl/babl.c +--- a/babl/babl.c ++++ b/babl/babl.c +@@ -101,7 +101,7 @@ babl_dir_list (void) + babl_fatal ("Converting module filename to UTF-8 failed"); + + /* If the DLL file name is of the format +- * \bin\*.dll, use \lib\{BABL_LIBRARY}. ++ * \bin\*.dll, use \plugins\{BABL_LIBRARY}. + * Otherwise, use the directory where the DLL is. + */ + +@@ -119,7 +119,7 @@ babl_dir_list (void) + strlen (BABL_DIR_SEPARATOR BABL_LIBRARY) + 4)); + strcpy_s (filename_tmp, strlen(filename) + 1, filename); + babl_free (filename); +- strcat (filename_tmp, "lib" BABL_DIR_SEPARATOR BABL_LIBRARY); ++ strcat (filename_tmp, "plugins" BABL_DIR_SEPARATOR BABL_LIBRARY); + filename = filename_tmp; + } + } diff --git a/ports/babl/portfile.cmake b/ports/babl/portfile.cmake index a521b14b740ad0..730d5365d1ab3c 100644 --- a/ports/babl/portfile.cmake +++ b/ports/babl/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_extract_source_archive( SOURCE_PATH ARCHIVE "${ARCHIVE}" PATCHES + msvc-restrict-compat.patch remove-consistency-check.patch ) @@ -37,9 +38,22 @@ vcpkg_configure_meson( "g-ir-scanner='${GIR_SCANNER}'" ) vcpkg_install_meson() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/babl-${VERSION_MAJOR_MINOR}") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/plugins") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/babl-${VERSION_MAJOR_MINOR}" "${CURRENT_PACKAGES_DIR}/plugins/babl-${VERSION_MAJOR_MINOR}") +endif() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/babl-${VERSION_MAJOR_MINOR}") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/plugins") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/babl-${VERSION_MAJOR_MINOR}" "${CURRENT_PACKAGES_DIR}/debug/plugins/babl-${VERSION_MAJOR_MINOR}") +endif() + vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig() +vcpkg_copy_tools(TOOL_NAMES babl AUTO_CLEAN) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/ports/babl/vcpkg.json b/ports/babl/vcpkg.json index d8ac70183f20ef..b4e512169e9a57 100644 --- a/ports/babl/vcpkg.json +++ b/ports/babl/vcpkg.json @@ -1,10 +1,10 @@ { "name": "babl", "version": "0.1.124", + "port-version": 1, "description": "A pixel encoding and color space conversion engine.", "homepage": "https://gegl.org/babl/", "license": "LGPL-3.0-or-later", - "supports": "!windows | mingw", "dependencies": [ { "name": "vcpkg-tool-meson", @@ -20,6 +20,7 @@ }, "introspection": { "description": "Enable introspection", + "supports": "!windows | mingw", "dependencies": [ "gobject-introspection" ] diff --git a/ports/gegl/gegl-msvc-upstream.patch b/ports/gegl/gegl-msvc-upstream.patch new file mode 100644 index 00000000000000..d85b7b3499af2d --- /dev/null +++ b/ports/gegl/gegl-msvc-upstream.patch @@ -0,0 +1,614 @@ +diff --git a/gegl/graph/gegl-node.h b/gegl/graph/gegl-node.h +index a9d76e53f..9cd94c57ed 100644 +--- a/gegl/graph/gegl-node.h ++++ b/gegl/graph/gegl-node.h +@@ -112,27 +112,27 @@ GeglNode * gegl_node_new_child (GeglNode *parent, + * Returns TRUE if the connection was successfully made. + */ + +-gboolean gegl_node_connect_from (GeglNode *sink, ++G_DEPRECATED_FOR (gegl_node_connect or gegl_node_link if pads are "input" and "output") ++gboolean gegl_node_connect_from (GeglNode *sink, + const gchar *input_pad_name, + GeglNode *source, +- const gchar *output_pad_name) +-G_DEPRECATED_FOR (gegl_node_connect or gegl_node_link if pads are "input" and "output"); ++ const gchar *output_pad_name); + + /** + * gegl_node_connect_to: + * @source: the node producing data we want to connect. + * @output_pad_name: the output pad we want to use on the source. + * @sink: the node we're connecting an input to + * @input_pad_name: the name of the input pad we are connecting to + * + * Makes a connection between the pads of two nodes. + * + * Returns TRUE if the connection was successfully made. + */ +-gboolean gegl_node_connect_to (GeglNode *source, ++G_DEPRECATED_FOR (gegl_node_connect or gegl_node_link if pads are "output" and "input") ++gboolean gegl_node_connect_to (GeglNode *source, + const gchar *output_pad_name, + GeglNode *sink, +- const gchar *input_pad_name) +-G_DEPRECATED_FOR (gegl_node_connect or gegl_node_link if pads are "output" and "input"); ++ const gchar *input_pad_name); + + /** + * gegl_node_connect: + +diff --git a/gegl/buffer/gegl-algorithms-bilinear.inc b/gegl/buffer/gegl-algorithms-bilinear.inc +index 1beb569..7a139c0 100644 +--- a/gegl/buffer/gegl-algorithms-bilinear.inc ++++ b/gegl/buffer/gegl-algorithms-bilinear.inc +@@ -12,8 +12,8 @@ BILINEAR_FUNCNAME (guchar *dest_buf, + const gint ver = s_rowstride/(bpp/components); + const gint diag = ver + components; + +- gfloat dx[dst_rect->width]; +- gint jj[dst_rect->width]; ++ gfloat *dx = g_newa (gfloat, dst_rect->width); ++ gint *jj = g_newa (gint, dst_rect->width); + + for (gint x = 0; x < dst_rect->width; x++) + { +diff --git a/gegl/buffer/gegl-algorithms-boxfilter.inc b/gegl/buffer/gegl-algorithms-boxfilter.inc +index fd67dce..cda1141 100644 +--- a/gegl/buffer/gegl-algorithms-boxfilter.inc ++++ b/gegl/buffer/gegl-algorithms-boxfilter.inc +@@ -13,11 +13,11 @@ BOXFILTER_FUNCNAME (guchar *dest_buf, + const BOXFILTER_TYPE *src[9]; + gint components = bpp / sizeof(BOXFILTER_TYPE); + +- gfloat left_weight[dst_rect->width]; +- gfloat center_weight[dst_rect->width]; +- gfloat right_weight[dst_rect->width]; ++ gfloat *left_weight = g_newa (gfloat, dst_rect->width); ++ gfloat *center_weight = g_newa (gfloat, dst_rect->width); ++ gfloat *right_weight = g_newa (gfloat, dst_rect->width); + +- gint jj[dst_rect->width]; ++ gint *jj = g_newa (gint, dst_rect->width); + + for (gint x = 0; x < dst_rect->width; x++) + { +diff --git a/gegl/buffer/gegl-algorithms.c b/gegl/buffer/gegl-algorithms.c +index 176ba29..dd03994 100644 +--- a/gegl/buffer/gegl-algorithms.c ++++ b/gegl/buffer/gegl-algorithms.c +@@ -75,10 +75,10 @@ gegl_boxfilter_u8_nl (guchar *dest_buf, + const uint8_t *src[9]; + gint components = bpp / sizeof(uint8_t); + +- gfloat left_weight[dst_rect->width]; +- gfloat right_weight[dst_rect->width]; ++ gfloat *left_weight = g_newa (gfloat, dst_rect->width); ++ gfloat *right_weight = g_newa (gfloat, dst_rect->width); + +- gint jj[dst_rect->width]; ++ gint *jj = g_newa (gint, dst_rect->width); + + for (gint x = 0; x < dst_rect->width; x++) + { +@@ -238,10 +238,10 @@ gegl_boxfilter_u8_nl_alpha (guchar *dest_buf, + const uint8_t *src[9]; + gint components = bpp / sizeof(uint8_t); + +- gfloat left_weight[dst_rect->width]; +- gfloat right_weight[dst_rect->width]; ++ gfloat *left_weight = g_newa (gfloat, dst_rect->width); ++ gfloat *right_weight = g_newa (gfloat, dst_rect->width); + +- gint jj[dst_rect->width]; ++ gint *jj = g_newa (gint, dst_rect->width); + + for (gint x = 0; x < dst_rect->width; x++) + { +@@ -363,8 +363,8 @@ gegl_bilinear_u8_nl (guchar *dest_buf, + const gint src_y = src_rect->y; + const gint dst_width = dst_rect->width; + const gint dst_height = dst_rect->height; +- gfloat dx[dst_rect->width]; +- gint jj[dst_rect->width]; ++ gfloat *dx = g_newa (gfloat, dst_rect->width); ++ gint *jj = g_newa (gint, dst_rect->width); + + for (gint x = 0; x < dst_rect->width; x++) + { +@@ -501,8 +501,8 @@ gegl_bilinear_u8_nl_alpha (guchar *dest_buf, + const gint src_y = src_rect->y; + const gint dst_width = dst_rect->width; + const gint dst_height = dst_rect->height; +- gfloat dx[dst_rect->width]; +- gint jj[dst_rect->width]; ++ gfloat *dx = g_newa (gfloat, dst_rect->width); ++ gint *jj = g_newa (gint, dst_rect->width); + + for (gint x = 0; x < dst_rect->width; x++) + { +@@ -889,8 +889,8 @@ GEGL_SIMD_SUFFIX(gegl_resample_nearest) (guchar *dst, + const gdouble scale, + const gint bpp, + const gint dst_stride) + { +- gint jj[dst_rect->width]; ++ gint *jj = g_newa (gint, dst_rect->width); + gint x, y; + for (x = 0; x < dst_rect->width; x++) + { + +diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c +index c1cfb9f6c9..3a8f9b9d89 100644 +--- a/gegl/buffer/gegl-buffer-access.c ++++ b/gegl/buffer/gegl-buffer-access.c +@@ -1972,9 +1972,9 @@ gegl_buffer_set (GeglBuffer *buffer, + rowstride == babl_format_get_bytes_per_pixel (format)) + { + int bpp = babl_format_get_bytes_per_pixel (buffer->soft_format); +- uint8_t tmp[rect->height * bpp]; ++ uint8_t *tmp = g_newa (uint8_t, rect->height * bpp); + babl_process (babl_fish (format, buffer->soft_format), +- src, &tmp[0], rect->height); ++ src, tmp, rect->height); + _gegl_buffer_set_with_flags (buffer, rect, level, buffer->soft_format, tmp, bpp, + GEGL_BUFFER_SET_FLAG_LOCK| + GEGL_BUFFER_SET_FLAG_NOTIFY); +@@ -2071,12 +2071,12 @@ _gegl_buffer_get_unlocked (GeglBuffer *buffer, + { + /* first fetch all pixels to a temporary buffer */ + gint bpp = babl_format_get_bytes_per_pixel (buffer->soft_format); +- uint8_t tmp[rect->height * bpp]; +- gegl_buffer_iterate_read_dispatch (buffer, rect, &tmp[0], ++ uint8_t *tmp = g_newa (uint8_t, rect->height * bpp); ++ gegl_buffer_iterate_read_dispatch (buffer, rect, tmp, + bpp, buffer->soft_format, 0, repeat_mode); + /* then convert in a single shot */ + babl_process (babl_fish (buffer->soft_format, format), +- &tmp[0], dest_buf, rect->height); ++ tmp, dest_buf, rect->height); + } + } + return; +diff --git a/gegl/buffer/gegl-sampler-linear.c b/gegl/buffer/gegl-sampler-linear.c +index f8a6df8ab6..820b7edb63 100644 +--- a/gegl/buffer/gegl-sampler-linear.c ++++ b/gegl/buffer/gegl-sampler-linear.c +@@ -127,8 +127,8 @@ gegl_sampler_linear_interpolate ( GeglSampler *self, + /* + * Load top row: + */ +- gfloat top_left[nc]; +- gfloat top_rite[nc]; ++ gfloat *top_left = g_newa (gfloat, nc); ++ gfloat *top_rite = g_newa (gfloat, nc); + + for (gint c = 0; c < nc; c++) + top_left[c] = *in_bptr++; + +diff --git a/gegl/buffer/gegl-sampler-lohalo.c b/gegl/buffer/gegl-sampler-lohalo.c +index 0d0ebb41e1..3f5fc1250e 100644 +--- a/gegl/buffer/gegl-sampler-lohalo.c ++++ b/gegl/buffer/gegl-sampler-lohalo.c +@@ -504,7 +504,7 @@ gegl_sampler_lohalo_get ( GeglSampler* restrict self, + * The newval array will contain one computed resampled value per + * channel: + */ +- gfloat newval[channels]; ++ gfloat *newval = g_newa (gfloat, channels); + for (c = 0; c < channels-1; c++) + newval[c] = + extended_sigmoidal ( +@@ -954,11 +954,9 @@ gegl_sampler_lohalo_get ( GeglSampler* restrict self, + /* + * Storage for the EWA contribution: + */ +- gfloat ewa_newval[channels]; +- ewa_newval[0] = (gfloat) 0; +- ewa_newval[1] = (gfloat) 0; +- ewa_newval[2] = (gfloat) 0; +- ewa_newval[3] = (gfloat) 0; ++ gfloat *ewa_newval = g_newa (gfloat, channels); ++ for (gint c = 0; c < channels; c++) ++ ewa_newval[c] = (gfloat) 0; + + { + gint i = out_top_0; + +diff --git a/gegl/buffer/gegl-sampler-nohalo.c b/gegl/buffer/gegl-sampler-nohalo.c +index cab2390e2d..3a0d1ffd60 100644 +--- a/gegl/buffer/gegl-sampler-nohalo.c ++++ b/gegl/buffer/gegl-sampler-nohalo.c +@@ -1316,7 +1316,7 @@ gegl_sampler_nohalo_get ( GeglSampler* restrict self, + * The newval array will contain one computed resampled value per + * channel: + */ +- gfloat newval[channels]; ++ gfloat *newval = g_newa (gfloat, channels); + + { + /* +@@ -1878,7 +1878,7 @@ gegl_sampler_nohalo_get ( GeglSampler* restrict self, + /* + * Storage for the EWA contribution: + */ +- gfloat ewa_newval[channels]; ++ gfloat *ewa_newval = g_newa (gfloat, channels); + for (gint c = 0; c < channels; c++) + ewa_newval[c] = (gfloat) 0; + + +diff --git a/gegl/buffer/gegl-sampler.h b/gegl/buffer/gegl-sampler.h +index 39cd7a93f7..d807b0e257 100644 +--- a/gegl/buffer/gegl-sampler.h ++++ b/gegl/buffer/gegl-sampler.h +@@ -276,7 +276,7 @@ _gegl_sampler_box_get (GeglSampler* restrict self, + + if (u_norm2 >= 4.0 || v_norm2 >= 4.0) + { +- gfloat result[channels]; ++ gfloat *result = g_newa (gfloat, channels); + gdouble uv_samples_inv; + + for (gint c = 0; c < channels; c++) +@@ -355,7 +355,7 @@ _gegl_sampler_box_get (GeglSampler* restrict self, + for (u = 0; u < u_samples; u++) + { + int c; +- gfloat input[channels]; ++ gfloat *input = g_newa (gfloat, channels); + self->interpolate (self, x, y, input, repeat_mode); + for (c = 0; c < channels; c++) + result[c] += input[c]; + +diff --git a/gegl/opencl/gegl-cl-color.c b/gegl/opencl/gegl-cl-color.c +index ce0244c9df..2916b5a855 100644 +--- a/gegl/opencl/gegl-cl-color.c ++++ b/gegl/opencl/gegl-cl-color.c +@@ -70,7 +70,7 @@ gegl_cl_color_load_conversion_set (ColorConversionInfo *conversions, + GeglClRunData **kernels, + const gchar *source) + { +- const char *kernel_names[num_conversions + 1]; ++ const char **kernel_names = g_newa (const char *, num_conversions + 1); + + for (int i = 0; i < num_conversions; ++i) + { + +diff --git a/gegl/buffer/gegl-buffer-load.c b/gegl/buffer/gegl-buffer-load.c +index 0fcb72aa26..ca6c813796 100644 +--- a/gegl/buffer/gegl-buffer-load.c ++++ b/gegl/buffer/gegl-buffer-load.c +@@ -42,7 +42,7 @@ + + #ifdef _WIN32 + #define BINARY_FLAG O_BINARY +-#ifdef _WIN64 ++#ifdef _WIN32 + #include + typedef SSIZE_T ssize_t; + #endif + +diff --git a/gegl/buffer/gegl-buffer-save.c b/gegl/buffer/gegl-buffer-save.c +index f09015b1af..c3dd61939f 100644 +--- a/gegl/buffer/gegl-buffer-save.c ++++ b/gegl/buffer/gegl-buffer-save.c +@@ -44,7 +44,7 @@ + + #ifdef _WIN32 + #define BINARY_FLAG O_BINARY +-#ifdef _WIN64 ++#ifdef _WIN32 + #include + typedef SSIZE_T ssize_t; + #endif + +diff --git a/operations/common/gblur-1d.c b/operations/common/gblur-1d.c +index 1b67cb9dd4..164a9950a0 100644 +--- a/operations/common/gblur-1d.c ++++ b/operations/common/gblur-1d.c +@@ -330,7 +330,7 @@ fix_right_boundary_generic (gdouble *buf, + const gfloat *uplus, + const gint nc) + { +- gdouble u[nc*3]; ++ gdouble *u = g_newa (gdouble, nc * 3); + gint i, k, c; + + for (k = 0; k < 3; k++) +@@ -339,7 +339,7 @@ fix_right_boundary_generic (gdouble *buf, + + for (i = 0; i < 3; i++) + { +- gdouble tmp[nc]; ++ gdouble *tmp = g_newa (gdouble, nc); + for (c = 0; c < nc ; c++) + tmp[c] = m[i][0] * u[0 * nc + c]; + + +diff --git a/operations/common/watershed-transform.c b/operations/common/watershed-transform.c +index 8546abc9ce..810f9cf7f1 100644 +--- a/operations/common/watershed-transform.c ++++ b/operations/common/watershed-transform.c +@@ -363,7 +363,7 @@ process (GeglOperation *operation, + while (!HQ_is_empty (&hq)) + { + PixelCoords *p = (PixelCoords *) HQ_pop (&hq); +- guint8 label[bpp]; ++ guint8 *label = g_newa (guint8, bpp); + + GeglRectangle square_rect = {p->x - 1, p->y - 1, 3, 3}; + + +diff --git a/operations/common/map-common.h b/operations/common/map-common.h +index 6ede486cb7..2efb861135 100644 +--- a/operations/common/map-common.h ++++ b/operations/common/map-common.h +@@ -184,10 +184,10 @@ process (GeglOperation *operation, + else + { + gint stride = 2 * roi->width; +- gfloat coords_top[2 * roi->width]; +- gfloat coords_bottom[2 * roi->width]; +- gfloat coords_left[2 * roi->height]; +- gfloat coords_right[2 * roi->height]; ++ gfloat *coords_top = g_newa (gfloat, 2 * roi->width); ++ gfloat *coords_bottom = g_newa (gfloat, 2 * roi->width); ++ gfloat *coords_left = g_newa (gfloat, 2 * roi->height); ++ gfloat *coords_right = g_newa (gfloat, 2 * roi->height); + + gegl_buffer_get (aux, + GEGL_RECTANGLE (roi->x, roi->y - 1, + +diff --git a/operations/common/normal-map.c b/operations/common/normal-map.c +index f14cbf4c7c..3002fb6dfc 100644 +--- a/operations/common/normal-map.c ++++ b/operations/common/normal-map.c +@@ -145,10 +145,10 @@ process (GeglOperation *operation, + gfloat *out = iter->items[0].data; + const GeglRectangle *roi = &iter->items[0].roi; + gint stride = 2 * roi->width; +- gfloat top[2 * roi->width]; +- gfloat bottom[2 * roi->width]; +- gfloat left[2 * roi->height]; +- gfloat right[2 * roi->height]; ++ gfloat *top = g_newa (gfloat, 2 * roi->width); ++ gfloat *bottom = g_newa (gfloat, 2 * roi->width); ++ gfloat *left = g_newa (gfloat, 2 * roi->height); ++ gfloat *right = g_newa (gfloat, 2 * roi->height); + gint x; + gint y; + + + +diff --git a/gegl/property-types/gegl-color.c b/gegl/property-types/gegl-color.c +index 193ec597e5..8972b855a8 100644 +--- a/gegl/property-types/gegl-color.c ++++ b/gegl/property-types/gegl-color.c +@@ -45,7 +45,11 @@ struct _GeglColorPrivate + * be 16-byte aligned and would crash otherwise. + * See: https://gitlab.gnome.org/GNOME/gegl/-/merge_requests/142 + */ ++#ifdef _MSC_VER ++ __declspec(align(16)) guint8 pixel[48]; ++#else + guint8 pixel[48] __attribute__((aligned(16))); ++#endif + gdouble alignment; + }; + }; + +diff --git a/gegl/gegl.h b/gegl/gegl.h +index 6bd3324d61..536c835be0 100644 +--- a/gegl/gegl.h ++++ b/gegl/gegl.h +@@ -71,7 +71,11 @@ G_BEGIN_DECLS + * determine the smallest buffers needed at each stage of processing. + */ + ++#ifdef _MSC_VER ++#define GEGL_ALIGNED __restrict__ ++#else + #define GEGL_ALIGNED __restrict__ __attribute__((__aligned__ (16))) ++#endif + + G_END_DECLS + #endif /* __GEGL_H__ */ + + +diff --git a/meson.build b/meson.build +index 52817cdcb0..6bd0a93280 100644 +--- a/meson.build ++++ b/meson.build +@@ -245,6 +245,12 @@ if os_win32 + endif + endif #if os_win32 + ++build_ctx = cc.get_id() != 'msvc' ++ ++if cc.get_id() == 'msvc' ++ cflags_common += ['/D__restrict__=__restrict'] ++endif ++ + if buildtype == 'debugoptimized' or buildtype == 'release' + cflags_common += cc.get_supported_arguments(['-ftree-vectorize']) + endif +@@ -614,7 +616,11 @@ subdir('libs/rgbe') + subdir('opencl') + subdir('gegl') + subdir('libs/npd') +-subdir('libs/ctx') ++if build_ctx ++ subdir('libs/ctx') ++else ++ libgegl_ctx = declare_dependency() ++endif + + # pkg-config file + gegl_pub_deps = [ +@@ -640,7 +646,12 @@ pkgconfig.generate(gegl_lib, + subdirs: api_name, + ) + +-gegl_dep = declare_dependency(link_with: [gegl_lib, gegl_ctx_lib], ++gegl_link_with = [gegl_lib] ++if build_ctx ++ gegl_link_with += [gegl_ctx_lib] ++endif ++ ++gegl_dep = declare_dependency(link_with: gegl_link_with, + include_directories: geglInclude, + dependencies: [gegl_pub_deps, libnpd], + sources: g_ir.found() ? gegl_gir : [], + +diff --git a/operations/external/meson.build b/operations/external/meson.build +index 64c84e45b6..806bbd5fae 100644 +--- a/operations/external/meson.build ++++ b/operations/external/meson.build +@@ -3,12 +3,15 @@ operations = [ + { 'name': 'ppm-load' }, + { 'name': 'ppm-save' }, + { 'name': 'npy-save' }, +- { 'name': 'vector-fill', 'deps': libgegl_ctx }, + { 'name': 'rgbe-load', 'deps': librgbe }, + { 'name': 'rgbe-save', 'deps': librgbe }, + { 'name': 'gif-load', 'deps': libnsgif }, + ] + ++if build_ctx ++ operations += { 'name': 'vector-fill', 'deps': libgegl_ctx } ++endif ++ + + if pangocairo.found() + operations += { 'name': 'text', 'deps': pangocairo } + +diff --git a/operations/workshop/external/meson.build b/operations/workshop/external/meson.build +index 24a9cf4432..572a33d6e7 100644 +--- a/operations/workshop/external/meson.build ++++ b/operations/workshop/external/meson.build +@@ -118,11 +118,13 @@ if maxflow.found() + ) + endif + +-gegl_operations+=shared_library('ctx-script', +- 'ctx-script.c', include_directories: [rootInclude, geglInclude], +- dependencies:[babl,glib,gobject,math,libgegl_ctx], +- link_with:[gegl_lib], +- name_prefix:'', +- install:true, +- install_dir: get_option('libdir') / api_name, +-) ++if build_ctx ++ gegl_operations+=shared_library('ctx-script', ++ 'ctx-script.c', include_directories: [rootInclude, geglInclude], ++ dependencies:[babl,glib,gobject,math,libgegl_ctx], ++ link_with:[gegl_lib], ++ name_prefix:'', ++ install:true, ++ install_dir: get_option('libdir') / api_name, ++ ) ++endif + + +diff --git a/operations/common/long-shadow.c b/operations/common/long-shadow.c +index 6f98a90bd2..5171bb05c1 100644 +--- a/operations/common/long-shadow.c ++++ b/operations/common/long-shadow.c +@@ -41,6 +41,12 @@ enum_start (gegl_long_shadow_composition) + enum_value (GEGL_LONG_SHADOW_COMPOSITION_SHADOW_MINUS_IMAGE, "shadow-minus-image", N_("Shadow minus image")) + enum_end (GeglLongShadowComposition) + ++#ifdef WITH_FADING_FIXED_RATE ++#define GEGL_LONG_SHADOW_FIXED_RATE_SUFFIX ",fading-fixed-rate" ++#else ++#define GEGL_LONG_SHADOW_FIXED_RATE_SUFFIX "" ++#endif ++ + property_enum (style, _("Style"), + GeglLongShadowStyle, gegl_long_shadow_style, + GEGL_LONG_SHADOW_STYLE_FINITE) +@@ -56,12 +62,10 @@ property_double (length, _("Length"), 100.0) + description (_("Shadow length")) + value_range (0.0, G_MAXDOUBLE) + ui_range (0.0, 1000.0) +- ui_meta ("visible", "style {finite, " +- " fading-fixed-length" +-#ifdef WITH_FADING_FIXED_RATE +- " , fading-fixed-rate" +-#endif +- " }") ++ ui_meta ("visible", "style {finite, " ++ " fading-fixed-length" ++ GEGL_LONG_SHADOW_FIXED_RATE_SUFFIX ++ " }") + + property_double (midpoint, _("Midpoint"), 100.0) + description (_("Shadow fade midpoint")) +@@ -72,11 +76,9 @@ property_double (midpoint, _("Midpoint"), 100.0) + property_double (midpoint_rel, _("Midpoint (relative)"), 0.5) + description (_("Shadow fade midpoint, as a factor of the shadow length")) + value_range (0.0, 1.0) +- ui_meta ("visible", "style {fading-fixed-length" +-#ifdef WITH_FADING_FIXED_RATE +- " , fading-fixed-rate" +-#endif +- " }") ++ ui_meta ("visible", "style {fading-fixed-length" ++ GEGL_LONG_SHADOW_FIXED_RATE_SUFFIX ++ " }") + ui_meta ("label", "alt-label") + ui_meta ("alt-label", _("Midpoint")) + + + +diff --git a/operations/external/png-load.c b/operations/external/png-load.c +index a5e63ed3e2..9a364736ba 100644 +--- a/operations/external/png-load.c ++++ b/operations/external/png-load.c +@@ -19,6 +19,11 @@ + */ + + #include "config.h" ++ ++#ifndef __PRETTY_FUNCTION__ ++#define __PRETTY_FUNCTION__ __FUNCTION__ ++#endif ++ + #ifdef HAVE_STRPTIME + #define _XOPEN_SOURCE + #include + +diff --git a/operations/external/png-save.c b/operations/external/png-save.c +index 4cf914deda..ee6a7185ac 100644 +--- a/operations/external/png-save.c ++++ b/operations/external/png-save.c +@@ -18,6 +18,11 @@ + */ + + #include "config.h" ++ ++#ifndef __PRETTY_FUNCTION__ ++#define __PRETTY_FUNCTION__ __FUNCTION__ ++#endif ++ + #include + #include + + +diff --git a/operations/external/jpg-load.c b/operations/external/jpg-load.c +index 71db03e69d..de0374aa7b 100644 +--- a/operations/external/jpg-load.c ++++ b/operations/external/jpg-load.c +@@ -17,6 +17,11 @@ + */ + + #include "config.h" ++ ++#ifndef __PRETTY_FUNCTION__ ++#define __PRETTY_FUNCTION__ __FUNCTION__ ++#endif ++ + #include + + #ifdef GEGL_PROPERTIES diff --git a/ports/gegl/portfile.cmake b/ports/gegl/portfile.cmake index 9c218c6859b83d..e898c622244453 100644 --- a/ports/gegl/portfile.cmake +++ b/ports/gegl/portfile.cmake @@ -11,6 +11,8 @@ vcpkg_extract_source_archive( ARCHIVE "${ARCHIVE}" PATCHES disable_tests.patch + gegl-msvc-upstream.patch + use-plugins-dir.patch remove_execinfo_support.patch remove-consistency-check.patch ) @@ -69,6 +71,11 @@ vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig() +vcpkg_copy_tools( + TOOL_NAMES gegl gegl-imgcmp + AUTO_CLEAN +) + vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/gegl/use-plugins-dir.patch b/ports/gegl/use-plugins-dir.patch new file mode 100644 index 00000000000000..aefe12ff8ab797 --- /dev/null +++ b/ports/gegl/use-plugins-dir.patch @@ -0,0 +1,373 @@ +diff --git a/gegl/gegl-init.c b/gegl/gegl-init.c +index 9f47f88697..4c2d531c67 100644 +--- a/gegl/gegl-init.c ++++ b/gegl/gegl-init.c +@@ -745,7 +745,7 @@ gegl_get_default_module_paths(void) + } + #elif defined(G_OS_WIN32) + prefix = g_win32_get_package_installation_directory_of_module (hLibGeglModule); +- module_path = g_build_filename (prefix, "lib", GEGL_LIBRARY, NULL); ++ module_path = g_build_filename (prefix, "plugins", GEGL_LIBRARY, NULL); + g_free(prefix); + #else + #if defined(ENABLE_RELOCATABLE) +diff --git a/meson.build b/meson.build +index ec2b4aab93..50099afc81 100644 +--- a/meson.build ++++ b/meson.build +@@ -401,6 +401,8 @@ if cc.get_id() == 'msvc' + cflags_common += ['/D__restrict__=__restrict'] + endif + ++gegl_plugins_dir = 'plugins' / api_name ++ + if buildtype == 'debugoptimized' or buildtype == 'release' + cflags_common += cc.get_supported_arguments(['-ftree-vectorize']) + endif +@@ -637,7 +642,7 @@ pkgconfig.generate(gegl_lib, + name: 'GEGL', + description: 'Generic Graphics Library', + version: meson.project_version(), +- variables: 'pluginsdir=' + '${prefix}' / get_option('libdir') / api_name, ++ variables: 'pluginsdir=' + '${prefix}' / gegl_plugins_dir, + # gegl_npd_lib API is actually used by software, such as GIMP. It must + # not be removed, even though adding it like this is not so proper. If + # one wants to clean up this dependency, a proper port must be done +diff --git a/operations/common/meson.build b/operations/common/meson.build +index 2924984409..82df99e642 100644 +--- a/operations/common/meson.build ++++ b/operations/common/meson.build +@@ -152,7 +152,7 @@ gegl_common = shared_library('gegl-common', + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + + gegl_operations += gegl_common +@@ -167,7 +167,7 @@ if host_cpu_family == 'x86_64' + c_args: [ '-DGEGL_OP_BUNDLE' ] + x86_64_v2_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_common_x86_64_v2 + +@@ -179,7 +179,7 @@ if host_cpu_family == 'x86_64' + c_args: [ '-DGEGL_OP_BUNDLE' ] + x86_64_v3_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + + gegl_operations += gegl_common_x86_64_v3 +@@ -193,7 +193,7 @@ elif host_cpu_family == 'arm' + c_args: [ '-DGEGL_OP_BUNDLE' ] + arm_neon_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_common_arm_neon + endif +diff --git a/operations/common-cxx/meson.build b/operations/common-cxx/meson.build +index 146967faee..0b7db2b7cb 100644 +--- a/operations/common-cxx/meson.build ++++ b/operations/common-cxx/meson.build +@@ -35,7 +35,7 @@ gegl_common_cxx = shared_library('gegl-common-cxx', + cpp_args: [ '-DGEGL_OP_BUNDLE', ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + + gegl_operations += gegl_common_cxx +@@ -58,7 +58,7 @@ if host_cpu_family == 'x86_64' + cpp_args: [ '-DGEGL_OP_BUNDLE' ] + x86_64_v2_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_common_cxx_x86_64_v2 + +@@ -78,7 +78,7 @@ if host_cpu_family == 'x86_64' + cpp_args: [ '-DGEGL_OP_BUNDLE' ] + x86_64_v3_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_common_cxx_x86_64_v3 + +@@ -100,7 +100,7 @@ elif host_cpu_family == 'arm' + cpp_args: [ '-DGEGL_OP_BUNDLE' ] + arm_neon_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_common_cxx_arm_neon + +diff --git a/operations/common-gpl3+/meson.build b/operations/common-gpl3+/meson.build +index 0513fb44de..18956e1616 100644 +--- a/operations/common-gpl3+/meson.build ++++ b/operations/common-gpl3+/meson.build +@@ -78,7 +78,7 @@ gegl_common_gpl3 = shared_library('gegl-common-gpl3', + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + + gegl_operations += gegl_common_gpl3 +@@ -101,7 +101,7 @@ if host_cpu_family == 'x86_64' + c_args: [ '-DGEGL_OP_BUNDLE' ] + x86_64_v2_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_common_gpl3_x86_64_v2 + +@@ -121,7 +121,7 @@ if host_cpu_family == 'x86_64' + c_args: [ '-DGEGL_OP_BUNDLE' ] + x86_64_v3_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_common_gpl3_x86_64_v3 + +@@ -143,7 +143,7 @@ elif host_cpu_family == 'arm' + c_args: [ '-DGEGL_OP_BUNDLE' ] + arm_neon_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_common_gpl3_arm_neon + +diff --git a/operations/core/meson.build b/operations/core/meson.build +index ca9e72ccb1..0729f24b0b 100644 +--- a/operations/core/meson.build ++++ b/operations/core/meson.build +@@ -37,7 +37,7 @@ gegl_core = shared_library('gegl-core', + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + + gegl_operations += gegl_core +diff --git a/operations/external/meson.build b/operations/external/meson.build +index 5be962b7c9..7bcb31643c 100644 +--- a/operations/external/meson.build ++++ b/operations/external/meson.build +@@ -131,6 +131,6 @@ foreach operation : operations + link_with: [ gegl_lib, ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + endforeach +diff --git a/operations/generated/meson.build b/operations/generated/meson.build +index b2d0e82d26..66f73501db 100644 +--- a/operations/generated/meson.build ++++ b/operations/generated/meson.build +@@ -52,7 +52,7 @@ gegl_generated = shared_library('gegl-generated', + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + + gegl_operations += gegl_generated +@@ -67,7 +67,7 @@ if host_cpu_family == 'x86_64' + c_args: [ '-DGEGL_OP_BUNDLE' ] + x86_64_v2_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_generated_x86_64_v2 + +@@ -79,7 +79,7 @@ if host_cpu_family == 'x86_64' + c_args: [ '-DGEGL_OP_BUNDLE' ] + x86_64_v3_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_generated_x86_64_v3 + +@@ -93,7 +93,7 @@ elif host_cpu_family == 'arm' + c_args: [ '-DGEGL_OP_BUNDLE' ] + arm_neon_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_generated_arm_neon + +diff --git a/operations/json/meson.build b/operations/json/meson.build +index feab852ba4..ccccb956a5 100644 +--- a/operations/json/meson.build ++++ b/operations/json/meson.build +@@ -11,6 +11,6 @@ foreach _file : json_operations + output: _file, + copy: true, + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + endforeach +diff --git a/operations/seamless-clone/meson.build b/operations/seamless-clone/meson.build +index 47562a2e28..708ad1e28a 100644 +--- a/operations/seamless-clone/meson.build ++++ b/operations/seamless-clone/meson.build +@@ -21,6 +21,6 @@ foreach lib : seamless_clone_libs + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + endforeach +diff --git a/operations/transform/meson.build b/operations/transform/meson.build +index 110b28962c..33e2c0a635 100644 +--- a/operations/transform/meson.build ++++ b/operations/transform/meson.build +@@ -29,7 +29,7 @@ gegl_transformops = shared_library('transformops', + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + + gegl_operations += gegl_transformops +@@ -44,7 +44,7 @@ if host_cpu_family == 'x86_64' + c_args: x86_64_v2_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_transformops_x86_64_v2 + +@@ -56,7 +56,7 @@ if host_cpu_family == 'x86_64' + c_args: x86_64_v3_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_transformops_x86_64_v3 + +@@ -70,7 +70,7 @@ elif host_cpu_family == 'arm' + c_args: arm_neon_flags, + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + gegl_operations += gegl_transformops_arm_neon + +diff --git a/operations/workshop/external/meson.build b/operations/workshop/external/meson.build +index a1cf5450bb..f82d785df0 100644 +--- a/operations/workshop/external/meson.build ++++ b/operations/workshop/external/meson.build +@@ -14,7 +14,7 @@ gegl_operations += shared_library('voroni_diagram', + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + + +@@ -34,7 +34,7 @@ if lua.found() + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + endif + +@@ -54,7 +54,7 @@ if lensfun.found() + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + endif + +@@ -74,7 +74,7 @@ if cairo.found() + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + endif + +@@ -94,7 +94,7 @@ if libv4l2.found() + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + endif + +@@ -114,7 +114,7 @@ if maxflow.found() + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + endif + +@@ -125,6 +125,6 @@ if build_ctx + link_with:[gegl_lib], + name_prefix:'', + install:true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + endif +diff --git a/operations/workshop/generated/meson.build b/operations/workshop/generated/meson.build +index 318931d464..ffb3e942a7 100644 +--- a/operations/workshop/generated/meson.build ++++ b/operations/workshop/generated/meson.build +@@ -22,6 +22,6 @@ foreach lib : libraries + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) + endforeach +diff --git a/operations/workshop/meson.build b/operations/workshop/meson.build +index 6bb3046fe6..9c8594dc97 100644 +--- a/operations/workshop/meson.build ++++ b/operations/workshop/meson.build +@@ -46,5 +46,5 @@ gegl_workshop = shared_library('gegl-workshop', + ], + name_prefix: '', + install: true, +- install_dir: get_option('libdir') / api_name, ++ install_dir: gegl_plugins_dir, + ) diff --git a/ports/gegl/vcpkg.json b/ports/gegl/vcpkg.json index f44c55f5c03847..7e8351523e5c8c 100644 --- a/ports/gegl/vcpkg.json +++ b/ports/gegl/vcpkg.json @@ -1,10 +1,11 @@ { "name": "gegl", "version": "0.4.68", + "port-version": 1, "description": "Generic Graphical Library.", "homepage": "https://gegl.org/", "license": "LGPL-3.0-or-later", - "supports": "!windows | mingw", + "supports": "!(windows & arm64)", "dependencies": [ "babl", "json-glib", @@ -27,7 +28,7 @@ }, "introspection": { "description": "Enable introspection", - "supports": "!static", + "supports": "!static & (!windows | mingw)", "dependencies": [ { "name": "babl", diff --git a/ports/json-glib/portfile.cmake b/ports/json-glib/portfile.cmake index 3a904f6dec9f75..cbdb10ffe4699a 100644 --- a/ports/json-glib/portfile.cmake +++ b/ports/json-glib/portfile.cmake @@ -33,6 +33,14 @@ vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/include/json-glib-1.0/json-glib/json-version-macros.h" + "#include \"json-version.h\"\n\n#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(JSON_STATIC_BUILD)" + "#include \"json-version.h\"\n\n#define JSON_STATIC_BUILD 1\n\n#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(JSON_STATIC_BUILD)" + ) +endif() + vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSES/LGPL-2.1-or-later.txt" "${SOURCE_PATH}/LICENSES/CC0-1.0.txt" "${SOURCE_PATH}/LICENSES/MIT.txt") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/json-glib/vcpkg.json b/ports/json-glib/vcpkg.json index f9b702937a7068..6492ceda4e23f8 100644 --- a/ports/json-glib/vcpkg.json +++ b/ports/json-glib/vcpkg.json @@ -1,6 +1,7 @@ { "name": "json-glib", "version": "1.10.8", + "port-version": 1, "description": "Implements a full JSON parser and generator using GLib and GObject, and integrates JSON with GLib data types.", "homepage": "https://wiki.gnome.org/Projects/JsonGlib", "license": "LGPL-2.1-or-later AND CC0-1.0 AND MIT", diff --git a/versions/b-/babl.json b/versions/b-/babl.json index f05b59dad31a28..e24a2f21fc7068 100644 --- a/versions/b-/babl.json +++ b/versions/b-/babl.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b14b22d34c83cc0a3adda95630a98b5cda2e4e71", + "version": "0.1.124", + "port-version": 1 + }, { "git-tree": "712240fb456214b23808542557986b3787dcc174", "version": "0.1.124", diff --git a/versions/baseline.json b/versions/baseline.json index 7635cb30dfc2fb..7f3714b05a1b94 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -622,7 +622,7 @@ }, "babl": { "baseline": "0.1.124", - "port-version": 0 + "port-version": 1 }, "backward-cpp": { "baseline": "2023-11-24", @@ -3318,7 +3318,7 @@ }, "gegl": { "baseline": "0.4.68", - "port-version": 0 + "port-version": 1 }, "gemmlowp": { "baseline": "2021-09-28", @@ -4138,7 +4138,7 @@ }, "json-glib": { "baseline": "1.10.8", - "port-version": 0 + "port-version": 1 }, "json-rpc-cxx": { "baseline": "0.3.2", diff --git a/versions/g-/gegl.json b/versions/g-/gegl.json index 84b7b2144b1946..7648b857226c06 100644 --- a/versions/g-/gegl.json +++ b/versions/g-/gegl.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2723c271957bb4c970053f2796cefb1d8ba09d5e", + "version": "0.4.68", + "port-version": 1 + }, { "git-tree": "b956e19006098c3cc95946dcb8697736daaf3c5b", "version": "0.4.68", diff --git a/versions/j-/json-glib.json b/versions/j-/json-glib.json index 7ceb5e1118af92..a6a6c2fd37b15e 100644 --- a/versions/j-/json-glib.json +++ b/versions/j-/json-glib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e837ce2ceeeb439ad683e64bf45ff73950ce0f5f", + "version": "1.10.8", + "port-version": 1 + }, { "git-tree": "a643582cfcabca9b6d1abb46e821d123ddf3dca0", "version": "1.10.8",