diff options
| author | jasjuang <jasjuang@gmail.com> | 2017-06-20 15:38:15 -0700 |
|---|---|---|
| committer | jasjuang <jasjuang@gmail.com> | 2017-06-20 15:38:15 -0700 |
| commit | f53585bedd94acab307f0543f4617dea0f987d1d (patch) | |
| tree | c0b55ac697f512f55e60b2176f91b47a31c24eb2 | |
| parent | a87c933c8423a9ab62d58f55f28e81f2be599e06 (diff) | |
| parent | 9f0f110f36ed9b91b1fa2b2ab1165555b540af4d (diff) | |
| download | vcpkg-f53585bedd94acab307f0543f4617dea0f987d1d.tar.gz vcpkg-f53585bedd94acab307f0543f4617dea0f987d1d.zip | |
Merge remote-tracking branch 'upstream/master' into tinyxml2
| -rw-r--r-- | ports/glm/CONTROL | 2 | ||||
| -rw-r--r-- | ports/glm/portfile.cmake | 32 | ||||
| -rw-r--r-- | ports/utf8proc/CONTROL | 3 | ||||
| -rw-r--r-- | ports/utf8proc/fix-buildsystem.patch | 48 | ||||
| -rw-r--r-- | ports/utf8proc/portfile.cmake | 28 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 22 |
6 files changed, 119 insertions, 16 deletions
diff --git a/ports/glm/CONTROL b/ports/glm/CONTROL index 3e1f91148..2f7355c30 100644 --- a/ports/glm/CONTROL +++ b/ports/glm/CONTROL @@ -1,3 +1,3 @@ Source: glm -Version: 0.9.8.1 +Version: 0.9.8.4 Description: OpenGL Mathematics (GLM) https://glm.g-truc.net diff --git a/ports/glm/portfile.cmake b/ports/glm/portfile.cmake index 4780a1b39..ff988c47b 100644 --- a/ports/glm/portfile.cmake +++ b/ports/glm/portfile.cmake @@ -1,20 +1,26 @@ -#header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glm) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/g-truc/glm/releases/download/0.9.8.1/glm-0.9.8.1.zip" - FILENAME "glm-0.9.8.1.zip" - SHA512 93223ea7a08d969331a6b93d598c0b59dfc09e86770661c444f81939bd175053d3f6b1211a4aa4e59d732df39b97fe491eb35d4ac2efb286a1cf68ed29bfa80a + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO g-truc/glm + REF 0.9.8.4 + SHA512 ff0e0651a695caebe9235882d14e09546d52b3cdf66cca8e2078f15b02a3fca4e47bd97d2807aa329f76aa633af3b4999501bd4d0b22ad44b00558d4917f39ed + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} ) -vcpkg_extract_source_archive(${ARCHIVE}) -# Remove glm/CMakeLists.txt -file(REMOVE ${SOURCE_PATH}/glm/CMakeLists.txt) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/glm") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Put the license file where vcpkg expects it file(COPY ${SOURCE_PATH}/copying.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glm/) file(RENAME ${CURRENT_PACKAGES_DIR}/share/glm/copying.txt ${CURRENT_PACKAGES_DIR}/share/glm/copyright) - -# Copy the glm header files -file(GLOB HEADER_FILES ${SOURCE_PATH}/glm/*) -file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/glm) diff --git a/ports/utf8proc/CONTROL b/ports/utf8proc/CONTROL new file mode 100644 index 000000000..1dcbbbef1 --- /dev/null +++ b/ports/utf8proc/CONTROL @@ -0,0 +1,3 @@ +Source: utf8proc +Version: 2.1.0 +Description: Clean C library for processing UTF-8 Unicode data. diff --git a/ports/utf8proc/fix-buildsystem.patch b/ports/utf8proc/fix-buildsystem.patch new file mode 100644 index 000000000..17af16c9b --- /dev/null +++ b/ports/utf8proc/fix-buildsystem.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index be676ba..7a2b6d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,9 +13,9 @@ set(SO_MAJOR 2) + set(SO_MINOR 1) + set(SO_PATCH 0) + +-add_definitions ( +- -DUTF8PROC_EXPORTS +-) ++if(BUILD_SHARED_LIBS) ++ add_definitions(-DUTF8PROC_EXPORTS -DUTF8PROC_SHARED) ++endif() + + if (NOT MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -std=c99 -pedantic -Wall") +@@ -31,3 +31,10 @@ set_target_properties (utf8proc PROPERTIES + VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}" + SOVERSION ${SO_MAJOR} + ) ++ ++install(TARGETS utf8proc ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) ++ ++install(FILES utf8proc.h DESTINATION include) +diff --git a/utf8proc.h b/utf8proc.h +index edf46d4..7b3f11a 100644 +--- a/utf8proc.h ++++ b/utf8proc.h +@@ -120,13 +120,13 @@ typedef bool utf8proc_bool; + #endif + #include <limits.h> + +-#ifdef _WIN32 ++#if defined _WIN32 && defined UTF8PROC_SHARED + # ifdef UTF8PROC_EXPORTS + # define UTF8PROC_DLLEXPORT __declspec(dllexport) + # else + # define UTF8PROC_DLLEXPORT __declspec(dllimport) + # endif +-#elif __GNUC__ >= 4 ++#elif __GNUC__ >= 4 && defined UTF8PROC_SHARED + # define UTF8PROC_DLLEXPORT __attribute__ ((visibility("default"))) + #else + # define UTF8PROC_DLLEXPORT diff --git a/ports/utf8proc/portfile.cmake b/ports/utf8proc/portfile.cmake new file mode 100644 index 000000000..64244ec03 --- /dev/null +++ b/ports/utf8proc/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO JuliaLang/utf8proc + REF v2.1.0 + SHA512 72b7f377fa6a62018d3eeab8723a27e25db3d1f794ae0bf21fff62ec1a7439bec52e7c93d2a00c218de6ff518097fb4a7a87c56e61ba8c98e689aa8f7171c812) + +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(READ ${CURRENT_PACKAGES_DIR}/include/utf8proc.h UTF8PROC_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "defined UTF8PROC_SHARED" "0" UTF8PROC_H "${UTF8PROC_H}") +else() + string(REPLACE "defined UTF8PROC_SHARED" "1" UTF8PROC_H "${UTF8PROC_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/utf8proc.h "${UTF8PROC_H}") + +file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/utf8proc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/utf8proc/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/utf8proc/copyright) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 3b0c794d9..f65337544 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -76,8 +76,6 @@ function(vcpkg_fixup_cmake_targets) "${RELEASE_SHARE}/*[Cc]onfig-release.cmake" ) foreach(RELEASE_TARGET ${RELEASE_TARGETS}) - get_filename_component(RELEASE_TARGET_NAME ${RELEASE_TARGET} NAME) - file(READ ${RELEASE_TARGET} _contents) string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") file(WRITE ${RELEASE_TARGET} "${_contents}") @@ -99,6 +97,26 @@ function(vcpkg_fixup_cmake_targets) file(REMOVE ${DEBUG_TARGET}) endforeach() + file(GLOB MAIN_TARGETS "${RELEASE_SHARE}/*[Tt]argets.cmake") + foreach(MAIN_TARGET ${MAIN_TARGETS}) + file(READ ${MAIN_TARGET} _contents) + string(REGEX REPLACE + "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + _contents "${_contents}") + file(WRITE ${MAIN_TARGET} "${_contents}") + endforeach() + + file(GLOB MAIN_CONFIGS "${RELEASE_SHARE}/*[Cc]onfig.cmake") + foreach(MAIN_CONFIG ${MAIN_CONFIGS}) + file(READ ${MAIN_CONFIG} _contents) + string(REGEX REPLACE + "get_filename_component\\(PACKAGE_PREFIX_DIR \"\\\${CMAKE_CURRENT_LIST_DIR}/\\.\\./(\\.\\./)*\" ABSOLUTE\\)" + "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" + _contents "${_contents}") + file(WRITE ${MAIN_CONFIG} "${_contents}") + endforeach() + # Remove /debug/share/<port>/ if it's empty. file(GLOB_RECURSE REMAINING_FILES "${DEBUG_SHARE}/*") if(NOT REMAINING_FILES) |
