From f92b9a7e4cb758b6c1750879d1b98fd61af66c21 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 13 Aug 2020 22:58:46 +0200 Subject: [PATCH 001/114] [fontconfig] update fontconfig --- ports/fontconfig/CMakeLists.txt | 96 ----- ports/fontconfig/CONTROL | 5 +- ports/fontconfig/build.patch | 295 ++++++++++++++ ports/fontconfig/include/alias/fcalias.h | 0 ports/fontconfig/include/alias/fcaliastail.h | 1 - ports/fontconfig/include/alias/fcftalias.h | 0 .../fontconfig/include/alias/fcftaliastail.h | 1 - ports/fontconfig/include/unix/config.h | 376 ------------------ ports/fontconfig/include/win32/config.h | 374 ----------------- ports/fontconfig/include/win32/unistd.h | 21 - ports/fontconfig/portfile.cmake | 91 ++++- ports/fontconfig/remove_tests.patch | 13 + 12 files changed, 380 insertions(+), 893 deletions(-) delete mode 100644 ports/fontconfig/CMakeLists.txt create mode 100644 ports/fontconfig/build.patch delete mode 100644 ports/fontconfig/include/alias/fcalias.h delete mode 100644 ports/fontconfig/include/alias/fcaliastail.h delete mode 100644 ports/fontconfig/include/alias/fcftalias.h delete mode 100644 ports/fontconfig/include/alias/fcftaliastail.h delete mode 100644 ports/fontconfig/include/unix/config.h delete mode 100644 ports/fontconfig/include/win32/config.h delete mode 100644 ports/fontconfig/include/win32/unistd.h create mode 100644 ports/fontconfig/remove_tests.patch diff --git a/ports/fontconfig/CMakeLists.txt b/ports/fontconfig/CMakeLists.txt deleted file mode 100644 index a556e705932c7b..00000000000000 --- a/ports/fontconfig/CMakeLists.txt +++ /dev/null @@ -1,96 +0,0 @@ -cmake_minimum_required(VERSION 3.11) -project(fontconfig C) - -add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -DHAVE_CONFIG_H) - -# find dependencies -find_package(unofficial-iconv CONFIG REQUIRED) -find_package(Freetype REQUIRED) -find_package(EXPAT REQUIRED) - -add_library(fontconfig - src/fcatomic.c - src/fcblanks.c - src/fccache.c - src/fccfg.c - src/fccharset.c - src/fccompat.c - src/fcdbg.c - src/fcdefault.c - src/fcdir.c - src/fcformat.c - src/fcfreetype.c - src/fcfs.c - src/fcinit.c - src/fclang.c - src/fclist.c - src/fcmatch.c - src/fcmatrix.c - src/fcname.c - src/fcobjs.c - src/fcpat.c - src/fcrange.c - src/fcserialize.c - src/fcstat.c - src/fcstr.c - src/fcweight.c - src/fcxml.c - src/ftglue.c) - -if(WIN32) - set_target_properties(fontconfig PROPERTIES DEFINE_SYMBOL "FcPublic=__declspec(dllexport)") -else() - set_target_properties(fontconfig PROPERTIES DEFINE_SYMBOL "FcPublic=__attribute__((visibility(\"default\")))") -endif() - -target_include_directories(fontconfig PRIVATE . - ${FC_INCLUDE_DIR}/alias - ${EXPAT_INCLUDE_DIR}) -if(WIN32) - target_include_directories(fontconfig PRIVATE ${FC_INCLUDE_DIR}/win32) -else() - target_include_directories(fontconfig PRIVATE ${FC_INCLUDE_DIR}/unix) -endif() - -target_link_libraries(fontconfig PRIVATE unofficial::iconv::libiconv Freetype::Freetype EXPAT::EXPAT) - -install(TARGETS fontconfig - EXPORT fontconfig-targets - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - -if(NOT FC_SKIP_HEADERS) - install(FILES - fontconfig/fontconfig.h - fontconfig/fcfreetype.h - fontconfig/fcprivate.h - DESTINATION include/fontconfig) -endif() - -if(NOT FC_SKIP_TOOLS) - set(FC_DEFAULT_FONTS WINDOWSFONTDIR) - set(FC_FONTPATH) - set(FC_CACHEDIR WINDOWSTEMPDIR_FONTCONFIG_CACHE) - set(CONFIGDIR ./fonts/conf.d) - configure_file(fonts.conf.in ${CMAKE_SOURCE_DIR}/fonts.conf @ONLY) - install(FILES fonts.conf DESTINATION tools/fontconfig) - install(DIRECTORY conf.d DESTINATION tools/fontconfig FILES_MATCHING PATTERN "*.conf") -endif() - -install( - EXPORT fontconfig-targets - NAMESPACE unofficial::fontconfig:: - FILE unofficial-fontconfig-targets.cmake - DESTINATION share/unofficial-fontconfig -) - -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-fontconfig-config.cmake " -include(CMakeFindDependencyMacro) -find_dependency(unofficial-iconv CONFIG) -find_dependency(Freetype) -find_dependency(EXPAT) - -include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-fontconfig-targets.cmake) -") -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-fontconfig-config.cmake DESTINATION share/unofficial-fontconfig) diff --git a/ports/fontconfig/CONTROL b/ports/fontconfig/CONTROL index e1deedec930b18..155c87a1a2f0ec 100644 --- a/ports/fontconfig/CONTROL +++ b/ports/fontconfig/CONTROL @@ -1,6 +1,5 @@ Source: fontconfig -Version: 2.12.4 -Port-Version: 11 +Version: 2.13.1 Homepage: https://www.freedesktop.org/software/fontconfig/front.html Description: Library for configuring and customizing font access. -Build-Depends: freetype, expat, libiconv, dirent +Build-Depends: freetype, expat, libiconv, dirent, pthread, json-c, dirent, libuuid (!windows), gettext \ No newline at end of file diff --git a/ports/fontconfig/build.patch b/ports/fontconfig/build.patch new file mode 100644 index 00000000000000..5b8c1b3a9bfb04 --- /dev/null +++ b/ports/fontconfig/build.patch @@ -0,0 +1,295 @@ +diff --git a/conf.d/Makefile.am b/conf.d/Makefile.am +index ff03fb2eb..769fc6005 100644 +--- a/conf.d/Makefile.am ++++ b/conf.d/Makefile.am +@@ -95,9 +95,9 @@ install-data-hook: + @(echo cd $(DESTDIR)$(configdir); \ + cd $(DESTDIR)$(configdir); \ + for i in $(CONF_LINKS); do \ +- echo $(RM) $$i";" ln -s $(templatedir)/$$i .; \ ++ echo $(RM) $$i";" $(LN_S) $(DESTDIR)$(templatedir)/$$i .; \ + $(RM) $$i; \ +- ln -s $(templatedir)/$$i .; \ ++ $(LN_S) $(DESTDIR)$(templatedir)/$$i .; \ + done) + uninstall-local: + @(echo cd $(DESTDIR)$(configdir); \ +diff --git a/src/Makefile.am b/src/Makefile.am +index 35e820d60..42bd7c5a2 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -33,7 +33,7 @@ fontconfig_def_dependency = fontconfig.def + + install-libtool-import-lib: libfontconfig.la + $(MKDIR_P) $(DESTDIR)$(libdir) +- $(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)/libfontconfig.dll.a ++# $(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)/libfontconfig.dll.a + $(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/fontconfig.def + + uninstall-libtool-import-lib: +@@ -58,7 +58,8 @@ fontconfig.lib : libfontconfig.la + lib -name:libfontconfig-@LIBT_CURRENT_MINUS_AGE@.dll -def:fontconfig.def -out:$@ + + install-ms-import-lib: +- $(INSTALL) fontconfig.lib $(DESTDIR)$(libdir) ++ $(MKDIR_P) $(DESTDIR)$(libdir) ++ $(INSTALL) .libs/fontconfig.lib $(DESTDIR)$(libdir) + + uninstall-ms-import-lib: + $(RM) $(DESTDIR)$(libdir)/fontconfig.lib +diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c +index 87e302083..8b5012110 100644 +--- a/fc-cache/fc-cache.c ++++ b/fc-cache/fc-cache.c +@@ -34,11 +34,20 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include ++#if HAVE_SYS_STAT_H + #include ++#endif + #include ++#if HAVE_FCNTL_H + #include ++#endif + #include + #include + #include +diff --git a/fc-cat/fc-cat.c b/fc-cat/fc-cat.c +index 69611bcc3..e7b0efbaa 100644 +--- a/fc-cat/fc-cat.c ++++ b/fc-cat/fc-cat.c +@@ -36,9 +36,16 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include ++#if HAVE_SYS_STAT_H + #include ++#endif + #include + #include + +diff --git a/fc-conflist/fc-conflist.c b/fc-conflist/fc-conflist.c +index 5c40a0f09..affaca09e 100644 +--- a/fc-conflist/fc-conflist.c ++++ b/fc-conflist/fc-conflist.c +@@ -35,7 +35,12 @@ + + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include + #include + #include +diff --git a/fc-list/fc-list.c b/fc-list/fc-list.c +index 2039acd36..0e56b1c32 100644 +--- a/fc-list/fc-list.c ++++ b/fc-list/fc-list.c +@@ -24,7 +24,12 @@ + + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include + #include + #include +diff --git a/fc-match/fc-match.c b/fc-match/fc-match.c +index dee61479d..da8d820aa 100644 +--- a/fc-match/fc-match.c ++++ b/fc-match/fc-match.c +@@ -33,7 +33,12 @@ + + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include + #include + #include +diff --git a/fc-pattern/fc-pattern.c b/fc-pattern/fc-pattern.c +index 7989b816f..15b43e098 100644 +--- a/fc-pattern/fc-pattern.c ++++ b/fc-pattern/fc-pattern.c +@@ -33,7 +33,12 @@ + + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include + #include + #include +diff --git a/fc-query/fc-query.c b/fc-query/fc-query.c +index fbffb8415..58c251fe3 100644 +--- a/fc-query/fc-query.c ++++ b/fc-query/fc-query.c +@@ -36,7 +36,12 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include + #include + #include +diff --git a/fc-scan/fc-scan.c b/fc-scan/fc-scan.c +index 9302ac559..3a0ccf188 100644 +--- a/fc-scan/fc-scan.c ++++ b/fc-scan/fc-scan.c +@@ -36,7 +36,12 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include + #include + #include +diff --git a/fc-validate/fc-validate.c b/fc-validate/fc-validate.c +index 2ceee2024..8f702f190 100644 +--- a/fc-validate/fc-validate.c ++++ b/fc-validate/fc-validate.c +@@ -36,7 +36,12 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include + #include + #include +diff --git a/src/fcatomic.c b/src/fcatomic.c +index d12d32408..da7234934 100644 +--- a/src/fcatomic.c ++++ b/src/fcatomic.c +@@ -50,7 +50,9 @@ + #include "fcint.h" + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + +diff --git a/src/fccache.c b/src/fccache.c +index 2b604014e..50fb742c6 100644 +--- a/src/fccache.c ++++ b/src/fccache.c +@@ -30,7 +30,9 @@ + #include + #include + #include ++#ifndef _MSC_VER + #include ++#endif + #include + #if defined(HAVE_MMAP) || defined(__CYGWIN__) + # include +diff --git a/src/fcint.h b/src/fcint.h +index de78cd8c9..4fb269ffa 100644 +--- a/src/fcint.h ++++ b/src/fcint.h +@@ -40,7 +40,18 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#include ++#include ++#define ssize_t SSIZE_T ++#define F_OK 0 ++#define W_OK 2 ++typedef int mode_t; ++#endif + #include + #include + #include +diff --git a/test/test-migration.c b/test/test-migration.c +index b7d96dcce..7eac59dcc 100644 +--- a/test/test-migration.c ++++ b/test/test-migration.c +@@ -28,13 +28,16 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include + #include + #ifndef HAVE_STRUCT_DIRENT_D_TYPE +-#include + #include +-#include + #endif + #include + +diff --git a/test/test-pthread.c b/test/test-pthread.c +index fbf397d4c..38d7dea35 100644 +--- a/test/test-pthread.c ++++ b/test/test-pthread.c +@@ -24,7 +24,12 @@ + */ + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif ++#ifdef _MSC_VER ++#include ++#endif + #include + #include + diff --git a/ports/fontconfig/include/alias/fcalias.h b/ports/fontconfig/include/alias/fcalias.h deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/ports/fontconfig/include/alias/fcaliastail.h b/ports/fontconfig/include/alias/fcaliastail.h deleted file mode 100644 index a9eae81f2aaf25..00000000000000 --- a/ports/fontconfig/include/alias/fcaliastail.h +++ /dev/null @@ -1 +0,0 @@ -/* intentionally empty */ diff --git a/ports/fontconfig/include/alias/fcftalias.h b/ports/fontconfig/include/alias/fcftalias.h deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/ports/fontconfig/include/alias/fcftaliastail.h b/ports/fontconfig/include/alias/fcftaliastail.h deleted file mode 100644 index a9eae81f2aaf25..00000000000000 --- a/ports/fontconfig/include/alias/fcftaliastail.h +++ /dev/null @@ -1 +0,0 @@ -/* intentionally empty */ diff --git a/ports/fontconfig/include/unix/config.h b/ports/fontconfig/include/unix/config.h deleted file mode 100644 index 5b5da37926d3cb..00000000000000 --- a/ports/fontconfig/include/unix/config.h +++ /dev/null @@ -1,376 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -#define FC_CACHEDIR "./" - -/* The normal alignment of `double', in bytes. */ -#define ALIGNOF_DOUBLE 8 - -/* The normal alignment of `void *', in bytes. */ -#if defined(_WIN64) -#define ALIGNOF_VOID_P 8 -#else -#define ALIGNOF_VOID_P 4 -#endif - -/* Use libxml2 instead of Expat */ -/* #undef ENABLE_LIBXML2 */ - -/* Additional font directories */ -#define FC_ADD_FONTS "yes" - -/* Architecture prefix to use for cache file names */ -/* #undef FC_ARCHITECTURE */ - -/* System font directory */ -#define FC_DEFAULT_FONTS "" - -/* The type of len parameter of the gperf hash/lookup function */ -#define FC_GPERF_SIZE_T size_t - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like `struct s { int n; double - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. When computing the size of such an object, don't use 'sizeof - (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' - instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with - MSVC and with C++ compilers. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#define HAVE_DIRENT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -/* #undef HAVE_DOPRNT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `fstatfs' function. */ -/* #undef HAVE_FSTATFS */ - -/* Define to 1 if you have the `fstatvfs' function. */ -/* #undef HAVE_FSTATVFS */ - -/* FT_Bitmap_Size structure includes y_ppem field */ -#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1 - -/* Define to 1 if you have the `FT_Get_BDF_Property' function. */ -#define HAVE_FT_GET_BDF_PROPERTY 1 - -/* Define to 1 if you have the `FT_Get_Next_Char' function. */ -#define HAVE_FT_GET_NEXT_CHAR 1 - -/* Define to 1 if you have the `FT_Get_PS_Font_Info' function. */ -#define HAVE_FT_GET_PS_FONT_INFO 1 - -/* Define to 1 if you have the `FT_Get_X11_Font_Format' function. */ -#define HAVE_FT_GET_X11_FONT_FORMAT 1 - -/* Define to 1 if you have the `FT_Has_PS_Glyph_Names' function. */ -#define HAVE_FT_HAS_PS_GLYPH_NAMES 1 - -/* Define to 1 if you have the `FT_Select_Size' function. */ -#define HAVE_FT_SELECT_SIZE 1 - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `getopt' function. */ -#define HAVE_GETOPT 1 - -/* Define to 1 if you have the `getopt_long' function. */ -#define HAVE_GETOPT_LONG 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Have Intel __sync_* atomic primitives */ -#define HAVE_INTEL_ATOMIC_PRIMITIVES 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `link' function. */ -/* #undef HAVE_LINK */ - -/* Define to 1 if you have the `lrand48' function. */ -/* #undef HAVE_LRAND48 */ - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mkdtemp' function. */ -/* #undef HAVE_MKDTEMP */ - -/* Define to 1 if you have the `mkostemp' function. */ -/* #undef HAVE_MKOSTEMP */ - -/* Define to 1 if you have the `mkstemp' function. */ -#define HAVE_MKSTEMP 1 - -/* Define to 1 if you have a working `mmap' system call. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the 'posix_fadvise' function. */ -/* #undef HAVE_POSIX_FADVISE */ - -/* Have POSIX threads */ -#define HAVE_PTHREAD 1 - -/* Have PTHREAD_PRIO_INHERIT. */ -/* #undef HAVE_PTHREAD_PRIO_INHERIT */ - -/* Define to 1 if you have the `rand' function. */ -#define HAVE_RAND 1 - -/* Define to 1 if you have the `random' function. */ -/* #undef HAVE_RANDOM */ - -/* Define to 1 if you have the `random_r' function. */ -/* #undef HAVE_RANDOM_R */ - -/* Define to 1 if you have the `rand_r' function. */ -/* #undef HAVE_RAND_R */ - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SCHED_H */ - -/* Have sched_yield */ -/* #undef HAVE_SCHED_YIELD */ - -/* Have Solaris __machine_*_barrier and atomic_* operations */ -/* #undef HAVE_SOLARIS_ATOMIC_OPS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if `d_type' is a member of `struct dirent'. */ -/* #undef HAVE_STRUCT_DIRENT_D_TYPE */ - -/* Define to 1 if `f_flags' is a member of `struct statfs'. */ -/* #undef HAVE_STRUCT_STATFS_F_FLAGS */ - -/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ -/* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ - -/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */ -/* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ - -/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */ -/* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */ - -/* Define to 1 if `st_mtim' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_MTIM */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MOUNT_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STATFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STATVFS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VFS_H */ - -/* Define to 1 if `usLowerOpticalPointSize' is a member of `TT_OS2'. */ -#define HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE 1 - -/* Define to 1 if `usUpperOpticalPointSize' is a member of `TT_OS2'. */ -#define HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vprintf' function. */ -#define HAVE_VPRINTF 1 - -/* Can use #warning in C files */ -#define HAVE_WARNING_CPP_DIRECTIVE 1 - -/* Use xmlparse.h instead of expat.h */ -/* #undef HAVE_XMLPARSE_H */ - -/* Define to 1 if you have the `XML_SetDoctypeDeclHandler' function. */ -#define HAVE_XML_SETDOCTYPEDECLHANDLER 1 - -/* Define to 1 if you have the `_mktemp_s' function. */ -/* #undef HAVE__MKTEMP_S */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "fontconfig" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "fontconfig" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "fontconfig 2.12.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "fontconfig" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "2.12.3" - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -/* #undef PTHREAD_CREATE_JOINABLE */ - -/* The size of `char', as computed by sizeof. */ -/* #undef SIZEOF_CHAR */ - -/* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ - -/* The size of `long', as computed by sizeof. */ -/* #undef SIZEOF_LONG */ - -/* The size of `short', as computed by sizeof. */ -/* #undef SIZEOF_SHORT */ - -/* The size of `void*', as computed by sizeof. */ -/* #undef SIZEOF_VOIDP */ - -/* The size of `void *', as computed by sizeof. */ -#if defined(_WIN64) -#define SIZEOF_VOIDP 8 -#define SIZEOF_VOID_P 8 -#else -#define SIZEOF_VOIDP 4 -#define SIZEOF_VOID_P 4 -#endif - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Use iconv. */ -#define USE_ICONV 1 - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Version number of package */ -#define VERSION "2.12.3" - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#define _FILE_OFFSET_BITS 64 - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -#define FONTCONFIG_PATH "/etc/fonts" - -#include "config-fixups.h" diff --git a/ports/fontconfig/include/win32/config.h b/ports/fontconfig/include/win32/config.h deleted file mode 100644 index 0fbdead6e46672..00000000000000 --- a/ports/fontconfig/include/win32/config.h +++ /dev/null @@ -1,374 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -#define FC_CACHEDIR "./" - -/* The normal alignment of `double', in bytes. */ -#define ALIGNOF_DOUBLE 8 - -/* The normal alignment of `void *', in bytes. */ -#if defined(_WIN64) -#define ALIGNOF_VOID_P 8 -#else -#define ALIGNOF_VOID_P 4 -#endif - -/* Use libxml2 instead of Expat */ -/* #undef ENABLE_LIBXML2 */ - -/* Additional font directories */ -#define FC_ADD_FONTS "yes" - -/* Architecture prefix to use for cache file names */ -/* #undef FC_ARCHITECTURE */ - -/* System font directory */ -#define FC_DEFAULT_FONTS "WINDOWSFONTDIR" - -/* The type of len parameter of the gperf hash/lookup function */ -#define FC_GPERF_SIZE_T size_t - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like `struct s { int n; double - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. When computing the size of such an object, don't use 'sizeof - (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' - instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with - MSVC and with C++ compilers. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#define HAVE_DIRENT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -/* #undef HAVE_DOPRNT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `fstatfs' function. */ -/* #undef HAVE_FSTATFS */ - -/* Define to 1 if you have the `fstatvfs' function. */ -/* #undef HAVE_FSTATVFS */ - -/* FT_Bitmap_Size structure includes y_ppem field */ -#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1 - -/* Define to 1 if you have the `FT_Get_BDF_Property' function. */ -#define HAVE_FT_GET_BDF_PROPERTY 1 - -/* Define to 1 if you have the `FT_Get_Next_Char' function. */ -#define HAVE_FT_GET_NEXT_CHAR 1 - -/* Define to 1 if you have the `FT_Get_PS_Font_Info' function. */ -#define HAVE_FT_GET_PS_FONT_INFO 1 - -/* Define to 1 if you have the `FT_Get_X11_Font_Format' function. */ -#define HAVE_FT_GET_X11_FONT_FORMAT 1 - -/* Define to 1 if you have the `FT_Has_PS_Glyph_Names' function. */ -#define HAVE_FT_HAS_PS_GLYPH_NAMES 1 - -/* Define to 1 if you have the `FT_Select_Size' function. */ -#define HAVE_FT_SELECT_SIZE 1 - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `getopt' function. */ -#define HAVE_GETOPT 1 - -/* Define to 1 if you have the `getopt_long' function. */ -#define HAVE_GETOPT_LONG 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Have Intel __sync_* atomic primitives */ -#define HAVE_INTEL_ATOMIC_PRIMITIVES 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `link' function. */ -/* #undef HAVE_LINK */ - -/* Define to 1 if you have the `lrand48' function. */ -/* #undef HAVE_LRAND48 */ - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mkdtemp' function. */ -/* #undef HAVE_MKDTEMP */ - -/* Define to 1 if you have the `mkostemp' function. */ -/* #undef HAVE_MKOSTEMP */ - -/* Define to 1 if you have the `mkstemp' function. */ -/* #undef HAVE_MKSTEMP */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the 'posix_fadvise' function. */ -/* #undef HAVE_POSIX_FADVISE */ - -/* Have POSIX threads */ -/* #undef HAVE_PTHREAD */ - -/* Have PTHREAD_PRIO_INHERIT. */ -/* #undef HAVE_PTHREAD_PRIO_INHERIT */ - -/* Define to 1 if you have the `rand' function. */ -#define HAVE_RAND 1 - -/* Define to 1 if you have the `random' function. */ -/* #undef HAVE_RANDOM */ - -/* Define to 1 if you have the `random_r' function. */ -/* #undef HAVE_RANDOM_R */ - -/* Define to 1 if you have the `rand_r' function. */ -/* #undef HAVE_RAND_R */ - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SCHED_H */ - -/* Have sched_yield */ -/* #undef HAVE_SCHED_YIELD */ - -/* Have Solaris __machine_*_barrier and atomic_* operations */ -/* #undef HAVE_SOLARIS_ATOMIC_OPS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if `d_type' is a member of `struct dirent'. */ -/* #undef HAVE_STRUCT_DIRENT_D_TYPE */ - -/* Define to 1 if `f_flags' is a member of `struct statfs'. */ -/* #undef HAVE_STRUCT_STATFS_F_FLAGS */ - -/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ -/* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ - -/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */ -/* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ - -/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */ -/* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */ - -/* Define to 1 if `st_mtim' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_MTIM */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MOUNT_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STATFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STATVFS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VFS_H */ - -/* Define to 1 if `usLowerOpticalPointSize' is a member of `TT_OS2'. */ -#define HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE 1 - -/* Define to 1 if `usUpperOpticalPointSize' is a member of `TT_OS2'. */ -#define HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vprintf' function. */ -#define HAVE_VPRINTF 1 - -/* Can use #warning in C files */ -#define HAVE_WARNING_CPP_DIRECTIVE 1 - -/* Use xmlparse.h instead of expat.h */ -/* #undef HAVE_XMLPARSE_H */ - -/* Define to 1 if you have the `XML_SetDoctypeDeclHandler' function. */ -#define HAVE_XML_SETDOCTYPEDECLHANDLER 1 - -/* Define to 1 if you have the `_mktemp_s' function. */ -#define HAVE__MKTEMP_S 1 - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "fontconfig" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "fontconfig" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "fontconfig 2.12.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "fontconfig" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "2.12.3" - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -/* #undef PTHREAD_CREATE_JOINABLE */ - -/* The size of `char', as computed by sizeof. */ -/* #undef SIZEOF_CHAR */ - -/* The size of `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ - -/* The size of `long', as computed by sizeof. */ -/* #undef SIZEOF_LONG */ - -/* The size of `short', as computed by sizeof. */ -/* #undef SIZEOF_SHORT */ - -/* The size of `void*', as computed by sizeof. */ -/* #undef SIZEOF_VOIDP */ - -/* The size of `void *', as computed by sizeof. */ -#if defined(_WIN64) -#define SIZEOF_VOIDP 8 -#define SIZEOF_VOID_P 8 -#else -#define SIZEOF_VOIDP 4 -#define SIZEOF_VOID_P 4 -#endif - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Use iconv. */ -#define USE_ICONV 1 - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Version number of package */ -#define VERSION "2.12.3" - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#define _FILE_OFFSET_BITS 64 - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -#include "config-fixups.h" diff --git a/ports/fontconfig/include/win32/unistd.h b/ports/fontconfig/include/win32/unistd.h deleted file mode 100644 index 7d04abe2925b08..00000000000000 --- a/ports/fontconfig/include/win32/unistd.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Minimal unistd.h, just to get fontconfig to compile */ -#ifndef UNISTD_H -#define UNISTD_H - -#include - -#ifndef R_OK -#define R_OK 4 -#endif - -#ifndef W_OK -#define W_OK 2 -#endif - -#ifndef F_OK -#define F_OK 0 -#endif - -typedef int mode_t; - -#endif \ No newline at end of file diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index 360c449a600640..f3f5e378bad105 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -1,39 +1,75 @@ -set(FONTCONFIG_VERSION 2.12.4) -vcpkg_download_distfile(ARCHIVE - URLS "https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.gz" - FILENAME "fontconfig-${FONTCONFIG_VERSION}.tar.gz" - SHA512 2be3ee0e8e0e3b62571135a3cae06e456c289dd1ad40ef2a7c780406418ee5efce863a833eca5a8ef55bc737a0ea04ef562bba6fd27e174ae43e42131b52810d -) +set(FONTCONFIG_VERSION 2.13.1) -vcpkg_extract_source_archive_ex( +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.freedesktop.org OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${FONTCONFIG_VERSION} - PATCHES fcobjtypehash.patch + REPO fontconfig/fontconfig + REF 844d8709a1f3ecab45015b24b72dd775c13b2421 #v2.13.1 + SHA512 fed0cf46f5dca9cb1e03475d7a8d7efdab06c7180fe0c922fb30cadfa91e1efe1f6a6e36d2fdb742a479cb09c05b0aefb5da5658bf2e01a32b7ac88ee8ff0b58 + HEAD_REF master # branch name + PATCHES remove_tests.patch + build.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_find_acquire_program(GPERF) +get_filename_component(GPERF_PATH ${GPERF} DIRECTORY) +vcpkg_add_to_path(${GPERF_PATH}) -vcpkg_configure_cmake( +vcpkg_configure_make( + AUTOCONFIG + COPY_SOURCE SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS - -DFC_INCLUDE_DIR=${CMAKE_CURRENT_LIST_DIR}/include + --disable-docs + ${OPTIONS} + ac_cv_type_pid_t=yes + --enable-iconv + #--enable-expat + "--with-expat=${CURRENT_INSTALLED_DIR}" + "--with-expat-includes=${CURRENT_INSTALLED_DIR}/include" + "--with-libiconv=${CURRENT_INSTALLED_DIR}" + "--with-libiconv-includes=${CURRENT_INSTALLED_DIR}/include" OPTIONS_DEBUG - -DFC_SKIP_TOOLS=ON - -DFC_SKIP_HEADERS=ON + "--with-expat-lib=${CURRENT_INSTALLED_DIR}/debug/lib" + "--with-libiconv-lib=${CURRENT_INSTALLED_DIR}/debug/lib" + OPTIONS_RELEASE + "--with-expat-lib=${CURRENT_INSTALLED_DIR}/lib" + "--with-libiconv-lib=${CURRENT_INSTALLED_DIR}/lib" + ADD_BIN_TO_PATH ) + # [AC_HELP_STRING([--enable-libxml2], + # [Use libxml2 instead of Expat])]) -vcpkg_install_cmake() +vcpkg_install_make() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES uuid) -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-fontconfig TARGET_PATH share/unofficial-fontconfig) +# Fix paths in debug pc file. +set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/fontconfig.pc") +if(EXISTS "${_file}") + file(READ "${_file}" _contents) + string(REPLACE "/etc" "/../etc" _contents "${_contents}") + string(REPLACE "/var" "/../var" _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") +endif() -vcpkg_copy_pdbs() +# Make path to cache in fonts.conf relative +set(_file "${CURRENT_PACKAGES_DIR}/etc/fonts/fonts.conf") +if(EXISTS "${_file}") + file(READ "${_file}" _contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}/var/cache/fontconfig" "./../../var/cache/fontconfig" _contents "${_contents}") + string(REPLACE "/var" "/../var" _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/var" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/etc") if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) foreach(HEADER fcfreetype.h fontconfig.h) file(READ ${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER} FC_HEADER) - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(VCPKG_TARGET_IS_WINDOWS) string(REPLACE "#define FcPublic" "#define FcPublic __declspec(dllimport)" FC_HEADER "${FC_HEADER}") else() string(REPLACE "#define FcPublic" "#define FcPublic __attribute__((visibility(\"default\")))" FC_HEADER "${FC_HEADER}") @@ -44,4 +80,17 @@ endif() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -#vcpkg_test_cmake(PACKAGE_NAME unofficial-fontconfig) + +## Build the fontconfig cache +if(NOT VCPKG_TARGET_IS_WINDOWS) + set(ENV{FONTCONFIG_PATH} "${CURRENT_PACKAGES_DIR}/etc/fonts") + set(ENV{FONTCONFIG_FILE} "${CURRENT_PACKAGES_DIR}/etc/fonts/fonts.conf") + vcpkg_execute_required_process(COMMAND "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/fc-cache${VCPKG_TARGET_EXECUTABLE_SUFFIX}" --verbose + WORKING_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin" + LOGNAME fc-cache-${TARGET_TRIPLET}) +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + # Unnecessary make rule creating the fontconfig cache dir on windows. + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}LOCAL_APPDATA_FONTCONFIG_CACHE") +endif() \ No newline at end of file diff --git a/ports/fontconfig/remove_tests.patch b/ports/fontconfig/remove_tests.patch new file mode 100644 index 00000000000000..0f9e1b8fcd8f0c --- /dev/null +++ b/ports/fontconfig/remove_tests.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.am b/Makefile.am +index cc3024e68..e58f8688c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -24,7 +24,7 @@ + SUBDIRS=fontconfig fc-case fc-lang src \ + fc-cache fc-cat fc-conflist fc-list fc-match \ + fc-pattern fc-query fc-scan fc-validate conf.d \ +- its po po-conf test ++ its po po-conf + if ENABLE_DOCS + SUBDIRS += doc + endif From 7f74e51d31f672911441ff212807bacea5ebca47 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 14 Aug 2020 20:45:13 +0200 Subject: [PATCH 002/114] [libiconv] update to make --- ports/libiconv/CMakeLists.txt | 107 ------------------- ports/libiconv/portfile.cmake | 27 +++-- ports/libiconv/unofficial-iconv-config.cmake | 8 -- 3 files changed, 12 insertions(+), 130 deletions(-) delete mode 100644 ports/libiconv/CMakeLists.txt delete mode 100644 ports/libiconv/unofficial-iconv-config.cmake diff --git a/ports/libiconv/CMakeLists.txt b/ports/libiconv/CMakeLists.txt deleted file mode 100644 index 43d55c0c39fa0a..00000000000000 --- a/ports/libiconv/CMakeLists.txt +++ /dev/null @@ -1,107 +0,0 @@ -cmake_minimum_required(VERSION 3.0.0) -project(libiconv C) - -if(BUILD_SHARED_LIBS) - set(LIBICONV_DYNAMIC "1 /*LIBICONV_DYNAMIC*/") -else() - set(LIBICONV_DYNAMIC "0 /*LIBICONV_DYNAMIC*/") -endif() - -set(CMAKE_STATIC_LIBRARY_PREFIX) -set(CMAKE_SHARED_LIBRARY_PREFIX) - -if(WIN32) - set(HAVE_WCHAR_T "1 /*HAVE_WCHAR_T*/") - set(USE_MBSTATE_T "0 /*USE_MBSTATE_T*/") - set(BROKEN_WCHAR_H "0 /*BROKEN_WCHAR_H*/") - set(HAVE_VISIBILITY "0 /*HAVE_VISIBILITY*/") - set(ICONV_CONST "") - - configure_file(config.h.in config.h) - file(READ "${CMAKE_CURRENT_BINARY_DIR}/config.h" _contents) - string(REPLACE "#undef HAVE_WORKING_O_NOFOLLOW" "#define HAVE_WORKING_O_NOFOLLOW 0" _contents "${_contents}") - string(REPLACE "#undef HAVE_MBRTOWC" "#define HAVE_MBRTOWC 1" _contents "${_contents}") - string(REPLACE "#undef HAVE_MBSINIT" "#define HAVE_MBSINIT 1" _contents "${_contents}") - string(REPLACE "#undef HAVE_WCRTOMB" "#define HAVE_WCRTOMB 1" _contents "${_contents}") - string(REPLACE "#undef ICONV_CONST" "#define ICONV_CONST ${ICONV_CONST}" _contents "${_contents}") - string(REPLACE "#undef EILSEQ" "" _contents "${_contents}") - string(REPLACE "#undef WORDS_LITTLEENDIAN" "#define WORDS_LITTLEENDIAN 1" _contents "${_contents}") - string(REPLACE "#undef ENABLE_RELOCATABLE" "#define ENABLE_RELOCATABLE 1" _contents "${_contents}") - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config.h" "${_contents}") - - configure_file(libcharset/include/localcharset.h.build.in localcharset.h) - configure_file(libcharset/include/libcharset.h.in libcharset.h) - configure_file(include/iconv.h.build.in iconv.h) - - if(MSVC) - add_compile_options(/wd4018) - endif() - - add_definitions( - -D_CRT_SECURE_NO_WARNINGS - -DLIBDIR=${LIBDIR} - -DINSTALLDIR=${INSTALLDIR} - -DNO_XMALLOC=1 - -DENABLE_RELOCATABLE=1 - -DIN_LIBRARY=1 - ) - if(BUILD_SHARED_LIBS) - add_definitions( - -DBUILDING_LIBCHARSET=1 - -DBUILDING_LIBICONV=1 - -DBUILDING_DLL=1) - endif() -else() - if(BUILD_SHARED_LIBS) - set(STATIC_SHARED --enable-shared --disable-static) - else() - set(STATIC_SHARED --disable-shared --enable-static) - endif() - - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/autoconf) - - execute_process( - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/configure --enable-relocatable ${STATIC_SHARED} --without-libiconv-prefix --without-libintl-prefix - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/autoconf - ) - - configure_file(${CMAKE_CURRENT_BINARY_DIR}/autoconf/lib/config.h config.h @ONLY) - configure_file(${CMAKE_CURRENT_BINARY_DIR}/autoconf/include/iconv.h iconv.h @ONLY) - configure_file(${CMAKE_CURRENT_BINARY_DIR}/autoconf/libcharset/include/localcharset.h localcharset.h @ONLY) -endif() - -include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) - -add_library(libcharset libcharset/lib/localcharset.c libcharset/lib/relocatable-stub.c) -target_include_directories(libcharset PUBLIC $) - -add_library(libiconv lib/iconv.c lib/relocatable.c) -if(WIN32) - target_compile_definitions(libiconv PRIVATE - -Dset_relocation_prefix=libiconv_set_relocation_prefix - -Drelocate=libiconv_relocate -Drelocate2=libiconv_relocate2 - ) -endif() -target_link_libraries(libiconv PRIVATE libcharset) -target_include_directories(libiconv PUBLIC $) - -install(TARGETS libcharset libiconv EXPORT unofficial-iconv-targets - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -if(NOT DISABLE_INSTALL_HEADERS) - install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/iconv.h - ${CMAKE_CURRENT_BINARY_DIR}/localcharset.h - DESTINATION include - ) -endif() - -install( - EXPORT unofficial-iconv-targets - FILE unofficial-iconv-config.cmake - NAMESPACE unofficial::iconv:: - DESTINATION share/unofficial-iconv -) diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index b36c995b6df6ac..bed593c4bc5d73 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -21,26 +21,23 @@ vcpkg_extract_source_archive_ex( 0003-Add-export.patch ) -#Since libiconv uses automake, make and configure, we use a custom CMake file -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DINSTALLDIR=\"\" -DLIBDIR=\"\" - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-iconv TARGET_PATH share/unofficial-iconv) +vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH} + DETERMINE_BUILD_TRIPLET + USE_WRAPPERS + OPTIONS + --enable-relocatable + --enable-extra-encodings + ) +vcpkg_install_make() vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin) file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Iconv) file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -vcpkg_test_cmake(PACKAGE_NAME unofficial-iconv) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) \ No newline at end of file diff --git a/ports/libiconv/unofficial-iconv-config.cmake b/ports/libiconv/unofficial-iconv-config.cmake deleted file mode 100644 index 94d65d2ff910e8..00000000000000 --- a/ports/libiconv/unofficial-iconv-config.cmake +++ /dev/null @@ -1,8 +0,0 @@ -if (NOT TARGET unofficial::iconv::libiconv) - add_library(unofficial::iconv::libcharset INTERFACE IMPORTED) - add_library(unofficial::iconv::libiconv INTERFACE IMPORTED) - if(APPLE) - set_property(TARGET unofficial::iconv::libcharset PROPERTY INTERFACE_LINK_LIBRARIES "charset;unofficial::iconv::libiconv") - set_property(TARGET unofficial::iconv::libiconv PROPERTY INTERFACE_LINK_LIBRARIES "iconv") - endif() -endif() From f126e71d28efe322441dd6b8c2999c6056aa121e Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 14 Aug 2020 20:45:32 +0200 Subject: [PATCH 003/114] [gettext] update to make --- .../gettext/0003-Fix-win-unicode-paths.patch | 2 +- ports/gettext/CONTROL | 2 +- ports/gettext/portfile.cmake | 56 +++++++++++-------- 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/ports/gettext/0003-Fix-win-unicode-paths.patch b/ports/gettext/0003-Fix-win-unicode-paths.patch index 540ac3d92cb6df..d8e52719f43e37 100644 --- a/ports/gettext/0003-Fix-win-unicode-paths.patch +++ b/ports/gettext/0003-Fix-win-unicode-paths.patch @@ -2,7 +2,7 @@ diff --git "a/gettext-runtime/intl/loadmsgcat.c" "b/gettext-runtime/intl/loadmsg index 63351523..c078de3f 100644 --- a/gettext-runtime/intl/loadmsgcat.c +++ b/gettext-runtime/intl/loadmsgcat.c -@@ -477,6 +477,55 @@ char *alloca (); +@@ -388,6 +388,55 @@ char *alloca (); # define munmap(addr, len) __munmap (addr, len) #endif diff --git a/ports/gettext/CONTROL b/ports/gettext/CONTROL index 0918e1943c3abc..d5fd705c3d73b9 100644 --- a/ports/gettext/CONTROL +++ b/ports/gettext/CONTROL @@ -1,5 +1,5 @@ Source: gettext -Version: 0.19-15 +Version: 0.21 Homepage: https://www.gnu.org/software/gettext/ Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. Provides libintl. Build-Depends: libiconv diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index 988c2f439cadab..fd188cbc387e56 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -11,45 +11,57 @@ endif() #Based on https://github.com/winlibs/gettext -set(GETTEXT_VERSION 0.19) +set(GETTEXT_VERSION 0.21) vcpkg_download_distfile(ARCHIVE URLS "https://ftp.gnu.org/pub/gnu/gettext/gettext-${GETTEXT_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gettext/gettext-${GETTEXT_VERSION}.tar.gz" FILENAME "gettext-${GETTEXT_VERSION}.tar.gz" - SHA512 a5db035c582ff49d45ee6eab9466b2bef918e413a882019c204a9d8903cb3770ddfecd32c971ea7c7b037c7b69476cf7c56dcabc8b498b94ab99f132516c9922 + SHA512 bbe590c5dd3580c75bf30ff768da99a88eb8d466ec1ac9eea20be4cab4357ecf72448e6b81b47425e39d50fa6320ba426632914d7898dfebb4f159abc39c31d1 ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${GETTEXT_VERSION} PATCHES - 0001-Fix-macro-definitions.patch + #0001-Fix-macro-definitions.patch 0002-Fix-uwp-build.patch 0003-Fix-win-unicode-paths.patch ) +vcpkg_find_acquire_program(BISON) +get_filename_component(BISON_PATH ${BISON} DIRECTORY) +vcpkg_add_to_path(${BISON_PATH}) -file(COPY - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_LIST_DIR}/config.win32.h - ${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in - DESTINATION ${SOURCE_PATH}/gettext-runtime -) -file(REMOVE ${SOURCE_PATH}/gettext-runtime/intl/libgnuintl.h ${SOURCE_PATH}/gettext-runtime/config.h) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/libgnuintl.win32.h DESTINATION ${SOURCE_PATH}/gettext-runtime/intl) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}/gettext-runtime - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-gettext TARGET_PATH share/unofficial-gettext) +if(VCPKG_TARGET_IS_WINDOWS) + # This is required. For some reason these do not get correctly identified for release builds. + list(APPEND OPTIONS ac_cv_func_wcslen=yes + ac_cv_func_memmove=yes) +endif() +vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH}/gettext-runtime # Port should probably be renamed to gettext-runtime instead of only gettext + DETERMINE_BUILD_TRIPLET + USE_WRAPPERS + ADD_BIN_TO_PATH # So configure can check for working iconv + OPTIONS --enable-relocatable + --enable-c++ + --disable-java + ${OPTIONS} + ) +vcpkg_install_make() # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gettext) file(RENAME ${CURRENT_PACKAGES_DIR}/share/gettext/COPYING ${CURRENT_PACKAGES_DIR}/share/gettext/copyright) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +set(GNU_DLL_PATHS lib/ debug/lib/) +set(GNU_DLL_NAME GNU.Gettext.dll) +foreach(DLL_PATH IN LISTS GNU_DLL_PATHS) + if(EXISTS "${CURRENT_PACKAGES_DIR}/${DLL_PATH}${GNU_DLL_NAME}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/${DLL_PATH}${GNU_DLL_NAME}") + endif() +endforeach() + vcpkg_copy_pdbs() From 1fa13540a63ad58022a9f36493f55f4ed65dc657 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 14 Aug 2020 20:46:26 +0200 Subject: [PATCH 004/114] [vcpkg_configure_make] Changes considering pure configure ports without the requirement to run autoconfig --- scripts/cmake/vcpkg_configure_make.cmake | 55 ++++++++++++++---------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 52000e36d85e0c..e0028f802cb50b 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -6,7 +6,9 @@ ## ```cmake ## vcpkg_configure_make( ## SOURCE_PATH <${SOURCE_PATH}> -## [AUTOCONFIG] +## [AUTOCONFIG] +## [USE_WRAPPERS] +## [DETERMINE_BUILD_TRIPLET] ## [BUILD_TRIPLET "--host=x64 --build=i686-unknown-pc"] ## [NO_ADDITIONAL_PATHS] ## [CONFIG_DEPENDENT_ENVIRONMENT ...] @@ -34,9 +36,15 @@ ## ### SKIP_CONFIGURE ## Skip configure process ## +## ### USE_WRAPPERS +## Use autotools ar-lib and compile wrappers (only applies to windows cl and lib) +## ## ### BUILD_TRIPLET ## Used to pass custom --build/--target/--host to configure. Can be globally overwritten by VCPKG_MAKE_BUILD_TRIPLET ## +## ### DETERMINE_BUILD_TRIPLET +## For ports having a configure script following the autotools rules +## ## ### NO_ADDITIONAL_PATHS ## Don't pass any additional paths except for --prefix to the configure call ## @@ -160,7 +168,7 @@ endmacro() function(vcpkg_configure_make) cmake_parse_arguments(_csc - "AUTOCONFIG;SKIP_CONFIGURE;COPY_SOURCE;DISABLE_VERBOSE_FLAGS;NO_ADDITIONAL_PATHS;ADD_BIN_TO_PATH" + "AUTOCONFIG;SKIP_CONFIGURE;COPY_SOURCE;DISABLE_VERBOSE_FLAGS;NO_ADDITIONAL_PATHS;ADD_BIN_TO_PATH;USE_WRAPPERS;DETERMINE_BUILD_TRIPLET" "SOURCE_PATH;PROJECT_SUBPATH;PRERUN_SHELL;BUILD_TRIPLET" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;CONFIGURE_ENVIRONMENT_VARIABLES;CONFIG_DEPENDENT_ENVIRONMENT" ${ARGN} @@ -216,14 +224,13 @@ function(vcpkg_configure_make) # Pre-processing windows configure requirements if (CMAKE_HOST_WIN32) - _vcpkg_determine_autotools_host_cpu(BUILD_ARCH) # VCPKG_HOST => machine you are building on => --build= - list(APPEND MSYS_REQUIRE_PACKAGES diffutils pkg-config binutils libtool gettext gettext-devel + gcc # gcc is required for windres to work ) list(APPEND MSYS_REQUIRE_PACKAGES make) if (_csc_AUTOCONFIG) @@ -232,28 +239,30 @@ function(vcpkg_configure_make) automake m4 ) + endif() + if(_csc_AUTOCONFIG AND NOT _csc_BUILD_TRIPLET OR _csc_DETERMINE_BUILD_TRIPLET) + _vcpkg_determine_autotools_host_cpu(BUILD_ARCH) # VCPKG_HOST => machine you are building on => --build= + _vcpkg_determine_autotools_target_cpu(TARGET_ARCH) # --build: the machine you are building on # --host: the machine you are building for # --target: the machine that CC will produce binaries for # https://stackoverflow.com/questions/21990021/how-to-determine-host-value-for-configure-when-using-cross-compiler # Only for ports using autotools so we can assume that they follow the common conventions for build/target/host - if(NOT _csc_BUILD_TRIPLET) - set(_csc_BUILD_TRIPLET "--build=${BUILD_ARCH}-pc-mingw32") # This is required since we are running in a msys - # shell which will be otherwise identified as ${BUILD_ARCH}-pc-msys - _vcpkg_determine_autotools_target_cpu(TARGET_ARCH) - if(NOT TARGET_ARCH MATCHES "${BUILD_ARCH}") # we do not need to specify the additional flags if we build nativly. - string(APPEND _csc_BUILD_TRIPLET " --host=${TARGET_ARCH}-pc-mingw32") # (Host activates crosscompilation; The name given here is just the prefix of the host tools for the target) - endif() - if(VCPKG_TARGET_IS_UWP AND NOT _csc_BUILD_TRIPLET MATCHES "--host") - # Needs to be different from --build to enable cross builds. - string(APPEND _csc_BUILD_TRIPLET " --host=${TARGET_ARCH}-unknown-mingw32") - endif() + set(_csc_BUILD_TRIPLET "--build=${BUILD_ARCH}-pc-mingw32") # This is required since we are running in a msys + # shell which will be otherwise identified as ${BUILD_ARCH}-pc-msys + if(NOT TARGET_ARCH MATCHES "${BUILD_ARCH}") # we do not need to specify the additional flags if we build nativly. + string(APPEND _csc_BUILD_TRIPLET " --host=${TARGET_ARCH}-pc-mingw32") # (Host activates crosscompilation; The name given here is just the prefix of the host tools for the target) + endif() + if(VCPKG_TARGET_IS_UWP AND NOT _csc_BUILD_TRIPLET MATCHES "--host") + # Needs to be different from --build to enable cross builds. + string(APPEND _csc_BUILD_TRIPLET " --host=${TARGET_ARCH}-unknown-mingw32") endif() - debug_message("Using make triplet: ${_csc_BUILD_TRIPLET}") endif() + debug_message("Using make triplet: ${_csc_BUILD_TRIPLET}") vcpkg_acquire_msys(MSYS_ROOT PACKAGES ${MSYS_REQUIRE_PACKAGES}) vcpkg_add_to_path("${MSYS_ROOT}/usr/bin") + set(BASH "${MSYS_ROOT}/usr/bin/bash.exe") # This is required because PATH contains sort and find from Windows but the MSYS versions are needed @@ -273,7 +282,7 @@ function(vcpkg_configure_make) endmacro() set(CONFIGURE_ENV "V=1") - if (_csc_AUTOCONFIG) # without autotools we assume a custom configure script which correctly handles cl and lib. Otherwise the port needs to set CC|CXX|AR and probably CPP + if (_csc_AUTOCONFIG OR _csc_USE_WRAPPERS) # without autotools we assume a custom configure script which correctly handles cl and lib. Otherwise the port needs to set CC|CXX|AR and probably CPP _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile cl.exe -nologo -E") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "compile cl.exe -nologo") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "compile cl.exe -nologo") @@ -577,11 +586,13 @@ function(vcpkg_configure_make) WORKING_DIRECTORY "${TAR_DIR}" LOGNAME config-${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}} ) - if(EXISTS "${TAR_DIR}/libtool" AND VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(_file "${TAR_DIR}/libtool") - file(READ "${_file}" _contents) - string(REPLACE ".dll.lib" ".lib" _contents "${_contents}") - file(WRITE "${_file}" "${_contents}") + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB_RECURSE LIBTOOL_FILES "${TAR_DIR}*/libtool") + foreach(lt_file IN LISTS LIBTOOL_FILES) + file(READ "${lt_file}" _contents) + string(REPLACE ".dll.lib" ".lib" _contents "${_contents}") + file(WRITE "${lt_file}" "${_contents}") + endforeach() endif() endif() From 676b61579575d719fa278340925af28ab3f3038f Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 14 Aug 2020 20:46:48 +0200 Subject: [PATCH 005/114] [fontconfig] make it work on windows --- ports/fontconfig/CONTROL | 2 +- ports/fontconfig/build2.patch | 35 +++++++++++++++++++++++++++++++++ ports/fontconfig/portfile.cmake | 9 ++++++++- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 ports/fontconfig/build2.patch diff --git a/ports/fontconfig/CONTROL b/ports/fontconfig/CONTROL index 155c87a1a2f0ec..636b7499a3f145 100644 --- a/ports/fontconfig/CONTROL +++ b/ports/fontconfig/CONTROL @@ -2,4 +2,4 @@ Source: fontconfig Version: 2.13.1 Homepage: https://www.freedesktop.org/software/fontconfig/front.html Description: Library for configuring and customizing font access. -Build-Depends: freetype, expat, libiconv, dirent, pthread, json-c, dirent, libuuid (!windows), gettext \ No newline at end of file +Build-Depends: freetype, expat, libiconv, dirent, pthread, json-c, dirent, libuuid (!windows&!osx), gettext \ No newline at end of file diff --git a/ports/fontconfig/build2.patch b/ports/fontconfig/build2.patch new file mode 100644 index 00000000000000..061762e5cc9cf5 --- /dev/null +++ b/ports/fontconfig/build2.patch @@ -0,0 +1,35 @@ +diff --git a/Tools.mk b/Tools.mk +index f0fa0ec50..24e5afd16 100644 +--- a/Tools.mk ++++ b/Tools.mk +@@ -43,7 +43,7 @@ AM_CPPFLAGS = \ + $(WARN_CFLAGS) + + $(TOOL): $(TSRC) $(ALIAS_FILES) +- $(AM_V_GEN) $(CC_FOR_BUILD) -o $(TOOL) $< $(AM_CPPFLAGS) ++ $(AM_V_GEN) $(CC_FOR_BUILD) -o $(TOOL) $< $(AM_CPPFLAGS) $(LIBS) + + $(TARG): $(TMPL) $(TSRC) $(DEPS) + $(AM_V_GEN) $(MAKE) $(TOOL) && \ +diff --git a/fc-case/fc-case.c b/fc-case/fc-case.c +index 236bff5f0..6fb21c855 100644 +--- a/fc-case/fc-case.c ++++ b/fc-case/fc-case.c +@@ -345,7 +345,7 @@ main (int argc, char **argv) + break; + fputs (line, stdout); + } +- ++ fflush (stdout); + /* + * Dump these tables + */ +@@ -354,7 +354,7 @@ main (int argc, char **argv) + /* + * And flush out the rest of the input file + */ +- ++ fflush (stdout); + while (fgets (line, sizeof (line), stdin)) + fputs (line, stdout); + diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index f3f5e378bad105..67b0692472bc7c 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -9,12 +9,17 @@ vcpkg_from_gitlab( HEAD_REF master # branch name PATCHES remove_tests.patch build.patch + build2.patch ) vcpkg_find_acquire_program(GPERF) get_filename_component(GPERF_PATH ${GPERF} DIRECTORY) vcpkg_add_to_path(${GPERF_PATH}) +if(VCPKG_TARGET_IS_WINDOWS) + set(OPT_DBG "LIBS='-L${CURRENT_INSTALLED_DIR}/debug/lib -lintl'") + set(OPT_REL "LIBS='-L${CURRENT_INSTALLED_DIR}/lib -lintl'") +endif() vcpkg_configure_make( AUTOCONFIG COPY_SOURCE @@ -32,15 +37,17 @@ vcpkg_configure_make( OPTIONS_DEBUG "--with-expat-lib=${CURRENT_INSTALLED_DIR}/debug/lib" "--with-libiconv-lib=${CURRENT_INSTALLED_DIR}/debug/lib" + ${OPT_DBG} OPTIONS_RELEASE "--with-expat-lib=${CURRENT_INSTALLED_DIR}/lib" "--with-libiconv-lib=${CURRENT_INSTALLED_DIR}/lib" + ${OPT_REL} ADD_BIN_TO_PATH ) # [AC_HELP_STRING([--enable-libxml2], # [Use libxml2 instead of Expat])]) -vcpkg_install_make() +vcpkg_install_make(ADD_BIN_TO_PATH) vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES uuid) From f475ceb13f7952aafa81c0d7191aef6f0ddd26b6 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 16 Aug 2020 00:14:15 +0200 Subject: [PATCH 006/114] Remove install of unofficial cmake config --- ports/libiconv/CONTROL | 2 +- ports/libiconv/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libiconv/CONTROL b/ports/libiconv/CONTROL index e95414202ecfbb..329b3ebc17819d 100644 --- a/ports/libiconv/CONTROL +++ b/ports/libiconv/CONTROL @@ -1,5 +1,5 @@ Source: libiconv Version: 1.16 -Port-Version: 5 +Port-Version: 6 Homepage: https://www.gnu.org/software/libiconv/ Description: GNU Unicode text conversion diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index bed593c4bc5d73..e175bf69f9ac5a 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -1,7 +1,7 @@ if(NOT VCPKG_TARGET_IS_WINDOWS) set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/unofficial-iconv) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-iconv-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-iconv) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/Iconv) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Iconv) return() endif() From 067387050c5a1fd20d964142fd4861230e442cb6 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 16 Aug 2020 12:16:03 +0200 Subject: [PATCH 007/114] add function get_cmake_vars --- scripts/cmake/vcpkg_common_functions.cmake | 1 + scripts/cmake/vcpkg_get_cmake_vars.cmake | 56 ++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 scripts/cmake/vcpkg_get_cmake_vars.cmake diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 2fad7f0ed9632a..4dfd709bcbdb5f 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -42,6 +42,7 @@ include(vcpkg_apply_patches) include(vcpkg_copy_pdbs) include(vcpkg_copy_tool_dependencies) include(vcpkg_copy_tools) +include(vcpkg_get_cmake_vars) include(vcpkg_get_program_files_platform_bitness) include(vcpkg_get_windows_sdk) include(vcpkg_replace_string) diff --git a/scripts/cmake/vcpkg_get_cmake_vars.cmake b/scripts/cmake/vcpkg_get_cmake_vars.cmake new file mode 100644 index 00000000000000..a48edd65e55bbe --- /dev/null +++ b/scripts/cmake/vcpkg_get_cmake_vars.cmake @@ -0,0 +1,56 @@ +## # vcpkg_get_cmake_vars +## +## Runs a cmake configure with a dummy project to extract certain cmake variables +## This function is mostliy +## +## ## Usage +## ```cmake +## vcpkg_get_cmake_vars( +## [OUTPUT_FILE ] +## [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] +## ) +## ``` +## +## ## Parameters +## ### OPTIONS +## Additional options to pass to the test configure call +## +## ### OUTPUT_FILE +## Variable to hold the +## +## ## Notes +## This command will either alter the settings for `VCPKG_LIBRARY_LINKAGE` or fail, depending on what was requested by the user versus what the library supports. +## +## ## Examples +## +## * [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) + +function(vcpkg_get_cmake_vars) + cmake_parse_arguments(PARSE_ARGV 0 _gcv "OUTPUT_VAR" "OPTIONS" ${ARGN}) + + if(_gcv_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_get_cmake_vars was passed unparsed arguments: '${_gcv_UNPARSED_ARGUMENTS}'") + endif() + + if(NOT _gcv_OUTPUT_VAR) + message(FATAL_ERROR "vcpkg_get_cmake_vars requires parameter OUTPUT_VAR!") + endif() + + if(${_gcv_OUTPUT_VAR}) + list(APPEND "-DVCPKG_OUTPUT_FILE=${${_gcv_OUTPUT_VAR}}") + else() + set(DEFAULT_OUT "${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}.cmake.log") # So that the file gets included in CI artifacts. + list(APPEND "-DVCPKG_OUTPUT_FILE=${CURRENT_BUILDTREES_DIR}/${DEFAULT_OUT}") + set(${_gcv_OUTPUT_VAR} ${DEFAULT_OUT} PARENT_SCOPE) + endif() + + set(VCPKG_BUILD_TYPE release) + vcpkg_configure_cmake( + SOURCE_PATH ${CURRENT_PORT_DIR} + OPTIONS ${_gcv_OPTIONS} + PREFER_NINJA + ) + + file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-get-cmake-vars") + file(RENAME "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-rel.log" "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}.log") +endfunction() \ No newline at end of file From b5f28f723714d1d2f951fffbdc1d1be44a71cbb1 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 16 Aug 2020 14:41:27 +0200 Subject: [PATCH 008/114] fine tuning. --- scripts/cmake/vcpkg_get_cmake_vars.cmake | 23 ++-- scripts/get_cmake_vars/CMakeLists.txt | 137 +++++++++++++++++++++++ 2 files changed, 151 insertions(+), 9 deletions(-) create mode 100644 scripts/get_cmake_vars/CMakeLists.txt diff --git a/scripts/cmake/vcpkg_get_cmake_vars.cmake b/scripts/cmake/vcpkg_get_cmake_vars.cmake index a48edd65e55bbe..ed4051c57a0cf9 100644 --- a/scripts/cmake/vcpkg_get_cmake_vars.cmake +++ b/scripts/cmake/vcpkg_get_cmake_vars.cmake @@ -26,31 +26,36 @@ ## * [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) function(vcpkg_get_cmake_vars) - cmake_parse_arguments(PARSE_ARGV 0 _gcv "OUTPUT_VAR" "OPTIONS" ${ARGN}) + cmake_parse_arguments(PARSE_ARGV 0 _gcv "" "OUTPUT_FILE" "OPTIONS") if(_gcv_UNPARSED_ARGUMENTS) message(FATAL_ERROR "vcpkg_get_cmake_vars was passed unparsed arguments: '${_gcv_UNPARSED_ARGUMENTS}'") endif() - if(NOT _gcv_OUTPUT_VAR) - message(FATAL_ERROR "vcpkg_get_cmake_vars requires parameter OUTPUT_VAR!") + if(NOT _gcv_OUTPUT_FILE) + message(FATAL_ERROR "vcpkg_get_cmake_vars requires parameter OUTPUT_FILE!") endif() - if(${_gcv_OUTPUT_VAR}) - list(APPEND "-DVCPKG_OUTPUT_FILE=${${_gcv_OUTPUT_VAR}}") + if(${_gcv_OUTPUT_FILE}) + debug_message("OUTPUT_FILE ${${_gcv_OUTPUT_FILE}}") + list(APPEND _gcv_OPTIONS "-DVCPKG_OUTPUT_FILE=${${_gcv_OUTPUT_FILE}}") else() set(DEFAULT_OUT "${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}.cmake.log") # So that the file gets included in CI artifacts. - list(APPEND "-DVCPKG_OUTPUT_FILE=${CURRENT_BUILDTREES_DIR}/${DEFAULT_OUT}") - set(${_gcv_OUTPUT_VAR} ${DEFAULT_OUT} PARENT_SCOPE) + list(APPEND _gcv_OPTIONS "-DVCPKG_OUTPUT_FILE:PATH=${DEFAULT_OUT}") + set(${_gcv_OUTPUT_FILE} "${DEFAULT_OUT}" PARENT_SCOPE) endif() set(VCPKG_BUILD_TYPE release) vcpkg_configure_cmake( - SOURCE_PATH ${CURRENT_PORT_DIR} + SOURCE_PATH "${SCRIPTS}/get_cmake_vars" OPTIONS ${_gcv_OPTIONS} PREFER_NINJA ) + file(REMOVE "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}-out.log") + file(REMOVE "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}-err.log") + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-get-cmake-vars") file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-get-cmake-vars") - file(RENAME "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-rel.log" "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}.log") + file(RENAME "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-out.log" "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}-out.log") + file(RENAME "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-err.log" "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}-err.log") endfunction() \ No newline at end of file diff --git a/scripts/get_cmake_vars/CMakeLists.txt b/scripts/get_cmake_vars/CMakeLists.txt new file mode 100644 index 00000000000000..f26137ce9ecd14 --- /dev/null +++ b/scripts/get_cmake_vars/CMakeLists.txt @@ -0,0 +1,137 @@ +cmake_minimum_required(VERSION 3.17) + +set(VCPKG_LANGUAGES "C;CXX" CACHE STRING "LANGUAGES TO ENABLE FOR THIS PROJECT") +set(VCPKG_VAR_PREFIX "VCPKG_DETECTED" CACHE STRING "Variable prefix to use for detected flags") +set(VCPKG_CONFIGS "DEBUG;RELEASE" CACHE STRING "Configurations to detect flags for") +set(VCPKG_OUTPUT_FILE "${CMAKE_BINARY_DIR}/../detected_flags.cmake.${VCPKG_TARGET_TRIPLET}.log" CACHE STRING "Output CMake files") +set(VCPKG_ADDITIONAL_OUTPUT_VARS "" CACHE STRING "Additional variables to output.") + +set(OUTPUT_STRING) +project(get_cmake_vars LANGUAGES ${VCPKG_LANGUAGES}) + +if(MSVC) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_MSVC TRUE)\n") +endif() +string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_CROSSCOMPILING ${CMAKE_CROSSCOMPILING})\n") +string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_SYSEM_NAME \"${CMAKE_SYSTEM_NAME}\")\n") +string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_SYSTEM_PROCESSOR \"${CMAKE_SYSTEM_PROCESSOR}\")\n") +# other: +# CMAKE_C_STANDARD +# CMAKE_CXX_STANDARD + +set(PROGLIST AR RANLIB STRIP NM OBJDUMP DLLTOOL MT LINKER) +foreach(prog IN LISTS PROGLIST) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${prog} \"${CMAKE_${prog}}\")\n") +endforeach() + +set(COMPILERS ${VCPKG_LANGUAGES} RC) +foreach(prog IN LISTS COMPILERS) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${prog}_COMPILER \"${CMAKE_${prog}_COMPILER}\")\n") +endforeach() + +set(FLAGS ${VCPKG_LANGUAGES} RC SHARED_LINKER STATIC_LINKER EXE_LINKER) +foreach(flag IN LISTS FLAGS) + string(REGEX REPLACE " +" " " CMAKE_${flag}_FLAGS "${CMAKE_${flag}_FLAGS}") + string(REGEX REPLACE "( |^)/" "\\1-" CMAKE_${flag}_FLAGS "${CMAKE_${flag}_FLAGS}") + string(STRIP "${CMAKE_${flag}_FLAGS}" CMAKE_${flag}_FLAGS) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${flag}FLAGS \" ${CMAKE_${flag}_FLAGS}\")\n") + foreach(config IN LISTS VCPKG_CONFIGS) + string(REGEX REPLACE " +" " " CMAKE_${flag}_FLAGS_${config} "${CMAKE_${flag}_FLAGS_${config}}") + string(REGEX REPLACE "( |^)/" "\\1-" CMAKE_${flag}_FLAGS_${config} "${CMAKE_${flag}_FLAGS_${config}}") + string(STRIP "${CMAKE_${flag}_FLAGS_${config}}" CMAKE_${flag}_FLAGS_${config}) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${flag}FLAGS_${config} \"${CMAKE_${flag}_FLAGS_${config}}\")\n") + set(COMBINED_${flag}_${config}_FLAGS "${CMAKE_${flag}_FLAGS} ${CMAKE_${flag}_FLAGS_${config}}") + string(REGEX REPLACE " +" " " COMBINED_${flag}_${config}_FLAGS "${COMBINED_${flag}_${config}_FLAGS}") + string(STRIP "${COMBINED_${flag}_${config}_FLAGS}" COMBINED_${flag}_${config}_FLAGS) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_COMBINED_${flag}FLAGS_${config} \"${COMBINED_${flag}_${config}_FLAGS}\")\n") + endforeach() +endforeach() + +set(additional_vars) +foreach(_lang IN LISTS VCPKG_LANGUAGES) + list(APPEND additional_vars CMAKE_${_lang}_STANDARD_INCLUDE_DIRECTORIES) + list(APPEND additional_vars CMAKE_${_lang}_STANDARD_LIBRARIES) + # Probably not required. + #list(APPEND additional_vars CMAKE_${_lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES) + #list(APPEND additional_vars CMAKE_${_lang}_IMPLICIT_INCLUDE_DIRECTORIES) + #list(APPEND additional_vars CMAKE_${_lang}_IMPLICIT_LINK_DIRECTORIES) + #list(APPEND additional_vars CMAKE_${_lang}_IMPLICIT_LINK_LIBRARIES) +endforeach() +# list(APPEND additional_vars CMAKE_LINK_INTERFACE_LIBRARIES) #deprecated + +foreach(_var IN LISTS additional_vars) + string(REPLACE "CMAKE_" "" outvar "${_var}") + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${outvar} \"${${_var}}\")\n") +endforeach() + +# These seem to be empty. +# set(add_props INCLUDE_DIRECTORIES COMPILE_DEFINITIONS COMPILE_OPTIONS LINK_DIRECTORIES LINK_OPTIONS) +# foreach(prop IN LISTS add_props) + # get_directory_property(${prop} ${prop}) + # string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${prop} ${${prop}})\n") + # foreach(config IN LISTS VCPKG_CONFIGS) + # get_directory_property(${prop}_${config} ${prop}_${config}) + # string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${prop}_${config} ${${prop}_${config}})\n") + # endforeach() +# endforeach() +set(ENV_VARIABLES PATH INCLUDE C_INCLUDE_PATH CPLUS_INCLUDE_PATH LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH ) +foreach(_env IN LISTS ENV_VARIABLES) + IF(WIN32) + string(REPLACE "\\" "/" ENV_${_env} "$ENV{${_env}}") + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_ENV_${_env} \"${ENV_${_env}}\")\n") + else() + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_ENV_${_env} \"$ENV{${_env}}\")\n") + endif() +endforeach() + +foreach(addvar IN LISTS VCPKG_ADDITIONAL_OUTPUT_VARS) + string(REPLACE "CMAKE_" outvar "${addvar}") + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${outvar} \"${${addvar}}\")\n") +endforeach() + +file(WRITE "${VCPKG_OUTPUT_FILE}" "${OUTPUT_STRING}") + +# Not useful? +# CMAKE__STANDARD_INCLUDE_DIRECTORIES +# CMAKE__STANDARD_LIBRARIES + +# CMAKE__IMPLICIT_LINK_FRAMEWORK_DIRECTORIES +# CMAKE__IMPLICIT_INCLUDE_DIRECTORIES +# CMAKE__IMPLICIT_LINK_DIRECTORIES +# CMAKE__IMPLICIT_LINK_LIBRARIES + +# CMAKE_LINK_INTERFACE_LIBRARIES -> LIBS + +# Dir properties: +# COMPILE_DEFINITIONS(_CONFIG) +# COMPILE_OPTIONS(_CONFIG) +# INCLUDE_DIRECTORIES +# LINK_DIRECTORIES +# LINK_OPTIONS + +# Programs: +# CMAKE_AR +# CMAKE__COMPILER_AR (Wrapper) +# CMAKE_RANLIB¶ +# CMAKE__COMPILER_RANLIB¶ +# CMAKE_STRIP +# CMAKE_NM +# CMAKE_OBJDUMP +# CMAKE_DLLTOOL +# CMAKE_MT +# CMAKE_LINKER + +# CMAKE_C_COMPILER +# CMAKE_CXX_COMPILER +# CMAKE_RC_COMPILER <-- +# CMAKE_RC_FLAGS + +# Flags: +# CMAKE__FLAGS +# CMAKE__FLAGS_ +# CMAKE_SHARED_LINKER_FLAGS +# CMAKE_STATIC_LINKER_FLAGS +# CMAKE_STATIC_LINKER_FLAGS_. +# CMAKE_EXE_LINKER_FLAGS +# CMAKE_EXE_LINKER_FLAGS_ (CMAKE_C_FLAGS_) + From deae3fe4cc81ace68049459e559842a3a6e576ec Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 16 Aug 2020 14:47:47 +0200 Subject: [PATCH 009/114] apply to make based ports. --- scripts/cmake/vcpkg_build_make.cmake | 20 ++++- scripts/cmake/vcpkg_configure_make.cmake | 110 ++++++++++++----------- 2 files changed, 75 insertions(+), 55 deletions(-) diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index 545e6d7653ebb6..0da614e325e4ea 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -37,6 +37,7 @@ ## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) function(vcpkg_build_make) cmake_parse_arguments(_bc "ADD_BIN_TO_PATH;ENABLE_INSTALL" "LOGFILE_ROOT;BUILD_TARGET" "" ${ARGN}) + include("${CMAKE_VARS_FILE}") if(NOT _bc_LOGFILE_ROOT) set(_bc_LOGFILE_ROOT "build") @@ -106,11 +107,28 @@ function(vcpkg_build_make) message(STATUS "Building ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(LINKER_FLAGS_${CMAKE_BUILDTYPE} "${VCPKG_DETECTED_STATIC_LINKERFLAGS_${CMAKE_BUILDTYPE}}") + else() # dynamic + set(LINKER_FLAGS_${CMAKE_BUILDTYPE} "${VCPKG_DETECTED_SHARED_LINKERFLAGS_${CMAKE_BUILDTYPE}}") + endif() + if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe") + set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/") + set(LINK_ENV_${CMAKE_BUILDTYPE} "$ENV{_LINK_} ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}") + else() + set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/ ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}") + endif() + set(ENV{LIB} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIB_PATHLIKE_CONCAT}") set(ENV{LIBPATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIBPATH_PATHLIKE_CONCAT}") set(ENV{LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIBRARY_PATH_PATHLIKE_CONCAT}") #set(ENV{LD_LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX_${BUILDTYPE}}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX_${BUILDTYPE}}/lib/manual-link/${LD_LIBRARY_PATH_PATHLIKE_CONCAT}") + if(LINK_ENV_${_VAR_SUFFIX}) + _vcpkg_backup_env_variables(_LINK_) + set(ENV{_LINK_} "${LINK_ENV_${_VAR_SUFFIX}}") + endif() + if(_bc_ADD_BIN_TO_PATH) set(_BACKUP_ENV_PATH "$ENV{PATH}") vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX}/bin") @@ -126,7 +144,7 @@ function(vcpkg_build_make) WORKING_DIRECTORY "${WORKING_DIRECTORY}" LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" ) - + _vcpkg_restore_env_variables(_LINK_) if(_bc_ADD_BIN_TO_PATH) set(ENV{PATH} "${_BACKUP_ENV_PATH}") endif() diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 52000e36d85e0c..c39cdbeac6984b 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -165,6 +165,14 @@ function(vcpkg_configure_make) "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;CONFIGURE_ENVIRONMENT_VARIABLES;CONFIG_DEPENDENT_ENVIRONMENT" ${ARGN} ) + vcpkg_get_cmake_vars(OUTPUT_FILE CMAKE_VARS_FILE) + set(CMAKE_VARS_FILE "${CMAKE_VARS_FILE}" PARENT_SCOPE) + debug_message("Including cmake vars from: ${CMAKE_VARS_FILE}") + include("${CMAKE_VARS_FILE}") + if(VCPKG_TARGET_IS_WINDOWS) + + endif() + if(DEFINED VCPKG_MAKE_BUILD_TRIPLET) set(_csc_BUILD_TRIPLET ${VCPKG_MAKE_BUILD_TRIPLET}) # Triplet overwrite for crosscompiling endif() @@ -273,15 +281,16 @@ function(vcpkg_configure_make) endmacro() set(CONFIGURE_ENV "V=1") + ## TODO: Add VCPKG_DETECTED vars here! if (_csc_AUTOCONFIG) # without autotools we assume a custom configure script which correctly handles cl and lib. Otherwise the port needs to set CC|CXX|AR and probably CPP - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile cl.exe -nologo -E") - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "compile cl.exe -nologo") - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "compile cl.exe -nologo") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile cl.exe -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "compile cl.exe ") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "compile cl.exe ") _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "ar-lib lib.exe -verbose") else() - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "cl.exe -nologo -E") - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "cl.exe -nologo") - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "cl.exe -nologo") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "cl.exe -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "cl.exe") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "cl.exe") _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "lib.exe -verbose") endif() _vcpkg_append_to_configure_environment(CONFIGURE_ENV LD "link.exe -verbose") @@ -361,12 +370,6 @@ function(vcpkg_configure_make) set(base_cmd) if(CMAKE_HOST_WIN32) set(base_cmd ${BASH} --noprofile --norc --debug) - # Load toolchains - if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) - set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") - endif() - include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") - #Join the options list as a string with spaces between options list(JOIN _csc_OPTIONS " " _csc_OPTIONS) list(JOIN _csc_OPTIONS_RELEASE " " _csc_OPTIONS_RELEASE) list(JOIN _csc_OPTIONS_DEBUG " " _csc_OPTIONS_DEBUG) @@ -379,18 +382,11 @@ function(vcpkg_configure_make) set(ENV{C_INCLUDE_PATH} "${_VCPKG_INSTALLED}/include${VCPKG_HOST_PATH_SEPARATOR}${C_INCLUDE_PATH_BACKUP}") set(ENV{CPLUS_INCLUDE_PATH} "${_VCPKG_INSTALLED}/include${VCPKG_HOST_PATH_SEPARATOR}${CPLUS_INCLUDE_PATH_BACKUP}") - # Setup global flags -> TODO: Further improve with toolchain file in mind! - set(CPP_FLAGS_GLOBAL "$ENV{CPPFLAGS} -I${_VCPKG_INSTALLED}/include") - set(C_FLAGS_GLOBAL "$ENV{CFLAGS} ${VCPKG_C_FLAGS}") - set(CXX_FLAGS_GLOBAL "$ENV{CXXFLAGS} ${VCPKG_CXX_FLAGS}") - set(LD_FLAGS_GLOBAL "$ENV{LDFLAGS} ${VCPKG_LINKER_FLAGS}") # Flags should be set in the toolchain instead (Setting this up correctly requires a function named vcpkg_determined_cmake_compiler_flags which can also be used to setup CC and CXX etc.) - if(NOT VCPKG_TARGET_IS_WINDOWS) - string(APPEND C_FLAGS_GLOBAL " -fPIC") - string(APPEND CXX_FLAGS_GLOBAL " -fPIC") - else() + if(VCPKG_TARGET_IS_WINDOWS) + _vcpkg_backup_env_variables(_CL_ _LINK_) # TODO: Should be CPP flags instead -> rewrite when vcpkg_determined_cmake_compiler_flags defined - string(APPEND CPP_FLAGS_GLOBAL " /D_WIN32_WINNT=0x0601 /DWIN32_LEAN_AND_MEAN /DWIN32 /D_WINDOWS") + #string(APPEND CPP_FLAGS_GLOBAL " /D_WIN32_WINNT=0x0601 /DWIN32_LEAN_AND_MEAN /DWIN32 /D_WINDOWS") if(VCPKG_TARGET_IS_UWP) # Be aware that configure thinks it is crosscompiling due to: # error while loading shared libraries: VCRUNTIME140D_APP.dll: @@ -400,17 +396,11 @@ function(vcpkg_configure_make) # (This is due to libtool and compiler wrapper using the same set of options to pass those variables around) string(REPLACE "\\" "/" VCToolsInstallDir "$ENV{VCToolsInstallDir}") set(ENV{_CL_} "$ENV{_CL_} /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") - set(ENV{_LINK_} "$ENV{_LINK_} /MANIFEST /DYNAMICBASE WindowsApp.lib /WINMD:NO /APPCONTAINER") - endif() - if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - set(ENV{_LINK_} "$ENV{_LINK_} -MACHINE:x64") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) - set(ENV{_LINK_} "$ENV{_LINK_} -MACHINE:x86") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm) - set(ENV{_LINK_} "$ENV{_LINK_} -MACHINE:ARM") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) - set(ENV{_LINK_} "$ENV{_LINK_} -MACHINE:ARM64") + set(ENV{_LINK_} "$ENV{_LINK_} /MANIFEST /DYNAMICBASE /WINMD:NO /APPCONTAINER") endif() + set(ENV{_LINK_} "${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") + else() + set(ENV{LIBS} "$ENV{LIBS} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") endif() if(NOT ENV{PKG_CONFIG}) @@ -489,34 +479,40 @@ function(vcpkg_configure_make) set(PATH_SUFFIX_${_VAR_SUFFIX} "/debug") set(SHORT_NAME_${_VAR_SUFFIX} "dbg") list(APPEND _buildtypes ${_VAR_SUFFIX}) - if (CMAKE_HOST_WIN32) # Flags should be set in the toolchain instead - string(REGEX REPLACE "[ \t]+/" " -" CPPFLAGS_${_VAR_SUFFIX} "${CPP_FLAGS_GLOBAL}") - string(REGEX REPLACE "[ \t]+/" " -" CFLAGS_${_VAR_SUFFIX} "${C_FLAGS_GLOBAL} ${VCPKG_CRT_LINK_FLAG_PREFIX}d /D_DEBUG /Ob0 /Od ${VCPKG_C_FLAGS_${_VAR_SUFFIX}}") - string(REGEX REPLACE "[ \t]+/" " -" CXXFLAGS_${_VAR_SUFFIX} "${CXX_FLAGS_GLOBAL} ${VCPKG_CRT_LINK_FLAG_PREFIX}d /D_DEBUG /Ob0 /Od ${VCPKG_CXX_FLAGS_${_VAR_SUFFIX}}") - string(REGEX REPLACE "[ \t]+/" " -" LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib ${LD_FLAGS_GLOBAL} ${VCPKG_LINKER_FLAGS_${_VAR_SUFFIX}}") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_STATIC_LINKERFLAGS_${_VAR_SUFFIX}}") + else() # dynamic + set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_SHARED_LINKERFLAGS_${_VAR_SUFFIX}}") + endif() + set(CPPFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") + set(CFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") + set(CXXFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") + if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe") + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/") + set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") else() - set(CPPFLAGS_${_VAR_SUFFIX} "${CPP_FLAGS_GLOBAL}") - set(CFLAGS_${_VAR_SUFFIX} "${C_FLAGS_GLOBAL} ${VCPKG_C_FLAGS_DEBUG}") - set(CXXFLAGS_${_VAR_SUFFIX} "${CXX_FLAGS_GLOBAL} ${VCPKG_CXX_FLAGS_DEBUG}") - set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/ ${LD_FLAGS_GLOBAL} ${VCPKG_LINKER_FLAGS_${_VAR_SUFFIX}}") + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/ ${LINKER_FLAGS_${_VAR_SUFFIX}}") endif() unset(_VAR_SUFFIX) endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - set(_VAR_SUFFIX RELEASE) - set(PATH_SUFFIX_${_VAR_SUFFIX} "") - set(SHORT_NAME_${_VAR_SUFFIX} "rel") + set(_VAR_SUFFIX DEBUG) + set(PATH_SUFFIX_${_VAR_SUFFIX} "/debug") + set(SHORT_NAME_${_VAR_SUFFIX} "dbg") list(APPEND _buildtypes ${_VAR_SUFFIX}) - if (CMAKE_HOST_WIN32) # Flags should be set in the toolchain - string(REGEX REPLACE "[ \t]+/" " -" CPPFLAGS_${_VAR_SUFFIX} "${CPP_FLAGS_GLOBAL}") - string(REGEX REPLACE "[ \t]+/" " -" CFLAGS_${_VAR_SUFFIX} "${C_FLAGS_GLOBAL} ${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG ${VCPKG_C_FLAGS_${_VAR_SUFFIX}}") - string(REGEX REPLACE "[ \t]+/" " -" CXXFLAGS_${_VAR_SUFFIX} "${CXX_FLAGS_GLOBAL} ${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG ${VCPKG_CXX_FLAGS_${_VAR_SUFFIX}}") - string(REGEX REPLACE "[ \t]+/" " -" LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib ${LD_FLAGS_GLOBAL} ${VCPKG_LINKER_FLAGS_${_VAR_SUFFIX}}") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_STATIC_LINKERFLAGS_${_VAR_SUFFIX}}") + else() # dynamic + set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_SHARED_LINKERFLAGS_${_VAR_SUFFIX}}") + endif() + set(CPPFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") + set(CFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") + set(CXXFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") + if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe") + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/") + set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") else() - set(CPPFLAGS_${_VAR_SUFFIX} "${CPP_FLAGS_GLOBAL}") - set(CFLAGS_${_VAR_SUFFIX} "${C_FLAGS_GLOBAL} ${VCPKG_C_FLAGS_DEBUG}") - set(CXXFLAGS_${_VAR_SUFFIX} "${CXX_FLAGS_GLOBAL} ${VCPKG_CXX_FLAGS_DEBUG}") - set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/ ${LD_FLAGS_GLOBAL} ${VCPKG_LINKER_FLAGS_${_VAR_SUFFIX}}") + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/ ${LINKER_FLAGS_${_VAR_SUFFIX}}") endif() unset(_VAR_SUFFIX) endif() @@ -553,6 +549,10 @@ function(vcpkg_configure_make) set(ENV{CFLAGS} ${CFLAGS_${_buildtype}}) set(ENV{CXXFLAGS} ${CXXFLAGS_${_buildtype}}) set(ENV{LDFLAGS} ${LDFLAGS_${_buildtype}}) + if(LINK_ENV_${_VAR_SUFFIX}) + _vcpkg_backup_env_variables(_LINK_) + set(ENV{_LINK_} "${LINK_ENV_${_VAR_SUFFIX}}") + endif() set(ENV{PKG_CONFIG} "${PKGCONFIG} --define-variable=prefix=${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}") set(ENV{LIB} "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/manual-link/${LIB_PATHLIKE_CONCAT}") @@ -591,7 +591,9 @@ function(vcpkg_configure_make) unset(ENV{PKG_CONFIG_PATH}) endif() unset(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype}) - + + _vcpkg_restore_env_variables(_LINK_) + if(_csc_ADD_BIN_TO_PATH) set(ENV{PATH} "${PATH_BACKUP}") endif() From d4d7e21e07db96c948e219f03dcb473e7427fa1d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 16 Aug 2020 15:13:51 +0200 Subject: [PATCH 010/114] add log suffix on not windows platforms --- scripts/cmake/vcpkg_get_cmake_vars.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_get_cmake_vars.cmake b/scripts/cmake/vcpkg_get_cmake_vars.cmake index ed4051c57a0cf9..7b1925a08dcd09 100644 --- a/scripts/cmake/vcpkg_get_cmake_vars.cmake +++ b/scripts/cmake/vcpkg_get_cmake_vars.cmake @@ -56,6 +56,9 @@ function(vcpkg_get_cmake_vars) file(REMOVE "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}-err.log") file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-get-cmake-vars") file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-get-cmake-vars") - file(RENAME "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-out.log" "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}-out.log") - file(RENAME "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-err.log" "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}-err.log") + if(NOT VCPKG_TARGET_IS_WINDOWS) + set(LOGSUFFIX -rel) + endif() + file(RENAME "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}${LOGSUFFIX}-out.log" "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}-out.log") + file(RENAME "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}${LOGSUFFIX}-err.log" "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}-err.log") endfunction() \ No newline at end of file From d47399dc012ea3c66388b05ba4289a6420b49e93 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 16 Aug 2020 16:54:16 +0200 Subject: [PATCH 011/114] fix c&p error --- scripts/cmake/vcpkg_configure_make.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index c39cdbeac6984b..fbbd072726b090 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -496,9 +496,9 @@ function(vcpkg_configure_make) unset(_VAR_SUFFIX) endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - set(_VAR_SUFFIX DEBUG) - set(PATH_SUFFIX_${_VAR_SUFFIX} "/debug") - set(SHORT_NAME_${_VAR_SUFFIX} "dbg") + set(_VAR_SUFFIX RELEASE) + set(PATH_SUFFIX_${_VAR_SUFFIX} "") + set(SHORT_NAME_${_VAR_SUFFIX} "rel") list(APPEND _buildtypes ${_VAR_SUFFIX}) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_STATIC_LINKERFLAGS_${_VAR_SUFFIX}}") From 6ccbae503c58d1726a7bf680a2a1774862472a5e Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 16 Aug 2020 16:55:02 +0200 Subject: [PATCH 012/114] add previous LINK env --- scripts/cmake/vcpkg_build_make.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index 0da614e325e4ea..1bd391ada50577 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -126,7 +126,7 @@ function(vcpkg_build_make) if(LINK_ENV_${_VAR_SUFFIX}) _vcpkg_backup_env_variables(_LINK_) - set(ENV{_LINK_} "${LINK_ENV_${_VAR_SUFFIX}}") + set(ENV{_LINK_} "$ENV{_LINK_} ${LINK_ENV_${_VAR_SUFFIX}}") endif() if(_bc_ADD_BIN_TO_PATH) From 0f2004b8993a59c835cd799efa0dc6aa77c2b575 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 16 Aug 2020 18:18:43 +0200 Subject: [PATCH 013/114] setup env on windows and extract cpp flags correctly. --- scripts/cmake/vcpkg_configure_make.cmake | 100 +++++++++++++++++------ 1 file changed, 76 insertions(+), 24 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index fbbd072726b090..f6728cbbfce378 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -281,28 +281,60 @@ function(vcpkg_configure_make) endmacro() set(CONFIGURE_ENV "V=1") - ## TODO: Add VCPKG_DETECTED vars here! + # Remove full filepaths due to spaces (compiler needs to be on path) + set(progs VCPKG_DETECTED_C_COMPILER VCPKG_DETECTED_CXX_COMPILER VCPKG_DETECTED_AR VCPKG_DETECTED_LINKER VCPKG_DETECTED_RANLIB VCPKG_DETECTED_OBJDUMP + VCPKG_DETECTED_STRIP VCPKG_DETECTED_NM VCPKG_DETECTED_DLLTOOL VCPKG_DETECTED_RC_COMPILER) + foreach(prog IN LISTS progs) + if(${prog}) + get_filename_component(${prog} "${${prog}}" NAME) + endif() + endforeach() if (_csc_AUTOCONFIG) # without autotools we assume a custom configure script which correctly handles cl and lib. Otherwise the port needs to set CC|CXX|AR and probably CPP - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile cl.exe -E") - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "compile cl.exe ") - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "compile cl.exe ") - _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "ar-lib lib.exe -verbose") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile ${VCPKG_DETECTED_C_COMPILER} -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "compile ${VCPKG_DETECTED_C_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "compile ${VCPKG_DETECTED_CXX_COMPILER}") + if(VCPKG_DETECTED_AR) + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "${VCPKG_DETECTED_AR}") + else() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "ar-lib lib.exe -verbose") + endif() + else() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "${VCPKG_DETECTED_C_COMPILER} -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "${VCPKG_DETECTED_C_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "${VCPKG_DETECTED_CXX_COMPILER}") + if(VCPKG_DETECTED_AR) + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "${VCPKG_DETECTED_AR}") + else() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "lib.exe -verbose") + endif() + endif() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV LD "${VCPKG_DETECTED_LINKER} -verbose") + if(VCPKG_DETECTED_RANLIB) + _vcpkg_append_to_configure_environment(CONFIGURE_ENV RANLIB "${VCPKG_DETECTED_RANLIB}") # Trick to ignore the RANLIB call + else() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV RANLIB ":") + endif() + if(VCPKG_DETECTED_OBJDUMP) #Objdump is required to make shared libraries. Otherwise define lt_cv_deplibs_check_method=pass_all + _vcpkg_append_to_configure_environment(CONFIGURE_ENV OBJDUMP "${VCPKG_DETECTED_OBJDUMP}") # Trick to ignore the RANLIB call + endif() + if(VCPKG_DETECTED_STRIP) # If required set the ENV variable STRIP in the portfile correctly + _vcpkg_append_to_configure_environment(CONFIGURE_ENV STRIP "${VCPKG_DETECTED_STRIP}") else() - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "cl.exe -E") - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "cl.exe") - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "cl.exe") - _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "lib.exe -verbose") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV STRIP ":") + endif() + if(VCPKG_DETECTED_NM) # If required set the ENV variable NM in the portfile correctly + _vcpkg_append_to_configure_environment(CONFIGURE_ENV NM "${VCPKG_DETECTED_NM}") + else() + # Would be better to have a true nm here! Some symbols (mainly exported variables) get not properly imported with dumpbin as nm + # and require __declspec(dllimport) for some reason (same problem CMake has with WINDOWS_EXPORT_ALL_SYMBOLS) + _vcpkg_append_to_configure_environment(CONFIGURE_ENV NM "dumpbin.exe -symbols -headers") + endif() + if(VCPKG_DETECTED_DLLTOOL) # If required set the ENV variable DLLTOOL in the portfile correctly + _vcpkg_append_to_configure_environment(CONFIGURE_ENV DLLTOOL "${VCPKG_DETECTED_DLLTOOL}") + else() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV DLLTOOL "link.exe -verbose -dll") endif() - _vcpkg_append_to_configure_environment(CONFIGURE_ENV LD "link.exe -verbose") - _vcpkg_append_to_configure_environment(CONFIGURE_ENV RANLIB ":") # Trick to ignore the RANLIB call - #_vcpkg_append_to_configure_environment(CONFIGURE_ENV OBJDUMP ":") ' Objdump is required to make shared libraries. Otherwise define lt_cv_deplibs_check_method=pass_all _vcpkg_append_to_configure_environment(CONFIGURE_ENV CCAS ":") # If required set the ENV variable CCAS in the portfile correctly - _vcpkg_append_to_configure_environment(CONFIGURE_ENV STRIP ":") # If required set the ENV variable STRIP in the portfile correctly - _vcpkg_append_to_configure_environment(CONFIGURE_ENV NM "dumpbin.exe -symbols -headers") - # Would be better to have a true nm here! Some symbols (mainly exported variables) get not properly imported with dumpbin as nm - # and require __declspec(dllimport) for some reason (same problem CMake has with WINDOWS_EXPORT_ALL_SYMBOLS) - _vcpkg_append_to_configure_environment(CONFIGURE_ENV DLLTOOL "link.exe -verbose -dll") - foreach(_env IN LISTS _csc_CONFIGURE_ENVIRONMENT_VARIABLES) _vcpkg_append_to_configure_environment(CONFIGURE_ENV ${_env} "${${_env}}") endforeach() @@ -474,6 +506,30 @@ function(vcpkg_configure_make) ) endif() + macro(extract_cpp_flags_and_set_cflags_and_cxxflags) + string(REGEX MATCHALL "( |^)-[^ ]+" CPPFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") + string(REGEX MATCHALL "( |^)-[^ ]+" CXXPPFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") + list(JOIN CXXPPFLAGS_${_VAR_SUFFIX} "|" CXXREGEX) + if(CXXREGEX) + list(FILTER CPPFLAGS_${_VAR_SUFFIX} INCLUDE REGEX "(${CXXREGEX})") + else() + set(CPPFLAGS_${_VAR_SUFFIX}) + endif() + list(JOIN CPPFLAGS_${_VAR_SUFFIX} "|" CPPREGEX) + list(JOIN CPPFLAGS_${_VAR_SUFFIX} " " CPPFLAGS_${_VAR_SUFFIX}) + set(CPPFLAGS_${_VAR_SUFFIX} " ${CPPFLAGS_${_VAR_SUFFIX}}") + if(CPPREGEX) + string(REGEX REPLACE "(${CPPREGEX})" "" CFLAGS_${_VAR_SUFFIX} " ${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") + string(REGEX REPLACE "(${CPPREGEX})" "" CXXFLAGS_${_VAR_SUFFIX} " ${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") + else() + set(CFLAGS_${_VAR_SUFFIX} " ${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") + set(CXXFLAGS_${_VAR_SUFFIX} " ${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") + endif() + debug_message("CPPFLAGS_${_VAR_SUFFIX}: ${CPPFLAGS_${_VAR_SUFFIX}}") + debug_message("CFLAGS_${_VAR_SUFFIX}: ${CFLAGS_${_VAR_SUFFIX}}") + debug_message("CXXFLAGS_${_VAR_SUFFIX}: ${CXXFLAGS_${_VAR_SUFFIX}}") + endmacro() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug" AND NOT _csc_NO_DEBUG) set(_VAR_SUFFIX DEBUG) set(PATH_SUFFIX_${_VAR_SUFFIX} "/debug") @@ -484,9 +540,7 @@ function(vcpkg_configure_make) else() # dynamic set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_SHARED_LINKERFLAGS_${_VAR_SUFFIX}}") endif() - set(CPPFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") - set(CFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") - set(CXXFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") + extract_cpp_flags_and_set_cflags_and_cxxflags() if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe") set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/") set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") @@ -505,9 +559,7 @@ function(vcpkg_configure_make) else() # dynamic set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_SHARED_LINKERFLAGS_${_VAR_SUFFIX}}") endif() - set(CPPFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") - set(CFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") - set(CXXFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") + extract_cpp_flags_and_set_cflags_and_cxxflags() if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe") set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/") set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") From e1f1734d9053fccb5bb04e23b48ee9c85d57e1c4 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 16 Aug 2020 19:48:30 +0200 Subject: [PATCH 014/114] update glib and libxml2 --- ports/glib/CMakeLists.txt | 4 ++-- ports/glib/CONTROL | 3 ++- ports/libxml2/CMakeLists.txt | 4 ++-- ports/libxml2/CONTROL | 2 +- ports/libxml2/vcpkg-cmake-wrapper.cmake | 18 ++---------------- 5 files changed, 9 insertions(+), 22 deletions(-) diff --git a/ports/glib/CMakeLists.txt b/ports/glib/CMakeLists.txt index 2315420738622c..25f1691d38d6e0 100644 --- a/ports/glib/CMakeLists.txt +++ b/ports/glib/CMakeLists.txt @@ -31,7 +31,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug) endif() find_library(PCRE_LIBRARY NAMES pcre${PCRE_SUFFIX} pcre) # libiconv -find_package(unofficial-iconv REQUIRED) +find_package(Iconv REQUIRED) # libffi find_path(FFI_INCLUDE_DIR ffi.h) find_library(FFI_LIBRARY NAMES ffi libffi) @@ -139,7 +139,7 @@ if(NOT WIN32) 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}) +target_link_libraries(glib PRIVATE ${PCRE_LIBRARY} Iconv::Iconv ${LIBINTL_LIBRARY}) if(WIN32) target_compile_definitions(glib PRIVATE USE_SYSTEM_PCRE) target_link_libraries(glib PRIVATE ws2_32 winmm advapi32 ole32 shell32) diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL index 14c896e59454cf..8726e2b72e2e1e 100644 --- a/ports/glib/CONTROL +++ b/ports/glib/CONTROL @@ -1,5 +1,6 @@ Source: glib -Version: 2.52.3-14-7 +Version: 2.52.3 +Port-Version: 22 Homepage: https://developer.gnome.org/glib/ Description: Portable, general-purpose utility library. Build-Depends: zlib, pcre, libffi, gettext, libiconv diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt index 69fc246f9ae412..d71f14f6c50d54 100644 --- a/ports/libxml2/CMakeLists.txt +++ b/ports/libxml2/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_STATIC_LIBRARY_PREFIX) find_package(ZLIB REQUIRED) find_package(LibLZMA REQUIRED) -find_package(unofficial-iconv REQUIRED) +find_package(Iconv REQUIRED) file(GLOB SOURCES *.c) list(FILTER SOURCES EXCLUDE REGEX "/(run|test|trio)[^/]*$") @@ -109,7 +109,7 @@ if(INSTALL_HEADERS) endif() target_include_directories(libxml2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/include include ${LIBLZMA_INCLUDE_DIRS}) target_link_libraries(libxml2 PRIVATE - unofficial::iconv::libcharset unofficial::iconv::libiconv + Iconv::Iconv ZLIB::ZLIB ${LIBLZMA_LIBRARIES} ) diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL index 3c19f8738019d4..2e1685e1640257 100644 --- a/ports/libxml2/CONTROL +++ b/ports/libxml2/CONTROL @@ -1,6 +1,6 @@ Source: libxml2 Version: 2.9.9 -Port-Version: 8 +Port-Version: 9 Homepage: https://xmlsoft.org/ Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform) Build-Depends: zlib, libiconv, liblzma diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake index 94ef458031f311..cbd26459c1d082 100644 --- a/ports/libxml2/vcpkg-cmake-wrapper.cmake +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -1,26 +1,12 @@ +_find_package(Iconv REQUIRED) _find_package(${ARGS}) if(LibXml2_FOUND) find_package(LibLZMA) find_package(ZLIB) - include(SelectLibraryConfigurations) - find_library(ICONV_LIBRARY_DEBUG NAMES iconvd libiconvd iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_INSTALLED_DIR}/debug" NO_DEFAULT_PATH) - find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) - find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib) - find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) - find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) - find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib) - select_library_configurations(ICONV) - select_library_configurations(CHARSET) list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES}) if(CMAKE_SYSTEM_NAME STREQUAL "Linux") list(APPEND LIBXML2_LIBRARIES m) - else() - list(APPEND LIBXML2_LIBRARIES ${ICONV_LIBRARIES} ${CHARSET_LIBRARIES}) - if(TARGET LibXml2::LibXml2) - target_link_libraries(LibXml2::LibXml2 INTERFACE ${ICONV_LIBRARIES} ${CHARSET_LIBRARIES}) - endif() - endif() - if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") list(APPEND LIBXML2_LIBRARIES ws2_32) endif() endif() From 830e66c4b697fb4c113910d497e7618275d27443 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 17 Aug 2020 07:47:13 +0200 Subject: [PATCH 015/114] fix windows regressions --- scripts/cmake/vcpkg_configure_make.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index e0028f802cb50b..ba388cd1c36e2c 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -233,7 +233,7 @@ function(vcpkg_configure_make) gcc # gcc is required for windres to work ) list(APPEND MSYS_REQUIRE_PACKAGES make) - if (_csc_AUTOCONFIG) + if (_csc_AUTOCONFIG OR _csc_USE_WRAPPERS) list(APPEND MSYS_REQUIRE_PACKAGES autoconf autoconf-archive automake From f811525bc4e5ec701bac4adcb0b0a3baef5ea91d Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Mon, 17 Aug 2020 10:55:50 +0200 Subject: [PATCH 016/114] Apply suggestions from code review --- scripts/cmake/vcpkg_configure_make.cmake | 5 ----- scripts/get_cmake_vars/CMakeLists.txt | 19 ------------------- 2 files changed, 24 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index f6728cbbfce378..b428787e9ca96e 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -169,10 +169,6 @@ function(vcpkg_configure_make) set(CMAKE_VARS_FILE "${CMAKE_VARS_FILE}" PARENT_SCOPE) debug_message("Including cmake vars from: ${CMAKE_VARS_FILE}") include("${CMAKE_VARS_FILE}") - if(VCPKG_TARGET_IS_WINDOWS) - - endif() - if(DEFINED VCPKG_MAKE_BUILD_TRIPLET) set(_csc_BUILD_TRIPLET ${VCPKG_MAKE_BUILD_TRIPLET}) # Triplet overwrite for crosscompiling endif() @@ -418,7 +414,6 @@ function(vcpkg_configure_make) if(VCPKG_TARGET_IS_WINDOWS) _vcpkg_backup_env_variables(_CL_ _LINK_) # TODO: Should be CPP flags instead -> rewrite when vcpkg_determined_cmake_compiler_flags defined - #string(APPEND CPP_FLAGS_GLOBAL " /D_WIN32_WINNT=0x0601 /DWIN32_LEAN_AND_MEAN /DWIN32 /D_WINDOWS") if(VCPKG_TARGET_IS_UWP) # Be aware that configure thinks it is crosscompiling due to: # error while loading shared libraries: VCRUNTIME140D_APP.dll: diff --git a/scripts/get_cmake_vars/CMakeLists.txt b/scripts/get_cmake_vars/CMakeLists.txt index f26137ce9ecd14..dab84f4bc081f3 100644 --- a/scripts/get_cmake_vars/CMakeLists.txt +++ b/scripts/get_cmake_vars/CMakeLists.txt @@ -91,24 +91,6 @@ endforeach() file(WRITE "${VCPKG_OUTPUT_FILE}" "${OUTPUT_STRING}") -# Not useful? -# CMAKE__STANDARD_INCLUDE_DIRECTORIES -# CMAKE__STANDARD_LIBRARIES - -# CMAKE__IMPLICIT_LINK_FRAMEWORK_DIRECTORIES -# CMAKE__IMPLICIT_INCLUDE_DIRECTORIES -# CMAKE__IMPLICIT_LINK_DIRECTORIES -# CMAKE__IMPLICIT_LINK_LIBRARIES - -# CMAKE_LINK_INTERFACE_LIBRARIES -> LIBS - -# Dir properties: -# COMPILE_DEFINITIONS(_CONFIG) -# COMPILE_OPTIONS(_CONFIG) -# INCLUDE_DIRECTORIES -# LINK_DIRECTORIES -# LINK_OPTIONS - # Programs: # CMAKE_AR # CMAKE__COMPILER_AR (Wrapper) @@ -134,4 +116,3 @@ file(WRITE "${VCPKG_OUTPUT_FILE}" "${OUTPUT_STRING}") # CMAKE_STATIC_LINKER_FLAGS_. # CMAKE_EXE_LINKER_FLAGS # CMAKE_EXE_LINKER_FLAGS_ (CMAKE_C_FLAGS_) - From 8a83a852862bc533bb1738703c06530f34158c21 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 18 Aug 2020 16:34:57 +0200 Subject: [PATCH 017/114] add windres wrapper to invoke RC. --- scripts/buildsystems/make_wrapper/windres-rc | 131 +++++++++++++++++++ scripts/cmake/vcpkg_configure_make.cmake | 7 +- 2 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 scripts/buildsystems/make_wrapper/windres-rc diff --git a/scripts/buildsystems/make_wrapper/windres-rc b/scripts/buildsystems/make_wrapper/windres-rc new file mode 100644 index 00000000000000..22c3ec1f4d175d --- /dev/null +++ b/scripts/buildsystems/make_wrapper/windres-rc @@ -0,0 +1,131 @@ +#! /bin/sh +# Wrapper for windres to rc which do not understand '-i -o --output-format'. +# cvtres is invoked by the linker +scriptversion=2020-08-17.03; # UTC + + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN* | MSYS*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/* | msys/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_windres_wrapper rc args... +# Adjust compile command to suit rc instead of windres +func_windres_wrapper () +{ + echo "FROM WINDRESWRAPPER FUNCTION:$@" + echo "RCFLAGS:$(RCFLAGS)" + # Assume a capable shell + in= + out= + + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + eat=1 + func_file_conv "$2" + out="$file" + echo "OUTPUT:$file" + set x "$@" + shift + ;; + *.obj) + func_file_conv "$1" + out="$file" + echo "OUTPUT:$file" + set x "$@" + shift + ;; + --output-format=*) + set x "$@" + shift + ;; + -i) + eat=1 + func_file_conv "$2" mingw + in="$file" + echo "INPUT:$file" + set x "$@" + shift + ;; + -*) + set x "$@" "${1//\\\"/\"}" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + echo "$@" -fo "$out" "$in" + exec "$@" -fo "$out" "$in" + fi + exit 1 +} + +eat= + +func_windres_wrapper "$@" + + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 787b089633b4e6..31ff556be81ad3 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -205,7 +205,7 @@ function(vcpkg_configure_make) debug_message("REQUIRES_AUTOCONFIG:${REQUIRES_AUTOCONFIG}") # Backup environment variables # CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJCXX R UPC Y - set(FLAGPREFIXES CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJXX R UPC Y) + set(FLAGPREFIXES CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJXX R UPC Y RC) foreach(_prefix IN LISTS FLAGPREFIXES) _vcpkg_backup_env_variable(${prefix}FLAGS) endforeach() @@ -234,7 +234,7 @@ function(vcpkg_configure_make) libtool gettext gettext-devel - gcc # gcc is required for windres to work + #gcc # gcc is required for windres to work ) list(APPEND MSYS_REQUIRE_PACKAGES make) if (_csc_AUTOCONFIG OR _csc_USE_WRAPPERS) @@ -298,6 +298,8 @@ function(vcpkg_configure_make) _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile ${VCPKG_DETECTED_C_COMPILER} -E") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "compile ${VCPKG_DETECTED_C_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "compile ${VCPKG_DETECTED_CXX_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV RC "windres-rc ${VCPKG_DETECTED_RC_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV WINDRES "windres-rc ${VCPKG_DETECTED_RC_COMPILER}") if(VCPKG_DETECTED_AR) _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "${VCPKG_DETECTED_AR}") else() @@ -604,6 +606,7 @@ function(vcpkg_configure_make) set(ENV{CPPFLAGS} ${CPPFLAGS_${_buildtype}}) set(ENV{CFLAGS} ${CFLAGS_${_buildtype}}) set(ENV{CXXFLAGS} ${CXXFLAGS_${_buildtype}}) + set(ENV{RCFLAGS} ${VCPKG_DETECTED_COMBINED_RCFLAGS_${_buildtype}}) set(ENV{LDFLAGS} ${LDFLAGS_${_buildtype}}) if(LINK_ENV_${_VAR_SUFFIX}) _vcpkg_backup_env_variables(_LINK_) From 74817e225ae6ccff7f62380a9aa2ae7b5ef75295 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 18 Aug 2020 19:36:15 +0200 Subject: [PATCH 018/114] remove wrong fi --- scripts/buildsystems/make_wrapper/windres-rc | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/buildsystems/make_wrapper/windres-rc b/scripts/buildsystems/make_wrapper/windres-rc index 22c3ec1f4d175d..88cc8425f72b7a 100644 --- a/scripts/buildsystems/make_wrapper/windres-rc +++ b/scripts/buildsystems/make_wrapper/windres-rc @@ -111,7 +111,6 @@ func_windres_wrapper () done echo "$@" -fo "$out" "$in" exec "$@" -fo "$out" "$in" - fi exit 1 } From 2672cd4d2e85cb84f6d971e80dacff7dfc95b7d3 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 18 Aug 2020 19:55:31 +0200 Subject: [PATCH 019/114] fix libintl. --- .../gettext/0001-Fix-macro-definitions.patch | 17 - ports/gettext/0002-Fix-uwp-build.patch | 33 +- ports/gettext/CMakeLists.txt | 150 --- ports/gettext/config.unix.h.in | 1009 ----------------- ports/gettext/config.win32.h | 675 ----------- ports/gettext/libgnuintl.win32.h | 423 ------- ports/gettext/portfile.cmake | 2 + ports/gettext/unofficial-gettext-config.cmake | 1 - ports/gettext/vcpkg-cmake-wrapper.cmake | 10 + 9 files changed, 30 insertions(+), 2290 deletions(-) delete mode 100644 ports/gettext/0001-Fix-macro-definitions.patch delete mode 100644 ports/gettext/CMakeLists.txt delete mode 100644 ports/gettext/config.unix.h.in delete mode 100644 ports/gettext/config.win32.h delete mode 100644 ports/gettext/libgnuintl.win32.h delete mode 100644 ports/gettext/unofficial-gettext-config.cmake create mode 100644 ports/gettext/vcpkg-cmake-wrapper.cmake diff --git a/ports/gettext/0001-Fix-macro-definitions.patch b/ports/gettext/0001-Fix-macro-definitions.patch deleted file mode 100644 index eeed3a0ce22498..00000000000000 --- a/ports/gettext/0001-Fix-macro-definitions.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/gettext-runtime/intl/xsize.h b/gettext-runtime/intl/xsize.h -index c256665..7400ea1 100644 ---- a/gettext-runtime/intl/xsize.h -+++ b/gettext-runtime/intl/xsize.h -@@ -27,6 +27,12 @@ - # include - #endif - -+#if defined _WIN32 -+# define _GL_INLINE_HEADER_BEGIN -+# define _GL_INLINE_HEADER_END -+# define _GL_INLINE static inline -+#endif -+ - #ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." - #endif diff --git a/ports/gettext/0002-Fix-uwp-build.patch b/ports/gettext/0002-Fix-uwp-build.patch index 1541315447881a..ba98e2665d5d4f 100644 --- a/ports/gettext/0002-Fix-uwp-build.patch +++ b/ports/gettext/0002-Fix-uwp-build.patch @@ -5,7 +5,7 @@ index aeb1c4e9..2ac531be 100644 @@ -33,7 +33,13 @@ extern void _nl_locale_name_canonicalize (char *name); #endif - #if defined _WIN32 || defined __WIN32__ + #if defined _WIN32 -# define WIN32_NATIVE +# if !defined(WINAPI_FAMILY) +# define WIN32_NATIVE @@ -22,10 +22,10 @@ index 670b8e6c..035a96bd 100644 --- "a/gettext-runtime/intl/localcharset.c" +++ "b/gettext-runtime/intl/localcharset.c" @@ -36,6 +36,16 @@ - # define WINDOWS_NATIVE + # include #endif -+#if defined _WIN32 || defined __WIN32__ ++#if defined _WIN32 +# if !defined(WINAPI_FAMILY) +# define HAVE_ACP +# else @@ -38,32 +38,32 @@ index 670b8e6c..035a96bd 100644 #if defined __EMX__ /* Assume EMX program runs on OS/2, even if compiled under DOS. */ # ifndef OS2 -@@ -361,7 +371,7 @@ STATIC +@@ -830,7 +830,7 @@ STATIC const char * locale_charset (void) { - const char *codeset; + const char *codeset = NULL; - const char *aliases; - #if !(defined WINDOWS_NATIVE || defined OS2) -@@ -457,7 +467,7 @@ locale_charset (void) + /* This function must be multithread-safe. To achieve this without using + thread-local storage, we use a simple strcpy or memcpy to fill this static +@@ -912,7 +912,7 @@ locale_charset (void) + /* The canonical name cannot be determined. */ + codeset = ""; - # endif - --#elif defined WINDOWS_NATIVE -+#elif defined WINDOWS_NATIVE && defined HAVE_ACP - - static char buf[2 + 10 + 1]; +-# elif defined WINDOWS_NATIVE ++# elif defined WINDOWS_NATIVE && defined HAVE_ACP + char buf[2 + 10 + 1]; + static char resultbuf[2 + 10 + 1]; diff --git "a/gettext-runtime/intl/localename.c" "b/gettext-runtime/intl/localename.c" index 108dd6f1..ace3aa88 100644 --- "a/gettext-runtime/intl/localename.c" +++ "b/gettext-runtime/intl/localename.c" -@@ -54,7 +54,13 @@ +@@ -75,10 +75,16 @@ #endif - #if defined _WIN32 || defined __WIN32__ + #if defined _WIN32 && !defined __CYGWIN__ -# define WINDOWS_NATIVE +# if !defined(WINAPI_FAMILY) +# define WINDOWS_NATIVE @@ -72,6 +72,9 @@ index 108dd6f1..ace3aa88 100644 +# define WINDOWS_NATIVE +# endif +# endif + # if !defined IN_LIBINTL + # include "glthread/lock.h" + # endif #endif #if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ diff --git a/ports/gettext/CMakeLists.txt b/ports/gettext/CMakeLists.txt deleted file mode 100644 index 57d5a14e52e5f3..00000000000000 --- a/ports/gettext/CMakeLists.txt +++ /dev/null @@ -1,150 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(libintl C) - -find_package(unofficial-iconv REQUIRED) - -set(CMAKE_STATIC_LIBRARY_PREFIX) -set(CMAKE_SHARED_LIBRARY_PREFIX) - -if(WIN32) - set(HAVE_POSIX_PRINTF 0) - set(HAVE_SNPRINTF 0) - set(HAVE_ASPRINTF 0) - set(HAVE_WPRINTF 0) - set(HAVE_NEWLOCALE 0) - - configure_file(intl/libgnuintl.win32.h config/libgnuintl.h COPYONLY) - configure_file(config.win32.h config/config.h COPYONLY) -else() - set(HAVE_POSIX_PRINTF 1) - set(HAVE_SNPRINTF 1) - set(HAVE_ASPRINTF 1) - set(HAVE_WPRINTF 1) - set(HAVE_NEWLOCALE 1) - add_definitions(-DHAVE_NEWLOCALE=1) - add_definitions(-DHAVE_NEWLOCALE=1) - - set(CMAKE_THREAD_PREFER_PTHREAD TRUE) - set(THREADS_PREFER_PTHREAD_FLAG TRUE) - find_package(Threads REQUIRED) - if(NOT CMAKE_USE_PTHREADS_INIT) - message(FATAL_ERROR "Error: Only pthreads is currently supported.") - endif() - - include(CheckFunctionExists) - include(CheckIncludeFiles) - - if(APPLE) - set(HAVE_CFLOCALECOPYCURRENT 1) - set(HAVE_CFPREFERENCESCOPYAPPVALUE 1) - endif() - check_function_exists(dcgettext HAVE_DCGETTEXT) - check_include_files(features.h HAVE_FEATURES_H) - check_function_exists(gettext HAVE_GETTEXT) - check_include_files(mach-o/dyld.h HAVE_MACH_O_DYLD_H) - check_function_exists(mempcpy HAVE_MEMPCPY) - check_include_files(xlocale.h HAVE_XLOCALE_H) - - configure_file(intl/libgnuintl.in.h config/libgnuintl.h @ONLY) - configure_file(config.unix.h.in config/config.h @ONLY) -endif() - -if(NOT DISABLE_INSTALL_HEADERS) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/config/libgnuintl.h" DESTINATION include RENAME libintl.h) -endif() - -file(READ "${CMAKE_CURRENT_BINARY_DIR}/config/config.h" _contents) -if(NOT WIN32) - string(REPLACE "/* #undef HAVE_STPCPY */" "#define HAVE_STPCPY 1" _contents "${_contents}") -endif() -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config/config.h" "${_contents}") - -FILE(GLOB SOURCES - "intl/bindtextdom.c" - "intl/dcgettext.c" - "intl/dcigettext.c" - "intl/dcngettext.c" - "intl/dgettext.c" - "intl/dngettext.c" - "intl/explodename.c" - "intl/finddomain.c" - "intl/gettext.c" - "intl/hash-string.c" - "intl/intl-compat.c" - "intl/l10nflist.c" - "intl/langprefs.c" - "intl/loadmsgcat.c" - "intl/localealias.c" - "intl/localename.c" - "intl/lock.c" - "intl/log.c" - "intl/ngettext.c" - "intl/osdep.c" - "intl/plural-exp.c" - "intl/plural.c" - "intl/printf.c" - "intl/relocatable.c" - "intl/textdomain.c" - "intl/version.c" -) -if(NOT WIN32) - list(APPEND SOURCES "intl/setlocale.c") -endif() - -set(LOCALDIR "c:/gettext") - -add_definitions(-DLOCALEDIR=\"${LOCALDIR}\") -add_definitions(-DLOCALE_ALIAS_PATH=\"${LOCALDIR}\") -add_definitions(-DLIBDIR=\"${LOCALDIR}\") -add_definitions(-DINSTALLDIR=\"${LOCALDIR}\") -if(BUILD_SHARED_LIBS) - add_definitions(-DBUILDING_DLL) -endif() -add_definitions("-DBUILDING_LIBINTL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY") - -add_definitions("-DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DHAVE_ICONV -DHAVE_ICONV_H -DICONV_CONST=const -D_CRT_SECURE_NO_WARNINGS") - -add_library(libintl ${SOURCES}) -target_link_libraries(libintl PRIVATE unofficial::iconv::libcharset unofficial::iconv::libiconv) - -target_include_directories(libintl PUBLIC - $ - $ -) - -if(APPLE) - find_library(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED) - target_link_libraries(libintl PRIVATE ${COREFOUNDATION_LIBRARY}) -endif() -if(NOT WIN32) - target_link_libraries(libintl PRIVATE Threads::Threads) -endif() -if (WIN32) - target_link_libraries(libintl PRIVATE kernel32.lib Advapi32.lib) -endif() - -install(TARGETS libintl - EXPORT unofficial-gettext-targets - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -install( - EXPORT unofficial-gettext-targets - FILE unofficial-gettext-targets.cmake - NAMESPACE unofficial::gettext:: - DESTINATION share/unofficial-gettext -) - -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-gettext-config.cmake" " -include(CMakeFindDependencyMacro) -find_dependency(unofficial-iconv) -find_dependency(Threads) -include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-gettext-targets.cmake) -") - -install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-gettext-config.cmake - DESTINATION share/unofficial-gettext -) diff --git a/ports/gettext/config.unix.h.in b/ports/gettext/config.unix.h.in deleted file mode 100644 index 9f00a6fcda47bb..00000000000000 --- a/ports/gettext/config.unix.h.in +++ /dev/null @@ -1,1009 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -#define BITSIZEOF_PTRDIFF_T sizeof(ptrdiff_t) - -/* Define to the number of bits in type 'sig_atomic_t'. */ -#define BITSIZEOF_SIG_ATOMIC_T 32 - -/* Define to the number of bits in type 'size_t'. */ -#define BITSIZEOF_SIZE_T sizeof(size_t) - -/* Define to the number of bits in type 'wchar_t'. */ -#define BITSIZEOF_WCHAR_T 32 - -/* Define to the number of bits in type 'wint_t'. */ -#define BITSIZEOF_WINT_T 32 - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define if pnet is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_PNET */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if // is a file system root distinct from /. */ -/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the file system. */ -#define ENABLE_RELOCATABLE 1 - -/* Define to 1 if realpath() can malloc memory, always gives an absolute path, - and handles trailing slash correctly. */ -/* #undef FUNC_REALPATH_WORKS */ - -/* Define if gettimeofday clobbers the localtime buffer. */ -/* #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME */ - -/* Define this to 'void' or 'struct timezone' to match the system's - declaration of the second argument to gettimeofday. */ -#define GETTIMEOFDAY_TIMEZONE void - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize-lgpl shall be considered present. */ -#define GNULIB_CANONICALIZE_LGPL 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fwriteerror shall be considered present. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module sigpipe shall be considered present. */ -#define GNULIB_SIGPIPE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUCR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-uctomb shall be considered present. */ -#define GNULIB_UNISTR_U8_UCTOMB 1 - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the `argz_count' function. */ -/* #undef HAVE_ARGZ_COUNT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARGZ_H */ - -/* Define to 1 if you have the `argz_next' function. */ -/* #undef HAVE_ARGZ_NEXT */ - -/* Define to 1 if you have the `argz_stringify' function. */ -/* #undef HAVE_ARGZ_STRINGIFY */ - -/* Define to 1 if you have the `asprintf' function. */ -#define HAVE_ASPRINTF 1 - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -#define HAVE_BUILTIN_EXPECT 1 - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -#cmakedefine HAVE_CFLOCALECOPYCURRENT 1 - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -#cmakedefine HAVE_CFPREFERENCESCOPYAPPVALUE 1 - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -#cmakedefine HAVE_DCGETTEXT 1 - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. - */ -#define HAVE_DECL_GETENV 1 - -/* Define to 1 if you have the declaration of `iswblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISWBLANK 1 - -/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBRTOWC */ - -/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBSINIT */ - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 1 - -/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. - */ -#define HAVE_DECL_SETENV 1 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 1 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 1 - -/* Define to 1 if you have the declaration of `towlower', and to 0 if you - don't. */ -/* #undef HAVE_DECL_TOWLOWER */ - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 1 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 0 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define if you have the declaration of environ. */ -/* #undef HAVE_ENVIRON_DECL */ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_FEATURES_H 1 - -/* Define to 1 if you have the `fwprintf' function. */ -#define HAVE_FWPRINTF 1 - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getegid' function. */ -#define HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define HAVE_GETEUID 1 - -/* Define to 1 if you have the `getgid' function. */ -#define HAVE_GETGID 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_GETOPT_H 1 - -/* Define to 1 if you have the `getopt_long_only' function. */ -#define HAVE_GETOPT_LONG_ONLY 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define if the GNU gettext() function is already present or preinstalled. */ -#cmakedefine HAVE_GETTEXT 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `getuid' function. */ -#define HAVE_GETUID 1 - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ICONV_H 1 - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the `iswblank' function. */ -#define HAVE_ISWBLANK 1 - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define if you have and nl_langinfo(CODESET). */ -#define HAVE_LANGINFO_CODESET 1 - -/* Define if your file defines LC_MESSAGES. */ -#define HAVE_LC_MESSAGES 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -#define HAVE_LSTAT 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MACH_O_DYLD_H 1 - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -#define HAVE_MAP_ANONYMOUS 1 - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the `mbsinit' function. */ -#define HAVE_MBSINIT 1 - -/* Define to 1 if you have the `mbslen' function. */ -/* #undef HAVE_MBSLEN */ - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -#cmakedefine HAVE_MEMPCPY 1 - -/* Define to 1 if you have a working `mmap' system call. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -/* #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER */ - -/* Define to 1 if you have the `munmap' function. */ -#define HAVE_MUNMAP 1 - -/* Define to 1 if you have the `newlocale' function. */ -#cmakedefine HAVE_NEWLOCALE 1 - -/* Define if your printf() function supports format strings with positions. */ -#define HAVE_POSIX_PRINTF 1 - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -#define HAVE_PTHREAD_MUTEX_RECURSIVE 1 - -/* Define if the POSIX multithreading library has read/write locks. */ -#define HAVE_PTHREAD_RWLOCK 1 - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `readlink' function. */ -#define HAVE_READLINK 1 - -/* Define to 1 if you have the `readlinkat' function. */ -#define HAVE_READLINKAT 1 - -/* Define to 1 if you have the `realpath' function. */ -#define HAVE_REALPATH 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `setenv' function. */ -#define HAVE_SETENV 1 - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -#define HAVE_SIGSET_T 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -#define HAVE_STPCPY 1 - -/* Define to 1 if you have the `strcasecmp' function. */ -#define HAVE_STRCASECMP 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -#define HAVE_STRERROR_R 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `symlink' function. */ -#define HAVE_SYMLINK 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIMEB_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `towlower' function. */ -#define HAVE_TOWLOWER 1 - -/* Define to 1 if you have the `tsearch' function. */ -#define HAVE_TSEARCH 1 - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if the system has the type 'unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define to 1 if you have the `uselocale' function. */ -#define HAVE_USELOCALE 1 - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -#define HAVE_WCWIDTH 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WINSOCK2_H */ - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_XLOCALE_H 1 - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_ftime' function. */ -/* #undef HAVE__FTIME */ - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -/* #undef HAVE__SET_INVALID_PARAMETER_HANDLER */ - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -/* #define INSTALLPREFIX "/usr/local" */ - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing - slash. */ -/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Define if the mbrtowc function has the NULL pwc argument bug. */ -/* #undef MBRTOWC_NULL_ARG1_BUG */ - -/* Define if the mbrtowc function has the NULL string argument bug. */ -/* #undef MBRTOWC_NULL_ARG2_BUG */ - -/* Define if the mbrtowc function does not return 0 for a NUL character. */ -/* #undef MBRTOWC_NUL_RETVAL_BUG */ - -/* Define if the mbrtowc function returns a wrong return value. */ -/* #undef MBRTOWC_RETVAL_BUG */ - -/* Name of package */ -#define PACKAGE "gettext-runtime" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gettext-runtime" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gettext-runtime 0.19" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gettext-runtime" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.19" - -/* Define if exists and defines unusable PRI* macros. */ -/* #undef PRI_MACROS_BROKEN */ - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -#define PTRDIFF_T_SUFFIX - -/* Define to 1 if readlink fails to recognize a trailing slash. */ -/* #undef READLINK_TRAILING_SLASH_BUG */ - -/* Define to 1 if stat needs help when passed a directory name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_DIR */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -#define SIG_ATOMIC_T_SUFFIX - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -#define SIZE_T_SUFFIX ul - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to the prefix of C symbols at the assembler and linker level, either - an underscore or empty. */ -#define USER_LABEL_PREFIX - -/* Define if the POSIX multithreading library can be used. */ -#define USE_POSIX_THREADS 1 - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Define if the GNU Pth multithreading library can be used. */ -/* #undef USE_PTH_THREADS */ - -/* Define if references to the GNU Pth multithreading library should be made - weak. */ -/* #undef USE_PTH_THREADS_WEAK */ - -/* Define if the old Solaris multithreading library can be used. */ -/* #undef USE_SOLARIS_THREADS */ - -/* Define if references to the old Solaris multithreading library should be - made weak. */ -/* #undef USE_SOLARIS_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on OS X. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 1 - -/* Define if the native Windows multithreading API can be used. */ -/* #undef USE_WINDOWS_THREADS */ - -/* Version number of package */ -#define VERSION "0.19" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -#define WCHAR_T_SUFFIX - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -#define WINT_T_SUFFIX - -/* Define when --enable-shared is used on mingw or Cygwin. */ -/* #undef WOE32DLL */ - -/* Enable large inode numbers on Mac OS X 10.5. */ -#define _DARWIN_USE_64_BIT_INODE 1 - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct - stat.st_size becomes 64-bit. */ -/* #undef _GL_WINDOWS_64_BIT_ST_SIZE */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 on Solaris. */ -/* #undef _LCONV_C99 */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -/* #undef _NETBSD_SOURCE */ - -/* The _Noreturn keyword of C11. */ -#if ! (defined _Noreturn \ - || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) -# define _Noreturn __attribute__ ((__noreturn__)) -# elif defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress the use of extern inline on problematic Apple configurations. - OS X 10.8 and earlier mishandle it; see, e.g., - . - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Perhaps Apple will fix this some day. */ -#if (defined __APPLE__ \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_APPLE_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_APPLE_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_APPLE_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif - /* Suppress GCC's bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - . */ -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -/* #undef gid_t */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* Define to `int' if does not define. */ -/* #undef mode_t */ - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -/* #undef nlink_t */ - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define as a signed type of the same size as size_t. */ -/* #undef ssize_t */ - -/* Define to `int' if doesn't define. */ -/* #undef uid_t */ - -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_UNUSED -#endif -/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name - is a misnomer outside of parameter lists. */ -#define _UNUSED_PARAMETER_ _GL_UNUSED - -/* The __pure__ attribute was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* The __const__ attribute was added in gcc 2.95. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST /* empty */ -#endif - - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded - - - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#ifdef __EMX__ -# include "intl/os2compat.h" -#endif - diff --git a/ports/gettext/config.win32.h b/ports/gettext/config.win32.h deleted file mode 100644 index e8507894dec221..00000000000000 --- a/ports/gettext/config.win32.h +++ /dev/null @@ -1,675 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -#ifndef WIN32 -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -# define _GL_INLINE static inline -#endif - -/* Disable function deprecated warnings */ -#define _CRT_NONSTDC_NO_WARNINGS - -/* Define to the number of bits in type 'ptrdiff_t'. */ -#define BITSIZEOF_PTRDIFF_T sizeof(ptrdiff_t) - -/* Define to the number of bits in type 'sig_atomic_t'. */ -#define BITSIZEOF_SIG_ATOMIC_T 32 - -/* Define to the number of bits in type 'size_t'. */ -#define BITSIZEOF_SIZE_T sizeof(size_t) - -/* Define to the number of bits in type 'wchar_t'. */ -#define BITSIZEOF_WCHAR_T 16 - -/* Define to the number of bits in type 'wint_t'. */ -#define BITSIZEOF_WINT_T 16 - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define if pnet is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_PNET */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the filesystem. */ -#define ENABLE_RELOCATABLE 1 - -/* Define to 1 when using the gnulib module fwriteerror. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the `argz_count' function. */ -/* #undef HAVE_ARGZ_COUNT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARGZ_H */ - -/* Define to 1 if you have the `argz_next' function. */ -/* #undef HAVE_ARGZ_NEXT */ - -/* Define to 1 if you have the `argz_stringify' function. */ -/* #undef HAVE_ARGZ_STRINGIFY */ - -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYCURRENT */ - -/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -/* #undef HAVE_DCGETTEXT */ - -/* Define to 1 if you have the declaration of `canonicalize_file_name', and to - 0 if you don't. */ -#define HAVE_DECL_CANONICALIZE_FILE_NAME 0 - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. - */ -#define HAVE_DECL_GETENV 1 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. - */ -#define HAVE_DECL_STRDUP 1 - -/* Define to 1 if you have the declaration of `strerror', and to 0 if you - don't. */ -/* #undef HAVE_DECL_STRERROR */ - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 0 - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 0 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define if you have the declaration of environ. */ -#define HAVE_ENVIRON_DECL 1 - -/* Define to 1 if you have the `fwprintf' function. */ -#define HAVE_FWPRINTF 1 - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getegid' function. */ -/* #undef HAVE_GETEGID */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GETOPT_H */ - -/* Define to 1 if you have the `getopt_long_only' function. */ -/* #undef HAVE_GETOPT_LONG_ONLY */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -/* #undef HAVE_GETTEXT */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define if you have the iconv() function and it works. */ -/* #undef HAVE_ICONV */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ICONV_H */ - -/* Define if your compiler supports the #include_next directive. */ -/* #undef HAVE_INCLUDE_NEXT */ - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -/* #undef HAVE_INTTYPES_H_WITH_UINTMAX */ - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define if you have and nl_langinfo(CODESET). */ -/* #undef HAVE_LANGINFO_CODESET */ - -/* Define if your file defines LC_MESSAGES. */ -/* #undef HAVE_LC_MESSAGES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if the system has the type `long long int'. */ -/* #undef HAVE_LONG_LONG_INT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACH_O_DYLD_H */ - -/* Define if the 'malloc' function is POSIX compliant. */ -/* #undef HAVE_MALLOC_POSIX */ - -/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ -/* #undef HAVE_MBRTOWC */ - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `memchr' function. */ -#define HAVE_MEMCHR 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -#ifdef __GNUC__ -#define HAVE_MEMPCPY 1 -#endif - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define if you have and it defines the NL_LOCALE_NAME macro if - _GNU_SOURCE is defined. */ -/* #undef HAVE_NL_LOCALE_NAME */ - -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -#define HAVE_SIGNED_SIG_ATOMIC_T 1 - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define to 1 if stdbool.h conforms to C99. */ -/* #undef HAVE_STDBOOL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `tsearch' function. */ -/* #undef HAVE_TSEARCH */ - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if the system has the type `unsigned long long int'. */ -/* #undef HAVE_UNSIGNED_LONG_LONG_INT */ - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -/* #undef HAVE_WCWIDTH */ - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if the system has the type `_Bool'. */ -/* #undef HAVE__BOOL */ - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define as const if the declaration of iconv() needs const. */ -/* #undef ICONV_CONST */ - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -/* #define INSTALLPREFIX "/usr/local" */ - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#define NO_MINUS_C_MINUS_O 1 - -/* Name of package */ -#define PACKAGE "gettext-runtime" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if exists and defines unusable PRI* macros. */ -/* #undef PRI_MACROS_BROKEN */ - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -#define PTRDIFF_T_SUFFIX - -/* Define this to 1 if strerror is broken. */ -/* #undef REPLACE_STRERROR */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -#define SIG_ATOMIC_T_SUFFIX - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#if defined(_WIN32) -#define SIZE_MAX (((1UL << 31) - 1) * 2 + 1) -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -#define SIZE_T_SUFFIX u - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Define if the GNU Pth multithreading library can be used. */ -/* #undef USE_PTH_THREADS */ - -/* Define if references to the GNU Pth multithreading library should be made - weak. */ -/* #undef USE_PTH_THREADS_WEAK */ - -/* Define if the old Solaris multithreading library can be used. */ -/* #undef USE_SOLARIS_THREADS */ - -/* Define if references to the old Solaris multithreading library should be - made weak. */ -/* #undef USE_SOLARIS_THREADS_WEAK */ - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 0 - -/* Define if the Win32 multithreading API can be used. */ -#define USE_WIN32_THREADS 1 - -/* Version number of package */ -#define VERSION "0.17" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -#define WCHAR_T_SUFFIX - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -#define WINT_T_SUFFIX - -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to a replacement function name for realpath(). */ -#define realpath rpl_realpath - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict -/* Work around a bug in Sun C++: it does not support _Restrict, even - though the corresponding Sun C compiler does, which causes - "#define restrict _Restrict" in the previous line. Perhaps some future - version of Sun C++ will work with _Restrict; if so, it'll probably - define __RESTRICT, just as Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define as a signed type of the same size as size_t. */ -#ifdef _WIN64 -#define ssize_t __int64 -#elif _WIN32 -#define ssize_t __int32 -#endif - -/* Define to rpl_strnlen if the replacement function should be used. */ -#define strnlen rpl_strnlen - -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#if 0 -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init libintl_lock_init -#define glthread_lock_lock libintl_lock_lock -#define glthread_lock_unlock libintl_lock_unlock -#define glthread_lock_destroy libintl_lock_destroy -#define glthread_rwlock_init libintl_rwlock_init -#define glthread_rwlock_rdlock libintl_rwlock_rdlock -#define glthread_rwlock_wrlock libintl_rwlock_wrlock -#define glthread_rwlock_unlock libintl_rwlock_unlock -#define glthread_rwlock_destroy libintl_rwlock_destroy -#define glthread_recursive_lock_init libintl_recursive_lock_init -#define glthread_recursive_lock_lock libintl_recursive_lock_lock -#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock -#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy -#define glthread_once libintl_once -#define glthread_once_call libintl_once_call -#define glthread_once_singlethreaded libintl_once_singlethreaded -#endif - - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#ifdef __EMX__ -# include "intl/os2compat.h" -#endif - diff --git a/ports/gettext/libgnuintl.win32.h b/ports/gettext/libgnuintl.win32.h deleted file mode 100644 index 440da4d5941261..00000000000000 --- a/ports/gettext/libgnuintl.win32.h +++ /dev/null @@ -1,423 +0,0 @@ -/* Message catalogs for internationalization. -Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Library General Public License as published -by the Free Software Foundation; either version 2, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -USA. */ - -#ifndef _LIBINTL_H -#define _LIBINTL_H 1 - -#if defined(_WIN32) && defined(libintl_EXPORTS) -#define LIBINTL_DLL_EXPORTED __declspec(dllexport) -#else -#define LIBINTL_DLL_EXPORTED -#endif - -#include - -/* The LC_MESSAGES locale category is the category used by the functions -gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. -On systems that don't define it, use an arbitrary value instead. -On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) -then includes (i.e. this file!) and then only defines -LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES -in this case. */ -#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) -# define LC_MESSAGES 1729 -#endif - -/* We define an additional symbol to signal that we use the GNU -implementation of gettext. */ -#define __USE_GNU_GETTEXT 1 - -/* Provide information about the supported file formats. Returns the -maximum minor revision number supported for a given major revision. */ -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ - ((major) == 0 || (major) == 1 ? 1 : -1) - -/* Resolve a platform specific conflict on DJGPP. GNU gettext takes -precedence over _conio_gettext. */ -#ifdef __DJGPP__ -# undef gettext -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - - /* Version number: (major<<16) + (minor<<8) + subminor */ -#define LIBINTL_VERSION 0x001100 - extern LIBINTL_DLL_EXPORTED int libintl_version; - - - /* We redirect the functions to those prefixed with "libintl_". This is - necessary, because some systems define gettext/textdomain/... in the C - library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). - If we used the unprefixed names, there would be cases where the - definition in the C library would override the one in the libintl.so - shared library. Recall that on ELF systems, the symbols are looked - up in the following order: - 1. in the executable, - 2. in the shared libraries specified on the link command line, in order, - 3. in the dependencies of the shared libraries specified on the link - command line, - 4. in the dlopen()ed shared libraries, in the order in which they were - dlopen()ed. - The definition in the C library would override the one in libintl.so if - either - * -lc is given on the link command line and -lintl isn't, or - * -lc is given on the link command line before -lintl, or - * libintl.so is a dependency of a dlopen()ed shared library but not - linked to the executable at link time. - Since Solaris gettext() behaves differently than GNU gettext(), this - would be unacceptable. - - The redirection happens by default through macros in C, so that &gettext - is independent of the compilation unit, but through inline functions in - C++, in order not to interfere with the name mangling of class fields or - class methods called 'gettext'. */ - - /* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. - If he doesn't, we choose the method. A third possible method is - _INTL_REDIRECT_ASM, supported only by GCC. */ -#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) -# if __GNUC__ >= 2 && !(__APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) -# define _INTL_REDIRECT_ASM -# else -# ifdef __cplusplus -# define _INTL_REDIRECT_INLINE -# else -# define _INTL_REDIRECT_MACROS -# endif -# endif -#endif - /* Auxiliary macros. */ -#ifdef _INTL_REDIRECT_ASM -# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) -# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring -# define _INTL_STRINGIFY(prefix) #prefix -#else -# define _INTL_ASM(cname) -#endif - - /* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return - its n-th argument literally. This enables GCC to warn for example about - printf (gettext ("foo %y")). */ -#if __GNUC__ >= 3 && !(__APPLE_CC__ > 1 && defined __cplusplus) -# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) -#else -# define _INTL_MAY_RETURN_STRING_ARG(n) -#endif - - /* Look up MSGID in the current default message catalog for the current - LC_MESSAGES locale. If not found, returns MSGID itself (the default - text). */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_gettext(const char *__msgid) - _INTL_MAY_RETURN_STRING_ARG(1); - static inline char *gettext(const char *__msgid) - { - return libintl_gettext(__msgid); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define gettext libintl_gettext -#endif - extern LIBINTL_DLL_EXPORTED char *gettext(const char *__msgid) - _INTL_ASM(libintl_gettext) - _INTL_MAY_RETURN_STRING_ARG(1); -#endif - - /* Look up MSGID in the DOMAINNAME message catalog for the current - LC_MESSAGES locale. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_dgettext(const char *__domainname, const char *__msgid) - _INTL_MAY_RETURN_STRING_ARG(2); - static inline char *dgettext(const char *__domainname, const char *__msgid) - { - return libintl_dgettext(__domainname, __msgid); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define dgettext libintl_dgettext -#endif - extern LIBINTL_DLL_EXPORTED char *dgettext(const char *__domainname, const char *__msgid) - _INTL_ASM(libintl_dgettext) - _INTL_MAY_RETURN_STRING_ARG(2); -#endif - - /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY - locale. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_dcgettext(const char *__domainname, const char *__msgid, - int __category) - _INTL_MAY_RETURN_STRING_ARG(2); - static inline char *dcgettext(const char *__domainname, const char *__msgid, - int __category) - { - return libintl_dcgettext(__domainname, __msgid, __category); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define dcgettext libintl_dcgettext -#endif - extern LIBINTL_DLL_EXPORTED char *dcgettext(const char *__domainname, const char *__msgid, - int __category) - _INTL_ASM(libintl_dcgettext) - _INTL_MAY_RETURN_STRING_ARG(2); -#endif - - - /* Similar to `gettext' but select the plural form corresponding to the - number N. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_ngettext(const char *__msgid1, const char *__msgid2, - unsigned long int __n) - _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2); - static inline char *ngettext(const char *__msgid1, const char *__msgid2, - unsigned long int __n) - { - return libintl_ngettext(__msgid1, __msgid2, __n); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define ngettext libintl_ngettext -#endif - extern LIBINTL_DLL_EXPORTED char *ngettext(const char *__msgid1, const char *__msgid2, - unsigned long int __n) - _INTL_ASM(libintl_ngettext) - _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2); -#endif - - /* Similar to `dgettext' but select the plural form corresponding to the - number N. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_dngettext(const char *__domainname, const char *__msgid1, - const char *__msgid2, unsigned long int __n) - _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); - static inline char *dngettext(const char *__domainname, const char *__msgid1, - const char *__msgid2, unsigned long int __n) - { - return libintl_dngettext(__domainname, __msgid1, __msgid2, __n); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define dngettext libintl_dngettext -#endif - extern LIBINTL_DLL_EXPORTED char *dngettext(const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n) - _INTL_ASM(libintl_dngettext) - _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); -#endif - - /* Similar to `dcgettext' but select the plural form corresponding to the - number N. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_dcngettext(const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category) - _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); - static inline char *dcngettext(const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category) - { - return libintl_dcngettext(__domainname, __msgid1, __msgid2, __n, __category); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define dcngettext libintl_dcngettext -#endif - extern LIBINTL_DLL_EXPORTED char *dcngettext(const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category) - _INTL_ASM(libintl_dcngettext) - _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); -#endif - - - - /* Set the current default message catalog to DOMAINNAME. - If DOMAINNAME is null, return the current default. - If DOMAINNAME is "", reset to the default of "messages". */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_textdomain(const char *__domainname); - static inline char *textdomain(const char *__domainname) - { - return libintl_textdomain(__domainname); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define textdomain libintl_textdomain -#endif - extern LIBINTL_DLL_EXPORTED char *textdomain(const char *__domainname) - _INTL_ASM(libintl_textdomain); -#endif - - /* Specify that the DOMAINNAME message catalog will be found - in DIRNAME rather than in the system locale data base. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_bindtextdomain(const char *__domainname, - const char *__dirname); - static inline char *bindtextdomain(const char *__domainname, - const char *__dirname) - { - return libintl_bindtextdomain(__domainname, __dirname); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define bindtextdomain libintl_bindtextdomain -#endif - extern LIBINTL_DLL_EXPORTED char *bindtextdomain(const char *__domainname, const char *__dirname) - _INTL_ASM(libintl_bindtextdomain); -#endif - - /* Specify the character encoding in which the messages from the - DOMAINNAME message catalog will be returned. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_bind_textdomain_codeset(const char *__domainname, - const char *__codeset); - static inline char *bind_textdomain_codeset(const char *__domainname, - const char *__codeset) - { - return libintl_bind_textdomain_codeset(__domainname, __codeset); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define bind_textdomain_codeset libintl_bind_textdomain_codeset -#endif - extern LIBINTL_DLL_EXPORTED char *bind_textdomain_codeset(const char *__domainname, - const char *__codeset) - _INTL_ASM(libintl_bind_textdomain_codeset); -#endif - - - - /* Support for format strings with positions in *printf(), following the - POSIX/XSI specification. - Note: These replacements for the *printf() functions are visible only - in source files that #include or #include "gettext.h". - Packages that use *printf() in source files that don't refer to _() - or gettext() but for which the format string could be the return value - of _() or gettext() need to add this #include. Oh well. */ - -#if !0 - -#include -#include - - /* Get va_list. */ -#if __STDC__ || defined __cplusplus || defined _MSC_VER -# include -#else -# include -#endif - -#undef fprintf -#define fprintf libintl_fprintf - extern LIBINTL_DLL_EXPORTED int fprintf(FILE *, const char *, ...); -#undef vfprintf -#define vfprintf libintl_vfprintf - extern LIBINTL_DLL_EXPORTED int vfprintf(FILE *, const char *, va_list); - -#undef printf -#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ - /* Don't break __attribute__((format(printf,M,N))). - This redefinition is only possible because the libc in NetBSD, Cygwin, - mingw does not have a function __printf__. */ -# define libintl_printf __printf__ -#endif -#define printf libintl_printf - extern LIBINTL_DLL_EXPORTED int printf(const char *, ...); -#undef vprintf -#define vprintf libintl_vprintf - extern LIBINTL_DLL_EXPORTED int vprintf(const char *, va_list); - -#undef sprintf -#define sprintf libintl_sprintf - extern LIBINTL_DLL_EXPORTED int sprintf(char *, const char *, ...); -#undef vsprintf -#define vsprintf libintl_vsprintf - extern LIBINTL_DLL_EXPORTED int vsprintf(char *, const char *, va_list); - -#if 0 - -#undef snprintf -#define snprintf libintl_snprintf - extern LIBINTL_DLL_EXPORTED int snprintf(char *, size_t, const char *, ...); -#undef vsnprintf -#define vsnprintf libintl_vsnprintf - extern LIBINTL_DLL_EXPORTED int vsnprintf(char *, size_t, const char *, va_list); - -#endif - -#if 0 - -#undef asprintf -#define asprintf libintl_asprintf - extern LIBINTL_DLL_EXPORTED int asprintf(char **, const char *, ...); -#undef vasprintf -#define vasprintf libintl_vasprintf - extern LIBINTL_DLL_EXPORTED int vasprintf(char **, const char *, va_list); - -#endif - -#if 0 - -#undef fwprintf -#define fwprintf libintl_fwprintf - extern LIBINTL_DLL_EXPORTED int fwprintf(FILE *, const wchar_t *, ...); -#undef vfwprintf -#define vfwprintf libintl_vfwprintf - extern LIBINTL_DLL_EXPORTED int vfwprintf(FILE *, const wchar_t *, va_list); - -#undef wprintf -#define wprintf libintl_wprintf - extern LIBINTL_DLL_EXPORTED int wprintf(const wchar_t *, ...); -#undef vwprintf -#define vwprintf libintl_vwprintf - extern LIBINTL_DLL_EXPORTED int vwprintf(const wchar_t *, va_list); - -#undef swprintf -#define swprintf libintl_swprintf - extern LIBINTL_DLL_EXPORTED int swprintf(wchar_t *, size_t, const wchar_t *, ...); -#undef vswprintf -#define vswprintf libintl_vswprintf - extern LIBINTL_DLL_EXPORTED int vswprintf(wchar_t *, size_t, const wchar_t *, va_list); - -#endif - -#endif - - - /* Support for relocatable packages. */ - - /* Sets the original and the current installation prefix of the package. - Relocation simply replaces a pathname starting with the original prefix - by the corresponding pathname with the current prefix instead. Both - prefixes should be directory names without trailing slash (i.e. use "" - instead of "/"). */ -#define libintl_set_relocation_prefix libintl_set_relocation_prefix - extern LIBINTL_DLL_EXPORTED void - libintl_set_relocation_prefix(const char *orig_prefix, - const char *curr_prefix); - - -#ifdef __cplusplus -} -#endif - -#endif /* libintl.h */ \ No newline at end of file diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index fd188cbc387e56..328acaf489e496 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -65,3 +65,5 @@ foreach(DLL_PATH IN LISTS GNU_DLL_PATHS) endforeach() vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/intl) diff --git a/ports/gettext/unofficial-gettext-config.cmake b/ports/gettext/unofficial-gettext-config.cmake deleted file mode 100644 index 3b872142af7b8d..00000000000000 --- a/ports/gettext/unofficial-gettext-config.cmake +++ /dev/null @@ -1 +0,0 @@ -add_library(unofficial::gettext::libintl INTERFACE IMPORTED) diff --git a/ports/gettext/vcpkg-cmake-wrapper.cmake b/ports/gettext/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..c231bfee692a73 --- /dev/null +++ b/ports/gettext/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,10 @@ +_find_package(${ARGS}) + +if(Intl_FOUND AND Intl_LIBRARIES) + include(SelectLibraryConfigurations) + find_library(Intl_LIBRARY_DEBUG NAMES intl libintl intl-8 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) + find_library(Intl_LIBRARY_RELEASE NAMES intl libintl intl-8 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + unset(Intl_LIBRARIES) + unset(Intl_LIBRARIES CACHE) + select_library_configurations(Intl) +endif() \ No newline at end of file From 66150588c1fabf2231da0c6e5c158cd7ffa9b195 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Aug 2020 01:17:50 +0200 Subject: [PATCH 020/114] try fixing uwp --- scripts/cmake/vcpkg_build_make.cmake | 64 ++++++------- scripts/cmake/vcpkg_configure_make.cmake | 116 ++++++++++++++--------- 2 files changed, 102 insertions(+), 78 deletions(-) diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index 1bd391ada50577..ea1e93750fc780 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -104,29 +104,35 @@ function(vcpkg_build_make) endif() set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}") - message(STATUS "Building ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + extract_cpp_flags_and_set_cflags_and_cxxflags(${CMAKE_BUILDTYPE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(LINKER_FLAGS_${CMAKE_BUILDTYPE} "${VCPKG_DETECTED_STATIC_LINKERFLAGS_${CMAKE_BUILDTYPE}}") else() # dynamic set(LINKER_FLAGS_${CMAKE_BUILDTYPE} "${VCPKG_DETECTED_SHARED_LINKERFLAGS_${CMAKE_BUILDTYPE}}") endif() if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe") - set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/") + set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link") set(LINK_ENV_${CMAKE_BUILDTYPE} "$ENV{_LINK_} ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}") else() - set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/ ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}") + set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}") endif() - + + # Setup environment + set(ENV{CPPFLAGS} "${CPPFLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{CFLAGS} "${CFLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{CXXFLAGS} "${CXXFLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{RCFLAGS} "${VCPKG_DETECTED_COMBINED_RCFLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{LDFLAGS} "${LDFLAGS_${CMAKE_BUILDTYPE}}") set(ENV{LIB} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIB_PATHLIKE_CONCAT}") set(ENV{LIBPATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIBPATH_PATHLIKE_CONCAT}") set(ENV{LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIBRARY_PATH_PATHLIKE_CONCAT}") #set(ENV{LD_LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX_${BUILDTYPE}}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX_${BUILDTYPE}}/lib/manual-link/${LD_LIBRARY_PATH_PATHLIKE_CONCAT}") if(LINK_ENV_${_VAR_SUFFIX}) - _vcpkg_backup_env_variables(_LINK_) - set(ENV{_LINK_} "$ENV{_LINK_} ${LINK_ENV_${_VAR_SUFFIX}}") + set(_LINK_CONFIG_BACKUP "$ENV{_LINK_}") + set(ENV{_LINK_} "${LINK_ENV_${_VAR_SUFFIX}}") endif() if(_bc_ADD_BIN_TO_PATH) @@ -139,53 +145,43 @@ function(vcpkg_build_make) else() set(MAKE_CMD_LINE ${MAKE_COMMAND} ${MAKE_OPTS}) endif() + foreach(_envar IN LISTS printvars) + message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") + endforeach() vcpkg_execute_build_process( COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} WORKING_DIRECTORY "${WORKING_DIRECTORY}" LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" ) - _vcpkg_restore_env_variables(_LINK_) - if(_bc_ADD_BIN_TO_PATH) - set(ENV{PATH} "${_BACKUP_ENV_PATH}") - endif() - endif() - endforeach() - - if (_bc_ENABLE_INSTALL) - foreach(BUILDTYPE "debug" "release") - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) - if(BUILDTYPE STREQUAL "debug") - # Skip debug generate - if (_VCPKG_NO_DEBUG) - continue() - endif() - set(SHORT_BUILDTYPE "-dbg") - else() - # In NO_DEBUG mode, we only use ${TARGET_TRIPLET} directory. - if (_VCPKG_NO_DEBUG) - set(SHORT_BUILDTYPE "") - else() - set(SHORT_BUILDTYPE "-rel") - endif() - endif() - + if (_bc_ENABLE_INSTALL) message(STATUS "Installing ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") - if(MAKE_BASH) set(MAKE_CMD_LINE "${MAKE_COMMAND} ${INSTALL_OPTS}") else() set(MAKE_CMD_LINE ${MAKE_COMMAND} ${INSTALL_OPTS}) endif() - set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + foreach(_envar IN LISTS printvars) + message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") + endforeach() vcpkg_execute_build_process( COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} WORKING_DIRECTORY "${WORKING_DIRECTORY}" LOGNAME "install-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" ) + endif() + if(_LINK_CONFIG_BACKUP) + set(ENV{_LINK_} "${_LINK_CONFIG_BACKUP}") + unset(_LINK_CONFIG_BACKUP) + endif() + if(_bc_ADD_BIN_TO_PATH) + set(ENV{PATH} "${_BACKUP_ENV_PATH}") endif() - endforeach() + endif() + endforeach() + + if (_bc_ENABLE_INSTALL) string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALL_PREFIX "${CURRENT_INSTALLED_DIR}") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}_tmp") file(RENAME "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}_tmp") diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 31ff556be81ad3..11f65534426b3c 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -86,6 +86,8 @@ ## * [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) ## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) ## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) +set(printvars PATH _LINK_ _CL_ CPPFLAGS CFLAGS CXXFLAGS LDFLAGS LIBS INCLUDE LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) + macro(_vcpkg_determine_host_mingw out_var) if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) set(HOST_ARCH $ENV{PROCESSOR_ARCHITEW6432}) @@ -166,6 +168,36 @@ macro(_vcpkg_restore_env_variables) endforeach() endmacro() +macro(extract_cpp_flags_and_set_cflags_and_cxxflags _SUFFIX) + string(REGEX MATCHALL "( |^)-D[^ ]+" CPPFLAGS_${_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_SUFFIX}}") + string(REGEX MATCHALL "( |^)-D[^ ]+" CXXPPFLAGS_${_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_SUFFIX}}") + list(JOIN CXXPPFLAGS_${_SUFFIX} "|" CXXREGEX) + if(CXXREGEX) + list(FILTER CPPFLAGS_${_SUFFIX} INCLUDE REGEX "(${CXXREGEX})") + else() + set(CPPFLAGS_${_SUFFIX}) + endif() + list(JOIN CPPFLAGS_${_SUFFIX} "|" CPPREGEX) + list(JOIN CPPFLAGS_${_SUFFIX} " " CPPFLAGS_${_SUFFIX}) + set(CPPFLAGS_${_SUFFIX} "${CPPFLAGS_${_SUFFIX}}") + if(CPPREGEX) + string(REGEX REPLACE "(${CPPREGEX})" "" CFLAGS_${_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_SUFFIX}}") + string(REGEX REPLACE "(${CPPREGEX})" "" CXXFLAGS_${_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_SUFFIX}}") + else() + set(CFLAGS_${_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_SUFFIX}}") + set(CXXFLAGS_${_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_SUFFIX}}") + endif() + string(REGEX REPLACE " +" " " CPPFLAGS_${_SUFFIX} "${CPPFLAGS_${_SUFFIX}}") + string(REGEX REPLACE " +" " " CFLAGS_${_SUFFIX} "${CFLAGS_${_SUFFIX}}") + string(REGEX REPLACE " +" " " CXXFLAGS_${_SUFFIX} "${CXXFLAGS_${_SUFFIX}}") + string(STRIP "${CPPFLAGS_${_SUFFIX}}" CPPFLAGS_${_SUFFIX}) + string(STRIP "${CFLAGS_${_SUFFIX}}" CFLAGS_${_SUFFIX}) + string(STRIP "${CXXFLAGS_${_SUFFIX}}" CXXFLAGS_${_SUFFIX}) + debug_message("CPPFLAGS_${_SUFFIX}: ${CPPFLAGS_${_SUFFIX}}") + debug_message("CFLAGS_${_SUFFIX}: ${CFLAGS_${_SUFFIX}}") + debug_message("CXXFLAGS_${_SUFFIX}: ${CXXFLAGS_${_SUFFIX}}") +endmacro() + function(vcpkg_configure_make) cmake_parse_arguments(_csc "AUTOCONFIG;SKIP_CONFIGURE;COPY_SOURCE;DISABLE_VERBOSE_FLAGS;NO_ADDITIONAL_PATHS;ADD_BIN_TO_PATH;USE_WRAPPERS;DETERMINE_BUILD_TRIPLET" @@ -234,7 +266,6 @@ function(vcpkg_configure_make) libtool gettext gettext-devel - #gcc # gcc is required for windres to work ) list(APPEND MSYS_REQUIRE_PACKAGES make) if (_csc_AUTOCONFIG OR _csc_USE_WRAPPERS) @@ -342,9 +373,11 @@ function(vcpkg_configure_make) _vcpkg_append_to_configure_environment(CONFIGURE_ENV DLLTOOL "link.exe -verbose -dll") endif() _vcpkg_append_to_configure_environment(CONFIGURE_ENV CCAS ":") # If required set the ENV variable CCAS in the portfile correctly + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AS ":") # If required set the ENV variable CCAS in the portfile correctly foreach(_env IN LISTS _csc_CONFIGURE_ENVIRONMENT_VARIABLES) _vcpkg_append_to_configure_environment(CONFIGURE_ENV ${_env} "${${_env}}") endforeach() + message(STATUS "CONFIGURE_ENV: ${CONFIGURE_ENV}") # Other maybe interesting variables to control # COMPILE This is the command used to actually compile a C source file. The file name is appended to form the complete command line. # LINK This is the command used to actually link a C program. @@ -434,13 +467,17 @@ function(vcpkg_configure_make) # (This is due to libtool and compiler wrapper using the same set of options to pass those variables around) string(REPLACE "\\" "/" VCToolsInstallDir "$ENV{VCToolsInstallDir}") set(ENV{_CL_} "$ENV{_CL_} /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") - set(ENV{_LINK_} "$ENV{_LINK_} /MANIFEST /DYNAMICBASE /WINMD:NO /APPCONTAINER") + string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_RELEASE " -ZW:nostdlib") + string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_DEBUG " -ZW:nostdlib") + set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO /APPCONTAINER") endif() - set(ENV{_LINK_} "${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") - else() + endif() + + if(DEFINED ENV{LIBS}) set(ENV{LIBS} "$ENV{LIBS} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") + else() + set(ENV{LIBS} "${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") endif() - if(NOT ENV{PKG_CONFIG}) find_program(PKGCONFIG pkg-config PATHS "${MSYS_ROOT}/usr/bin" REQUIRED) debug_message("Using pkg-config from: ${PKGCONFIG}") @@ -512,30 +549,6 @@ function(vcpkg_configure_make) ) endif() - macro(extract_cpp_flags_and_set_cflags_and_cxxflags) - string(REGEX MATCHALL "( |^)-[^ ]+" CPPFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") - string(REGEX MATCHALL "( |^)-[^ ]+" CXXPPFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") - list(JOIN CXXPPFLAGS_${_VAR_SUFFIX} "|" CXXREGEX) - if(CXXREGEX) - list(FILTER CPPFLAGS_${_VAR_SUFFIX} INCLUDE REGEX "(${CXXREGEX})") - else() - set(CPPFLAGS_${_VAR_SUFFIX}) - endif() - list(JOIN CPPFLAGS_${_VAR_SUFFIX} "|" CPPREGEX) - list(JOIN CPPFLAGS_${_VAR_SUFFIX} " " CPPFLAGS_${_VAR_SUFFIX}) - set(CPPFLAGS_${_VAR_SUFFIX} " ${CPPFLAGS_${_VAR_SUFFIX}}") - if(CPPREGEX) - string(REGEX REPLACE "(${CPPREGEX})" "" CFLAGS_${_VAR_SUFFIX} " ${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") - string(REGEX REPLACE "(${CPPREGEX})" "" CXXFLAGS_${_VAR_SUFFIX} " ${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") - else() - set(CFLAGS_${_VAR_SUFFIX} " ${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") - set(CXXFLAGS_${_VAR_SUFFIX} " ${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") - endif() - debug_message("CPPFLAGS_${_VAR_SUFFIX}: ${CPPFLAGS_${_VAR_SUFFIX}}") - debug_message("CFLAGS_${_VAR_SUFFIX}: ${CFLAGS_${_VAR_SUFFIX}}") - debug_message("CXXFLAGS_${_VAR_SUFFIX}: ${CXXFLAGS_${_VAR_SUFFIX}}") - endmacro() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug" AND NOT _csc_NO_DEBUG) set(_VAR_SUFFIX DEBUG) set(PATH_SUFFIX_${_VAR_SUFFIX} "/debug") @@ -546,12 +559,16 @@ function(vcpkg_configure_make) else() # dynamic set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_SHARED_LINKERFLAGS_${_VAR_SUFFIX}}") endif() - extract_cpp_flags_and_set_cflags_and_cxxflags() + extract_cpp_flags_and_set_cflags_and_cxxflags(${_VAR_SUFFIX}) if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe") - set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/") - set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link") + if(DEFINED ENV{_LINK_}) + set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") + else() + set(LINK_ENV_${_VAR_SUFFIX} "${LINKER_FLAGS_${_VAR_SUFFIX}}") + endif() else() - set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/ ${LINKER_FLAGS_${_VAR_SUFFIX}}") + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link ${LINKER_FLAGS_${_VAR_SUFFIX}}") endif() unset(_VAR_SUFFIX) endif() @@ -565,10 +582,14 @@ function(vcpkg_configure_make) else() # dynamic set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_SHARED_LINKERFLAGS_${_VAR_SUFFIX}}") endif() - extract_cpp_flags_and_set_cflags_and_cxxflags() + extract_cpp_flags_and_set_cflags_and_cxxflags(${_VAR_SUFFIX}) if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe") - set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/") - set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link") + if(DEFINED ENV{_LINK_}) + set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") + else() + set(LINK_ENV_${_VAR_SUFFIX} "${LINKER_FLAGS_${_VAR_SUFFIX}}") + endif() else() set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/ ${LINKER_FLAGS_${_VAR_SUFFIX}}") endif() @@ -576,6 +597,7 @@ function(vcpkg_configure_make) endif() foreach(_buildtype IN LISTS _buildtypes) + foreach(ENV_VAR ${_csc_CONFIG_DEPENDENT_ENVIRONMENT}) if(DEFINED ENV{${ENV_VAR}}) set(BACKUP_CONFIG_${ENV_VAR} "$ENV{${ENV_VAR}}") @@ -603,13 +625,13 @@ function(vcpkg_configure_make) endif() # Setup environment - set(ENV{CPPFLAGS} ${CPPFLAGS_${_buildtype}}) - set(ENV{CFLAGS} ${CFLAGS_${_buildtype}}) - set(ENV{CXXFLAGS} ${CXXFLAGS_${_buildtype}}) - set(ENV{RCFLAGS} ${VCPKG_DETECTED_COMBINED_RCFLAGS_${_buildtype}}) - set(ENV{LDFLAGS} ${LDFLAGS_${_buildtype}}) + set(ENV{CPPFLAGS} "${CPPFLAGS_${_buildtype}}") + set(ENV{CFLAGS} "${CFLAGS_${_buildtype}}") + set(ENV{CXXFLAGS} "${CXXFLAGS_${_buildtype}}") + set(ENV{RCFLAGS} "${VCPKG_DETECTED_COMBINED_RCFLAGS_${_buildtype}}") + set(ENV{LDFLAGS} "${LDFLAGS_${_buildtype}}") if(LINK_ENV_${_VAR_SUFFIX}) - _vcpkg_backup_env_variables(_LINK_) + set(_LINK_CONFIG_BACKUP "$ENV{_LINK_}") set(ENV{_LINK_} "${LINK_ENV_${_VAR_SUFFIX}}") endif() set(ENV{PKG_CONFIG} "${PKGCONFIG} --define-variable=prefix=${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}") @@ -629,6 +651,9 @@ function(vcpkg_configure_make) vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/bin") endif() debug_message("Configure command:'${command}'") + foreach(_envar IN LISTS printvars) + message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") + endforeach() if (NOT _csc_SKIP_CONFIGURE) message(STATUS "Configuring ${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}}") vcpkg_execute_required_process( @@ -653,7 +678,10 @@ function(vcpkg_configure_make) endif() unset(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype}) - _vcpkg_restore_env_variables(_LINK_) + if(_LINK_CONFIG_BACKUP) + set(ENV{_LINK_} "${_LINK_CONFIG_BACKUP}") + unset(_LINK_CONFIG_BACKUP) + endif() if(_csc_ADD_BIN_TO_PATH) set(ENV{PATH} "${PATH_BACKUP}") @@ -670,7 +698,7 @@ function(vcpkg_configure_make) # Restore environment foreach(_prefix IN LISTS FLAGPREFIXES) - _vcpkg_restore_env_variable(${prefix}FLAGS) + _vcpkg_restore_env_variable(${_prefix}FLAGS) endforeach() _vcpkg_restore_env_variables(LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) From 83006e68457c8f9b93abc8c6d5cd51b8ec6b1976 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Aug 2020 01:18:51 +0200 Subject: [PATCH 021/114] other things to update --- ports/gettext/portfile.cmake | 1 - ports/libiconv/portfile.cmake | 5 ++++- ports/libxslt/0001-Fix-makefile.patch | 2 +- ports/libxslt/CONTROL | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index 328acaf489e496..6f93749a9110fc 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -23,7 +23,6 @@ vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE} REF ${GETTEXT_VERSION} PATCHES - #0001-Fix-macro-definitions.patch 0002-Fix-uwp-build.patch 0003-Fix-win-unicode-paths.patch ) diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index e175bf69f9ac5a..f22e497f0001dc 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -20,13 +20,16 @@ vcpkg_extract_source_archive_ex( 0002-Config-for-MSVC.patch 0003-Add-export.patch ) - +if(VCPKG_TARGET_IS_UWP) + list(APPEND OPTIONS gl_cv_double_slash_root=yes) +endif() vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH} DETERMINE_BUILD_TRIPLET USE_WRAPPERS OPTIONS --enable-relocatable --enable-extra-encodings + ${OPTIONS} ) vcpkg_install_make() diff --git a/ports/libxslt/0001-Fix-makefile.patch b/ports/libxslt/0001-Fix-makefile.patch index 8648a3fe589c69..4d835e103f707f 100644 --- a/ports/libxslt/0001-Fix-makefile.patch +++ b/ports/libxslt/0001-Fix-makefile.patch @@ -12,7 +12,7 @@ index 23a02d2..b13dd26 100644 LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX) -LIBS = wsock32.lib +# The libraries are needed for static builds (the makefile builds all tools and dlls) -+LIBS = wsock32.lib libiconv.lib libcharset.lib ++LIBS = wsock32.lib iconv.lib charset.lib +!if "$(DEBUG)" == "1" +LIBS = $(LIBS) zlibd.lib +!else diff --git a/ports/libxslt/CONTROL b/ports/libxslt/CONTROL index 38eea5f1a7f521..27f8c16f448566 100644 --- a/ports/libxslt/CONTROL +++ b/ports/libxslt/CONTROL @@ -1,5 +1,6 @@ Source: libxslt -Version: 1.1.33-7 +Version: 1.1.33 +Port-Version: 8 Homepage: https://github.com/GNOME/libxslt Description: Libxslt is a XSLT library implemented in C for XSLT 1.0 and most of EXSLT Build-Depends: libxml2, liblzma From c38141001db914a0244295fd2a1882f3b69c03ae Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Aug 2020 01:20:23 +0200 Subject: [PATCH 022/114] exiv2 fix --- ports/exiv2/CONTROL | 2 +- ports/exiv2/vcpkg-cmake-wrapper.cmake | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 798343c70ff55f..5e28dc4b3933c9 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,6 +1,6 @@ Source: exiv2 Version: 0.27.3 -Port-Version: 1 +Port-Version: 2 Build-Depends: zlib, libiconv, gettext Description: Image metadata library and tools Homepage: https://www.exiv2.org diff --git a/ports/exiv2/vcpkg-cmake-wrapper.cmake b/ports/exiv2/vcpkg-cmake-wrapper.cmake index 76e941f2016d62..ab71ccdb702a5f 100644 --- a/ports/exiv2/vcpkg-cmake-wrapper.cmake +++ b/ports/exiv2/vcpkg-cmake-wrapper.cmake @@ -1,11 +1,12 @@ _find_package(${ARGS}) if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") - find_package(unofficial-iconv CONFIG REQUIRED) - find_package(unofficial-gettext CONFIG REQUIRED) + find_package(Iconv REQUIRED) + find_package(Intl REQUIRED) if(TARGET exiv2lib) set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES - unofficial::iconv::libiconv - unofficial::gettext::libintl) + Iconv::Iconv + ) + target_link_libraries(exiv2lib INTERFACE ${Intl_LIBRARIES}) endif() endif() From 36beae0b92bf1d470d7896d994116b0f5fa1b186 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Aug 2020 17:03:25 +0200 Subject: [PATCH 023/114] libtool does not like -RTC1 --- scripts/cmake/vcpkg_configure_make.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 11f65534426b3c..1c6d8790586211 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -190,6 +190,9 @@ macro(extract_cpp_flags_and_set_cflags_and_cxxflags _SUFFIX) string(REGEX REPLACE " +" " " CPPFLAGS_${_SUFFIX} "${CPPFLAGS_${_SUFFIX}}") string(REGEX REPLACE " +" " " CFLAGS_${_SUFFIX} "${CFLAGS_${_SUFFIX}}") string(REGEX REPLACE " +" " " CXXFLAGS_${_SUFFIX} "${CXXFLAGS_${_SUFFIX}}") + # libtool has problems dealing with this compiler flag so we remove it for now. Could be put into ENV{CL} + string(REGEX REPLACE "(-|/)(RTC[^ ]+)" "" CFLAGS_${_SUFFIX} "${CFLAGS_${_SUFFIX}}") + string(REGEX REPLACE "(-|/)(RTC[^ ]+)" "" CXXFLAGS_${_SUFFIX} "${CXXFLAGS_${_SUFFIX}}") string(STRIP "${CPPFLAGS_${_SUFFIX}}" CPPFLAGS_${_SUFFIX}) string(STRIP "${CFLAGS_${_SUFFIX}}" CFLAGS_${_SUFFIX}) string(STRIP "${CXXFLAGS_${_SUFFIX}}" CXXFLAGS_${_SUFFIX}) @@ -392,6 +395,9 @@ function(vcpkg_configure_make) string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALLED_PKGCONF ${_VCPKG_INSTALLED_PKGCONF}) string(REPLACE "\\" "/" _VCPKG_INSTALLED_PKGCONF ${_VCPKG_INSTALLED_PKGCONF}) set(prefix_var "'\${prefix}'") # Windows needs extra quotes or else the variable gets expanded in the makefile! + + list(APPEND _csc_OPTIONS gl_cv_double_slash_root=yes + ac_cv_func_memmove=yes) else() string(REPLACE " " "\ " _VCPKG_PREFIX ${CURRENT_INSTALLED_DIR}) string(REPLACE " " "\ " _VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR}) @@ -597,7 +603,6 @@ function(vcpkg_configure_make) endif() foreach(_buildtype IN LISTS _buildtypes) - foreach(ENV_VAR ${_csc_CONFIG_DEPENDENT_ENVIRONMENT}) if(DEFINED ENV{${ENV_VAR}}) set(BACKUP_CONFIG_${ENV_VAR} "$ENV{${ENV_VAR}}") From e3adc503ed1bfa15e0cbbff9ecef7dfcffb8c967 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Aug 2020 17:37:38 +0200 Subject: [PATCH 024/114] pass the /RTC flag directly to the compiler --- scripts/cmake/vcpkg_configure_make.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 06d768f5b122f1..b9d4c62e44c4a2 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -190,9 +190,11 @@ macro(extract_cpp_flags_and_set_cflags_and_cxxflags _SUFFIX) string(REGEX REPLACE " +" " " CPPFLAGS_${_SUFFIX} "${CPPFLAGS_${_SUFFIX}}") string(REGEX REPLACE " +" " " CFLAGS_${_SUFFIX} "${CFLAGS_${_SUFFIX}}") string(REGEX REPLACE " +" " " CXXFLAGS_${_SUFFIX} "${CXXFLAGS_${_SUFFIX}}") - # libtool has problems dealing with this compiler flag so we remove it for now. Could be put into ENV{CL} - string(REGEX REPLACE "(-|/)(RTC[^ ]+)" "" CFLAGS_${_SUFFIX} "${CFLAGS_${_SUFFIX}}") - string(REGEX REPLACE "(-|/)(RTC[^ ]+)" "" CXXFLAGS_${_SUFFIX} "${CXXFLAGS_${_SUFFIX}}") + # libtool has and -R option so we need to guard against -RTC by using -Xcompiler + # while configuring there might be a lot of unknown compiler option warnings due to that + # just ignore them. + string(REGEX REPLACE "((-|/)RTC[^ ]+)" "-Xcompiler \\1" CFLAGS_${_SUFFIX} "${CFLAGS_${_SUFFIX}}") + string(REGEX REPLACE "((-|/)RTC[^ ]+)" "-Xcompiler \\1" CXXFLAGS_${_SUFFIX} "${CXXFLAGS_${_SUFFIX}}") string(STRIP "${CPPFLAGS_${_SUFFIX}}" CPPFLAGS_${_SUFFIX}) string(STRIP "${CFLAGS_${_SUFFIX}}" CFLAGS_${_SUFFIX}) string(STRIP "${CXXFLAGS_${_SUFFIX}}" CXXFLAGS_${_SUFFIX}) From 115d6efcf574f61656b2dbbd16b5485c714a57d8 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Aug 2020 20:08:17 +0200 Subject: [PATCH 025/114] trust cmake instead of adding extra flags --- scripts/cmake/vcpkg_configure_make.cmake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index b9d4c62e44c4a2..d4d914e2c31262 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -258,7 +258,6 @@ function(vcpkg_configure_make) _vcpkg_backup_env_variables(INCLUDE LIB LIBPATH) if(CURRENT_PACKAGES_DIR MATCHES " " OR CURRENT_INSTALLED_DIR MATCHES " ") - # Don't bother with whitespace. The tools will probably fail and I tried very hard trying to make it work (no success so far)! message(WARNING "Detected whitespace in root directory. Please move the path to one without whitespaces! The required tools do not handle whitespaces correctly and the build will most likely fail") endif() @@ -474,10 +473,12 @@ function(vcpkg_configure_make) # is to use the CL and LINK environment variables !!! # (This is due to libtool and compiler wrapper using the same set of options to pass those variables around) string(REPLACE "\\" "/" VCToolsInstallDir "$ENV{VCToolsInstallDir}") - set(ENV{_CL_} "$ENV{_CL_} /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") - string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_RELEASE " -ZW:nostdlib") - string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_DEBUG " -ZW:nostdlib") - set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO /APPCONTAINER") + # Can somebody please check if CMake's compiler flags for UWP are correct? + #set(ENV{_CL_} "$ENV{_CL_} /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") + #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_RELEASE " -ZW:nostdlib") + #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_DEBUG " -ZW:nostdlib") + #set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO /APPCONTAINER") + set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") endif() endif() From 8c8e88c0c97673c73915881f78ec2f054ca3ef44 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Aug 2020 22:48:31 +0200 Subject: [PATCH 026/114] fix expat --- ports/expat/CONTROL | 1 + ports/expat/pkgconfig.patch | 28 +++++++++++++++++++++++++++ ports/expat/portfile.cmake | 12 +++++------- ports/expat/vcpkg-cmake-wrapper.cmake | 27 ++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 ports/expat/pkgconfig.patch create mode 100644 ports/expat/vcpkg-cmake-wrapper.cmake diff --git a/ports/expat/CONTROL b/ports/expat/CONTROL index 53474ae2bfb2af..96ffe0f1c1ea6d 100644 --- a/ports/expat/CONTROL +++ b/ports/expat/CONTROL @@ -1,4 +1,5 @@ Source: expat Version: 2.2.9 +Port-Version: 1 Homepage: https://github.com/libexpat/libexpat Description: XML parser library written in C \ No newline at end of file diff --git a/ports/expat/pkgconfig.patch b/ports/expat/pkgconfig.patch new file mode 100644 index 00000000000000..650ad36fdf9685 --- /dev/null +++ b/ports/expat/pkgconfig.patch @@ -0,0 +1,28 @@ +diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt +index a67f081b1..cc220f2a1 100644 +--- a/expat/CMakeLists.txt ++++ b/expat/CMakeLists.txt +@@ -294,7 +294,11 @@ expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL + # + # pkg-config file + # +-if(NOT MSVC) ++if(1) ++ set(libname ${_EXPAT_TARGET}) ++ if(MSVC AND CMAKE_BUILD_TYPE STREQUAL "Debug") ++ set(libname ${_EXPAT_TARGET}d) ++ endif() + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix "\${prefix}") + set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") +diff --git a/expat/expat.pc.in b/expat/expat.pc.in +index 5207e3e1b..8835d1385 100644 +--- a/expat/expat.pc.in ++++ b/expat/expat.pc.in +@@ -7,5 +7,5 @@ Name: expat + Version: @PACKAGE_VERSION@ + Description: expat XML parser + URL: http://www.libexpat.org +-Libs: -L${libdir} -lexpat ++Libs: -L${libdir} -l@libname@ + Cflags: -I${includedir} diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index 1414344be72045..1de5705eeed826 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES fix-find-package-by-cmake.patch + pkgconfig.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -27,16 +28,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/expat) +vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -if(EXE OR DEBUG_EXE) - file(REMOVE ${EXE} ${DEBUG_EXE}) -endif() - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/expat_external.h "! defined(XML_STATIC)" @@ -47,4 +43,6 @@ endif() vcpkg_copy_pdbs() #Handle copyright -file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) \ No newline at end of file diff --git a/ports/expat/vcpkg-cmake-wrapper.cmake b/ports/expat/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..29dc615bffac31 --- /dev/null +++ b/ports/expat/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,27 @@ +include(SelectLibraryConfigurations) + +set(EXPATNAMES expat expatw libexpat libexpatw) +set(DEBUGNAMES) +foreach(_CRT MT MD) + foreach(name in LISTS EXPATNAMES) + list(APPEND EXPATNAMES ${name}${_CRT}) + list(APPEND DEBUGNAMES ${name}d${_CRT}) + endforeach() +endforeach() + +find_library(EXPAT_LIBRARY_DEBUG NAMES ${DEBUGNAMES} ${EXPATNAMES} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) +find_library(EXPAT_LIBRARY_RELEASE NAMES ${EXPATNAMES} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) +select_library_configurations(EXPAT) + +_find_package(${ARGS}) +if(EXPAT_FOUND AND TARGET EXPAT::EXPAT) + if(EXPAT_LIBRARY_DEBUG) + set_target_properties(EXPAT::EXPAT PROPERTIES IMPORTED_LOCATION_DEBUG "${EXPAT_LIBRARY_DEBUG}") + endif() + if(EXPAT_LIBRARY_RELEASE) + set_target_properties(EXPAT::EXPAT PROPERTIES IMPORTED_LOCATION_RELEASE "${EXPAT_LIBRARY_RELEASE}") + endif() +endif() + +unset(EXPATNAMES) +unset(DEBUGNAMES) \ No newline at end of file From 37a80f385f4579d0e6b7f53b44716dbb6b3ad28d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Aug 2020 22:48:40 +0200 Subject: [PATCH 027/114] fix iconv wrapper install --- ports/libiconv/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index f22e497f0001dc..0f1671671f227e 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -37,7 +37,7 @@ vcpkg_copy_pdbs() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Iconv) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) From 9895f820c233e3ce9689bb7bb9b03d6edb14825f Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Aug 2020 22:48:56 +0200 Subject: [PATCH 028/114] change fontconfig intl linkage. --- ports/fontconfig/portfile.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index 67b0692472bc7c..445ed2827b1ce4 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -17,8 +17,7 @@ get_filename_component(GPERF_PATH ${GPERF} DIRECTORY) vcpkg_add_to_path(${GPERF_PATH}) if(VCPKG_TARGET_IS_WINDOWS) - set(OPT_DBG "LIBS='-L${CURRENT_INSTALLED_DIR}/debug/lib -lintl'") - set(OPT_REL "LIBS='-L${CURRENT_INSTALLED_DIR}/lib -lintl'") + set(ENV{LIBS} "-lintl") endif() vcpkg_configure_make( AUTOCONFIG From 4570f16acbe61cc8d0c0f000cd396b393b14df5b Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Aug 2020 22:49:35 +0200 Subject: [PATCH 029/114] add appcontainer back in which is required for UWP. Why is this not in the cmake flags? --- scripts/cmake/vcpkg_configure_make.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index d4d914e2c31262..8402962de10c17 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -477,8 +477,8 @@ function(vcpkg_configure_make) #set(ENV{_CL_} "$ENV{_CL_} /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_RELEASE " -ZW:nostdlib") #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_DEBUG " -ZW:nostdlib") - #set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO /APPCONTAINER") - set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") + #set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO ") + set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /APPCONTAINER") endif() endif() From 4483846a190ecfd050dc90f6da4b2c79731a95f0 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 19 Aug 2020 23:30:22 +0200 Subject: [PATCH 030/114] fix pkg-config in vcpkg_configure_make --- scripts/cmake/vcpkg_configure_make.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 8402962de10c17..fb53b4538f60f1 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -615,14 +615,14 @@ function(vcpkg_configure_make) set(RELATIVE_BUILD_PATH .) endif() - set(PKGCONFIG_INSTALLED_DIR "${_VCPKG_INSTALLED_PKGCONF}${PATH_SUFFIX_${_buildtype}}/lib/pkgconfig") - set(PKGCONFIG_INSTALLED_SHARE_DIR "${_VCPKG_INSTALLED_PKGCONF}/share/pkgconfig") + set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/lib/pkgconfig") + set(PKGCONFIG_INSTALLED_SHARE_DIR "${CURRENT_INSTALLED_DIR}/share/pkgconfig") if(ENV{PKG_CONFIG_PATH}) set(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype} $ENV{PKG_CONFIG_PATH}) - set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}:${PKGCONFIG_INSTALLED_SHARE_DIR}:$ENV{PKG_CONFIG_PATH}") + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}") else() - set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}:${PKGCONFIG_INSTALLED_SHARE_DIR}") + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}") endif() # Setup environment From 38e1d59626f0f4962f3a10e519e882e6310930b4 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 00:14:47 +0200 Subject: [PATCH 031/114] fix json-c pkg-config installation --- ports/json-c/CONTROL | 1 + ports/json-c/pkgconfig.patch | 13 +++++++++++++ ports/json-c/portfile.cmake | 5 ++--- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 ports/json-c/pkgconfig.patch diff --git a/ports/json-c/CONTROL b/ports/json-c/CONTROL index 27067f92209fe6..3b9076c8cf2f77 100644 --- a/ports/json-c/CONTROL +++ b/ports/json-c/CONTROL @@ -1,4 +1,5 @@ Source: json-c Version: 2019-09-10 +Port-Version: 1 Description: A JSON implementation in C Homepage: https://github.com/json-c/json-c diff --git a/ports/json-c/pkgconfig.patch b/ports/json-c/pkgconfig.patch new file mode 100644 index 00000000000000..893406ed510379 --- /dev/null +++ b/ports/json-c/pkgconfig.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ffb1db3dc..a82ed8619 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -273,7 +273,7 @@ install( + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} + ) + +-if (UNIX OR MINGW OR CYGWIN) ++if (1) + SET(prefix ${CMAKE_INSTALL_PREFIX}) + # exec_prefix is prefix by default and CMake does not have the + # concept. diff --git a/ports/json-c/portfile.cmake b/ports/json-c/portfile.cmake index 9519023695e971..308b5e43c1ffd5 100644 --- a/ports/json-c/portfile.cmake +++ b/ports/json-c/portfile.cmake @@ -1,11 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO json-c/json-c REF eae040a84a479ccad1d1c48314345c51ecf1a4a4 SHA512 18d8a31b341830b04676cad13fbc0608fb75a323522161ac8fd0bb5058db82c1c261d504696a1e12f4b03eb0967632885580ff81d808adf2f1dff7e32d131ba0 HEAD_REF master + PATCHES pkgconfig.patch ) vcpkg_configure_cmake( @@ -16,7 +15,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) - +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) From 3687e7c13608f12bae87266c00ff3ef956cea8cd Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 00:49:00 +0200 Subject: [PATCH 032/114] remove remnoved config --- ports/gettext/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index 6f93749a9110fc..3202447d945ef6 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -3,7 +3,6 @@ if(VCPKG_TARGET_IS_LINUX) if (NOT EXISTS "/usr/include/libintl.h") message(FATAL_ERROR "Please use command \"sudo apt-get install gettext\" to install gettext on linux.") endif() - file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-gettext-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-gettext) return() else() set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) From 88b2b59a6d8d5e5985fec19d3b998a2bb1a8e175 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 01:27:39 +0200 Subject: [PATCH 033/114] comment out debug messages + bit of tuning --- scripts/cmake/vcpkg_build_make.cmake | 6 +++--- scripts/cmake/vcpkg_configure_make.cmake | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index ea1e93750fc780..0c112012099b46 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -145,9 +145,9 @@ function(vcpkg_build_make) else() set(MAKE_CMD_LINE ${MAKE_COMMAND} ${MAKE_OPTS}) endif() - foreach(_envar IN LISTS printvars) - message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") - endforeach() + # foreach(_envar IN LISTS printvars) + # message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") + # endforeach() vcpkg_execute_build_process( COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} WORKING_DIRECTORY "${WORKING_DIRECTORY}" diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index fb53b4538f60f1..b1c854bf3d123a 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -330,8 +330,9 @@ function(vcpkg_configure_make) endif() endforeach() if (_csc_AUTOCONFIG OR _csc_USE_WRAPPERS) # without autotools we assume a custom configure script which correctly handles cl and lib. Otherwise the port needs to set CC|CXX|AR and probably CPP - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile ${VCPKG_DETECTED_C_COMPILER} -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile ${VCPKG_DETECTED_C_COMPILER} -EP") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "compile ${VCPKG_DETECTED_C_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC_FOR_BUILD "compile ${VCPKG_DETECTED_C_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "compile ${VCPKG_DETECTED_CXX_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV RC "windres-rc ${VCPKG_DETECTED_RC_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV WINDRES "windres-rc ${VCPKG_DETECTED_RC_COMPILER}") @@ -341,8 +342,9 @@ function(vcpkg_configure_make) _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "ar-lib lib.exe -verbose") endif() else() - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "${VCPKG_DETECTED_C_COMPILER} -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "${VCPKG_DETECTED_C_COMPILER} -EP") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "${VCPKG_DETECTED_C_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC_FOR_BUILD "${VCPKG_DETECTED_C_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "${VCPKG_DETECTED_CXX_COMPILER}") if(VCPKG_DETECTED_AR) _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "${VCPKG_DETECTED_AR}") @@ -381,7 +383,7 @@ function(vcpkg_configure_make) foreach(_env IN LISTS _csc_CONFIGURE_ENVIRONMENT_VARIABLES) _vcpkg_append_to_configure_environment(CONFIGURE_ENV ${_env} "${${_env}}") endforeach() - message(STATUS "CONFIGURE_ENV: ${CONFIGURE_ENV}") + # Other maybe interesting variables to control # COMPILE This is the command used to actually compile a C source file. The file name is appended to form the complete command line. # LINK This is the command used to actually link a C program. @@ -392,9 +394,7 @@ function(vcpkg_configure_make) string(REPLACE " " "\\\ " _VCPKG_PREFIX ${CURRENT_INSTALLED_DIR}) string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PREFIX "${_VCPKG_PREFIX}") set(_VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR}) - string(REPLACE " " "\ " _VCPKG_INSTALLED_PKGCONF ${CURRENT_INSTALLED_DIR}) - string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALLED_PKGCONF ${_VCPKG_INSTALLED_PKGCONF}) - string(REPLACE "\\" "/" _VCPKG_INSTALLED_PKGCONF ${_VCPKG_INSTALLED_PKGCONF}) + set(prefix_var "'\${prefix}'") # Windows needs extra quotes or else the variable gets expanded in the makefile! list(APPEND _csc_OPTIONS gl_cv_double_slash_root=yes @@ -489,10 +489,10 @@ function(vcpkg_configure_make) endif() vcpkg_find_acquire_program(PKGCONFIG) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND NOT PKGCONFIG STREQUAL "--static") set(PKGCONFIG "${PKGCONFIG} --static") endif() + # Run autoconf if necessary set(_GENERATED_CONFIGURE FALSE) if (_csc_AUTOCONFIG OR REQUIRES_AUTOCONFIG) @@ -615,9 +615,9 @@ function(vcpkg_configure_make) set(RELATIVE_BUILD_PATH .) endif() + # Setup PKG_CONFIG_PATH set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/lib/pkgconfig") set(PKGCONFIG_INSTALLED_SHARE_DIR "${CURRENT_INSTALLED_DIR}/share/pkgconfig") - if(ENV{PKG_CONFIG_PATH}) set(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype} $ENV{PKG_CONFIG_PATH}) set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}") @@ -652,9 +652,9 @@ function(vcpkg_configure_make) vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/bin") endif() debug_message("Configure command:'${command}'") - foreach(_envar IN LISTS printvars) - message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") - endforeach() + # foreach(_envar IN LISTS printvars) + # message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") + # endforeach() if (NOT _csc_SKIP_CONFIGURE) message(STATUS "Configuring ${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}}") vcpkg_execute_required_process( From 94513e51dc590de5d10dde35185f858d9afcb7e1 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 01:31:11 +0200 Subject: [PATCH 034/114] finally fontconfig --- ports/fontconfig/build2.patch | 2 +- ports/fontconfig/fcobjtypehash.patch | 18 ------------------ ports/fontconfig/portfile.cmake | 10 ---------- 3 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 ports/fontconfig/fcobjtypehash.patch diff --git a/ports/fontconfig/build2.patch b/ports/fontconfig/build2.patch index 061762e5cc9cf5..13bacf15d41883 100644 --- a/ports/fontconfig/build2.patch +++ b/ports/fontconfig/build2.patch @@ -7,7 +7,7 @@ index f0fa0ec50..24e5afd16 100644 $(TOOL): $(TSRC) $(ALIAS_FILES) - $(AM_V_GEN) $(CC_FOR_BUILD) -o $(TOOL) $< $(AM_CPPFLAGS) -+ $(AM_V_GEN) $(CC_FOR_BUILD) -o $(TOOL) $< $(AM_CPPFLAGS) $(LIBS) ++ $(AM_V_GEN) $(CC_FOR_BUILD) -o $(TOOL) $< $(AM_CPPFLAGS) $(LIBINTL) $(TARG): $(TMPL) $(TSRC) $(DEPS) $(AM_V_GEN) $(MAKE) $(TOOL) && \ diff --git a/ports/fontconfig/fcobjtypehash.patch b/ports/fontconfig/fcobjtypehash.patch deleted file mode 100644 index e0db68942c06c9..00000000000000 --- a/ports/fontconfig/fcobjtypehash.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/src/fcobjs.c b/src/fcobjs.c -index 33bba8d..e6b0808 100644 ---- a/src/fcobjs.c -+++ b/src/fcobjs.c -@@ -24,11 +24,13 @@ - - #include "fcint.h" - -+#if 0 - static unsigned int - FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len); - - static const struct FcObjectTypeInfo * - FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len); -+#endif - - #include "fcobjshash.h" - diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index 445ed2827b1ce4..f3afb909fc8731 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -16,9 +16,6 @@ vcpkg_find_acquire_program(GPERF) get_filename_component(GPERF_PATH ${GPERF} DIRECTORY) vcpkg_add_to_path(${GPERF_PATH}) -if(VCPKG_TARGET_IS_WINDOWS) - set(ENV{LIBS} "-lintl") -endif() vcpkg_configure_make( AUTOCONFIG COPY_SOURCE @@ -28,23 +25,16 @@ vcpkg_configure_make( ${OPTIONS} ac_cv_type_pid_t=yes --enable-iconv - #--enable-expat - "--with-expat=${CURRENT_INSTALLED_DIR}" - "--with-expat-includes=${CURRENT_INSTALLED_DIR}/include" "--with-libiconv=${CURRENT_INSTALLED_DIR}" "--with-libiconv-includes=${CURRENT_INSTALLED_DIR}/include" OPTIONS_DEBUG - "--with-expat-lib=${CURRENT_INSTALLED_DIR}/debug/lib" "--with-libiconv-lib=${CURRENT_INSTALLED_DIR}/debug/lib" ${OPT_DBG} OPTIONS_RELEASE - "--with-expat-lib=${CURRENT_INSTALLED_DIR}/lib" "--with-libiconv-lib=${CURRENT_INSTALLED_DIR}/lib" ${OPT_REL} ADD_BIN_TO_PATH ) - # [AC_HELP_STRING([--enable-libxml2], - # [Use libxml2 instead of Expat])]) vcpkg_install_make(ADD_BIN_TO_PATH) vcpkg_copy_pdbs() From 03b5d57e04ad740cfae86f79bb41fc413faef345 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 01:31:27 +0200 Subject: [PATCH 035/114] comment debug messages --- scripts/cmake/vcpkg_build_make.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index 0c112012099b46..c15e89036001ce 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -161,9 +161,9 @@ function(vcpkg_build_make) set(MAKE_CMD_LINE ${MAKE_COMMAND} ${INSTALL_OPTS}) endif() set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}") - foreach(_envar IN LISTS printvars) - message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") - endforeach() + # foreach(_envar IN LISTS printvars) + # message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") + # endforeach() vcpkg_execute_build_process( COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} WORKING_DIRECTORY "${WORKING_DIRECTORY}" From 7c6ed430853f5a094c95f55196515fb98e33ba7e Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 01:39:52 +0200 Subject: [PATCH 036/114] expat apply extra patches. --- ports/expat/395.diff | 33 +++++++++ ports/expat/398.diff | 13 ++++ ports/expat/408.diff | 147 +++++++++++++++++++++++++++++++++++++ ports/expat/412.diff | 36 +++++++++ ports/expat/portfile.cmake | 4 + 5 files changed, 233 insertions(+) create mode 100644 ports/expat/395.diff create mode 100644 ports/expat/398.diff create mode 100644 ports/expat/408.diff create mode 100644 ports/expat/412.diff diff --git a/ports/expat/395.diff b/ports/expat/395.diff new file mode 100644 index 00000000000000..63f82c0227c5d1 --- /dev/null +++ b/ports/expat/395.diff @@ -0,0 +1,33 @@ +diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c +index 8b8c6f07..638ea528 100644 +--- a/expat/lib/xmlparse.c ++++ b/expat/lib/xmlparse.c +@@ -48,6 +48,17 @@ + #include /* fprintf */ + #include /* getenv, rand_s */ + ++#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1600) ++/* vs2008/9.0 and earlier lack stdint.h; _MSC_VER 1600 is vs2010/10.0 */ ++# if defined(_WIN64) ++typedef unsigned __int64 uintptr_t; ++# else ++typedef unsigned __int32 uintptr_t; ++# endif ++#else ++# include /* uintptr_t */ ++#endif ++ + #ifdef _WIN32 + # define getpid GetCurrentProcessId + #else +@@ -121,9 +132,7 @@ + # define XmlGetInternalEncoding XmlGetUtf16InternalEncoding + # define XmlGetInternalEncodingNS XmlGetUtf16InternalEncodingNS + # define XmlEncode XmlUtf16Encode +-/* Using pointer subtraction to convert to integer type. */ +-# define MUST_CONVERT(enc, s) \ +- (! (enc)->isUtf16 || (((char *)(s) - (char *)NULL) & 1)) ++# define MUST_CONVERT(enc, s) (! (enc)->isUtf16 || (((uintptr_t)(s)) & 1)) + typedef unsigned short ICHAR; + #else + # define XML_ENCODE_MAX XML_UTF8_ENCODE_MAX diff --git a/ports/expat/398.diff b/ports/expat/398.diff new file mode 100644 index 00000000000000..8cd124e4acf068 --- /dev/null +++ b/ports/expat/398.diff @@ -0,0 +1,13 @@ +diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c +index 638ea528..849411ce 100644 +--- a/expat/lib/xmlparse.c ++++ b/expat/lib/xmlparse.c +@@ -6506,7 +6506,7 @@ hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) { + static void FASTCALL + hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) { + iter->p = table->v; +- iter->end = iter->p + table->size; ++ iter->end = iter->p ? iter->p + table->size : NULL; + } + + static NAMED *FASTCALL diff --git a/ports/expat/408.diff b/ports/expat/408.diff new file mode 100644 index 00000000000000..7834f3f0c2dab5 --- /dev/null +++ b/ports/expat/408.diff @@ -0,0 +1,147 @@ +diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt +index 32a9732f..b43dffa2 100644 +--- a/expat/CMakeLists.txt ++++ b/expat/CMakeLists.txt +@@ -279,22 +279,18 @@ endif(EXPAT_SHARED_LIBS) + + # Avoid colliding with Expat.dll of Perl's XML::Parser::Expat + if(WIN32 AND NOT MINGW) +- set(EXPAT_TARGET libexpat) # CMAKE_*_POSTFIX applies, see above ++ set(_EXPAT_OUTPUT_NAME libexpat) # CMAKE_*_POSTFIX applies, see above + else() + if(_EXPAT_UNICODE) +- set(EXPAT_TARGET expatw) ++ set(_EXPAT_OUTPUT_NAME expatw) + else() +- set(EXPAT_TARGET expat) ++ set(_EXPAT_OUTPUT_NAME expat) + endif() + endif() + +-if(_EXPAT_PARENT_DIRECTORY) +- set(EXPAT_TARGET "${EXPAT_TARGET}" PARENT_SCOPE) +-endif() +- +-add_library(${EXPAT_TARGET} ${_SHARED} ${expat_SRCS}) ++add_library(expat ${_SHARED} ${expat_SRCS}) + if(EXPAT_WITH_LIBBSD) +- target_link_libraries(${EXPAT_TARGET} ${LIB_BSD}) ++ target_link_libraries(expat ${LIB_BSD}) + endif() + + set(LIBCURRENT 7) # sync +@@ -302,13 +298,14 @@ set(LIBREVISION 11) # with + set(LIBAGE 6) # configure.ac! + math(EXPR LIBCURRENT_MINUS_AGE "${LIBCURRENT} - ${LIBAGE}") + ++set_property(TARGET expat PROPERTY OUTPUT_NAME "${_EXPAT_OUTPUT_NAME}") + if(NOT WIN32) +- set_property(TARGET ${EXPAT_TARGET} PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION}) +- set_property(TARGET ${EXPAT_TARGET} PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE}) +- set_property(TARGET ${EXPAT_TARGET} PROPERTY NO_SONAME ${NO_SONAME}) ++ set_property(TARGET expat PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION}) ++ set_property(TARGET expat PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE}) ++ set_property(TARGET expat PROPERTY NO_SONAME ${NO_SONAME}) + endif(NOT WIN32) + +-target_include_directories(${EXPAT_TARGET} ++target_include_directories(expat + INTERFACE + $ + $ +@@ -316,10 +313,10 @@ target_include_directories(${EXPAT_TARGET} + ) + + if(NOT EXPAT_SHARED_LIBS AND WIN32) +- target_compile_definitions(${EXPAT_TARGET} PUBLIC -DXML_STATIC) ++ target_compile_definitions(expat PUBLIC -DXML_STATIC) + endif() + +-expat_install(TARGETS ${EXPAT_TARGET} EXPORT expat ++expat_install(TARGETS expat EXPORT expat + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +@@ -334,8 +331,8 @@ if(NOT MSVC) + set(exec_prefix "\${prefix}") + set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") + set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +- configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${EXPAT_TARGET}.pc @ONLY) +- expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${EXPAT_TARGET}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++ configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc @ONLY) ++ expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + endif() + + # +@@ -351,7 +348,7 @@ if(EXPAT_BUILD_TOOLS) + + add_executable(xmlwf ${xmlwf_SRCS}) + set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf) +- target_link_libraries(xmlwf ${EXPAT_TARGET}) ++ target_link_libraries(xmlwf expat) + expat_install(TARGETS xmlwf DESTINATION ${CMAKE_INSTALL_BINDIR}) + + if(MINGW AND _EXPAT_UNICODE_WCHAR_T) +@@ -367,7 +364,7 @@ if(EXPAT_BUILD_TOOLS) + "${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_BINARY_DIR}/doc/xmlwf.1" + BYPRODUCTS + doc/xmlwf.1) +- add_dependencies(${EXPAT_TARGET} xmlwf-manpage) ++ add_dependencies(expat xmlwf-manpage) + expat_install(FILES "${PROJECT_BINARY_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) + elseif(EXISTS ${PROJECT_SOURCE_DIR}/doc/xmlwf.1) + expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) +@@ -380,11 +377,11 @@ endif() + if(EXPAT_BUILD_EXAMPLES) + add_executable(elements examples/elements.c) + set_property(TARGET elements PROPERTY RUNTIME_OUTPUT_DIRECTORY examples) +- target_link_libraries(elements ${EXPAT_TARGET}) ++ target_link_libraries(elements expat) + + add_executable(outline examples/outline.c) + set_property(TARGET outline PROPERTY RUNTIME_OUTPUT_DIRECTORY examples) +- target_link_libraries(outline ${EXPAT_TARGET}) ++ target_link_libraries(outline expat) + endif(EXPAT_BUILD_EXAMPLES) + + # +@@ -419,12 +416,12 @@ if(EXPAT_BUILD_TESTS) + + add_executable(runtests tests/runtests.c ${test_SRCS}) + set_property(TARGET runtests PROPERTY RUNTIME_OUTPUT_DIRECTORY tests) +- target_link_libraries(runtests ${EXPAT_TARGET}) ++ target_link_libraries(runtests expat) + expat_add_test(runtests $) + + add_executable(runtestspp tests/runtestspp.cpp ${test_SRCS}) + set_property(TARGET runtestspp PROPERTY RUNTIME_OUTPUT_DIRECTORY tests) +- target_link_libraries(runtestspp ${EXPAT_TARGET}) ++ target_link_libraries(runtestspp expat) + expat_add_test(runtestspp $) + endif(EXPAT_BUILD_TESTS) + +@@ -569,7 +566,7 @@ write_basic_package_version_file( + ) + export( + TARGETS +- ${EXPAT_TARGET} ++ expat + FILE + cmake/expat-targets.cmake # not going to be installed + ) +diff --git a/expat/expat.pc.in b/expat/expat.pc.in +index a89cdd82..bdfa47f8 100644 +--- a/expat/expat.pc.in ++++ b/expat/expat.pc.in +@@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@ + libdir=@libdir@ + includedir=@includedir@ + +-Name: @EXPAT_TARGET@ ++Name: @_EXPAT_OUTPUT_NAME@ + Version: @PACKAGE_VERSION@ + Description: expat XML parser + URL: http://www.libexpat.org +-Libs: -L${libdir} -l@EXPAT_TARGET@ ++Libs: -L${libdir} -l@_EXPAT_OUTPUT_NAME@ + Cflags: -I${includedir} diff --git a/ports/expat/412.diff b/ports/expat/412.diff new file mode 100644 index 00000000000000..dc6e8262fde591 --- /dev/null +++ b/ports/expat/412.diff @@ -0,0 +1,36 @@ +diff --git a/expat/lib/xmltok_impl.c b/expat/lib/xmltok_impl.c +index c209221c..06d5c908 100644 +--- a/expat/lib/xmltok_impl.c ++++ b/expat/lib/xmltok_impl.c +@@ -1768,13 +1768,14 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, + # define LEAD_CASE(n) \ + case BT_LEAD##n: \ + ptr += n; \ ++ pos->columnNumber++; \ + break; + LEAD_CASE(2) + LEAD_CASE(3) + LEAD_CASE(4) + # undef LEAD_CASE + case BT_LF: +- pos->columnNumber = (XML_Size)-1; ++ pos->columnNumber = 0; + pos->lineNumber++; + ptr += MINBPC(enc); + break; +@@ -1783,13 +1784,13 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, + ptr += MINBPC(enc); + if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF) + ptr += MINBPC(enc); +- pos->columnNumber = (XML_Size)-1; ++ pos->columnNumber = 0; + break; + default: + ptr += MINBPC(enc); ++ pos->columnNumber++; + break; + } +- pos->columnNumber++; + } + } + diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index 1de5705eeed826..8c97df2d74a539 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -5,6 +5,10 @@ vcpkg_from_github( SHA512 18842d5c9ff89654c5beeb9daba7ff5a911da318d419735fb14a5acbe0d1b4ac07077822c70cfa5c845892bcec2d72f8f265b9a259fe459092864f4d1754f8dd HEAD_REF master PATCHES + 395.diff + 398.diff + #408.diff + 412.diff fix-find-package-by-cmake.patch pkgconfig.patch ) From baaaca53cb3f1e2a26315d13aca86e4b71bf4742 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Thu, 20 Aug 2020 07:28:52 +0200 Subject: [PATCH 037/114] Switch back to -E instead of -EP in cpp --- scripts/cmake/vcpkg_configure_make.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index b1c854bf3d123a..d214c761edd15f 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -330,7 +330,8 @@ function(vcpkg_configure_make) endif() endforeach() if (_csc_AUTOCONFIG OR _csc_USE_WRAPPERS) # without autotools we assume a custom configure script which correctly handles cl and lib. Otherwise the port needs to set CC|CXX|AR and probably CPP - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile ${VCPKG_DETECTED_C_COMPILER} -EP") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile ${VCPKG_DETECTED_C_COMPILER} -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "compile ${VCPKG_DETECTED_C_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC_FOR_BUILD "compile ${VCPKG_DETECTED_C_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "compile ${VCPKG_DETECTED_CXX_COMPILER}") @@ -342,7 +343,8 @@ function(vcpkg_configure_make) _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "ar-lib lib.exe -verbose") endif() else() - _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "${VCPKG_DETECTED_C_COMPILER} -EP") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "${VCPKG_DETECTED_C_COMPILER} -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "${VCPKG_DETECTED_C_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC_FOR_BUILD "${VCPKG_DETECTED_C_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "${VCPKG_DETECTED_CXX_COMPILER}") From eb2ef40f2e84c960460faa3b02a3ccc478c2731d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 10:47:41 +0200 Subject: [PATCH 038/114] commit changes from fontconfig PR --- scripts/buildsystems/make_wrapper/windres-rc | 130 +++++++++++ scripts/cmake/vcpkg_build_make.cmake | 91 ++++---- scripts/cmake/vcpkg_configure_make.cmake | 220 +++++++++++-------- 3 files changed, 313 insertions(+), 128 deletions(-) create mode 100644 scripts/buildsystems/make_wrapper/windres-rc diff --git a/scripts/buildsystems/make_wrapper/windres-rc b/scripts/buildsystems/make_wrapper/windres-rc new file mode 100644 index 00000000000000..88cc8425f72b7a --- /dev/null +++ b/scripts/buildsystems/make_wrapper/windres-rc @@ -0,0 +1,130 @@ +#! /bin/sh +# Wrapper for windres to rc which do not understand '-i -o --output-format'. +# cvtres is invoked by the linker +scriptversion=2020-08-17.03; # UTC + + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN* | MSYS*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/* | msys/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_windres_wrapper rc args... +# Adjust compile command to suit rc instead of windres +func_windres_wrapper () +{ + echo "FROM WINDRESWRAPPER FUNCTION:$@" + echo "RCFLAGS:$(RCFLAGS)" + # Assume a capable shell + in= + out= + + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + eat=1 + func_file_conv "$2" + out="$file" + echo "OUTPUT:$file" + set x "$@" + shift + ;; + *.obj) + func_file_conv "$1" + out="$file" + echo "OUTPUT:$file" + set x "$@" + shift + ;; + --output-format=*) + set x "$@" + shift + ;; + -i) + eat=1 + func_file_conv "$2" mingw + in="$file" + echo "INPUT:$file" + set x "$@" + shift + ;; + -*) + set x "$@" "${1//\\\"/\"}" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + echo "$@" -fo "$out" "$in" + exec "$@" -fo "$out" "$in" + exit 1 +} + +eat= + +func_windres_wrapper "$@" + + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index 1bd391ada50577..29b5191af0d285 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -24,6 +24,9 @@ ## The target passed to the make build command (`./make `). If not specified, the 'all' target will ## be passed. ## +## ### DISABLE_PARALLEL +## The underlying buildsystem will be instructed to not parallelize +## ## ## Notes: ## This command should be preceeded by a call to [`vcpkg_configure_make()`](vcpkg_configure_make.md). ## You can use the alias [`vcpkg_install_make()`](vcpkg_configure_make.md) function if your CMake script supports the @@ -36,8 +39,8 @@ ## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) ## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) function(vcpkg_build_make) - cmake_parse_arguments(_bc "ADD_BIN_TO_PATH;ENABLE_INSTALL" "LOGFILE_ROOT;BUILD_TARGET" "" ${ARGN}) include("${CMAKE_VARS_FILE}") + cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET" "") if(NOT _bc_LOGFILE_ROOT) set(_bc_LOGFILE_ROOT "build") @@ -65,6 +68,7 @@ function(vcpkg_build_make) find_program(MAKE make REQUIRED) set(MAKE_COMMAND "${MAKE}") set(MAKE_OPTS ${_bc_MAKE_OPTIONS} -j ${VCPKG_CONCURRENCY} --trace -f Makefile ${_bc_BUILD_TARGET}) + set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} -j 1 --trace -f Makefile ${_bc_BUILD_TARGET}) string(REPLACE " " "\\\ " _VCPKG_PACKAGE_PREFIX ${CURRENT_PACKAGES_DIR}) string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PACKAGE_PREFIX "${_VCPKG_PACKAGE_PREFIX}") @@ -76,6 +80,7 @@ function(vcpkg_build_make) set(MAKE_COMMAND "${MAKE}") # Set make command and install command set(MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j ${VCPKG_CONCURRENCY} -f Makefile ${_bc_BUILD_TARGET}) + set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j 1 -f Makefile ${_bc_BUILD_TARGET}) set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} install DESTDIR=${CURRENT_PACKAGES_DIR}) endif() @@ -104,29 +109,35 @@ function(vcpkg_build_make) endif() set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}") - message(STATUS "Building ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + extract_cpp_flags_and_set_cflags_and_cxxflags(${CMAKE_BUILDTYPE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(LINKER_FLAGS_${CMAKE_BUILDTYPE} "${VCPKG_DETECTED_STATIC_LINKERFLAGS_${CMAKE_BUILDTYPE}}") else() # dynamic set(LINKER_FLAGS_${CMAKE_BUILDTYPE} "${VCPKG_DETECTED_SHARED_LINKERFLAGS_${CMAKE_BUILDTYPE}}") endif() if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe") - set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/") + set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link") set(LINK_ENV_${CMAKE_BUILDTYPE} "$ENV{_LINK_} ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}") else() - set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/ ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}") + set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}") endif() - + + # Setup environment + set(ENV{CPPFLAGS} "${CPPFLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{CFLAGS} "${CFLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{CXXFLAGS} "${CXXFLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{RCFLAGS} "${VCPKG_DETECTED_COMBINED_RCFLAGS_${CMAKE_BUILDTYPE}}") + set(ENV{LDFLAGS} "${LDFLAGS_${CMAKE_BUILDTYPE}}") set(ENV{LIB} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIB_PATHLIKE_CONCAT}") set(ENV{LIBPATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIBPATH_PATHLIKE_CONCAT}") set(ENV{LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIBRARY_PATH_PATHLIKE_CONCAT}") #set(ENV{LD_LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX_${BUILDTYPE}}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX_${BUILDTYPE}}/lib/manual-link/${LD_LIBRARY_PATH_PATHLIKE_CONCAT}") if(LINK_ENV_${_VAR_SUFFIX}) - _vcpkg_backup_env_variables(_LINK_) - set(ENV{_LINK_} "$ENV{_LINK_} ${LINK_ENV_${_VAR_SUFFIX}}") + set(_LINK_CONFIG_BACKUP "$ENV{_LINK_}") + set(ENV{_LINK_} "${LINK_ENV_${_VAR_SUFFIX}}") endif() if(_bc_ADD_BIN_TO_PATH) @@ -136,56 +147,60 @@ function(vcpkg_build_make) if(MAKE_BASH) set(MAKE_CMD_LINE "${MAKE_COMMAND} ${MAKE_OPTS}") + set(NO_PARALLEL_MAKE_CMD_LINE "${MAKE_COMMAND} ${NO_PARALLEL_MAKE_OPTS}") else() set(MAKE_CMD_LINE ${MAKE_COMMAND} ${MAKE_OPTS}) + set(NO_PARALLEL_MAKE_CMD_LINE ${MAKE_COMMAND} ${NO_PARALLEL_MAKE_OPTS}) endif() - vcpkg_execute_build_process( - COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} - WORKING_DIRECTORY "${WORKING_DIRECTORY}" - LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" + + # foreach(_envar IN LISTS printvars) + # message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") + # endforeach() + + if (_bc_DISABLE_PARALLEL) + vcpkg_execute_build_process( + COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} + WORKING_DIRECTORY "${WORKING_DIRECTORY}" + LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" + ) + else() + vcpkg_execute_build_process( + COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} + NO_PARALLEL_COMMAND ${MAKE_BASH} ${NO_PARALLEL_MAKE_CMD_LINE} + WORKING_DIRECTORY "${WORKING_DIRECTORY}" + LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" ) - _vcpkg_restore_env_variables(_LINK_) - if(_bc_ADD_BIN_TO_PATH) - set(ENV{PATH} "${_BACKUP_ENV_PATH}") endif() - endif() - endforeach() - - if (_bc_ENABLE_INSTALL) - foreach(BUILDTYPE "debug" "release") - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) - if(BUILDTYPE STREQUAL "debug") - # Skip debug generate - if (_VCPKG_NO_DEBUG) - continue() - endif() - set(SHORT_BUILDTYPE "-dbg") - else() - # In NO_DEBUG mode, we only use ${TARGET_TRIPLET} directory. - if (_VCPKG_NO_DEBUG) - set(SHORT_BUILDTYPE "") - else() - set(SHORT_BUILDTYPE "-rel") - endif() - endif() + if (_bc_ENABLE_INSTALL) message(STATUS "Installing ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") - if(MAKE_BASH) set(MAKE_CMD_LINE "${MAKE_COMMAND} ${INSTALL_OPTS}") else() set(MAKE_CMD_LINE ${MAKE_COMMAND} ${INSTALL_OPTS}) endif() - - set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + # foreach(_envar IN LISTS printvars) + # message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") + # endforeach() vcpkg_execute_build_process( COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} WORKING_DIRECTORY "${WORKING_DIRECTORY}" LOGNAME "install-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" ) + endif() + + if(_LINK_CONFIG_BACKUP) + set(ENV{_LINK_} "${_LINK_CONFIG_BACKUP}") + unset(_LINK_CONFIG_BACKUP) + endif() + if(_bc_ADD_BIN_TO_PATH) + set(ENV{PATH} "${_BACKUP_ENV_PATH}") endif() - endforeach() + endif() + endforeach() + + if (_bc_ENABLE_INSTALL) string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALL_PREFIX "${CURRENT_INSTALLED_DIR}") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}_tmp") file(RENAME "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}_tmp") diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index f6728cbbfce378..d214c761edd15f 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -6,7 +6,9 @@ ## ```cmake ## vcpkg_configure_make( ## SOURCE_PATH <${SOURCE_PATH}> -## [AUTOCONFIG] +## [AUTOCONFIG] +## [USE_WRAPPERS] +## [DETERMINE_BUILD_TRIPLET] ## [BUILD_TRIPLET "--host=x64 --build=i686-unknown-pc"] ## [NO_ADDITIONAL_PATHS] ## [CONFIG_DEPENDENT_ENVIRONMENT ...] @@ -34,9 +36,15 @@ ## ### SKIP_CONFIGURE ## Skip configure process ## +## ### USE_WRAPPERS +## Use autotools ar-lib and compile wrappers (only applies to windows cl and lib) +## ## ### BUILD_TRIPLET ## Used to pass custom --build/--target/--host to configure. Can be globally overwritten by VCPKG_MAKE_BUILD_TRIPLET ## +## ### DETERMINE_BUILD_TRIPLET +## For ports having a configure script following the autotools rules +## ## ### NO_ADDITIONAL_PATHS ## Don't pass any additional paths except for --prefix to the configure call ## @@ -78,6 +86,8 @@ ## * [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) ## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) ## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) +set(printvars PATH _LINK_ _CL_ CPPFLAGS CFLAGS CXXFLAGS LDFLAGS LIBS INCLUDE LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) + macro(_vcpkg_determine_host_mingw out_var) if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) set(HOST_ARCH $ENV{PROCESSOR_ARCHITEW6432}) @@ -158,9 +168,44 @@ macro(_vcpkg_restore_env_variables) endforeach() endmacro() +macro(extract_cpp_flags_and_set_cflags_and_cxxflags _SUFFIX) + string(REGEX MATCHALL "( |^)-D[^ ]+" CPPFLAGS_${_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_SUFFIX}}") + string(REGEX MATCHALL "( |^)-D[^ ]+" CXXPPFLAGS_${_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_SUFFIX}}") + list(JOIN CXXPPFLAGS_${_SUFFIX} "|" CXXREGEX) + if(CXXREGEX) + list(FILTER CPPFLAGS_${_SUFFIX} INCLUDE REGEX "(${CXXREGEX})") + else() + set(CPPFLAGS_${_SUFFIX}) + endif() + list(JOIN CPPFLAGS_${_SUFFIX} "|" CPPREGEX) + list(JOIN CPPFLAGS_${_SUFFIX} " " CPPFLAGS_${_SUFFIX}) + set(CPPFLAGS_${_SUFFIX} "${CPPFLAGS_${_SUFFIX}}") + if(CPPREGEX) + string(REGEX REPLACE "(${CPPREGEX})" "" CFLAGS_${_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_SUFFIX}}") + string(REGEX REPLACE "(${CPPREGEX})" "" CXXFLAGS_${_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_SUFFIX}}") + else() + set(CFLAGS_${_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_SUFFIX}}") + set(CXXFLAGS_${_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_SUFFIX}}") + endif() + string(REGEX REPLACE " +" " " CPPFLAGS_${_SUFFIX} "${CPPFLAGS_${_SUFFIX}}") + string(REGEX REPLACE " +" " " CFLAGS_${_SUFFIX} "${CFLAGS_${_SUFFIX}}") + string(REGEX REPLACE " +" " " CXXFLAGS_${_SUFFIX} "${CXXFLAGS_${_SUFFIX}}") + # libtool has and -R option so we need to guard against -RTC by using -Xcompiler + # while configuring there might be a lot of unknown compiler option warnings due to that + # just ignore them. + string(REGEX REPLACE "((-|/)RTC[^ ]+)" "-Xcompiler \\1" CFLAGS_${_SUFFIX} "${CFLAGS_${_SUFFIX}}") + string(REGEX REPLACE "((-|/)RTC[^ ]+)" "-Xcompiler \\1" CXXFLAGS_${_SUFFIX} "${CXXFLAGS_${_SUFFIX}}") + string(STRIP "${CPPFLAGS_${_SUFFIX}}" CPPFLAGS_${_SUFFIX}) + string(STRIP "${CFLAGS_${_SUFFIX}}" CFLAGS_${_SUFFIX}) + string(STRIP "${CXXFLAGS_${_SUFFIX}}" CXXFLAGS_${_SUFFIX}) + debug_message("CPPFLAGS_${_SUFFIX}: ${CPPFLAGS_${_SUFFIX}}") + debug_message("CFLAGS_${_SUFFIX}: ${CFLAGS_${_SUFFIX}}") + debug_message("CXXFLAGS_${_SUFFIX}: ${CXXFLAGS_${_SUFFIX}}") +endmacro() + function(vcpkg_configure_make) cmake_parse_arguments(_csc - "AUTOCONFIG;SKIP_CONFIGURE;COPY_SOURCE;DISABLE_VERBOSE_FLAGS;NO_ADDITIONAL_PATHS;ADD_BIN_TO_PATH" + "AUTOCONFIG;SKIP_CONFIGURE;COPY_SOURCE;DISABLE_VERBOSE_FLAGS;NO_ADDITIONAL_PATHS;ADD_BIN_TO_PATH;USE_WRAPPERS;DETERMINE_BUILD_TRIPLET" "SOURCE_PATH;PROJECT_SUBPATH;PRERUN_SHELL;BUILD_TRIPLET" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;CONFIGURE_ENVIRONMENT_VARIABLES;CONFIG_DEPENDENT_ENVIRONMENT" ${ARGN} @@ -169,10 +214,6 @@ function(vcpkg_configure_make) set(CMAKE_VARS_FILE "${CMAKE_VARS_FILE}" PARENT_SCOPE) debug_message("Including cmake vars from: ${CMAKE_VARS_FILE}") include("${CMAKE_VARS_FILE}") - if(VCPKG_TARGET_IS_WINDOWS) - - endif() - if(DEFINED VCPKG_MAKE_BUILD_TRIPLET) set(_csc_BUILD_TRIPLET ${VCPKG_MAKE_BUILD_TRIPLET}) # Triplet overwrite for crosscompiling endif() @@ -201,7 +242,7 @@ function(vcpkg_configure_make) debug_message("REQUIRES_AUTOCONFIG:${REQUIRES_AUTOCONFIG}") # Backup environment variables # CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJCXX R UPC Y - set(FLAGPREFIXES CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJXX R UPC Y) + set(FLAGPREFIXES CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJXX R UPC Y RC) foreach(_prefix IN LISTS FLAGPREFIXES) _vcpkg_backup_env_variable(${prefix}FLAGS) endforeach() @@ -217,15 +258,12 @@ function(vcpkg_configure_make) _vcpkg_backup_env_variables(INCLUDE LIB LIBPATH) if(CURRENT_PACKAGES_DIR MATCHES " " OR CURRENT_INSTALLED_DIR MATCHES " ") - # Don't bother with whitespace. The tools will probably fail and I tried very hard trying to make it work (no success so far)! message(WARNING "Detected whitespace in root directory. Please move the path to one without whitespaces! The required tools do not handle whitespaces correctly and the build will most likely fail") endif() # Pre-processing windows configure requirements if (CMAKE_HOST_WIN32) - _vcpkg_determine_autotools_host_cpu(BUILD_ARCH) # VCPKG_HOST => machine you are building on => --build= - list(APPEND MSYS_REQUIRE_PACKAGES diffutils pkg-config binutils @@ -234,34 +272,36 @@ function(vcpkg_configure_make) gettext-devel ) list(APPEND MSYS_REQUIRE_PACKAGES make) - if (_csc_AUTOCONFIG) + if (_csc_AUTOCONFIG OR _csc_USE_WRAPPERS) list(APPEND MSYS_REQUIRE_PACKAGES autoconf autoconf-archive automake m4 ) + endif() + if(_csc_AUTOCONFIG AND NOT _csc_BUILD_TRIPLET OR _csc_DETERMINE_BUILD_TRIPLET) + _vcpkg_determine_autotools_host_cpu(BUILD_ARCH) # VCPKG_HOST => machine you are building on => --build= + _vcpkg_determine_autotools_target_cpu(TARGET_ARCH) # --build: the machine you are building on # --host: the machine you are building for # --target: the machine that CC will produce binaries for # https://stackoverflow.com/questions/21990021/how-to-determine-host-value-for-configure-when-using-cross-compiler # Only for ports using autotools so we can assume that they follow the common conventions for build/target/host - if(NOT _csc_BUILD_TRIPLET) - set(_csc_BUILD_TRIPLET "--build=${BUILD_ARCH}-pc-mingw32") # This is required since we are running in a msys - # shell which will be otherwise identified as ${BUILD_ARCH}-pc-msys - _vcpkg_determine_autotools_target_cpu(TARGET_ARCH) - if(NOT TARGET_ARCH MATCHES "${BUILD_ARCH}") # we do not need to specify the additional flags if we build nativly. - string(APPEND _csc_BUILD_TRIPLET " --host=${TARGET_ARCH}-pc-mingw32") # (Host activates crosscompilation; The name given here is just the prefix of the host tools for the target) - endif() - if(VCPKG_TARGET_IS_UWP AND NOT _csc_BUILD_TRIPLET MATCHES "--host") - # Needs to be different from --build to enable cross builds. - string(APPEND _csc_BUILD_TRIPLET " --host=${TARGET_ARCH}-unknown-mingw32") - endif() + set(_csc_BUILD_TRIPLET "--build=${BUILD_ARCH}-pc-mingw32") # This is required since we are running in a msys + # shell which will be otherwise identified as ${BUILD_ARCH}-pc-msys + if(NOT TARGET_ARCH MATCHES "${BUILD_ARCH}") # we do not need to specify the additional flags if we build nativly. + string(APPEND _csc_BUILD_TRIPLET " --host=${TARGET_ARCH}-pc-mingw32") # (Host activates crosscompilation; The name given here is just the prefix of the host tools for the target) + endif() + if(VCPKG_TARGET_IS_UWP AND NOT _csc_BUILD_TRIPLET MATCHES "--host") + # Needs to be different from --build to enable cross builds. + string(APPEND _csc_BUILD_TRIPLET " --host=${TARGET_ARCH}-unknown-mingw32") endif() - debug_message("Using make triplet: ${_csc_BUILD_TRIPLET}") endif() + debug_message("Using make triplet: ${_csc_BUILD_TRIPLET}") vcpkg_acquire_msys(MSYS_ROOT PACKAGES ${MSYS_REQUIRE_PACKAGES}) vcpkg_add_to_path("${MSYS_ROOT}/usr/bin") + set(BASH "${MSYS_ROOT}/usr/bin/bash.exe") # This is required because PATH contains sort and find from Windows but the MSYS versions are needed @@ -289,10 +329,14 @@ function(vcpkg_configure_make) get_filename_component(${prog} "${${prog}}" NAME) endif() endforeach() - if (_csc_AUTOCONFIG) # without autotools we assume a custom configure script which correctly handles cl and lib. Otherwise the port needs to set CC|CXX|AR and probably CPP + if (_csc_AUTOCONFIG OR _csc_USE_WRAPPERS) # without autotools we assume a custom configure script which correctly handles cl and lib. Otherwise the port needs to set CC|CXX|AR and probably CPP _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile ${VCPKG_DETECTED_C_COMPILER} -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "compile ${VCPKG_DETECTED_C_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC_FOR_BUILD "compile ${VCPKG_DETECTED_C_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "compile ${VCPKG_DETECTED_CXX_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV RC "windres-rc ${VCPKG_DETECTED_RC_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV WINDRES "windres-rc ${VCPKG_DETECTED_RC_COMPILER}") if(VCPKG_DETECTED_AR) _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "${VCPKG_DETECTED_AR}") else() @@ -300,7 +344,9 @@ function(vcpkg_configure_make) endif() else() _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "${VCPKG_DETECTED_C_COMPILER} -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "${VCPKG_DETECTED_C_COMPILER}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC_FOR_BUILD "${VCPKG_DETECTED_C_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "${VCPKG_DETECTED_CXX_COMPILER}") if(VCPKG_DETECTED_AR) _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "${VCPKG_DETECTED_AR}") @@ -335,9 +381,11 @@ function(vcpkg_configure_make) _vcpkg_append_to_configure_environment(CONFIGURE_ENV DLLTOOL "link.exe -verbose -dll") endif() _vcpkg_append_to_configure_environment(CONFIGURE_ENV CCAS ":") # If required set the ENV variable CCAS in the portfile correctly + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AS ":") # If required set the ENV variable CCAS in the portfile correctly foreach(_env IN LISTS _csc_CONFIGURE_ENVIRONMENT_VARIABLES) _vcpkg_append_to_configure_environment(CONFIGURE_ENV ${_env} "${${_env}}") endforeach() + # Other maybe interesting variables to control # COMPILE This is the command used to actually compile a C source file. The file name is appended to form the complete command line. # LINK This is the command used to actually link a C program. @@ -348,10 +396,11 @@ function(vcpkg_configure_make) string(REPLACE " " "\\\ " _VCPKG_PREFIX ${CURRENT_INSTALLED_DIR}) string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PREFIX "${_VCPKG_PREFIX}") set(_VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR}) - string(REPLACE " " "\ " _VCPKG_INSTALLED_PKGCONF ${CURRENT_INSTALLED_DIR}) - string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALLED_PKGCONF ${_VCPKG_INSTALLED_PKGCONF}) - string(REPLACE "\\" "/" _VCPKG_INSTALLED_PKGCONF ${_VCPKG_INSTALLED_PKGCONF}) + set(prefix_var "'\${prefix}'") # Windows needs extra quotes or else the variable gets expanded in the makefile! + + list(APPEND _csc_OPTIONS gl_cv_double_slash_root=yes + ac_cv_func_memmove=yes) else() string(REPLACE " " "\ " _VCPKG_PREFIX ${CURRENT_INSTALLED_DIR}) string(REPLACE " " "\ " _VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR}) @@ -418,7 +467,6 @@ function(vcpkg_configure_make) if(VCPKG_TARGET_IS_WINDOWS) _vcpkg_backup_env_variables(_CL_ _LINK_) # TODO: Should be CPP flags instead -> rewrite when vcpkg_determined_cmake_compiler_flags defined - #string(APPEND CPP_FLAGS_GLOBAL " /D_WIN32_WINNT=0x0601 /DWIN32_LEAN_AND_MEAN /DWIN32 /D_WINDOWS") if(VCPKG_TARGET_IS_UWP) # Be aware that configure thinks it is crosscompiling due to: # error while loading shared libraries: VCRUNTIME140D_APP.dll: @@ -427,27 +475,26 @@ function(vcpkg_configure_make) # is to use the CL and LINK environment variables !!! # (This is due to libtool and compiler wrapper using the same set of options to pass those variables around) string(REPLACE "\\" "/" VCToolsInstallDir "$ENV{VCToolsInstallDir}") - set(ENV{_CL_} "$ENV{_CL_} /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") - set(ENV{_LINK_} "$ENV{_LINK_} /MANIFEST /DYNAMICBASE /WINMD:NO /APPCONTAINER") + # Can somebody please check if CMake's compiler flags for UWP are correct? + #set(ENV{_CL_} "$ENV{_CL_} /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") + #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_RELEASE " -ZW:nostdlib") + #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_DEBUG " -ZW:nostdlib") + #set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO ") + set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /APPCONTAINER") endif() - set(ENV{_LINK_} "${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") - else() - set(ENV{LIBS} "$ENV{LIBS} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") endif() - - if(NOT ENV{PKG_CONFIG}) - find_program(PKGCONFIG pkg-config PATHS "${MSYS_ROOT}/usr/bin" REQUIRED) - debug_message("Using pkg-config from: ${PKGCONFIG}") - if(NOT PKGCONFIG) - message(STATUS "${PORT} requires pkg-config from the system package manager (example: \"sudo apt-get install pkg-config\")") - endif() + + if(DEFINED ENV{LIBS}) + set(ENV{LIBS} "$ENV{LIBS} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") else() - debug_message("ENV{PKG_CONFIG} found! Using: $ENV{PKG_CONFIG}") - set(PKGCONFIG $ENV{PKG_CONFIG}) + set(ENV{LIBS} "${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") endif() + + vcpkg_find_acquire_program(PKGCONFIG) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND NOT PKGCONFIG STREQUAL "--static") set(PKGCONFIG "${PKGCONFIG} --static") endif() + # Run autoconf if necessary set(_GENERATED_CONFIGURE FALSE) if (_csc_AUTOCONFIG OR REQUIRES_AUTOCONFIG) @@ -506,30 +553,6 @@ function(vcpkg_configure_make) ) endif() - macro(extract_cpp_flags_and_set_cflags_and_cxxflags) - string(REGEX MATCHALL "( |^)-[^ ]+" CPPFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") - string(REGEX MATCHALL "( |^)-[^ ]+" CXXPPFLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") - list(JOIN CXXPPFLAGS_${_VAR_SUFFIX} "|" CXXREGEX) - if(CXXREGEX) - list(FILTER CPPFLAGS_${_VAR_SUFFIX} INCLUDE REGEX "(${CXXREGEX})") - else() - set(CPPFLAGS_${_VAR_SUFFIX}) - endif() - list(JOIN CPPFLAGS_${_VAR_SUFFIX} "|" CPPREGEX) - list(JOIN CPPFLAGS_${_VAR_SUFFIX} " " CPPFLAGS_${_VAR_SUFFIX}) - set(CPPFLAGS_${_VAR_SUFFIX} " ${CPPFLAGS_${_VAR_SUFFIX}}") - if(CPPREGEX) - string(REGEX REPLACE "(${CPPREGEX})" "" CFLAGS_${_VAR_SUFFIX} " ${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") - string(REGEX REPLACE "(${CPPREGEX})" "" CXXFLAGS_${_VAR_SUFFIX} " ${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") - else() - set(CFLAGS_${_VAR_SUFFIX} " ${VCPKG_DETECTED_COMBINED_CFLAGS_${_VAR_SUFFIX}}") - set(CXXFLAGS_${_VAR_SUFFIX} " ${VCPKG_DETECTED_COMBINED_CXXFLAGS_${_VAR_SUFFIX}}") - endif() - debug_message("CPPFLAGS_${_VAR_SUFFIX}: ${CPPFLAGS_${_VAR_SUFFIX}}") - debug_message("CFLAGS_${_VAR_SUFFIX}: ${CFLAGS_${_VAR_SUFFIX}}") - debug_message("CXXFLAGS_${_VAR_SUFFIX}: ${CXXFLAGS_${_VAR_SUFFIX}}") - endmacro() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug" AND NOT _csc_NO_DEBUG) set(_VAR_SUFFIX DEBUG) set(PATH_SUFFIX_${_VAR_SUFFIX} "/debug") @@ -540,12 +563,16 @@ function(vcpkg_configure_make) else() # dynamic set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_SHARED_LINKERFLAGS_${_VAR_SUFFIX}}") endif() - extract_cpp_flags_and_set_cflags_and_cxxflags() + extract_cpp_flags_and_set_cflags_and_cxxflags(${_VAR_SUFFIX}) if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe") - set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/") - set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link") + if(DEFINED ENV{_LINK_}) + set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") + else() + set(LINK_ENV_${_VAR_SUFFIX} "${LINKER_FLAGS_${_VAR_SUFFIX}}") + endif() else() - set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/ ${LINKER_FLAGS_${_VAR_SUFFIX}}") + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link ${LINKER_FLAGS_${_VAR_SUFFIX}}") endif() unset(_VAR_SUFFIX) endif() @@ -559,10 +586,14 @@ function(vcpkg_configure_make) else() # dynamic set(LINKER_FLAGS_${_VAR_SUFFIX} "${VCPKG_DETECTED_SHARED_LINKERFLAGS_${_VAR_SUFFIX}}") endif() - extract_cpp_flags_and_set_cflags_and_cxxflags() + extract_cpp_flags_and_set_cflags_and_cxxflags(${_VAR_SUFFIX}) if (CMAKE_HOST_WIN32 AND VCPKG_DETECTED_C_COMPILER MATCHES "cl.exe") - set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/") - set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link") + if(DEFINED ENV{_LINK_}) + set(LINK_ENV_${_VAR_SUFFIX} "$ENV{_LINK_} ${LINKER_FLAGS_${_VAR_SUFFIX}}") + else() + set(LINK_ENV_${_VAR_SUFFIX} "${LINKER_FLAGS_${_VAR_SUFFIX}}") + endif() else() set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/ ${LINKER_FLAGS_${_VAR_SUFFIX}}") endif() @@ -586,23 +617,24 @@ function(vcpkg_configure_make) set(RELATIVE_BUILD_PATH .) endif() - set(PKGCONFIG_INSTALLED_DIR "${_VCPKG_INSTALLED_PKGCONF}${PATH_SUFFIX_${_buildtype}}/lib/pkgconfig") - set(PKGCONFIG_INSTALLED_SHARE_DIR "${_VCPKG_INSTALLED_PKGCONF}/share/pkgconfig") - + # Setup PKG_CONFIG_PATH + set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/lib/pkgconfig") + set(PKGCONFIG_INSTALLED_SHARE_DIR "${CURRENT_INSTALLED_DIR}/share/pkgconfig") if(ENV{PKG_CONFIG_PATH}) set(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype} $ENV{PKG_CONFIG_PATH}) - set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}:${PKGCONFIG_INSTALLED_SHARE_DIR}:$ENV{PKG_CONFIG_PATH}") + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}") else() - set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}:${PKGCONFIG_INSTALLED_SHARE_DIR}") + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}") endif() # Setup environment - set(ENV{CPPFLAGS} ${CPPFLAGS_${_buildtype}}) - set(ENV{CFLAGS} ${CFLAGS_${_buildtype}}) - set(ENV{CXXFLAGS} ${CXXFLAGS_${_buildtype}}) - set(ENV{LDFLAGS} ${LDFLAGS_${_buildtype}}) + set(ENV{CPPFLAGS} "${CPPFLAGS_${_buildtype}}") + set(ENV{CFLAGS} "${CFLAGS_${_buildtype}}") + set(ENV{CXXFLAGS} "${CXXFLAGS_${_buildtype}}") + set(ENV{RCFLAGS} "${VCPKG_DETECTED_COMBINED_RCFLAGS_${_buildtype}}") + set(ENV{LDFLAGS} "${LDFLAGS_${_buildtype}}") if(LINK_ENV_${_VAR_SUFFIX}) - _vcpkg_backup_env_variables(_LINK_) + set(_LINK_CONFIG_BACKUP "$ENV{_LINK_}") set(ENV{_LINK_} "${LINK_ENV_${_VAR_SUFFIX}}") endif() set(ENV{PKG_CONFIG} "${PKGCONFIG} --define-variable=prefix=${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}") @@ -622,6 +654,9 @@ function(vcpkg_configure_make) vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/bin") endif() debug_message("Configure command:'${command}'") + # foreach(_envar IN LISTS printvars) + # message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") + # endforeach() if (NOT _csc_SKIP_CONFIGURE) message(STATUS "Configuring ${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}}") vcpkg_execute_required_process( @@ -629,11 +664,13 @@ function(vcpkg_configure_make) WORKING_DIRECTORY "${TAR_DIR}" LOGNAME config-${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}} ) - if(EXISTS "${TAR_DIR}/libtool" AND VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(_file "${TAR_DIR}/libtool") - file(READ "${_file}" _contents) - string(REPLACE ".dll.lib" ".lib" _contents "${_contents}") - file(WRITE "${_file}" "${_contents}") + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB_RECURSE LIBTOOL_FILES "${TAR_DIR}*/libtool") + foreach(lt_file IN LISTS LIBTOOL_FILES) + file(READ "${lt_file}" _contents) + string(REPLACE ".dll.lib" ".lib" _contents "${_contents}") + file(WRITE "${lt_file}" "${_contents}") + endforeach() endif() endif() @@ -644,7 +681,10 @@ function(vcpkg_configure_make) endif() unset(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype}) - _vcpkg_restore_env_variables(_LINK_) + if(_LINK_CONFIG_BACKUP) + set(ENV{_LINK_} "${_LINK_CONFIG_BACKUP}") + unset(_LINK_CONFIG_BACKUP) + endif() if(_csc_ADD_BIN_TO_PATH) set(ENV{PATH} "${PATH_BACKUP}") @@ -661,7 +701,7 @@ function(vcpkg_configure_make) # Restore environment foreach(_prefix IN LISTS FLAGPREFIXES) - _vcpkg_restore_env_variable(${prefix}FLAGS) + _vcpkg_restore_env_variable(${_prefix}FLAGS) endforeach() _vcpkg_restore_env_variables(LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) From 24533f80c31bb8823966036b3a510dc74d67f691 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 10:51:11 +0200 Subject: [PATCH 039/114] [expat] fix expat details --- ports/expat/395.diff | 33 ++++++ ports/expat/398.diff | 13 +++ ports/expat/408.diff | 147 ++++++++++++++++++++++++++ ports/expat/412.diff | 36 +++++++ ports/expat/CONTROL | 1 + ports/expat/pkgconfig.patch | 28 +++++ ports/expat/portfile.cmake | 16 +-- ports/expat/vcpkg-cmake-wrapper.cmake | 27 +++++ 8 files changed, 294 insertions(+), 7 deletions(-) create mode 100644 ports/expat/395.diff create mode 100644 ports/expat/398.diff create mode 100644 ports/expat/408.diff create mode 100644 ports/expat/412.diff create mode 100644 ports/expat/pkgconfig.patch create mode 100644 ports/expat/vcpkg-cmake-wrapper.cmake diff --git a/ports/expat/395.diff b/ports/expat/395.diff new file mode 100644 index 00000000000000..63f82c0227c5d1 --- /dev/null +++ b/ports/expat/395.diff @@ -0,0 +1,33 @@ +diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c +index 8b8c6f07..638ea528 100644 +--- a/expat/lib/xmlparse.c ++++ b/expat/lib/xmlparse.c +@@ -48,6 +48,17 @@ + #include /* fprintf */ + #include /* getenv, rand_s */ + ++#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1600) ++/* vs2008/9.0 and earlier lack stdint.h; _MSC_VER 1600 is vs2010/10.0 */ ++# if defined(_WIN64) ++typedef unsigned __int64 uintptr_t; ++# else ++typedef unsigned __int32 uintptr_t; ++# endif ++#else ++# include /* uintptr_t */ ++#endif ++ + #ifdef _WIN32 + # define getpid GetCurrentProcessId + #else +@@ -121,9 +132,7 @@ + # define XmlGetInternalEncoding XmlGetUtf16InternalEncoding + # define XmlGetInternalEncodingNS XmlGetUtf16InternalEncodingNS + # define XmlEncode XmlUtf16Encode +-/* Using pointer subtraction to convert to integer type. */ +-# define MUST_CONVERT(enc, s) \ +- (! (enc)->isUtf16 || (((char *)(s) - (char *)NULL) & 1)) ++# define MUST_CONVERT(enc, s) (! (enc)->isUtf16 || (((uintptr_t)(s)) & 1)) + typedef unsigned short ICHAR; + #else + # define XML_ENCODE_MAX XML_UTF8_ENCODE_MAX diff --git a/ports/expat/398.diff b/ports/expat/398.diff new file mode 100644 index 00000000000000..8cd124e4acf068 --- /dev/null +++ b/ports/expat/398.diff @@ -0,0 +1,13 @@ +diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c +index 638ea528..849411ce 100644 +--- a/expat/lib/xmlparse.c ++++ b/expat/lib/xmlparse.c +@@ -6506,7 +6506,7 @@ hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) { + static void FASTCALL + hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) { + iter->p = table->v; +- iter->end = iter->p + table->size; ++ iter->end = iter->p ? iter->p + table->size : NULL; + } + + static NAMED *FASTCALL diff --git a/ports/expat/408.diff b/ports/expat/408.diff new file mode 100644 index 00000000000000..7834f3f0c2dab5 --- /dev/null +++ b/ports/expat/408.diff @@ -0,0 +1,147 @@ +diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt +index 32a9732f..b43dffa2 100644 +--- a/expat/CMakeLists.txt ++++ b/expat/CMakeLists.txt +@@ -279,22 +279,18 @@ endif(EXPAT_SHARED_LIBS) + + # Avoid colliding with Expat.dll of Perl's XML::Parser::Expat + if(WIN32 AND NOT MINGW) +- set(EXPAT_TARGET libexpat) # CMAKE_*_POSTFIX applies, see above ++ set(_EXPAT_OUTPUT_NAME libexpat) # CMAKE_*_POSTFIX applies, see above + else() + if(_EXPAT_UNICODE) +- set(EXPAT_TARGET expatw) ++ set(_EXPAT_OUTPUT_NAME expatw) + else() +- set(EXPAT_TARGET expat) ++ set(_EXPAT_OUTPUT_NAME expat) + endif() + endif() + +-if(_EXPAT_PARENT_DIRECTORY) +- set(EXPAT_TARGET "${EXPAT_TARGET}" PARENT_SCOPE) +-endif() +- +-add_library(${EXPAT_TARGET} ${_SHARED} ${expat_SRCS}) ++add_library(expat ${_SHARED} ${expat_SRCS}) + if(EXPAT_WITH_LIBBSD) +- target_link_libraries(${EXPAT_TARGET} ${LIB_BSD}) ++ target_link_libraries(expat ${LIB_BSD}) + endif() + + set(LIBCURRENT 7) # sync +@@ -302,13 +298,14 @@ set(LIBREVISION 11) # with + set(LIBAGE 6) # configure.ac! + math(EXPR LIBCURRENT_MINUS_AGE "${LIBCURRENT} - ${LIBAGE}") + ++set_property(TARGET expat PROPERTY OUTPUT_NAME "${_EXPAT_OUTPUT_NAME}") + if(NOT WIN32) +- set_property(TARGET ${EXPAT_TARGET} PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION}) +- set_property(TARGET ${EXPAT_TARGET} PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE}) +- set_property(TARGET ${EXPAT_TARGET} PROPERTY NO_SONAME ${NO_SONAME}) ++ set_property(TARGET expat PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION}) ++ set_property(TARGET expat PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE}) ++ set_property(TARGET expat PROPERTY NO_SONAME ${NO_SONAME}) + endif(NOT WIN32) + +-target_include_directories(${EXPAT_TARGET} ++target_include_directories(expat + INTERFACE + $ + $ +@@ -316,10 +313,10 @@ target_include_directories(${EXPAT_TARGET} + ) + + if(NOT EXPAT_SHARED_LIBS AND WIN32) +- target_compile_definitions(${EXPAT_TARGET} PUBLIC -DXML_STATIC) ++ target_compile_definitions(expat PUBLIC -DXML_STATIC) + endif() + +-expat_install(TARGETS ${EXPAT_TARGET} EXPORT expat ++expat_install(TARGETS expat EXPORT expat + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +@@ -334,8 +331,8 @@ if(NOT MSVC) + set(exec_prefix "\${prefix}") + set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") + set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +- configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${EXPAT_TARGET}.pc @ONLY) +- expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${EXPAT_TARGET}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++ configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc @ONLY) ++ expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + endif() + + # +@@ -351,7 +348,7 @@ if(EXPAT_BUILD_TOOLS) + + add_executable(xmlwf ${xmlwf_SRCS}) + set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf) +- target_link_libraries(xmlwf ${EXPAT_TARGET}) ++ target_link_libraries(xmlwf expat) + expat_install(TARGETS xmlwf DESTINATION ${CMAKE_INSTALL_BINDIR}) + + if(MINGW AND _EXPAT_UNICODE_WCHAR_T) +@@ -367,7 +364,7 @@ if(EXPAT_BUILD_TOOLS) + "${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_BINARY_DIR}/doc/xmlwf.1" + BYPRODUCTS + doc/xmlwf.1) +- add_dependencies(${EXPAT_TARGET} xmlwf-manpage) ++ add_dependencies(expat xmlwf-manpage) + expat_install(FILES "${PROJECT_BINARY_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) + elseif(EXISTS ${PROJECT_SOURCE_DIR}/doc/xmlwf.1) + expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) +@@ -380,11 +377,11 @@ endif() + if(EXPAT_BUILD_EXAMPLES) + add_executable(elements examples/elements.c) + set_property(TARGET elements PROPERTY RUNTIME_OUTPUT_DIRECTORY examples) +- target_link_libraries(elements ${EXPAT_TARGET}) ++ target_link_libraries(elements expat) + + add_executable(outline examples/outline.c) + set_property(TARGET outline PROPERTY RUNTIME_OUTPUT_DIRECTORY examples) +- target_link_libraries(outline ${EXPAT_TARGET}) ++ target_link_libraries(outline expat) + endif(EXPAT_BUILD_EXAMPLES) + + # +@@ -419,12 +416,12 @@ if(EXPAT_BUILD_TESTS) + + add_executable(runtests tests/runtests.c ${test_SRCS}) + set_property(TARGET runtests PROPERTY RUNTIME_OUTPUT_DIRECTORY tests) +- target_link_libraries(runtests ${EXPAT_TARGET}) ++ target_link_libraries(runtests expat) + expat_add_test(runtests $) + + add_executable(runtestspp tests/runtestspp.cpp ${test_SRCS}) + set_property(TARGET runtestspp PROPERTY RUNTIME_OUTPUT_DIRECTORY tests) +- target_link_libraries(runtestspp ${EXPAT_TARGET}) ++ target_link_libraries(runtestspp expat) + expat_add_test(runtestspp $) + endif(EXPAT_BUILD_TESTS) + +@@ -569,7 +566,7 @@ write_basic_package_version_file( + ) + export( + TARGETS +- ${EXPAT_TARGET} ++ expat + FILE + cmake/expat-targets.cmake # not going to be installed + ) +diff --git a/expat/expat.pc.in b/expat/expat.pc.in +index a89cdd82..bdfa47f8 100644 +--- a/expat/expat.pc.in ++++ b/expat/expat.pc.in +@@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@ + libdir=@libdir@ + includedir=@includedir@ + +-Name: @EXPAT_TARGET@ ++Name: @_EXPAT_OUTPUT_NAME@ + Version: @PACKAGE_VERSION@ + Description: expat XML parser + URL: http://www.libexpat.org +-Libs: -L${libdir} -l@EXPAT_TARGET@ ++Libs: -L${libdir} -l@_EXPAT_OUTPUT_NAME@ + Cflags: -I${includedir} diff --git a/ports/expat/412.diff b/ports/expat/412.diff new file mode 100644 index 00000000000000..dc6e8262fde591 --- /dev/null +++ b/ports/expat/412.diff @@ -0,0 +1,36 @@ +diff --git a/expat/lib/xmltok_impl.c b/expat/lib/xmltok_impl.c +index c209221c..06d5c908 100644 +--- a/expat/lib/xmltok_impl.c ++++ b/expat/lib/xmltok_impl.c +@@ -1768,13 +1768,14 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, + # define LEAD_CASE(n) \ + case BT_LEAD##n: \ + ptr += n; \ ++ pos->columnNumber++; \ + break; + LEAD_CASE(2) + LEAD_CASE(3) + LEAD_CASE(4) + # undef LEAD_CASE + case BT_LF: +- pos->columnNumber = (XML_Size)-1; ++ pos->columnNumber = 0; + pos->lineNumber++; + ptr += MINBPC(enc); + break; +@@ -1783,13 +1784,13 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, + ptr += MINBPC(enc); + if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF) + ptr += MINBPC(enc); +- pos->columnNumber = (XML_Size)-1; ++ pos->columnNumber = 0; + break; + default: + ptr += MINBPC(enc); ++ pos->columnNumber++; + break; + } +- pos->columnNumber++; + } + } + diff --git a/ports/expat/CONTROL b/ports/expat/CONTROL index 53474ae2bfb2af..96ffe0f1c1ea6d 100644 --- a/ports/expat/CONTROL +++ b/ports/expat/CONTROL @@ -1,4 +1,5 @@ Source: expat Version: 2.2.9 +Port-Version: 1 Homepage: https://github.com/libexpat/libexpat Description: XML parser library written in C \ No newline at end of file diff --git a/ports/expat/pkgconfig.patch b/ports/expat/pkgconfig.patch new file mode 100644 index 00000000000000..650ad36fdf9685 --- /dev/null +++ b/ports/expat/pkgconfig.patch @@ -0,0 +1,28 @@ +diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt +index a67f081b1..cc220f2a1 100644 +--- a/expat/CMakeLists.txt ++++ b/expat/CMakeLists.txt +@@ -294,7 +294,11 @@ expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL + # + # pkg-config file + # +-if(NOT MSVC) ++if(1) ++ set(libname ${_EXPAT_TARGET}) ++ if(MSVC AND CMAKE_BUILD_TYPE STREQUAL "Debug") ++ set(libname ${_EXPAT_TARGET}d) ++ endif() + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix "\${prefix}") + set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") +diff --git a/expat/expat.pc.in b/expat/expat.pc.in +index 5207e3e1b..8835d1385 100644 +--- a/expat/expat.pc.in ++++ b/expat/expat.pc.in +@@ -7,5 +7,5 @@ Name: expat + Version: @PACKAGE_VERSION@ + Description: expat XML parser + URL: http://www.libexpat.org +-Libs: -L${libdir} -lexpat ++Libs: -L${libdir} -l@libname@ + Cflags: -I${includedir} diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index 1414344be72045..4831046ab616f6 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -5,7 +5,12 @@ vcpkg_from_github( SHA512 18842d5c9ff89654c5beeb9daba7ff5a911da318d419735fb14a5acbe0d1b4ac07077822c70cfa5c845892bcec2d72f8f265b9a259fe459092864f4d1754f8dd HEAD_REF master PATCHES + 395.diff + 398.diff + #408.diff CMake target changes. Missing a previous PR. Would be nice if somebody finds the missing merged PR so that this can be applied. + 412.diff fix-find-package-by-cmake.patch + pkgconfig.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -27,16 +32,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/expat) +vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -if(EXE OR DEBUG_EXE) - file(REMOVE ${EXE} ${DEBUG_EXE}) -endif() - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/expat_external.h "! defined(XML_STATIC)" @@ -47,4 +47,6 @@ endif() vcpkg_copy_pdbs() #Handle copyright -file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) \ No newline at end of file diff --git a/ports/expat/vcpkg-cmake-wrapper.cmake b/ports/expat/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..29dc615bffac31 --- /dev/null +++ b/ports/expat/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,27 @@ +include(SelectLibraryConfigurations) + +set(EXPATNAMES expat expatw libexpat libexpatw) +set(DEBUGNAMES) +foreach(_CRT MT MD) + foreach(name in LISTS EXPATNAMES) + list(APPEND EXPATNAMES ${name}${_CRT}) + list(APPEND DEBUGNAMES ${name}d${_CRT}) + endforeach() +endforeach() + +find_library(EXPAT_LIBRARY_DEBUG NAMES ${DEBUGNAMES} ${EXPATNAMES} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) +find_library(EXPAT_LIBRARY_RELEASE NAMES ${EXPATNAMES} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) +select_library_configurations(EXPAT) + +_find_package(${ARGS}) +if(EXPAT_FOUND AND TARGET EXPAT::EXPAT) + if(EXPAT_LIBRARY_DEBUG) + set_target_properties(EXPAT::EXPAT PROPERTIES IMPORTED_LOCATION_DEBUG "${EXPAT_LIBRARY_DEBUG}") + endif() + if(EXPAT_LIBRARY_RELEASE) + set_target_properties(EXPAT::EXPAT PROPERTIES IMPORTED_LOCATION_RELEASE "${EXPAT_LIBRARY_RELEASE}") + endif() +endif() + +unset(EXPATNAMES) +unset(DEBUGNAMES) \ No newline at end of file From b26f1869ce0fc18b8970aa6052db5c3c9dcc25a5 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Thu, 20 Aug 2020 10:54:26 +0200 Subject: [PATCH 040/114] Apply suggestions from code review Co-authored-by: nicole mazzuca --- scripts/cmake/vcpkg_get_cmake_vars.cmake | 3 +-- scripts/get_cmake_vars/CMakeLists.txt | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/cmake/vcpkg_get_cmake_vars.cmake b/scripts/cmake/vcpkg_get_cmake_vars.cmake index 7b1925a08dcd09..f26c0a8b3dbec2 100644 --- a/scripts/cmake/vcpkg_get_cmake_vars.cmake +++ b/scripts/cmake/vcpkg_get_cmake_vars.cmake @@ -1,7 +1,6 @@ ## # vcpkg_get_cmake_vars ## ## Runs a cmake configure with a dummy project to extract certain cmake variables -## This function is mostliy ## ## ## Usage ## ```cmake @@ -61,4 +60,4 @@ function(vcpkg_get_cmake_vars) endif() file(RENAME "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}${LOGSUFFIX}-out.log" "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}-out.log") file(RENAME "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}${LOGSUFFIX}-err.log" "${CURRENT_BUILDTREES_DIR}/get-cmake-vars-${TARGET_TRIPLET}-err.log") -endfunction() \ No newline at end of file +endfunction() diff --git a/scripts/get_cmake_vars/CMakeLists.txt b/scripts/get_cmake_vars/CMakeLists.txt index dab84f4bc081f3..4c53bcdc00a495 100644 --- a/scripts/get_cmake_vars/CMakeLists.txt +++ b/scripts/get_cmake_vars/CMakeLists.txt @@ -94,8 +94,8 @@ file(WRITE "${VCPKG_OUTPUT_FILE}" "${OUTPUT_STRING}") # Programs: # CMAKE_AR # CMAKE__COMPILER_AR (Wrapper) -# CMAKE_RANLIB¶ -# CMAKE__COMPILER_RANLIB¶ +# CMAKE_RANLIB +# CMAKE__COMPILER_RANLIB # CMAKE_STRIP # CMAKE_NM # CMAKE_OBJDUMP @@ -105,7 +105,7 @@ file(WRITE "${VCPKG_OUTPUT_FILE}" "${OUTPUT_STRING}") # CMAKE_C_COMPILER # CMAKE_CXX_COMPILER -# CMAKE_RC_COMPILER <-- +# CMAKE_RC_COMPILER # CMAKE_RC_FLAGS # Flags: @@ -113,6 +113,6 @@ file(WRITE "${VCPKG_OUTPUT_FILE}" "${OUTPUT_STRING}") # CMAKE__FLAGS_ # CMAKE_SHARED_LINKER_FLAGS # CMAKE_STATIC_LINKER_FLAGS -# CMAKE_STATIC_LINKER_FLAGS_. +# CMAKE_STATIC_LINKER_FLAGS_ # CMAKE_EXE_LINKER_FLAGS -# CMAKE_EXE_LINKER_FLAGS_ (CMAKE_C_FLAGS_) +# CMAKE_EXE_LINKER_FLAGS_ From ec357c29f1fc4b37733c8078108d16dc9d149c59 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 10:59:32 +0200 Subject: [PATCH 041/114] cleanup docs --- scripts/cmake/vcpkg_get_cmake_vars.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_get_cmake_vars.cmake b/scripts/cmake/vcpkg_get_cmake_vars.cmake index f26c0a8b3dbec2..5ea9bc233fb572 100644 --- a/scripts/cmake/vcpkg_get_cmake_vars.cmake +++ b/scripts/cmake/vcpkg_get_cmake_vars.cmake @@ -15,14 +15,14 @@ ## Additional options to pass to the test configure call ## ## ### OUTPUT_FILE -## Variable to hold the +## Variable to return the path to the generated cmake file with the detected `CMAKE_` variables set as `VCKPG_DETECTED_` ## ## ## Notes -## This command will either alter the settings for `VCPKG_LIBRARY_LINKAGE` or fail, depending on what was requested by the user versus what the library supports. +## If possible avoid usage in portfiles. ## ## ## Examples ## -## * [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) +## * [vcpkg_configure_make](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_make.cmake) function(vcpkg_get_cmake_vars) cmake_parse_arguments(PARSE_ARGV 0 _gcv "" "OUTPUT_FILE" "OPTIONS") From 898dcd7e48e531a8f3b50897dd24afc5961fb24a Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 11:14:06 +0200 Subject: [PATCH 042/114] update osx pipeline so that fontconfig actually builds --- scripts/azure-pipelines/osx/azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml index 6e48238a7e2a7b..a3414e86190f16 100644 --- a/scripts/azure-pipelines/osx/azure-pipelines.yml +++ b/scripts/azure-pipelines/osx/azure-pipelines.yml @@ -23,7 +23,9 @@ jobs: condition: always() - bash: | brew list autoconf || brew install autoconf + brew list autoconf-archive || brew install autoconf-archive brew list automake || brew install automake + brew list autopoint || brew install autopoint brew list pkg-config || brew install pkg-config brew list libtool || brew install libtool brew list bison || brew install bison From d83f6f33f3581dddf055d12127684c369a014f3b Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 15:25:58 +0200 Subject: [PATCH 043/114] fix expat the lazy way by using a higher commit than release --- ports/expat/395.diff | 33 ----- ports/expat/398.diff | 13 -- ports/expat/408.diff | 147 -------------------- ports/expat/412.diff | 36 ----- ports/expat/fix-find-package-by-cmake.patch | 11 -- ports/expat/pkgconfig.patch | 19 +-- ports/expat/portfile.cmake | 10 +- 7 files changed, 6 insertions(+), 263 deletions(-) delete mode 100644 ports/expat/395.diff delete mode 100644 ports/expat/398.diff delete mode 100644 ports/expat/408.diff delete mode 100644 ports/expat/412.diff diff --git a/ports/expat/395.diff b/ports/expat/395.diff deleted file mode 100644 index 63f82c0227c5d1..00000000000000 --- a/ports/expat/395.diff +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c -index 8b8c6f07..638ea528 100644 ---- a/expat/lib/xmlparse.c -+++ b/expat/lib/xmlparse.c -@@ -48,6 +48,17 @@ - #include /* fprintf */ - #include /* getenv, rand_s */ - -+#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1600) -+/* vs2008/9.0 and earlier lack stdint.h; _MSC_VER 1600 is vs2010/10.0 */ -+# if defined(_WIN64) -+typedef unsigned __int64 uintptr_t; -+# else -+typedef unsigned __int32 uintptr_t; -+# endif -+#else -+# include /* uintptr_t */ -+#endif -+ - #ifdef _WIN32 - # define getpid GetCurrentProcessId - #else -@@ -121,9 +132,7 @@ - # define XmlGetInternalEncoding XmlGetUtf16InternalEncoding - # define XmlGetInternalEncodingNS XmlGetUtf16InternalEncodingNS - # define XmlEncode XmlUtf16Encode --/* Using pointer subtraction to convert to integer type. */ --# define MUST_CONVERT(enc, s) \ -- (! (enc)->isUtf16 || (((char *)(s) - (char *)NULL) & 1)) -+# define MUST_CONVERT(enc, s) (! (enc)->isUtf16 || (((uintptr_t)(s)) & 1)) - typedef unsigned short ICHAR; - #else - # define XML_ENCODE_MAX XML_UTF8_ENCODE_MAX diff --git a/ports/expat/398.diff b/ports/expat/398.diff deleted file mode 100644 index 8cd124e4acf068..00000000000000 --- a/ports/expat/398.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c -index 638ea528..849411ce 100644 ---- a/expat/lib/xmlparse.c -+++ b/expat/lib/xmlparse.c -@@ -6506,7 +6506,7 @@ hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) { - static void FASTCALL - hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) { - iter->p = table->v; -- iter->end = iter->p + table->size; -+ iter->end = iter->p ? iter->p + table->size : NULL; - } - - static NAMED *FASTCALL diff --git a/ports/expat/408.diff b/ports/expat/408.diff deleted file mode 100644 index 7834f3f0c2dab5..00000000000000 --- a/ports/expat/408.diff +++ /dev/null @@ -1,147 +0,0 @@ -diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt -index 32a9732f..b43dffa2 100644 ---- a/expat/CMakeLists.txt -+++ b/expat/CMakeLists.txt -@@ -279,22 +279,18 @@ endif(EXPAT_SHARED_LIBS) - - # Avoid colliding with Expat.dll of Perl's XML::Parser::Expat - if(WIN32 AND NOT MINGW) -- set(EXPAT_TARGET libexpat) # CMAKE_*_POSTFIX applies, see above -+ set(_EXPAT_OUTPUT_NAME libexpat) # CMAKE_*_POSTFIX applies, see above - else() - if(_EXPAT_UNICODE) -- set(EXPAT_TARGET expatw) -+ set(_EXPAT_OUTPUT_NAME expatw) - else() -- set(EXPAT_TARGET expat) -+ set(_EXPAT_OUTPUT_NAME expat) - endif() - endif() - --if(_EXPAT_PARENT_DIRECTORY) -- set(EXPAT_TARGET "${EXPAT_TARGET}" PARENT_SCOPE) --endif() -- --add_library(${EXPAT_TARGET} ${_SHARED} ${expat_SRCS}) -+add_library(expat ${_SHARED} ${expat_SRCS}) - if(EXPAT_WITH_LIBBSD) -- target_link_libraries(${EXPAT_TARGET} ${LIB_BSD}) -+ target_link_libraries(expat ${LIB_BSD}) - endif() - - set(LIBCURRENT 7) # sync -@@ -302,13 +298,14 @@ set(LIBREVISION 11) # with - set(LIBAGE 6) # configure.ac! - math(EXPR LIBCURRENT_MINUS_AGE "${LIBCURRENT} - ${LIBAGE}") - -+set_property(TARGET expat PROPERTY OUTPUT_NAME "${_EXPAT_OUTPUT_NAME}") - if(NOT WIN32) -- set_property(TARGET ${EXPAT_TARGET} PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION}) -- set_property(TARGET ${EXPAT_TARGET} PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE}) -- set_property(TARGET ${EXPAT_TARGET} PROPERTY NO_SONAME ${NO_SONAME}) -+ set_property(TARGET expat PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION}) -+ set_property(TARGET expat PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE}) -+ set_property(TARGET expat PROPERTY NO_SONAME ${NO_SONAME}) - endif(NOT WIN32) - --target_include_directories(${EXPAT_TARGET} -+target_include_directories(expat - INTERFACE - $ - $ -@@ -316,10 +313,10 @@ target_include_directories(${EXPAT_TARGET} - ) - - if(NOT EXPAT_SHARED_LIBS AND WIN32) -- target_compile_definitions(${EXPAT_TARGET} PUBLIC -DXML_STATIC) -+ target_compile_definitions(expat PUBLIC -DXML_STATIC) - endif() - --expat_install(TARGETS ${EXPAT_TARGET} EXPORT expat -+expat_install(TARGETS expat EXPORT expat - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -@@ -334,8 +331,8 @@ if(NOT MSVC) - set(exec_prefix "\${prefix}") - set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") - set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") -- configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${EXPAT_TARGET}.pc @ONLY) -- expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${EXPAT_TARGET}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -+ configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc @ONLY) -+ expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - endif() - - # -@@ -351,7 +348,7 @@ if(EXPAT_BUILD_TOOLS) - - add_executable(xmlwf ${xmlwf_SRCS}) - set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf) -- target_link_libraries(xmlwf ${EXPAT_TARGET}) -+ target_link_libraries(xmlwf expat) - expat_install(TARGETS xmlwf DESTINATION ${CMAKE_INSTALL_BINDIR}) - - if(MINGW AND _EXPAT_UNICODE_WCHAR_T) -@@ -367,7 +364,7 @@ if(EXPAT_BUILD_TOOLS) - "${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_BINARY_DIR}/doc/xmlwf.1" - BYPRODUCTS - doc/xmlwf.1) -- add_dependencies(${EXPAT_TARGET} xmlwf-manpage) -+ add_dependencies(expat xmlwf-manpage) - expat_install(FILES "${PROJECT_BINARY_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) - elseif(EXISTS ${PROJECT_SOURCE_DIR}/doc/xmlwf.1) - expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) -@@ -380,11 +377,11 @@ endif() - if(EXPAT_BUILD_EXAMPLES) - add_executable(elements examples/elements.c) - set_property(TARGET elements PROPERTY RUNTIME_OUTPUT_DIRECTORY examples) -- target_link_libraries(elements ${EXPAT_TARGET}) -+ target_link_libraries(elements expat) - - add_executable(outline examples/outline.c) - set_property(TARGET outline PROPERTY RUNTIME_OUTPUT_DIRECTORY examples) -- target_link_libraries(outline ${EXPAT_TARGET}) -+ target_link_libraries(outline expat) - endif(EXPAT_BUILD_EXAMPLES) - - # -@@ -419,12 +416,12 @@ if(EXPAT_BUILD_TESTS) - - add_executable(runtests tests/runtests.c ${test_SRCS}) - set_property(TARGET runtests PROPERTY RUNTIME_OUTPUT_DIRECTORY tests) -- target_link_libraries(runtests ${EXPAT_TARGET}) -+ target_link_libraries(runtests expat) - expat_add_test(runtests $) - - add_executable(runtestspp tests/runtestspp.cpp ${test_SRCS}) - set_property(TARGET runtestspp PROPERTY RUNTIME_OUTPUT_DIRECTORY tests) -- target_link_libraries(runtestspp ${EXPAT_TARGET}) -+ target_link_libraries(runtestspp expat) - expat_add_test(runtestspp $) - endif(EXPAT_BUILD_TESTS) - -@@ -569,7 +566,7 @@ write_basic_package_version_file( - ) - export( - TARGETS -- ${EXPAT_TARGET} -+ expat - FILE - cmake/expat-targets.cmake # not going to be installed - ) -diff --git a/expat/expat.pc.in b/expat/expat.pc.in -index a89cdd82..bdfa47f8 100644 ---- a/expat/expat.pc.in -+++ b/expat/expat.pc.in -@@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@ - libdir=@libdir@ - includedir=@includedir@ - --Name: @EXPAT_TARGET@ -+Name: @_EXPAT_OUTPUT_NAME@ - Version: @PACKAGE_VERSION@ - Description: expat XML parser - URL: http://www.libexpat.org --Libs: -L${libdir} -l@EXPAT_TARGET@ -+Libs: -L${libdir} -l@_EXPAT_OUTPUT_NAME@ - Cflags: -I${includedir} diff --git a/ports/expat/412.diff b/ports/expat/412.diff deleted file mode 100644 index dc6e8262fde591..00000000000000 --- a/ports/expat/412.diff +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/expat/lib/xmltok_impl.c b/expat/lib/xmltok_impl.c -index c209221c..06d5c908 100644 ---- a/expat/lib/xmltok_impl.c -+++ b/expat/lib/xmltok_impl.c -@@ -1768,13 +1768,14 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, - # define LEAD_CASE(n) \ - case BT_LEAD##n: \ - ptr += n; \ -+ pos->columnNumber++; \ - break; - LEAD_CASE(2) - LEAD_CASE(3) - LEAD_CASE(4) - # undef LEAD_CASE - case BT_LF: -- pos->columnNumber = (XML_Size)-1; -+ pos->columnNumber = 0; - pos->lineNumber++; - ptr += MINBPC(enc); - break; -@@ -1783,13 +1784,13 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, - ptr += MINBPC(enc); - if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF) - ptr += MINBPC(enc); -- pos->columnNumber = (XML_Size)-1; -+ pos->columnNumber = 0; - break; - default: - ptr += MINBPC(enc); -+ pos->columnNumber++; - break; - } -- pos->columnNumber++; - } - } - diff --git a/ports/expat/fix-find-package-by-cmake.patch b/ports/expat/fix-find-package-by-cmake.patch index 830327944ca236..b16216750facf3 100644 --- a/ports/expat/fix-find-package-by-cmake.patch +++ b/ports/expat/fix-find-package-by-cmake.patch @@ -2,17 +2,6 @@ diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index 2084424..f3b9207 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt -@@ -269,6 +269,10 @@ if(EXPAT_WITH_LIBBSD) - target_link_libraries(${_EXPAT_TARGET} ${LIB_BSD}) - endif() - -+target_include_directories(${_EXPAT_TARGET} INTERFACE -+ $ -+ $) -+ - set(LIBCURRENT 7) # sync - set(LIBREVISION 11) # with - set(LIBAGE 6) # configure.ac! @@ -490,7 +494,7 @@ configure_package_config_file( cmake/expat-config.cmake.in cmake/expat-config.cmake diff --git a/ports/expat/pkgconfig.patch b/ports/expat/pkgconfig.patch index 650ad36fdf9685..401daf737e10c0 100644 --- a/ports/expat/pkgconfig.patch +++ b/ports/expat/pkgconfig.patch @@ -2,27 +2,14 @@ diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index a67f081b1..cc220f2a1 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt -@@ -294,7 +294,11 @@ expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL +@@ -294,7 +294,9 @@ expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL # # pkg-config file # ++string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UPPER) ++set(_EXPAT_OUTPUT_NAME ${_EXPAT_OUTPUT_NAME}${CMAKE_${BUILD_TYPE_UPPER}_POSTFIX}) -if(NOT MSVC) +if(1) -+ set(libname ${_EXPAT_TARGET}) -+ if(MSVC AND CMAKE_BUILD_TYPE STREQUAL "Debug") -+ set(libname ${_EXPAT_TARGET}d) -+ endif() set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix "\${prefix}") set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") -diff --git a/expat/expat.pc.in b/expat/expat.pc.in -index 5207e3e1b..8835d1385 100644 ---- a/expat/expat.pc.in -+++ b/expat/expat.pc.in -@@ -7,5 +7,5 @@ Name: expat - Version: @PACKAGE_VERSION@ - Description: expat XML parser - URL: http://www.libexpat.org --Libs: -L${libdir} -lexpat -+Libs: -L${libdir} -l@libname@ - Cflags: -I${includedir} diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index 8c97df2d74a539..e1dd18ad7b02a9 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -1,15 +1,11 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libexpat/libexpat - REF a7bc26b69768f7fb24f0c7976fae24b157b85b13 #tag 2.2.9 - SHA512 18842d5c9ff89654c5beeb9daba7ff5a911da318d419735fb14a5acbe0d1b4ac07077822c70cfa5c845892bcec2d72f8f265b9a259fe459092864f4d1754f8dd + REF c092d40c300c6d219cb3b111932a824022265370 #Head from 20.08.2020 + SHA512 5a5d41b500f5602a32aea8f4e15593e639206bb3f97553497e80b2975360cac88ac90386f5efc11728614f24bbb620fb908a3c8ca71c9e7b312f6157b2477afe HEAD_REF master PATCHES - 395.diff - 398.diff - #408.diff - 412.diff - fix-find-package-by-cmake.patch + fix-find-package-by-cmake.patch # This patch seems unnecessary pkgconfig.patch ) From 59728c8a3ad6cba7c2abb9c40c8d46d317434133 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 15:27:10 +0200 Subject: [PATCH 044/114] fix a barage of regressions due to the use of unofficial targets --- ports/cairo/CMakeLists.txt | 4 ++-- ports/cairo/CONTROL | 2 +- ports/gdal/CONTROL | 2 +- ports/gdal/portfile.cmake | 4 ++-- ports/gdk-pixbuf/CMakeLists.txt | 6 +++--- ports/gdk-pixbuf/CONTROL | 1 + ports/glibmm/CMakeLists.txt | 9 +++------ ports/glibmm/CONTROL | 3 ++- ports/harfbuzz/CONTROL | 2 +- ports/harfbuzz/glib-cmake.patch | 4 ++-- ports/libcroco/CMakeLists.txt | 10 +++++----- ports/libcroco/CONTROL | 3 ++- ports/libidn2/CMakeLists.txt | 4 ++-- ports/libxslt/0002-Fix-lzma.patch | 2 +- ports/xmlsec/CMakeLists.txt | 4 ++-- ports/xmlsec/CONTROL | 1 + 16 files changed, 31 insertions(+), 30 deletions(-) diff --git a/ports/cairo/CMakeLists.txt b/ports/cairo/CMakeLists.txt index e333f304d23ce6..8b3c66a8f20ccd 100644 --- a/ports/cairo/CMakeLists.txt +++ b/ports/cairo/CMakeLists.txt @@ -182,7 +182,7 @@ find_package(Threads REQUIRED) find_package(ZLIB REQUIRED) find_package(PNG REQUIRED) find_package(Freetype REQUIRED) -find_package(unofficial-fontconfig CONFIG REQUIRED) +find_package(Fontconfig REQUIRED) find_package(unofficial-pixman CONFIG REQUIRED) # Cairo needs to be told which features of FreeType are availible @@ -211,7 +211,7 @@ if (WITH_X11) target_compile_definitions(cairo PUBLIC -DCAIRO_HAS_XLIB_SURFACE=1) endif() target_include_directories(cairo PUBLIC ${FREETYPE_INCLUDE_DIRS}) -target_link_libraries(cairo PRIVATE ZLIB::ZLIB PNG::PNG Freetype::Freetype unofficial::pixman::pixman-1 unofficial::fontconfig::fontconfig) +target_link_libraries(cairo PRIVATE ZLIB::ZLIB PNG::PNG Freetype::Freetype unofficial::pixman::pixman-1 Fontconfig::Fontconfig) if(WIN32) target_link_libraries(cairo PRIVATE gdi32 msimg32 user32) diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index 6c26c77a250d5f..06877af9b7f25b 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,6 +1,6 @@ Source: cairo Version: 1.16.0 -Port-Version: 7 +Port-Version: 8 Homepage: https://cairographics.org Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. Build-Depends: zlib, libpng, pixman, freetype, fontconfig diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index 26b3e5c50e6602..531811ecc1025c 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,6 +1,6 @@ Source: gdal Version: 2.4.1 -Port-Version: 10 +Port-Version: 11 Homepage: https://gdal.org/ Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 1339604c80e315..f73f7496840537 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -149,8 +149,8 @@ if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.lib" OPENSSL_LIBRARY_DBG) # Setup libiconv libraries path - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libiconv.lib ${CURRENT_INSTALLED_DIR}/lib/libcharset.lib" ICONV_LIBRARY_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib" ICONV_LIBRARY_DBG) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/lib/charset.lib" ICONV_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib" ICONV_LIBRARY_DBG) if("mysql-libmysql" IN_LIST FEATURES OR "mysql-libmariadb" IN_LIST FEATURES) # Setup MySQL libraries + include path diff --git a/ports/gdk-pixbuf/CMakeLists.txt b/ports/gdk-pixbuf/CMakeLists.txt index cdc5c3fb80b5e2..0ff2a85e2c54ae 100644 --- a/ports/gdk-pixbuf/CMakeLists.txt +++ b/ports/gdk-pixbuf/CMakeLists.txt @@ -12,7 +12,7 @@ find_package(PNG REQUIRED) find_package(unofficial-glib CONFIG REQUIRED) find_path(GLIB_INCLUDE_DIR glib.h) -find_package(unofficial-gettext CONFIG REQUIRED) +find_package(Intl REQUIRED) find_path(LIBINTL_INCLUDE_DIR libintl.h) if(WIN32) @@ -66,10 +66,10 @@ target_include_directories(gdk-pixbuf PRIVATE ${GLIB_INCLUDE_DIR} ${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} - ${LIBINTL_INCLUDE_DIR}) + ${Intl_INCLUDE_DIR}) set(LIBS - unofficial::glib::gio unofficial::glib::glib unofficial::glib::gmodule unofficial::glib::gobject unofficial::gettext::libintl + unofficial::glib::gio unofficial::glib::glib unofficial::glib::gmodule unofficial::glib::gobject ${Intl_LIBRARIES} ${ZLIB_LIBRARIES} ${PNG_LIBRARIES} ) diff --git a/ports/gdk-pixbuf/CONTROL b/ports/gdk-pixbuf/CONTROL index 229973bc88a66d..c283d8e6e83942 100644 --- a/ports/gdk-pixbuf/CONTROL +++ b/ports/gdk-pixbuf/CONTROL @@ -1,5 +1,6 @@ Source: gdk-pixbuf Version: 2.36.9-5 +Port-Version: 6 Homepage: https://developer.gnome.org/gdk-pixbuf/ Description: Image loading library. Build-Depends: gettext, zlib, libpng, glib diff --git a/ports/glibmm/CMakeLists.txt b/ports/glibmm/CMakeLists.txt index 10839260a14628..15f7bff129075c 100644 --- a/ports/glibmm/CMakeLists.txt +++ b/ports/glibmm/CMakeLists.txt @@ -26,12 +26,9 @@ link_libraries( ${FFI_LIBRARY} ) -if(APPLE) - find_library(LIBINTL_LIBRARY NAMES intl) -endif() - -find_package(unofficial-iconv REQUIRED) -link_libraries(${LIBINTL_LIBRARY} unofficial::iconv::libiconv) +find_package(Intl REQUIRED) +find_package(Iconv REQUIRED) +link_libraries(${Intl_LIBRARIES} Iconv::Iconv) if(APPLE) find_library(COREFOUNDATION_LIBRARY CoreFoundation) diff --git a/ports/glibmm/CONTROL b/ports/glibmm/CONTROL index aefaf7b834a21b..59836db6f55517 100644 --- a/ports/glibmm/CONTROL +++ b/ports/glibmm/CONTROL @@ -1,5 +1,6 @@ Source: glibmm -Version: 2.52.1-11 +Version: 2.52.1 +Port-Version: 12 Description: This is glibmm, a C++ API for parts of glib that are useful for C++. Homepage: https://www.gtkmm.org. Build-Depends: zlib, pcre, libffi, gettext, libiconv, glib, libsigcpp diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 31901b9d980671..c928187a555555 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,6 +1,6 @@ Source: harfbuzz Version: 2.6.6 -Port-Version: 1 +Port-Version: 2 Description: HarfBuzz OpenType text shaping engine Homepage: https://github.com/behdad/harfbuzz Build-Depends: freetype[core], ragel, gettext (osx) diff --git a/ports/harfbuzz/glib-cmake.patch b/ports/harfbuzz/glib-cmake.patch index 519627ac710318..f982171206dad1 100644 --- a/ports/harfbuzz/glib-cmake.patch +++ b/ports/harfbuzz/glib-cmake.patch @@ -16,7 +16,7 @@ index 9b21bef2c..ae741ef63 100644 - - include_directories(${GLIBCONFIG_INCLUDE_DIR} ${GLIB_INCLUDE_DIR}) + find_package(Threads REQUIRED) -+ find_package(unofficial-iconv REQUIRED) ++ find_package(Iconv REQUIRED) + find_package(unofficial-glib CONFIG REQUIRED) list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-glib.h) @@ -24,7 +24,7 @@ index 9b21bef2c..ae741ef63 100644 - list(APPEND THIRD_PARTY_LIBS ${GLIB_LIBRARIES}) - - mark_as_advanced(GLIB_LIBRARIES GLIBCONFIG_INCLUDE_DIR GLIB_INCLUDE_DIR) -+ list(APPEND THIRD_PARTY_LIBS unofficial::glib::glib) ++ list(APPEND THIRD_PARTY_LIBS unofficial::glib::glib Iconv::Iconv) endif () if (HB_HAVE_ICU) diff --git a/ports/libcroco/CMakeLists.txt b/ports/libcroco/CMakeLists.txt index ff11792ff669ef..f8e8a71058eb68 100644 --- a/ports/libcroco/CMakeLists.txt +++ b/ports/libcroco/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.11) project(libcroco C) -find_package(unofficial-iconv REQUIRED) -find_package(unofficial-gettext CONFIG REQUIRED) +find_package(Iconv REQUIRED) +find_package(Intl REQUIRED) find_package(unofficial-glib CONFIG REQUIRED) find_package(LibXml2 REQUIRED) if(NOT WIN32) @@ -76,7 +76,7 @@ target_link_libraries(croco-0.6 PRIVATE unofficial::glib::glib unofficial::glib::gmodule unofficial::glib::gobject - ${LIBXML2_LIBRARIES} + ${LIBXML2_LIBRARIES} ${Intl_LIBRARIES} Iconv::Iconv ) install(TARGETS croco-0.6 @@ -127,8 +127,8 @@ install( file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-libcroco-config.cmake " include(CMakeFindDependencyMacro) -find_dependency(unofficial-gettext) -find_dependency(unofficial-iconv CONFIG) +find_dependency(Intl) +find_dependency(Iconv) find_dependency(unofficial-glib CONFIG) find_dependency(LibXml2) if(NOT WIN32) diff --git a/ports/libcroco/CONTROL b/ports/libcroco/CONTROL index 8badbeccc1944b..bb1ea8fd29376b 100644 --- a/ports/libcroco/CONTROL +++ b/ports/libcroco/CONTROL @@ -1,4 +1,5 @@ Source: libcroco -Version: 0.6.13-1 +Version: 0.6.13 +Port-Version: 2 Description: A standalone css2 parsing and manipulation library Build-Depends: glib, libxml2 diff --git a/ports/libidn2/CMakeLists.txt b/ports/libidn2/CMakeLists.txt index d7a5d771ee5835..cd87848f38816b 100644 --- a/ports/libidn2/CMakeLists.txt +++ b/ports/libidn2/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.8) project(libidn2 C) -find_package(unofficial-iconv REQUIRED) +find_package(Iconv REQUIRED) if(MSVC) add_definitions(-D_CRT_SECURE_NO_DEPRECATE) @@ -91,7 +91,7 @@ set(GL_SRC gl/rawmemchr.c add_library(libidn2 ${LIB_SRC} ${UNISTR_SRC} ${GL_SRC}) target_include_directories(libidn2 PRIVATE . ./unistring ./gl) -target_link_libraries(libidn2 PRIVATE unofficial::iconv::libiconv unofficial::iconv::libcharset) +target_link_libraries(libidn2 PRIVATE Iconv::Iconv) install(TARGETS libidn2 RUNTIME DESTINATION bin diff --git a/ports/libxslt/0002-Fix-lzma.patch b/ports/libxslt/0002-Fix-lzma.patch index 8c0e287ae64576..fb52844cac93c2 100644 --- a/ports/libxslt/0002-Fix-lzma.patch +++ b/ports/libxslt/0002-Fix-lzma.patch @@ -4,7 +4,7 @@ index 0d1953d..0e538ef 100644 +++ b/win32/Makefile.msvc @@ -62,9 +62,9 @@ LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX) # The libraries are needed for static builds (the makefile builds all tools and dlls) - LIBS = wsock32.lib libiconv.lib libcharset.lib + LIBS = wsock32.lib iconv.lib charset.lib !if "$(DEBUG)" == "1" -LIBS = $(LIBS) zlibd.lib +LIBS = $(LIBS) zlibd.lib lzmad.lib diff --git a/ports/xmlsec/CMakeLists.txt b/ports/xmlsec/CMakeLists.txt index 4805839feadb18..fa615ddfb575eb 100644 --- a/ports/xmlsec/CMakeLists.txt +++ b/ports/xmlsec/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_STATIC_LIBRARY_PREFIX) find_package(LibXml2 REQUIRED) find_package(OpenSSL REQUIRED) -find_package(unofficial-iconv REQUIRED) +find_package(Iconv REQUIRED) FILE(GLOB SOURCESXMLSEC src/*.c @@ -139,7 +139,7 @@ if(INSTALL_HEADERS_TOOLS) endif() target_link_libraries(xmlsec PRIVATE - ${LIBXML2_LIBRARIES} OpenSSL::SSL libxmlsec libxmlsec-openssl unofficial::iconv::libiconv + ${LIBXML2_LIBRARIES} OpenSSL::SSL libxmlsec libxmlsec-openssl Iconv::Iconv ) target_compile_definitions(xmlsec PRIVATE diff --git a/ports/xmlsec/CONTROL b/ports/xmlsec/CONTROL index 1f3750e5328e26..e4437a14d26467 100644 --- a/ports/xmlsec/CONTROL +++ b/ports/xmlsec/CONTROL @@ -1,5 +1,6 @@ Source: xmlsec Version: 1.2.30 +Port-Version: 1 Homepage: https://www.aleksey.com/xmlsec/ Description: XML Security Library is a C library based on LibXML2. The library supports major XML security standards. Build-Depends: libxml2, openssl From 89ebe285c615d1625bde4a078bf27067d97081bc Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 15:28:26 +0200 Subject: [PATCH 045/114] [expat] use a higher commit hash with a better stabilized cmake build --- ports/expat/395.diff | 33 ----- ports/expat/398.diff | 13 -- ports/expat/408.diff | 147 -------------------- ports/expat/412.diff | 36 ----- ports/expat/fix-find-package-by-cmake.patch | 11 -- ports/expat/pkgconfig.patch | 19 +-- ports/expat/portfile.cmake | 10 +- 7 files changed, 6 insertions(+), 263 deletions(-) delete mode 100644 ports/expat/395.diff delete mode 100644 ports/expat/398.diff delete mode 100644 ports/expat/408.diff delete mode 100644 ports/expat/412.diff diff --git a/ports/expat/395.diff b/ports/expat/395.diff deleted file mode 100644 index 63f82c0227c5d1..00000000000000 --- a/ports/expat/395.diff +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c -index 8b8c6f07..638ea528 100644 ---- a/expat/lib/xmlparse.c -+++ b/expat/lib/xmlparse.c -@@ -48,6 +48,17 @@ - #include /* fprintf */ - #include /* getenv, rand_s */ - -+#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1600) -+/* vs2008/9.0 and earlier lack stdint.h; _MSC_VER 1600 is vs2010/10.0 */ -+# if defined(_WIN64) -+typedef unsigned __int64 uintptr_t; -+# else -+typedef unsigned __int32 uintptr_t; -+# endif -+#else -+# include /* uintptr_t */ -+#endif -+ - #ifdef _WIN32 - # define getpid GetCurrentProcessId - #else -@@ -121,9 +132,7 @@ - # define XmlGetInternalEncoding XmlGetUtf16InternalEncoding - # define XmlGetInternalEncodingNS XmlGetUtf16InternalEncodingNS - # define XmlEncode XmlUtf16Encode --/* Using pointer subtraction to convert to integer type. */ --# define MUST_CONVERT(enc, s) \ -- (! (enc)->isUtf16 || (((char *)(s) - (char *)NULL) & 1)) -+# define MUST_CONVERT(enc, s) (! (enc)->isUtf16 || (((uintptr_t)(s)) & 1)) - typedef unsigned short ICHAR; - #else - # define XML_ENCODE_MAX XML_UTF8_ENCODE_MAX diff --git a/ports/expat/398.diff b/ports/expat/398.diff deleted file mode 100644 index 8cd124e4acf068..00000000000000 --- a/ports/expat/398.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c -index 638ea528..849411ce 100644 ---- a/expat/lib/xmlparse.c -+++ b/expat/lib/xmlparse.c -@@ -6506,7 +6506,7 @@ hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) { - static void FASTCALL - hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) { - iter->p = table->v; -- iter->end = iter->p + table->size; -+ iter->end = iter->p ? iter->p + table->size : NULL; - } - - static NAMED *FASTCALL diff --git a/ports/expat/408.diff b/ports/expat/408.diff deleted file mode 100644 index 7834f3f0c2dab5..00000000000000 --- a/ports/expat/408.diff +++ /dev/null @@ -1,147 +0,0 @@ -diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt -index 32a9732f..b43dffa2 100644 ---- a/expat/CMakeLists.txt -+++ b/expat/CMakeLists.txt -@@ -279,22 +279,18 @@ endif(EXPAT_SHARED_LIBS) - - # Avoid colliding with Expat.dll of Perl's XML::Parser::Expat - if(WIN32 AND NOT MINGW) -- set(EXPAT_TARGET libexpat) # CMAKE_*_POSTFIX applies, see above -+ set(_EXPAT_OUTPUT_NAME libexpat) # CMAKE_*_POSTFIX applies, see above - else() - if(_EXPAT_UNICODE) -- set(EXPAT_TARGET expatw) -+ set(_EXPAT_OUTPUT_NAME expatw) - else() -- set(EXPAT_TARGET expat) -+ set(_EXPAT_OUTPUT_NAME expat) - endif() - endif() - --if(_EXPAT_PARENT_DIRECTORY) -- set(EXPAT_TARGET "${EXPAT_TARGET}" PARENT_SCOPE) --endif() -- --add_library(${EXPAT_TARGET} ${_SHARED} ${expat_SRCS}) -+add_library(expat ${_SHARED} ${expat_SRCS}) - if(EXPAT_WITH_LIBBSD) -- target_link_libraries(${EXPAT_TARGET} ${LIB_BSD}) -+ target_link_libraries(expat ${LIB_BSD}) - endif() - - set(LIBCURRENT 7) # sync -@@ -302,13 +298,14 @@ set(LIBREVISION 11) # with - set(LIBAGE 6) # configure.ac! - math(EXPR LIBCURRENT_MINUS_AGE "${LIBCURRENT} - ${LIBAGE}") - -+set_property(TARGET expat PROPERTY OUTPUT_NAME "${_EXPAT_OUTPUT_NAME}") - if(NOT WIN32) -- set_property(TARGET ${EXPAT_TARGET} PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION}) -- set_property(TARGET ${EXPAT_TARGET} PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE}) -- set_property(TARGET ${EXPAT_TARGET} PROPERTY NO_SONAME ${NO_SONAME}) -+ set_property(TARGET expat PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION}) -+ set_property(TARGET expat PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE}) -+ set_property(TARGET expat PROPERTY NO_SONAME ${NO_SONAME}) - endif(NOT WIN32) - --target_include_directories(${EXPAT_TARGET} -+target_include_directories(expat - INTERFACE - $ - $ -@@ -316,10 +313,10 @@ target_include_directories(${EXPAT_TARGET} - ) - - if(NOT EXPAT_SHARED_LIBS AND WIN32) -- target_compile_definitions(${EXPAT_TARGET} PUBLIC -DXML_STATIC) -+ target_compile_definitions(expat PUBLIC -DXML_STATIC) - endif() - --expat_install(TARGETS ${EXPAT_TARGET} EXPORT expat -+expat_install(TARGETS expat EXPORT expat - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -@@ -334,8 +331,8 @@ if(NOT MSVC) - set(exec_prefix "\${prefix}") - set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") - set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") -- configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${EXPAT_TARGET}.pc @ONLY) -- expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${EXPAT_TARGET}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -+ configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc @ONLY) -+ expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - endif() - - # -@@ -351,7 +348,7 @@ if(EXPAT_BUILD_TOOLS) - - add_executable(xmlwf ${xmlwf_SRCS}) - set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf) -- target_link_libraries(xmlwf ${EXPAT_TARGET}) -+ target_link_libraries(xmlwf expat) - expat_install(TARGETS xmlwf DESTINATION ${CMAKE_INSTALL_BINDIR}) - - if(MINGW AND _EXPAT_UNICODE_WCHAR_T) -@@ -367,7 +364,7 @@ if(EXPAT_BUILD_TOOLS) - "${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_BINARY_DIR}/doc/xmlwf.1" - BYPRODUCTS - doc/xmlwf.1) -- add_dependencies(${EXPAT_TARGET} xmlwf-manpage) -+ add_dependencies(expat xmlwf-manpage) - expat_install(FILES "${PROJECT_BINARY_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) - elseif(EXISTS ${PROJECT_SOURCE_DIR}/doc/xmlwf.1) - expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) -@@ -380,11 +377,11 @@ endif() - if(EXPAT_BUILD_EXAMPLES) - add_executable(elements examples/elements.c) - set_property(TARGET elements PROPERTY RUNTIME_OUTPUT_DIRECTORY examples) -- target_link_libraries(elements ${EXPAT_TARGET}) -+ target_link_libraries(elements expat) - - add_executable(outline examples/outline.c) - set_property(TARGET outline PROPERTY RUNTIME_OUTPUT_DIRECTORY examples) -- target_link_libraries(outline ${EXPAT_TARGET}) -+ target_link_libraries(outline expat) - endif(EXPAT_BUILD_EXAMPLES) - - # -@@ -419,12 +416,12 @@ if(EXPAT_BUILD_TESTS) - - add_executable(runtests tests/runtests.c ${test_SRCS}) - set_property(TARGET runtests PROPERTY RUNTIME_OUTPUT_DIRECTORY tests) -- target_link_libraries(runtests ${EXPAT_TARGET}) -+ target_link_libraries(runtests expat) - expat_add_test(runtests $) - - add_executable(runtestspp tests/runtestspp.cpp ${test_SRCS}) - set_property(TARGET runtestspp PROPERTY RUNTIME_OUTPUT_DIRECTORY tests) -- target_link_libraries(runtestspp ${EXPAT_TARGET}) -+ target_link_libraries(runtestspp expat) - expat_add_test(runtestspp $) - endif(EXPAT_BUILD_TESTS) - -@@ -569,7 +566,7 @@ write_basic_package_version_file( - ) - export( - TARGETS -- ${EXPAT_TARGET} -+ expat - FILE - cmake/expat-targets.cmake # not going to be installed - ) -diff --git a/expat/expat.pc.in b/expat/expat.pc.in -index a89cdd82..bdfa47f8 100644 ---- a/expat/expat.pc.in -+++ b/expat/expat.pc.in -@@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@ - libdir=@libdir@ - includedir=@includedir@ - --Name: @EXPAT_TARGET@ -+Name: @_EXPAT_OUTPUT_NAME@ - Version: @PACKAGE_VERSION@ - Description: expat XML parser - URL: http://www.libexpat.org --Libs: -L${libdir} -l@EXPAT_TARGET@ -+Libs: -L${libdir} -l@_EXPAT_OUTPUT_NAME@ - Cflags: -I${includedir} diff --git a/ports/expat/412.diff b/ports/expat/412.diff deleted file mode 100644 index dc6e8262fde591..00000000000000 --- a/ports/expat/412.diff +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/expat/lib/xmltok_impl.c b/expat/lib/xmltok_impl.c -index c209221c..06d5c908 100644 ---- a/expat/lib/xmltok_impl.c -+++ b/expat/lib/xmltok_impl.c -@@ -1768,13 +1768,14 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, - # define LEAD_CASE(n) \ - case BT_LEAD##n: \ - ptr += n; \ -+ pos->columnNumber++; \ - break; - LEAD_CASE(2) - LEAD_CASE(3) - LEAD_CASE(4) - # undef LEAD_CASE - case BT_LF: -- pos->columnNumber = (XML_Size)-1; -+ pos->columnNumber = 0; - pos->lineNumber++; - ptr += MINBPC(enc); - break; -@@ -1783,13 +1784,13 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, - ptr += MINBPC(enc); - if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF) - ptr += MINBPC(enc); -- pos->columnNumber = (XML_Size)-1; -+ pos->columnNumber = 0; - break; - default: - ptr += MINBPC(enc); -+ pos->columnNumber++; - break; - } -- pos->columnNumber++; - } - } - diff --git a/ports/expat/fix-find-package-by-cmake.patch b/ports/expat/fix-find-package-by-cmake.patch index 830327944ca236..b16216750facf3 100644 --- a/ports/expat/fix-find-package-by-cmake.patch +++ b/ports/expat/fix-find-package-by-cmake.patch @@ -2,17 +2,6 @@ diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index 2084424..f3b9207 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt -@@ -269,6 +269,10 @@ if(EXPAT_WITH_LIBBSD) - target_link_libraries(${_EXPAT_TARGET} ${LIB_BSD}) - endif() - -+target_include_directories(${_EXPAT_TARGET} INTERFACE -+ $ -+ $) -+ - set(LIBCURRENT 7) # sync - set(LIBREVISION 11) # with - set(LIBAGE 6) # configure.ac! @@ -490,7 +494,7 @@ configure_package_config_file( cmake/expat-config.cmake.in cmake/expat-config.cmake diff --git a/ports/expat/pkgconfig.patch b/ports/expat/pkgconfig.patch index 650ad36fdf9685..401daf737e10c0 100644 --- a/ports/expat/pkgconfig.patch +++ b/ports/expat/pkgconfig.patch @@ -2,27 +2,14 @@ diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index a67f081b1..cc220f2a1 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt -@@ -294,7 +294,11 @@ expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL +@@ -294,7 +294,9 @@ expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL # # pkg-config file # ++string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UPPER) ++set(_EXPAT_OUTPUT_NAME ${_EXPAT_OUTPUT_NAME}${CMAKE_${BUILD_TYPE_UPPER}_POSTFIX}) -if(NOT MSVC) +if(1) -+ set(libname ${_EXPAT_TARGET}) -+ if(MSVC AND CMAKE_BUILD_TYPE STREQUAL "Debug") -+ set(libname ${_EXPAT_TARGET}d) -+ endif() set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix "\${prefix}") set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") -diff --git a/expat/expat.pc.in b/expat/expat.pc.in -index 5207e3e1b..8835d1385 100644 ---- a/expat/expat.pc.in -+++ b/expat/expat.pc.in -@@ -7,5 +7,5 @@ Name: expat - Version: @PACKAGE_VERSION@ - Description: expat XML parser - URL: http://www.libexpat.org --Libs: -L${libdir} -lexpat -+Libs: -L${libdir} -l@libname@ - Cflags: -I${includedir} diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index 4831046ab616f6..e1dd18ad7b02a9 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -1,15 +1,11 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libexpat/libexpat - REF a7bc26b69768f7fb24f0c7976fae24b157b85b13 #tag 2.2.9 - SHA512 18842d5c9ff89654c5beeb9daba7ff5a911da318d419735fb14a5acbe0d1b4ac07077822c70cfa5c845892bcec2d72f8f265b9a259fe459092864f4d1754f8dd + REF c092d40c300c6d219cb3b111932a824022265370 #Head from 20.08.2020 + SHA512 5a5d41b500f5602a32aea8f4e15593e639206bb3f97553497e80b2975360cac88ac90386f5efc11728614f24bbb620fb908a3c8ca71c9e7b312f6157b2477afe HEAD_REF master PATCHES - 395.diff - 398.diff - #408.diff CMake target changes. Missing a previous PR. Would be nice if somebody finds the missing merged PR so that this can be applied. - 412.diff - fix-find-package-by-cmake.patch + fix-find-package-by-cmake.patch # This patch seems unnecessary pkgconfig.patch ) From c5ead8429b11060bf782113dfc1db2599915e96c Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 15:30:27 +0200 Subject: [PATCH 046/114] forgot freexl regression --- ports/freexl/CONTROL | 2 +- ports/freexl/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/freexl/CONTROL b/ports/freexl/CONTROL index 1a887b1932ad42..3855a9cad33f51 100644 --- a/ports/freexl/CONTROL +++ b/ports/freexl/CONTROL @@ -1,6 +1,6 @@ Source: freexl Version: 1.0.4 -Port-Version: 10 +Port-Version: 11 Homepage: https://www.gaia-gis.it/gaia-sins/freexl-sources Description: FreeXL is an open source library to extract valid data from within an Excel (.xls) spreadsheet Build-Depends: libiconv diff --git a/ports/freexl/portfile.cmake b/ports/freexl/portfile.cmake index 6a79451dd77d95..6b4998b679e99c 100644 --- a/ports/freexl/portfile.cmake +++ b/ports/freexl/portfile.cmake @@ -16,12 +16,12 @@ if (VCPKG_TARGET_IS_WINDOWS) ) set(LIBS_ALL_DBG - "\"${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib\" \ - \"${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib\"" + "\"${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib\" \ + \"${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib\"" ) set(LIBS_ALL_REL - "\"${CURRENT_INSTALLED_DIR}/lib/libiconv.lib\" \ - \"${CURRENT_INSTALLED_DIR}/lib/libcharset.lib\"" + "\"${CURRENT_INSTALLED_DIR}/lib/iconv.lib\" \ + \"${CURRENT_INSTALLED_DIR}/lib/charset.lib\"" ) vcpkg_install_nmake( From 40ec145301abca9b360c6bb0ad6e68fb6a12cc2a Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 16:27:43 +0200 Subject: [PATCH 047/114] more unofficial fixes --- ports/ffmpeg/CONTROL | 2 +- ports/ffmpeg/FindFFMPEG.cmake.in | 6 ++-- ports/glib/CMakeLists.txt | 28 +++++++-------- ports/glib/CONTROL | 2 +- .../cmake/unofficial-glib-config.in.cmake | 2 +- ports/gmime/CMakeLists.txt | 4 +-- ports/gmime/CONTROL | 1 + ports/libtorrent/CONTROL | 1 + ports/libtorrent/fix_find_iconv.patch | 35 ------------------- ports/libtorrent/portfile.cmake | 1 - ports/libxmlpp/CMakeLists.txt | 4 +-- ports/libxmlpp/CONTROL | 3 +- ports/osg/CONTROL | 1 + ports/osg/fix-example-application.patch | 8 ++--- ports/poco/CONTROL | 2 +- ports/poco/use-vcpkg-expat.patch | 8 ++--- ports/tesseract/CONTROL | 2 +- ports/tesseract/fix-text2image.patch | 12 +++---- 18 files changed, 41 insertions(+), 81 deletions(-) delete mode 100644 ports/libtorrent/fix_find_iconv.patch diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 44f63079caedff..c9ea04fa4ab6d9 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,6 +1,6 @@ Source: ffmpeg Version: 4.2 -Port-Version: 20 +Port-Version: 21 Homepage: https://ffmpeg.org Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations. diff --git a/ports/ffmpeg/FindFFMPEG.cmake.in b/ports/ffmpeg/FindFFMPEG.cmake.in index 5eee6e73f0523d..19e8eff02599af 100644 --- a/ports/ffmpeg/FindFFMPEG.cmake.in +++ b/ports/ffmpeg/FindFFMPEG.cmake.in @@ -44,9 +44,9 @@ if(@ENABLE_BZIP2@) endif() if(@ENABLE_ICONV@) - find_dependency(unofficial-iconv) - get_target_property(ICONV_LIBRARY_RELEASE unofficial::iconv::libiconv IMPORTED_LOCATION_RELEASE) - get_target_property(ICONV_LIBRARY_DEBUG unofficial::iconv::libiconv IMPORTED_LOCATION_DEBUG) + find_dependency(Iconv) + get_target_property(ICONV_LIBRARY_RELEASE Iconv::Iconv IMPORTED_LOCATION_RELEASE) + get_target_property(ICONV_LIBRARY_DEBUG Iconv::Iconv IMPORTED_LOCATION_DEBUG) list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${ICONV_LIBRARY_DEBUG}>$<$:${ICONV_LIBRARY_RELEASE}>") endif() diff --git a/ports/glib/CMakeLists.txt b/ports/glib/CMakeLists.txt index 25f1691d38d6e0..cc24a2f63ae00b 100644 --- a/ports/glib/CMakeLists.txt +++ b/ports/glib/CMakeLists.txt @@ -45,11 +45,7 @@ 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) + find_package(Intl REQUIRED) endif() if(WIN32) @@ -139,7 +135,7 @@ if(NOT WIN32) 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} Iconv::Iconv ${LIBINTL_LIBRARY}) +target_link_libraries(glib PRIVATE ${PCRE_LIBRARY} Iconv::Iconv ${Intl_LIBRARIES}) if(WIN32) target_compile_definitions(glib PRIVATE USE_SYSTEM_PCRE) target_link_libraries(glib PRIVATE ws2_32 winmm advapi32 ole32 shell32) @@ -149,7 +145,7 @@ else() 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 $ $) +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) @@ -165,8 +161,8 @@ 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}) +target_link_libraries(gthread PRIVATE glib ${Intl_LIBRARIES}) +target_include_directories(gthread PRIVATE ${Intl_INCLUDE_DIRS}) list(APPEND GLIB_TARGETS gthread) # gobject @@ -185,9 +181,9 @@ 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_link_libraries(gmodule PRIVATE glib ${Intl_LIBRARIES}) target_include_directories(gmodule PUBLIC $) -target_include_directories(gmodule PRIVATE ${LIBINTL_INCLUDE_DIR} PUBLIC $) +target_include_directories(gmodule PRIVATE ${Intl_INCLUDE_DIRS} PUBLIC $) list(APPEND GLIB_TARGETS gmodule) if(NOT GLIB_SKIP_HEADERS) install(FILES gmodule/gmodule.h DESTINATION include) @@ -254,7 +250,7 @@ if(NOT GLIB_SKIP_HEADERS) 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_link_libraries(gio PRIVATE glib gmodule gobject ZLIB::ZLIB ${LIBRESOLV_LIBRARY} ${Intl_LIBRARIES}) target_include_directories(gio PUBLIC $ $) if(WIN32) target_link_libraries(gio PRIVATE ws2_32 shlwapi dnsapi iphlpapi advapi32 shell32) @@ -280,9 +276,9 @@ endforeach() macro(add_glib_tool TOOL_NAME) add_executable(${TOOL_NAME} ${ARGN}) if(WIN32) - target_link_libraries(${TOOL_NAME} glib ${LIBINTL_LIBRARY} shell32) + target_link_libraries(${TOOL_NAME} glib ${Intl_LIBRARIES} shell32) else() - target_link_libraries(${TOOL_NAME} glib ${LIBINTL_LIBRARY}) + target_link_libraries(${TOOL_NAME} glib ${Intl_LIBRARIES}) endif() target_compile_definitions(${TOOL_NAME} PRIVATE GLIB_COMPILATION) list(APPEND GLIB_TOOLS ${TOOL_NAME}) @@ -290,7 +286,7 @@ 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_link_libraries(${TOOL_NAME} PRIVATE glib gio gobject gmodule ${Intl_LIBRARIES}) target_include_directories(${TOOL_NAME} PRIVATE gmodule gio) target_compile_definitions(${TOOL_NAME} PRIVATE GIO_COMPILATION) list(APPEND GLIB_TOOLS ${TOOL_NAME}) @@ -359,7 +355,7 @@ message(STATUS " " ${PCRE_LIBRARY}) message(STATUS " " ${ICONV_LIBRARY}) message(STATUS " " ${CHARSET_LIBRARY}) message(STATUS " " ${FFI_LIBRARY}) -message(STATUS " " ${LIBINTL_LIBRARY}) +message(STATUS " " ${Intl_LIBRARIES}) set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix ${CMAKE_INSTALL_PREFIX}) diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL index 8726e2b72e2e1e..8d74d5613b3244 100644 --- a/ports/glib/CONTROL +++ b/ports/glib/CONTROL @@ -1,6 +1,6 @@ Source: glib Version: 2.52.3 -Port-Version: 22 +Port-Version: 23 Homepage: https://developer.gnome.org/glib/ Description: Portable, general-purpose utility library. Build-Depends: zlib, pcre, libffi, gettext, libiconv diff --git a/ports/glib/cmake/unofficial-glib-config.in.cmake b/ports/glib/cmake/unofficial-glib-config.in.cmake index ea87ea0b230bca..6edc8348be7e34 100644 --- a/ports/glib/cmake/unofficial-glib-config.in.cmake +++ b/ports/glib/cmake/unofficial-glib-config.in.cmake @@ -1,5 +1,5 @@ include(CMakeFindDependencyMacro) -find_dependency(unofficial-iconv) +find_dependency(Iconv) if(NOT WIN32) find_dependency(Threads) endif() diff --git a/ports/gmime/CMakeLists.txt b/ports/gmime/CMakeLists.txt index 51ea75cd3cd5fc..cefc0f22672444 100644 --- a/ports/gmime/CMakeLists.txt +++ b/ports/gmime/CMakeLists.txt @@ -7,7 +7,7 @@ set(GMIME_LIB_SUFFIX 3.0) find_package(zlib REQUIRED) find_package(unofficial-glib CONFIG REQUIRED) -find_package(unofficial-iconv REQUIRED) +find_package(Iconv REQUIRED) find_library(IDN_LIBRARY NAMES libidn2) @@ -45,7 +45,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES ) target_include_directories(${PROJECT_NAME} PRIVATE . ./util) -target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::iconv::libiconv ZLIB::ZLIB ${IDN_LIBRARY}) +target_link_libraries(${PROJECT_NAME} PRIVATE Iconv::Iconv ZLIB::ZLIB ${IDN_LIBRARY}) target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::glib::gobject unofficial::glib::gio unofficial::glib::glib) target_link_libraries(${PROJECT_NAME} PRIVATE Ws2_32.lib) diff --git a/ports/gmime/CONTROL b/ports/gmime/CONTROL index c22fa3f60b7c17..afd4308be67a8f 100644 --- a/ports/gmime/CONTROL +++ b/ports/gmime/CONTROL @@ -1,5 +1,6 @@ Source: gmime Version: 3.2.6 +Port-Version: 1 Build-Depends: zlib, glib, libiconv, libidn2 Homepage: https://developer.gnome.org/gmime/ Description: GMime is a C/C++ library which may be used for the creation and parsing of messages using the Multipurpose Internet Mail Extension (MIME). diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL index 48505d85a58978..975e90fcc15cb1 100644 --- a/ports/libtorrent/CONTROL +++ b/ports/libtorrent/CONTROL @@ -1,5 +1,6 @@ Source: libtorrent Version: 1.2.8 +Post-Version: 1 Homepage: https://github.com/arvidn/libtorrent Description: An efficient feature complete C++ BitTorrent implementation Build-Depends: openssl, boost-system, boost-date-time, boost-chrono, boost-random, boost-asio, boost-crc, boost-config, boost-iterator, boost-scope-exit, boost-multiprecision, boost-variant diff --git a/ports/libtorrent/fix_find_iconv.patch b/ports/libtorrent/fix_find_iconv.patch deleted file mode 100644 index cf30ef18f17f55..00000000000000 --- a/ports/libtorrent/fix_find_iconv.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 303f905e4..6bdbc5ac4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -603,24 +603,19 @@ target_optional_compile_definitions(torrent-rasterbar PUBLIC FEATURE NAME mutabl - target_optional_compile_definitions(torrent-rasterbar PUBLIC FEATURE NAME streaming DEFAULT ON - DESCRIPTION "Enables support for piece deadline" DISABLED TORRENT_DISABLE_STREAMING) - --find_public_dependency(Iconv) --if(MSVC) -- set(iconv_package_type OPTIONAL) --else() -- set(iconv_package_type RECOMMENDED) --endif() -+find_public_dependency(unofficial-iconv REQUIRED) - --set_package_properties(Iconv -+set_package_properties(unofficial-iconv - PROPERTIES - URL "https://www.gnu.org/software/libiconv/" -- DESCRIPTION "GNU encoding conversion library" -- TYPE ${iconv_package_type} -+ DESCRIPTION "GNU encoding conversion library (unofficial vcpkg CMake port)" -+ TYPE REQUIRED - PURPOSE "Convert strings between various encodings" - ) - --if(Iconv_FOUND) -+if(unofficial-iconv_FOUND) - target_compile_definitions(torrent-rasterbar PUBLIC TORRENT_USE_ICONV) -- target_link_libraries(torrent-rasterbar PRIVATE Iconv::Iconv) -+ target_link_libraries(torrent-rasterbar PRIVATE unofficial::iconv::libiconv unofficial::iconv::libcharset) - endif() - - find_public_dependency(OpenSSL) diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake index e88ddf7cc2ce85..bad783a97e9462 100644 --- a/ports/libtorrent/portfile.cmake +++ b/ports/libtorrent/portfile.cmake @@ -7,7 +7,6 @@ if(VCPKG_TARGET_IS_WINDOWS) endif() if("iconv" IN_LIST FEATURES) - set(ICONV_PATCH "fix_find_iconv.patch") else() # prevent picking up libiconv if it happens to already be installed set(ICONV_PATCH "no_use_iconv.patch") diff --git a/ports/libxmlpp/CMakeLists.txt b/ports/libxmlpp/CMakeLists.txt index bbaae7cda22486..0ff2f23fe77b99 100644 --- a/ports/libxmlpp/CMakeLists.txt +++ b/ports/libxmlpp/CMakeLists.txt @@ -21,8 +21,8 @@ if(APPLE) find_library(LIBINTL_LIBRARY NAMES intl) endif() -find_package(unofficial-iconv REQUIRED) -link_libraries(${LIBINTL_LIBRARY} unofficial::iconv::libiconv) +find_package(Iconv REQUIRED) +link_libraries(${LIBINTL_LIBRARY} Iconv::Iconv) if(APPLE) find_library(COREFOUNDATION_LIBRARY CoreFoundation) diff --git a/ports/libxmlpp/CONTROL b/ports/libxmlpp/CONTROL index 247704f9f20642..b737bde3c9ecfa 100644 --- a/ports/libxmlpp/CONTROL +++ b/ports/libxmlpp/CONTROL @@ -1,4 +1,5 @@ Source: libxmlpp -Version: 2.40.1-5 +Version: 2.40.1 +Port-Version: 6 Description: a C++ wrapper for the libxml XML parser library. Build-Depends: libxml2, glibmm diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL index 6a7d856da9c853..95e83968866da1 100644 --- a/ports/osg/CONTROL +++ b/ports/osg/CONTROL @@ -1,5 +1,6 @@ Source: osg Version: 3.6.5 +Port-Version: 1 Homepage: https://github.com/openscenegraph/OpenSceneGraph Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit. Build-Depends: zlib, fontconfig, boost-asio (!windows), boost-core (!windows), boost-logic (!windows), boost-lexical-cast (!windows), boost-smart-ptr (!windows), boost-tuple (!windows), boost-bind (!windows), freeglut (windows), expat (windows), openimageio (osx) diff --git a/ports/osg/fix-example-application.patch b/ports/osg/fix-example-application.patch index 4745f8b413c9b2..3b4da587dd7656 100644 --- a/ports/osg/fix-example-application.patch +++ b/ports/osg/fix-example-application.patch @@ -8,9 +8,9 @@ index df859d0..123313a 100644 SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32) + + find_package(EXPAT REQUIRED) -+ find_package(unofficial-iconv CONFIG REQUIRED) ++ find_package(Iconv CONFIG REQUIRED) + -+ list(APPEND TARGET_EXTERNAL_LIBRARIES EXPAT::EXPAT unofficial::iconv::libiconv unofficial::iconv::libcharset) ++ list(APPEND TARGET_EXTERNAL_LIBRARIES EXPAT::EXPAT Iconv::Iconv) ELSE() CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" LIB_NSL_HAS_GETHOSTBYNAME) IF(LIB_NSL_HAS_GETHOSTBYNAME) @@ -24,9 +24,9 @@ index 071ab26..bf8d85f 100644 +IF (WIN32) + find_package(EXPAT REQUIRED) -+ find_package(unofficial-iconv CONFIG REQUIRED) ++ find_package(Iconv CONFIG REQUIRED) + -+ list(APPEND TARGET_EXTERNAL_LIBRARIES EXPAT::EXPAT unofficial::iconv::libiconv unofficial::iconv::libcharset) ++ list(APPEND TARGET_EXTERNAL_LIBRARIES EXPAT::EXPAT Iconv::Iconv) +ENDIF() + SET(TARGET_SRC osgstaticviewer.cpp ) diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index 17c74d0aab9db7..939a74945fb7a4 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,6 +1,6 @@ Source: poco Version: 1.9.2 -Port-Version: 3 +Port-Version: 4 Build-Depends: expat, libpq, pcre, sqlite3, zlib, libpng Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. Homepage: https://github.com/pocoproject/poco diff --git a/ports/poco/use-vcpkg-expat.patch b/ports/poco/use-vcpkg-expat.patch index ee1990b9ef4dc4..971e37908111d8 100644 --- a/ports/poco/use-vcpkg-expat.patch +++ b/ports/poco/use-vcpkg-expat.patch @@ -2,17 +2,13 @@ diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt index d4a502a..780f5d0 100644 --- a/XML/CMakeLists.txt +++ b/XML/CMakeLists.txt -@@ -23,7 +23,12 @@ endif() +@@ -23,7 +23,8 @@ endif() # If POCO_UNBUNDLED is enabled we try to find the required packages # The configuration will fail if the packages are not found if (POCO_UNBUNDLED) - find_package(EXPAT REQUIRED) + find_package(expat CONFIG REQUIRED) -+ if(WIN32 AND NOT MINGW) -+ set(EXPAT_LIBRARIES expat::libexpat) -+ else() -+ set(EXPAT_LIBRARIES expat::expat) -+ endif() ++ set(EXPAT_LIBRARIES expat::expat) set(SYSLIBS ${SYSLIBS} ${EXPAT_LIBRARIES}) include_directories(${EXPAT_INCLUDE_DIRS}) else() diff --git a/ports/tesseract/CONTROL b/ports/tesseract/CONTROL index 7f646fdaf66a66..0524821bf212f3 100644 --- a/ports/tesseract/CONTROL +++ b/ports/tesseract/CONTROL @@ -1,6 +1,6 @@ Source: tesseract Version: 4.1.1 -Port-Version: 1 +Port-Version: 2 Homepage: https://github.com/tesseract-ocr/tesseract Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google. Build-Depends: leptonica diff --git a/ports/tesseract/fix-text2image.patch b/ports/tesseract/fix-text2image.patch index 8a9c6caf49b343..e9623f4ac9645d 100644 --- a/ports/tesseract/fix-text2image.patch +++ b/ports/tesseract/fix-text2image.patch @@ -35,8 +35,8 @@ index 8fd96a9..186341e 100644 -pkg_check_modules(FontConfig REQUIRED fontconfig) +find_package(unofficial-cairo CONFIG REQUIRED) +find_package(unofficial-glib CONFIG REQUIRED) -+find_package(unofficial-gettext CONFIG REQUIRED) -+find_package(unofficial-fontconfig CONFIG REQUIRED) ++find_package(Intl CONFIG REQUIRED) ++find_package(Fontconfig REQUIRED) +find_package(Freetype REQUIRED) +if(UNIX OR BUILD_SHARED_LIBS) + find_package(harfbuzz CONFIG REQUIRED) @@ -76,8 +76,8 @@ index 8fd96a9..186341e 100644 + Freetype::Freetype + unofficial::glib::gio unofficial::glib::glib unofficial::glib::gmodule unofficial::glib::gobject + unofficial::cairo::cairo unofficial::cairo::cairo-gobject -+ unofficial::gettext::libintl -+ unofficial::fontconfig::fontconfig ++ ${Intl_LIBRARIES} ++ Fontconfig::Fontconfig +) +else() + target_link_libraries (text2image @@ -89,8 +89,8 @@ index 8fd96a9..186341e 100644 + Freetype::Freetype + unofficial::glib::gio unofficial::glib::glib unofficial::glib::gmodule unofficial::glib::gobject + unofficial::cairo::cairo unofficial::cairo::cairo-gobject -+ unofficial::gettext::libintl -+ unofficial::fontconfig::fontconfig ++ ${Intl_LIBRARIES} ++ Fontconfig::Fontconfig + ) endif() if (CPPAN_BUILD) From dab51a486731957663b374a89df695008c4ce639 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 17:02:41 +0200 Subject: [PATCH 048/114] fix downstream expat usage --- ports/fontconfig/CMakeLists.txt | 6 +----- ports/fontconfig/CONTROL | 2 +- ports/itk/CONTROL | 2 +- ports/itk/expat.patch | 8 ++------ ports/poco/CONTROL | 2 +- ports/poco/use-vcpkg-expat.patch | 8 ++------ ports/wxwidgets/CONTROL | 2 +- ports/wxwidgets/fix-expat.patch | 7 ++----- 8 files changed, 11 insertions(+), 26 deletions(-) diff --git a/ports/fontconfig/CMakeLists.txt b/ports/fontconfig/CMakeLists.txt index 366436e4935ae7..61197ed92dbd04 100644 --- a/ports/fontconfig/CMakeLists.txt +++ b/ports/fontconfig/CMakeLists.txt @@ -52,11 +52,7 @@ else() target_include_directories(fontconfig PRIVATE ${FC_INCLUDE_DIR}/unix) endif() -if(WIN32 AND NOT MINGW) - target_link_libraries(fontconfig PRIVATE unofficial::iconv::libiconv Freetype::Freetype expat::libexpat) -else() - target_link_libraries(fontconfig PRIVATE unofficial::iconv::libiconv Freetype::Freetype expat::expat) -endif() +target_link_libraries(fontconfig PRIVATE unofficial::iconv::libiconv Freetype::Freetype expat::expat) install(TARGETS fontconfig EXPORT fontconfig-targets diff --git a/ports/fontconfig/CONTROL b/ports/fontconfig/CONTROL index 80554738c3b8a1..e541f560a71d26 100644 --- a/ports/fontconfig/CONTROL +++ b/ports/fontconfig/CONTROL @@ -1,6 +1,6 @@ Source: fontconfig Version: 2.12.4 -Port-Version: 12 +Port-Version: 13 Homepage: https://www.freedesktop.org/software/fontconfig/front.html Description: Library for configuring and customizing font access. Build-Depends: freetype, expat, libiconv, dirent diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL index e0dabeeb169288..94135373ec0260 100644 --- a/ports/itk/CONTROL +++ b/ports/itk/CONTROL @@ -1,6 +1,6 @@ Source: itk Version: 5.1.0 -Port-Version: 1 +Port-Version: 2 Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis. Homepage: https://github.com/InsightSoftwareConsortium/ITK Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, eigen3, hdf5[core,cpp], openjpeg[core], fftw3[core], gtest, gdcm, icu, minc diff --git a/ports/itk/expat.patch b/ports/itk/expat.patch index 44ef3a38129e84..dc336768c2a0e1 100644 --- a/ports/itk/expat.patch +++ b/ports/itk/expat.patch @@ -23,7 +23,7 @@ diff --git a/Modules/ThirdParty/Expat/CMakeLists.txt b/Modules/ThirdParty/Expat/ index f69709d..9b49323 100644 --- a/Modules/ThirdParty/Expat/CMakeLists.txt +++ b/Modules/ThirdParty/Expat/CMakeLists.txt -@@ -5,10 +5,12 @@ option(ITK_USE_SYSTEM_EXPAT "Use system-installed expat" ${ITK_USE_SYSTEM_LIBRAR +@@ -5,10 +5,8 @@ option(ITK_USE_SYSTEM_EXPAT "Use system-installed expat" ${ITK_USE_SYSTEM_LIBRAR mark_as_advanced(ITK_USE_SYSTEM_EXPAT) if(ITK_USE_SYSTEM_EXPAT) @@ -32,11 +32,7 @@ index f69709d..9b49323 100644 - set(ITKExpat_SYSTEM_INCLUDE_DIRS "${EXPAT_INCLUDE_DIR}") - set(ITKExpat_LIBRARIES "${EXPAT_LIBRARY}") + find_package(expat CONFIG REQUIRED) -+ if(WIN32 AND NOT MINGW) -+ set(ITKExpat_LIBRARIES expat::libexpat) -+ else() -+ set(ITKExpat_LIBRARIES expat::expat) -+ endif() ++ set(ITKExpat_LIBRARIES expat::expat) set(ITKExpat_NO_SRC 1) else() set(ITKExpat_INCLUDE_DIRS diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index 17c74d0aab9db7..939a74945fb7a4 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,6 +1,6 @@ Source: poco Version: 1.9.2 -Port-Version: 3 +Port-Version: 4 Build-Depends: expat, libpq, pcre, sqlite3, zlib, libpng Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. Homepage: https://github.com/pocoproject/poco diff --git a/ports/poco/use-vcpkg-expat.patch b/ports/poco/use-vcpkg-expat.patch index ee1990b9ef4dc4..971e37908111d8 100644 --- a/ports/poco/use-vcpkg-expat.patch +++ b/ports/poco/use-vcpkg-expat.patch @@ -2,17 +2,13 @@ diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt index d4a502a..780f5d0 100644 --- a/XML/CMakeLists.txt +++ b/XML/CMakeLists.txt -@@ -23,7 +23,12 @@ endif() +@@ -23,7 +23,8 @@ endif() # If POCO_UNBUNDLED is enabled we try to find the required packages # The configuration will fail if the packages are not found if (POCO_UNBUNDLED) - find_package(EXPAT REQUIRED) + find_package(expat CONFIG REQUIRED) -+ if(WIN32 AND NOT MINGW) -+ set(EXPAT_LIBRARIES expat::libexpat) -+ else() -+ set(EXPAT_LIBRARIES expat::expat) -+ endif() ++ set(EXPAT_LIBRARIES expat::expat) set(SYSLIBS ${SYSLIBS} ${EXPAT_LIBRARIES}) include_directories(${EXPAT_INCLUDE_DIRS}) else() diff --git a/ports/wxwidgets/CONTROL b/ports/wxwidgets/CONTROL index 7c3479f334a6b6..35d3b461e98f0f 100644 --- a/ports/wxwidgets/CONTROL +++ b/ports/wxwidgets/CONTROL @@ -1,6 +1,6 @@ Source: wxwidgets Version: 3.1.4 -Port-Version: 2 +Port-Version: 3 Homepage: https://github.com/wxWidgets/wxWidgets Description: wxWidgets is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. Build-Depends: zlib, libpng, tiff, expat diff --git a/ports/wxwidgets/fix-expat.patch b/ports/wxwidgets/fix-expat.patch index 2eebc42c9f7ba0..5b3bd22055638d 100644 --- a/ports/wxwidgets/fix-expat.patch +++ b/ports/wxwidgets/fix-expat.patch @@ -2,7 +2,7 @@ diff --git a/build/cmake/lib/expat.cmake b/build/cmake/lib/expat.cmake index 1d2b79b..04bef93 100644 --- a/build/cmake/lib/expat.cmake +++ b/build/cmake/lib/expat.cmake -@@ -7,14 +7,9 @@ +@@ -7,14 +7,6 @@ # Licence: wxWindows licence ############################################################################# @@ -17,8 +17,5 @@ index 1d2b79b..04bef93 100644 -elseif(wxUSE_EXPAT) - find_package(EXPAT REQUIRED) +find_package(expat CONFIG REQUIRED) -+if(WIN32 AND NOT MINGW) -+ set(EXPAT_LIBRARIES expat::libexpat) -+else() -+ set(EXPAT_LIBRARIES expat::expat) ++set(EXPAT_LIBRARIES expat::expat) endif() From 5799f22e8d246ca5dc52ba9208d2615c6d183f85 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 19:37:19 +0200 Subject: [PATCH 049/114] fix wxwidgets --- ports/wxwidgets/fix-expat.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/wxwidgets/fix-expat.patch b/ports/wxwidgets/fix-expat.patch index 5b3bd22055638d..6a666aebdb9288 100644 --- a/ports/wxwidgets/fix-expat.patch +++ b/ports/wxwidgets/fix-expat.patch @@ -2,7 +2,7 @@ diff --git a/build/cmake/lib/expat.cmake b/build/cmake/lib/expat.cmake index 1d2b79b..04bef93 100644 --- a/build/cmake/lib/expat.cmake +++ b/build/cmake/lib/expat.cmake -@@ -7,14 +7,6 @@ +@@ -7,14 +7,5 @@ # Licence: wxWindows licence ############################################################################# @@ -18,4 +18,4 @@ index 1d2b79b..04bef93 100644 - find_package(EXPAT REQUIRED) +find_package(expat CONFIG REQUIRED) +set(EXPAT_LIBRARIES expat::expat) - endif() +-endif() From 4187f3132e886f4f4ca394493781306c8d30d720 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 20:06:00 +0200 Subject: [PATCH 050/114] fix gcdm regression --- ports/expat/vcpkg-cmake-wrapper.cmake | 4 ++-- ports/gdcm/CONTROL | 2 +- ports/gdcm/portfile.cmake | 1 - ports/gdcm/use-expat-config.patch | 13 ------------- 4 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 ports/gdcm/use-expat-config.patch diff --git a/ports/expat/vcpkg-cmake-wrapper.cmake b/ports/expat/vcpkg-cmake-wrapper.cmake index 29dc615bffac31..7056bce995f243 100644 --- a/ports/expat/vcpkg-cmake-wrapper.cmake +++ b/ports/expat/vcpkg-cmake-wrapper.cmake @@ -2,8 +2,8 @@ include(SelectLibraryConfigurations) set(EXPATNAMES expat expatw libexpat libexpatw) set(DEBUGNAMES) -foreach(_CRT MT MD) - foreach(name in LISTS EXPATNAMES) +foreach(_CRT "" MT MD) + foreach(name IN LISTS EXPATNAMES) list(APPEND EXPATNAMES ${name}${_CRT}) list(APPEND DEBUGNAMES ${name}d${_CRT}) endforeach() diff --git a/ports/gdcm/CONTROL b/ports/gdcm/CONTROL index e6d6b052dcc265..aafb13a8dbcae2 100644 --- a/ports/gdcm/CONTROL +++ b/ports/gdcm/CONTROL @@ -1,6 +1,6 @@ Source: gdcm Version: 3.0.5 -Port-Version: 1 +Port-Version: 2 Homepage: https://github.com/malaterre/GDCM Description: Grassroots DICOM library Build-Depends: zlib, expat, openjpeg diff --git a/ports/gdcm/portfile.cmake b/ports/gdcm/portfile.cmake index e9afedd3c8dca1..3edb205d75aec0 100644 --- a/ports/gdcm/portfile.cmake +++ b/ports/gdcm/portfile.cmake @@ -12,7 +12,6 @@ vcpkg_from_github( use-openjpeg-config.patch fix-share-path.patch Fix-Cmake_DIR.patch - use-expat-config.patch ) file(REMOVE ${SOURCE_PATH}/CMake/FindOpenJPEG.cmake) diff --git a/ports/gdcm/use-expat-config.patch b/ports/gdcm/use-expat-config.patch deleted file mode 100644 index 94a54e6c760a0a..00000000000000 --- a/ports/gdcm/use-expat-config.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 32786db..4215d25 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -426,7 +426,7 @@ endif() - - if(GDCM_USE_SYSTEM_EXPAT) - # If user say so, then this is a requirement ! -- find_package(EXPAT REQUIRED) -+ find_package(expat CONFIG REQUIRED) - set(GDCM_EXPAT_LIBRARIES ${EXPAT_LIBRARIES}) - else() - set(GDCM_EXPAT_LIBRARIES "gdcmexpat") From 06106c6745664e26028497803e4398409e37c2e6 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 22:00:47 +0200 Subject: [PATCH 051/114] [vtk] fix the regression due to expat --- ports/vtk/CONTROL | 2 +- ports/vtk/FindExpat.patch | 61 ++++++++++++++++++++++++++++++--------- ports/vtk/portfile.cmake | 2 +- 3 files changed, 50 insertions(+), 15 deletions(-) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index b542a5c47404a3..edbe3cc93a6f08 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,6 +1,6 @@ Source: vtk Version: 9.0.1 -Port-Version: 1 +Port-Version: 2 Description: Software system for 3D computer graphics, image processing, and visualization Homepage: https://github.com/Kitware/VTK Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5[core], libjpeg-turbo, proj4, lz4, liblzma, libtheora, eigen3, double-conversion, pugixml, libharu[notiffsymbols], sqlite3, netcdf-c, utfcpp, libogg, pegtl-2 diff --git a/ports/vtk/FindExpat.patch b/ports/vtk/FindExpat.patch index a0e706b44d7436..a9fdc46bd54386 100644 --- a/ports/vtk/FindExpat.patch +++ b/ports/vtk/FindExpat.patch @@ -1,13 +1,48 @@ -diff --git a/CMake/FindEXPAT.cmake b/CMake/FindEXPAT.cmake -index 9d4c080..9e14e7d 100644 ---- a/CMake/FindEXPAT.cmake -+++ b/CMake/FindEXPAT.cmake -@@ -40,7 +40,7 @@ pkg_check_modules(PC_EXPAT QUIET expat) - find_path(EXPAT_INCLUDE_DIR NAMES expat.h HINTS ${PC_EXPAT_INCLUDE_DIRS}) - - # Look for the library. --find_library(EXPAT_LIBRARY NAMES expat libexpat HINTS ${PC_EXPAT_LIBRARY_DIRS}) -+find_library(EXPAT_LIBRARY NAMES expat libexpat libexpatMD HINTS ${PC_EXPAT_LIBRARY_DIRS}) - - if (EXPAT_INCLUDE_DIR AND EXISTS "${EXPAT_INCLUDE_DIR}/expat.h") - file(STRINGS "${EXPAT_INCLUDE_DIR}/expat.h" expat_version_str +diff --git a/CMake/FindEXPAT.cmake b/CMake/FindEXPAT.cmake +index 45d923764..0ebcd3c83 100644 +--- a/CMake/FindEXPAT.cmake ++++ b/CMake/FindEXPAT.cmake +@@ -73,15 +73,37 @@ if(EXPAT_FOUND) + + if(NOT TARGET EXPAT::EXPAT) + include(vtkDetectLibraryType) +- vtk_detect_library_type(expat_library_type +- PATH "${EXPAT_LIBRARY}") ++ if(EXPAT_LIBRARY_RELEASE) ++ vtk_detect_library_type(expat_library_type ++ PATH "${EXPAT_LIBRARY_RELEASE}") ++ elseif(EXPAT_LIBRARY_DEBUG) ++ vtk_detect_library_type(expat_library_type ++ PATH "${EXPAT_LIBRARY_RELEASE}") ++ else() ++ vtk_detect_library_type(expat_library_type ++ PATH "${EXPAT_LIBRARY}") ++ endif() ++ + add_library(EXPAT::EXPAT "${expat_library_type}" IMPORTED) + unset(expat_library_type) + set_target_properties(EXPAT::EXPAT PROPERTIES +- IMPORTED_LINK_INTERFACE_LANGUAGES "C" +- IMPORTED_LOCATION "${EXPAT_LIBRARY}" +- IMPORTED_IMPLIB "${EXPAT_LIBRARY}" +- INTERFACE_INCLUDE_DIRECTORIES "${EXPAT_INCLUDE_DIRS}") ++ IMPORTED_LINK_INTERFACE_LANGUAGES "C" ++ INTERFACE_INCLUDE_DIRECTORIES "${EXPAT_INCLUDE_DIRS}") ++ if(EXPAT_LIBRARY_RELEASE) ++ set_target_properties(EXPAT::EXPAT PROPERTIES ++ IMPORTED_LOCATION_RELEASE "${EXPAT_LIBRARY_RELEASE}" ++ IMPORTED_IMPLIB_RELEASE "${EXPAT_LIBRARY_RELEASE}") ++ endif() ++ if(EXPAT_LIBRARY_DEBUG) ++ set_target_properties(EXPAT::EXPAT PROPERTIES ++ IMPORTED_LOCATION_DEBUG "${EXPAT_LIBRARY_DEBUG}" ++ IMPORTED_IMPLIB_DEBUG "${EXPAT_LIBRARY_DEBUG}") ++ endif() ++ if(EXPAT_LIBRARY_RELEASE OR EXPAT_LIBRARY_DEBUG AND NOT (EXPAT_LIBRARY_RELEASE AND EXPAT_LIBRARY_DEBUG)) ++ set_target_properties(EXPAT::EXPAT PROPERTIES ++ IMPORTED_LOCATION "${EXPAT_LIBRARY}" ++ IMPORTED_IMPLIB "${EXPAT_LIBRARY}") ++ endif() + endif() + endif() + diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index d657f241f922dd..65011a3a451c39 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -120,7 +120,7 @@ vcpkg_from_github( python_debug.patch fix-using-hdf5.patch # Last patch TODO: Patch out internal loguru - FindExpat.patch + FindExpat.patch # The find_library calls are taken care of by vcpkg-cmake-wrapper.cmake of expat ) # ============================================================================= From 34813c1caf4c41ed2d766291d777e33ba4a45be7 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 23:56:50 +0200 Subject: [PATCH 052/114] add uwp cl flags back in. Somehow those are not set by cmake --- scripts/cmake/vcpkg_configure_make.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index d214c761edd15f..875b3fe990c1b9 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -476,7 +476,7 @@ function(vcpkg_configure_make) # (This is due to libtool and compiler wrapper using the same set of options to pass those variables around) string(REPLACE "\\" "/" VCToolsInstallDir "$ENV{VCToolsInstallDir}") # Can somebody please check if CMake's compiler flags for UWP are correct? - #set(ENV{_CL_} "$ENV{_CL_} /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") + set(ENV{_CL_} "$ENV{_CL_} /D _UNICODE /D UNICODE /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_RELEASE " -ZW:nostdlib") #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_DEBUG " -ZW:nostdlib") #set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO ") From 1a6b81b4a240107af19614d0d54af0ad9da6f86a Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 20 Aug 2020 23:57:51 +0200 Subject: [PATCH 053/114] add a few other configure options for full gettext build --- ports/gettext/portfile.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index 3202447d945ef6..bae50dc5c0ef36 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -32,7 +32,12 @@ vcpkg_add_to_path(${BISON_PATH}) if(VCPKG_TARGET_IS_WINDOWS) # This is required. For some reason these do not get correctly identified for release builds. list(APPEND OPTIONS ac_cv_func_wcslen=yes - ac_cv_func_memmove=yes) + ac_cv_func_memmove=yes + #The following are required for a full gettext built. + # Left here for future reference. + gl_cv_func_printf_directive_n=no #segfaults otherwise with popup window + ac_cv_func_memset=yes #not detected in release builds + ) endif() vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH}/gettext-runtime # Port should probably be renamed to gettext-runtime instead of only gettext DETERMINE_BUILD_TRIPLET From f1dc49abb92febaa009534d5fd3f523d4c0b2eed Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 21 Aug 2020 10:16:19 +0200 Subject: [PATCH 054/114] fix cmake regression --- ports/libxml2/vcpkg-cmake-wrapper.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake index cbd26459c1d082..7b6e987c7083e0 100644 --- a/ports/libxml2/vcpkg-cmake-wrapper.cmake +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -1,9 +1,9 @@ -_find_package(Iconv REQUIRED) +_find_package(Iconv) _find_package(${ARGS}) if(LibXml2_FOUND) find_package(LibLZMA) find_package(ZLIB) - list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES}) + list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES} Iconv::Iconv) if(CMAKE_SYSTEM_NAME STREQUAL "Linux") list(APPEND LIBXML2_LIBRARIES m) elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") From db54b9656629a63332a2da6c3803263ed639d70d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 21 Aug 2020 10:21:30 +0200 Subject: [PATCH 055/114] fix a few regressions --- ports/cairo/CMakeLists.txt | 2 +- ports/libspatialite/CONTROL | 3 ++- ports/libspatialite/portfile.cmake | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ports/cairo/CMakeLists.txt b/ports/cairo/CMakeLists.txt index 8b3c66a8f20ccd..a68491fbd8b9c0 100644 --- a/ports/cairo/CMakeLists.txt +++ b/ports/cairo/CMakeLists.txt @@ -297,7 +297,7 @@ include(CMakeFindDependencyMacro) find_dependency(ZLIB) find_dependency(PNG) find_dependency(Freetype) -find_dependency(unofficial-fontconfig CONFIG) +find_dependency(Fontconfig) find_dependency(unofficial-pixman CONFIG) if(WITH_GOBJECT) find_dependency(unofficial-glib CONFIG) diff --git a/ports/libspatialite/CONTROL b/ports/libspatialite/CONTROL index 51d6a4f5e24ba9..364bd887c6ec0c 100644 --- a/ports/libspatialite/CONTROL +++ b/ports/libspatialite/CONTROL @@ -1,5 +1,6 @@ Source: libspatialite -Version: 4.3.0a-4 +Version: 4.3.0a +Port-Version: 5 Homepage: https://www.gaia-gis.it/gaia-sins/libspatialite-sources Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities. Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake index 77e51b34598e4f..3b9a49be1f0204 100644 --- a/ports/libspatialite/portfile.cmake +++ b/ports/libspatialite/portfile.cmake @@ -38,8 +38,8 @@ if (VCPKG_TARGET_IS_WINDOWS) endif() set(LIBS_ALL_DBG - "${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib \ - ${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib \ + "${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib \ ${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib \ ${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib \ ${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib \ @@ -48,8 +48,8 @@ if (VCPKG_TARGET_IS_WINDOWS) ${CURRENT_INSTALLED_DIR}/debug/lib/proj_d.lib" ) set(LIBS_ALL_REL - "${CURRENT_INSTALLED_DIR}/lib/libiconv.lib \ - ${CURRENT_INSTALLED_DIR}/lib/libcharset.lib \ + "${CURRENT_INSTALLED_DIR}/lib/iconv.lib \ + ${CURRENT_INSTALLED_DIR}/lib/charset.lib \ ${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib \ ${CURRENT_INSTALLED_DIR}/lib/freexl.lib \ ${CURRENT_INSTALLED_DIR}/lib/zlib.lib \ From 1bdb695336e42269b1c47b7548db3a3683082725 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 21 Aug 2020 13:57:40 +0200 Subject: [PATCH 056/114] fix static gettext build --- ports/gettext/portfile.cmake | 12 +++- ports/gettext/uwp_remove_localcharset.patch | 79 +++++++++++++++++++++ scripts/cmake/vcpkg_build_make.cmake | 7 +- 3 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 ports/gettext/uwp_remove_localcharset.patch diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index bae50dc5c0ef36..0e3462aa8aef05 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -17,6 +17,9 @@ vcpkg_download_distfile(ARCHIVE FILENAME "gettext-${GETTEXT_VERSION}.tar.gz" SHA512 bbe590c5dd3580c75bf30ff768da99a88eb8d466ec1ac9eea20be4cab4357ecf72448e6b81b47425e39d50fa6320ba426632914d7898dfebb4f159abc39c31d1 ) +if(VCPKG_TARGET_IS_UWP) + set(PATCHES uwp_remove_localcharset.patch) +endif() vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} @@ -24,6 +27,7 @@ vcpkg_extract_source_archive_ex( PATCHES 0002-Fix-uwp-build.patch 0003-Fix-win-unicode-paths.patch + ${PATCHES} ) vcpkg_find_acquire_program(BISON) get_filename_component(BISON_PATH ${BISON} DIRECTORY) @@ -48,7 +52,13 @@ vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH}/gettext-runtime # Port should pr --disable-java ${OPTIONS} ) -vcpkg_install_make() + +if(VCPKG_TARGET_IS_UWP) + vcpkg_install_make(WORKING_SUBDIR "/intl") # Could make a port intl or libintl or have features in Gettext +else() + vcpkg_install_make() +endif() + # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gettext) diff --git a/ports/gettext/uwp_remove_localcharset.patch b/ports/gettext/uwp_remove_localcharset.patch new file mode 100644 index 00000000000000..285f81cf19eafa --- /dev/null +++ b/ports/gettext/uwp_remove_localcharset.patch @@ -0,0 +1,79 @@ +diff --git a/gettext-runtime/intl/Makefile.in b/gettext-runtime/intl/Makefile.in +index 7999d3456..b3ef40340 100644 +--- a/gettext-runtime/intl/Makefile.in ++++ b/gettext-runtime/intl/Makefile.in +@@ -252,7 +252,7 @@ am__libgnuintl_la_SOURCES_DIST = bindtextdom.c dcgettext.c dgettext.c \ + gettext.c finddomain.c hash-string.c loadmsgcat.c \ + localealias.c textdomain.c l10nflist.c explodename.c \ + dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \ +- plural-exp.c localcharset.c threadlib.c lock.c relocatable.c \ ++ plural-exp.c threadlib.c lock.c relocatable.c \ + langprefs.c localename.c localename-table.c log.c printf.c \ + setlocale.c setlocale-lock.c setlocale_null.c version.c \ + xsize.c osdep.c intl-compat.c windows-mutex.c windows-rwlock.c \ +@@ -264,7 +264,7 @@ am__objects_2 = bindtextdom.lo dcgettext.lo dgettext.lo gettext.lo \ + finddomain.lo hash-string.lo loadmsgcat.lo localealias.lo \ + textdomain.lo l10nflist.lo explodename.lo dcigettext.lo \ + dcngettext.lo dngettext.lo ngettext.lo plural.lo plural-exp.lo \ +- localcharset.lo threadlib.lo lock.lo relocatable.lo \ ++ threadlib.lo lock.lo relocatable.lo \ + langprefs.lo localename.lo localename-table.lo log.lo \ + printf.lo setlocale.lo setlocale-lock.lo setlocale_null.lo \ + version.lo xsize.lo osdep.lo intl-compat.lo $(am__objects_1) +@@ -282,7 +282,7 @@ am__libintl_la_SOURCES_DIST = bindtextdom.c dcgettext.c dgettext.c \ + gettext.c finddomain.c hash-string.c loadmsgcat.c \ + localealias.c textdomain.c l10nflist.c explodename.c \ + dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \ +- plural-exp.c localcharset.c threadlib.c lock.c relocatable.c \ ++ plural-exp.c threadlib.c lock.c relocatable.c \ + langprefs.c localename.c localename-table.c log.c printf.c \ + setlocale.c setlocale-lock.c setlocale_null.c version.c \ + xsize.c osdep.c intl-compat.c windows-mutex.c windows-rwlock.c \ +@@ -1387,7 +1387,7 @@ AUTOMAKE_OPTIONS = 1.10 gnu no-dependencies + + # Miscellaneous files. + EXTRA_DIST = gmo.h gettextP.h hash-string.h loadinfo.h plural-exp.h \ +- eval-plural.h localcharset.h lock.h windows-mutex.h \ ++ eval-plural.h lock.h windows-mutex.h \ + windows-rwlock.h windows-recmutex.h windows-once.h \ + windows-initguard.h relocatable.h arg-nonnull.h attribute.h \ + filename.h flexmember.h localename-table.in.h setlocale_null.h \ +@@ -1543,7 +1543,7 @@ LIBINTLSOURCES = bindtextdom.c dcgettext.c dgettext.c gettext.c \ + finddomain.c hash-string.c loadmsgcat.c localealias.c \ + textdomain.c l10nflist.c explodename.c dcigettext.c \ + dcngettext.c dngettext.c ngettext.c plural.y plural-exp.c \ +- localcharset.c threadlib.c lock.c relocatable.c langprefs.c \ ++ threadlib.c lock.c relocatable.c langprefs.c \ + localename.c localename-table.c log.c printf.c setlocale.c \ + setlocale-lock.c setlocale_null.c version.c xsize.c osdep.c \ + intl-compat.c $(am__append_2) +@@ -2016,8 +2016,6 @@ plural.lo: $(srcdir)/plural.c + $(AM_V_CC)$(LTCOMPILE) -c -o $@ $(srcdir)/plural.c + plural-exp.lo: $(srcdir)/plural-exp.c + $(AM_V_CC)$(LTCOMPILE) -c -o $@ $(srcdir)/plural-exp.c +-localcharset.lo: $(srcdir)/localcharset.c +- $(AM_V_CC)$(LTCOMPILE) -c -o $@ $(srcdir)/localcharset.c + threadlib.lo: $(srcdir)/threadlib.c + $(AM_V_CC)$(LTCOMPILE) -c -o $@ $(srcdir)/threadlib.c + lock.lo: $(srcdir)/lock.c +@@ -2074,7 +2072,6 @@ dngettext.lo: ../config.h $(srcdir)/gettextP.h libgnuintl.h $(srcdir)/gmo + ngettext.lo: ../config.h $(srcdir)/gettextP.h libgnuintl.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h $(srcdir)/lock.h $(srcdir)/windows-mutex.h $(srcdir)/windows-rwlock.h $(srcdir)/windows-recmutex.h $(srcdir)/windows-once.h $(srcdir)/windows-initguard.h + plural.lo: ../config.h $(srcdir)/plural-exp.h $(PLURAL_DEPS) + plural-exp.lo: ../config.h $(srcdir)/plural-exp.h +-localcharset.lo: ../config.h $(srcdir)/localcharset.h + threadlib.lo: ../config.h + lock.lo: ../config.h $(srcdir)/lock.h $(srcdir)/windows-mutex.h $(srcdir)/windows-rwlock.h $(srcdir)/windows-recmutex.h $(srcdir)/windows-once.h $(srcdir)/windows-initguard.h + relocatable.lo: ../config.h $(srcdir)/relocatable.h +diff --git a/gettext-runtime/intl/localcharset.c b/gettext-runtime/intl/localcharset.c +index 1a1627888..3e6582f17 100644 +--- a/gettext-runtime/intl/localcharset.c ++++ b/gettext-runtime/intl/localcharset.c +@@ -1021,7 +1021,7 @@ locale_charset (void) + + # else + +-# error "Add code for other platforms here." ++//# error "Add code for other platforms here." + + # endif + diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index 29b5191af0d285..b4a30c705b94c6 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -27,6 +27,9 @@ ## ### DISABLE_PARALLEL ## The underlying buildsystem will be instructed to not parallelize ## +## ### WORKING_SUBDIR +## Additional subdir to invoke make in. Useful if only parts of a port should be built. +## ## ## Notes: ## This command should be preceeded by a call to [`vcpkg_configure_make()`](vcpkg_configure_make.md). ## You can use the alias [`vcpkg_install_make()`](vcpkg_configure_make.md) function if your CMake script supports the @@ -40,7 +43,7 @@ ## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) function(vcpkg_build_make) include("${CMAKE_VARS_FILE}") - cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET" "") + cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET;WORKING_SUBDIR" "") if(NOT _bc_LOGFILE_ROOT) set(_bc_LOGFILE_ROOT "build") @@ -108,7 +111,7 @@ function(vcpkg_build_make) set(PATH_SUFFIX "") endif() - set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}${_bc_WORKING_SUBDIR}") message(STATUS "Building ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") extract_cpp_flags_and_set_cflags_and_cxxflags(${CMAKE_BUILDTYPE}) From cf2dcfed65eef5a36b0fd24d364b11de7dac6a5b Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 21 Aug 2020 14:31:36 +0200 Subject: [PATCH 057/114] fix gettext static --- scripts/cmake/vcpkg_configure_make.cmake | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 875b3fe990c1b9..43efac11602cf9 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -476,7 +476,7 @@ function(vcpkg_configure_make) # (This is due to libtool and compiler wrapper using the same set of options to pass those variables around) string(REPLACE "\\" "/" VCToolsInstallDir "$ENV{VCToolsInstallDir}") # Can somebody please check if CMake's compiler flags for UWP are correct? - set(ENV{_CL_} "$ENV{_CL_} /D _UNICODE /D UNICODE /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") + set(ENV{_CL_} "$ENV{_CL_} /D_UNICODE /DUNICODE /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_RELEASE " -ZW:nostdlib") #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_DEBUG " -ZW:nostdlib") #set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO ") @@ -484,10 +484,23 @@ function(vcpkg_configure_make) endif() endif() - if(DEFINED ENV{LIBS}) - set(ENV{LIBS} "$ENV{LIBS} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") - else() - set(ENV{LIBS} "${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") + macro(convert_to_list input output) + string(REGEX MATCHALL "(( +|$ *)[^ ]+)" ${output} "${${input}}") + endmacro() + convert_to_list(VCPKG_DETECTED_C_STANDARD_LIBRARIES C_LIBS_LIST) + convert_to_list(VCPKG_DETECTED_CXX_STANDARD_LIBRARIES CXX_LIBS_LIST) + set(ALL_LIBS_LIST ${C_LIBS_LIST} ${CXX_LIBS_LIST}) + list(REMOVE_DUPLICATES ALL_LIBS_LIST) + list(TRANSFORM ALL_LIBS_LIST STRIP) + list(TRANSFORM ALL_LIBS_LIST REPLACE "(.lib|.a|.so)$" "") + list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) + + if(ALL_LIBS_STRING) + if(DEFINED ENV{LIBS}) + set(ENV{LIBS} "$ENV{LIBS} -l${ALL_LIBS_STRING}") + else() + set(ENV{LIBS} "-l${ALL_LIBS_STRING}") + endif() endif() vcpkg_find_acquire_program(PKGCONFIG) From 065b48fddae6fb171e7000404283b8a07a51ba87 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 21 Aug 2020 14:34:01 +0200 Subject: [PATCH 058/114] fix libxml2 wrapper for cmake --- ports/libxml2/vcpkg-cmake-wrapper.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake index 7b6e987c7083e0..6b4fe0fb0df681 100644 --- a/ports/libxml2/vcpkg-cmake-wrapper.cmake +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -8,5 +8,8 @@ if(LibXml2_FOUND) list(APPEND LIBXML2_LIBRARIES m) elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") list(APPEND LIBXML2_LIBRARIES ws2_32) + if(TARGET LibXml2::LibXml2) + target_link_libraries(LibXml2::LibXml2 INTERFACE Iconv::Iconv) + endif() endif() endif() From ab3c9cb12941cbe11de4d3749a8d2a6b8e8d8507 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 21 Aug 2020 14:46:27 +0200 Subject: [PATCH 059/114] some more regressions fixes --- ports/libxml2/vcpkg-cmake-wrapper.cmake | 2 +- ports/spatialite-tools/CONTROL | 2 +- ports/spatialite-tools/portfile.cmake | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake index 6b4fe0fb0df681..abbc1239a78522 100644 --- a/ports/libxml2/vcpkg-cmake-wrapper.cmake +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -3,7 +3,7 @@ _find_package(${ARGS}) if(LibXml2_FOUND) find_package(LibLZMA) find_package(ZLIB) - list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES} Iconv::Iconv) + list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES} ${Iconv_LIBRARIES}) if(CMAKE_SYSTEM_NAME STREQUAL "Linux") list(APPEND LIBXML2_LIBRARIES m) elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") diff --git a/ports/spatialite-tools/CONTROL b/ports/spatialite-tools/CONTROL index 7d6bf5496e51aa..7ef2a3284a6a0d 100644 --- a/ports/spatialite-tools/CONTROL +++ b/ports/spatialite-tools/CONTROL @@ -1,6 +1,6 @@ Source: spatialite-tools Version: 4.3.0 -Port-Version: 3 +Port-Version: 4 Homepage: https://www.gaia-gis.it/fossil/spatialite-tools/index Description: Contains spatialite.exe and other command line tools to work with SpatiaLite databases (import, export, SQL queries) Build-Depends: sqlite3, libspatialite, geos, readosm, proj4, zlib, libiconv, expat diff --git a/ports/spatialite-tools/portfile.cmake b/ports/spatialite-tools/portfile.cmake index a035198af71cb9..671c3a18c697f3 100644 --- a/ports/spatialite-tools/portfile.cmake +++ b/ports/spatialite-tools/portfile.cmake @@ -26,8 +26,8 @@ if(VCPKG_CRT_LINKAGE STREQUAL dynamic) set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib") set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib") set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib") - set(ICONV_LIBS_REL "${LDIR}/lib/libiconv.lib") - set(ICONV_LIBS_DBG "${LDIR}/debug/lib/libiconv.lib") + set(ICONV_LIBS_REL "${LDIR}/lib/iconv.lib") + set(ICONV_LIBS_DBG "${LDIR}/debug/lib/iconv.lib") set(EXPAT_LIBS_REL "${LDIR}/lib/libexpat.lib") set(EXPAT_LIBS_DBG "${LDIR}/debug/lib/libexpatd.lib") else() @@ -39,8 +39,8 @@ else() set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib ${LDIR}/debug/lib/lzma.lib ws2_32.lib") set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib ${LDIR}/lib/freexl.lib") set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib ${LDIR}/debug/lib/freexl.lib") - set(ICONV_LIBS_REL "${LDIR}/lib/libiconv.lib ${LDIR}/lib/libcharset.lib") - set(ICONV_LIBS_DBG "${LDIR}/debug/lib/libiconv.lib ${LDIR}/debug/lib/libcharset.lib ") + set(ICONV_LIBS_REL "${LDIR}/lib/iconv.lib ${LDIR}/lib/charset.lib") + set(ICONV_LIBS_DBG "${LDIR}/debug/lib/iconv.lib ${LDIR}/debug/lib/charset.lib ") set(EXPAT_LIBS_REL "${LDIR}/lib/libexpatMD.lib") set(EXPAT_LIBS_DBG "${LDIR}/debug/lib/libexpatdMD.lib") endif() From 7c440bdd8fbfebd7643299b1a74ddd857851f3e8 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 21 Aug 2020 22:30:07 +0200 Subject: [PATCH 060/114] add conversion from somelib.lib to -lsomelib --- scripts/cmake/vcpkg_configure_make.cmake | 34 +++++++++++++++++------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index d214c761edd15f..aba2c5685e1c73 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -401,6 +401,9 @@ function(vcpkg_configure_make) list(APPEND _csc_OPTIONS gl_cv_double_slash_root=yes ac_cv_func_memmove=yes) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + list(APPEND _csc_OPTIONS gl_cv_host_cpu_c_abi=no) + endif() else() string(REPLACE " " "\ " _VCPKG_PREFIX ${CURRENT_INSTALLED_DIR}) string(REPLACE " " "\ " _VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR}) @@ -476,18 +479,31 @@ function(vcpkg_configure_make) # (This is due to libtool and compiler wrapper using the same set of options to pass those variables around) string(REPLACE "\\" "/" VCToolsInstallDir "$ENV{VCToolsInstallDir}") # Can somebody please check if CMake's compiler flags for UWP are correct? - #set(ENV{_CL_} "$ENV{_CL_} /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") - #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_RELEASE " -ZW:nostdlib") - #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_DEBUG " -ZW:nostdlib") - #set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO ") - set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /APPCONTAINER") + set(ENV{_CL_} "$ENV{_CL_} /D_UNICODE /DUNICODE /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") + string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_RELEASE " -ZW:nostdlib") + string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_DEBUG " -ZW:nostdlib") + set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO /APPCONTAINER") endif() endif() - if(DEFINED ENV{LIBS}) - set(ENV{LIBS} "$ENV{LIBS} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") - else() - set(ENV{LIBS} "${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES}") + macro(convert_to_list input output) + string(REGEX MATCHALL "(( +|$ *)[^ ]+)" ${output} "${${input}}") + endmacro() + convert_to_list(VCPKG_DETECTED_C_STANDARD_LIBRARIES C_LIBS_LIST) + convert_to_list(VCPKG_DETECTED_CXX_STANDARD_LIBRARIES CXX_LIBS_LIST) + set(ALL_LIBS_LIST ${C_LIBS_LIST} ${CXX_LIBS_LIST}) + + list(REMOVE_DUPLICATES ALL_LIBS_LIST) + list(TRANSFORM ALL_LIBS_LIST STRIP) + list(TRANSFORM ALL_LIBS_LIST REPLACE "(.lib|.a|.so)$" "") + list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) + + if(ALL_LIBS_STRING) + if(DEFINED ENV{LIBS}) + set(ENV{LIBS} "$ENV{LIBS} -l${ALL_LIBS_STRING}") + else() + set(ENV{LIBS} "-l${ALL_LIBS_STRING}") + endif() endif() vcpkg_find_acquire_program(PKGCONFIG) From b80480f0c470aa4e6727bd82bf7b910d7653f8be Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 22 Aug 2020 10:06:57 +0200 Subject: [PATCH 061/114] add a few option to libiconv. --- ports/libiconv/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index 0f1671671f227e..02f7cea5e8fd5c 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -20,15 +20,15 @@ vcpkg_extract_source_archive_ex( 0002-Config-for-MSVC.patch 0003-Add-export.patch ) -if(VCPKG_TARGET_IS_UWP) - list(APPEND OPTIONS gl_cv_double_slash_root=yes) -endif() + vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH} DETERMINE_BUILD_TRIPLET USE_WRAPPERS OPTIONS --enable-relocatable --enable-extra-encodings + --without-libiconv-prefix + --without-libintl-prefix ${OPTIONS} ) vcpkg_install_make() From 69c452edc11a9e4d99156fa02d295712f46c5acd Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 22 Aug 2020 10:14:08 +0200 Subject: [PATCH 062/114] get logs from CI --- scripts/cmake/vcpkg_configure_make.cmake | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 43efac11602cf9..8f8ee8eb7bed10 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -401,6 +401,9 @@ function(vcpkg_configure_make) list(APPEND _csc_OPTIONS gl_cv_double_slash_root=yes ac_cv_func_memmove=yes) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + list(APPEND _csc_OPTIONS gl_cv_host_cpu_c_abi=no) + endif() else() string(REPLACE " " "\ " _VCPKG_PREFIX ${CURRENT_INSTALLED_DIR}) string(REPLACE " " "\ " _VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR}) @@ -477,10 +480,9 @@ function(vcpkg_configure_make) string(REPLACE "\\" "/" VCToolsInstallDir "$ENV{VCToolsInstallDir}") # Can somebody please check if CMake's compiler flags for UWP are correct? set(ENV{_CL_} "$ENV{_CL_} /D_UNICODE /DUNICODE /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") - #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_RELEASE " -ZW:nostdlib") - #string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_DEBUG " -ZW:nostdlib") - #set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO ") - set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /APPCONTAINER") + string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_RELEASE " -ZW:nostdlib") + string(APPEND VCPKG_DETECTED_COMBINED_CXXFLAGS_DEBUG " -ZW:nostdlib") + set(ENV{_LINK_} "$ENV{_LINK_} ${VCPKG_DETECTED_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CXX_STANDARD_LIBRARIES} /MANIFEST /DYNAMICBASE /WINMD:NO /APPCONTAINER") endif() endif() @@ -490,6 +492,7 @@ function(vcpkg_configure_make) convert_to_list(VCPKG_DETECTED_C_STANDARD_LIBRARIES C_LIBS_LIST) convert_to_list(VCPKG_DETECTED_CXX_STANDARD_LIBRARIES CXX_LIBS_LIST) set(ALL_LIBS_LIST ${C_LIBS_LIST} ${CXX_LIBS_LIST}) + list(REMOVE_DUPLICATES ALL_LIBS_LIST) list(TRANSFORM ALL_LIBS_LIST STRIP) list(TRANSFORM ALL_LIBS_LIST REPLACE "(.lib|.a|.so)$" "") @@ -685,6 +688,8 @@ function(vcpkg_configure_make) file(WRITE "${lt_file}" "${_contents}") endforeach() endif() + + file(RENAME "${TAR_DIR}/config.log" "${CURRENT_BUILDTREES_DIR}/config.log-${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}}.log") endif() if(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype}) From 1baed522b6945d35b1b46eb50c971071f0e63130 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 22 Aug 2020 11:24:12 +0200 Subject: [PATCH 063/114] add missing ar-lib wrapper --- scripts/cmake/vcpkg_configure_make.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 8f8ee8eb7bed10..7b87e9baf3f5fa 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -338,7 +338,7 @@ function(vcpkg_configure_make) _vcpkg_append_to_configure_environment(CONFIGURE_ENV RC "windres-rc ${VCPKG_DETECTED_RC_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV WINDRES "windres-rc ${VCPKG_DETECTED_RC_COMPILER}") if(VCPKG_DETECTED_AR) - _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "${VCPKG_DETECTED_AR}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "ar-lib ${VCPKG_DETECTED_AR}") else() _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "ar-lib lib.exe -verbose") endif() @@ -367,6 +367,7 @@ function(vcpkg_configure_make) _vcpkg_append_to_configure_environment(CONFIGURE_ENV STRIP "${VCPKG_DETECTED_STRIP}") else() _vcpkg_append_to_configure_environment(CONFIGURE_ENV STRIP ":") + list(APPEND _csc_OPTIONS ac_cv_prog_ac_ct_STRIP=:) endif() if(VCPKG_DETECTED_NM) # If required set the ENV variable NM in the portfile correctly _vcpkg_append_to_configure_environment(CONFIGURE_ENV NM "${VCPKG_DETECTED_NM}") @@ -385,7 +386,7 @@ function(vcpkg_configure_make) foreach(_env IN LISTS _csc_CONFIGURE_ENVIRONMENT_VARIABLES) _vcpkg_append_to_configure_environment(CONFIGURE_ENV ${_env} "${${_env}}") endforeach() - + debug_message("CONFIGURE_ENV: '${CONFIGURE_ENV}'") # Other maybe interesting variables to control # COMPILE This is the command used to actually compile a C source file. The file name is appended to form the complete command line. # LINK This is the command used to actually link a C program. From 8b20a58ad77058fdac9a3877e69313bd3e9a9d49 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sat, 22 Aug 2020 18:52:50 +0200 Subject: [PATCH 064/114] add missing ar-lib wrapper --- scripts/cmake/vcpkg_configure_make.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index aba2c5685e1c73..9fb7bd11babf63 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -338,7 +338,7 @@ function(vcpkg_configure_make) _vcpkg_append_to_configure_environment(CONFIGURE_ENV RC "windres-rc ${VCPKG_DETECTED_RC_COMPILER}") _vcpkg_append_to_configure_environment(CONFIGURE_ENV WINDRES "windres-rc ${VCPKG_DETECTED_RC_COMPILER}") if(VCPKG_DETECTED_AR) - _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "${VCPKG_DETECTED_AR}") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "ar-lib ${VCPKG_DETECTED_AR}") else() _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "ar-lib lib.exe -verbose") endif() From b1c6848a72c1394922e55df3c8da5cbdda4e50d2 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 22 Aug 2020 19:06:56 +0200 Subject: [PATCH 065/114] add fatal error to gettext --- ports/gettext/portfile.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index 0e3462aa8aef05..37d3a0031441b7 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -47,9 +47,10 @@ vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH}/gettext-runtime # Port should pr DETERMINE_BUILD_TRIPLET USE_WRAPPERS ADD_BIN_TO_PATH # So configure can check for working iconv - OPTIONS --enable-relocatable + OPTIONS --enable-relocatable #symbol duplication with glib-init.c? --enable-c++ --disable-java + ${OPTIONS} ) @@ -80,3 +81,5 @@ endforeach() vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/intl) + +message(FATAL_ERROR "Get gettext logs from CI since it is not building a DLL") \ No newline at end of file From e3b67e9f87605fcec50d8093704e304d67c8f085 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 22 Aug 2020 19:47:45 +0200 Subject: [PATCH 066/114] remove uuid from the list of LIBS since it seems to not exist in CI? --- scripts/cmake/vcpkg_configure_make.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 7b87e9baf3f5fa..92de2f4cb11578 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -497,6 +497,9 @@ function(vcpkg_configure_make) list(REMOVE_DUPLICATES ALL_LIBS_LIST) list(TRANSFORM ALL_LIBS_LIST STRIP) list(TRANSFORM ALL_LIBS_LIST REPLACE "(.lib|.a|.so)$" "") + if(VCPKG_TARGET_IS_WINDOWS) + list(REMOVE_ITEM ALL_LIBS_LIST "uuid") + endif() list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) if(ALL_LIBS_STRING) From 8e276957f3e311d8027ba84a95a6fbce4145761e Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sat, 22 Aug 2020 19:58:31 +0200 Subject: [PATCH 067/114] small but important regex correction --- scripts/cmake/vcpkg_configure_make.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 9fb7bd11babf63..d02061e9186059 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -487,7 +487,8 @@ function(vcpkg_configure_make) endif() macro(convert_to_list input output) - string(REGEX MATCHALL "(( +|$ *)[^ ]+)" ${output} "${${input}}") + string(REGEX MATCHALL "(( +|^ *)[^ ]+)" ${output} "${${input}}") + endmacro() convert_to_list(VCPKG_DETECTED_C_STANDARD_LIBRARIES C_LIBS_LIST) convert_to_list(VCPKG_DETECTED_CXX_STANDARD_LIBRARIES CXX_LIBS_LIST) From 49af47c56155c43ae0054caa7c1cd8bdfbb72b83 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 22 Aug 2020 21:20:02 +0200 Subject: [PATCH 068/114] fix regex and add debug message for libs --- scripts/cmake/vcpkg_configure_make.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 92de2f4cb11578..ab05d7f53338a2 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -488,7 +488,7 @@ function(vcpkg_configure_make) endif() macro(convert_to_list input output) - string(REGEX MATCHALL "(( +|$ *)[^ ]+)" ${output} "${${input}}") + string(REGEX MATCHALL "(( +|^ *)[^ ]+)" ${output} "${${input}}") endmacro() convert_to_list(VCPKG_DETECTED_C_STANDARD_LIBRARIES C_LIBS_LIST) convert_to_list(VCPKG_DETECTED_CXX_STANDARD_LIBRARIES CXX_LIBS_LIST) @@ -509,7 +509,7 @@ function(vcpkg_configure_make) set(ENV{LIBS} "-l${ALL_LIBS_STRING}") endif() endif() - + debug_message(STATUS "ENV{LIBS}:$ENV{LIBS}") vcpkg_find_acquire_program(PKGCONFIG) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND NOT PKGCONFIG STREQUAL "--static") set(PKGCONFIG "${PKGCONFIG} --static") From b5bba6208058340fc7006aa5b26f345459f8e947 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 22 Aug 2020 21:20:23 +0200 Subject: [PATCH 069/114] remove error and only build libintl. --- ports/gettext/portfile.cmake | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index 37d3a0031441b7..2f11b7d7050935 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -43,21 +43,20 @@ if(VCPKG_TARGET_IS_WINDOWS) ac_cv_func_memset=yes #not detected in release builds ) endif() -vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH}/gettext-runtime # Port should probably be renamed to gettext-runtime instead of only gettext +vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH}/gettext-runtime # Port should probably be renamed to gettext-runtime instead of only gettext. Removing the subdir here builds all of gettext DETERMINE_BUILD_TRIPLET USE_WRAPPERS ADD_BIN_TO_PATH # So configure can check for working iconv OPTIONS --enable-relocatable #symbol duplication with glib-init.c? --enable-c++ --disable-java - ${OPTIONS} ) if(VCPKG_TARGET_IS_UWP) vcpkg_install_make(WORKING_SUBDIR "/intl") # Could make a port intl or libintl or have features in Gettext else() - vcpkg_install_make() + vcpkg_install_make(WORKING_SUBDIR "/intl") endif() @@ -71,7 +70,7 @@ vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") set(GNU_DLL_PATHS lib/ debug/lib/) -set(GNU_DLL_NAME GNU.Gettext.dll) +set(GNU_DLL_NAME GNU.Gettext.dll) #C# dll? foreach(DLL_PATH IN LISTS GNU_DLL_PATHS) if(EXISTS "${CURRENT_PACKAGES_DIR}/${DLL_PATH}${GNU_DLL_NAME}") file(REMOVE "${CURRENT_PACKAGES_DIR}/${DLL_PATH}${GNU_DLL_NAME}") @@ -81,5 +80,3 @@ endforeach() vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/intl) - -message(FATAL_ERROR "Get gettext logs from CI since it is not building a DLL") \ No newline at end of file From 02d0d045525aea8cb961879c2754535fe47bfbbb Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 23 Aug 2020 01:59:45 +0200 Subject: [PATCH 070/114] add uuid dependency to fontconfig in qt5-base --- ports/qt5-base/CONTROL | 2 +- ports/qt5-base/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index 28247c42d506bc..8f4c07f400d84d 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,6 +1,6 @@ Source: qt5-base Version: 5.15.0 -Port-Version: 2 +Port-Version: 3 Homepage: https://www.qt.io/ Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components. Build-Depends: zlib, zstd, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl, angle (!windows), egl-registry, icu (!uwp), fontconfig (!windows) diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 1044df3174644f..7c87ebc7206e33 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -239,14 +239,14 @@ elseif(VCPKG_TARGET_IS_LINUX) "SQLITE_LIBS=${SQLITE_RELEASE} -ldl -lpthread" "HARFBUZZ_LIBS=${HARFBUZZ_RELEASE} ${FREETYPE_RELEASE_ALL} ${GLIB_RELEASE} -lpthread" "OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread" - "FONTCONFIG_LIBS=${FONTCONFIG_RELEASE} ${FREETYPE_RELEASE} ${EXPAT_RELEASE}" + "FONTCONFIG_LIBS=${FONTCONFIG_RELEASE} ${FREETYPE_RELEASE} ${EXPAT_RELEASE} -luuid" ) list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread" "SQLITE_LIBS=${SQLITE_DEBUG} -ldl -lpthread" "HARFBUZZ_LIBS=${HARFBUZZ_DEBUG} ${FREETYPE_DEBUG_ALL} ${GLIB_DEBUG} -lpthread" "OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread" - "FONTCONFIG_LIBS=${FONTCONFIG_DEBUG} ${FREETYPE_DEBUG} ${EXPAT_DEBUG}" + "FONTCONFIG_LIBS=${FONTCONFIG_DEBUG} ${FREETYPE_DEBUG} ${EXPAT_DEBUG} -luuid" ) elseif(VCPKG_TARGET_IS_OSX) list(APPEND CORE_OPTIONS -fontconfig) From 758042f27bfe01740dc59a29e774f3139145e94c Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Sun, 23 Aug 2020 08:03:48 +0200 Subject: [PATCH 071/114] osx install gettext for autopoint --- scripts/azure-pipelines/osx/azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml index a3414e86190f16..f65fa8ce024d6e 100644 --- a/scripts/azure-pipelines/osx/azure-pipelines.yml +++ b/scripts/azure-pipelines/osx/azure-pipelines.yml @@ -25,7 +25,8 @@ jobs: brew list autoconf || brew install autoconf brew list autoconf-archive || brew install autoconf-archive brew list automake || brew install automake - brew list autopoint || brew install autopoint + brew list gettext || brew install gettext + brew list pkg-config || brew install pkg-config brew list libtool || brew install libtool brew list bison || brew install bison From 50e1d339a3ef57930b00aa687de37b9d55f002c6 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 23 Aug 2020 13:39:41 +0200 Subject: [PATCH 072/114] fix io2d regression by saying the port is broken ..... (which it is; upstream needs to learn proper cmake) --- ports/io2d/CONTROL | 1 + ports/io2d/fix-expat.patch | 6 ++++-- ports/io2d/portfile.cmake | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ports/io2d/CONTROL b/ports/io2d/CONTROL index 596cdcd23814d8..4469486ea5fa33 100644 --- a/ports/io2d/CONTROL +++ b/ports/io2d/CONTROL @@ -3,3 +3,4 @@ Version: 2019-07-11 Port-Version: 3 Description: a lightweight, cross platform drawing library Build-Depends: cairo (!osx), cairo[x11] (linux), graphicsmagick (!osx) +Supports: !windows, !osx, !linux \ No newline at end of file diff --git a/ports/io2d/fix-expat.patch b/ports/io2d/fix-expat.patch index 25d38bb10507f8..de88b6775f6d10 100644 --- a/ports/io2d/fix-expat.patch +++ b/ports/io2d/fix-expat.patch @@ -9,5 +9,7 @@ index abb1501..412f3d4 100644 - find_library(EXPAT_LIB expat) + find_library(EXPAT_LIB libexpat) find_library(LZMA_LIB lzma) - find_library(ICONV_LIB libiconv) - find_library(CHARSET_LIB libcharset) +- find_library(ICONV_LIB libiconv) ++ find_library(ICONV_LIB NAMES iconv libiconv) +- find_library(CHARSET_LIB libcharset) ++ find_library(CHARSET_LIB charset) diff --git a/ports/io2d/portfile.cmake b/ports/io2d/portfile.cmake index f6f9011e5a6e02..536dc4c3f2fbc7 100644 --- a/ports/io2d/portfile.cmake +++ b/ports/io2d/portfile.cmake @@ -1,5 +1,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +# This port is simply broken. +# It uses raw find_library calls for most of its dependencies which in most cases will not find the correct library for debug builds + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cpp-io2d/P0267_RefImpl From 288461df84176e1a8bd97b1d8a68b55382917494 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 23 Aug 2020 13:45:29 +0200 Subject: [PATCH 073/114] restore the old libxml2 wrapper with minor modifications --- ports/libxml2/vcpkg-cmake-wrapper.cmake | 28 ++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake index abbc1239a78522..405b94670762ea 100644 --- a/ports/libxml2/vcpkg-cmake-wrapper.cmake +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -1,15 +1,33 @@ -_find_package(Iconv) _find_package(${ARGS}) if(LibXml2_FOUND) find_package(LibLZMA) find_package(ZLIB) - list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES} ${Iconv_LIBRARIES}) + include(SelectLibraryConfigurations) + find_library(ICONV_LIBRARY_DEBUG NAMES iconvd libiconvd iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_INSTALLED_DIR}/debug" NO_DEFAULT_PATH) + find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib) + find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) + find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib) + select_library_configurations(ICONV) + select_library_configurations(CHARSET) + list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES}) if(CMAKE_SYSTEM_NAME STREQUAL "Linux") list(APPEND LIBXML2_LIBRARIES m) - elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") - list(APPEND LIBXML2_LIBRARIES ws2_32) + endif() + if(ICONV_LIBRARIES) + list(APPEND LIBXML2_LIBRARIES ${ICONV_LIBRARIES}) if(TARGET LibXml2::LibXml2) - target_link_libraries(LibXml2::LibXml2 INTERFACE Iconv::Iconv) + target_link_libraries(LibXml2::LibXml2 INTERFACE ${ICONV_LIBRARIES} ) endif() endif() + if(CHARSET_LIBRARIES) + list(APPEND LIBXML2_LIBRARIES ${CHARSET_LIBRARIES}) + if(TARGET LibXml2::LibXml2) + target_link_libraries(LibXml2::LibXml2 INTERFACE ${CHARSET_LIBRARIES}) + endif() + endif() + if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + list(APPEND LIBXML2_LIBRARIES ws2_32) + endif() endif() From bb0910958646a4fbba149d7b5c798545895a23b2 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 23 Aug 2020 14:17:51 +0200 Subject: [PATCH 074/114] fix xmlsec regression --- ports/xmlsec/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/xmlsec/CMakeLists.txt b/ports/xmlsec/CMakeLists.txt index fa615ddfb575eb..54f04475194236 100644 --- a/ports/xmlsec/CMakeLists.txt +++ b/ports/xmlsec/CMakeLists.txt @@ -139,9 +139,12 @@ if(INSTALL_HEADERS_TOOLS) endif() target_link_libraries(xmlsec PRIVATE - ${LIBXML2_LIBRARIES} OpenSSL::SSL libxmlsec libxmlsec-openssl Iconv::Iconv + ${LIBXML2_LIBRARIES} OpenSSL::SSL libxmlsec libxmlsec-openssl ) - + if(NOT Iconv_IS_BUILT_IN) + target_link_libraries(xmlsec PRIVATE Iconv::Iconv) + endif() + target_compile_definitions(xmlsec PRIVATE -DXMLSEC_CRYPTO_OPENSSL ) From 14f517d8cf46539e6705613434780cbdf2bee88a Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 23 Aug 2020 15:48:24 +0200 Subject: [PATCH 075/114] install wrapper correctly --- ports/libiconv/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index 02f7cea5e8fd5c..7f3a0eb46d48a5 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -1,7 +1,7 @@ if(NOT VCPKG_TARGET_IS_WINDOWS) set(VCPKG_POLICY_EMPTY_PACKAGE enabled) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/Iconv) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Iconv) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/iconv) return() endif() @@ -37,7 +37,7 @@ vcpkg_copy_pdbs() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/iconv) file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) From 28ec78fe88a74ed7386f2709c8b0b4d3db152742 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 23 Aug 2020 23:26:15 +0200 Subject: [PATCH 076/114] try actual fixing io2d --- ports/io2d/CONTROL | 1 - ports/io2d/Fix-FindCairo.patch | 15 -------- ports/io2d/cmake.dep.patch | 62 ++++++++++++++++++++++++++++++++ ports/io2d/fix-expat.patch | 15 -------- ports/io2d/fix-linux-build.patch | 22 ------------ ports/io2d/portfile.cmake | 29 ++++++++------- 6 files changed, 76 insertions(+), 68 deletions(-) delete mode 100644 ports/io2d/Fix-FindCairo.patch create mode 100644 ports/io2d/cmake.dep.patch delete mode 100644 ports/io2d/fix-expat.patch delete mode 100644 ports/io2d/fix-linux-build.patch diff --git a/ports/io2d/CONTROL b/ports/io2d/CONTROL index 4469486ea5fa33..596cdcd23814d8 100644 --- a/ports/io2d/CONTROL +++ b/ports/io2d/CONTROL @@ -3,4 +3,3 @@ Version: 2019-07-11 Port-Version: 3 Description: a lightweight, cross platform drawing library Build-Depends: cairo (!osx), cairo[x11] (linux), graphicsmagick (!osx) -Supports: !windows, !osx, !linux \ No newline at end of file diff --git a/ports/io2d/Fix-FindCairo.patch b/ports/io2d/Fix-FindCairo.patch deleted file mode 100644 index e3caa2f7f64250..00000000000000 --- a/ports/io2d/Fix-FindCairo.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt -index d0e9176..2ac638c 100644 ---- a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt -+++ b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt -@@ -24,7 +24,9 @@ target_include_directories(io2d_cairo PUBLIC - - target_compile_features(io2d_cairo PUBLIC cxx_std_17) - --target_link_libraries(io2d_cairo PUBLIC io2d_core Cairo::Cairo unofficial::graphicsmagick::graphicsmagick) -+find_package(unofficial-cairo CONFIG REQUIRED) -+ -+target_link_libraries(io2d_cairo PUBLIC io2d_core unofficial::cairo::cairo unofficial::graphicsmagick::graphicsmagick) - - install( - TARGETS io2d_cairo EXPORT io2d_targets diff --git a/ports/io2d/cmake.dep.patch b/ports/io2d/cmake.dep.patch new file mode 100644 index 00000000000000..baad3634137cb8 --- /dev/null +++ b/ports/io2d/cmake.dep.patch @@ -0,0 +1,62 @@ +diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt +index 5ebeb6afa..702864667 100644 +--- a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt ++++ b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt +@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.8) + + project(io2d CXX) + +-find_package(Cairo REQUIRED) +-find_package(GraphicsMagick REQUIRED) ++find_package(unofficial-Cairo REQUIRED) ++find_package(unofficial-GraphicsMagick REQUIRED) + + add_library(io2d_cairo + cairo_renderer-graphicsmagickinit.cpp +@@ -24,7 +24,7 @@ target_include_directories(io2d_cairo PUBLIC + + target_compile_features(io2d_cairo PUBLIC cxx_std_17) + +-target_link_libraries(io2d_cairo PUBLIC io2d_core Cairo::Cairo GraphicsMagick::GraphicsMagick) ++target_link_libraries(io2d_cairo PUBLIC io2d_core unofficial::cairo::cairo unofficial::graphicsmagick::graphicsmagick) + + install( + TARGETS io2d_cairo EXPORT io2d_targets +diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt +index abb150113..75d8c654d 100644 +--- a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt ++++ b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt +@@ -27,15 +27,24 @@ if(MSVC) + target_compile_definitions(io2d_cairo_win32 PUBLIC -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS) + + find_library(PIXMAN_LIB pixman-1) +- find_library(FREETYPE_LIB freetype) +- find_library(FONTCONFIG_LIB fontconfig) +- find_library(BZ_LIB bz2) +- find_library(JPEG_LIB jpeg) +- find_library(TIFF_LIB tiff) +- find_library(EXPAT_LIB expat) +- find_library(LZMA_LIB lzma) +- find_library(ICONV_LIB libiconv) +- find_library(CHARSET_LIB libcharset) ++ find_package(FreeType REQUIRED) ++ set(FREETYPE_LIB ${FREETYPE_LIBRARIES}) # I dont use targets here since this means I have to correct the config.cmake too ++ find_package(Fontconfig REQUIRED) ++ set(FONTCONFIG_LIB ${Fontconfig_LIBRARIES}) ++ find_package(BZip2 REQUIRED) ++ set(BZ_LIB ${BZIP2_LIBRARIES}) ++ find_package(JPEG REQUIRED) ++ set(JPEG_LIB ${JPEG_LIBRARIES}) ++ find_package(TIFF REQUIRED) ++ set(TIFF_LIB ${TIFF_LIBRARIES}) ++ find_package(EXPAT REQUIRED) ++ set(EXPAT_LIB ${EXPAT_LIBRARIES}) ++ find_package(LibLZMA REQUIRED) ++ set(LZMA_LIB ${LIBLZMA_LIBRARIES}) ++ find_package(Iconv REQUIRED) ++ if(NOT Iconv_IS_BUILT_IN) ++ set(ICONV_LIB ${Iconv_LIBRARIES}) ++ endif() + + target_link_libraries(io2d_cairo_win32 PUBLIC ${PIXMAN_LIB} ${FREETYPE_LIB} ${FONTCONFIG_LIB} ${BZ_LIB} ${JPEG_LIB} ${TIFF_LIB} ${EXPAT_LIB} ${LZMA_LIB} ${ICONV_LIB} ${CHARSET_LIB}) + endif() diff --git a/ports/io2d/fix-expat.patch b/ports/io2d/fix-expat.patch deleted file mode 100644 index de88b6775f6d10..00000000000000 --- a/ports/io2d/fix-expat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt -index abb1501..412f3d4 100644 ---- a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt -+++ b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt -@@ -32,7 +32,7 @@ if(MSVC) - find_library(BZ_LIB bz2) - find_library(JPEG_LIB jpeg) - find_library(TIFF_LIB tiff) -- find_library(EXPAT_LIB expat) -+ find_library(EXPAT_LIB libexpat) - find_library(LZMA_LIB lzma) -- find_library(ICONV_LIB libiconv) -+ find_library(ICONV_LIB NAMES iconv libiconv) -- find_library(CHARSET_LIB libcharset) -+ find_library(CHARSET_LIB charset) diff --git a/ports/io2d/fix-linux-build.patch b/ports/io2d/fix-linux-build.patch deleted file mode 100644 index be038fab41be04..00000000000000 --- a/ports/io2d/fix-linux-build.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt -index 5ebeb6a..d0e9176 100644 ---- a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt -+++ b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt -@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.8) - project(io2d CXX) - - find_package(Cairo REQUIRED) --find_package(GraphicsMagick REQUIRED) -+find_package(unofficial-graphicsmagick REQUIRED) - - add_library(io2d_cairo - cairo_renderer-graphicsmagickinit.cpp -@@ -24,7 +24,7 @@ target_include_directories(io2d_cairo PUBLIC - - target_compile_features(io2d_cairo PUBLIC cxx_std_17) - --target_link_libraries(io2d_cairo PUBLIC io2d_core Cairo::Cairo GraphicsMagick::GraphicsMagick) -+target_link_libraries(io2d_cairo PUBLIC io2d_core Cairo::Cairo unofficial::graphicsmagick::graphicsmagick) - - install( - TARGETS io2d_cairo EXPORT io2d_targets diff --git a/ports/io2d/portfile.cmake b/ports/io2d/portfile.cmake index 536dc4c3f2fbc7..a2ab59ade548fb 100644 --- a/ports/io2d/portfile.cmake +++ b/ports/io2d/portfile.cmake @@ -6,19 +6,17 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cpp-io2d/P0267_RefImpl - REF add3c9792dcd3f08c497ae3adafb2a3b5b5fc338 - SHA512 2727342fbb31523583374ab6df6ff7542e80b4f94319cf0f293e8c085711fa10ed312b4fc4b91391112b5e27eaaae519cb4141ea9d4108ffb5b7383a043b38b8 + REF caa0ba0cb5a421a38bc26afaf3505bee206c44dd + SHA512 f8e5a708f6cbda913a0492a843e1502b8d3cc615a6abda50e850be944e1484ec9087b787c54cc25d513172a7d5ab789be41a761c97df94266df4d1bcf14db17c HEAD_REF master PATCHES - fix-linux-build.patch - Fix-FindCairo.patch - fix-expat.patch + cmake.dep.patch ) if (VCPKG_TARGET_IS_OSX) set(IO2D_DEFAULT_OPTION "-DIO2D_DEFAULT=COREGRAPHICS_MAC") endif() - +vcpkg_find_acquire_program(PKGCONFIG) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -27,6 +25,7 @@ vcpkg_configure_cmake( -DIO2D_WITHOUT_TESTS=1 -DCMAKE_INSTALL_INCLUDEDIR:STRING=include ${IO2D_DEFAULT_OPTION} + #"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}" ) vcpkg_install_cmake() @@ -35,15 +34,15 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/io2d) -if (NOT VCPKG_TARGET_IS_OSX) - file(RENAME ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake ${CURRENT_PACKAGES_DIR}/share/io2d/io2dTargets.cmake) - file(WRITE ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake " - include(CMakeFindDependencyMacro) - find_dependency(unofficial-cairo CONFIG) - find_dependency(unofficial-graphicsmagick CONFIG) +# There probably nees to be more fixed in the config.... Would be better if this port would be using targets for ext. deps. +file(RENAME ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake ${CURRENT_PACKAGES_DIR}/share/io2d/io2dTargets.cmake) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake " +include(CMakeFindDependencyMacro) +find_dependency(unofficial-cairo CONFIG) +find_dependency(unofficial-graphicsmagick CONFIG) + +include(\${CMAKE_CURRENT_LIST_DIR}/io2dTargets.cmake) +") - include(\${CMAKE_CURRENT_LIST_DIR}/io2dTargets.cmake) - ") -endif() file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file From 6ea5a9425237ce55d4e39ae293fb6dabf68de403 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 23 Aug 2020 23:50:57 +0200 Subject: [PATCH 077/114] improve iconv wrapper --- ports/libiconv/vcpkg-cmake-wrapper.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ports/libiconv/vcpkg-cmake-wrapper.cmake b/ports/libiconv/vcpkg-cmake-wrapper.cmake index 472dd8082db8af..db39413da1f899 100644 --- a/ports/libiconv/vcpkg-cmake-wrapper.cmake +++ b/ports/libiconv/vcpkg-cmake-wrapper.cmake @@ -1,10 +1,15 @@ include(SelectLibraryConfigurations) _find_package(${ARGS}) -if(Iconv_FOUND) +if(Iconv_FOUND AND NOT Iconv_IS_BUILT_IN) find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib) select_library_configurations(CHARSET) - list(APPEND Iconv_LIBRARIES ${CHARSET_LIBRARIES}) + if(CHARSET_LIBRARIES) + list(APPEND Iconv_LIBRARIES ${CHARSET_LIBRARIES}) + if(TARGET Iconv::Iconv) + target_link_libraries(Iconv::Iconv INTERFACE ${CHARSET_LIBRARIES}) + endif() + endif() endif() From 7b40bf34584abae84e96f50122468099ca07d6d9 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 24 Aug 2020 09:47:16 +0200 Subject: [PATCH 078/114] add latest changes from update_fontconfig PR --- scripts/cmake/vcpkg_build_make.cmake | 7 +++++-- scripts/cmake/vcpkg_configure_make.cmake | 11 ++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index 29b5191af0d285..b4a30c705b94c6 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -27,6 +27,9 @@ ## ### DISABLE_PARALLEL ## The underlying buildsystem will be instructed to not parallelize ## +## ### WORKING_SUBDIR +## Additional subdir to invoke make in. Useful if only parts of a port should be built. +## ## ## Notes: ## This command should be preceeded by a call to [`vcpkg_configure_make()`](vcpkg_configure_make.md). ## You can use the alias [`vcpkg_install_make()`](vcpkg_configure_make.md) function if your CMake script supports the @@ -40,7 +43,7 @@ ## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) function(vcpkg_build_make) include("${CMAKE_VARS_FILE}") - cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET" "") + cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET;WORKING_SUBDIR" "") if(NOT _bc_LOGFILE_ROOT) set(_bc_LOGFILE_ROOT "build") @@ -108,7 +111,7 @@ function(vcpkg_build_make) set(PATH_SUFFIX "") endif() - set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}${_bc_WORKING_SUBDIR}") message(STATUS "Building ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") extract_cpp_flags_and_set_cflags_and_cxxflags(${CMAKE_BUILDTYPE}) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index d02061e9186059..ab05d7f53338a2 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -367,6 +367,7 @@ function(vcpkg_configure_make) _vcpkg_append_to_configure_environment(CONFIGURE_ENV STRIP "${VCPKG_DETECTED_STRIP}") else() _vcpkg_append_to_configure_environment(CONFIGURE_ENV STRIP ":") + list(APPEND _csc_OPTIONS ac_cv_prog_ac_ct_STRIP=:) endif() if(VCPKG_DETECTED_NM) # If required set the ENV variable NM in the portfile correctly _vcpkg_append_to_configure_environment(CONFIGURE_ENV NM "${VCPKG_DETECTED_NM}") @@ -385,7 +386,7 @@ function(vcpkg_configure_make) foreach(_env IN LISTS _csc_CONFIGURE_ENVIRONMENT_VARIABLES) _vcpkg_append_to_configure_environment(CONFIGURE_ENV ${_env} "${${_env}}") endforeach() - + debug_message("CONFIGURE_ENV: '${CONFIGURE_ENV}'") # Other maybe interesting variables to control # COMPILE This is the command used to actually compile a C source file. The file name is appended to form the complete command line. # LINK This is the command used to actually link a C program. @@ -488,7 +489,6 @@ function(vcpkg_configure_make) macro(convert_to_list input output) string(REGEX MATCHALL "(( +|^ *)[^ ]+)" ${output} "${${input}}") - endmacro() convert_to_list(VCPKG_DETECTED_C_STANDARD_LIBRARIES C_LIBS_LIST) convert_to_list(VCPKG_DETECTED_CXX_STANDARD_LIBRARIES CXX_LIBS_LIST) @@ -497,6 +497,9 @@ function(vcpkg_configure_make) list(REMOVE_DUPLICATES ALL_LIBS_LIST) list(TRANSFORM ALL_LIBS_LIST STRIP) list(TRANSFORM ALL_LIBS_LIST REPLACE "(.lib|.a|.so)$" "") + if(VCPKG_TARGET_IS_WINDOWS) + list(REMOVE_ITEM ALL_LIBS_LIST "uuid") + endif() list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) if(ALL_LIBS_STRING) @@ -506,7 +509,7 @@ function(vcpkg_configure_make) set(ENV{LIBS} "-l${ALL_LIBS_STRING}") endif() endif() - + debug_message(STATUS "ENV{LIBS}:$ENV{LIBS}") vcpkg_find_acquire_program(PKGCONFIG) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND NOT PKGCONFIG STREQUAL "--static") set(PKGCONFIG "${PKGCONFIG} --static") @@ -689,6 +692,8 @@ function(vcpkg_configure_make) file(WRITE "${lt_file}" "${_contents}") endforeach() endif() + + file(RENAME "${TAR_DIR}/config.log" "${CURRENT_BUILDTREES_DIR}/config.log-${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}}.log") endif() if(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype}) From c249d191b15ab2946391086c53649e14f588c280 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Fri, 2 Oct 2020 22:21:45 +0200 Subject: [PATCH 079/114] Apply suggestions from code review first set which don't need special attention Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com> --- scripts/cmake/vcpkg_build_make.cmake | 11 ++--------- scripts/cmake/vcpkg_get_cmake_vars.cmake | 1 + 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index cc78bd74de8d91..d69ec271d81846 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -43,7 +43,7 @@ ## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) function(vcpkg_build_make) include("${CMAKE_VARS_FILE}") - cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET;WORKING_SUBDIR" "") + cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET;SUBPATH" "") if(NOT _bc_LOGFILE_ROOT) set(_bc_LOGFILE_ROOT "build") @@ -128,7 +128,7 @@ function(vcpkg_build_make) set(LDFLAGS_${CMAKE_BUILDTYPE} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib -L${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link ${LINKER_FLAGS_${CMAKE_BUILDTYPE}}") endif() - # Setup environment + # Setup environment set(ENV{CPPFLAGS} "${CPPFLAGS_${CMAKE_BUILDTYPE}}") set(ENV{CFLAGS} "${CFLAGS_${CMAKE_BUILDTYPE}}") set(ENV{CXXFLAGS} "${CXXFLAGS_${CMAKE_BUILDTYPE}}") @@ -157,10 +157,6 @@ function(vcpkg_build_make) set(NO_PARALLEL_MAKE_CMD_LINE ${MAKE_COMMAND} ${NO_PARALLEL_MAKE_OPTS}) endif() - # foreach(_envar IN LISTS printvars) - # message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") - # endforeach() - if (_bc_DISABLE_PARALLEL) vcpkg_execute_build_process( COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} @@ -183,9 +179,6 @@ function(vcpkg_build_make) else() set(MAKE_CMD_LINE ${MAKE_COMMAND} ${INSTALL_OPTS}) endif() - # foreach(_envar IN LISTS printvars) - # message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") - # endforeach() vcpkg_execute_build_process( COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} WORKING_DIRECTORY "${WORKING_DIRECTORY}" diff --git a/scripts/cmake/vcpkg_get_cmake_vars.cmake b/scripts/cmake/vcpkg_get_cmake_vars.cmake index 5ea9bc233fb572..d93f396532eb3b 100644 --- a/scripts/cmake/vcpkg_get_cmake_vars.cmake +++ b/scripts/cmake/vcpkg_get_cmake_vars.cmake @@ -1,5 +1,6 @@ ## # vcpkg_get_cmake_vars ## +## **Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** ## Runs a cmake configure with a dummy project to extract certain cmake variables ## ## ## Usage From b457f4a81dfb4b1ec0b42fca86f984107074b32e Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Fri, 2 Oct 2020 22:31:53 +0200 Subject: [PATCH 080/114] Apply suggestions from code review one more simple change Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com> --- scripts/cmake/vcpkg_configure_make.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 9bcdd7269cfc9a..6e086560a82043 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -653,9 +653,6 @@ function(vcpkg_configure_make) vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/bin") endif() debug_message("Configure command:'${command}'") - # foreach(_envar IN LISTS printvars) - # message(STATUS "ENV{${_envar}} : '$ENV{${_envar}}'") - # endforeach() if (NOT _csc_SKIP_CONFIGURE) message(STATUS "Configuring ${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}}") vcpkg_execute_required_process( From 7b281010ef9f9fc282b1ac7c701bc00336e95f57 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 13 Oct 2020 17:03:19 +0200 Subject: [PATCH 081/114] [x264] set env AS --- ports/x264/CONTROL | 2 +- ports/x264/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/x264/CONTROL b/ports/x264/CONTROL index ce64f5f7c4f49a..15e35036a06430 100644 --- a/ports/x264/CONTROL +++ b/ports/x264/CONTROL @@ -1,6 +1,6 @@ Source: x264 Version: 157-303c484ec828ed0 -Port-Version: 12 +Port-Version: 13 Homepage: https://github.com/mirror/x264 Description: x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format Build-Depends: pthread (linux&osx) diff --git a/ports/x264/portfile.cmake b/ports/x264/portfile.cmake index d2084978cba935..5c716f0d1b4b1a 100644 --- a/ports/x264/portfile.cmake +++ b/ports/x264/portfile.cmake @@ -21,6 +21,7 @@ if(VCPKG_TARGET_IS_WINDOWS) _vcpkg_determine_autotools_target_cpu(HOST_ARCH) list(APPEND OPTIONS --build=${BUILD_ARCH}-pc-mingw32) list(APPEND OPTIONS --host=${HOST_ARCH}-pc-mingw32) + set(ENV{AS} "${NASM}") endif() if(VCPKG_TARGET_IS_UWP) From c04024617ca14247180fa372827bb1c4e4cffb62 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 16 Oct 2020 00:01:39 +0200 Subject: [PATCH 082/114] fix bugs due to refactor --- scripts/cmake/vcpkg_get_cmake_vars.cmake | 1 + scripts/get_cmake_vars/CMakeLists.txt | 44 +++++++++++------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/scripts/cmake/vcpkg_get_cmake_vars.cmake b/scripts/cmake/vcpkg_get_cmake_vars.cmake index 33f405f98e0d5b..62b197eba90b91 100644 --- a/scripts/cmake/vcpkg_get_cmake_vars.cmake +++ b/scripts/cmake/vcpkg_get_cmake_vars.cmake @@ -43,6 +43,7 @@ function(vcpkg_get_cmake_vars) set(DEFAULT_OUT "${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}.cmake.log") # So that the file gets included in CI artifacts. list(APPEND _gcv_OPTIONS "-DVCPKG_OUTPUT_FILE:PATH=${DEFAULT_OUT}") set(${_gcv_OUTPUT_FILE} "${DEFAULT_OUT}" PARENT_SCOPE) + set(${_gcv_OUTPUT_FILE} "${DEFAULT_OUT}") endif() vcpkg_configure_cmake( diff --git a/scripts/get_cmake_vars/CMakeLists.txt b/scripts/get_cmake_vars/CMakeLists.txt index 00e0690ebdaa79..c45cf68205434d 100644 --- a/scripts/get_cmake_vars/CMakeLists.txt +++ b/scripts/get_cmake_vars/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.17) -set(OUTPUT_STRING) +set(VCPKG_LANGUAGES "C;CXX" CACHE STRING "Languages to enables for this project") +set(OUTPUT_STRING) # Build default checklists list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_CROSSCOMPILING CMAKE_SYSTEM_NAME @@ -39,13 +40,12 @@ list(REMOVE_DUPLICATES VCPKG_DEFAULT_ENV_VARS_TO_CHECK) #Flags to check. Flags are a bit special since they are configuration aware. set(FLAGS ${VCPKG_LANGUAGES} RC SHARED_LINKER STATIC_LINKER EXE_LINKER) foreach(flag IN LISTS FLAGS) - list(APPEND VCPKG_DEFAULT_FLAGS_TO_CHECK CMAKE_${flag}) -endforeach + list(APPEND VCPKG_DEFAULT_FLAGS_TO_CHECK CMAKE_${flag}_FLAGS) +endforeach() list(REMOVE_DUPLICATES VCPKG_DEFAULT_FLAGS_TO_CHECK) # TODO if ever necessary: Properties to check -set(VCPKG_LANGUAGES "C;CXX" CACHE STRING "Languages to enables for this project") set(VCPKG_VAR_PREFIX "VCPKG_DETECTED" CACHE STRING "Variable prefix to use for detected flags") set(VCPKG_OUTPUT_FILE "${CMAKE_BINARY_DIR}/../detected_flags.cmake.${VCPKG_TARGET_TRIPLET}.log" CACHE STRING "Output CMake files") set(VCPKG_VARS_TO_CHECK "${VCPKG_DEFAULT_VARS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults") @@ -60,24 +60,6 @@ endif() project(get_cmake_vars LANGUAGES ${VCPKG_LANGUAGES}) -set(FLAGS ${VCPKG_LANGUAGES} RC SHARED_LINKER STATIC_LINKER EXE_LINKER) -foreach(flag IN LISTS VCPKG_FLAGS_TO_CHECK) - string(REGEX REPLACE " +" " " ${flag} "${${flag}}") - string(REGEX REPLACE "( |^)/" "\\1-" ${flag} "${${flag}}") - string(STRIP "${${flag}}" ${flag}) - string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_RAW_${flag} \" ${${flag}}\")\n") - foreach(config IN LISTS VCPKG_CONFIGS) - string(REGEX REPLACE " +" " " ${flag}_${config} "${${flag}_${config}}") - string(REGEX REPLACE "( |^)/" "\\1-" ${flag}_${config} "${${flag}_${config}}") - string(STRIP "${${flag}_${config}}" ${flag}_${config}) - string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_RAW_${flag}_${config} \"${CMAKE_${flag}_FLAGS_${config}}\")\n") - set(COMBINED_${flag}_${config} "${${flag}} ${${flag}_${config}}") - string(REGEX REPLACE " +" " " COMBINED_${flag}_${config} "${COMBINED_${flag}_${config}}") - string(STRIP "${COMBINED_${flag}_${config}}" COMBINED_${flag}_${config}) - string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${flag}_${config} \"${COMBINED_${flag}_${config}}\")\n") - endforeach() -endforeach() - # These seem to be empty. # set(add_props INCLUDE_DIRECTORIES COMPILE_DEFINITIONS COMPILE_OPTIONS LINK_DIRECTORIES LINK_OPTIONS) # foreach(prop IN LISTS add_props) @@ -90,7 +72,7 @@ endforeach() # endforeach() foreach(VAR IN LISTS VCPKG_VARS_TO_CHECK) - string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${VAR} \"${${VAR}}\"\n") + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${VAR} \"${${VAR}}\")\n") endforeach() foreach(_env IN LISTS VCPKG_ENV_VARS_TO_CHECK) @@ -102,6 +84,22 @@ foreach(_env IN LISTS VCPKG_ENV_VARS_TO_CHECK) endif() endforeach() +foreach(flag IN LISTS VCPKG_FLAGS_TO_CHECK) + string(REGEX REPLACE " +" " " ${flag} "${${flag}}") + string(REGEX REPLACE "( |^)/" "\\1-" ${flag} "${${flag}}") + string(STRIP "${${flag}}" ${flag}) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_RAW_${flag} \" ${${flag}}\")\n") + foreach(config IN LISTS VCPKG_CONFIGS) + string(REGEX REPLACE " +" " " ${flag}_${config} "${${flag}_${config}}") + string(REGEX REPLACE "( |^)/" "\\1-" ${flag}_${config} "${${flag}_${config}}") + string(STRIP "${${flag}_${config}}" ${flag}_${config}) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_RAW_${flag}_${config} \"${CMAKE_${flag}_FLAGS_${config}}\")\n") + set(COMBINED_${flag}_${config} "${${flag}} ${${flag}_${config}}") + string(REGEX REPLACE " +" " " COMBINED_${flag}_${config} "${COMBINED_${flag}_${config}}") + string(STRIP "${COMBINED_${flag}_${config}}" COMBINED_${flag}_${config}) + string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${flag}_${config} \"${COMBINED_${flag}_${config}}\")\n") + endforeach() +endforeach() file(WRITE "${VCPKG_OUTPUT_FILE}" "${OUTPUT_STRING}") From 28a4b38ac6ab00de770c82c770910c6daa628a9c Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 16 Oct 2020 00:03:58 +0200 Subject: [PATCH 083/114] use subpath everywhere --- scripts/cmake/vcpkg_build_make.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index 4b9c46d3e86c17..f67cfd4344f40e 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -27,7 +27,7 @@ ## ### DISABLE_PARALLEL ## The underlying buildsystem will be instructed to not parallelize ## -## ### WORKING_SUBDIR +## ### SUBPATH ## Additional subdir to invoke make in. Useful if only parts of a port should be built. ## ## ## Notes: @@ -112,7 +112,7 @@ function(vcpkg_build_make) set(PATH_SUFFIX "") endif() - set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}${_bc_WORKING_SUBDIR}") + set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}${_bc_SUBPATH}") message(STATUS "Building ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") extract_cpp_flags_and_set_cflags_and_cxxflags(${CMAKE_BUILDTYPE}) From ae93df4e5b6d75833befd5b141693cc952d13c33 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 16 Oct 2020 00:11:53 +0200 Subject: [PATCH 084/114] apply changes from CR --- scripts/get_cmake_vars/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/get_cmake_vars/CMakeLists.txt b/scripts/get_cmake_vars/CMakeLists.txt index c45cf68205434d..e22b356aeb17ba 100644 --- a/scripts/get_cmake_vars/CMakeLists.txt +++ b/scripts/get_cmake_vars/CMakeLists.txt @@ -47,11 +47,14 @@ list(REMOVE_DUPLICATES VCPKG_DEFAULT_FLAGS_TO_CHECK) # TODO if ever necessary: Properties to check set(VCPKG_VAR_PREFIX "VCPKG_DETECTED" CACHE STRING "Variable prefix to use for detected flags") -set(VCPKG_OUTPUT_FILE "${CMAKE_BINARY_DIR}/../detected_flags.cmake.${VCPKG_TARGET_TRIPLET}.log" CACHE STRING "Output CMake files") set(VCPKG_VARS_TO_CHECK "${VCPKG_DEFAULT_VARS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults") set(VCPKG_FLAGS_TO_CHECK "${VCPKG_DEFAULT_FLAGS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults") set(VCPKG_ENV_VARS_TO_CHECK "${VCPKG_DEFAULT_ENV_VARS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults") +if(NOT VCPKG_OUTPUT_FILE) + message(FATAL_ERROR "VCPKG_OUTPUT_FILE is required to be defined") +endif() + if(CMAKE_BUILD_TYPE) string(TOUPPER "${CMAKE_BUILD_TYPE}" VCPKG_CONFIGS) else() From 7e21a9d5fdcfe80f5052734d8aea47ae24ccfc25 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 16 Oct 2020 00:35:37 +0200 Subject: [PATCH 085/114] fix fontconfig build. --- ports/fontconfig/portfile.cmake | 1 + scripts/cmake/vcpkg_acquire_msys.cmake | 14 ++++++++++++++ scripts/cmake/vcpkg_configure_make.cmake | 4 ++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index f3afb909fc8731..f7cc34212d2075 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -34,6 +34,7 @@ vcpkg_configure_make( "--with-libiconv-lib=${CURRENT_INSTALLED_DIR}/lib" ${OPT_REL} ADD_BIN_TO_PATH + ADDITIONAL_MSYS_PACKAGES xz gettext gettext-devel # for autopoint ) vcpkg_install_make(ADD_BIN_TO_PATH) diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index 64f0e669912397..d509ddd03aa5f0 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -228,6 +228,15 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) URL "https://repo.msys2.org/msys/x86_64/gmp-6.2.0-1-x86_64.pkg.tar.xz" SHA512 1389a443e775bb255d905665dd577bef7ed71d51a8c24d118097f8119c08c4dfe67505e88ddd1e9a3764dd1d50ed8b84fa34abefa797d257e90586f0cbf54de8 ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/xz-5.2.4-1-x86_64.pkg.tar.xz" + SHA512 4b4daa6250d50cfd6575630803e57aaca5bdb24057456761565404a37a9224535e51ef1212f430ffa434d7b7128ad61792c59eb6bc905b8b4455fed25bff499a + DEPS liblzma libiconv gettext + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/liblzma-5.2.5-1-x86_64.pkg.tar.xz" + SHA512 8d5c04354fdc7309e73abce679a4369c0be3dc342de51cef9d2a932b7df6a961c8cb1f7e373b1b8b2be40343a95fbd57ac29ebef63d4a2074be1d865e28ca6ad + ) msys_package( URL "https://repo.msys2.org/msys/x86_64/libreadline-8.0.004-1-x86_64.pkg.tar.xz" SHA512 42760bddedccc8d93507c1e3a7a81595dc6392b5e4319d24a85275eb04c30eb79078e4247eb2cdd00ff3884d932639130c89bf1b559310a17fa4858062491f97 @@ -268,6 +277,11 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) SHA512 7306dec7859edc27d70a24ab4b396728481484a426c5aa2f7e9fed2635b3b25548b05b7d37a161a86a8edaa5922948bee8c99b1e8a078606e69ca48a433fe321 DEPS libintl msys2-runtime ) +msys_package( + URL "https://repo.msys2.org/msys/x86_64/gettext-devel-0.19.8.1-1-x86_64.pkg.tar.xz" + SHA512 648f74c23e4f92145cdd0d45ff5285c2df34e855a9e75e5463dd6646967f8cf34a18ce357c6f498a4680e6d7b84e2d1697ba9deee84da8ea6bb14bbdb594ee22 + DEPS gettext + ) msys_package( URL "https://repo.msys2.org/msys/x86_64/gettext-0.19.8.1-1-x86_64.pkg.tar.xz" SHA512 c8c42d084c297746548963f7ec7a7df46241886f3e637e779811ee4a8fee6058f892082bb2658f6777cbffba2de4bcdfd68e846ba63c6a6552c9efb0c8c1de50 diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index c8ab79380eb49a..4715aaa178b154 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -207,7 +207,7 @@ function(vcpkg_configure_make) cmake_parse_arguments(_csc "AUTOCONFIG;SKIP_CONFIGURE;COPY_SOURCE;DISABLE_VERBOSE_FLAGS;NO_ADDITIONAL_PATHS;ADD_BIN_TO_PATH;USE_WRAPPERS;DETERMINE_BUILD_TRIPLET" "SOURCE_PATH;PROJECT_SUBPATH;PRERUN_SHELL;BUILD_TRIPLET" - "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;CONFIGURE_ENVIRONMENT_VARIABLES;CONFIG_DEPENDENT_ENVIRONMENT" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;CONFIGURE_ENVIRONMENT_VARIABLES;CONFIG_DEPENDENT_ENVIRONMENT;ADDITIONAL_MSYS_PACKAGES" ${ARGN} ) vcpkg_get_cmake_vars(OUTPUT_FILE CMAKE_VARS_FILE) @@ -264,7 +264,7 @@ function(vcpkg_configure_make) # Pre-processing windows configure requirements if (CMAKE_HOST_WIN32) - list(APPEND MSYS_REQUIRE_PACKAGES binutils libtool autoconf automake-wrapper automake1.16 m4) + list(APPEND MSYS_REQUIRE_PACKAGES binutils libtool autoconf automake-wrapper automake1.16 m4 ${_csc_ADDITIONAL_MSYS_PACKAGES}) vcpkg_acquire_msys(MSYS_ROOT PACKAGES ${MSYS_REQUIRE_PACKAGES}) if (_csc_AUTOCONFIG AND NOT _csc_BUILD_TRIPLET OR _csc_DETERMINE_BUILD_TRIPLET) _vcpkg_determine_autotools_host_cpu(BUILD_ARCH) # VCPKG_HOST => machine you are building on => --build= From df5776f0a6a1297bfc629042352b21c6d0273fea Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 16 Oct 2020 15:16:58 +0200 Subject: [PATCH 086/114] only change libs in static builds --- scripts/cmake/vcpkg_configure_make.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 4715aaa178b154..a1db7d58da8485 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -480,11 +480,15 @@ function(vcpkg_configure_make) list(REMOVE_DUPLICATES ALL_LIBS_LIST) list(TRANSFORM ALL_LIBS_LIST STRIP) - list(TRANSFORM ALL_LIBS_LIST REPLACE "(.lib|.a|.so)$" "") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(TRANSFORM ALL_LIBS_LIST REPLACE "(.lib|.a|.so)$" "") + endif() if(VCPKG_TARGET_IS_WINDOWS) list(REMOVE_ITEM ALL_LIBS_LIST "uuid") endif() - list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) + endif() if(ALL_LIBS_STRING) if(DEFINED ENV{LIBS}) From bb12126844d8c2535542e5e444931238d7115a72 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 17 Oct 2020 00:59:24 +0200 Subject: [PATCH 087/114] remove unnecessary lines 41 & 44 --- scripts/cmake/vcpkg_get_cmake_vars.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/cmake/vcpkg_get_cmake_vars.cmake b/scripts/cmake/vcpkg_get_cmake_vars.cmake index 62b197eba90b91..634f90bc1b52ce 100644 --- a/scripts/cmake/vcpkg_get_cmake_vars.cmake +++ b/scripts/cmake/vcpkg_get_cmake_vars.cmake @@ -38,10 +38,8 @@ function(vcpkg_get_cmake_vars) if(${_gcv_OUTPUT_FILE}) debug_message("OUTPUT_FILE ${${_gcv_OUTPUT_FILE}}") - list(APPEND _gcv_OPTIONS "-DVCPKG_OUTPUT_FILE=${${_gcv_OUTPUT_FILE}}") else() set(DEFAULT_OUT "${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}.cmake.log") # So that the file gets included in CI artifacts. - list(APPEND _gcv_OPTIONS "-DVCPKG_OUTPUT_FILE:PATH=${DEFAULT_OUT}") set(${_gcv_OUTPUT_FILE} "${DEFAULT_OUT}" PARENT_SCOPE) set(${_gcv_OUTPUT_FILE} "${DEFAULT_OUT}") endif() From 65e71b182261d0b61dda1fcef23083ec1f5eb4fc Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 18 Oct 2020 22:18:50 +0200 Subject: [PATCH 088/114] remove flag transformation --- scripts/get_cmake_vars/CMakeLists.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/get_cmake_vars/CMakeLists.txt b/scripts/get_cmake_vars/CMakeLists.txt index e22b356aeb17ba..1d173e078254ef 100644 --- a/scripts/get_cmake_vars/CMakeLists.txt +++ b/scripts/get_cmake_vars/CMakeLists.txt @@ -58,7 +58,7 @@ endif() if(CMAKE_BUILD_TYPE) string(TOUPPER "${CMAKE_BUILD_TYPE}" VCPKG_CONFIGS) else() - set(VCPKG_CONFIGS "DEBUG;RELEASE") + set(VCPKG_CONFIGS DEBUG RELEASE) endif() project(get_cmake_vars LANGUAGES ${VCPKG_LANGUAGES}) @@ -88,17 +88,12 @@ foreach(_env IN LISTS VCPKG_ENV_VARS_TO_CHECK) endforeach() foreach(flag IN LISTS VCPKG_FLAGS_TO_CHECK) - string(REGEX REPLACE " +" " " ${flag} "${${flag}}") - string(REGEX REPLACE "( |^)/" "\\1-" ${flag} "${${flag}}") - string(STRIP "${${flag}}" ${flag}) + string(STRIP "${${flag}}" ${flag}) # Strip leading and trailing whitespaces string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_RAW_${flag} \" ${${flag}}\")\n") foreach(config IN LISTS VCPKG_CONFIGS) - string(REGEX REPLACE " +" " " ${flag}_${config} "${${flag}_${config}}") - string(REGEX REPLACE "( |^)/" "\\1-" ${flag}_${config} "${${flag}_${config}}") string(STRIP "${${flag}_${config}}" ${flag}_${config}) string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_RAW_${flag}_${config} \"${CMAKE_${flag}_FLAGS_${config}}\")\n") set(COMBINED_${flag}_${config} "${${flag}} ${${flag}_${config}}") - string(REGEX REPLACE " +" " " COMBINED_${flag}_${config} "${COMBINED_${flag}_${config}}") string(STRIP "${COMBINED_${flag}_${config}}" COMBINED_${flag}_${config}) string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${flag}_${config} \"${COMBINED_${flag}_${config}}\")\n") endforeach() From 723b9d77dbd3051b8769c251310eda483b71a5d5 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 18 Oct 2020 22:33:48 +0200 Subject: [PATCH 089/114] reintroduce the flag / to - transformation for MSVC --- scripts/get_cmake_vars/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/get_cmake_vars/CMakeLists.txt b/scripts/get_cmake_vars/CMakeLists.txt index 1d173e078254ef..3897598817aa10 100644 --- a/scripts/get_cmake_vars/CMakeLists.txt +++ b/scripts/get_cmake_vars/CMakeLists.txt @@ -89,9 +89,15 @@ endforeach() foreach(flag IN LISTS VCPKG_FLAGS_TO_CHECK) string(STRIP "${${flag}}" ${flag}) # Strip leading and trailing whitespaces + if(MSVC) # Transform MSVC /flags to -flags due to bash scripts intepreting /flag as a path. + string(REGEX REPLACE "(^| )/" "\\1-" ${flag} "${${flag}}") + endif() string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_RAW_${flag} \" ${${flag}}\")\n") foreach(config IN LISTS VCPKG_CONFIGS) string(STRIP "${${flag}_${config}}" ${flag}_${config}) + if(MSVC) + string(REGEX REPLACE "(^| )/" "\\1-" ${flag}_${config} "${${flag}_${config}}") + endif() string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_RAW_${flag}_${config} \"${CMAKE_${flag}_FLAGS_${config}}\")\n") set(COMBINED_${flag}_${config} "${${flag}} ${${flag}_${config}}") string(STRIP "${COMBINED_${flag}_${config}}" COMBINED_${flag}_${config}) From 8aa569c8dfa307936d9603ee3147e0f362764d09 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 22 Oct 2020 11:57:24 +0200 Subject: [PATCH 090/114] trying to figure out autopoint issue. using wrong (windows) find.exe instead of msys --- ports/fontconfig/portfile.cmake | 2 +- scripts/cmake/vcpkg_configure_make.cmake | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index f7cc34212d2075..54ef215b0fe416 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_from_gitlab( vcpkg_find_acquire_program(GPERF) get_filename_component(GPERF_PATH ${GPERF} DIRECTORY) vcpkg_add_to_path(${GPERF_PATH}) - +set(PORT_DEBUG ON) vcpkg_configure_make( AUTOCONFIG COPY_SOURCE diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index a1db7d58da8485..a2461cffee5176 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -293,7 +293,10 @@ function(vcpkg_configure_make) # This inserts msys before system32 (which masks sort.exe and find.exe) but after MSVC (which avoids masking link.exe) string(REPLACE ";$ENV{SystemRoot}\\System32;" "${APPEND_ENV};${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "$ENV{PATH}") string(REPLACE ";$ENV{SystemRoot}\\system32;" "${APPEND_ENV};${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") + debug_message("SystemRoot:$ENV{SystemRoot}") + debug_message("PATH:$ENV{PATH}") set(ENV{PATH} "${NEWPATH}") + debug_message("NEW_PATH:$ENV{PATH}") set(BASH "${MSYS_ROOT}/usr/bin/bash.exe") macro(_vcpkg_append_to_configure_environment inoutstring var defaultval) From ac21edc95ea81f896cf6552f180e4b0282f6ae40 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 22 Oct 2020 12:32:43 +0200 Subject: [PATCH 091/114] add correct working_dir to subpath --- ports/gettext/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index 2f11b7d7050935..449029e7c9531e 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -54,9 +54,9 @@ vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH}/gettext-runtime # Port should pr ) if(VCPKG_TARGET_IS_UWP) - vcpkg_install_make(WORKING_SUBDIR "/intl") # Could make a port intl or libintl or have features in Gettext + vcpkg_install_make(SUBPATH "/intl") # Could make a port intl or libintl or have features in Gettext else() - vcpkg_install_make(WORKING_SUBDIR "/intl") + vcpkg_install_make(SUBPATH "/intl") endif() From 82309157110dec25d905a9ae6c06faa9a1848579 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 22 Oct 2020 13:38:02 +0200 Subject: [PATCH 092/114] escape stupid env paths. --- scripts/cmake/vcpkg_configure_make.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index a2461cffee5176..5534d504c18f00 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -293,10 +293,13 @@ function(vcpkg_configure_make) # This inserts msys before system32 (which masks sort.exe and find.exe) but after MSVC (which avoids masking link.exe) string(REPLACE ";$ENV{SystemRoot}\\System32;" "${APPEND_ENV};${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "$ENV{PATH}") string(REPLACE ";$ENV{SystemRoot}\\system32;" "${APPEND_ENV};${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") - debug_message("SystemRoot:$ENV{SystemRoot}") - debug_message("PATH:$ENV{PATH}") + string(REPLACE "\\" "/" SYSROOT $ENV{SystemRoot}) + string(REPLACE "\\" "/" MYPATH $ENV{MYPATH}) + debug_message("SystemRoot:${SYSROOT}") + debug_message("PATH:${MYPATH}") set(ENV{PATH} "${NEWPATH}") - debug_message("NEW_PATH:$ENV{PATH}") + string(REPLACE "\\" "/" MYPATH $ENV{MYPATH}) + debug_message("NEW_PATH:${MYPATH}") set(BASH "${MSYS_ROOT}/usr/bin/bash.exe") macro(_vcpkg_append_to_configure_environment inoutstring var defaultval) From 004ca416252d0f95bee9c99b2ce642660bd29f77 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 22 Oct 2020 14:29:16 +0200 Subject: [PATCH 093/114] fix typo --- scripts/cmake/vcpkg_configure_make.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 5534d504c18f00..ac9a424b69ac80 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -294,11 +294,11 @@ function(vcpkg_configure_make) string(REPLACE ";$ENV{SystemRoot}\\System32;" "${APPEND_ENV};${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "$ENV{PATH}") string(REPLACE ";$ENV{SystemRoot}\\system32;" "${APPEND_ENV};${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") string(REPLACE "\\" "/" SYSROOT $ENV{SystemRoot}) - string(REPLACE "\\" "/" MYPATH $ENV{MYPATH}) + string(REPLACE "\\" "/" MYPATH $ENV{PATH}) debug_message("SystemRoot:${SYSROOT}") debug_message("PATH:${MYPATH}") set(ENV{PATH} "${NEWPATH}") - string(REPLACE "\\" "/" MYPATH $ENV{MYPATH}) + string(REPLACE "\\" "/" MYPATH $ENV{PATH}) debug_message("NEW_PATH:${MYPATH}") set(BASH "${MSYS_ROOT}/usr/bin/bash.exe") From 5a2ff43e447708412840fa4a478ccd1dfd30e996 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 22 Oct 2020 17:09:57 +0200 Subject: [PATCH 094/114] add findutils remove debug messages --- ports/fontconfig/portfile.cmake | 4 ++-- scripts/cmake/vcpkg_acquire_msys.cmake | 6 +++++- scripts/cmake/vcpkg_configure_make.cmake | 6 ------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index 54ef215b0fe416..4e3a54234ffcbd 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_from_gitlab( vcpkg_find_acquire_program(GPERF) get_filename_component(GPERF_PATH ${GPERF} DIRECTORY) vcpkg_add_to_path(${GPERF_PATH}) -set(PORT_DEBUG ON) + vcpkg_configure_make( AUTOCONFIG COPY_SOURCE @@ -34,7 +34,7 @@ vcpkg_configure_make( "--with-libiconv-lib=${CURRENT_INSTALLED_DIR}/lib" ${OPT_REL} ADD_BIN_TO_PATH - ADDITIONAL_MSYS_PACKAGES xz gettext gettext-devel # for autopoint + ADDITIONAL_MSYS_PACKAGES xz findutils gettext gettext-devel # for autopoint ) vcpkg_install_make(ADD_BIN_TO_PATH) diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index d509ddd03aa5f0..c5d51808a9f677 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -316,7 +316,11 @@ msys_package( URL "https://repo.msys2.org/msys/x86_64/msys2-runtime-3.1.6-3-x86_64.pkg.tar.xz" SHA512 f094a7f4926195ef7ba015f0c5c56587b1faa94d85530f07aaaa5557a1494c3bd75257d4687c8401cbf1328d23e5586a92b05f0a872caebb1a7e941a07829776 ) - + msys_package( + URL "https://repo.msys2.org/msys/x86_64/findutils-4.7.0-1-x86_64.pkg.tar.xz" + SHA512 fd09a24562b196ff252f4b5de86ed977280306a8c628792930812f146fcf7355f9d87434bbabe25e6cc17d8bd028f6bc68fc02e5bea83137a49cf5cc6f509e10 + #DEPS libintl libiconv # this is required but somehow errors this script. + ) if(PACKAGES) message(FATAL_ERROR "Unknown packages were required for vcpkg_acquire_msys(${_am_PACKAGES}): ${PACKAGES}\nThis can be resolved by explicitly passing URL/SHA pairs to DIRECT_PACKAGES.") endif() diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index ac9a424b69ac80..a1db7d58da8485 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -293,13 +293,7 @@ function(vcpkg_configure_make) # This inserts msys before system32 (which masks sort.exe and find.exe) but after MSVC (which avoids masking link.exe) string(REPLACE ";$ENV{SystemRoot}\\System32;" "${APPEND_ENV};${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "$ENV{PATH}") string(REPLACE ";$ENV{SystemRoot}\\system32;" "${APPEND_ENV};${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") - string(REPLACE "\\" "/" SYSROOT $ENV{SystemRoot}) - string(REPLACE "\\" "/" MYPATH $ENV{PATH}) - debug_message("SystemRoot:${SYSROOT}") - debug_message("PATH:${MYPATH}") set(ENV{PATH} "${NEWPATH}") - string(REPLACE "\\" "/" MYPATH $ENV{PATH}) - debug_message("NEW_PATH:${MYPATH}") set(BASH "${MSYS_ROOT}/usr/bin/bash.exe") macro(_vcpkg_append_to_configure_environment inoutstring var defaultval) From 78461df1e29a0de338484b833ccfd3b5f9663da9 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 23 Oct 2020 00:14:42 +0200 Subject: [PATCH 095/114] add error if libtool chokes --- scripts/cmake/vcpkg_build_make.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index f67cfd4344f40e..78cbc33f0898b2 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -171,7 +171,13 @@ function(vcpkg_build_make) LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" ) endif() - + + file(READ "${CURRENT_BUILDTREES_DIR}/${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}-out.log" LOGDATA) + if(LOGDATA MATCHES "Warning: linker path does not have real file for library") + message(FATAL_ERROR "libtool could not find a file being linked against!") + endif() + + if (_bc_ENABLE_INSTALL) message(STATUS "Installing ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") if(MAKE_BASH) From e1f0fd8fdd7ebf573755bfa442ef11aaf3186819 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 23 Oct 2020 00:16:08 +0200 Subject: [PATCH 096/114] add file to msys --- scripts/cmake/vcpkg_acquire_msys.cmake | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index c5d51808a9f677..c1b4b82d850c0f 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -182,7 +182,20 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) msys_package( URL "https://repo.msys2.org/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz" SHA512 b309799e5a9d248ef66eaf11a0bd21bf4e8b9bd5c677c627ec83fa760ce9f0b54ddf1b62cbb436e641fbbde71e3b61cb71ff541d866f8ca7717a3a0dbeb00ebf - DEPS grep sed coreutils + DEPS grep sed coreutils file + # file.exe is required so that libtool is not using a wrong fallback regex to find the correct libraries. + # alternativly lt_cv_deplibs_check_method=pass_all could be passed via configure and the objdump check skipped. + # Update. file.exe seems not be able to run with in bash. + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/file-5.39-1-x86_64.pkg.tar.zst" + SHA512 be51dd0f6143a2f34f2a3e7d412866eb12511f25daaf3a5478240537733a67d7797a3a55a8893e5638589c06bca5af20aed5ded7db0bf19fbf52b30fae08cadd + DEPS gcc-libs zlib + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz" + SHA512 b607da40d3388b440f2a09e154f21966cd55ad77e02d47805f78a9dee5de40226225bf0b8335fdfd4b83f25ead3098e9cb974d4f202f28827f8468e30e3b790d + DEPS gcc-libs ) msys_package( URL "https://repo.msys2.org/msys/x86_64/coreutils-8.32-1-x86_64.pkg.tar.xz" @@ -297,6 +310,11 @@ msys_package( SHA512 a2e8027b9bbee20f8cf60851130ca2af436641b1fb66054f8deba118da7ebecb1cd188224dcf08e4c5b7cde85b412efab058afef2358e843c9de8eb128ca448c DEPS gcc-libs ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/findutils-4.7.0-1-x86_64.pkg.tar.xz" + SHA512 fd09a24562b196ff252f4b5de86ed977280306a8c628792930812f146fcf7355f9d87434bbabe25e6cc17d8bd028f6bc68fc02e5bea83137a49cf5cc6f509e10 + DEPS libintl libiconv + ) msys_package( URL "https://repo.msys2.org/msys/x86_64/libintl-0.19.8.1-1-x86_64.pkg.tar.xz" SHA512 4e54c252b828c862f376d8f5a2410ee623a43d70cbb07d0b8ac20c25096f59fb3ae8dcd011d1792bec76f0b0b9411d0e184ee23707995761dc50eb76f9fc6b92 @@ -316,11 +334,7 @@ msys_package( URL "https://repo.msys2.org/msys/x86_64/msys2-runtime-3.1.6-3-x86_64.pkg.tar.xz" SHA512 f094a7f4926195ef7ba015f0c5c56587b1faa94d85530f07aaaa5557a1494c3bd75257d4687c8401cbf1328d23e5586a92b05f0a872caebb1a7e941a07829776 ) - msys_package( - URL "https://repo.msys2.org/msys/x86_64/findutils-4.7.0-1-x86_64.pkg.tar.xz" - SHA512 fd09a24562b196ff252f4b5de86ed977280306a8c628792930812f146fcf7355f9d87434bbabe25e6cc17d8bd028f6bc68fc02e5bea83137a49cf5cc6f509e10 - #DEPS libintl libiconv # this is required but somehow errors this script. - ) + if(PACKAGES) message(FATAL_ERROR "Unknown packages were required for vcpkg_acquire_msys(${_am_PACKAGES}): ${PACKAGES}\nThis can be resolved by explicitly passing URL/SHA pairs to DIRECT_PACKAGES.") endif() From 6092e667f614a9d521641cc6c1cfc05e353a13f1 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 23 Oct 2020 00:17:05 +0200 Subject: [PATCH 097/114] pass lt_cv_deplibs_check_method=pass_all on windows (couldn't get file.exe to work so that libtool correctly ids the passed libs) --- scripts/cmake/vcpkg_configure_make.cmake | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index a1db7d58da8485..5822bf07fdfbb3 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -386,7 +386,9 @@ function(vcpkg_configure_make) # Variables not correctly detected by configure. In release builds. list(APPEND _csc_OPTIONS gl_cv_double_slash_root=yes - ac_cv_func_memmove=yes) + ac_cv_func_memmove=yes + lt_cv_deplibs_check_method=pass_all # required since file.exe is not working correctly. + ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") list(APPEND _csc_OPTIONS gl_cv_host_cpu_c_abi=no) endif() @@ -477,27 +479,20 @@ function(vcpkg_configure_make) convert_to_list(VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES C_LIBS_LIST) convert_to_list(VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES CXX_LIBS_LIST) set(ALL_LIBS_LIST ${C_LIBS_LIST} ${CXX_LIBS_LIST}) - list(REMOVE_DUPLICATES ALL_LIBS_LIST) list(TRANSFORM ALL_LIBS_LIST STRIP) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - list(TRANSFORM ALL_LIBS_LIST REPLACE "(.lib|.a|.so)$" "") - endif() - if(VCPKG_TARGET_IS_WINDOWS) - list(REMOVE_ITEM ALL_LIBS_LIST "uuid") - endif() - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) - endif() + list(TRANSFORM ALL_LIBS_LIST REPLACE "(.lib|.a|.so)$" "") + list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) + set(ALL_LIBS_STRING "-l${ALL_LIBS_STRING}") if(ALL_LIBS_STRING) if(DEFINED ENV{LIBS}) - set(ENV{LIBS} "$ENV{LIBS} -l${ALL_LIBS_STRING}") + set(ENV{LIBS} "$ENV{LIBS} ${ALL_LIBS_STRING}") else() - set(ENV{LIBS} "-l${ALL_LIBS_STRING}") + set(ENV{LIBS} "${ALL_LIBS_STRING}") endif() endif() - debug_message(STATUS "ENV{LIBS}:$ENV{LIBS}") + vcpkg_find_acquire_program(PKGCONFIG) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND NOT PKGCONFIG STREQUAL "--static") set(PKGCONFIG "${PKGCONFIG} --static") # Is this still required or was the PR changing the pc files accordingly merged? From a39d92d1f7ecfedba375a9e9db016154d224f93d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 23 Oct 2020 00:59:47 +0200 Subject: [PATCH 098/114] add bzip2 to msys --- scripts/cmake/vcpkg_acquire_msys.cmake | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index c1b4b82d850c0f..79001268e9a830 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -190,13 +190,23 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) msys_package( URL "https://repo.msys2.org/msys/x86_64/file-5.39-1-x86_64.pkg.tar.zst" SHA512 be51dd0f6143a2f34f2a3e7d412866eb12511f25daaf3a5478240537733a67d7797a3a55a8893e5638589c06bca5af20aed5ded7db0bf19fbf52b30fae08cadd - DEPS gcc-libs zlib + DEPS gcc-libs zlib libbz2 ) msys_package( URL "https://repo.msys2.org/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz" SHA512 b607da40d3388b440f2a09e154f21966cd55ad77e02d47805f78a9dee5de40226225bf0b8335fdfd4b83f25ead3098e9cb974d4f202f28827f8468e30e3b790d DEPS gcc-libs ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/bzip2-1.0.8-2-x86_64.pkg.tar.xz" + SHA512 336f5b59eb9cf4e93b537a212509d84f72cd9b8a97bf8ac0596eff298f3c0979bdea6c605244d5913670b9d20b017e5ee327f1e606f546a88e177a03c589a636 + DEPS gcc-libs + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/libbz2-1.0.8-2-x86_64.pkg.tar.xz" + SHA512 d128bd1792d0f5750e6a63a24db86a791e7ee457db8c0bef68d217099be4a6eef27c85caf6ad09b0bcd5b3cdac6fc0a2b9842cc58d381a4035505906cc4803ec + DEPS gcc-libs + ) msys_package( URL "https://repo.msys2.org/msys/x86_64/coreutils-8.32-1-x86_64.pkg.tar.xz" SHA512 1a2ae4f296954421ce36f764b9b1c77ca72fc8583c46060b817677d0ad6adc7d7e3c2bbe1ae0179afd116a3d62f28e59eae2f7c84c1c8ffb7d22d2f2b40c0cdc From 69e4cc47110fa4923223da4f7ad0d5641d642336 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 23 Oct 2020 01:00:11 +0200 Subject: [PATCH 099/114] reenable libtool check. Lets see if CI agrees --- scripts/cmake/vcpkg_configure_make.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 5822bf07fdfbb3..d06bee9aa4013d 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -387,7 +387,7 @@ function(vcpkg_configure_make) # Variables not correctly detected by configure. In release builds. list(APPEND _csc_OPTIONS gl_cv_double_slash_root=yes ac_cv_func_memmove=yes - lt_cv_deplibs_check_method=pass_all # required since file.exe is not working correctly. + #lt_cv_deplibs_check_method=pass_all # required since file.exe is not working correctly. ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") list(APPEND _csc_OPTIONS gl_cv_host_cpu_c_abi=no) From daae5b7d530fe20eda7446131eb8dd346998a31d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 23 Oct 2020 09:15:16 +0200 Subject: [PATCH 100/114] unbreak linux try to figure out where uuid should be on windows. --- scripts/cmake/vcpkg_configure_make.cmake | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index d06bee9aa4013d..44b545c34d04d1 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -481,11 +481,28 @@ function(vcpkg_configure_make) set(ALL_LIBS_LIST ${C_LIBS_LIST} ${CXX_LIBS_LIST}) list(REMOVE_DUPLICATES ALL_LIBS_LIST) list(TRANSFORM ALL_LIBS_LIST STRIP) - list(TRANSFORM ALL_LIBS_LIST REPLACE "(.lib|.a|.so)$" "") + list(TRANSFORM ALL_LIBS_LIST REPLACE "(.dll.lib|.lib|.a|.so)$" "") + if(VCPKG_TARGET_IS_WINDOWS) + foreach(_lib IN LISTS ALL_LIBS_LIST) + find_library(STD_${_lib}_LIBRARY NAMES ${_lib} PATHS ENV LIB LIBPATH) + message(STATUS "${_lib} found at: ${STD_${_lib}_LIBRARY}") + if(_lib MATCHES "uuid") + # C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64 + # UniversalCRTSdkDir/lib/UCRTVersion/um/VCPKG_TARGET_ARCHITECTURE + string(REPLACE "\\" "/" SDKPATH $ENV{UniversalCRTSdkDir}) + set(LIB_PATH "${SDKPATH}/lib/$ENV{UCRTVersion}/um/${VCPKG_TARGET_ARCHITECTURE}/Uuid.Lib") + message(STATUS "Manual search for uuid at ${LIB_PATH}") + if(NOT EXISTS "${LIB_PATH}") + message(STATUS "uuid not found in ${LIB_PATH}") + else() + message(STATUS "uuid found in ${LIB_PATH}") + endif() + endif() + endforeach() + endif() list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) - set(ALL_LIBS_STRING "-l${ALL_LIBS_STRING}") - if(ALL_LIBS_STRING) + set(ALL_LIBS_STRING "-l${ALL_LIBS_STRING}") if(DEFINED ENV{LIBS}) set(ENV{LIBS} "$ENV{LIBS} ${ALL_LIBS_STRING}") else() From 129e16f4513bc73e27d7958c76066361ece4f41a Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 23 Oct 2020 10:38:43 +0200 Subject: [PATCH 101/114] add -L flag and help libtool ? --- scripts/cmake/vcpkg_configure_make.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 44b545c34d04d1..e31a7d52cbcb11 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -483,14 +483,16 @@ function(vcpkg_configure_make) list(TRANSFORM ALL_LIBS_LIST STRIP) list(TRANSFORM ALL_LIBS_LIST REPLACE "(.dll.lib|.lib|.a|.so)$" "") if(VCPKG_TARGET_IS_WINDOWS) + string(REPLACE "\\" "/" SDKPATH $ENV{UniversalCRTSdkDir}) + set(LIB_PATH "${SDKPATH}/lib/$ENV{UCRTVersion}/um/${VCPKG_TARGET_ARCHITECTURE}") + foreach(_lib IN LISTS ALL_LIBS_LIST) find_library(STD_${_lib}_LIBRARY NAMES ${_lib} PATHS ENV LIB LIBPATH) message(STATUS "${_lib} found at: ${STD_${_lib}_LIBRARY}") if(_lib MATCHES "uuid") # C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64 # UniversalCRTSdkDir/lib/UCRTVersion/um/VCPKG_TARGET_ARCHITECTURE - string(REPLACE "\\" "/" SDKPATH $ENV{UniversalCRTSdkDir}) - set(LIB_PATH "${SDKPATH}/lib/$ENV{UCRTVersion}/um/${VCPKG_TARGET_ARCHITECTURE}/Uuid.Lib") + message(STATUS "Manual search for uuid at ${LIB_PATH}") if(NOT EXISTS "${LIB_PATH}") message(STATUS "uuid not found in ${LIB_PATH}") @@ -503,6 +505,9 @@ function(vcpkg_configure_make) list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) if(ALL_LIBS_STRING) set(ALL_LIBS_STRING "-l${ALL_LIBS_STRING}") + if(LIB_PATH) + set(ALL_LIBS_STRING "-L${LIB_PATH} ${ALL_LIBS_STRING}") + endif() if(DEFINED ENV{LIBS}) set(ENV{LIBS} "$ENV{LIBS} ${ALL_LIBS_STRING}") else() From 81254e28fee8f816f4d9404db4cda08a94985372 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 23 Oct 2020 13:22:20 +0200 Subject: [PATCH 102/114] try to get ci to find uuid. --- scripts/cmake/vcpkg_configure_make.cmake | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index e31a7d52cbcb11..9dd58645c80d3a 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -242,7 +242,7 @@ function(vcpkg_configure_make) debug_message("REQUIRES_AUTOCONFIG:${REQUIRES_AUTOCONFIG}") # Backup environment variables # CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJCXX R UPC Y - set(FLAGPREFIXES CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJXX R UPC Y RC) + set(FLAGPREFIXES AS CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJXX R UPC Y RC) foreach(_prefix IN LISTS FLAGPREFIXES) _vcpkg_backup_env_variable(${prefix}FLAGS) endforeach() @@ -465,6 +465,7 @@ function(vcpkg_configure_make) # is to use the CL and LINK environment variables !!! # (This is due to libtool and compiler wrapper using the same set of options to pass those variables around) string(REPLACE "\\" "/" VCToolsInstallDir "$ENV{VCToolsInstallDir}") + # Can somebody please check if CMake's compiler flags for UWP are correct? set(ENV{_CL_} "$ENV{_CL_} /D_UNICODE /DUNICODE /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") string(APPEND VCPKG_DETECTED_CMAKE_CXX_FLAGS_RELEASE " -ZW:nostdlib") @@ -485,14 +486,14 @@ function(vcpkg_configure_make) if(VCPKG_TARGET_IS_WINDOWS) string(REPLACE "\\" "/" SDKPATH $ENV{UniversalCRTSdkDir}) set(LIB_PATH "${SDKPATH}/lib/$ENV{UCRTVersion}/um/${VCPKG_TARGET_ARCHITECTURE}") - + set(ENV{LT_SYS_LIBRARY_PATH} "${LIB_PATH}") + #set(ENV{LT_SYS_LIBRARY_PATH} "$ENV{LIB}") # Probably requires extra path conversions and ; -> : foreach(_lib IN LISTS ALL_LIBS_LIST) find_library(STD_${_lib}_LIBRARY NAMES ${_lib} PATHS ENV LIB LIBPATH) message(STATUS "${_lib} found at: ${STD_${_lib}_LIBRARY}") if(_lib MATCHES "uuid") # C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64 # UniversalCRTSdkDir/lib/UCRTVersion/um/VCPKG_TARGET_ARCHITECTURE - message(STATUS "Manual search for uuid at ${LIB_PATH}") if(NOT EXISTS "${LIB_PATH}") message(STATUS "uuid not found in ${LIB_PATH}") @@ -505,9 +506,6 @@ function(vcpkg_configure_make) list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) if(ALL_LIBS_STRING) set(ALL_LIBS_STRING "-l${ALL_LIBS_STRING}") - if(LIB_PATH) - set(ALL_LIBS_STRING "-L${LIB_PATH} ${ALL_LIBS_STRING}") - endif() if(DEFINED ENV{LIBS}) set(ENV{LIBS} "$ENV{LIBS} ${ALL_LIBS_STRING}") else() @@ -678,7 +676,7 @@ function(vcpkg_configure_make) WORKING_DIRECTORY "${TAR_DIR}" LOGNAME config-${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}} ) - if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND NOT VCPKG_TARGET_IS_MINGW) file(GLOB_RECURSE LIBTOOL_FILES "${TAR_DIR}*/libtool") foreach(lt_file IN LISTS LIBTOOL_FILES) file(READ "${lt_file}" _contents) @@ -686,7 +684,7 @@ function(vcpkg_configure_make) file(WRITE "${lt_file}" "${_contents}") endforeach() endif() - + file(RENAME "${TAR_DIR}/config.log" "${CURRENT_BUILDTREES_DIR}/config.log-${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}}.log") endif() From 15514625146b561b0b180464a33874f61629bb27 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 23 Oct 2020 15:23:22 +0200 Subject: [PATCH 103/114] try to use cygpath --- scripts/cmake/vcpkg_configure_make.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 9dd58645c80d3a..2b8eb22100b4db 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -485,7 +485,11 @@ function(vcpkg_configure_make) list(TRANSFORM ALL_LIBS_LIST REPLACE "(.dll.lib|.lib|.a|.so)$" "") if(VCPKG_TARGET_IS_WINDOWS) string(REPLACE "\\" "/" SDKPATH $ENV{UniversalCRTSdkDir}) - set(LIB_PATH "${SDKPATH}/lib/$ENV{UCRTVersion}/um/${VCPKG_TARGET_ARCHITECTURE}") + string(REGEX REPLACE "([a-zA-Z]):/" "cygdrive/\\1/" SDKPATH "${SDKPATH}") + string(REGEX REPLACE "\\? " "\\\\\\\\ " SDKPATH "${SDKPATH}") + string(REGEX REPLACE " " "\\\\ " SDKPATH "${SDKPATH}") + message(STATUS "${SDKPATH}") + set(LIB_PATH "${SDKPATH}lib/$ENV{UCRTVersion}/um/${VCPKG_TARGET_ARCHITECTURE}/") set(ENV{LT_SYS_LIBRARY_PATH} "${LIB_PATH}") #set(ENV{LT_SYS_LIBRARY_PATH} "$ENV{LIB}") # Probably requires extra path conversions and ; -> : foreach(_lib IN LISTS ALL_LIBS_LIST) From 5898e63c12c07984c831bf1d4385cc4dcf72247e Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 11 Nov 2020 16:52:00 +0100 Subject: [PATCH 104/114] update controls --- ports/exiv2/CONTROL | 2 +- ports/gdal/CONTROL | 2 +- ports/harfbuzz/CONTROL | 1 + ports/io2d/CONTROL | 1 + ports/libxml2/CONTROL | 1 + ports/libxmlpp/CONTROL | 2 +- ports/osg/CONTROL | 2 +- ports/qt5-base/CONTROL | 1 + ports/spatialite-tools/CONTROL | 2 +- 9 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 14be794c7699ae..c9f5ecca4b36e8 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,6 +1,6 @@ Source: exiv2 Version: 0.27.3 -Port-Version: 2 +Port-Version: 3 Build-Depends: zlib, libiconv, gettext Description: Image metadata library and tools Homepage: https://www.exiv2.org diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index 38a1e266ab6c23..89bf2d2af9ffc1 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,6 +1,6 @@ Source: gdal Version: 2.4.1 -Port-Version: 13 +Port-Version: 14 Homepage: https://gdal.org/ Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 050580cea42b78..753eb70b9e1569 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,5 +1,6 @@ Source: harfbuzz Version: 2.7.2 +Port-Version: 1 Description: HarfBuzz OpenType text shaping engine Homepage: https://github.com/behdad/harfbuzz Build-Depends: freetype[core], ragel, gettext (osx) diff --git a/ports/io2d/CONTROL b/ports/io2d/CONTROL index 5848cb75410116..59ff0c23cf183d 100644 --- a/ports/io2d/CONTROL +++ b/ports/io2d/CONTROL @@ -1,4 +1,5 @@ Source: io2d Version: 2020-09-14 +Port-Version: 1 Description: a lightweight, cross platform drawing library Build-Depends: cairo (!osx), cairo[x11] (linux), graphicsmagick (!osx) diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL index 6f8d18956acdd7..462ecfec676d6e 100644 --- a/ports/libxml2/CONTROL +++ b/ports/libxml2/CONTROL @@ -1,5 +1,6 @@ Source: libxml2 Version: 2.9.10 +Port-Version: 1 Homepage: https://xmlsoft.org/ Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform) Build-Depends: zlib, libiconv, liblzma diff --git a/ports/libxmlpp/CONTROL b/ports/libxmlpp/CONTROL index b737bde3c9ecfa..0c76b120cffe59 100644 --- a/ports/libxmlpp/CONTROL +++ b/ports/libxmlpp/CONTROL @@ -1,5 +1,5 @@ Source: libxmlpp Version: 2.40.1 -Port-Version: 6 +Port-Version: 7 Description: a C++ wrapper for the libxml XML parser library. Build-Depends: libxml2, glibmm diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL index a63ea9b47aa0d6..241d89f52b09b4 100644 --- a/ports/osg/CONTROL +++ b/ports/osg/CONTROL @@ -1,6 +1,6 @@ Source: osg Version: 3.6.5 -Port-Version: 2 +Port-Version: 3 Homepage: https://github.com/openscenegraph/OpenSceneGraph Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit. Build-Depends: zlib, fontconfig, boost-asio (!windows), boost-core (!windows), boost-logic (!windows), boost-lexical-cast (!windows), boost-smart-ptr (!windows), boost-tuple (!windows), boost-bind (!windows), freeglut (windows), expat (windows), openimageio (osx) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index 969290a7b30d4c..10a7d54290ab3d 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,5 +1,6 @@ Source: qt5-base Version: 5.15.1 +Port-Version: 1 Homepage: https://www.qt.io/ Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components. Build-Depends: zlib, zstd, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl, angle (!windows), egl-registry, icu (!uwp), fontconfig (!windows) diff --git a/ports/spatialite-tools/CONTROL b/ports/spatialite-tools/CONTROL index 7ef2a3284a6a0d..fbbad4d411d3ee 100644 --- a/ports/spatialite-tools/CONTROL +++ b/ports/spatialite-tools/CONTROL @@ -1,6 +1,6 @@ Source: spatialite-tools Version: 4.3.0 -Port-Version: 4 +Port-Version: 5 Homepage: https://www.gaia-gis.it/fossil/spatialite-tools/index Description: Contains spatialite.exe and other command line tools to work with SpatiaLite databases (import, export, SQL queries) Build-Depends: sqlite3, libspatialite, geos, readosm, proj4, zlib, libiconv, expat From 1f360feb3990de47ce1c43fa561db206e2d1c464 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 11 Nov 2020 16:52:22 +0100 Subject: [PATCH 105/114] cleanup merge mistakes --- ports/itk/expat.patch | 50 -------------------- scripts/cmake/vcpkg_get_cmake_vars.cmake | 58 ------------------------ 2 files changed, 108 deletions(-) delete mode 100644 ports/itk/expat.patch delete mode 100644 scripts/cmake/vcpkg_get_cmake_vars.cmake diff --git a/ports/itk/expat.patch b/ports/itk/expat.patch deleted file mode 100644 index dc336768c2a0e1..00000000000000 --- a/ports/itk/expat.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/Modules/IO/GDCM/itk-module.cmake b/Modules/IO/GDCM/itk-module.cmake -index 2703612..51f0214 100644 ---- a/Modules/IO/GDCM/itk-module.cmake -+++ b/Modules/IO/GDCM/itk-module.cmake -@@ -1,7 +1,7 @@ - set(DOCUMENTATION "This module contains ITK ImageIO classes for the Grassroots DICOM (GDCM) based - readers and writers of the medical imaging DICOM standard.") -- -+find_package(expat CONFIG REQUIRED) - itk_module(ITKIOGDCM - ENABLE_SHARED - DEPENDS -@@ -9,6 +9,7 @@ itk_module(ITKIOGDCM - ITKIOImageBase - PRIVATE_DEPENDS - ITKGDCM -+ ITKExpat - TEST_DEPENDS - ITKTestKernel - ITKGDCM -diff --git a/Modules/ThirdParty/Expat/CMakeLists.txt b/Modules/ThirdParty/Expat/CMakeLists.txt -index f69709d..9b49323 100644 ---- a/Modules/ThirdParty/Expat/CMakeLists.txt -+++ b/Modules/ThirdParty/Expat/CMakeLists.txt -@@ -5,10 +5,8 @@ option(ITK_USE_SYSTEM_EXPAT "Use system-installed expat" ${ITK_USE_SYSTEM_LIBRAR - mark_as_advanced(ITK_USE_SYSTEM_EXPAT) - - if(ITK_USE_SYSTEM_EXPAT) -- find_package(EXPAT REQUIRED) -- set(ITKExpat_INCLUDE_DIRS ${ITKExpat_BINARY_DIR}/src ) -- set(ITKExpat_SYSTEM_INCLUDE_DIRS "${EXPAT_INCLUDE_DIR}") -- set(ITKExpat_LIBRARIES "${EXPAT_LIBRARY}") -+ find_package(expat CONFIG REQUIRED) -+ set(ITKExpat_LIBRARIES expat::expat) - set(ITKExpat_NO_SRC 1) - else() - set(ITKExpat_INCLUDE_DIRS -diff --git a/Modules/ThirdParty/GIFTI/src/gifticlib/CMakeLists.txt b/Modules/ThirdParty/GIFTI/src/gifticlib/CMakeLists.txt -index 3f83225..c7ddbbe 100644 ---- a/Modules/ThirdParty/GIFTI/src/gifticlib/CMakeLists.txt -+++ b/Modules/ThirdParty/GIFTI/src/gifticlib/CMakeLists.txt -@@ -11,6 +11,7 @@ set(GIFTI_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include/gifti") - - if("${ITK_VERSION_MAJOR}" GREATER 0.0) - # ITK provides expat and zlib. -+ find_package(expat CONFIG REQUIRED) - include_directories(${ITKNIFTI_INCLUDE_DIRS}) - set(PACKAGE_PREFIX "ITK") - set(EXPAT_LIBRARIES ${ITKExpat_LIBRARIES}) diff --git a/scripts/cmake/vcpkg_get_cmake_vars.cmake b/scripts/cmake/vcpkg_get_cmake_vars.cmake deleted file mode 100644 index 634f90bc1b52ce..00000000000000 --- a/scripts/cmake/vcpkg_get_cmake_vars.cmake +++ /dev/null @@ -1,58 +0,0 @@ -## # vcpkg_get_cmake_vars -## -## **Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** -## Runs a cmake configure with a dummy project to extract certain cmake variables -## -## ## Usage -## ```cmake -## vcpkg_get_cmake_vars( -## [OUTPUT_FILE ] -## [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] -## ) -## ``` -## -## ## Parameters -## ### OPTIONS -## Additional options to pass to the test configure call -## -## ### OUTPUT_FILE -## Variable to return the path to the generated cmake file with the detected `CMAKE_` variables set as `VCKPG_DETECTED_` -## -## ## Notes -## If possible avoid usage in portfiles. -## -## ## Examples -## -## * [vcpkg_configure_make](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_make.cmake) - -function(vcpkg_get_cmake_vars) - cmake_parse_arguments(PARSE_ARGV 0 _gcv "" "OUTPUT_FILE" "OPTIONS") - - if(_gcv_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "vcpkg_get_cmake_vars was passed unparsed arguments: '${_gcv_UNPARSED_ARGUMENTS}'") - endif() - - if(NOT _gcv_OUTPUT_FILE) - message(FATAL_ERROR "vcpkg_get_cmake_vars requires parameter OUTPUT_FILE!") - endif() - - if(${_gcv_OUTPUT_FILE}) - debug_message("OUTPUT_FILE ${${_gcv_OUTPUT_FILE}}") - else() - set(DEFAULT_OUT "${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}.cmake.log") # So that the file gets included in CI artifacts. - set(${_gcv_OUTPUT_FILE} "${DEFAULT_OUT}" PARENT_SCOPE) - set(${_gcv_OUTPUT_FILE} "${DEFAULT_OUT}") - endif() - - vcpkg_configure_cmake( - SOURCE_PATH "${SCRIPTS}/get_cmake_vars" - OPTIONS ${_gcv_OPTIONS} "-DVCPKG_BUILD_TYPE=${VCPKG_BUILD_TYPE}" - OPTIONS_DEBUG "-DVCPKG_OUTPUT_FILE:PATH=${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}-dbg.cmake.log" - OPTIONS_RELEASE "-DVCPKG_OUTPUT_FILE:PATH=${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}-rel.cmake.log" - PREFER_NINJA - LOGNAME get-cmake-vars-${TARGET_TRIPLET} - ) - - file(WRITE "${${_gcv_OUTPUT_FILE}}" "include(${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}-dbg.cmake.log)\ninclude(${CURRENT_BUILDTREES_DIR}/cmake-vars-${TARGET_TRIPLET}-rel.cmake.log)") - -endfunction() From c0962b8a7043e6bd449a6110ca0358b670cc0d16 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 11 Nov 2020 17:26:12 +0100 Subject: [PATCH 106/114] correct merge issues --- scripts/cmake/vcpkg_configure_make.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index d3cba3bf2d43d6..13c76d38a5a462 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -206,7 +206,7 @@ function(vcpkg_configure_make) cmake_parse_arguments(PARSE_ARGV 0 _csc "AUTOCONFIG;SKIP_CONFIGURE;COPY_SOURCE;DISABLE_VERBOSE_FLAGS;NO_ADDITIONAL_PATHS;ADD_BIN_TO_PATH;USE_WRAPPERS;DETERMINE_BUILD_TRIPLET" "SOURCE_PATH;PROJECT_SUBPATH;PRERUN_SHELL;BUILD_TRIPLET" - "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;CONFIGURE_ENVIRONMENT_VARIABLES;CONFIG_DEPENDENT_ENVIRONMENT" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;CONFIGURE_ENVIRONMENT_VARIABLES;CONFIG_DEPENDENT_ENVIRONMENT;ADDITIONAL_MSYS_PACKAGES" ) vcpkg_internal_get_cmake_vars(OUTPUT_FILE _VCPKG_CMAKE_VARS_FILE) set(_VCPKG_CMAKE_VARS_FILE "${_VCPKG_CMAKE_VARS_FILE}" PARENT_SCOPE) @@ -265,7 +265,7 @@ function(vcpkg_configure_make) # Pre-processing windows configure requirements if (CMAKE_HOST_WIN32) list(APPEND MSYS_REQUIRE_PACKAGES binutils libtool autoconf automake-wrapper automake1.16 m4) - vcpkg_acquire_msys(MSYS_ROOT PACKAGES ${MSYS_REQUIRE_PACKAGES}) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES ${MSYS_REQUIRE_PACKAGES} ${_csc_ADDITIONAL_MSYS_PACKAGES}) if (_csc_AUTOCONFIG AND NOT _csc_BUILD_TRIPLET OR _csc_DETERMINE_BUILD_TRIPLET) _vcpkg_determine_autotools_host_cpu(BUILD_ARCH) # VCPKG_HOST => machine you are building on => --build= _vcpkg_determine_autotools_target_cpu(TARGET_ARCH) @@ -388,6 +388,7 @@ function(vcpkg_configure_make) # Variables not correctly detected by configure. In release builds. list(APPEND _csc_OPTIONS gl_cv_double_slash_root=yes ac_cv_func_memmove=yes) + #list(APPEND _csc_OPTIONS lt_cv_deplibs_check_method=pass_all) # Just ignore libtool checks if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") list(APPEND _csc_OPTIONS gl_cv_host_cpu_c_abi=no) endif() @@ -481,7 +482,7 @@ function(vcpkg_configure_make) list(REMOVE_DUPLICATES ALL_LIBS_LIST) list(TRANSFORM ALL_LIBS_LIST STRIP) - list(TRANSFORM ALL_LIBS_LIST REPLACE "(.lib|.a|.so)$" "") + list(TRANSFORM ALL_LIBS_LIST REPLACE "(.dll.lib|.lib|.a|.so)$" "") if(VCPKG_TARGET_IS_WINDOWS) list(REMOVE_ITEM ALL_LIBS_LIST "uuid") endif() From 50f8fdac8326f72839b41c3a24b0daf7917c7d1d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 11 Nov 2020 17:30:20 +0100 Subject: [PATCH 107/114] determine cmake vars if not done before. --- scripts/cmake/vcpkg_build_make.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index 97cd603577f57d..a6adebc435d506 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -42,8 +42,12 @@ ## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) ## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) function(vcpkg_build_make) - + if(NOT _VCPKG_CMAKE_VARS_FILE) + # vcpkg_build_make called without using vcpkg_configure_make before + vcpkg_internal_get_cmake_vars(OUTPUT_FILE _VCPKG_CMAKE_VARS_FILE) + endif() include("${_VCPKG_CMAKE_VARS_FILE}") + # parse parameters such that semicolons in options arguments to COMMAND don't get erased cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET;SUBPATH" "") From 1ef5b9cff02997c2f0d8281c67a1bae5921fba7e Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 11 Nov 2020 17:35:39 +0100 Subject: [PATCH 108/114] move adding of -l earlier --- scripts/cmake/vcpkg_configure_make.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 13c76d38a5a462..4a4039a0ffbe02 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -489,10 +489,11 @@ function(vcpkg_configure_make) list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) if(ALL_LIBS_STRING) + set(ALL_LIBS_LIST "-l${ALL_LIBS_STRING}") if(DEFINED ENV{LIBS}) - set(ENV{LIBS} "$ENV{LIBS} -l${ALL_LIBS_STRING}") + set(ENV{LIBS} "$ENV{LIBS} ${ALL_LIBS_STRING}") else() - set(ENV{LIBS} "-l${ALL_LIBS_STRING}") + set(ENV{LIBS} "${ALL_LIBS_STRING}") endif() endif() debug_message(STATUS "ENV{LIBS}:$ENV{LIBS}") From 474c122a2e65ca0217a611a16cf8375df1f73760 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 11 Nov 2020 21:26:00 +0100 Subject: [PATCH 109/114] more merge cleanup --- ports/libidn2/CONTROL | 2 +- ports/libspatialite/CONTROL | 2 +- ports/libtorrent/CONTROL | 2 +- ports/poco/use-vcpkg-expat.patch | 14 -------------- ports/wxwidgets/fix-expat.patch | 21 --------------------- scripts/cmake/vcpkg_acquire_msys.cmake | 3 --- scripts/cmake/vcpkg_configure_make.cmake | 2 +- 7 files changed, 4 insertions(+), 42 deletions(-) delete mode 100644 ports/poco/use-vcpkg-expat.patch delete mode 100644 ports/wxwidgets/fix-expat.patch diff --git a/ports/libidn2/CONTROL b/ports/libidn2/CONTROL index 00ec059a632100..31b86ad595fec7 100644 --- a/ports/libidn2/CONTROL +++ b/ports/libidn2/CONTROL @@ -1,6 +1,6 @@ Source: libidn2 Version: 2.2.0 -Port-Version: 2 +Port-Version: 3 Build-Depends: libiconv Homepage: https://www.gnu.org/software/libidn/ Description: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA 2003 specifications. Libidn's purpose is to encode and decode internationalized domain names. diff --git a/ports/libspatialite/CONTROL b/ports/libspatialite/CONTROL index 364bd887c6ec0c..38b4041f1e6eb4 100644 --- a/ports/libspatialite/CONTROL +++ b/ports/libspatialite/CONTROL @@ -1,6 +1,6 @@ Source: libspatialite Version: 4.3.0a -Port-Version: 5 +Port-Version: 6 Homepage: https://www.gaia-gis.it/gaia-sins/libspatialite-sources Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities. Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL index 47ef4184589ba2..707cf8a4389129 100644 --- a/ports/libtorrent/CONTROL +++ b/ports/libtorrent/CONTROL @@ -1,6 +1,6 @@ Source: libtorrent Version: 1.2.10 -Port-Version: 1 +Port-Version: 2 Homepage: https://github.com/arvidn/libtorrent Description: An efficient feature complete C++ BitTorrent implementation Build-Depends: openssl, boost-system, boost-date-time, boost-chrono, boost-random, boost-asio, boost-crc, boost-config, boost-iterator, boost-scope-exit, boost-multiprecision, boost-pool, boost-variant diff --git a/ports/poco/use-vcpkg-expat.patch b/ports/poco/use-vcpkg-expat.patch deleted file mode 100644 index 971e37908111d8..00000000000000 --- a/ports/poco/use-vcpkg-expat.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt -index d4a502a..780f5d0 100644 ---- a/XML/CMakeLists.txt -+++ b/XML/CMakeLists.txt -@@ -23,7 +23,8 @@ endif() - # If POCO_UNBUNDLED is enabled we try to find the required packages - # The configuration will fail if the packages are not found - if (POCO_UNBUNDLED) -- find_package(EXPAT REQUIRED) -+ find_package(expat CONFIG REQUIRED) -+ set(EXPAT_LIBRARIES expat::expat) - set(SYSLIBS ${SYSLIBS} ${EXPAT_LIBRARIES}) - include_directories(${EXPAT_INCLUDE_DIRS}) - else() diff --git a/ports/wxwidgets/fix-expat.patch b/ports/wxwidgets/fix-expat.patch deleted file mode 100644 index 6a666aebdb9288..00000000000000 --- a/ports/wxwidgets/fix-expat.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/build/cmake/lib/expat.cmake b/build/cmake/lib/expat.cmake -index 1d2b79b..04bef93 100644 ---- a/build/cmake/lib/expat.cmake -+++ b/build/cmake/lib/expat.cmake -@@ -7,14 +7,5 @@ - # Licence: wxWindows licence - ############################################################################# - --if(wxUSE_EXPAT STREQUAL "builtin") -- wx_add_builtin_library(wxexpat -- src/expat/expat/lib/xmlparse.c -- src/expat/expat/lib/xmlrole.c -- src/expat/expat/lib/xmltok.c -- ) -- set(EXPAT_LIBRARIES wxexpat) -- set(EXPAT_INCLUDE_DIRS ${wxSOURCE_DIR}/src/expat/expat/lib) --elseif(wxUSE_EXPAT) -- find_package(EXPAT REQUIRED) -+find_package(expat CONFIG REQUIRED) -+set(EXPAT_LIBRARIES expat::expat) --endif() diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index fee151d5eddfb1..118b7b2bdcb420 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -184,9 +184,6 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) URL "https://repo.msys2.org/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz" SHA512 b309799e5a9d248ef66eaf11a0bd21bf4e8b9bd5c677c627ec83fa760ce9f0b54ddf1b62cbb436e641fbbde71e3b61cb71ff541d866f8ca7717a3a0dbeb00ebf DEPS grep sed coreutils file - # file.exe is required so that libtool is not using a wrong fallback regex to find the correct libraries. - # alternativly lt_cv_deplibs_check_method=pass_all could be passed via configure and the objdump check skipped. - # Update. file.exe seems not be able to run with in bash. ) msys_package( URL "https://repo.msys2.org/msys/x86_64/file-5.39-1-x86_64.pkg.tar.zst" diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 4a4039a0ffbe02..3e93b203800cc4 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -489,7 +489,7 @@ function(vcpkg_configure_make) list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) if(ALL_LIBS_STRING) - set(ALL_LIBS_LIST "-l${ALL_LIBS_STRING}") + set(ALL_LIBS_STRING "-l${ALL_LIBS_STRING}") if(DEFINED ENV{LIBS}) set(ENV{LIBS} "$ENV{LIBS} ${ALL_LIBS_STRING}") else() From fc3edba9339b0a973b88867c242005d2bb141314 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 11 Nov 2020 23:15:55 +0100 Subject: [PATCH 110/114] fix uwp builds by not transforming libs --- scripts/cmake/vcpkg_configure_make.cmake | 25 ++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 3e93b203800cc4..0d80e148cb9670 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -479,17 +479,30 @@ function(vcpkg_configure_make) convert_to_list(VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES C_LIBS_LIST) convert_to_list(VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES CXX_LIBS_LIST) set(ALL_LIBS_LIST ${C_LIBS_LIST} ${CXX_LIBS_LIST}) - list(REMOVE_DUPLICATES ALL_LIBS_LIST) list(TRANSFORM ALL_LIBS_LIST STRIP) - list(TRANSFORM ALL_LIBS_LIST REPLACE "(.dll.lib|.lib|.a|.so)$" "") - if(VCPKG_TARGET_IS_WINDOWS) - list(REMOVE_ITEM ALL_LIBS_LIST "uuid") + + #Do lib list transformation from name.lib to -lname if necessary + set(_VCPKG_TRANSFORM_LIBS TRUE) + if(VCPKG_TARGET_IS_UWP) + set(_VCPKG_TRANSFORM_LIBS FALSE) + # Avoid libtool choke: "Warning: linker path does not have real file for library -lWindowsApp." + # The problem with the choke is that libtool always falls back to built a static library even if a dynamic was requested. + # Note: Env LIBPATH;LIB are on the search path for libtool by default on windows. + # It even does unix/dos-short/unix transformation with the path to get rid of spaces. + endif() + set(_lprefix) + if(_VCPKG_TRANSFORM_LIBS) + set(_lprefix "-l") + list(TRANSFORM ALL_LIBS_LIST REPLACE "(.dll.lib|.lib|.a|.so)$" "") + if(VCPKG_TARGET_IS_WINDOWS) + list(REMOVE_ITEM ALL_LIBS_LIST "uuid") + endif() endif() - list(JOIN ALL_LIBS_LIST " -l" ALL_LIBS_STRING) + list(JOIN ALL_LIBS_LIST " ${_lprefix}" ALL_LIBS_STRING) if(ALL_LIBS_STRING) - set(ALL_LIBS_STRING "-l${ALL_LIBS_STRING}") + set(ALL_LIBS_STRING "${_lprefix}${ALL_LIBS_STRING}") if(DEFINED ENV{LIBS}) set(ENV{LIBS} "$ENV{LIBS} ${ALL_LIBS_STRING}") else() From 7012065c92ffd9caf8305d9bd5b64801a9b0b735 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 12 Nov 2020 12:20:11 +0100 Subject: [PATCH 111/114] fix patches in io2d --- ports/io2d/portfile.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/io2d/portfile.cmake b/ports/io2d/portfile.cmake index ad36dd70ea7d4d..d47fc97c854164 100644 --- a/ports/io2d/portfile.cmake +++ b/ports/io2d/portfile.cmake @@ -7,9 +7,7 @@ vcpkg_from_github( SHA512 f8e5a708f6cbda913a0492a843e1502b8d3cc615a6abda50e850be944e1484ec9087b787c54cc25d513172a7d5ab789be41a761c97df94266df4d1bcf14db17c HEAD_REF master PATCHES - fix-linux-build.patch - Fix-FindCairo.patch - fix-expat.patch + cmake.dep.patch ) if (VCPKG_TARGET_IS_OSX) From f32e78c2d4fbb3c238fd9363ae3d53dd7ee605a3 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 12 Nov 2020 12:20:19 +0100 Subject: [PATCH 112/114] fix xz download error --- scripts/cmake/vcpkg_acquire_msys.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index 118b7b2bdcb420..fe7a2a4bd4f33c 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -249,9 +249,9 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) URL "https://repo.msys2.org/msys/x86_64/gmp-6.2.0-1-x86_64.pkg.tar.xz" SHA512 1389a443e775bb255d905665dd577bef7ed71d51a8c24d118097f8119c08c4dfe67505e88ddd1e9a3764dd1d50ed8b84fa34abefa797d257e90586f0cbf54de8 ) - msys_package( - URL "https://repo.msys2.org/msys/x86_64/xz-5.2.4-1-x86_64.pkg.tar.xz" - SHA512 4b4daa6250d50cfd6575630803e57aaca5bdb24057456761565404a37a9224535e51ef1212f430ffa434d7b7128ad61792c59eb6bc905b8b4455fed25bff499a + msys_package( + URL "https://repo.msys2.org/msys/x86_64/xz-5.2.5-1-x86_64.pkg.tar.xz" # this seems to require immediate updating on version bumps. + SHA512 99d092c3398277e47586cead103b41e023e9432911fb7bdeafb967b826f6a57d32e58afc94c8230dad5b5ec2aef4f10d61362a6d9e410a6645cf23f076736bba DEPS liblzma libiconv gettext ) msys_package( From fc21317a6b779de69c6cdbd0709e3f254900cde1 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 13 Nov 2020 22:52:29 +0100 Subject: [PATCH 113/114] apply code review changes manually --- ports/fontconfig/portfile.cmake | 18 ++++++++++-------- ports/libiconv/portfile.cmake | 1 - ports/libtorrent/portfile.cmake | 3 +-- ports/libxmlpp/CONTROL | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index 4e3a54234ffcbd..1b20f66f821aba 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -64,18 +64,20 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/var" "${CURRENT_PACKAGES_DIR}/debug/etc") if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + if(VCPKG_TARGET_IS_WINDOWS) + set(DEFINE_FC_PUBLIC "#define FcPublic __declspec(dllimport)") + else() + set(DEFINE_FC_PUBLIC "#define FcPublic __attribute__((visibility(\"default\")))") + endif( foreach(HEADER fcfreetype.h fontconfig.h) - file(READ ${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER} FC_HEADER) - if(VCPKG_TARGET_IS_WINDOWS) - string(REPLACE "#define FcPublic" "#define FcPublic __declspec(dllimport)" FC_HEADER "${FC_HEADER}") - else() - string(REPLACE "#define FcPublic" "#define FcPublic __attribute__((visibility(\"default\")))" FC_HEADER "${FC_HEADER}") - endif() - file(WRITE ${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER} "${FC_HEADER}") + vcpkg_replace_strings("${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER}" + "#define FcPublic" + "${DEFINE_FC_PUBLIC}" + ) endforeach() endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) ## Build the fontconfig cache diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index 7f3a0eb46d48a5..62fb8e42d89b45 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -42,5 +42,4 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURR file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") - set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) \ No newline at end of file diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake index 91b27f6540e969..e548b9b44187d5 100644 --- a/ports/libtorrent/portfile.cmake +++ b/ports/libtorrent/portfile.cmake @@ -6,8 +6,7 @@ if(VCPKG_TARGET_IS_WINDOWS) message(FATAL_ERROR "The python feature is currently broken on Windows") endif() - if("iconv" IN_LIST FEATURES) - else() + if(NOT "iconv" IN_LIST FEATURES) # prevent picking up libiconv if it happens to already be installed set(ICONV_PATCH "no_use_iconv.patch") endif() diff --git a/ports/libxmlpp/CONTROL b/ports/libxmlpp/CONTROL index 0c76b120cffe59..b737bde3c9ecfa 100644 --- a/ports/libxmlpp/CONTROL +++ b/ports/libxmlpp/CONTROL @@ -1,5 +1,5 @@ Source: libxmlpp Version: 2.40.1 -Port-Version: 7 +Port-Version: 6 Description: a C++ wrapper for the libxml XML parser library. Build-Depends: libxml2, glibmm From 206ae7066280e7c08de0a01135f6e56bea54185a Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 13 Nov 2020 23:28:53 +0100 Subject: [PATCH 114/114] fix the typos left behind in CR --- ports/fontconfig/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index 1b20f66f821aba..b4641e3525eada 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -68,9 +68,9 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(DEFINE_FC_PUBLIC "#define FcPublic __declspec(dllimport)") else() set(DEFINE_FC_PUBLIC "#define FcPublic __attribute__((visibility(\"default\")))") - endif( + endif() foreach(HEADER fcfreetype.h fontconfig.h) - vcpkg_replace_strings("${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER}" + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER}" "#define FcPublic" "${DEFINE_FC_PUBLIC}" )