aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/stormlib/CONTROL4
-rw-r--r--ports/stormlib/disable-building-tests.patch15
-rw-r--r--ports/stormlib/portfile.cmake24
3 files changed, 43 insertions, 0 deletions
diff --git a/ports/stormlib/CONTROL b/ports/stormlib/CONTROL
new file mode 100644
index 000000000..348e09616
--- /dev/null
+++ b/ports/stormlib/CONTROL
@@ -0,0 +1,4 @@
+Source: stormlib
+Version: 9.22
+Build-Depends: zlib, bzip2
+Description: StormLib is a library for opening and manipulating Blizzard MPQ files
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..82e0aedf9
--- /dev/null
+++ b/ports/stormlib/portfile.cmake
@@ -0,0 +1,24 @@
+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
+)
+
+vcpkg_install_cmake()
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/stormlib RENAME copyright)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)