mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 13:25:19 +08:00
[gobject-introspection] no absolute paths (#24845)
This commit is contained in:
parent
d97c3ab76c
commit
72138fe854
22
ports/gobject-introspection/0003-fix-paths.patch
Normal file
22
ports/gobject-introspection/0003-fix-paths.patch
Normal file
@ -0,0 +1,22 @@
|
||||
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@"
|
||||
@@ -55,7 +55,7 @@ builtins.__dict__['DATADIR'] = datadir
|
||||
|
||||
# Respect gir_dir_prefix
|
||||
girdir = ''
|
||||
-girdir = os.path.abspath(os.path.join(filedir, '..', '@gir_dir_prefix@'))
|
||||
+girdir = datadir
|
||||
builtins.__dict__['GIRDIR'] = [girdir]
|
||||
|
||||
# Again, relative paths first so that the installation prefix is relocatable
|
@ -14,6 +14,7 @@ vcpkg_extract_source_archive_ex(
|
||||
PATCHES
|
||||
0001-g-ir-tool-template.in.patch
|
||||
0002-cross-build.patch
|
||||
0003-fix-paths.patch
|
||||
python.patch
|
||||
)
|
||||
|
||||
@ -68,7 +69,8 @@ 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 "${CURRENT_PACKAGES_DIR}/lib" "${CURRENT_INSTALLED_DIR}/lib" _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}")
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "gobject-introspection",
|
||||
"version": "1.72.0",
|
||||
"port-version": 1,
|
||||
"description": "A middleware layer between C libraries (using GObject) and language bindings.",
|
||||
"homepage": "https://gi.readthedocs.io/en/latest/",
|
||||
"license": null,
|
||||
|
@ -2642,7 +2642,7 @@
|
||||
},
|
||||
"gobject-introspection": {
|
||||
"baseline": "1.72.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"google-cloud-cpp": {
|
||||
"baseline": "2.1.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a74d57d679dac22f5b60c5b7da97cad7ecb3d0fb",
|
||||
"version": "1.72.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "7af27cca9283357e5b7447e5a1c6583afc50c793",
|
||||
"version": "1.72.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user