diff options
| author | Stijn Herfst <stijnherfst@outlook.com> | 2019-05-13 19:12:59 +0200 |
|---|---|---|
| committer | Stijn Herfst <stijnherfst@outlook.com> | 2019-05-13 19:12:59 +0200 |
| commit | eb6513f27482d94d113e85523ce4362c7cac6846 (patch) | |
| tree | ccc2559ea4a2acc4b16bbe01b13c08d49f5cf02c | |
| parent | 68267e29a1fa86158787309624081dfd8319c9f0 (diff) | |
| download | vcpkg-eb6513f27482d94d113e85523ce4362c7cac6846.tar.gz vcpkg-eb6513f27482d94d113e85523ce4362c7cac6846.zip | |
[stormlib] Add new port
| -rw-r--r-- | ports/stormlib/CONTROL | 3 | ||||
| -rw-r--r-- | ports/stormlib/disable-building-tests.patch | 15 | ||||
| -rw-r--r-- | ports/stormlib/portfile.cmake | 26 |
3 files changed, 44 insertions, 0 deletions
diff --git a/ports/stormlib/CONTROL b/ports/stormlib/CONTROL new file mode 100644 index 000000000..d40f16a5a --- /dev/null +++ b/ports/stormlib/CONTROL @@ -0,0 +1,3 @@ +Source: stormlib
+Version: 9.22
+Description: StormLib is a library for opening and manipulating Blizzard MPQ files
\ No newline at end of file diff --git a/ports/stormlib/disable-building-tests.patch b/ports/stormlib/disable-building-tests.patch new file mode 100644 index 000000000..fe0d7f70c --- /dev/null +++ b/ports/stormlib/disable-building-tests.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f5211b1..4025ea1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -358,10 +358,4 @@ install(TARGETS ${LIBRARY_NAME} + + INCLUDE(CPack) + +-if(STORM_BUILD_TESTS) +- target_link_libraries(storm_test ${LIBRARY_NAME}) +- install(TARGETS storm_test DESTINATION bin) +-endif() + +-add_executable(storm_test ${SRC_FILES} ${TOMCRYPT_FILES} ${TOMMATH_FILES} ${ZLIB_BZIP2_FILES} ${TEST_SRC_FILES}) +-install(TARGETS storm_test RUNTIME DESTINATION bin) diff --git a/ports/stormlib/portfile.cmake b/ports/stormlib/portfile.cmake new file mode 100644 index 000000000..116a894b3 --- /dev/null +++ b/ports/stormlib/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ladislav-zezula/StormLib
+ REF v9.22
+ SHA512 e08571fca21be2e853d390b8feda32001df810b8f4b60d36822a9de2a877f2be9d3dadacfeec181a2eb80e00b8fed66d0dc9a0d8d9e043e2959478a41ed4d13a
+ HEAD_REF master
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/disable-building-tests.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS -STORM_BUILD_TESTS=OFF
+)
+
+vcpkg_install_cmake()
+set(STORM_BUILD_TESTS OFF)
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/stormlib RENAME copyright)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
