early-access version 2853
This commit is contained in:
50
externals/vcpkg/ports/glib/libintl.patch
vendored
Executable file
50
externals/vcpkg/ports/glib/libintl.patch
vendored
Executable file
@@ -0,0 +1,50 @@
|
||||
diff --git a/meson.build b/meson.build
|
||||
index c418f50b1..e7158c036 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -2048,42 +2048,10 @@ endif
|
||||
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
|
||||
# implementations. This could be extended if issues are found in some platforms.
|
||||
libintl_deps = []
|
||||
-if cc.has_function('ngettext', args : osx_ldflags)
|
||||
- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')
|
||||
-else
|
||||
- # First just find the bare library.
|
||||
- libintl = cc.find_library('intl', required : false)
|
||||
- # The bare library probably won't link without help if it's static.
|
||||
- if libintl.found() and not cc.has_function('ngettext', args : osx_ldflags, dependencies : libintl)
|
||||
- libintl_iconv = cc.find_library('iconv', required : false)
|
||||
- # libintl supports different threading APIs, which may not
|
||||
- # require additional flags, but it defaults to using pthreads if
|
||||
- # found. Meson's "threads" dependency does not allow you to
|
||||
- # prefer pthreads. We may not be using pthreads for glib itself
|
||||
- # either so just link the library to satisfy libintl rather than
|
||||
- # also defining the macros with the -pthread flag.
|
||||
- libintl_pthread = cc.find_library('pthread', required : false)
|
||||
- # Try linking with just libiconv.
|
||||
- if libintl_iconv.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv])
|
||||
- libintl_deps += [libintl_iconv]
|
||||
- # Then also try linking with pthreads.
|
||||
- elif libintl_iconv.found() and libintl_pthread.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv, libintl_pthread])
|
||||
- libintl_deps += [libintl_iconv, libintl_pthread]
|
||||
- else
|
||||
- libintl = disabler()
|
||||
- endif
|
||||
- endif
|
||||
- if not libintl.found()
|
||||
- libintl = subproject('proxy-libintl').get_variable('intl_dep')
|
||||
- libintl_deps = [libintl] + libintl_deps
|
||||
- have_bind_textdomain_codeset = true # proxy-libintl supports it
|
||||
- else
|
||||
- libintl_deps = [libintl] + libintl_deps
|
||||
- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', args : osx_ldflags,
|
||||
+libintl = dependency('Intl', method:'cmake', required : true)
|
||||
+libintl_deps += [libintl]
|
||||
+have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', args : osx_ldflags,
|
||||
dependencies : libintl_deps)
|
||||
- endif
|
||||
-endif
|
||||
-
|
||||
glib_conf.set('HAVE_BIND_TEXTDOMAIN_CODESET', have_bind_textdomain_codeset)
|
||||
|
||||
# We require gettext to always be present
|
||||
125
externals/vcpkg/ports/glib/portfile.cmake
vendored
Executable file
125
externals/vcpkg/ports/glib/portfile.cmake
vendored
Executable file
@@ -0,0 +1,125 @@
|
||||
# Glib relies on DllMain on Windows
|
||||
if (VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
#remove if merged: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1655
|
||||
endif()
|
||||
|
||||
set(GLIB_MAJOR_MINOR 2.70)
|
||||
set(GLIB_PATCH 5)
|
||||
vcpkg_from_gitlab(
|
||||
GITLAB_URL https://gitlab.gnome.org/
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO GNOME/glib
|
||||
REF "${GLIB_MAJOR_MINOR}.${GLIB_PATCH}"
|
||||
SHA512 69c032358e0a0d88414a97e0bc898b5ce2797839a432b95790d03f108e55a79eee2d51bab5e281cc9469e2a57accc0d2c9bbaa80f9369050534387d1a215dd98
|
||||
PATCHES
|
||||
use-libiconv-on-windows.patch
|
||||
libintl.patch
|
||||
)
|
||||
|
||||
if (selinux IN_LIST FEATURES)
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT EXISTS "/usr/include/selinux")
|
||||
message("Selinux was not found in its typical system location. Your build may fail. You can install Selinux with \"apt-get install selinux\".")
|
||||
endif()
|
||||
list(APPEND OPTIONS -Dselinux=enabled)
|
||||
else()
|
||||
list(APPEND OPTIONS -Dselinux=disabled)
|
||||
endif()
|
||||
|
||||
if (libmount IN_LIST FEATURES)
|
||||
list(APPEND OPTIONS -Dlibmount=enabled)
|
||||
else()
|
||||
list(APPEND OPTIONS -Dlibmount=disabled)
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND OPTIONS -Diconv=external)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_meson(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-Dinstalled_tests=false
|
||||
${OPTIONS}
|
||||
-Dtests=false
|
||||
-Dxattr=false
|
||||
-Dlibelf=disabled
|
||||
)
|
||||
|
||||
vcpkg_install_meson(ADD_BIN_TO_PATH)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
set(GLIB_TOOLS gdbus
|
||||
gio
|
||||
gio-querymodules
|
||||
glib-compile-resources
|
||||
glib-compile-schemas
|
||||
gobject-query
|
||||
gresource
|
||||
gsettings
|
||||
)
|
||||
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
if(NOT VCPKG_TARGET_IS_OSX)
|
||||
list(APPEND GLIB_TOOLS gapplication)
|
||||
endif()
|
||||
list(APPEND GLIB_TOOLS glib-gettextize gtester)
|
||||
endif()
|
||||
set(GLIB_SCRIPTS gdbus-codegen glib-genmarshal glib-mkenums gtester-report)
|
||||
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64|arm64")
|
||||
list(APPEND GLIB_TOOLS gspawn-win64-helper${VCPKG_EXECUTABLE_SUFFIX}
|
||||
gspawn-win64-helper-console${VCPKG_EXECUTABLE_SUFFIX})
|
||||
elseif(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
list(APPEND GLIB_TOOLS gspawn-win32-helper${VCPKG_EXECUTABLE_SUFFIX}
|
||||
gspawn-win32-helper-console${VCPKG_EXECUTABLE_SUFFIX})
|
||||
endif()
|
||||
vcpkg_copy_tools(TOOL_NAMES ${GLIB_TOOLS} AUTO_CLEAN)
|
||||
foreach(script IN LISTS GLIB_SCRIPTS)
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${script}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/${script}")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${script}")
|
||||
endforeach()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
IF(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(SYSTEM_LIBRARIES dnsapi iphlpapi winmm lshlwapi)
|
||||
else()
|
||||
set(SYSTEM_LIBRARIES resolv mount blkid selinux)
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gio-2.0.pc")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gio-2.0.pc" "\${bindir}" "\${bindir}/../tools/${PORT}")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gio-2.0.pc")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gio-2.0.pc" "\${bindir}" "\${bindir}/../../tools/${PORT}")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/glib-2.0.pc")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/glib-2.0.pc" "\${bindir}" "\${bindir}/../tools/${PORT}")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/glib-2.0.pc")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/glib-2.0.pc" "\${bindir}" "\${bindir}/../../tools/${PORT}")
|
||||
endif()
|
||||
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES})
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
# Fix python scripts
|
||||
set(_file "${CURRENT_PACKAGES_DIR}/tools/${PORT}/gdbus-codegen")
|
||||
file(READ "${_file}" _contents)
|
||||
string(REPLACE "elif os.path.basename(filedir) == 'bin':" "elif os.path.basename(filedir) == 'tools':" _contents "${_contents}")
|
||||
string(REPLACE "path = os.path.join(filedir, '..', 'share', 'glib-2.0')" "path = os.path.join(filedir, '../..', 'share', 'glib-2.0')" _contents "${_contents}")
|
||||
string(REPLACE "path = os.path.join(filedir, '..')" "path = os.path.join(filedir, '../../share/glib-2.0')" _contents "${_contents}")
|
||||
string(REPLACE "path = os.path.join('${CURRENT_PACKAGES_DIR}/share', 'glib-2.0')" "path = os.path.join('unuseable/share', 'glib-2.0')" _contents "${_contents}")
|
||||
|
||||
file(WRITE "${_file}" "${_contents}")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/gdb")
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/glib/glib-gettextize")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/glib/glib-gettextize" "${CURRENT_PACKAGES_DIR}" "`dirname $0`/../..")
|
||||
endif()
|
||||
28
externals/vcpkg/ports/glib/use-libiconv-on-windows.patch
vendored
Executable file
28
externals/vcpkg/ports/glib/use-libiconv-on-windows.patch
vendored
Executable file
@@ -0,0 +1,28 @@
|
||||
diff --git a/glib/gconvert.c b/glib/gconvert.c
|
||||
index 3deac78..134ded9 100644
|
||||
--- a/glib/gconvert.c
|
||||
+++ b/glib/gconvert.c
|
||||
@@ -30,7 +30,8 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
-#include "win_iconv.c"
|
||||
+#define USE_LIBICONV_GNU
|
||||
+#include <iconv.h>
|
||||
#endif
|
||||
|
||||
#ifdef G_PLATFORM_WIN32
|
||||
diff --git a/meson.build b/meson.build
|
||||
index d938ddf51..2ba256115 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -1914,7 +1914,8 @@ glibconfig_conf.set10('G_HAVE_GROWING_STACK', growing_stack)
|
||||
# the built-in implementation
|
||||
iconv_opt = get_option('iconv')
|
||||
if host_system == 'windows'
|
||||
- libiconv = []
|
||||
+ libiconv = [cc.find_library('iconv')]
|
||||
+ found_iconv = true
|
||||
# We have a #include "win_iconv.c" in gconvert.c on Windows, so we don't need
|
||||
# any external library for it
|
||||
if iconv_opt != 'auto'
|
||||
33
externals/vcpkg/ports/glib/vcpkg.json
vendored
Executable file
33
externals/vcpkg/ports/glib/vcpkg.json
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "glib",
|
||||
"version": "2.70.5",
|
||||
"port-version": 2,
|
||||
"description": "Portable, general-purpose utility library.",
|
||||
"homepage": "https://developer.gnome.org/glib/",
|
||||
"license": "LGPL-2.1-only",
|
||||
"supports": "!uwp & !(windows & static)",
|
||||
"dependencies": [
|
||||
"dirent",
|
||||
"gettext",
|
||||
"libffi",
|
||||
"libiconv",
|
||||
"pcre",
|
||||
{
|
||||
"name": "vcpkg-tool-meson",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"features": {
|
||||
"libmount": {
|
||||
"description": "Build with libmount support.",
|
||||
"supports": "linux",
|
||||
"dependencies": [
|
||||
"libmount"
|
||||
]
|
||||
},
|
||||
"selinux": {
|
||||
"description": "Build with selinux support."
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user