[gobject-introspection] Add test port, revise (#43722)

Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>
This commit is contained in:
Kai Pastor 2025-05-09 15:47:19 +02:00 committed by GitHub
parent b8970ecfc8
commit 5618da41e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
38 changed files with 524 additions and 368 deletions

View File

@ -25,16 +25,11 @@ else()
endif()
if("introspection" IN_LIST FEATURES)
list(APPEND OPTIONS_RELEASE -Dintrospection=enabled)
vcpkg_get_gobject_introspection_programs(PYTHON3 GIR_COMPILER GIR_SCANNER)
else()
list(APPEND OPTIONS_RELEASE -Dintrospection=disabled)
endif()
set(GLIB_TOOLS_DIR "${CURRENT_HOST_INSTALLED_DIR}/tools/glib")
set(GIR_TOOLS_DIR "${CURRENT_HOST_INSTALLED_DIR}/tools/gobject-introspection")
if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(GIR_TOOLS_DIR "${CURRENT_INSTALLED_DIR}/tools/gobject-introspection")
endif()
vcpkg_configure_meson(
SOURCE_PATH
"${SOURCE_PATH}"
@ -47,12 +42,12 @@ vcpkg_configure_meson(
OPTIONS_DEBUG
-Dintrospection=disabled
ADDITIONAL_BINARIES
"glib-mkenums='${GLIB_TOOLS_DIR}/glib-mkenums'"
"glib-compile-resources='${GLIB_TOOLS_DIR}/glib-compile-resources${VCPKG_HOST_EXECUTABLE_SUFFIX}'"
"g-ir-compiler='${GIR_TOOLS_DIR}/g-ir-compiler${VCPKG_HOST_EXECUTABLE_SUFFIX}'"
"g-ir-scanner='${GIR_TOOLS_DIR}/g-ir-scanner'"
"glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'"
"glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources${VCPKG_HOST_EXECUTABLE_SUFFIX}'"
"g-ir-compiler='${GIR_COMPILER}'"
"g-ir-scanner='${GIR_SCANNER}'"
)
vcpkg_install_meson()
vcpkg_install_meson(ADD_BIN_TO_PATH)
vcpkg_copy_pdbs()

View File

@ -1,6 +1,7 @@
{
"name": "aravis",
"version": "0.8.34",
"port-version": 1,
"description": " A vision library for genicam based cameras.",
"homepage": "https://github.com/AravisProject/aravis",
"license": "LGPL-2.0-or-later",
@ -26,6 +27,7 @@
},
"introspection": {
"description": "Build introspection data",
"supports": "!static",
"dependencies": [
"gobject-introspection"
]

View File

@ -1,5 +1,3 @@
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.gnome.org/
OUT_SOURCE_PATH SOURCE_PATH
@ -10,31 +8,23 @@ vcpkg_from_gitlab(
)
if("introspection" IN_LIST FEATURES)
list(APPEND OPTIONS_DEBUG -Dintrospection=false)
list(APPEND OPTIONS_RELEASE -Dintrospection=true)
vcpkg_get_gobject_introspection_programs(PYTHON3 GIR_COMPILER GIR_SCANNER)
else()
list(APPEND OPTIONS -Dintrospection=false)
endif()
if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(GIR_TOOL_DIR ${CURRENT_INSTALLED_DIR})
else()
set(GIR_TOOL_DIR ${CURRENT_HOST_INSTALLED_DIR})
list(APPEND OPTIONS_RELEASE -Dintrospection=false)
endif()
vcpkg_configure_meson(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${OPTIONS}
OPTIONS_DEBUG
${OPTIONS_DEBUG}
OPTIONS_RELEASE
${OPTIONS_RELEASE}
OPTIONS_DEBUG
-Dintrospection=false
ADDITIONAL_BINARIES
"glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'"
"glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'"
"g-ir-compiler='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-compiler${VCPKG_HOST_EXECUTABLE_SUFFIX}'"
"g-ir-scanner='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-scanner'"
"g-ir-compiler='${GIR_COMPILER}'"
"g-ir-scanner='${GIR_SCANNER}'"
)
vcpkg_install_meson(ADD_BIN_TO_PATH)

View File

@ -1,13 +1,12 @@
{
"name": "atk",
"version": "2.38.0",
"port-version": 9,
"port-version": 10,
"description": "GNOME Accessibility Toolkit",
"homepage": "https://developer.gnome.org/atk/",
"license": "LGPL-2.0-or-later",
"supports": "!xbox",
"dependencies": [
"gettext",
{
"name": "gettext",
"host": true,
@ -16,6 +15,7 @@
"tools"
]
},
"gettext-libintl",
"glib",
{
"name": "glib",
@ -28,7 +28,8 @@
],
"features": {
"introspection": {
"description": "build with introspection",
"description": "Build with introspection",
"supports": "!static",
"dependencies": [
"gobject-introspection"
]

View File

@ -13,10 +13,10 @@ vcpkg_from_gitlab(
)
if("introspection" IN_LIST FEATURES)
list(APPEND OPTIONS_DEBUG -Dintrospection=disabled)
list(APPEND OPTIONS_RELEASE -Dintrospection=enabled)
vcpkg_get_gobject_introspection_programs(PYTHON3 GIR_COMPILER GIR_SCANNER)
else()
list(APPEND OPTIONS -Dintrospection=disabled)
list(APPEND OPTIONS_RELEASE -Dintrospection=disabled)
endif()
if("png" IN_LIST FEATURES)
@ -49,12 +49,6 @@ if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_WINDOWS)
list(APPEND OPTIONS -Drelocatable=true)
endif()
if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(GIR_TOOL_DIR ${CURRENT_INSTALLED_DIR})
else()
set(GIR_TOOL_DIR ${CURRENT_HOST_INSTALLED_DIR})
endif()
if(VCPKG_TARGET_IS_WINDOWS)
#list(APPEND OPTIONS -Dnative_windows_loaders=true) # Use Windows system components to handle BMP, EMF, GIF, ICO, JPEG, TIFF and WMF images, overriding jpeg and tiff. To build this into gdk-pixbuf, pass in windows" with the other loaders to build in or use "all" with the builtin_loaders option
endif()
@ -70,16 +64,16 @@ vcpkg_configure_meson(
-Dbuiltin_loaders=all # since it is unclear where loadable plugins should be located;
# Comma-separated list of loaders to build into gdk-pixbuf, or "none", or "all" to build all buildable loaders into gdk-pixbuf
${OPTIONS}
OPTIONS_DEBUG
${OPTIONS_DEBUG}
OPTIONS_RELEASE
${OPTIONS_RELEASE}
OPTIONS_DEBUG
-Dintrospection=disabled
ADDITIONAL_BINARIES
glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources'
glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
g-ir-compiler='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-compiler${VCPKG_HOST_EXECUTABLE_SUFFIX}'
g-ir-scanner='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-scanner'
"g-ir-compiler='${GIR_COMPILER}'"
"g-ir-scanner='${GIR_SCANNER}'"
)
vcpkg_install_meson(ADD_BIN_TO_PATH)

View File

@ -1,7 +1,7 @@
{
"name": "gdk-pixbuf",
"version": "2.42.12",
"port-version": 3,
"port-version": 4,
"description": "Image loading library.",
"homepage": "https://gitlab.gnome.org/GNOME/gdk-pixbuf",
"license": "LGPL-2.1-or-later",
@ -10,6 +10,7 @@
{
"name": "gettext",
"host": true,
"default-features": false,
"features": [
"tools"
]
@ -32,7 +33,8 @@
],
"features": {
"introspection": {
"description": "build with introspection",
"description": "Build with introspection",
"supports": "!static",
"dependencies": [
"gobject-introspection"
]

View File

@ -1,23 +1,61 @@
--- a/tools/g-ir-tool-template.in 2021-09-17 23:02:42.601052000 +0700
+++ b/tools/g-ir-tool-template.in 2021-12-29 21:41:52.987141900 +0700
@@ -59,7 +59,7 @@
builtins.__dict__['GIR_DIR'] = gir_dir
# Again, relative paths first so that the installation prefix is relocatable
-pylibdir = os.path.abspath(os.path.join(filedir, '..', 'lib', 'gobject-introspection'))
+pylibdir = os.path.abspath(os.path.join(filedir, '..', '..', 'lib', 'gobject-introspection'))
# EXT_SUFFIX for py3 SO for py2
py_mod_suffix = sysconfig.get_config_var('EXT_SUFFIX') or sysconfig.get_config_var('SO')
@@ -91,6 +91,11 @@
sys.path.insert(0, pylibdir)
+pkg_config_path = os.getenv('PKG_CONFIG_PATH', '')
+if pkg_config_path:
+ pkg_config_path = os.pathsep + pkg_config_path
+os.environ['PKG_CONFIG_PATH'] = os.path.normpath(os.path.join(pylibdir, '..', 'pkgconfig')) + pkg_config_path
+
from giscanner.utils import dll_dirs
dll_dirs = dll_dirs()
dll_dirs.add_dll_dirs(['gio-2.0'])
diff --git a/tools/g-ir-tool-template.in b/tools/g-ir-tool-template.in
index 469af0c..f165a98 100755
--- a/tools/g-ir-tool-template.in
+++ b/tools/g-ir-tool-template.in
@@ -1,4 +1,4 @@
-#!@PYTHON_CMD@
+#!/usr/bin/env python3
# -*- Mode: Python -*-
# GObject-Introspection - a framework for introspecting GObject libraries
# Copyright (C) 2008 Johan Dahlin
@@ -46,22 +46,20 @@ if debug:
filedir = os.path.dirname(__file__)
# Try using relative paths first so that the installation prefix is relocatable
-datadir = os.path.abspath(os.path.join(filedir, '..', 'share'))
+datadir = os.path.abspath(os.path.join(filedir, '..', '..', 'share'))
# Fallback to hard-coded paths if the relocatable paths are wrong
+datadir = os.getenv('VCPKG_GI_DATADIR', datadir)
if not os.path.isdir(os.path.join(datadir, 'gir-1.0')):
- datadir = "@datarootdir@"
+ raise Exception('Failed to determine datadir')
builtins.__dict__['DATADIR'] = datadir
-gir_dir = os.path.abspath(os.path.join(filedir, '..', '@gir_dir_prefix@', 'gir-1.0'))
-# Fallback to hard-coded paths if the relocatable paths are wrong
-if not os.path.isdir(gir_dir):
- gir_dir = "@GIR_DIR@"
+gir_dir = os.path.abspath(os.path.join(datadir, 'gir-1.0'))
builtins.__dict__['GIR_DIR'] = gir_dir
# Again, relative paths first so that the installation prefix is relocatable
-pylibdir = os.path.abspath(os.path.join(filedir, '..', 'lib', 'gobject-introspection'))
+pylibdir = os.path.abspath(os.path.join(filedir, '..', '..', 'lib', 'gobject-introspection'))
# EXT_SUFFIX for py3 SO for py2
py_mod_suffix = sysconfig.get_config_var('EXT_SUFFIX') or sysconfig.get_config_var('SO')
@@ -89,13 +87,19 @@ if not os.path.isfile(os.path.join(pylibdir, 'giscanner', '_giscanner' + py_mod_
gdump_path = os.path.join(builddir, 'giscanner', 'gdump.c')
if os.path.isfile(gdump_path):
builtins.__dict__['GDUMP_PATH'] = gdump_path
else:
- # Okay, we're not running uninstalled and the prefix is not
- # relocatable. Use hard-coded libdir.
- pylibdir = os.path.join('@libdir@', 'gobject-introspection')
+ raise Exception('Could not determine pylibdir')
sys.path.insert(0, pylibdir)
+vcpkg_gi_lib_path = os.getenv('VCPKG_GI_LIBDIR', None)
+vcpkg_gi_lib_path_var = os.getenv('VCPKG_GI_LIBDIR_VAR', None)
+if vcpkg_gi_lib_path_var is not None and vcpkg_gi_lib_path is not None:
+ ld_lib_path = os.getenv(vcpkg_gi_lib_path_var, '')
+ if ld_lib_path != '':
+ ld_lib_path = os.pathsep + ld_lib_path
+ os.environ[vcpkg_gi_lib_path_var] = vcpkg_gi_lib_path + ld_lib_path
+
from giscanner.utils import dll_dirs
dll_dirs = dll_dirs()
dll_dirs.add_dll_dirs(['gio-2.0'])

View File

@ -1,63 +0,0 @@
--- a/gir/meson.build 2021-09-17 23:02:42.502052000 +0700
+++ b/gir/meson.build 2022-01-05 02:31:25.960457800 +0700
@@ -42,7 +42,7 @@
install_data(installed_gir_files, install_dir: girdir)
scanner_command = [
- find_program('g-ir-scanner', native: true),
+ find_program('g-ir-scanner'),
'--output=@OUTPUT@',
'--no-libtool',
'--quiet',
@@ -495,6 +495,7 @@
)
typelibs = []
+gircompiler = find_program('g-ir-compiler')
if get_option('gi_cross_binary_wrapper') != ''
gircompiler_command = [get_option('gi_cross_binary_wrapper'), gircompiler.full_path(), ]
else
@@ -510,7 +511,7 @@
typelibs += custom_target(
input: gir.get('file'),
output: '@BASENAME@.typelib',
- depends: [gobject_gir, gircompiler, ],
+ depends: [gobject_gir, ],
command: gircompiler_command,
install: true,
install_dir: typelibdir,
--- a/tools/meson.build 2021-09-17 23:02:42.601052000 +0700
+++ b/tools/meson.build 2022-01-05 02:36:06.103763400 +0700
@@ -64,7 +64,9 @@
install: true,
c_args: custom_c_args,
)
-meson.override_find_program('g-ir-compiler', gircompiler)
+if not get_option('gi_cross_use_prebuilt_gi')
+ meson.override_find_program('g-ir-compiler', gircompiler)
+endif
girgenerate = executable('g-ir-generate', 'generate.c',
dependencies: [
@@ -74,14 +76,18 @@
install: true,
c_args: custom_c_args,
)
-meson.override_find_program('g-ir-generate', girgenerate)
+if not get_option('gi_cross_use_prebuilt_gi')
+ meson.override_find_program('g-ir-generate', girgenerate)
+endif
girinspect = executable('g-ir-inspect', 'g-ir-inspect.c',
dependencies: [
girepo_dep,
gio_dep,
],
install: true,
c_args: custom_c_args,
)
-meson.override_find_program('g-ir-inspect', girinspect)
+if not get_option('gi_cross_use_prebuilt_gi')
+ meson.override_find_program('g-ir-inspect', girinspect)
+endif
\ No newline at end of file

View File

@ -1,25 +0,0 @@
diff --git a/tools/g-ir-tool-template.in b/tools/g-ir-tool-template.in
index 75c35a7..499ed01 100644
--- a/tools/g-ir-tool-template.in
+++ b/tools/g-ir-tool-template.in
@@ -46,7 +46,7 @@ if debug:
filedir = os.path.dirname(__file__)
# Try using relative paths first so that the installation prefix is relocatable
-datadir = os.path.abspath(os.path.join(filedir, '..', 'share'))
+datadir = os.path.abspath(os.path.join(filedir, '..', '..', 'share'))
# Fallback to hard-coded paths if the relocatable paths are wrong
if not os.path.isdir(os.path.join(datadir, 'gir-1.0')):
datadir = "@datarootdir@"
@@ -53,10 +53,7 @@ builtins.__dict__['DATADIR'] = datadir
builtins.__dict__['DATADIR'] = datadir
-gir_dir = os.path.abspath(os.path.join(filedir, '..', '@gir_dir_prefix@', 'gir-1.0'))
-# Fallback to hard-coded paths if the relocatable paths are wrong
-if not os.path.isdir(gir_dir):
- gir_dir = "@GIR_DIR@"
+gir_dir = datadir
builtins.__dict__['GIR_DIR'] = gir_dir

View File

@ -1,6 +1,4 @@
# vcpkg_from_* is not used because the project uses submodules.
string(REGEX MATCH "^([0-9]*[.][0-9]*)" GI_MAJOR_MINOR "${VERSION}")
set(GI_PATCH 0)
string(REGEX REPLACE "^([0-9]+[.][0-9]+).*\$" "\\1" GI_MAJOR_MINOR "${VERSION}")
vcpkg_download_distfile(ARCHIVE
URLS "https://download.gnome.org/sources/gobject-introspection/${GI_MAJOR_MINOR}/gobject-introspection-${VERSION}.tar.xz"
@ -13,91 +11,98 @@ vcpkg_extract_source_archive(
ARCHIVE "${ARCHIVE}"
PATCHES
0001-g-ir-tool-template.in.patch
0002-cross-build.patch
0003-fix-paths.patch
0004-fastcall.patch # https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/498
)
vcpkg_find_acquire_program(FLEX)
vcpkg_find_acquire_program(BISON)
include("${CURRENT_PORT_DIR}/vcpkg-port-config.cmake")
vcpkg_get_gobject_introspection_programs(PYTHON3)
set(OPTIONS_DEBUG -Dbuild_introspection_data=false)
set(OPTIONS_RELEASE -Dbuild_introspection_data=true)
if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(PYTHON_DIR ${CURRENT_INSTALLED_DIR})
else()
set(PYTHON_DIR ${CURRENT_HOST_INSTALLED_DIR})
set(additional_binaries "")
set(options "")
set(options_release "")
if(VCPKG_CROSSCOMPILING)
# this is work in progress
list(APPEND OPTIONS_RELEASE -Dgi_cross_use_prebuilt_gi=true)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
message(STATUS "Static triplet. Not building introspection data.")
list(APPEND options_release -Dbuild_introspection_data=false)
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
endif()
find_file(INITIAL_PYTHON3
NAMES "python3${VCPKG_HOST_EXECUTABLE_SUFFIX}" "python${VCPKG_HOST_EXECUTABLE_SUFFIX}"
PATHS "${PYTHON_DIR}/tools/python3"
NO_DEFAULT_PATH
REQUIRED
)
x_vcpkg_get_python_packages(OUT_PYTHON_VAR PYTHON3
PYTHON_EXECUTABLE "${INITIAL_PYTHON3}"
PYTHON_VERSION "3"
PACKAGES setuptools
vcpkg_find_acquire_program(PKGCONFIG)
vcpkg_find_acquire_program(FLEX)
vcpkg_find_acquire_program(BISON)
list(APPEND additional_binaries
"flex='${FLEX}'"
"bison='${BISON}'"
)
if("cairo" IN_LIST FEATURES)
list(APPEND options_release -Dcairo=enabled)
else()
list(APPEND options_release -Dcairo=disabled)
endif()
vcpkg_configure_meson(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-Ddoctool=disabled
-Dgtk_doc=false
${options}
OPTIONS_DEBUG
${OPTIONS_DEBUG}
-Dbuild_introspection_data=false
-Dcairo=disabled
OPTIONS_RELEASE
${OPTIONS_RELEASE}
${options_release}
ADDITIONAL_BINARIES
flex='${FLEX}'
bison='${BISON}'
g-ir-annotation-tool='${CURRENT_HOST_INSTALLED_DIR}/tools/gobject-introspection/g-ir-annotation-tool'
g-ir-compiler='${CURRENT_HOST_INSTALLED_DIR}/tools/gobject-introspection/g-ir-compiler${VCPKG_HOST_EXECUTABLE_SUFFIX}'
g-ir-scanner='${CURRENT_HOST_INSTALLED_DIR}/tools/gobject-introspection/g-ir-scanner'
python='${PYTHON3}'
"python='${PYTHON3}'"
${additional_binaries}
)
vcpkg_host_path_list(APPEND ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig")
vcpkg_host_path_list(APPEND ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib")
set(ENV{PKG_CONFIG} "${PKGCONFIG}")
vcpkg_host_path_list(PREPEND ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig")
# VCPKG_GI_... variables are used by, and scoped to, giscanner
set(ENV{VCPKG_GI_LIBDIR} "${CURRENT_INSTALLED_DIR}/lib")
set(ENV{VCPKG_GI_DATADIR} "${CURRENT_PACKAGES_DIR}/share")
file(MAKE_DIRECTORY "$ENV{VCPKG_GI_DATADIR}/gir-1.0")
if(VCPKG_TARGET_IS_WINDOWS)
set(ENV{VCPKG_GI_LIBDIR_VAR} "LIB")
elseif(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS)
set(ENV{VCPKG_GI_LIBDIR_VAR} "DYLD_LIBRARY_PATH")
else()
set(ENV{VCPKG_GI_LIBDIR_VAR} "LD_LIBRARY_PATH")
endif()
vcpkg_install_meson(ADD_BIN_TO_PATH)
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
set(GI_TOOLS
g-ir-compiler
g-ir-generate
g-ir-inspect
)
set(GI_SCRIPTS
g-ir-annotation-tool
g-ir-scanner
)
# Cf. https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/517
if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/gir")
foreach(lib IN ITEMS GLib-2.0 GObject-2.0 GModule-2.0 Gio-2.0)
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/gir/${lib}.gir" DESTINATION "${CURRENT_PACKAGES_DIR}/share/gir-1.0")
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/gir/${lib}.typelib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/girepository-1.0")
endforeach()
endif()
vcpkg_copy_tools(TOOL_NAMES ${GI_TOOLS} AUTO_CLEAN)
foreach(script IN LISTS GI_SCRIPTS)
file(READ "${CURRENT_PACKAGES_DIR}/bin/${script}" _contents)
string(REPLACE "#!/usr/bin/env ${PYTHON3}" "#!/usr/bin/env python3" _contents "${_contents}")
string(REPLACE "datadir = \"${CURRENT_PACKAGES_DIR}/share\"" "raise Exception('could not find right path') " _contents "${_contents}")
string(REPLACE "pylibdir = os.path.join('${CURRENT_PACKAGES_DIR}/lib', 'gobject-introspection')" "raise Exception('could not find right path') " _contents "${_contents}")
file(WRITE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/${script}" "${_contents}")
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${script}")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
foreach(script IN ITEMS g-ir-annotation-tool g-ir-scanner)
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${script}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/${script}")
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${script}")
endforeach()
vcpkg_copy_tools(TOOL_NAMES g-ir-compiler g-ir-generate g-ir-inspect AUTO_CLEAN)
file(GLOB pcfiles "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/*.pc")
foreach(file IN LISTS pcfiles)
vcpkg_replace_string("${file}" [[=${bindir}/g-ir-]] [[=${prefix}/tools/gobject-introspection/g-ir-]])
endforeach()
# No fixup for debug: Let it fail early as long as we lack debug builds for (windows) python.
if(VCPKG_TARGET_IS_WINDOWS)
file(GLOB _pyd_lib_files "${CURRENT_PACKAGES_DIR}/lib/gobject-introspection/giscanner/_giscanner.*.lib")
file(GLOB _pyd_lib_files "${CURRENT_PACKAGES_DIR}/lib/gobject-introspection/giscanner/_giscanner.*.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/gobject-introspection/giscanner/_giscanner.*.lib")
file(REMOVE ${_pyd_lib_files})
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/${PORT}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/man")
file(COPY "${CURRENT_PORT_DIR}/vcpkg-port-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

View File

@ -0,0 +1,69 @@
include_guard(GLOBAL)
function(z_vcpkg_get_gobject_introspection_python out_var)
if(VCPKG_CROSSCOMPILING)
message(STATUS
"Cross build with gobject-introspection. "
"Building and using ${PORT} will fail if the host cannot execute target binaries."
)
endif()
set(target_python "${CURRENT_INSTALLED_DIR}/tools/python3/python3${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
if(VCPKG_TARGET_IS_WINDOWS)
set(target_python "${CURRENT_INSTALLED_DIR}/tools/python3/python.exe")
endif()
# Varation of x_vcpkg_get_python_packages, but
# - providing the interpreter for the target
# - using venv also for windows
message(STATUS "Setting up ${TARGET_TRIPLET} python venv which provides setuptools...")
set(venv_path "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-gir-venv")
file(REMOVE_RECURSE "${venv_path}")
file(MAKE_DIRECTORY "${venv_path}")
set(python_sub_path /bin)
set(python_venv_options --symlinks)
if(VCPKG_TARGET_IS_WINDOWS)
set(python_sub_path /Scripts)
set(python_venv_options --copies)
endif()
set(ENV{PYTHONNOUSERSITE} "1")
vcpkg_execute_required_process(
COMMAND "${target_python}" -I -m venv ${python_venv_options} "${venv_path}"
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
LOGNAME "venv-init-${TARGET_TRIPLET}"
)
set(gobject_introspection_python "${venv_path}${python_sub_path}/python${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
set(ENV{VIRTUAL_ENV} "${venv_path}")
unset(ENV{PYTHONHOME})
unset(ENV{PYTHONPATH})
vcpkg_execute_required_process(
COMMAND "${gobject_introspection_python}" -I -m pip install setuptools
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
LOGNAME "venv-install-setuptools-${TARGET_TRIPLET}"
)
message(STATUS "Finished (with ${out_var} at ${gobject_introspection_python})")
set("${out_var}" "${gobject_introspection_python}" PARENT_SCOPE)
endfunction()
function(vcpkg_get_gobject_introspection_programs)
if("PYTHON3" IN_LIST ARGN)
z_vcpkg_get_gobject_introspection_python(PYTHON3)
set(PYTHON3 "${PYTHON3}" PARENT_SCOPE)
list(REMOVE_ITEM ARGN "PYTHON3")
endif()
if("GIR_COMPILER" IN_LIST ARGN)
set(GIR_COMPILER "${CURRENT_INSTALLED_DIR}/tools/gobject-introspection/g-ir-compiler${VCPKG_TARGET_EXECUTABLE_SUFFIX}" PARENT_SCOPE)
list(REMOVE_ITEM ARGN "GIR_COMPILER")
endif()
if("GIR_SCANNER" IN_LIST ARGN)
set(GIR_SCANNER "${CURRENT_INSTALLED_DIR}/tools/gobject-introspection/g-ir-scanner" PARENT_SCOPE)
list(REMOVE_ITEM ARGN "GIR_SCANNER")
endif()
if(NOT ARGN STREQUAL "")
message(FATAL_ERROR "Unsupported arguments: ${ARGN}")
endif()
endfunction()

View File

@ -1,42 +1,37 @@
{
"name": "gobject-introspection",
"version": "1.82.0",
"description": "A middleware layer between C libraries (using GObject) and language bindings.",
"port-version": 1,
"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.",
"The g-ir-scanner program runs executables for the target system. This limits actual cross-build support to targets supported by the host CPU."
],
"homepage": "https://gi.readthedocs.io/en/latest/",
"license": null,
"supports": "!static & (native | (windows & x86))",
"supports": "!(static & staticcrt)",
"dependencies": [
{
"name": "cairo",
"default-features": false,
"features": [
"gobject"
]
},
"glib",
{
"name": "glib",
"host": true
},
{
"name": "gobject-introspection",
"host": true,
"platform": "!(windows & x86)"
},
"libffi",
"python3",
{
"name": "python3",
"host": true,
"platform": "!(windows & x86)"
},
{
"name": "vcpkg-get-python-packages",
"host": true
},
{
"name": "vcpkg-tool-meson",
"host": true
}
]
],
"features": {
"cairo": {
"description": "Install introspection data for cairo.",
"supports": "!static",
"dependencies": [
{
"name": "cairo",
"default-features": false,
"features": [
"gobject"
]
}
]
}
}
}

View File

@ -12,19 +12,10 @@ vcpkg_extract_source_archive(
)
if("introspection" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
message(FATAL_ERROR "Feature introspection currently only supports dynamic build.")
endif()
list(APPEND OPTIONS_DEBUG -Dintrospection=disabled)
list(APPEND OPTIONS_RELEASE -Dintrospection=enabled)
vcpkg_get_gobject_introspection_programs(PYTHON3 GIR_COMPILER GIR_SCANNER)
else()
list(APPEND OPTIONS -Dintrospection=disabled)
endif()
if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(GIR_TOOL_DIR ${CURRENT_INSTALLED_DIR})
else()
set(GIR_TOOL_DIR ${CURRENT_HOST_INSTALLED_DIR})
list(APPEND OPTIONS_RELEASE -Dintrospection=disabled)
endif()
vcpkg_configure_meson(
@ -35,15 +26,15 @@ vcpkg_configure_meson(
-Dtests=false
-Dinstalled_tests=false
${OPTIONS}
OPTIONS_DEBUG
${OPTIONS_DEBUG}
OPTIONS_RELEASE
${OPTIONS_RELEASE}
OPTIONS_DEBUG
-Dintrospection=disabled
ADDITIONAL_BINARIES
glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
g-ir-compiler='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-compiler${VCPKG_HOST_EXECUTABLE_SUFFIX}'
g-ir-scanner='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-scanner'
"g-ir-compiler='${GIR_COMPILER}'"
"g-ir-scanner='${GIR_SCANNER}'"
)
vcpkg_install_meson(ADD_BIN_TO_PATH)

View File

@ -1,12 +1,20 @@
{
"name": "graphene",
"version": "1.10.8",
"port-version": 4,
"port-version": 5,
"description": "A thin layer of types for graphic libraries.",
"homepage": "https://www.gtk.org/",
"license": "MIT",
"dependencies": [
"gettext",
{
"name": "gettext",
"host": true,
"default-features": false,
"features": [
"tools"
]
},
"gettext-libintl",
"glib",
{
"name": "glib",
@ -20,6 +28,7 @@
"features": {
"introspection": {
"description": "build with introspection",
"supports": "!static",
"dependencies": [
"gobject-introspection"
]

View File

@ -37,16 +37,10 @@ list(APPEND OPTIONS -Dwin32-backend=${win32}) #Enable the Windows gdk backend (o
list(APPEND OPTIONS -Dmacos-backend=${osx}) #Enable the macOS gdk backend (only when building on macOS)
if("introspection" IN_LIST FEATURES)
list(APPEND OPTIONS_DEBUG -Dintrospection=disabled)
list(APPEND OPTIONS_RELEASE -Dintrospection=enabled)
vcpkg_get_gobject_introspection_programs(PYTHON3 GIR_COMPILER GIR_SCANNER)
else()
list(APPEND OPTIONS -Dintrospection=disabled)
endif()
if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(GIR_TOOL_DIR ${CURRENT_INSTALLED_DIR})
else()
set(GIR_TOOL_DIR ${CURRENT_HOST_INSTALLED_DIR})
list(APPEND OPTIONS_RELEASE -Dintrospection=disabled)
endif()
vcpkg_configure_meson(
@ -67,10 +61,10 @@ vcpkg_configure_meson(
-Dtracker=disabled # Enable Tracker3 filechooser search
-Dcolord=disabled # Build colord support for the CUPS printing backend
-Df16c=disabled # Enable F16C fast paths (requires F16C)
OPTIONS_DEBUG
${OPTIONS_DEBUG}
OPTIONS_RELEASE
${OPTIONS_RELEASE}
OPTIONS_DEBUG
-Dintrospection=disabled
ADDITIONAL_BINARIES
glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
@ -78,8 +72,8 @@ vcpkg_configure_meson(
gdbus-codegen='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/gdbus-codegen'
glib-compile-schemas='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-schemas${VCPKG_HOST_EXECUTABLE_SUFFIX}'
sassc='${CURRENT_HOST_INSTALLED_DIR}/tools/sassc/bin/sassc${VCPKG_HOST_EXECUTABLE_SUFFIX}'
g-ir-compiler='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-compiler${VCPKG_HOST_EXECUTABLE_SUFFIX}'
g-ir-scanner='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-scanner'
"g-ir-compiler='${GIR_COMPILER}'"
"g-ir-scanner='${GIR_SCANNER}'"
)
vcpkg_install_meson(ADD_BIN_TO_PATH)

View File

@ -1,11 +1,11 @@
{
"name": "gtk",
"version": "4.16.3",
"port-version": 2,
"port-version": 3,
"description": "Portable library for creating graphical user interfaces.",
"homepage": "https://www.gtk.org/",
"license": "LGPL-2.0-only",
"supports": "!xbox & !(arm64 & windows)",
"supports": "!android & !xbox & !(arm64 & windows)",
"dependencies": [
"atk",
{
@ -58,7 +58,8 @@
],
"features": {
"introspection": {
"description": "build with introspection",
"description": "Build with introspection",
"supports": "!static",
"dependencies": [
{
"name": "atk",

View File

@ -25,21 +25,11 @@ vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gdk-pixbuf")
vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin")
vcpkg_list(SET ADDITIONAL_BINARIES)
if("introspection" IN_LIST FEATURES)
list(APPEND OPTIONS_DEBUG -Dintrospection=false)
list(APPEND OPTIONS_RELEASE -Dintrospection=true)
if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(GIR_TOOL_DIR "${CURRENT_INSTALLED_DIR}")
else()
set(GIR_TOOL_DIR "${CURRENT_HOST_INSTALLED_DIR}")
endif()
vcpkg_list(APPEND ADDITIONAL_BINARIES
"g-ir-compiler='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-compiler${VCPKG_HOST_EXECUTABLE_SUFFIX}'"
"g-ir-scanner='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-scanner'"
)
vcpkg_get_gobject_introspection_programs(PYTHON3 GIR_COMPILER GIR_SCANNER)
else()
list(APPEND OPTIONS -Dintrospection=false)
list(APPEND OPTIONS_RELEASE -Dintrospection=false)
endif()
vcpkg_configure_meson(
@ -57,17 +47,18 @@ vcpkg_configure_meson(
-Dprofiler=false # include tracing support for sysprof
-Dtracker3=false # Enable Tracker3 filechooser search
-Dcolord=no # Build colord support for the CUPS printing backend
OPTIONS_DEBUG
${OPTIONS_DEBUG}
OPTIONS_RELEASE
${OPTIONS_RELEASE}
OPTIONS_DEBUG
-Dintrospection=false
ADDITIONAL_BINARIES
"glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'"
"glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'"
"glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources${VCPKG_HOST_EXECUTABLE_SUFFIX}'"
"gdbus-codegen='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/gdbus-codegen'"
"glib-compile-schemas='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-schemas${VCPKG_HOST_EXECUTABLE_SUFFIX}'"
${ADDITIONAL_BINARIES}
"g-ir-compiler='${GIR_COMPILER}'"
"g-ir-scanner='${GIR_SCANNER}'"
)
# Reduce command line lengths, in particular for static windows builds.
@ -95,4 +86,4 @@ vcpkg_copy_tools(TOOL_NAMES ${GTK_TOOLS} AUTO_CLEAN)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/etc")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

View File

@ -1,9 +1,11 @@
{
"name": "gtk3",
"version": "3.24.43",
"port-version": 1,
"description": "Portable library for creating graphical user interfaces.",
"homepage": "https://www.gtk.org/",
"license": null,
"supports": "!android",
"dependencies": [
{
"name": "at-spi2-atk",
@ -30,7 +32,6 @@
"name": "gdk-pixbuf",
"host": true
},
"gettext",
{
"name": "gettext",
"host": true,
@ -39,6 +40,7 @@
"tools"
]
},
"gettext-libintl",
"glib",
{
"name": "glib",
@ -53,8 +55,8 @@
],
"features": {
"introspection": {
"description": "build with introspection",
"supports": "!windows | !static",
"description": "Build with introspection",
"supports": "!static",
"dependencies": [
{
"name": "atk",
@ -63,14 +65,6 @@
"introspection"
]
},
{
"name": "gdk-pixbuf",
"host": true,
"default-features": false,
"features": [
"introspection"
]
},
{
"name": "gdk-pixbuf",
"default-features": false,

View File

@ -59,16 +59,11 @@ endif()
if("introspection" IN_LIST FEATURES)
list(APPEND OPTIONS_DEBUG -Dgobject=enabled -Dintrospection=disabled)
list(APPEND OPTIONS_RELEASE -Dgobject=enabled -Dintrospection=enabled)
vcpkg_get_gobject_introspection_programs(PYTHON3 GIR_COMPILER GIR_SCANNER)
else()
list(APPEND OPTIONS -Dintrospection=disabled)
endif()
if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(GIR_TOOL_DIR ${CURRENT_INSTALLED_DIR})
else()
set(GIR_TOOL_DIR ${CURRENT_HOST_INSTALLED_DIR})
endif()
set(cxx_link_libraries "")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
block(PROPAGATE cxx_link_libraries)
@ -96,8 +91,8 @@ vcpkg_configure_meson(
ADDITIONAL_BINARIES
glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
g-ir-compiler='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-compiler${VCPKG_HOST_EXECUTABLE_SUFFIX}'
g-ir-scanner='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-scanner'
g-ir-compiler='${GIR_COMPILER}'
g-ir-scanner='${GIR_SCANNER}'
)
vcpkg_install_meson(ADD_BIN_TO_PATH)

View File

@ -1,16 +1,12 @@
{
"name": "harfbuzz",
"version": "10.2.0",
"port-version": 3,
"port-version": 4,
"description": "HarfBuzz OpenType text shaping engine",
"homepage": "https://github.com/harfbuzz/harfbuzz",
"license": "MIT-Modern-Variant",
"supports": "!uwp",
"dependencies": [
{
"name": "gettext",
"platform": "osx"
},
{
"name": "vcpkg-tool-meson",
"host": true
@ -80,9 +76,16 @@
},
"introspection": {
"description": "build with introspection",
"supports": "!static",
"dependencies": [
"glib",
"gobject-introspection"
"gobject-introspection",
{
"name": "harfbuzz",
"default-features": false,
"features": [
"glib"
]
}
]
}
}

View File

@ -1,4 +1,3 @@
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.gnome.org/
OUT_SOURCE_PATH SOURCE_PATH
@ -8,18 +7,11 @@ vcpkg_from_gitlab(
HEAD_REF master
)
if("introspection" IN_LIST FEATURES)
list(APPEND OPTIONS_DEBUG -Dintrospection=disabled)
list(APPEND OPTIONS_RELEASE -Dintrospection=enabled)
vcpkg_get_gobject_introspection_programs(PYTHON3 GIR_COMPILER GIR_SCANNER)
else()
list(APPEND OPTIONS -Dintrospection=disabled)
endif()
if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(GIR_TOOL_DIR ${CURRENT_INSTALLED_DIR})
else()
set(GIR_TOOL_DIR ${CURRENT_HOST_INSTALLED_DIR})
list(APPEND OPTIONS_RELEASE -Dintrospection=disabled)
endif()
vcpkg_configure_meson(
@ -33,15 +25,15 @@ vcpkg_configure_meson(
-Dfreetype=enabled # Build with freetype support
-Dgtk_doc=false #Build API reference for Pango using GTK-Doc
${OPTIONS}
OPTIONS_DEBUG
${OPTIONS_DEBUG}
OPTIONS_RELEASE
${OPTIONS_RELEASE}
OPTIONS_DEBUG
-Dintrospection=disabled
ADDITIONAL_BINARIES
"glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'"
"glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'"
"g-ir-compiler='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-compiler${VCPKG_HOST_EXECUTABLE_SUFFIX}'"
"g-ir-scanner='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-scanner'"
"g-ir-compiler='${GIR_COMPILER}'"
"g-ir-scanner='${GIR_SCANNER}'"
)
vcpkg_install_meson(ADD_BIN_TO_PATH)

View File

@ -1,7 +1,7 @@
{
"name": "pango",
"version": "1.56.1",
"port-version": 1,
"port-version": 2,
"description": "Text and font handling library.",
"homepage": "https://ftp.gnome.org/pub/GNOME/sources/pango/",
"license": "LGPL-2.0-or-later",
@ -16,7 +16,15 @@
"fontconfig",
"freetype",
"fribidi",
"gettext",
{
"name": "gettext",
"host": true,
"default-features": false,
"features": [
"tools"
]
},
"gettext-libintl",
"glib",
{
"name": "glib",
@ -37,7 +45,8 @@
],
"features": {
"introspection": {
"description": "build with introspection",
"description": "Build with introspection",
"supports": "!static",
"dependencies": [
"gobject-introspection",
{

View File

@ -391,6 +391,9 @@ glfw3:x64-uwp=fail
glibmm:arm64-windows-static-md=fail
glibmm:x64-windows-static-md=fail
glibmm:x64-windows-static=fail
# needs arm64 host
gobject-introspection:arm64-windows-static-md=fail
gobject-introspection:arm64-windows=fail
graphicsmagick:arm64-uwp=fail
graphicsmagick:x64-uwp=fail
graphviz:arm-neon-android=fail

View File

@ -144,7 +144,6 @@ gperftools:x64-uwp=fail
graphicsmagick(uwp)=fail
graphqlparser:arm64-osx=fail # python2 required
gsoap = skip # gsoap does not offer stable public source downloads
gtk:x64-windows-static-md=fail
gtk:x64-windows-static=fail
halide:x64-windows-static=fail
hdf5((arm & windows) | uwp) = fail
@ -395,8 +394,6 @@ opusfile:arm-uwp=fail
opusfile:x64-uwp=fail
paho-mqtt:arm-uwp=fail
paho-mqtt:x64-uwp=fail
pango:x64-windows-static-md=fail
pango:x64-windows-static=fail
pfring:arm64-osx=fail
pfring:x64-osx=fail
pixman:arm-uwp=fail
@ -627,6 +624,7 @@ apr-util:arm64-windows = cascade
apr-util:x64-uwp = cascade
apsi[hexl,log4cplus,zeromq]:x64-uwp = cascade
apsi[log4cplus,zeromq]:arm64-uwp = cascade
aravis(uwp) = cascade
arb:arm64-uwp = cascade
arb:x64-uwp = cascade
argtable3:arm64-uwp = cascade
@ -648,7 +646,6 @@ async-mqtt:arm64-uwp = cascade
async-mqtt:x64-uwp = cascade
atk:arm64-uwp = cascade
atk:x64-uwp = cascade
atk[introspection](static) = cascade
atkmm:arm64-uwp = cascade
atkmm:x64-uwp = cascade
atkmm:x64-windows-static = cascade
@ -895,7 +892,6 @@ gdal[hdf5]:arm64-windows = cascade
gdcm2:arm64-uwp = cascade
gdcm2:arm64-windows = cascade
gdcm2:x64-uwp = cascade
gdk-pixbuf[introspection](static | !(native | (windows & x86))) = cascade
gdk-pixbuf(uwp) = cascade
ginkgo[cuda]:arm64-uwp = cascade
ginkgo[cuda]:arm64-windows = cascade
@ -926,6 +922,8 @@ gmsh[mpi]:x64-windows = cascade
gmsh[mpi]:x64-windows-static = cascade
gmsh[mpi]:x64-windows-static-md = cascade
gmsh[mpi,occ]:x86-windows = cascade
gobject-introspection(android) = cascade # from python3
gobject-introspection(uwp) = cascade # from glib
google-cloud-cpp-common:arm64-uwp = cascade
google-cloud-cpp-common:x64-uwp = cascade
google-cloud-cpp-spanner:arm64-uwp = cascade
@ -936,9 +934,7 @@ gppanel:arm64-uwp = cascade
gppanel:x64-uwp = cascade
grantlee:arm64-uwp = cascade
grantlee:x64-uwp = cascade
graphene:x64-uwp = cascade
graphene[introspection]:arm64-osx = cascade
graphene[introspection]:x64-linux = cascade
graphene(uwp) = cascade
graphviz:arm64-uwp = cascade
graphviz:x64-uwp = cascade
grppi[tbb]:arm64-uwp = cascade
@ -951,15 +947,8 @@ gtk:arm64-uwp = cascade
gtk:arm64-windows = cascade
gtk:x64-uwp = cascade
gtk:x64-windows-static = cascade
gtk[introspection]:arm64-osx = cascade
gtk[introspection]:x64-linux = cascade
gtk[introspection]:x64-windows-static-md = cascade
gtk3:arm64-uwp = cascade
gtk3:x64-uwp = cascade
gtk3:x64-windows-static = cascade
gtk3[introspection]:arm64-osx = cascade
gtk3[introspection]:arm64-windows = cascade
gtk3[introspection]:x64-linux = cascade
gtk3(uwp) = cascade
gtkmm:arm64-windows = cascade
gtkmm:x64-windows-static = cascade
gtkmm:x64-windows-static-md = cascade
@ -988,7 +977,6 @@ halide[target-all]:x86-windows = cascade
hareflow:arm64-uwp = cascade
hareflow:x64-uwp = cascade
hareflow:x64-windows-static = cascade
harfbuzz[introspection](static) = cascade
hashids:arm64-uwp = cascade
hashids:x64-uwp = cascade
hdf5[parallel]:arm64-windows = cascade
@ -1650,11 +1638,6 @@ paho-mqttpp3:arm64-uwp = cascade
paho-mqttpp3:x64-uwp = cascade
pango:arm64-uwp = cascade
pango:x64-uwp = cascade
pango[introspection]:arm64-osx = cascade
pango[introspection]:arm64-windows = cascade
pango[introspection]:x64-linux = cascade
pango[introspection]:x64-windows-static = cascade
pango[introspection]:x64-windows-static-md = cascade
pangolin[openni2]:arm64-osx = cascade
pangolin[openni2]:x64-linux = cascade
pangolin[openni2,pybind11,realsense,uvc]:arm64-windows = cascade
@ -2182,8 +2165,7 @@ zyre:x64-uwp = cascade
ableton-link[hut](linux) = feature-fails # libportaudiocpp0 must be installed in ci. See https://github.com/microsoft/vcpkg/pull/32144
adios2[python](!uwp) = feature-fails # Could NOT find Python (missing: Python_NumPy_INCLUDE_DIRS NumPy)
arrayfire[opencl](windows & !uwp) = feature-fails # build errror: See https://github.com/microsoft/vcpkg/issues/33464
ashes[core](windows) = combination-fails # CMake Error: INSTALL(EXPORT) given unknown export "AshesRenderers". One render backend must be selected
atk[introspection](windows & arm & !static) = feature-fails # ERROR: Dependency "gobject-introspection-1.0" not found. See https://github.com/microsoft/vcpkg/issues/33751
ashes[core](windows) = combination-fails # CMake Error: INSTALL(EXPORT) given unknown export "AshesRenderers". One render backend must be selected
azure-kinect-sensor-sdk[tool](windows & !uwp) = feature-fails # Waits for https://github.com/microsoft/vcpkg/pull/33231
# boost-python[core](!linux) = combination-fails
awlib[graphics] = feature-fails # Broken code. See https://github.com/microsoft/vcpkg/issues/39849
@ -2209,7 +2191,6 @@ flashlight-cpu = fail # CMake Error: INSTALL(EXPORT) given unknown export "flash
flashlight-sequence[openmp](osx) = feature-fails # No openmp on osx
freerdp[server](osx) = skip # Uses api removed with macOS 15. Don't get fixed. See https://github.com/FreeRDP/FreeRDP/issues/10558
gdal[netcdf](windows & arm) = feature-fails # gdal_target_link_libraries(): PRIVATE is a mandatory argument. See https://github.com/microsoft/vcpkg/issues/33753
gdk-pixbuf[introspection](windows & (native | x86) & !static) = feature-fails # python distutils trouble
gegl(osx) = fail # meson bug on osx. See https://github.com/microsoft/vcpkg/issues/44411
geogram[graphics] = feature-fails # imgui not found. See https://github.com/microsoft/vcpkg/issues/32421
ginkgo[openmp](osx) = feature-fails # No openmp on osx
@ -2221,7 +2202,6 @@ grpc[codegen](uwp) = feature-fails # linker errors. See https://github.com/micro
gstreamer[chromaprint](osx) = feature-fails # see https://github.com/microsoft/vcpkg/issues/31109
gstreamer[openal](osx) = feature-fails # see https://github.com/microsoft/vcpkg/issues/43419
gstreamer[x11-bad](osx) = feature-fails # no x11 on macOS
harfbuzz[introspection](windows & arm & !static) = feature-fails # ERROR: Dependency "gobject-introspection-1.0" not found. See https://github.com/microsoft/vcpkg/issues/33751
hdf5[core,cpp,fortran,map,parallel,szip,threadsafe,tools,utils,zlib](!windows & arm) = combination-fails # some features are mutually exclusive
hdf5[fortran](windows) = feature-fails # No fortan compiler
highway[contrib](osx) = feature-fails # clang: fatal error: error in backend: Calling convention SVE_VectorCall is unsupported on Darwin.
@ -2302,16 +2282,25 @@ xbitmaps(osx) = fail # error: must install xorg-macros 1.3 or later before runni
xerces-c[xmlch-wchar](!windows) = feature-fails # wchar_t must be 16 bit and not 32
# skip
aravis[introspection]:arm64-windows = skip # needs arm64 host
atk[introspection]:arm64-windows = skip # needs arm64 host
cairo[x11](osx) = skip # No x11 on osx
entt[experimental] = skip # required head build
freerdp[x11](osx) = skip # No x11 on osx
gdk-pixbuf[introspection]:arm64-windows = skip # needs arm64 host
glad[glx](osx) = skip # No x11 on osx
gobject-introspection(arm64 & windows) = skip # needs arm64 host
graphene[introspection]:arm64-windows = skip # needs arm64 host
gtk3[introspection]:arm64-windows = skip # needs arm64 host
harfbuzz[introspection]:arm64-windows = skip # needs arm64 host
hello-imgui[freetype-lunasvg] = skip # see https://github.com/microsoft/vcpkg/issues/44212
hello-imgui[sdl2-binding] = skip # see https://github.com/microsoft/vcpkg/issues/44212
libhdfs3 = skip # never worked https://github.com/microsoft/vcpkg/pull/10021#issuecomment-1595343157
magnum[anyshaderconverter,shadertools,shaderconverter,vk-info] = skip # only available in head build
magnum-plugins[cgltfimporter,glslangshaderconverter,ktximageconverter,ktximporter,openexrimageconverter,openexrimporter,spirvtoolsshaderconverter,stbdxtimageconverter] = skip # only available in head build
openjpeg[tools] = skip # fails and is deprecated
pango[introspection]:arm64-windows = skip # needs arm64 host
qtbase[xcb,xcb-xlib,xkb,xkbcommon-x11,xlib,xrender](osx) = skip # no x11 on macOS
s2n = skip # builds too slow
sciter = skip # The sciter port is deprecated by upstream and conflicts with upstream's replacement.
shogun = skip # shogun is not compatible with c++17 because it uses dynamic exception specifications but the dependency abseil requires c++17

View File

@ -0,0 +1,22 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
# Using release typelibs also for debug:
# vcpkg is unable to build the debug variant for MSVC
# as long as it doesn't install the python interpreter
# for the debug CRT.
set(ENV{GI_TYPELIB_PATH} "${CURRENT_INSTALLED_DIR}/lib/girepository-1.0")
vcpkg_find_acquire_program(PKGCONFIG)
vcpkg_check_features(OUT_FEATURE_OPTIONS options
FEATURES
run-test RUN_TEST
)
vcpkg_cmake_configure(
SOURCE_PATH "${CURRENT_PORT_DIR}/project"
OPTIONS
${options}
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
)
vcpkg_cmake_build(ADD_BIN_TO_PATH)

View File

@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 3.30)
project(gobject-introspection-test C)
option(RUN_TEST "Run the test program")
set(CMAKE_SKIP_RPATH FALSE)
find_package(PkgConfig REQUIRED)
pkg_check_modules(gobject-introspection_pc gobject-introspection-1.0 REQUIRED IMPORTED_TARGET)
add_executable(main-pkgconfig main.c)
target_link_libraries(main-pkgconfig PRIVATE
PkgConfig::gobject-introspection_pc
)
add_custom_target(run-test
COMMAND main-pkgconfig
COMMENT "Running the test program"
)
if(RUN_TEST)
set_target_properties(run-test PROPERTIES EXCLUDE_FROM_ALL 0)
endif()

View File

@ -0,0 +1,39 @@
#include <girepository.h>
#include <stdio.h>
int main()
{
GError *error = NULL;
GIRepository *repository = g_irepository_get_default();
GSList* paths = g_irepository_get_search_path();
for (; paths != NULL; paths = paths->next)
g_message("Search path entry: %s\n", (const char*)paths->data);
GITypelib *typelib = g_irepository_require(repository, "GIRepository", NULL, 0, &error);
if (error)
{
g_error("ERROR: %s\n", error->message);
return 1;
}
GIBaseInfo *base_info = g_irepository_find_by_name(repository, "GIRepository", "get_minor_version");
if (!base_info)
{
g_error("ERROR: %s\n", "Could not find GIRepository get_minor_version");
return 1;
}
GIArgument retval;
if (!g_function_info_invoke((GIFunctionInfo *)base_info, NULL, 0, NULL, 0, &retval, &error))
{
g_error("ERROR: %s\n", error->message);
return 1;
}
g_message("GI Repository minor version: %d", retval.v_uint);
g_base_info_unref(base_info);
return 0;
}

View File

@ -0,0 +1,54 @@
{
"name": "vcpkg-ci-gobject-introspection",
"version-string": "ci",
"description": "Port to force features of gobject-introspection within CI",
"homepage": "https://github.com/microsoft/vcpkg",
"license": "MIT",
"dependencies": [
{
"name": "gobject-introspection",
"default-features": false
},
{
"name": "vcpkg-cmake",
"host": true
}
],
"default-features": [
{
"name": "ports",
"platform": "!static & !(arm & windows)"
},
{
"name": "run-test",
"platform": "!static & !(arm & windows)"
}
],
"features": {
"ports": {
"description": "Test introspection in ports",
"supports": "!static",
"dependencies": [
{
"name": "gobject-introspection",
"default-features": false,
"features": [
"cairo"
]
},
{
"name": "harfbuzz",
"default-features": false,
"features": [
"introspection"
]
}
]
},
"run-test": {
"supports": "!static",
"description": "Run a test program."
}
}
}

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1b69f3fe486457e9a5060044c323de95733f16cc",
"version": "0.8.34",
"port-version": 1
},
{
"git-tree": "9de676f9a27354906fbff6a6005d11719e8f09e1",
"version": "0.8.34",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "13fcc8a6fb7b937d315ad06c223fa85860a3ca5a",
"version": "2.38.0",
"port-version": 10
},
{
"git-tree": "61672c57e8e69aa513f352781240addf75670a4d",
"version": "2.38.0",

View File

@ -190,7 +190,7 @@
},
"aravis": {
"baseline": "0.8.34",
"port-version": 0
"port-version": 1
},
"arb": {
"baseline": "2.21.1",
@ -334,7 +334,7 @@
},
"atk": {
"baseline": "2.38.0",
"port-version": 9
"port-version": 10
},
"atkmm": {
"baseline": "2.36.3",
@ -3106,7 +3106,7 @@
},
"gdk-pixbuf": {
"baseline": "2.42.12",
"port-version": 3
"port-version": 4
},
"gegl": {
"baseline": "0.4.54",
@ -3282,7 +3282,7 @@
},
"gobject-introspection": {
"baseline": "1.82.0",
"port-version": 0
"port-version": 1
},
"godot-cpp": {
"baseline": "4.4",
@ -3334,7 +3334,7 @@
},
"graphene": {
"baseline": "1.10.8",
"port-version": 4
"port-version": 5
},
"graphicsmagick": {
"baseline": "1.3.41",
@ -3390,11 +3390,11 @@
},
"gtk": {
"baseline": "4.16.3",
"port-version": 2
"port-version": 3
},
"gtk3": {
"baseline": "3.24.43",
"port-version": 0
"port-version": 1
},
"gtkmm": {
"baseline": "4.14.0",
@ -3570,7 +3570,7 @@
},
"harfbuzz": {
"baseline": "10.2.0",
"port-version": 3
"port-version": 4
},
"hash-library": {
"baseline": "8",
@ -7090,7 +7090,7 @@
},
"pango": {
"baseline": "1.56.1",
"port-version": 1
"port-version": 2
},
"pangolin": {
"baseline": "0.9.3",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c85870a45af5037596827e00ea1263515dc75fd7",
"version": "2.42.12",
"port-version": 4
},
{
"git-tree": "c4f303035e2c6053afaf4b27574d8aa198ee7215",
"version": "2.42.12",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ea77d8c01f088c46520c98ec3682c93148150b80",
"version": "1.82.0",
"port-version": 1
},
{
"git-tree": "2998d48a8661410527703c06b125d198ebb19411",
"version": "1.82.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "acbd24db3e1526191ff7136667deb6967a7a446b",
"version": "1.10.8",
"port-version": 5
},
{
"git-tree": "63272f3237114a43e4b7114eac99f43fba302cc6",
"version": "1.10.8",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "cdf2d21aa39a6737a3faf10d56636009dadde619",
"version": "4.16.3",
"port-version": 3
},
{
"git-tree": "29d5e39faeb0a2e312574c3077d2726e90e9218a",
"version": "4.16.3",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "cfa24f84e35e0408a769693413b6539178a81bb5",
"version": "3.24.43",
"port-version": 1
},
{
"git-tree": "58162a3fa851d5634818c1e4c86980882a8a80d3",
"version": "3.24.43",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e213a343364c5985ede5d4018a7f13969d82d3fc",
"version": "10.2.0",
"port-version": 4
},
{
"git-tree": "0301a6b19f106c2ce2c86b59437a146d7d2752bc",
"version": "10.2.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "96a122d4e6ddef24f15a30ada70853135ad43217",
"version": "1.56.1",
"port-version": 2
},
{
"git-tree": "d3f8b88d64fc873b2a9d100cb0040441c80e0227",
"version": "1.56.1",