diff --git a/ports/atk/CMakeLists.txt b/ports/atk/CMakeLists.txt index e26d8649e41a1c..51c790f4dfda92 100644 --- a/ports/atk/CMakeLists.txt +++ b/ports/atk/CMakeLists.txt @@ -11,19 +11,20 @@ endif() # generate atkmarshal.c and atkmarshal.h source files # glib-genmarshal should be installed along with glib +find_package (Python COMPONENTS Interpreter) find_program(GLIB_GENMARSHAL glib-genmarshal PATH_SUFFIXES glib) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/atk) -message("Generating atkmarshal.h: ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --header") +message("Generating atkmarshal.h: ${Python_EXECUTABLE} ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --header") execute_process( - COMMAND ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --header + COMMAND ${Python_EXECUTABLE} ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --header WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/atk OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/atk/atkmarshal.h ) -message("Generating atkmarshal.c: ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --body") +message("Generating atkmarshal.c: ${Python_EXECUTABLE} ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --body") execute_process( - COMMAND ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --body + COMMAND ${Python_EXECUTABLE} ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --body WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/atk OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/atk/atkmarshal.c ) @@ -36,11 +37,7 @@ endif() add_definitions(-DHAVE_CONFIG_H) include_directories(. ./atk ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/atk) -find_path(GLIB_INCLUDE_DIR glib.h) -find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_VERSION}) -find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_VERSION}) -find_library(GLIB_GMODULE_LIBRARY gmodule-${GLIB_LIB_VERSION}) -set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GOBJECT_LIBRARY} ${GLIB_GMODULE_LIBRARY}) +find_package(unofficial-glib REQUIRED) if (WIN32 OR APPLE) find_path(LIBINTL_INCLUDE_DIR libintl.h) @@ -88,8 +85,8 @@ set(ATK_SOURCES add_library(atk ${ATK_SOURCES}) target_compile_definitions(atk PRIVATE ATK_COMPILATION ${ATK_EXPORT_MACRO} G_DISABLE_SINGLE_INCLUDES ATK_LOCALEDIR="/dummy/share/locale") -target_link_libraries(atk ${LIBINTL_LIBRARY} ${GLIB_LIBRARIES}) -target_include_directories(atk PRIVATE ${GLIB_INCLUDE_DIR} ${LIBINTL_INCLUDE_DIR}) +target_link_libraries(atk ${LIBINTL_LIBRARY} unofficial::glib::glib unofficial::glib::gobject unofficial::glib::gmodule) +target_include_directories(atk PRIVATE ${LIBINTL_INCLUDE_DIR}) set_target_properties(atk PROPERTIES OUTPUT_NAME atk-${ATK_DLL_SUFFIX} @@ -139,6 +136,3 @@ endif() message(STATUS "Link-time dependencies:") message(STATUS " " ${LIBINTL_LIBRARY}) -foreach(GL ${GLIB_LIBRARIES}) - message(STATUS " " ${GL}) -endforeach() diff --git a/ports/atk/portfile.cmake b/ports/atk/portfile.cmake index 34f6391410e8da..c829848d9b74d3 100644 --- a/ports/atk/portfile.cmake +++ b/ports/atk/portfile.cmake @@ -17,6 +17,10 @@ vcpkg_extract_source_archive_ex( fix-linux-config.patch ) +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path("${PYTHON3_DIR}") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( diff --git a/ports/atkmm/CONTROL b/ports/atkmm/CONTROL index caf3abb43f09c0..3ffe29ba2fab8f 100644 --- a/ports/atkmm/CONTROL +++ b/ports/atkmm/CONTROL @@ -1,5 +1,5 @@ Source: atkmm -Version: 2.24.2-2 +Version: 2.24.2-3 Homepage: https://www.gtkmm.org Description: atkmm is the official C++ interface for the ATK accessibility toolkit library. It may be used, for instance, by user interfaces implemented with gtkmm. Build-Depends: glib, gettext, atk, glibmm diff --git a/ports/atkmm/fix_properties.patch b/ports/atkmm/fix_properties.patch index a0392438690861..d1a18da9126815 100644 --- a/ports/atkmm/fix_properties.patch +++ b/ports/atkmm/fix_properties.patch @@ -16,7 +16,7 @@ index 421f5c3..0275e6e 100644 - .\atkmm;..\atk;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) -+ .\atkmm;..\atk;.;%(AdditionalIncludeDirectories) ++ .\atkmm;..\atk;.;$(CurrentInstalledDir)\include\glib-2.0;$(CurrentInstalledDir)\lib\glib-2.0\include;%(AdditionalIncludeDirectories) msvc_recommended_pragmas.h;%(ForcedIncludeFiles) true /d2Zi+ %(AdditionalOptions) diff --git a/ports/atkmm/portfile.cmake b/ports/atkmm/portfile.cmake index f8e9df2943cd2f..6d9fc541accbd7 100644 --- a/ports/atkmm/portfile.cmake +++ b/ports/atkmm/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_download_distfile(ARCHIVE @@ -26,6 +24,10 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/atkmm.sln TARGET atkmm PLATFORM ${VS_PLATFORM} + OPTIONS + # Remark: This is a workaround for now. When updating atkmm to a newer version, meson should be used instead + # CurrentInstalledDir is used by fix_properties.patch for glib-2.0 include dirs + /p:CurrentInstalledDir=${CURRENT_INSTALLED_DIR} USE_VCPKG_INTEGRATION ) diff --git a/ports/fluidsynth/fix-cmakelists.patch b/ports/fluidsynth/fix-cmakelists.patch new file mode 100644 index 00000000000000..6324425a210191 --- /dev/null +++ b/ports/fluidsynth/fix-cmakelists.patch @@ -0,0 +1,40 @@ +Index: fluidsynth/CMakeLists.txt +=================================================================== +--- fluidsynth.orig/CMakeLists.txt ++++ fluidsynth/CMakeLists.txt +@@ -446,21 +446,8 @@ if ( ASTYLE ) + endif(ASTYLE) + + if(NOT enable-pkgconfig) +- +- FIND_LIBRARY( GLIB_LIB NAMES glib glib-2.0 PATH GLIB_LIBRARY_DIR ) +- FIND_LIBRARY( GTHREAD_LIB NAMES gthread gthread-2.0 PATH GTHREAD_LIBRARY_DIR ) +- FIND_PATH( GLIBH_DIR glib.h PATH GLIB_INCLUDE_DIR ) +- FIND_PATH( GLIBCONF_DIR glibconfig.h PATH GLIBCONF_INCLUDE_DIR ) +- +- IF( GLIB_LIB MATCHES "GLIB_LIB-NOTFOUND" OR +- GTHREAD_LIB MATCHES "GTHREAD_LIB-NOTFOUND" OR +- GLIBH_DIR MATCHES "GLIBH_DIR-NOTFOUND" OR +- GLIBCONF_DIR MATCHES "GLIBCONF_DIR-NOTFOUND") +- message( WARNING "Not sure if I found GLIB, continuing anyway.") +- ENDIF() +- +- SET( GLIB_INCLUDE_DIRS ${GLIBH_DIR} ${GLIBCONF_DIR} ) +- SET( GLIB_LIBRARIES ${GLIB_LIB} ${GTHREAD_LIB} ) ++ find_package(unofficial-glib REQUIRED) ++ SET( GLIB_LIBRARIES unofficial::glib::glib unofficial::glib::gthread) + + message( STATUS "GLIB_INCLUDE_DIRS: " ${GLIB_INCLUDE_DIRS} ) + message( STATUS "GLIB_LIBRARIES: " ${GLIB_LIBRARIES} ) +Index: fluidsynth/src/CMakeLists.txt +=================================================================== +--- fluidsynth.orig/src/CMakeLists.txt ++++ fluidsynth/src/CMakeLists.txt +@@ -288,6 +288,7 @@ add_library ( libfluidsynth-OBJ OBJECT + ${public_main_HEADER} + ${VersionFilesOutputVariable} + ) ++target_link_libraries(libfluidsynth-OBJ unofficial::glib::glib) + + if ( LIBFLUID_CPPFLAGS ) + set_target_properties ( libfluidsynth-OBJ diff --git a/ports/fluidsynth/portfile.cmake b/ports/fluidsynth/portfile.cmake index 0bc33fd7210d03..8fe4b66887df12 100644 --- a/ports/fluidsynth/portfile.cmake +++ b/ports/fluidsynth/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES force-x86-gentables.patch + fix-cmakelists.patch ) vcpkg_configure_cmake( diff --git a/ports/gdk-pixbuf/CMakeLists.txt b/ports/gdk-pixbuf/CMakeLists.txt index b370a191740bae..03d72a53794a7b 100644 --- a/ports/gdk-pixbuf/CMakeLists.txt +++ b/ports/gdk-pixbuf/CMakeLists.txt @@ -10,7 +10,6 @@ find_package(ZLIB REQUIRED) find_package(PNG REQUIRED) find_package(unofficial-glib CONFIG REQUIRED) -find_path(GLIB_INCLUDE_DIR glib.h) if(WIN32) find_package(unofficial-gettext CONFIG REQUIRED) @@ -62,7 +61,6 @@ endif() add_library(gdk-pixbuf ${SOURCES}) target_include_directories(gdk-pixbuf PRIVATE - ${GLIB_INCLUDE_DIR} ${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR}) @@ -114,8 +112,7 @@ install(TARGETS gdk-pixbuf macro(gdk_add_tool TOOL_NAME) add_executable(${TOOL_NAME} ${ARGN}) - target_include_directories(${TOOL_NAME} PRIVATE ${GLIB_INCLUDE_DIR}) - target_link_libraries(${TOOL_NAME} gdk-pixbuf ${GLIB_LIBRARIES}) + target_link_libraries(${TOOL_NAME} gdk-pixbuf unofficial::glib::glib unofficial::glib::gthread unofficial::glib::gio unofficial::glib::gmodule unofficial::glib::gobject) install(TARGETS ${TOOL_NAME} RUNTIME DESTINATION tools/gdk-pixbuf) endmacro() diff --git a/ports/glib/CMakeLists.txt b/ports/glib/CMakeLists.txt deleted file mode 100644 index b49adf704968bf..00000000000000 --- a/ports/glib/CMakeLists.txt +++ /dev/null @@ -1,362 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(glib C) - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_C_STANDARD 11) - -if(MSVC) - add_compile_options(/utf-8) -endif() -set(GLIB_DLL_SUFFIX 2) -set(GLIB_LIB_SUFFIX 2.0) - -if(CMAKE_BUILD_TYPE STREQUAL Debug) - add_definitions(-DG_ENABLE_DEBUG) -endif() - -if(BUILD_SHARED_LIBS) - add_definitions(-DDLL_EXPORT) -endif() - -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) - -# find dependencies - -# zlib -find_package(ZLIB REQUIRED) -# pcre -find_path(PCRE_INCLUDE_DIR pcre.h) -if(CMAKE_BUILD_TYPE STREQUAL Debug) - set(PCRE_SUFFIX d) -endif() -find_library(PCRE_LIBRARY NAMES pcre${PCRE_SUFFIX} pcre) -# libiconv -find_package(unofficial-iconv REQUIRED) -# libffi -find_path(FFI_INCLUDE_DIR ffi.h) -find_library(FFI_LIBRARY NAMES ffi libffi) -get_filename_component(LIB_DIR "${FFI_LIBRARY}" DIRECTORY) -if(APPLE) - find_library(COREFOUNDATION_LIBRARY CoreFoundation) - find_library(FOUNDATION_LIBRARY Foundation) - find_library(CORESERVICES_LIBRARY CoreServices) - link_libraries(${CORESERVICES_LIBRARY} ${COREFOUNDATION_LIBRARY} ${FOUNDATION_LIBRARY}) -endif() - -if(WIN32 OR APPLE) - # libintl(gettext) - find_path(LIBINTL_INCLUDE_DIR libintl.h) - find_library(LIBINTL_LIBRARY NAMES intl libintl) -else() - set(LIBINTL_INCLUDE_DIR) - set(LIBINTL_LIBRARY) -endif() - -if(WIN32) - set(LIBRESOLV_LIBRARY) -else() - find_library(LIBRESOLV_LIBRARY NAMES resolv libresolv) -endif() - -#prepare config files -if(WIN32) - configure_file(config.h.win32 ${CMAKE_BINARY_DIR}/config/config.h COPYONLY) - configure_file(glib/glibconfig.h.win32 ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h COPYONLY) - configure_file(gmodule/gmoduleconf.h.win32 ${CMAKE_BINARY_DIR}/config/gmodule/gmoduleconf.h COPYONLY) - configure_file(gio/gnetworking.h.win32 ${CMAKE_BINARY_DIR}/config/gio/gnetworking.h COPYONLY) - add_definitions(-DHAVE_CONFIG_H) -else() - file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/config) - set(ENV{LIBFFI_LIBS} "${FFI_LIBRARY}") - set(ENV{PCRE_LIBS} "${PCRE_LIBRARY}") - set(ENV{LIBFFI_CFLAGS} "-I${FFI_INCLUDE_DIR}") - set(ENV{PCRE_CFLAGS} "-I${PCRE_INCLUDE_DIR}") - set(ENV{MSGFMT} "/bin/echo") - set(ENV{GMSGFMT} "/bin/echo") - string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_CONFIG) - set(CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPER_CONFIG}} -I${PCRE_INCLUDE_DIR}") - set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${UPPER_CONFIG}} -I${PCRE_INCLUDE_DIR}") - if(BUILD_SHARED_LIBS) - set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${UPPER_CONFIG}} -L${LIB_DIR}") - else() - set(LDFLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_${UPPER_CONFIG}} -L${LIB_DIR}") - endif() - - string(STRIP "${CXXFLAGS}" CXXFLAGS) - string(STRIP "${CFLAGS}" CFLAGS) - string(STRIP "${LDFLAGS}" LDFLAGS) - execute_process( - COMMAND "${CMAKE_SOURCE_DIR}/configure" - --disable-libelf - --disable-libmount - "CPPFLAGS=${CXXFLAGS}" - "CFLAGS=${CFLAGS}" - "LDFLAGS=${LDFLAGS}" - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/config - RESULT_VARIABLE res - ) - if(NOT res EQUAL 0) - message(FATAL_ERROR "Configure failed.") - endif() - - if (NOT HAVE_SELINUX) - file(READ "${CMAKE_BINARY_DIR}/config/config.h" CONFIG_H) - string(REPLACE "#define HAVE_SELINUX 1" - "#undef HAVE_SELINUX" CONFIG_H "${CONFIG_H}") - file(WRITE "${CMAKE_BINARY_DIR}/config/config.h" "${CONFIG_H}") - endif() - - add_definitions("-DGIO_MODULE_DIR=\"gio/modules\"") -endif() -install(FILES ${CMAKE_BINARY_DIR}/config/config.h DESTINATION include/glib) -install(FILES ${CMAKE_SOURCE_DIR}/msvc_recommended_pragmas.h DESTINATION include) - -include_directories(${CMAKE_BINARY_DIR}/config ${CMAKE_BINARY_DIR}/config/glib ${CMAKE_BINARY_DIR}/config/gio ${CMAKE_BINARY_DIR}/config/gmodule) -include_directories(. glib) - -# This macro purposely doesn't find nodes with sources that have additional properties set -# Most of such files in glib are PCRE sources which we don't use anyway -macro(extract_vcproj_sources VC_PROJECT OUT_VAR) - file(READ ${VC_PROJECT} ${VC_PROJECT}-CONTENTS) - STRING(REPLACE "\n" ";" ${VC_PROJECT}-CONTENTS "${${VC_PROJECT}-CONTENTS}") # split by lines - foreach(LINE ${${VC_PROJECT}-CONTENTS}) - if(LINE MATCHES "") - string(REPLACE "" "" LINE ${LINE}) - string(STRIP ${LINE} LINE) - file(TO_CMAKE_PATH ${LINE} LINE) - list(APPEND ${OUT_VAR} ${LINE}) - endif() - endforeach() -endmacro() - -# main module -extract_vcproj_sources(win32/vs14/glib.vcxproj GLIB_SOURCES) -list(APPEND GLIB_SOURCES glib/libcharset/localcharset.c) # modified internal version with prefixed symbols -if(NOT WIN32) - list(FILTER GLIB_SOURCES EXCLUDE REGEX "win32.c\$|win32-helper.c\$") - list(APPEND GLIB_SOURCES "glib/gthread-posix.c" "glib/giounix.c" "glib/gspawn.c" "glib/glib-unix.c") -endif() -add_library(glib ${GLIB_SOURCES}) -target_compile_definitions(glib PRIVATE GLIB_COMPILATION G_LOG_DOMAIN="GLib" LIBDIR="") -target_link_libraries(glib PRIVATE ${PCRE_LIBRARY} unofficial::iconv::libiconv unofficial::iconv::libcharset ${LIBINTL_LIBRARY}) -if(WIN32) - target_compile_definitions(glib PRIVATE USE_SYSTEM_PCRE) - target_link_libraries(glib PRIVATE ws2_32 winmm advapi32 ole32 shell32) -else() - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads REQUIRED) - target_link_libraries(glib PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) -endif() -target_include_directories(glib PRIVATE ${PCRE_INCLUDE_DIR} ${ICONV_INCLUDE_DIR}) -target_include_directories(glib PUBLIC $ $) -list(APPEND GLIB_TARGETS glib) -if(NOT GLIB_SKIP_HEADERS) - install(FILES glib/glib.h glib/glib-object.h ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h DESTINATION include) - - file(GLOB GLIB_HEADERS glib/*.h) - list(FILTER GLIB_HEADERS EXCLUDE REGEX "/glib.h\$|/glib-object.h\$|private.h\$") - install(FILES ${GLIB_HEADERS} DESTINATION include/glib) - - file(GLOB GLIB_DEP_HEADERS glib/deprecated/*.h) - install(FILES ${GLIB_DEP_HEADERS} DESTINATION include/glib/deprecated) -endif() - -# gthread -add_library(gthread gthread/gthread-impl.c) -target_compile_definitions(gthread PRIVATE G_LOG_DOMAIN="GThread") -target_link_libraries(gthread PRIVATE glib ${LIBINTL_LIBRARY}) -target_include_directories(gthread PRIVATE ${LIBINTL_INCLUDE_DIR}) -list(APPEND GLIB_TARGETS gthread) - -# gobject -extract_vcproj_sources(win32/vs14/gobject.vcxproj GOBJECT_SOURCES) -add_library(gobject ${GOBJECT_SOURCES}) -target_compile_definitions(gobject PRIVATE GOBJECT_COMPILATION G_LOG_DOMAIN="GLib-GObject") -target_link_libraries(gobject PRIVATE gthread glib ${FFI_LIBRARY}) -target_include_directories(gobject PRIVATE ${FFI_INCLUDE_DIR} PUBLIC $) -list(APPEND GLIB_TARGETS gobject) -if(NOT GLIB_SKIP_HEADERS) - file(GLOB GOBJECT_HEADERS gobject/*.h gobject/gobjectnotifyqueue.c) - list(FILTER GOBJECT_HEADERS EXCLUDE REGEX "private.h\$") - install(FILES ${GOBJECT_HEADERS} DESTINATION include/gobject) -endif() - -# gmodule -add_library(gmodule gmodule/gmodule.c) -target_compile_definitions(gmodule PRIVATE G_LOG_DOMAIN="GModule") -target_link_libraries(gmodule PRIVATE glib ${LIBINTL_LIBRARY}) -target_include_directories(gmodule PUBLIC $) -target_include_directories(gmodule PRIVATE ${LIBINTL_INCLUDE_DIR} PUBLIC $) -list(APPEND GLIB_TARGETS gmodule) -if(NOT GLIB_SKIP_HEADERS) - install(FILES gmodule/gmodule.h DESTINATION include) -endif() - -# gio subdirs -if(NOT WIN32) - file(GLOB XDGMIME_SOURCES gio/xdgmime/*.c) - add_library(xdgmime ${XDGMIME_SOURCES}) - target_compile_definitions(xdgmime PRIVATE -DXDG_PREFIX=_gio_xdg) - list(APPEND GLIB_TARGETS xdgmime) -endif() - -if(NOT WIN32 AND NOT APPLE) - file(GLOB INOTIFY_SOURCES gio/inotify/*.c) - add_library(inotify ${INOTIFY_SOURCES}) - target_link_libraries(inotify PRIVATE gmodule) - target_compile_definitions(inotify PRIVATE -DG_LOG_DOMAIN=\"GLib-GIO\" -DGIO_COMPILATION -DG_DISABLE_DEPRECATED) - list(APPEND GLIB_TARGETS inotify) -endif() - -if(APPLE) - file(GLOB KQUEUE_SOURCES gio/kqueue/*.c) - add_library(kqueue ${KQUEUE_SOURCES}) - target_link_libraries(kqueue PRIVATE gmodule) - target_compile_definitions(kqueue PRIVATE -DG_LOG_DOMAIN=\"GLib-GIO\" -DGIO_COMPILATION -DG_DISABLE_DEPRECATED) - list(APPEND GLIB_TARGETS kqueue) -endif() - -# gio -extract_vcproj_sources(win32/vs14/gio.vcxproj GIO_SOURCES) -if(NOT WIN32) - file(GLOB GIO_UNIX_SOURCES "gio/gunix*.c" "gio/g*notificationbackend.c" "gio/g*portal*.c") - list(APPEND GIO_SOURCES ${GIO_UNIX_SOURCES}) - list(APPEND GIO_SOURCES - "gio/gcontenttype.c" - "gio/gfiledescriptorbased.c" - "gio/gnetworkmonitornm.c" - "gio/xdp-dbus.c" - ) - list(FILTER GIO_SOURCES EXCLUDE REGEX "/gwin32[^/]+\$|win32/[^/]+\$|win32.c\$|gregistrysettingsbackend.c\$") - if(APPLE) - set_property(SOURCE - gio/gcocoanotificationbackend.c - gio/gosxappinfo.c - gio/gnextstepsettingsbackend.c - PROPERTY COMPILE_FLAGS "-x objective-c") - list(APPEND GIO_SOURCES - "gio/gnextstepsettingsbackend.c" - "gio/gosxappinfo.c" - ) - else() - list(APPEND GIO_SOURCES - "gio/gnetworkmonitornetlink.c" - "gio/gdesktopappinfo.c" - ) - list(FILTER GIO_SOURCES EXCLUDE REGEX "gcocoanotificationbackend.c\$") - endif() -endif() -if(NOT GLIB_SKIP_HEADERS) - file(GLOB GIO_HEADERS gio/*.h) - list(FILTER GIO_HEADERS EXCLUDE REGEX "private.h\$") - install(FILES ${GIO_HEADERS} ${CMAKE_BINARY_DIR}/config/gio/gnetworking.h DESTINATION include/gio) -endif() -add_library(gio ${GIO_SOURCES}) -target_compile_definitions(gio PRIVATE GIO_COMPILATION G_LOG_DOMAIN="GLib-GIO") -target_link_libraries(gio PRIVATE glib gmodule gobject ZLIB::ZLIB ${LIBRESOLV_LIBRARY} ${LIBINTL_LIBRARY}) -target_include_directories(gio PUBLIC $ $) -if(WIN32) - target_link_libraries(gio PRIVATE ws2_32 shlwapi dnsapi iphlpapi advapi32 shell32) -elseif(APPLE) - target_link_libraries(gio PRIVATE xdgmime kqueue) - if (HAVE_SELINUX) - target_link_libraries(gio PRIVATE selinux) - endif() -else() - target_link_libraries(gio PRIVATE xdgmime inotify) - if (HAVE_SELINUX) - target_link_libraries(gio PRIVATE selinux) - endif() -endif() -list(APPEND GLIB_TARGETS gio) - -foreach(GTARGET ${GLIB_TARGETS}) - set_target_properties(${GTARGET} PROPERTIES - OUTPUT_NAME ${GTARGET}-${GLIB_DLL_SUFFIX} - ARCHIVE_OUTPUT_NAME ${GTARGET}-${GLIB_LIB_SUFFIX}) -endforeach() - -macro(add_glib_tool TOOL_NAME) - add_executable(${TOOL_NAME} ${ARGN}) - if(WIN32) - target_link_libraries(${TOOL_NAME} glib ${LIBINTL_LIBRARY} shell32) - else() - target_link_libraries(${TOOL_NAME} glib ${LIBINTL_LIBRARY}) - endif() - target_compile_definitions(${TOOL_NAME} PRIVATE GLIB_COMPILATION) - list(APPEND GLIB_TOOLS ${TOOL_NAME}) -endmacro() - -macro(add_gio_tool TOOL_NAME) - add_executable(${TOOL_NAME} ${ARGN}) - target_link_libraries(${TOOL_NAME} PRIVATE glib gio gobject gmodule ${LIBINTL_LIBRARY}) - target_include_directories(${TOOL_NAME} PRIVATE gmodule gio) - target_compile_definitions(${TOOL_NAME} PRIVATE GIO_COMPILATION) - list(APPEND GLIB_TOOLS ${TOOL_NAME}) -endmacro() - -if(NOT GLIB_SKIP_TOOLS) - configure_file(gobject/glib-mkenums.in ${CMAKE_SOURCE_DIR}/gobject/glib-mkenums @ONLY) # uses GLIB_VERSION - install(FILES gobject/glib-mkenums DESTINATION tools/glib) - - configure_file(gio/gdbus-2.0/codegen/gdbus-codegen.in ${CMAKE_SOURCE_DIR}/gio/gdbus-2.0/codegen/gdbus-codegen COPYONLY) - install(FILES gio/gdbus-2.0/codegen/gdbus-codegen DESTINATION tools/glib) - file(GLOB CODEGEN_SOURCES gio/gdbus-2.0/codegen/*.py) - install(FILES ${CODEGEN_SOURCES} DESTINATION tools/glib/codegen) - - add_gio_tool(gdbus gio/gdbus-tool.c) - add_gio_tool(gio-querymodules gio/gio-querymodules.c) - file(GLOB GIO_TOOL_SOURCES gio/gio-tool*.c) - add_gio_tool(gio-tool ${GIO_TOOL_SOURCES}) - set_target_properties(gio-tool PROPERTIES OUTPUT_NAME gio) - add_gio_tool(glib-compile-resources gio/glib-compile-resources.c gio/gvdb/gvdb-builder.c) - add_gio_tool(glib-compile-schemas gio/glib-compile-schemas.c gio/gvdb/gvdb-builder.c) - add_gio_tool(gresource gio/gresource-tool.c) - add_gio_tool(gsettings gio/gsettings-tool.c) - - if(CMAKE_SIZEOF_VOID_P EQUAL 4) - set(WIN win32) - else() - set(WIN win64) - endif() - - add_glib_tool(glib-genmarshal gobject/glib-genmarshal.c) - if(WIN32) - add_glib_tool(gspawn-${WIN}-helper WIN32 glib/gspawn-win32-helper.c) - add_glib_tool(gspawn-${WIN}-helper-console glib/gspawn-win32-helper-console.c) - endif() - - install(TARGETS ${GLIB_TOOLS} RUNTIME DESTINATION tools/glib) -endif() - -install( - TARGETS ${GLIB_TARGETS} - EXPORT glib - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib -) -install( - EXPORT glib - NAMESPACE unofficial::glib:: - FILE unofficial-glib-targets.cmake - DESTINATION share/unofficial-glib -) -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/unofficial-glib-config.in.cmake - ${CMAKE_CURRENT_BINARY_DIR}/cmake/unofficial-glib-config.cmake - @ONLY -) -install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/unofficial-glib-config.cmake - DESTINATION share/unofficial-glib -) - -message(STATUS "Link-time dependencies:") -message(STATUS " " ${ZLIB_LIBRARIES}) -message(STATUS " " ${PCRE_LIBRARY}) -message(STATUS " " ${ICONV_LIBRARY}) -message(STATUS " " ${CHARSET_LIBRARY}) -message(STATUS " " ${FFI_LIBRARY}) -message(STATUS " " ${LIBINTL_LIBRARY}) diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL index e93f07ccb47612..bb332bc5771cc0 100644 --- a/ports/glib/CONTROL +++ b/ports/glib/CONTROL @@ -1,8 +1,8 @@ Source: glib -Version: 2.52.3-14-6 +Version: 2.64.3 Homepage: https://developer.gnome.org/glib/ Description: Portable, general-purpose utility library. -Build-Depends: zlib, pcre, libffi, gettext, libiconv +Build-Depends: zlib, pcre, libffi, gettext, libiconv, tool-meson, dirent Supports: !uwp Feature: selinux diff --git a/ports/glib/arm64-defines.patch b/ports/glib/arm64-defines.patch deleted file mode 100644 index c1b5181c65c077..00000000000000 --- a/ports/glib/arm64-defines.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff --git a/config.h.win32 b/config.h.win32 -index 999641d65..531843e0e 100644 ---- a/config.h.win32 -+++ b/config.h.win32 -@@ -728,7 +728,7 @@ - - /* The size of `void *', as computed by sizeof. */ - #ifdef _MSC_VER --#if (defined(_M_X64) || defined(_M_AMD64)) -+#if (defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64)) - #define SIZEOF_VOID_P 8 - #elif (defined(_M_IX86)) - #define SIZEOF_VOID_P 4 -diff --git a/config.h.win32.in b/config.h.win32.in -index eaf7e2818..049c5e9f4 100644 ---- a/config.h.win32.in -+++ b/config.h.win32.in -@@ -728,7 +728,7 @@ - - /* The size of `void *', as computed by sizeof. */ - #ifdef _MSC_VER --#if (defined(_M_X64) || defined(_M_AMD64)) -+#if (defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64)) - #define SIZEOF_VOID_P 8 - #elif (defined(_M_IX86)) - #define SIZEOF_VOID_P 4 -diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c -index 9b3619cb1..6400572a2 100644 ---- a/gio/gdbusaddress.c -+++ b/gio/gdbusaddress.c -@@ -1469,7 +1469,7 @@ get_session_address_dbus_launch (GError **error) - wcscat (args, rundll_path); - wcscat (args, L"\" "); - wcscat (args, gio_path_short); --#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) -+#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) - wcscat (args, L",g_win32_run_session_bus"); - #elif defined (_MSC_VER) - wcscat (args, L",_g_win32_run_session_bus@16"); -diff --git a/glib/gatomic.c b/glib/gatomic.c -index e3e49fab4..e257e4377 100644 ---- a/glib/gatomic.c -+++ b/glib/gatomic.c -@@ -474,7 +474,7 @@ gsize - #elif defined (G_PLATFORM_WIN32) - - #include --#if !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64) && !(defined _MSC_VER && _MSC_VER <= 1200) -+#if !defined(_M_ARM64) && !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64) && !(defined _MSC_VER && _MSC_VER <= 1200) - #define InterlockedAnd _InterlockedAnd - #define InterlockedOr _InterlockedOr - #define InterlockedXor _InterlockedXor -diff --git a/glib/glibconfig.h.win32 b/glib/glibconfig.h.win32 -index d9f893a15..b75a86f10 100644 ---- a/glib/glibconfig.h.win32 -+++ b/glib/glibconfig.h.win32 -@@ -68,7 +68,7 @@ typedef unsigned __int64 guint64; - #define G_GINT64_FORMAT "I64i" - #define G_GUINT64_FORMAT "I64u" - --#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) -+#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) - - #define GLIB_SIZEOF_VOID_P 8 - #define GLIB_SIZEOF_LONG 4 -diff --git a/glib/glibconfig.h.win32.in b/glib/glibconfig.h.win32.in -index 9a91c5e96..f0b88c976 100644 ---- a/glib/glibconfig.h.win32.in -+++ b/glib/glibconfig.h.win32.in -@@ -68,7 +68,7 @@ typedef unsigned __int64 guint64; - #define G_GINT64_FORMAT "I64i" - #define G_GUINT64_FORMAT "I64u" - --#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) -+#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) - - #define GLIB_SIZEOF_VOID_P 8 - #define GLIB_SIZEOF_LONG 4 diff --git a/ports/glib/cmake/install_headers.cmake b/ports/glib/cmake/install_headers.cmake deleted file mode 100644 index 7840f34ab983b4..00000000000000 --- a/ports/glib/cmake/install_headers.cmake +++ /dev/null @@ -1,255 +0,0 @@ -# generated from glib-install.props -install(FILES glib/glib.h DESTINATION include) -install(FILES ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h DESTINATION include) -install(FILES glib/glib-object.h DESTINATION include) -install(FILES glib/deprecated/gallocator.h DESTINATION include/glib/deprecated) -install(FILES glib/deprecated/gcache.h DESTINATION include/glib/deprecated) -install(FILES glib/deprecated/gcompletion.h DESTINATION include/glib/deprecated) -install(FILES glib/deprecated/gmain.h DESTINATION include/glib/deprecated) -install(FILES glib/deprecated/grel.h DESTINATION include/glib/deprecated) -install(FILES glib/deprecated/gthread.h DESTINATION include/glib/deprecated) -install(FILES glib/glib-autocleanups.h DESTINATION include/glib) -install(FILES glib/galloca.h DESTINATION include/glib) -install(FILES glib/garray.h DESTINATION include/glib) -install(FILES glib/gasyncqueue.h DESTINATION include/glib) -install(FILES glib/gatomic.h DESTINATION include/glib) -install(FILES glib/gbacktrace.h DESTINATION include/glib) -install(FILES glib/gbase64.h DESTINATION include/glib) -install(FILES glib/gbitlock.h DESTINATION include/glib) -install(FILES glib/gbookmarkfile.h DESTINATION include/glib) -install(FILES glib/gbytes.h DESTINATION include/glib) -install(FILES glib/gcharset.h DESTINATION include/glib) -install(FILES glib/gchecksum.h DESTINATION include/glib) -install(FILES glib/gconvert.h DESTINATION include/glib) -install(FILES glib/gdataset.h DESTINATION include/glib) -install(FILES glib/gdate.h DESTINATION include/glib) -install(FILES glib/gdatetime.h DESTINATION include/glib) -install(FILES glib/gdir.h DESTINATION include/glib) -install(FILES glib/genviron.h DESTINATION include/glib) -install(FILES glib/gerror.h DESTINATION include/glib) -install(FILES glib/gfileutils.h DESTINATION include/glib) -install(FILES glib/ggettext.h DESTINATION include/glib) -install(FILES glib/ghash.h DESTINATION include/glib) -install(FILES glib/ghmac.h DESTINATION include/glib) -install(FILES glib/ghook.h DESTINATION include/glib) -install(FILES glib/ghostutils.h DESTINATION include/glib) -install(FILES glib/gi18n.h DESTINATION include/glib) -install(FILES glib/gi18n-lib.h DESTINATION include/glib) -install(FILES glib/giochannel.h DESTINATION include/glib) -install(FILES glib/gkeyfile.h DESTINATION include/glib) -install(FILES glib/glist.h DESTINATION include/glib) -install(FILES glib/gmacros.h DESTINATION include/glib) -install(FILES glib/gmain.h DESTINATION include/glib) -install(FILES glib/gmappedfile.h DESTINATION include/glib) -install(FILES glib/gmarkup.h DESTINATION include/glib) -install(FILES glib/gmem.h DESTINATION include/glib) -install(FILES glib/gmessages.h DESTINATION include/glib) -install(FILES glib/gnode.h DESTINATION include/glib) -install(FILES glib/goption.h DESTINATION include/glib) -install(FILES glib/gpattern.h DESTINATION include/glib) -install(FILES glib/gpoll.h DESTINATION include/glib) -install(FILES glib/gprimes.h DESTINATION include/glib) -install(FILES glib/gqsort.h DESTINATION include/glib) -install(FILES glib/gquark.h DESTINATION include/glib) -install(FILES glib/gqueue.h DESTINATION include/glib) -install(FILES glib/grand.h DESTINATION include/glib) -install(FILES glib/gregex.h DESTINATION include/glib) -install(FILES glib/gscanner.h DESTINATION include/glib) -install(FILES glib/gsequence.h DESTINATION include/glib) -install(FILES glib/gshell.h DESTINATION include/glib) -install(FILES glib/gslice.h DESTINATION include/glib) -install(FILES glib/gslist.h DESTINATION include/glib) -install(FILES glib/gspawn.h DESTINATION include/glib) -install(FILES glib/gstdio.h DESTINATION include/glib) -install(FILES glib/gstrfuncs.h DESTINATION include/glib) -install(FILES glib/gtestutils.h DESTINATION include/glib) -install(FILES glib/gstring.h DESTINATION include/glib) -install(FILES glib/gstringchunk.h DESTINATION include/glib) -install(FILES glib/gthread.h DESTINATION include/glib) -install(FILES glib/gthreadpool.h DESTINATION include/glib) -install(FILES glib/gtimer.h DESTINATION include/glib) -install(FILES glib/gtimezone.h DESTINATION include/glib) -install(FILES glib/gtrashstack.h DESTINATION include/glib) -install(FILES glib/gtree.h DESTINATION include/glib) -install(FILES glib/gtypes.h DESTINATION include/glib) -install(FILES glib/gunicode.h DESTINATION include/glib) -install(FILES glib/gurifuncs.h DESTINATION include/glib) -install(FILES glib/gutils.h DESTINATION include/glib) -install(FILES glib/guuid.h DESTINATION include/glib) -install(FILES glib/gvarianttype.h DESTINATION include/glib) -install(FILES glib/gvariant.h DESTINATION include/glib) -install(FILES glib/gversion.h DESTINATION include/glib) -install(FILES glib/gversionmacros.h DESTINATION include/glib) -install(FILES glib/gwin32.h DESTINATION include/glib) -install(FILES glib/gprintf.h DESTINATION include/glib) -install(FILES gmodule/gmodule.h DESTINATION include) -install(FILES gobject/gobject-autocleanups.h DESTINATION include/gobject) -install(FILES gobject/glib-types.h DESTINATION include/gobject) -install(FILES gobject/gbinding.h DESTINATION include/gobject) -install(FILES gobject/gboxed.h DESTINATION include/gobject) -install(FILES gobject/gclosure.h DESTINATION include/gobject) -install(FILES gobject/genums.h DESTINATION include/gobject) -install(FILES gobject/gmarshal.h DESTINATION include/gobject) -install(FILES gobject/gobject.h DESTINATION include/gobject) -install(FILES gobject/gparam.h DESTINATION include/gobject) -install(FILES gobject/gparamspecs.h DESTINATION include/gobject) -install(FILES gobject/gsignal.h DESTINATION include/gobject) -install(FILES gobject/gsourceclosure.h DESTINATION include/gobject) -install(FILES gobject/gtype.h DESTINATION include/gobject) -install(FILES gobject/gtypemodule.h DESTINATION include/gobject) -install(FILES gobject/gtypeplugin.h DESTINATION include/gobject) -install(FILES gobject/gvalue.h DESTINATION include/gobject) -install(FILES gobject/gvaluearray.h DESTINATION include/gobject) -install(FILES gobject/gvaluecollector.h DESTINATION include/gobject) -install(FILES gobject/gvaluetypes.h DESTINATION include/gobject) -install(FILES gobject/gobjectnotifyqueue.c DESTINATION include/gobject) -install(FILES gio/gappinfo.h DESTINATION include/gio) -install(FILES gio/gasyncinitable.h DESTINATION include/gio) -install(FILES gio/gasyncresult.h DESTINATION include/gio) -install(FILES gio/gbufferedinputstream.h DESTINATION include/gio) -install(FILES gio/gbufferedoutputstream.h DESTINATION include/gio) -install(FILES gio/gbytesicon.h DESTINATION include/gio) -install(FILES gio/gcancellable.h DESTINATION include/gio) -install(FILES gio/gcontenttype.h DESTINATION include/gio) -install(FILES gio/gcharsetconverter.h DESTINATION include/gio) -install(FILES gio/gconverter.h DESTINATION include/gio) -install(FILES gio/gconverterinputstream.h DESTINATION include/gio) -install(FILES gio/gconverteroutputstream.h DESTINATION include/gio) -install(FILES gio/gdatagrambased.h DESTINATION include/gio) -install(FILES gio/gdatainputstream.h DESTINATION include/gio) -install(FILES gio/gdataoutputstream.h DESTINATION include/gio) -install(FILES gio/gdrive.h DESTINATION include/gio) -install(FILES gio/gemblem.h DESTINATION include/gio) -install(FILES gio/gemblemedicon.h DESTINATION include/gio) -install(FILES gio/gfile.h DESTINATION include/gio) -install(FILES gio/gfileattribute.h DESTINATION include/gio) -install(FILES gio/gfileenumerator.h DESTINATION include/gio) -install(FILES gio/gfileicon.h DESTINATION include/gio) -install(FILES gio/gfileinfo.h DESTINATION include/gio) -install(FILES gio/gfileinputstream.h DESTINATION include/gio) -install(FILES gio/gfilemonitor.h DESTINATION include/gio) -install(FILES gio/gfilenamecompleter.h DESTINATION include/gio) -install(FILES gio/gfileoutputstream.h DESTINATION include/gio) -install(FILES gio/gfileiostream.h DESTINATION include/gio) -install(FILES gio/gfilterinputstream.h DESTINATION include/gio) -install(FILES gio/gfilteroutputstream.h DESTINATION include/gio) -install(FILES gio/gicon.h DESTINATION include/gio) -install(FILES gio/ginetaddress.h DESTINATION include/gio) -install(FILES gio/ginetaddressmask.h DESTINATION include/gio) -install(FILES gio/ginetsocketaddress.h DESTINATION include/gio) -install(FILES gio/ginputstream.h DESTINATION include/gio) -install(FILES gio/ginitable.h DESTINATION include/gio) -install(FILES gio/gio.h DESTINATION include/gio) -install(FILES gio/gio-autocleanups.h DESTINATION include/gio) -install(FILES gio/giotypes.h DESTINATION include/gio) -install(FILES gio/gioenums.h DESTINATION include/gio) -install(FILES gio/gioerror.h DESTINATION include/gio) -install(FILES gio/giomodule.h DESTINATION include/gio) -install(FILES gio/gioscheduler.h DESTINATION include/gio) -install(FILES gio/giostream.h DESTINATION include/gio) -install(FILES gio/gloadableicon.h DESTINATION include/gio) -install(FILES gio/gmount.h DESTINATION include/gio) -install(FILES gio/gmemoryinputstream.h DESTINATION include/gio) -install(FILES gio/gmemoryoutputstream.h DESTINATION include/gio) -install(FILES gio/gmountoperation.h DESTINATION include/gio) -install(FILES gio/gnativevolumemonitor.h DESTINATION include/gio) -install(FILES gio/gnetworkaddress.h DESTINATION include/gio) -install(FILES gio/gnetworkmonitor.h DESTINATION include/gio) -install(FILES gio/gnetworkservice.h DESTINATION include/gio) -install(FILES gio/goutputstream.h DESTINATION include/gio) -install(FILES gio/gpermission.h DESTINATION include/gio) -install(FILES gio/gpollableinputstream.h DESTINATION include/gio) -install(FILES gio/gpollableoutputstream.h DESTINATION include/gio) -install(FILES gio/gpollableutils.h DESTINATION include/gio) -install(FILES gio/gproxyaddress.h DESTINATION include/gio) -install(FILES gio/gproxy.h DESTINATION include/gio) -install(FILES gio/gproxyaddressenumerator.h DESTINATION include/gio) -install(FILES gio/gproxyresolver.h DESTINATION include/gio) -install(FILES gio/gresolver.h DESTINATION include/gio) -install(FILES gio/gresource.h DESTINATION include/gio) -install(FILES gio/gseekable.h DESTINATION include/gio) -install(FILES gio/gsimpleasyncresult.h DESTINATION include/gio) -install(FILES gio/gsimpleiostream.h DESTINATION include/gio) -install(FILES gio/gsimplepermission.h DESTINATION include/gio) -install(FILES gio/gsocket.h DESTINATION include/gio) -install(FILES gio/gsocketaddress.h DESTINATION include/gio) -install(FILES gio/gsocketaddressenumerator.h DESTINATION include/gio) -install(FILES gio/gsocketclient.h DESTINATION include/gio) -install(FILES gio/gsocketconnectable.h DESTINATION include/gio) -install(FILES gio/gsocketconnection.h DESTINATION include/gio) -install(FILES gio/gsocketcontrolmessage.h DESTINATION include/gio) -install(FILES gio/gsocketlistener.h DESTINATION include/gio) -install(FILES gio/gsocketservice.h DESTINATION include/gio) -install(FILES gio/gsrvtarget.h DESTINATION include/gio) -install(FILES gio/gsimpleproxyresolver.h DESTINATION include/gio) -install(FILES gio/gtask.h DESTINATION include/gio) -install(FILES gio/gsubprocess.h DESTINATION include/gio) -install(FILES gio/gsubprocesslauncher.h DESTINATION include/gio) -install(FILES gio/gtcpconnection.h DESTINATION include/gio) -install(FILES gio/gtcpwrapperconnection.h DESTINATION include/gio) -install(FILES gio/gthreadedsocketservice.h DESTINATION include/gio) -install(FILES gio/gthemedicon.h DESTINATION include/gio) -install(FILES gio/gtlsbackend.h DESTINATION include/gio) -install(FILES gio/gtlscertificate.h DESTINATION include/gio) -install(FILES gio/gtlsclientconnection.h DESTINATION include/gio) -install(FILES gio/gtlsconnection.h DESTINATION include/gio) -install(FILES gio/gtlsdatabase.h DESTINATION include/gio) -install(FILES gio/gtlsfiledatabase.h DESTINATION include/gio) -install(FILES gio/gtlsinteraction.h DESTINATION include/gio) -install(FILES gio/gtlspassword.h DESTINATION include/gio) -install(FILES gio/gtlsserverconnection.h DESTINATION include/gio) -install(FILES gio/gdtlsconnection.h DESTINATION include/gio) -install(FILES gio/gdtlsclientconnection.h DESTINATION include/gio) -install(FILES gio/gdtlsserverconnection.h DESTINATION include/gio) -install(FILES gio/gvfs.h DESTINATION include/gio) -install(FILES gio/gvolume.h DESTINATION include/gio) -install(FILES gio/gvolumemonitor.h DESTINATION include/gio) -install(FILES gio/gzlibcompressor.h DESTINATION include/gio) -install(FILES gio/gzlibdecompressor.h DESTINATION include/gio) -install(FILES gio/glistmodel.h DESTINATION include/gio) -install(FILES gio/gliststore.h DESTINATION include/gio) -install(FILES gio/gapplication.h DESTINATION include/gio) -install(FILES gio/gapplicationcommandline.h DESTINATION include/gio) -install(FILES gio/gactiongroup.h DESTINATION include/gio) -install(FILES gio/gactionmap.h DESTINATION include/gio) -install(FILES gio/gsimpleactiongroup.h DESTINATION include/gio) -install(FILES gio/gremoteactiongroup.h DESTINATION include/gio) -install(FILES gio/gactiongroupexporter.h DESTINATION include/gio) -install(FILES gio/gdbusactiongroup.h DESTINATION include/gio) -install(FILES gio/gaction.h DESTINATION include/gio) -install(FILES gio/gpropertyaction.h DESTINATION include/gio) -install(FILES gio/gsimpleaction.h DESTINATION include/gio) -install(FILES gio/gmenumodel.h DESTINATION include/gio) -install(FILES gio/gmenu.h DESTINATION include/gio) -install(FILES gio/gmenuexporter.h DESTINATION include/gio) -install(FILES gio/gdbusmenumodel.h DESTINATION include/gio) -install(FILES gio/gnotification.h DESTINATION include/gio) -install(FILES gio/gsettingsbackend.h DESTINATION include/gio) -install(FILES gio/gsettingsschema.h DESTINATION include/gio) -install(FILES gio/gsettings.h DESTINATION include/gio) -install(FILES gio/gdbusauthobserver.h DESTINATION include/gio) -install(FILES gio/gcredentials.h DESTINATION include/gio) -install(FILES gio/gdbusutils.h DESTINATION include/gio) -install(FILES gio/gdbuserror.h DESTINATION include/gio) -install(FILES gio/gdbusaddress.h DESTINATION include/gio) -install(FILES gio/gdbusconnection.h DESTINATION include/gio) -install(FILES gio/gdbusmessage.h DESTINATION include/gio) -install(FILES gio/gdbusnameowning.h DESTINATION include/gio) -install(FILES gio/gdbusnamewatching.h DESTINATION include/gio) -install(FILES gio/gdbusproxy.h DESTINATION include/gio) -install(FILES gio/gdbusintrospection.h DESTINATION include/gio) -install(FILES gio/gdbusmethodinvocation.h DESTINATION include/gio) -install(FILES gio/gdbusserver.h DESTINATION include/gio) -install(FILES gio/gdbusinterface.h DESTINATION include/gio) -install(FILES gio/gdbusinterfaceskeleton.h DESTINATION include/gio) -install(FILES gio/gdbusobject.h DESTINATION include/gio) -install(FILES gio/gdbusobjectskeleton.h DESTINATION include/gio) -install(FILES gio/gdbusobjectproxy.h DESTINATION include/gio) -install(FILES gio/gdbusobjectmanager.h DESTINATION include/gio) -install(FILES gio/gdbusobjectmanagerclient.h DESTINATION include/gio) -install(FILES gio/gdbusobjectmanagerserver.h DESTINATION include/gio) -install(FILES gio/gtestdbus.h DESTINATION include/gio) -install(FILES gio/gioenumtypes.h DESTINATION include/gio) -install(FILES ${CMAKE_BINARY_DIR}/config/gio/gnetworking.h DESTINATION include/gio) -install(FILES gio/gwin32inputstream.h DESTINATION include/gio) -install(FILES gio/gwin32outputstream.h DESTINATION include/gio) diff --git a/ports/glib/cmake/unofficial-glib-config.cmake b/ports/glib/cmake/unofficial-glib-config.cmake new file mode 100644 index 00000000000000..ea832de7347ade --- /dev/null +++ b/ports/glib/cmake/unofficial-glib-config.cmake @@ -0,0 +1,7 @@ +include(CMakeFindDependencyMacro) +find_dependency(unofficial-iconv) +if(NOT WIN32) + find_dependency(Threads) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-glib-targets.cmake") diff --git a/ports/glib/cmake/unofficial-glib-targets-debug.cmake b/ports/glib/cmake/unofficial-glib-targets-debug.cmake new file mode 100644 index 00000000000000..3d61e58a4d7e59 --- /dev/null +++ b/ports/glib/cmake/unofficial-glib-targets-debug.cmake @@ -0,0 +1,64 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Debug". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "unofficial::glib::glib" for configuration "Debug" +set_property(TARGET unofficial::glib::glib APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(unofficial::glib::glib PROPERTIES + IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/debug/lib/glib-2.0.lib" + IMPORTED_LINK_DEPENDENT_LIBRARIES_DEBUG "unofficial::iconv::libiconv;unofficial::iconv::libcharset" + IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/bin/glib-2.0-0.dll" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unofficial::glib::glib ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unofficial::glib::glib "${_IMPORT_PREFIX}/debug/lib/glib-2.0.lib" "${_IMPORT_PREFIX}/debug/bin/glib-2.0-0.dll" ) + +# Import target "unofficial::glib::gthread" for configuration "Debug" +set_property(TARGET unofficial::glib::gthread APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(unofficial::glib::gthread PROPERTIES + IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/debug/lib/gthread-2.0.lib" + IMPORTED_LINK_DEPENDENT_LIBRARIES_DEBUG "unofficial::glib::glib" + IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/bin/gthread-2.0-0.dll" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unofficial::glib::gthread ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unofficial::glib::gthread "${_IMPORT_PREFIX}/debug/lib/gthread-2.0.lib" "${_IMPORT_PREFIX}/debug/bin/gthread-2.0-0.dll" ) + +# Import target "unofficial::glib::gobject" for configuration "Debug" +set_property(TARGET unofficial::glib::gobject APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(unofficial::glib::gobject PROPERTIES + IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/debug/lib/gobject-2.0.lib" + IMPORTED_LINK_DEPENDENT_LIBRARIES_DEBUG "unofficial::glib::gthread;unofficial::glib::glib" + IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/bin/gobject-2.0-0.dll" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unofficial::glib::gobject ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unofficial::glib::gobject "${_IMPORT_PREFIX}/debug/lib/gobject-2.0.lib" "${_IMPORT_PREFIX}/debug/bin/gobject-2.0-0.dll" ) + +# Import target "unofficial::glib::gmodule" for configuration "Debug" +set_property(TARGET unofficial::glib::gmodule APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(unofficial::glib::gmodule PROPERTIES + IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/debug/lib/gmodule-2.0.lib" + IMPORTED_LINK_DEPENDENT_LIBRARIES_DEBUG "unofficial::glib::glib" + IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/bin/gmodule-2.0-0.dll" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unofficial::glib::gmodule ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unofficial::glib::gmodule "${_IMPORT_PREFIX}/debug/lib/gmodule-2.0.lib" "${_IMPORT_PREFIX}/debug/bin/gmodule-2.0-0.dll" ) + +# Import target "unofficial::glib::gio" for configuration "Debug" +set_property(TARGET unofficial::glib::gio APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(unofficial::glib::gio PROPERTIES + IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/debug/lib/gio-2.0.lib" + IMPORTED_LINK_DEPENDENT_LIBRARIES_DEBUG "unofficial::glib::glib;unofficial::glib::gmodule;unofficial::glib::gobject" + IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/bin/gio-2.0-0.dll" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unofficial::glib::gio ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unofficial::glib::gio "${_IMPORT_PREFIX}/debug/lib/gio-2.0.lib" "${_IMPORT_PREFIX}/debug/bin/gio-2.0-0.dll" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/ports/glib/cmake/unofficial-glib-targets-release.cmake b/ports/glib/cmake/unofficial-glib-targets-release.cmake new file mode 100644 index 00000000000000..3eee45eec48d7e --- /dev/null +++ b/ports/glib/cmake/unofficial-glib-targets-release.cmake @@ -0,0 +1,64 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Release". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "unofficial::glib::glib" for configuration "Release" +set_property(TARGET unofficial::glib::glib APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(unofficial::glib::glib PROPERTIES + IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/glib-2.0.lib" + IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE "unofficial::iconv::libiconv;unofficial::iconv::libcharset" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/glib-2.0-0.dll" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unofficial::glib::glib ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unofficial::glib::glib "${_IMPORT_PREFIX}/lib/glib-2.0.lib" "${_IMPORT_PREFIX}/bin/glib-2.0-0.dll" ) + +# Import target "unofficial::glib::gthread" for configuration "Release" +set_property(TARGET unofficial::glib::gthread APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(unofficial::glib::gthread PROPERTIES + IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/gthread-2.0.lib" + IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE "unofficial::glib::glib" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/gthread-2.0-0.dll" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unofficial::glib::gthread ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unofficial::glib::gthread "${_IMPORT_PREFIX}/lib/gthread-2.0.lib" "${_IMPORT_PREFIX}/bin/gthread-2.0-0.dll" ) + +# Import target "unofficial::glib::gobject" for configuration "Release" +set_property(TARGET unofficial::glib::gobject APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(unofficial::glib::gobject PROPERTIES + IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/gobject-2.0.lib" + IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE "unofficial::glib::gthread;unofficial::glib::glib" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/gobject-2.0-0.dll" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unofficial::glib::gobject ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unofficial::glib::gobject "${_IMPORT_PREFIX}/lib/gobject-2.0.lib" "${_IMPORT_PREFIX}/bin/gobject-2.0-0.dll" ) + +# Import target "unofficial::glib::gmodule" for configuration "Release" +set_property(TARGET unofficial::glib::gmodule APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(unofficial::glib::gmodule PROPERTIES + IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/gmodule-2.0.lib" + IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE "unofficial::glib::glib" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/gmodule-2.0-0.dll" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unofficial::glib::gmodule ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unofficial::glib::gmodule "${_IMPORT_PREFIX}/lib/gmodule-2.0.lib" "${_IMPORT_PREFIX}/bin/gmodule-2.0-0.dll" ) + +# Import target "unofficial::glib::gio" for configuration "Release" +set_property(TARGET unofficial::glib::gio APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(unofficial::glib::gio PROPERTIES + IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/gio-2.0.lib" + IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE "unofficial::glib::glib;unofficial::glib::gmodule;unofficial::glib::gobject" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/gio-2.0-0.dll" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unofficial::glib::gio ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unofficial::glib::gio "${_IMPORT_PREFIX}/lib/gio-2.0.lib" "${_IMPORT_PREFIX}/bin/gio-2.0-0.dll" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/ports/glib/cmake/unofficial-glib-targets.cmake b/ports/glib/cmake/unofficial-glib-targets.cmake new file mode 100644 index 00000000000000..50d200ebda38a6 --- /dev/null +++ b/ports/glib/cmake/unofficial-glib-targets.cmake @@ -0,0 +1,117 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unofficial::glib::glib unofficial::glib::gthread unofficial::glib::gobject unofficial::glib::gmodule unofficial::glib::gio) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unofficial::glib::glib +add_library(unofficial::glib::glib SHARED IMPORTED) + +set_target_properties(unofficial::glib::glib PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/glib-2.0;${_IMPORT_PREFIX}/lib/glib-2.0/include" +) + +# Create imported target unofficial::glib::gthread +add_library(unofficial::glib::gthread SHARED IMPORTED) + +# Create imported target unofficial::glib::gobject +add_library(unofficial::glib::gobject SHARED IMPORTED) + +set_target_properties(unofficial::glib::gobject PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/glib-2.0" +) + +# Create imported target unofficial::glib::gmodule +add_library(unofficial::glib::gmodule SHARED IMPORTED) + +set_target_properties(unofficial::glib::gmodule PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/glib-2.0" +) + +# Create imported target unofficial::glib::gio +add_library(unofficial::glib::gio SHARED IMPORTED) + +set_target_properties(unofficial::glib::gio PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/glib-2.0/gio" +) + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unofficial-glib-targets-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/ports/glib/fix-arm-builds.patch b/ports/glib/fix-arm-builds.patch index 257ee75c6b35c9..f07c00cc8bf402 100644 --- a/ports/glib/fix-arm-builds.patch +++ b/ports/glib/fix-arm-builds.patch @@ -1,31 +1,8 @@ -diff --git a/gio/tests/plugin_resources.c b/gio/tests/plugin_resources.c -index 4c1b0214b..bbfc7ae07 100644 ---- a/gio/tests/plugin_resources.c -+++ b/gio/tests/plugin_resources.c -@@ -80,13 +80,13 @@ GResource *_g_plugin_get_resource (void) - */ - - /* We need to account for differences between the mangling of symbols -- * for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed -- * with an underscore but symbols on x64 are not. -+ * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed -+ * with an underscore but symbols on x64/ARM/ARM64 are not. - */ --#ifdef _WIN64 --#define G_MSVC_SYMBOL_PREFIX "" --#else -+#ifdef _M_IX86 - #define G_MSVC_SYMBOL_PREFIX "_" -+#else -+#define G_MSVC_SYMBOL_PREFIX "" - #endif - - #define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX) -diff --git a/glib/gconstructor.h b/glib/gconstructor.h -index dccb0314c..fa1139302 100644 ---- a/glib/gconstructor.h -+++ b/glib/gconstructor.h -@@ -40,13 +40,13 @@ +Index: 2.64.3-9640cd793d/glib/gconstructor.h +=================================================================== +--- 2.64.3-9640cd793d.orig/glib/gconstructor.h ++++ 2.64.3-9640cd793d/glib/gconstructor.h +@@ -42,13 +42,13 @@ */ /* We need to account for differences between the mangling of symbols diff --git a/ports/glib/fix-gdbus-codegen.patch b/ports/glib/fix-gdbus-codegen.patch new file mode 100644 index 00000000000000..4a57e23373566f --- /dev/null +++ b/ports/glib/fix-gdbus-codegen.patch @@ -0,0 +1,13 @@ +Index: 2.64.3-b4421e4dd5/gio/gdbus-2.0/codegen/gdbus-codegen.in +=================================================================== +--- 2.64.3-b4421e4dd5.orig/gio/gdbus-2.0/codegen/gdbus-codegen.in ++++ 2.64.3-b4421e4dd5/gio/gdbus-2.0/codegen/gdbus-codegen.in +@@ -47,7 +47,7 @@ path = os.path.abspath(path) + # In these cases our installation cannot be relocatable, but at least we should + # be able to find the codegen module. + if not os.path.isfile(os.path.join(path, 'codegen', 'codegen_main.py')): +- path = os.path.join('@DATADIR@', 'glib-2.0') ++ path = os.path.join(os.path.join(os.path.dirname(__file__), '..', '..', 'share'), 'glib-2.0') + + sys.path.insert(0, path) + from codegen import codegen_main diff --git a/ports/glib/fix-meson.patch b/ports/glib/fix-meson.patch new file mode 100644 index 00000000000000..3a6ad45d860a01 --- /dev/null +++ b/ports/glib/fix-meson.patch @@ -0,0 +1,208 @@ +Index: 2.64.3-9640cd793d/meson.build +=================================================================== +--- 2.64.3-9640cd793d.orig/meson.build ++++ 2.64.3-9640cd793d/meson.build +@@ -51,6 +51,7 @@ library_version = '@0@.@1@.@2@'.format(s + darwin_versions = [current + 1, '@0@.@1@'.format(current + 1, interface_age)] + + configinc = include_directories('.') ++libintlinc = include_directories(get_option('libintlinc')) + glibinc = include_directories('glib') + gobjectinc = include_directories('gobject') + gmoduleinc = include_directories('gmodule') +@@ -84,7 +85,7 @@ installed_tests_template = files('templa + installed_tests_template_tap = files('template-tap.test.in') + + # Don’t build the tests unless we can run them (either natively, in an exe wrapper, or by installing them for later use) +-build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper()) or installed_tests_enabled ++build_tests = get_option('build_tests') and (not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper()) or installed_tests_enabled) + + add_project_arguments('-D_GNU_SOURCE', language: 'c') + +@@ -1828,12 +1829,7 @@ glibconfig_conf.set10('G_HAVE_GROWING_ST + # the built-in implementation + iconv_opt = get_option('iconv') + if host_system == 'windows' +- libiconv = [] +- # 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' +- warning('-Diconv was set to @0@, which was ignored') +- endif ++ libiconv = [cc.find_library('iconv', dirs: get_option('libintldir'))] + else + found_iconv = false + if ['auto', 'libc'].contains(iconv_opt) and cc.has_function('iconv_open') +@@ -1920,7 +1916,7 @@ if cc.has_function('ngettext') + libintl = [] + have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset') + else +- libintl = cc.find_library('intl', required : false) ++ libintl = cc.find_library('intl', dirs: get_option('libintldir')) + if not libintl.found() + libintl = subproject('proxy-libintl').get_variable('intl_dep') + have_bind_textdomain_codeset = true # proxy-libintl supports it +@@ -2070,7 +2066,7 @@ endif + + glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline) + +-python = import('python').find_installation('python3') ++python = import('python').find_installation(get_option('pythonexe')) + # used for '#!/usr/bin/env ' + python_name = 'python3' + +Index: 2.64.3-9640cd793d/glib/meson.build +=================================================================== +--- 2.64.3-9640cd793d.orig/glib/meson.build ++++ 2.64.3-9640cd793d/glib/meson.build +@@ -355,7 +355,7 @@ libglib = library('glib-2.0', + install : true, + # intl.lib is not compatible with SAFESEH + link_args : [noseh_link_args, glib_link_flags, win32_ldflags], +- include_directories : configinc, ++ include_directories : [configinc, libintlinc], + dependencies : pcre_deps + [thread_dep, libintl, librt] + libiconv + platform_deps + gnulib_libm_dependency, + c_args : glib_c_args, + objc_args : glib_c_args, +@@ -391,23 +391,23 @@ if host_system == 'windows' + executable('gspawn-win32-helper', 'gspawn-win32-helper.c', + install : true, + gui_app : true, +- include_directories : configinc, ++ include_directories : [configinc, libintlinc], + dependencies : [libglib_dep]) + executable('gspawn-win32-helper-console', 'gspawn-win32-helper.c', + install : true, + c_args : ['-DHELPER_CONSOLE'], +- include_directories : configinc, ++ include_directories : [configinc, libintlinc], + dependencies : [libglib_dep]) + else + executable('gspawn-win64-helper', 'gspawn-win32-helper.c', + install : true, + gui_app : true, +- include_directories : configinc, ++ include_directories : [configinc, libintlinc], + dependencies : [libglib_dep]) + executable('gspawn-win64-helper-console', 'gspawn-win32-helper.c', + install : true, + c_args : ['-DHELPER_CONSOLE'], +- include_directories : configinc, ++ include_directories : [configinc, libintlinc], + dependencies : [libglib_dep]) + endif + else +Index: 2.64.3-9640cd793d/gobject/meson.build +=================================================================== +--- 2.64.3-9640cd793d.orig/gobject/meson.build ++++ 2.64.3-9640cd793d/gobject/meson.build +@@ -124,7 +124,7 @@ libgobject = library('gobject-2.0', + soversion : soversion, + darwin_versions : darwin_versions, + install : true, +- include_directories : [configinc], ++ include_directories : [configinc, libintlinc], + dependencies : [libffi_dep, libglib_dep], + c_args : ['-DG_LOG_DOMAIN="GLib-GObject"', '-DGOBJECT_COMPILATION'] + glib_hidden_visibility_args, + link_args : glib_link_flags, +Index: 2.64.3-9640cd793d/gio/meson.build +=================================================================== +--- 2.64.3-9640cd793d.orig/gio/meson.build ++++ 2.64.3-9640cd793d/gio/meson.build +@@ -794,7 +794,7 @@ libgio = library('gio-2.0', + soversion : soversion, + darwin_versions : darwin_versions, + install : true, +- include_directories : [configinc, gioinc], ++ include_directories : [configinc, gioinc, libintlinc], + # '$(gio_win32_res_ldflag)', + dependencies : [libz_dep, libdl_dep, libmount_dep, libglib_dep, + libgobject_dep, libgmodule_dep, selinux_dep, xattr_dep, +@@ -922,12 +922,14 @@ executable('gio', gio_tool_sources, + install : true, + c_args : gio_c_args, + # intl.lib is not compatible with SAFESEH ++ include_directories : [libintlinc], + link_args : noseh_link_args, + dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) + + executable('gresource', 'gresource-tool.c', + install : true, + # intl.lib is not compatible with SAFESEH ++ include_directories : [libintlinc], + link_args : noseh_link_args, + dependencies : [libelf, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) + +@@ -942,6 +944,7 @@ glib_compile_schemas = executable('glib- + [gconstructor_as_data_h, 'gvdb/gvdb-builder.c', 'glib-compile-schemas.c'], + install : true, + # intl.lib is not compatible with SAFESEH ++ include_directories : [libintlinc], + link_args : noseh_link_args, + dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) + +@@ -950,6 +953,7 @@ glib_compile_resources = executable('gli + install : true, + c_args : gio_c_args, + # intl.lib is not compatible with SAFESEH ++ include_directories : [libintlinc], + link_args : noseh_link_args, + dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) + +@@ -965,6 +969,7 @@ executable('gsettings', 'gsettings-tool. + install : true, + c_args : gio_c_args, + # intl.lib is not compatible with SAFESEH ++ include_directories : [libintlinc], + link_args : noseh_link_args, + dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) + install_data('gschema.dtd', +@@ -977,6 +982,7 @@ executable('gdbus', 'gdbus-tool.c', + install : true, + c_args : gio_c_args, + # intl.lib is not compatible with SAFESEH ++ include_directories : [libintlinc], + link_args : noseh_link_args, + dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) + +Index: 2.64.3-9640cd793d/gio/win32/meson.build +=================================================================== +--- 2.64.3-9640cd793d.orig/gio/win32/meson.build ++++ 2.64.3-9640cd793d/gio/win32/meson.build +@@ -9,7 +9,7 @@ giowin32_sources = [ + + giowin32_lib = static_library('giowin32', + sources : [giowin32_sources], +- include_directories : [configinc, glibinc, gioinc, gmoduleinc], ++ include_directories : [configinc, glibinc, gioinc, gmoduleinc, libintlinc], + dependencies : [libintl, gioenumtypes_dep], + pic : true, + c_args : gio_c_args) +Index: 2.64.3-9640cd793d/meson_options.txt +=================================================================== +--- 2.64.3-9640cd793d.orig/meson_options.txt ++++ 2.64.3-9640cd793d/meson_options.txt +@@ -94,3 +94,23 @@ option('oss_fuzz', + type : 'feature', + value : 'disabled', + description : 'Indicate oss-fuzz build environment') ++ ++option('build_tests', ++ type : 'boolean', ++ value : 'false', ++ description : 'Enable tests') ++ ++option('libintlinc', ++ type : 'string', ++ value : '', ++ description : 'Path to include libintl') ++ ++option('libintldir', ++ type : 'string', ++ value : '', ++ description : 'Path to lib libintl') ++ ++option('pythonexe', ++ type : 'string', ++ value : '', ++ description : 'Path to python') diff --git a/ports/glib/meson.cross b/ports/glib/meson.cross new file mode 100644 index 00000000000000..86ca9f67eecdbd --- /dev/null +++ b/ports/glib/meson.cross @@ -0,0 +1,2 @@ +[properties] +skip_sanity_check = true \ No newline at end of file diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake index 80c3c9a1c751c7..dbd64cd43cb347 100644 --- a/ports/glib/portfile.cmake +++ b/ports/glib/portfile.cmake @@ -6,26 +6,27 @@ if (VCPKG_TARGET_IS_WINDOWS) vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) endif() -set(GLIB_VERSION 2.52.3) +set(GLIB_VERSION 2.64.3) vcpkg_download_distfile(ARCHIVE - URLS "https://ftp.gnome.org/pub/gnome/sources/glib/2.52/glib-${GLIB_VERSION}.tar.xz" + URLS "https://ftp.gnome.org/pub/gnome/sources/glib/2.64/glib-${GLIB_VERSION}.tar.xz" FILENAME "glib-${GLIB_VERSION}.tar.xz" - SHA512 a068f2519cfb82de8d4b7f004e7c1f15e841cad4046430a83b02b359d011e0c4077cdff447a1687ed7c68f1a11b4cf66b9ed9fc23ab5f0c7c6be84eb0ddc3017) + SHA512 a3828c37a50e86eb8791be53bd8af848d144e4580841ffab28f3b6eae5144f5cdf4a5d4b43130615b97488e700b274c2468fc7d561b3701a1fc686349501a1db) + + +vcpkg_find_acquire_program(MESON) +vcpkg_find_acquire_program(PYTHON3) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${GLIB_VERSION} PATCHES + fix-meson.patch use-libiconv-on-windows.patch - arm64-defines.patch fix-arm-builds.patch + fix-gdbus-codegen.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}) -file(REMOVE_RECURSE ${SOURCE_PATH}/glib/pcre) -file(WRITE ${SOURCE_PATH}/glib/pcre/Makefile.in) file(REMOVE ${SOURCE_PATH}/glib/win_iconv.c) if (selinux IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS AND NOT EXISTS "/usr/include/selinux") @@ -36,22 +37,57 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS selinux HAVE_SELINUX ) -vcpkg_configure_cmake( +if(CMAKE_HOST_WIN32) + set(MESON_COMMON_CFLAGS "${MESON_COMMON_CFLAGS} /I${CURRENT_INSTALLED_DIR}/include") + set(MESON_DEBUG_LDFLAGS "${MESON_DEBUG_LDFLAGS} /LIBPATH:${CURRENT_INSTALLED_DIR}/debug/lib") + set(MESON_RELEASE_LDFLAGS "${MESON_RELEASE_LDFLAGS} /LIBPATH:${CURRENT_INSTALLED_DIR}/lib") +endif() + +vcpkg_configure_meson( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS ${FEATURE_OPTIONS} - -DGLIB_VERSION=${GLIB_VERSION} + OPTIONS + --backend=ninja + --cross-file=${CMAKE_CURRENT_LIST_DIR}/meson.cross + -Dbuild_tests=false + -Dlibintlinc=${CURRENT_INSTALLED_DIR}/include + -Dpythonexe=${PYTHON3} OPTIONS_DEBUG - -DGLIB_SKIP_HEADERS=ON - -DGLIB_SKIP_TOOLS=ON + -Dlibintldir=${CURRENT_INSTALLED_DIR}/debug/lib + OPTIONS_RELEASE + -Dlibintldir=${CURRENT_INSTALLED_DIR}/lib ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-glib TARGET_PATH share/unofficial-glib) +vcpkg_install_meson() vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + + +vcpkg_copy_tools(TOOL_NAMES gdbus gio gio-querymodules glib-compile-resources glib-compile-schemas gobject-query gresource gsettings AUTO_CLEAN) +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + vcpkg_copy_tools(TOOL_NAMES gspawn-win32-helper gspawn-win32-helper-console AUTO_CLEAN) +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_copy_tools(TOOL_NAMES gspawn-win64-helper gspawn-win64-helper-console AUTO_CLEAN) +endif() + + +list(APPEND TOOLS gdbus-codegen glib-genmarshal glib-gettextize glib-mkenums gtester-report) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +foreach(TOOL ${TOOLS}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${TOOL} ${CURRENT_PACKAGES_DIR}/tools/${PORT}/${TOOL}) +endforeach(TOOL) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +# for backward compatibility with existing ports +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/cmake/unofficial-glib-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-glib/) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/cmake/unofficial-glib-targets-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-glib/) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/cmake/unofficial-glib-targets-release.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-glib/) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/cmake/unofficial-glib-targets.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-glib/) diff --git a/ports/glib/use-libiconv-on-windows.patch b/ports/glib/use-libiconv-on-windows.patch index 927de0bb1d161e..7f3e744e937d0d 100644 --- a/ports/glib/use-libiconv-on-windows.patch +++ b/ports/glib/use-libiconv-on-windows.patch @@ -1,7 +1,7 @@ -diff --git a/glib/gconvert.c b/glib/gconvert.c -index 3deac78..134ded9 100644 ---- a/glib/gconvert.c -+++ b/glib/gconvert.c +Index: 2.64.3-9640cd793d/glib/gconvert.c +=================================================================== +--- 2.64.3-9640cd793d.orig/glib/gconvert.c ++++ 2.64.3-9640cd793d/glib/gconvert.c @@ -30,7 +30,8 @@ #include diff --git a/ports/glibmm/CMakeLists.txt b/ports/glibmm/CMakeLists.txt index 10839260a14628..75aebbf7546ea2 100644 --- a/ports/glibmm/CMakeLists.txt +++ b/ports/glibmm/CMakeLists.txt @@ -3,24 +3,18 @@ project(glibmm) set(CMAKE_CXX_STANDARD 17) -find_path(GLIB_INCLUDE_DIR NAMES glib.h) -find_library(GLIB_LIBRARY NAMES glib-2.0) -find_library(GIO_LIBRARY NAMES gio-2.0) -find_library(GOBJECT_LIBRARY NAMES gobject-2.0) -find_library(GMODULE_LIBRARY NAMES gmodule-2.0) -find_library(GTHREAD_LIBRARY NAMES gthread-2.0) +find_package(unofficial-glib REQUIRED) find_program(GLIB_COMPILE_SCHEMAS NAMES glib-compile-schemas) find_library(PCRE_LIBRARY NAMES pcre) find_library(SIGC_LIBRARY NAMES sigc-2.0) find_library(FFI_LIBRARY NAMES ffi libffi) -include_directories(${GLIB_INCLUDE_DIR}) link_libraries( - ${GIO_LIBRARY} - ${GOBJECT_LIBRARY} - ${GMODULE_LIBRARY} - ${GTHREAD_LIBRARY} - ${GLIB_LIBRARY} + unofficial::glib::gio + unofficial::glib::gobject + unofficial::glib::gmodule + unofficial::glib::gthread + unofficial::glib::glib ${PCRE_LIBRARY} ${SIGC_LIBRARY} ${FFI_LIBRARY} diff --git a/ports/gtk/CMakeLists.txt b/ports/gtk/CMakeLists.txt index 9c265c7e597426..01accb2b8ead8b 100644 --- a/ports/gtk/CMakeLists.txt +++ b/ports/gtk/CMakeLists.txt @@ -19,12 +19,8 @@ endif() # find dependencies # glib -find_path(GLIB_INCLUDE_DIR glib.h) -find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_SUFFIX}) -find_library(GLIB_GIO_LIBRARY gio-${GLIB_LIB_SUFFIX}) -find_library(GLIB_GMODULE_LIBRARY gmodule-${GLIB_LIB_SUFFIX}) -find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_SUFFIX}) -set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GIO_LIBRARY} ${GLIB_GMODULE_LIBRARY} ${GLIB_GOBJECT_LIBRARY}) +find_package(unofficial-glib REQUIRED) +set(GLIB_LIBRARIES unofficial::glib::glib unofficial::glib::gobject unofficial::glib::gmodule unofficial::glib::gio) # pango find_path(PANGO_INCLUDE_DIR pango/pango.h) @@ -57,7 +53,6 @@ find_library(LIBINTL_LIBRARY NAMES intl libintl) set(GTK_REQUIRED_LIBRARIES ${LIBINTL_LIBRARY} ${EPOXY_LIBRARY} - ${GLIB_LIBRARIES} ${CAIRO_LIBRARIES} ${PANGO_LIBRARIES} ${GDK_PIXBUF_LIBRARY} @@ -66,7 +61,6 @@ set(GTK_REQUIRED_LIBRARIES set(GTK_REQUIRED_INCLUDE_DIR ${LIBINTL_INCLUDE_DIR} ${EPOXY_INCLUDE_DIR} - ${GLIB_INCLUDE_DIR} ${GDK_PIXBUF_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${PANGO_INCLUDE_DIR} @@ -108,6 +102,8 @@ add_library(gdk-3-win32 STATIC ${GDK_WIN32_SOURCES}) target_compile_definitions(gdk-3-win32 PRIVATE GDK_COMPILATION G_LOG_DOMAIN="Gdk" INSIDE_GDK_WIN32) target_include_directories(gdk-3-win32 PRIVATE . ./gdk ./gdk/win32 ${GTK_REQUIRED_INCLUDE_DIR}) +target_link_libraries(gdk-3-win32 PRIVATE ${GLIB_LIBRARIES}) + # build 'broadway' gdk backend extract_vcproj_sources(build/win32/vs14/gdk3-broadway.vcxproj GDK_BROADWAY_SOURCES) @@ -115,11 +111,12 @@ add_library(gdk-3-broadway STATIC ${GDK_BROADWAY_SOURCES}) target_compile_definitions(gdk-3-broadway PRIVATE GDK_COMPILATION G_LOG_DOMAIN="Gdk") target_include_directories(gdk-3-broadway PRIVATE . ./gdk ./gdk/broadway ${GTK_REQUIRED_INCLUDE_DIR}) +target_link_libraries(gdk-3-broadway PRIVATE ${GLIB_LIBRARIES}) macro(gtk_add_module MODULE_NAME) add_library(${MODULE_NAME} ${ARGN}) target_include_directories(${MODULE_NAME} PRIVATE . ./gdk ./gtk ${GTK_REQUIRED_INCLUDE_DIR}) - target_link_libraries(${MODULE_NAME} ${GTK_REQUIRED_LIBRARIES}) + target_link_libraries(${MODULE_NAME} ${GTK_REQUIRED_LIBRARIES} ${GLIB_LIBRARIES}) set_target_properties(${MODULE_NAME} PROPERTIES ARCHIVE_OUTPUT_NAME ${MODULE_NAME}.0) install(TARGETS ${MODULE_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) diff --git a/ports/gtkmm/msvc-fix.patch b/ports/gtkmm/msvc-fix.patch new file mode 100644 index 00000000000000..907bb176e6a723 --- /dev/null +++ b/ports/gtkmm/msvc-fix.patch @@ -0,0 +1,20 @@ +Index: gtkmm/MSVC_Net2013/gtkmm-build-defines.props +=================================================================== +--- gtkmm.orig/MSVC_Net2013/gtkmm-build-defines.props ++++ gtkmm/MSVC_Net2013/gtkmm-build-defines.props +@@ -14,7 +14,7 @@ + + + +- .\gdkmm;..;..\gdk;.;%(AdditionalIncludeDirectories) ++ .\gdkmm;..;..\gdk;.;$(CurrentInstalledDir)\include\glib-2.0;$(CurrentInstalledDir)\lib\glib-2.0\include;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + 4250;%(DisableSpecificWarnings) + true +@@ -33,4 +33,4 @@ + $(GtkMMBuildDefs) + + +- +\ No newline at end of file ++ diff --git a/ports/gtkmm/portfile.cmake b/ports/gtkmm/portfile.cmake index 23e939608dbe89..353f029f328a96 100644 --- a/ports/gtkmm/portfile.cmake +++ b/ports/gtkmm/portfile.cmake @@ -17,6 +17,7 @@ vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE} PATCHES fix_properties.patch + msvc-fix.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) @@ -30,6 +31,8 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/gtkmm.sln TARGET gtkmm PLATFORM ${VS_PLATFORM} + OPTIONS + /p:CurrentInstalledDir=${CURRENT_INSTALLED_DIR} USE_VCPKG_INTEGRATION ) diff --git a/ports/gts/find-glib.patch b/ports/gts/find-glib.patch new file mode 100644 index 00000000000000..61643d8d46eb9b --- /dev/null +++ b/ports/gts/find-glib.patch @@ -0,0 +1,37 @@ +Index: f777f54c2b-0d3894a905/CMakeLists.txt +=================================================================== +--- f777f54c2b-0d3894a905.orig/CMakeLists.txt ++++ f777f54c2b-0d3894a905/CMakeLists.txt +@@ -85,30 +85,14 @@ include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/src + ) + +-find_library(glib_LIBRARY NAMES glib libglib glib-2.0 libglib-2.0 +- HINTS ${glib_BINARY_DIR}) +- +-get_filename_component(glib_LIBRARY_DIR ${glib_LIBRARY} DIRECTORY) +-get_filename_component(glib_LIBRARY_NAME ${glib_LIBRARY} NAME) +-string(REGEX REPLACE "\\.[^.]*$" "" glib_LIBRARY_NAME ${glib_LIBRARY_NAME}) +- +-find_path(glib_H NAMES glib.h +- HINTS ${glib_LIBRARY_DIR}/../include) +-get_filename_component(glib_INCLUDE_DIR ${glib_H} DIRECTORY) +- +-set(glib_CONFIG_H) +-find_path(glib_CONFIG_H NAMES glibconfig.h +- HINTS ${glib_LIBRARY_DIR}/${glib_LIBRARY_NAME}/include) +- +-get_filename_component(glibconfig_INCLUDE_DIR ${glib_CONFIG_H} DIRECTORY) +-include_directories(${glib_INCLUDE_DIR} ${glib_CONFIG_H}) ++find_package(unofficial-glib REQUIRED) + + if (NOT WIN32 AND BUILD_SHARED_LIBS) + add_definitions(/DGTS_COMPILATION) + endif() + + add_library(${kit} SHARED ${srcs}) +-target_link_libraries(${kit} ${glib_LIBRARY}) ++target_link_libraries(${kit} unofficial::glib::glib) + + if(MSVC) + SET_TARGET_PROPERTIES(${kit} PROPERTIES LINK_FLAGS "/DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/src/gts.def\"") diff --git a/ports/gts/portfile.cmake b/ports/gts/portfile.cmake index 7a603e0760ff25..4bd181fc833123 100644 --- a/ports/gts/portfile.cmake +++ b/ports/gts/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_github( PATCHES fix-M_PI-in-windows.patch support-unix.patch + find-glib.patch ) vcpkg_configure_cmake( diff --git a/ports/libcroco/CMakeLists.txt b/ports/libcroco/CMakeLists.txt index ff11792ff669ef..0856d24d81215a 100644 --- a/ports/libcroco/CMakeLists.txt +++ b/ports/libcroco/CMakeLists.txt @@ -8,7 +8,6 @@ find_package(LibXml2 REQUIRED) if(NOT WIN32) find_package(Threads REQUIRED) endif() -find_path(GLIB_INCLUDE_DIR glib.h) file(GLOB SOURCES src/cr-utils.c @@ -70,7 +69,7 @@ set(CMAKE_DEBUG_POSTFIX "d") add_library(croco-0.6 ${SOURCES}) -target_include_directories(croco-0.6 PRIVATE ${GLIB_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}) +target_include_directories(croco-0.6 PRIVATE ${LIBXML2_INCLUDE_DIR}) target_link_libraries(croco-0.6 PRIVATE unofficial::glib::gio unofficial::glib::glib diff --git a/ports/libnice/CMakeLists.txt b/ports/libnice/CMakeLists.txt index da4c2ca6b2af5f..7429031d6f47be 100644 --- a/ports/libnice/CMakeLists.txt +++ b/ports/libnice/CMakeLists.txt @@ -13,10 +13,7 @@ add_definitions( configure_file(${CMAKE_SOURCE_DIR}/win32/vs9/config.h ${CMAKE_SOURCE_DIR}/config.h COPYONLY) configure_file(${CMAKE_SOURCE_DIR}/win32/vs9/libnice.def ${CMAKE_SOURCE_DIR}/libnice.def COPYONLY) -find_path(GLIB_INCLUDE_DIR glib.h) -find_library(GLIB_LIBRARY glib-2.0) -find_library(GOBJECT_LIBRARY gobject-2.0) -find_library(GIO_LIBRARY gio-2.0) +find_package(unofficial-glib REQUIRED) find_library(IPHLPAPI_LIBRARY iphlpapi) find_library(WS2_32_LIB ws2_32) find_library(ADVAPI32_LIB advapi32) @@ -26,8 +23,7 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/agent ${CMAKE_CURRENT_SOURCE_DIR}/random ${CMAKE_CURRENT_SOURCE_DIR}/socket - ${CMAKE_CURRENT_SOURCE_DIR}/stun - ${GLIB_INCLUDE_DIR}) + ${CMAKE_CURRENT_SOURCE_DIR}/stun) SET (SRCS @@ -122,7 +118,7 @@ SET(HEADERS ) add_library(libnice ${SRCS} ${HEADERS}) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4244 /wd4005 /wd4391 /wd4142 /wd4267") -target_link_libraries(libnice ${IPHLPAPI_LIBRARY} ${WS2_32_LIB} ${ADVAPI32_LIB} ${GLIB_LIBRARY} ${GOBJECT_LIBRARY} ${GIO_LIBRARY} OpenSSL::SSL) +target_link_libraries(libnice ${IPHLPAPI_LIBRARY} ${WS2_32_LIB} ${ADVAPI32_LIB} ${GLIB_LIBRARY} ${GOBJECT_LIBRARY} ${GIO_LIBRARY} OpenSSL::SSL unofficial::glib::glib unofficial::glib::gio unofficial::glib::gobject) install(TARGETS libnice RUNTIME DESTINATION bin ARCHIVE DESTINATION lib diff --git a/ports/libxmlpp/CMakeLists.txt b/ports/libxmlpp/CMakeLists.txt index bbaae7cda22486..df27c50fda8547 100644 --- a/ports/libxmlpp/CMakeLists.txt +++ b/ports/libxmlpp/CMakeLists.txt @@ -6,10 +6,7 @@ set(CMAKE_CXX_STANDARD 17) find_path(GLIBMM_INCLUDE_DIR NAMES glibmm.h) find_library(GLIBMM_LIBRARY NAMES glibmm) find_library(GIOMM_LIBRARY NAMES giomm) -find_library(GLIB_LIBRARY NAMES glib glib-2.0) -find_library(GIO_LIBRARY NAMES gio gio-2.0) -find_library(GMODULE_LIBRARY NAMES gmodule gmodule-2.0) -find_library(GOBJECT_LIBRARY NAMES gobject gobject-2.0) +find_package(unofficial-glib REQUIRED) find_library(SIGCPP_LIBRARY NAMES sigc sigc-2.0) find_library(FFI_LIBRARY NAMES ffi libffi) find_library(PCRE_LIBRARY NAMES pcre libpcre) @@ -77,6 +74,7 @@ endif() file(GLOB_RECURSE SOURCES libxml++/*.cc) add_library(xml++ ${SOURCES}) target_compile_definitions(xml++ PRIVATE -DLIBXMLPP_BUILD) +target_link_libraries(xml++ PUBLIC unofficial::glib::glib unofficial::glib::gio unofficial::glib::gobject unofficial::glib::gmodule) if(NOT DISABLE_INSTALL_HEADERS) install(FILES ${CMAKE_BINARY_DIR}/config/libxml++config.h DESTINATION include) diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt index 5fdd730ba79ee4..dee2382c41128b 100644 --- a/ports/pango/CMakeLists.txt +++ b/ports/pango/CMakeLists.txt @@ -26,11 +26,8 @@ find_library(LIBINTL_LIBRARY NAMES libintl intl) endif() # find glib -find_path(GLIB_INCLUDE_DIR glib.h) -find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_VERSION}) -find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_VERSION}) -find_library(GLIB_GMODULE_LIBRARY gmodule-${GLIB_LIB_VERSION}) -set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GOBJECT_LIBRARY} ${GLIB_GMODULE_LIBRARY}) +find_package(unofficial-glib REQUIRED) +set(GLIB_LIBRARIES unofficial::glib::glib unofficial::glib::gmodule unofficial::glib::gobject) # find cairo find_path(CAIRO_INCLUDE_DIR cairo.h) @@ -69,7 +66,7 @@ set(FONT_LIBRARIES ${FREETYPE_LIBRARY} ${FONTCONFIG_LIBRARY} ${HARFBUZZ_LIBRARY} macro(pango_add_module MODULE_NAME) add_library(${MODULE_NAME} ${ARGN}) - target_include_directories(${MODULE_NAME} PRIVATE ${GLIB_INCLUDE_DIR} ${LIBINTL_INCLUDE_DIR}) + target_include_directories(${MODULE_NAME} PRIVATE ${LIBINTL_INCLUDE_DIR}) target_link_libraries(${MODULE_NAME} ${LIBINTL_LIBRARY} ${GLIB_LIBRARIES}) target_compile_definitions(${MODULE_NAME} PRIVATE G_LOG_DOMAIN="Pango" PANGO_ENABLE_BACKEND PANGO_ENABLE_ENGINE diff --git a/ports/pangomm/fix-msvc.patch b/ports/pangomm/fix-msvc.patch new file mode 100644 index 00000000000000..92624188129716 --- /dev/null +++ b/ports/pangomm/fix-msvc.patch @@ -0,0 +1,13 @@ +Index: pangomm/MSVC_Net2013/pangomm-build-defines.props +=================================================================== +--- pangomm.orig/MSVC_Net2013/pangomm-build-defines.props ++++ pangomm/MSVC_Net2013/pangomm-build-defines.props +@@ -13,7 +13,7 @@ + + + +- .\pangomm;..\pango;.;%(AdditionalIncludeDirectories) ++ .\pangomm;..\pango;.;$(CurrentInstalledDir)\include\glib-2.0;$(CurrentInstalledDir)\lib\glib-2.0\include;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) diff --git a/ports/pangomm/portfile.cmake b/ports/pangomm/portfile.cmake index 1e2cefa6197b00..ded96cdfe62422 100644 --- a/ports/pangomm/portfile.cmake +++ b/ports/pangomm/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_extract_source_archive_ex( PATCHES fix_properties.patch fix_charset.patch + fix-msvc.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) @@ -25,6 +26,8 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/pangomm.sln TARGET pangomm PLATFORM ${VS_PLATFORM} + OPTIONS + /p:CurrentInstalledDir=${CURRENT_INSTALLED_DIR} USE_VCPKG_INTEGRATION )