aboutsummaryrefslogtreecommitdiff
path: root/ports/libmodplug
diff options
context:
space:
mode:
Diffstat (limited to 'ports/libmodplug')
-rw-r--r--ports/libmodplug/004-export-pkgconfig.patch32
-rw-r--r--ports/libmodplug/CONTROL6
-rw-r--r--ports/libmodplug/portfile.cmake5
-rw-r--r--ports/libmodplug/vcpkg.json8
4 files changed, 34 insertions, 17 deletions
diff --git a/ports/libmodplug/004-export-pkgconfig.patch b/ports/libmodplug/004-export-pkgconfig.patch
index 28201a961..eb59ca111 100644
--- a/ports/libmodplug/004-export-pkgconfig.patch
+++ b/ports/libmodplug/004-export-pkgconfig.patch
@@ -1,23 +1,37 @@
+From 6a3e539ea26eec1bfc2a6e722e923bd5221f8d26 Mon Sep 17 00:00:00 2001
+From: "Matthias C. M. Troffaes" <matthias.troffaes@gmail.com>
+Date: Thu, 8 Jul 2021 10:47:30 +0100
+Subject: [PATCH] Fix Libs.private in .pc file.
+
+---
+ CMakeLists.txt | 7 +++++--
+ libmodplug.pc.in | 2 +-
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 468f1a3..8e94458 100644
+index 468f1a3..3164fc6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -142,6 +142,8 @@ if(HAVE_SINF)
+@@ -141,7 +141,11 @@ if(HAVE_SINF)
+ add_definitions(-DHAVE_SINF)
endif(HAVE_SINF)
- if (NOT WIN32)
-+ set(UNIXLIBS "-lstdc++ -lm")
-+endif (NOT WIN32)
+-if (NOT WIN32)
++if(WIN32)
++ set(LIBS_PRIVATE "-luser32")
++else(WIN32)
++ set(LIBS_PRIVATE "-lstdc++ -lm")
++endif(WIN32)
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
-@@ -152,4 +154,3 @@ if (NOT WIN32)
+@@ -152,4 +156,3 @@ if (NOT WIN32)
install(FILES "${PROJECT_BINARY_DIR}/libmodplug.pc"
DESTINATION lib/pkgconfig
)
-endif (NOT WIN32)
diff --git a/libmodplug.pc.in b/libmodplug.pc.in
-index bbf05f9..1699d76 100644
+index bbf05f9..e4a43cc 100644
--- a/libmodplug.pc.in
+++ b/libmodplug.pc.in
@@ -8,5 +8,5 @@ Description: The ModPlug mod file playing library.
@@ -25,6 +39,8 @@ index bbf05f9..1699d76 100644
Requires:
Libs: -L${libdir} -lmodplug
-Libs.private: -lstdc++ -lm
-+Libs.private: @UNIXLIBS@
++Libs.private: @LIBS_PRIVATE@
Cflags: -I${includedir}
+--
+2.21.0.windows.1
diff --git a/ports/libmodplug/CONTROL b/ports/libmodplug/CONTROL
deleted file mode 100644
index 2d05f206a..000000000
--- a/ports/libmodplug/CONTROL
+++ /dev/null
@@ -1,6 +0,0 @@
-Source: libmodplug
-Version: 0.8.9.0
-Port-Version: 7
-Homepage: https://github.com/Konstanty/libmodplug
-Description: The ModPlug mod file playing library.
-Supports: !uwp
diff --git a/ports/libmodplug/portfile.cmake b/ports/libmodplug/portfile.cmake
index 6ead190d8..5df935579 100644
--- a/ports/libmodplug/portfile.cmake
+++ b/ports/libmodplug/portfile.cmake
@@ -13,7 +13,7 @@ vcpkg_from_github(ARCHIVE
${STATIC_PATCH}
002-detect_sinf.patch
003-use-static-cast-for-ctype.patch
- 004-export-pkgconfig.patch
+ 004-export-pkgconfig.patch # https://github.com/Konstanty/libmodplug/pull/59
)
vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA)
@@ -37,5 +37,4 @@ endif()
vcpkg_fixup_pkgconfig()
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmodplug)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmodplug/COPYING ${CURRENT_PACKAGES_DIR}/share/libmodplug/copyright)
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/libmodplug/vcpkg.json b/ports/libmodplug/vcpkg.json
new file mode 100644
index 000000000..854e034e1
--- /dev/null
+++ b/ports/libmodplug/vcpkg.json
@@ -0,0 +1,8 @@
+{
+ "name": "libmodplug",
+ "version-string": "0.8.9.0",
+ "port-version": 8,
+ "description": "The ModPlug mod file playing library.",
+ "homepage": "https://github.com/Konstanty/libmodplug",
+ "supports": "!uwp"
+}