mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 00:29:56 +08:00
[collada-dom] fix emscripten build (#29562)
* add patch * . * update-hash * fix * reformat * fix hash * remove-patch-prefix * upd-hash * upd * . * Update ports/collada-dom/portfile.cmake Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> * Update ports/collada-dom/portfile.cmake Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> * Update ports/collada-dom/portfile.cmake Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> * Update ports/collada-dom/vcpkg.json Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> * Update collada-dom.json * Update collada-dom.json * fix --------- Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com>
This commit is contained in:
parent
371892cc20
commit
a65000bd39
23
ports/collada-dom/fix-emscripten.patch
Normal file
23
ports/collada-dom/fix-emscripten.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff --git a/dom/src/dae/daeUtils.cpp b/dom/src/dae/daeUtils.cpp
|
||||
index 7e3dc9a..dc94b5b 100644
|
||||
--- a/dom/src/dae/daeUtils.cpp
|
||||
+++ b/dom/src/dae/daeUtils.cpp
|
||||
@@ -152,7 +152,7 @@ char cdom::getFileSeparator() {
|
||||
const string& cdom::getSystemTmpDir() {
|
||||
#ifdef WIN32
|
||||
static string tmpDir = string(getenv("TMP")) + getFileSeparator();
|
||||
-#elif defined(__linux__) || defined(__linux)
|
||||
+#elif defined(__linux__) || defined(__linux) || defined(__EMSCRIPTEN__)
|
||||
static string tmpDir = "/tmp/";
|
||||
#elif defined __APPLE_CC__
|
||||
static string tmpDir = string(getenv("TMPDIR"));
|
||||
@@ -171,7 +171,7 @@ string cdom::getRandomFileName() {
|
||||
std::string tmp(tmpnam(&tmpbuffer[0]));
|
||||
#ifdef WIN32
|
||||
randomSegment = tmp.substr(tmp.find_last_of('\\')+1);
|
||||
-#elif defined(__linux__) || defined(__linux)
|
||||
+#elif defined(__linux__) || defined(__linux) || defined(__EMSCRIPTEN__)
|
||||
randomSegment = tmp.substr(tmp.find_last_of('/')+1);
|
||||
#elif defined __APPLE_CC__
|
||||
randomSegment = tmp.substr(tmp.find_last_of('/')+1);
|
||||
|
@ -9,20 +9,20 @@ vcpkg_from_github(
|
||||
use-uriparser.patch
|
||||
use-vcpkg-minizip.patch
|
||||
fix-shared-keyword.patch
|
||||
fix-emscripten.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/collada_dom-2.5)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/collada_dom-2.5)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/licenses/license_e.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/licenses/license_e.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
@ -1,9 +1,10 @@
|
||||
{
|
||||
"name": "collada-dom",
|
||||
"version-string": "2.5.0",
|
||||
"port-version": 6,
|
||||
"version": "2.5.0",
|
||||
"port-version": 7,
|
||||
"description": "The COLLADA Document Object Model (DOM) is an application programming interface (API) that provides a C++ object representation of a COLLADA XML instance document.",
|
||||
"homepage": "https://github.com/rdiankov/collada-dom",
|
||||
"license": null,
|
||||
"dependencies": [
|
||||
"boost-filesystem",
|
||||
"boost-system",
|
||||
@ -11,6 +12,14 @@
|
||||
"minizip",
|
||||
"pcre",
|
||||
"uriparser",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
]
|
||||
}
|
||||
|
@ -1606,7 +1606,7 @@
|
||||
},
|
||||
"collada-dom": {
|
||||
"baseline": "2.5.0",
|
||||
"port-version": 6
|
||||
"port-version": 7
|
||||
},
|
||||
"colmap": {
|
||||
"baseline": "2022-03-14",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1e2fef9034d7819a290b57709aa115628cede76a",
|
||||
"version": "2.5.0",
|
||||
"port-version": 7
|
||||
},
|
||||
{
|
||||
"git-tree": "c33581459a51d5ef7cc436a8aebb9d330224a6f3",
|
||||
"version-string": "2.5.0",
|
||||
|
Loading…
Reference in New Issue
Block a user