2018-11-05 03:28:27 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO fribidi/fribidi
|
2022-04-29 07:00:38 +08:00
|
|
|
REF v1.0.12
|
|
|
|
SHA512 a3a63e1dde1cffb097376df0b34522700cff600da61bdafd6f4f50db6937383b9f73a82081cb1a7f2e1946ba07fea13e2880a4250b1508850bffa500046a7fa5
|
2019-06-15 01:23:54 +08:00
|
|
|
HEAD_REF master
|
2022-02-17 05:04:51 +08:00
|
|
|
PATCHES meson-crosscompile.patch
|
2019-06-15 01:23:54 +08:00
|
|
|
)
|
2018-11-05 03:28:27 +08:00
|
|
|
|
2022-02-17 05:04:51 +08:00
|
|
|
set(gen_tab_subdir "share/${PORT}/gen.tab")
|
|
|
|
|
|
|
|
set(options "")
|
|
|
|
if(VCPKG_CROSSCOMPILING)
|
|
|
|
set(gen_tab "${CURRENT_HOST_INSTALLED_DIR}/${gen_tab_subdir}")
|
|
|
|
cmake_path(NATIVE_PATH gen_tab gen_tab)
|
|
|
|
set(options "-Dpregenerated_tab=${gen_tab}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_configure_meson(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
${options}
|
|
|
|
-Ddocs=false
|
|
|
|
-Dbin=false
|
|
|
|
-Dtests=false
|
2019-06-15 01:23:54 +08:00
|
|
|
)
|
2018-11-05 03:28:27 +08:00
|
|
|
|
2022-02-17 05:04:51 +08:00
|
|
|
vcpkg_install_meson()
|
2020-11-19 05:36:20 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2018-11-05 03:28:27 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2020-08-11 06:33:47 +08:00
|
|
|
# Define static macro
|
2022-02-17 05:04:51 +08:00
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/include/fribidi/fribidi-common.h" FRIBIDI_COMMON_H)
|
2020-08-11 06:33:47 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
string(REPLACE "#ifndef FRIBIDI_LIB_STATIC" "#if 0" FRIBIDI_COMMON_H "${FRIBIDI_COMMON_H}")
|
|
|
|
else()
|
|
|
|
string(REPLACE "#ifndef FRIBIDI_LIB_STATIC" "#if 1" FRIBIDI_COMMON_H "${FRIBIDI_COMMON_H}")
|
2019-03-21 00:51:08 +08:00
|
|
|
endif()
|
2022-02-17 05:04:51 +08:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/include/fribidi/fribidi-common.h" "${FRIBIDI_COMMON_H}")
|
|
|
|
|
|
|
|
if(VCPKG_CROSSCOMPILING)
|
|
|
|
file(
|
|
|
|
COPY "${gen_tab}/fribidi-unicode-version.h"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/include/fribidi"
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
file(
|
|
|
|
COPY "${CURRENT_PACKAGES_DIR}/include/fribidi/fribidi-unicode-version.h"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/${gen_tab_subdir}"
|
|
|
|
)
|
|
|
|
endif()
|
2019-03-21 00:51:08 +08:00
|
|
|
|
2021-12-11 07:57:46 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
|
2018-11-05 03:28:27 +08:00
|
|
|
# Handle copyright
|
2022-02-17 05:04:51 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|