diff --git a/ports/fribidi/portfile.cmake b/ports/fribidi/portfile.cmake index ec5dc15538ae8c..5b45a17b164a70 100644 --- a/ports/fribidi/portfile.cmake +++ b/ports/fribidi/portfile.cmake @@ -5,12 +5,15 @@ vcpkg_from_github( REPO fribidi/fribidi REF 58c6cb390a9a18c98b2cbaac555d8ea9352a9e4f SHA512 1ec9c19faa87886786ce1589e2c66cab173b48e34d0e43487becc8606001f21f6ed17d0abd1c322fbbcaeb96a47ed882cad228be2e9beb019020ca2a475fc298 -HEAD_REF master) + HEAD_REF master +) -vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH} +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} OPTIONS -Ddocs=false - --backend=ninja) + --backend=ninja +) vcpkg_install_meson() vcpkg_copy_pdbs() @@ -28,4 +31,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fribidi RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fribidi RENAME copyright) diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 133d0bc0efb579..d0e544d7a70e61 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,5 +1,5 @@ Source: harfbuzz -Version: 2.5.1 +Version: 2.5.1-1 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, ragel, gettext (osx) Default-Features: ucdn diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index d28bd656f71a7d..48cfaf1b744268 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -17,9 +17,11 @@ vcpkg_from_github( ) file(READ ${SOURCE_PATH}/CMakeLists.txt _contents) + if("${_contents}" MATCHES "include \\(FindFreetype\\)") message(FATAL_ERROR "Harfbuzz's cmake must not directly include() FindFreetype.") endif() + if("${_contents}" MATCHES "find_library\\(GLIB_LIBRARIES") message(FATAL_ERROR "Harfbuzz's cmake must not directly find_library() glib.") endif() @@ -68,9 +70,22 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() + vcpkg_fixup_cmake_targets(CONFIG_PATH share/harfbuzz TARGET_PATH share/harfbuzz) + vcpkg_copy_pdbs() +if (HAVE_GLIB) + # Propagate dependency on glib downstream + file(READ "${CURRENT_PACKAGES_DIR}/share/harfbuzz/harfbuzzConfig.cmake" _contents) + file(WRITE "${CURRENT_PACKAGES_DIR}/share/harfbuzz/harfbuzzConfig.cmake" " +include(CMakeFindDependencyMacro) +find_dependency(unofficial-glib CONFIG) + +${_contents} +") +endif() + # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz RENAME copyright) diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL index 007718af75abe5..a6f97e1fe2ee27 100644 --- a/ports/libmysql/CONTROL +++ b/ports/libmysql/CONTROL @@ -1,4 +1,4 @@ Source: libmysql -Version: 8.0.4-3 +Version: 8.0.4-4 Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph, openssl, icu, libevent, liblzma, lz4, zlib Description: A MySQL client library for C development. diff --git a/ports/libmysql/linux_libmysql.patch b/ports/libmysql/linux_libmysql.patch new file mode 100644 index 00000000000000..42dfa73d8d5782 --- /dev/null +++ b/ports/libmysql/linux_libmysql.patch @@ -0,0 +1,18 @@ +diff --git a/configure.cmake b/configure.cmake +index 1f3d8e2..9e45f48 100644 +--- a/configure.cmake ++++ b/configure.cmake +@@ -456,7 +456,11 @@ IF(NOT HAVE_FCNTL_NONBLOCK) + ENDIF() + + IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC) +- STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} processor) ++ IF(${CMAKE_SYSTEM_PROCESSOR}) ++ STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} processor) ++ ELSE() ++ STRING(TOLOWER ${CMAKE_HOST_SYSTEM_PROCESSOR} processor) ++ ENDIF() + IF(processor MATCHES "86" OR processor MATCHES "amd64" OR processor MATCHES "x64") + IF(NOT CMAKE_SYSTEM_NAME MATCHES "SunOS") + # The loader in some Solaris versions has a bug due to which it refuses to + diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index dfd38c41c0158c..e179ca714a59a0 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -10,6 +10,10 @@ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT CMAKE_SYSTEM_NAME OR CMAKE_S message(FATAL_ERROR "Oracle has dropped support in libmysql for 32-bit Windows.") endif() +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + message(WARNING "libmysql needs ncurses on LINUX, please install ncurses first.\nOn Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.") +endif() + include(vcpkg_common_functions) vcpkg_from_github( @@ -18,13 +22,10 @@ vcpkg_from_github( REF mysql-8.0.4 SHA512 8d9129e7670e88df14238299052a5fe6d4f3e40bf27ef7a3ca8f4f91fb40507b13463e9bd24435b34e5d06c5d056dfb259fb04e77cc251b188eea734db5642be HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/ignore-boost-version.patch - ${CMAKE_CURRENT_LIST_DIR}/system-libs.patch + ignore-boost-version.patch + system-libs.patch + linux_libmysql.patch ) file(REMOVE_RECURSE ${SOURCE_PATH}/include/boost_1_65_0) @@ -100,13 +101,13 @@ else() ${CURRENT_PACKAGES_DIR}/lib/mysqlclient.lib ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlclient.lib) - # correct the dll directory + # correct the dll directory if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/bin/libmysql.dll) file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/bin/libmysql.pdb) endif() - + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.dll) @@ -120,4 +121,4 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h "${_contents}") # copy license file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/LICENSE ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright) \ No newline at end of file +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/LICENSE ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright) diff --git a/ports/libraqm/CMakeLists.txt b/ports/libraqm/CMakeLists.txt new file mode 100644 index 00000000000000..f50153e6313eb3 --- /dev/null +++ b/ports/libraqm/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 3.11) + +project(raqm) + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_MODULE_PATH}") + +find_package(Freetype REQUIRED) +find_package(Fribidi REQUIRED) +find_package(harfbuzz CONFIG REQUIRED) + +find_path(HARFBUZZ_INCLUDE_DIRS + NAMES hb.h + PATH_SUFFIXES harfbuzz) +find_path(FREETYPE_ADDITIONAL_INCLUDE_DIRS NAMES ft2build.h) +add_library(raqm ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.c ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h) + +target_include_directories(raqm SYSTEM PUBLIC ${FREETYPE_ADDITIONAL_INCLUDE_DIRS}) +target_include_directories(raqm SYSTEM PUBLIC ${FREETYPE_INCLUDE_DIRS}) +target_include_directories(raqm SYSTEM PUBLIC ${HARFBUZZ_INCLUDE_DIRS}) +target_include_directories(raqm SYSTEM PUBLIC ${FRIBIDI_INCLUDE_DIR}) + +target_link_libraries(raqm PRIVATE Freetype::Freetype) +target_link_libraries(raqm PRIVATE harfbuzz::harfbuzz ${FRIBIDI_LIBRARY}) + +install(TARGETS raqm + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +set(RAQM_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") +set(RAQM_LIBRARY raqm) +set(RAQM_LIBRARIES ${HARFBUZZ_LIBRARY} ${FRIBIDI_LIBRARY} ${RAQM_LIBRARY}) +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/libraqm/CONTROL b/ports/libraqm/CONTROL new file mode 100644 index 00000000000000..131527a4a53c17 --- /dev/null +++ b/ports/libraqm/CONTROL @@ -0,0 +1,4 @@ +Source: libraqm +Version: 0.6.0 +Description: A library for complex text layout +Build-Depends: freetype, harfbuzz, fribidi \ No newline at end of file diff --git a/ports/libraqm/FindFribidi.cmake b/ports/libraqm/FindFribidi.cmake new file mode 100644 index 00000000000000..a12bdb60ea5e06 --- /dev/null +++ b/ports/libraqm/FindFribidi.cmake @@ -0,0 +1,12 @@ +find_path(FRIBIDI_INCLUDE_DIR + NAMES fribidi/fribidi.h) + +set(FRIBIDI_INCLUDE_DIR "${FRIBIDI_INCLUDE_DIR}/fribidi") +find_library(FRIBIDI_LIBRARY NAMES fribidi) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(FriBidi + FOUND_VAR FRIBIDI_FOUND + REQUIRED_VARS FRIBIDI_LIBRARY FRIBIDI_INCLUDE_DIR + VERSION_VAR FRIBIDI_VERSION_STRING +) \ No newline at end of file diff --git a/ports/libraqm/portfile.cmake b/ports/libraqm/portfile.cmake new file mode 100644 index 00000000000000..067f63ddea5d81 --- /dev/null +++ b/ports/libraqm/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO HOST-Oman/libraqm + REF v0.6.0 + SHA512 cd223d97b80e9d2cf26a5b68fbb84a87e53df819f12ffd06f84f1786a2207b34828d0888058a40c1d89a1466bb68b75dd326e25415afab029d51e1ed98f6a924 + HEAD_REF master +) + +file(COPY ${CURRENT_PORT_DIR}/FindFribidi.cmake DESTINATION ${SOURCE_PATH}) +file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCURRENT_PACKAGES_DIR=${CURRENT_PACKAGES_DIR} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libraqm RENAME copyright) + +# Post-build test for cmake libraries +vcpkg_test_cmake(PACKAGE_NAME raqm)