Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions ports/babl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ vcpkg_extract_source_archive(
)

set(feature_options "")
set(debug_options "")
set(release_options "")
if("cmyk-icc" IN_LIST FEATURES)
list(APPEND feature_options "-Dwith-lcms=enabled")
else()
Expand All @@ -26,12 +24,6 @@ endif()

if("introspection" IN_LIST FEATURES)
list(APPEND feature_options "-Denable-gir=true")
if(VCPKG_TARGET_IS_WINDOWS)
# The Windows debug scanner path is currently brittle; generate the
# GIR/typelib from release only and package those artifacts.
list(APPEND debug_options "-Denable-gir=false")
list(APPEND release_options "-Denable-gir=true")
endif()
vcpkg_get_gobject_introspection_programs(PYTHON3 GIR_COMPILER GIR_SCANNER)
else()
list(APPEND feature_options "-Denable-gir=false")
Expand All @@ -42,10 +34,6 @@ vcpkg_configure_meson(
OPTIONS
${feature_options}
-Dwith-docs=false
OPTIONS_DEBUG
${debug_options}
OPTIONS_RELEASE
${release_options}
ADDITIONAL_BINARIES
"g-ir-compiler='${GIR_COMPILER}'"
"g-ir-scanner='${GIR_SCANNER}'"
Expand Down
2 changes: 1 addition & 1 deletion ports/babl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "babl",
"version": "0.1.126",
"port-version": 1,
"port-version": 2,
"description": "A pixel encoding and color space conversion engine.",
"homepage": "https://gegl.org/babl/",
"license": "LGPL-3.0-or-later",
Expand Down
38 changes: 38 additions & 0 deletions ports/gobject-introspection/gir-scanner-release-glib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py
index aadd6c9..df01bc8 100644
--- a/giscanner/sourcescanner.py
+++ b/giscanner/sourcescanner.py
@@ -26,6 +26,33 @@ from .ccompiler import CCompiler
from .utils import have_debug_flag, dll_dirs


+if os.name == 'nt':
+ # The _giscanner extension module is always a release build, linked against
+ # the release GLib DLLs. add_dll_dirs() below derives its DLL directories
+ # from gio-2.0.pc, so while a debug configuration is being scanned it points
+ # the loader at the debug GLib DLLs instead. Those are built against the
+ # debug CRT, and mixing both CRTs in one process kills the scanner with
+ # STATUS_STACK_BUFFER_OVERRUN. Load the release DLLs by full path first, so
+ # the loader reuses the already loaded modules instead of searching the
+ # debug directories.
+ def _preload_release_glib():
+ import ctypes
+ import glob
+
+ # <prefix>/lib/gobject-introspection/giscanner -> <prefix>/bin
+ bindir = os.path.abspath(
+ os.path.join(os.path.dirname(__file__), '..', '..', '..', 'bin'))
+ if not os.path.isdir(bindir):
+ return
+ for pattern in ('glib-2.0-*.dll', 'gobject-2.0-*.dll', 'gio-2.0-*.dll'):
+ for dll in glob.glob(os.path.join(bindir, pattern)):
+ try:
+ ctypes.WinDLL(dll)
+ except OSError:
+ pass
+
+ _preload_release_glib()
+
dlldirs = dll_dirs()
dlldirs.add_dll_dirs(['gio-2.0'])
from giscanner._giscanner import SourceScanner as CSourceScanner
1 change: 1 addition & 0 deletions ports/gobject-introspection/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vcpkg_extract_source_archive(
PATCHES
0001-g-ir-tool-template.in.patch
gir-scanner-runtime.diff
gir-scanner-release-glib.patch
# https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/575
setuptools-compat.patch
)
Expand Down
2 changes: 1 addition & 1 deletion ports/gobject-introspection/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gobject-introspection",
"version": "1.86.0",
"port-version": 2,
"port-version": 3,
"description": [
"A middleware layer between C libraries (using GObject) and language bindings.",
"Building (with) gobject-introspection is based on dynamic library linkage. Static builds of the core feature set are supported only for CI purposes.",
Expand Down
5 changes: 5 additions & 0 deletions versions/b-/babl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "13fdfa61959fe5346782e06c70408685cbdd40fa",
"version": "0.1.126",
"port-version": 2
},
{
"git-tree": "9bf6eefd4f512c818e8cb0a3c99325a827898ae1",
"version": "0.1.126",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@
},
"babl": {
"baseline": "0.1.126",
"port-version": 1
"port-version": 2
},
"backward-cpp": {
"baseline": "2023-11-24",
Expand Down Expand Up @@ -3538,7 +3538,7 @@
},
"gobject-introspection": {
"baseline": "1.86.0",
"port-version": 2
"port-version": 3
},
"godot-cpp": {
"baseline": "4.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/gobject-introspection.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8221aae6b4f2b5a4d71c9a2c5a38e3d97d91f39e",
"version": "1.86.0",
"port-version": 3
},
{
"git-tree": "ab81d4194cc3a975fd12793d4ca8893986702f5a",
"version": "1.86.0",
Expand Down
Loading