early-access version 2853
This commit is contained in:
13
externals/vcpkg/ports/libmodplug/001-automagically-define-modplug-static.patch
vendored
Executable file
13
externals/vcpkg/ports/libmodplug/001-automagically-define-modplug-static.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/modplug.h b/src/modplug.h
|
||||
index 3ffbf9d..fd19ae5 100644
|
||||
--- a/src/modplug.h
|
||||
+++ b/src/modplug.h
|
||||
@@ -11,6 +11,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
+#define MODPLUG_STATIC
|
||||
+
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
# if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodplug as a dll for windows */
|
||||
# define MODPLUG_EXPORT __declspec(dllexport)
|
35
externals/vcpkg/ports/libmodplug/002-detect_sinf.patch
vendored
Executable file
35
externals/vcpkg/ports/libmodplug/002-detect_sinf.patch
vendored
Executable file
@@ -0,0 +1,35 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2ada51b..468f1a3 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -4,6 +4,7 @@ project(libmodplug)
|
||||
add_definitions(-DMODPLUG_BUILD)
|
||||
|
||||
include (CheckFunctionExists)
|
||||
+include (CheckIncludeFile)
|
||||
|
||||
include_directories(AFTER
|
||||
src
|
||||
@@ -11,6 +12,10 @@ include_directories(AFTER
|
||||
${PROJECT_BINARY_DIR}
|
||||
)
|
||||
|
||||
+if (UNIX)
|
||||
+ set (CMAKE_REQUIRED_LIBRARIES m)
|
||||
+endif()
|
||||
+
|
||||
if (WIN32)
|
||||
add_definitions(-D_USE_MATH_DEFINES)
|
||||
add_definitions(-DNOMINMAX)
|
||||
@@ -44,6 +49,11 @@ if (WIN32 AND NOT (MINGW OR MSYS))
|
||||
"Compilation may fail if inttypes.h is not natively supported by the compiler."
|
||||
"You can get inttypes.h from http://code.google.com/p/msinttypes/")
|
||||
endif()
|
||||
+else()
|
||||
+ check_include_file("stdint.h" HAVE_STDINT)
|
||||
+ if (HAVE_STDINT)
|
||||
+ add_definitions(-DHAVE_STDINT_H)
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
check_function_exists("setenv" HAVE_SETENV)
|
14
externals/vcpkg/ports/libmodplug/003-use-static-cast-for-ctype.patch
vendored
Executable file
14
externals/vcpkg/ports/libmodplug/003-use-static-cast-for-ctype.patch
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
diff --git a/src/load_abc.cpp b/src/load_abc.cpp
|
||||
index ee79f39..874ab8f 100644
|
||||
--- a/src/load_abc.cpp
|
||||
+++ b/src/load_abc.cpp
|
||||
@@ -268,7 +268,8 @@ static void setenv(const char *name, const char *value, int overwrite)
|
||||
#endif
|
||||
|
||||
static int abc_isvalidchar(char c) {
|
||||
- return(isalpha(c) || isdigit(c) || isspace(c) || c == '%' || c == ':');
|
||||
+ unsigned char u = static_cast<unsigned char>(c);
|
||||
+ return(isalpha(u) || isdigit(u) || isspace(u) || c == '%' || c == ':');
|
||||
}
|
||||
#if 0
|
||||
static const char *abc_skipspace(const char *p)
|
46
externals/vcpkg/ports/libmodplug/004-export-pkgconfig.patch
vendored
Executable file
46
externals/vcpkg/ports/libmodplug/004-export-pkgconfig.patch
vendored
Executable file
@@ -0,0 +1,46 @@
|
||||
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..3164fc6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -141,7 +141,11 @@ if(HAVE_SINF)
|
||||
add_definitions(-DHAVE_SINF)
|
||||
endif(HAVE_SINF)
|
||||
|
||||
-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 +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..e4a43cc 100644
|
||||
--- a/libmodplug.pc.in
|
||||
+++ b/libmodplug.pc.in
|
||||
@@ -8,5 +8,5 @@ Description: The ModPlug mod file playing library.
|
||||
Version: @VERSION@
|
||||
Requires:
|
||||
Libs: -L${libdir} -lmodplug
|
||||
-Libs.private: -lstdc++ -lm
|
||||
+Libs.private: @LIBS_PRIVATE@
|
||||
Cflags: -I${includedir}
|
||||
--
|
||||
2.21.0.windows.1
|
||||
|
16
externals/vcpkg/ports/libmodplug/005-fix-install-paths.patch
vendored
Executable file
16
externals/vcpkg/ports/libmodplug/005-fix-install-paths.patch
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 468f1a3..b58b11e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -119,7 +119,10 @@ add_library(modplug ${LIB_TYPE}
|
||||
)
|
||||
|
||||
# install the library:
|
||||
-install(TARGETS modplug DESTINATION lib)
|
||||
+install(TARGETS modplug
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib)
|
||||
|
||||
# incstall the headers:
|
||||
install(FILES
|
30
externals/vcpkg/ports/libmodplug/portfile.cmake
vendored
Executable file
30
externals/vcpkg/ports/libmodplug/portfile.cmake
vendored
Executable file
@@ -0,0 +1,30 @@
|
||||
set(MODPLUG_HASH 5a39f5913d07ba3e61d8d5afdba00b70165da81d)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(STATIC_PATCH "001-automagically-define-modplug-static.patch")
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Konstanty/libmodplug
|
||||
REF ${MODPLUG_HASH}
|
||||
SHA512 c43bb3190b62c3a4e3636bba121b5593bbf8e6577ca9f2aa04d90b03730ea7fb590e640cdadeb565758b92e81187bc456e693fe37f1f4deace9b9f37556e3ba1
|
||||
PATCHES
|
||||
${STATIC_PATCH}
|
||||
002-detect_sinf.patch
|
||||
003-use-static-cast-for-ctype.patch
|
||||
004-export-pkgconfig.patch # https://github.com/Konstanty/libmodplug/pull/59
|
||||
005-fix-install-paths.patch # https://github.com/Konstanty/libmodplug/pull/61
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
15
externals/vcpkg/ports/libmodplug/vcpkg.json
vendored
Executable file
15
externals/vcpkg/ports/libmodplug/vcpkg.json
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "libmodplug",
|
||||
"version": "0.8.9.0",
|
||||
"port-version": 10,
|
||||
"description": "The ModPlug mod file playing library.",
|
||||
"homepage": "https://github.com/Konstanty/libmodplug",
|
||||
"license": null,
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user