diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/collada-dom | |
Diffstat (limited to 'vcpkg/ports/collada-dom')
| -rw-r--r-- | vcpkg/ports/collada-dom/fix-compatibility-with-boost-1.85.patch | 92 | ||||
| -rw-r--r-- | vcpkg/ports/collada-dom/fix-emscripten.patch | 23 | ||||
| -rw-r--r-- | vcpkg/ports/collada-dom/fix-shared-keyword.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/collada-dom/portfile.cmake | 31 | ||||
| -rw-r--r-- | vcpkg/ports/collada-dom/use-uriparser.patch | 127 | ||||
| -rw-r--r-- | vcpkg/ports/collada-dom/use-vcpkg-minizip.patch | 43 | ||||
| -rw-r--r-- | vcpkg/ports/collada-dom/vcpkg.json | 24 | ||||
| -rw-r--r-- | vcpkg/ports/collada-dom/vs-version-detection.patch | 39 |
8 files changed, 392 insertions, 0 deletions
diff --git a/vcpkg/ports/collada-dom/fix-compatibility-with-boost-1.85.patch b/vcpkg/ports/collada-dom/fix-compatibility-with-boost-1.85.patch new file mode 100644 index 0000000..2a87332 --- /dev/null +++ b/vcpkg/ports/collada-dom/fix-compatibility-with-boost-1.85.patch @@ -0,0 +1,92 @@ + dom/include/dae.h | 2 +- + dom/src/dae/daeUtils.cpp | 2 +- + dom/src/dae/daeZAEUncompressHandler.cpp | 2 +- + dom/test/1.4/domTest.cpp | 4 ++-- + dom/test/1.4/domTest.h | 2 +- + dom/test/1.5/domTest.cpp | 4 ++-- + 6 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/dom/include/dae.h b/dom/include/dae.h +index e53388b..a14276a 100644 +--- a/dom/include/dae.h ++++ b/dom/include/dae.h +@@ -25,7 +25,7 @@ + #pragma warning(disable: 4180 4245) + #endif + #ifndef NO_BOOST +-#include <boost/filesystem/convenience.hpp> ++#include <boost/filesystem/operations.hpp> + #endif + #ifdef _MSC_VER + #pragma warning(pop) +diff --git a/dom/src/dae/daeUtils.cpp b/dom/src/dae/daeUtils.cpp +index dc94b5b..156d889 100644 +--- a/dom/src/dae/daeUtils.cpp ++++ b/dom/src/dae/daeUtils.cpp +@@ -18,7 +18,7 @@ + #endif + + #ifndef NO_BOOST +-#include <boost/filesystem/convenience.hpp> // THIS WAS NOT COMMENTED. ++#include <boost/filesystem/operations.hpp> // THIS WAS NOT COMMENTED. + #endif + + #include <cstdio> // for tmpnam +diff --git a/dom/src/dae/daeZAEUncompressHandler.cpp b/dom/src/dae/daeZAEUncompressHandler.cpp +index da2a344..2550000 100644 +--- a/dom/src/dae/daeZAEUncompressHandler.cpp ++++ b/dom/src/dae/daeZAEUncompressHandler.cpp +@@ -271,7 +271,7 @@ bool daeZAEUncompressHandler::checkAndExtractInternalArchive( const std::string& + bool error = false; + + boost::filesystem::path archivePath(filePath); +- std::string dir = archivePath.branch_path().string(); ++ std::string dir = archivePath.parent_path().string(); + + const std::string& randomSegment = cdom::getRandomFileName(); + std::string tmpDir = dir + cdom::getFileSeparator() + randomSegment + cdom::getFileSeparator(); +diff --git a/dom/test/1.4/domTest.cpp b/dom/test/1.4/domTest.cpp +index 28aefa5..ad76358 100644 +--- a/dom/test/1.4/domTest.cpp ++++ b/dom/test/1.4/domTest.cpp +@@ -1543,9 +1543,9 @@ int main(int argc, char* argv[]) { + // Shut the DOM up + daeErrorHandler::setErrorHandler(&quietErrorHandler::getInstance()); + +- dataPath() = (fs::path(argv[0]).branch_path()/"domTestData/").normalize(); ++ dataPath() = (fs::path(argv[0]).parent_path()/"domTestData/").normalize(); + if (!fs::exists(dataPath())) +- dataPath() = (fs::path(argv[0]).branch_path()/"../../test/1.4/data/").normalize(); ++ dataPath() = (fs::path(argv[0]).parent_path()/"../../test/1.4/data/").normalize(); + tmpPath() = dataPath() / "tmp"; + tmpDir tmp(tmpPath(), !leaveTmpFiles); + +diff --git a/dom/test/1.4/domTest.h b/dom/test/1.4/domTest.h +index a531e89..7dbf08c 100644 +--- a/dom/test/1.4/domTest.h ++++ b/dom/test/1.4/domTest.h +@@ -26,7 +26,7 @@ + #pragma warning(push) + #pragma warning(disable: 4180 4245) + #endif +-#include <boost/filesystem/convenience.hpp> ++#include <boost/filesystem/operations.hpp> + #ifdef _MSC_VER + #pragma warning(pop) + #endif +diff --git a/dom/test/1.5/domTest.cpp b/dom/test/1.5/domTest.cpp +index 0ba3449..457c863 100644 +--- a/dom/test/1.5/domTest.cpp ++++ b/dom/test/1.5/domTest.cpp +@@ -1609,9 +1609,9 @@ int main(int argc, char* argv[]) { + // Shut the DOM up + daeErrorHandler::setErrorHandler(&quietErrorHandler::getInstance()); + +- dataPath() = (fs::path(argv[0]).branch_path()/"domTestData/").normalize(); ++ dataPath() = (fs::path(argv[0]).parent_path()/"domTestData/").normalize(); + if (!fs::exists(dataPath())) +- dataPath() = (fs::path(argv[0]).branch_path()/"../../test/1.5/data/").normalize(); ++ dataPath() = (fs::path(argv[0]).parent_path()/"../../test/1.5/data/").normalize(); + tmpPath() = dataPath() / "tmp"; + tmpDir tmp(tmpPath(), !leaveTmpFiles); + diff --git a/vcpkg/ports/collada-dom/fix-emscripten.patch b/vcpkg/ports/collada-dom/fix-emscripten.patch new file mode 100644 index 0000000..ce70df3 --- /dev/null +++ b/vcpkg/ports/collada-dom/fix-emscripten.patch @@ -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); +
\ No newline at end of file diff --git a/vcpkg/ports/collada-dom/fix-shared-keyword.patch b/vcpkg/ports/collada-dom/fix-shared-keyword.patch new file mode 100644 index 0000000..1066622 --- /dev/null +++ b/vcpkg/ports/collada-dom/fix-shared-keyword.patch @@ -0,0 +1,13 @@ +diff --git a/dom/CMakeLists.txt b/dom/CMakeLists.txt
+index 62e1b8a..7ff49b5 100644
+--- a/dom/CMakeLists.txt
++++ b/dom/CMakeLists.txt
+@@ -28,7 +28,7 @@ if( OPT_COLLADA14 )
+ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/1.4 DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} COMPONENT ${COMPONENT_PREFIX}-dev PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE)
+ endif()
+
+-add_library(collada-dom SHARED ${COLLADA_BASE_SOURCES})
++add_library(collada-dom ${COLLADA_BASE_SOURCES})
+ target_link_libraries(collada-dom ${COLLADA_LIBS})
+ set_target_properties(collada-dom PROPERTIES
+ COMPILE_FLAGS "${COLLADA_COMPILE_FLAGS}"
diff --git a/vcpkg/ports/collada-dom/portfile.cmake b/vcpkg/ports/collada-dom/portfile.cmake new file mode 100644 index 0000000..36127e9 --- /dev/null +++ b/vcpkg/ports/collada-dom/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO rdiankov/collada-dom
+ REF d37ae7532e350b87c88712e9f6ab4b1f440d20cd
+ SHA512 cb923d296219765096f5246cc7a2b69712931f58171ae885dbdbd215fca86d911c34d12748d3304d6a5a350dc737ff0caead2495acac488af5431b437cbacc7d
+ HEAD_REF v2.5.0
+ PATCHES
+ vs-version-detection.patch
+ use-uriparser.patch
+ use-vcpkg-minizip.patch
+ fix-shared-keyword.patch
+ fix-emscripten.patch
+ fix-compatibility-with-boost-1.85.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DCMAKE_CXX_STANDARD=11
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/collada_dom-2.5)
+
+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)
+
+vcpkg_fixup_pkgconfig()
diff --git a/vcpkg/ports/collada-dom/use-uriparser.patch b/vcpkg/ports/collada-dom/use-uriparser.patch new file mode 100644 index 0000000..6de0662 --- /dev/null +++ b/vcpkg/ports/collada-dom/use-uriparser.patch @@ -0,0 +1,127 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3ec1527..3f044d3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -237,23 +237,29 @@ else()
+ set(MINIZIP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/dom/external-libs/minizip-1.1 ${ZLIB_INCLUDE_DIR})
+ endif()
+
+-pkg_check_modules(liburiparser liburiparser)
+-
+-if(liburiparser_FOUND)
+- set(liburiparser_CFLAGS_OTHERS "-DUSE_URIPARSER")
++find_package(UriParser)
++if(URIPARSER_FOUND)
++ set(URIPARSER_CFLAGS_OTHERS "-DUSE_URIPARSER")
++ set(URIPARSER_LIBRARIES ${URIPARSER_LIBRARY})
++ message(STATUS "liburiparser found")
+ else()
+- # try using pcrecpp
+- pkg_check_modules(libpcrecpp libpcrecpp)
+- if( libpcrecpp_FOUND )
++ pkg_check_modules(liburiparser liburiparser)
++ if(liburiparser_FOUND)
++ set(URIPARSER_CFLAGS_OTHERS "-DUSE_URIPARSER")
++ message(STATUS "liburiparser found")
++ else()
++ # try using pcrecpp
++ pkg_check_modules(libpcrecpp libpcrecpp)
++ if( libpcrecpp_FOUND )
+ set(CMAKE_REQUIRED_INCLUDES ${libpcrecpp_INCLUDE_DIRS})
+ check_include_file_cxx(pcrecpp.h HAVE_PCRECPP_H)
+ set(CMAKE_REQUIRED_INCLUDES)
+ if( NOT HAVE_PCRECPP_H )
+- set(libpcrecpp_FOUND 0)
++ set(libpcrecpp_FOUND 0)
++ endif()
+ endif()
+- endif()
+
+- if( NOT libpcrecpp_FOUND )
++ if( NOT libpcrecpp_FOUND )
+ message(STATUS "System pcre not found, using local from sources")
+ # include the local pcre
+ add_subdirectory(dom/external-libs/pcre-8.02)
+@@ -262,6 +268,7 @@ else()
+ set(libpcrecpp_LIBRARIES pcrecpp_local)
+ set(libpcrecpp_CFLAGS_OTHERS "-DPCRE_STATIC")
+ set(libpcrecpp_LDFLAGS_OTHERS)
++ endif()
+ endif()
+ endif()
+
+diff --git a/cmake-modules/FindUriParser.cmake b/cmake-modules/FindUriParser.cmake
+new file mode 100644
+index 0000000..91f466b
+--- /dev/null
++++ b/cmake-modules/FindUriParser.cmake
+@@ -0,0 +1,35 @@
++# Find the UriParser library
++# Defines:
++
++# URIPARSER_INCLUDE_DIR - uriparser include directory
++# URIPARSER_LIBRARY - uriparser library file
++# URIPARSER_FOUND - TRUE if uriparser is found
++
++if (URIPARSER_INCLUDE_DIR)
++ #check cache
++ set(URIPARSER_FIND_QUIETLY TRUE)
++endif ()
++
++if (NOT URIPARSER_INCLUDE_DIR)
++ find_path(URIPARSER_INCLUDE_DIR NAMES Uri.h PATH_SUFFIXES uriparser)
++ set(URIPARSER_INCLUDE_DIR ${URIPARSER_INCLUDE_DIR}/uriparser CACHE PATH "uriparser includes")
++endif ()
++
++find_library(URIPARSER_LIBRARY NAMES uriparser)
++
++if (URIPARSER_INCLUDE_DIR AND URIPARSER_LIBRARY)
++ set(URIPARSER_FOUND TRUE)
++ set(UriParser_FOUND TRUE)
++endif ()
++
++if (URIPARSER_FOUND)
++ if (NOT URIPARSER_FIND_QUIETLY)
++ message(STATUS "Found UriParser library: ${URIPARSER_LIBRARY}")
++ endif ()
++else ()
++ if (NOT URIPARSER_FIND_QUIETLY)
++ message(FATAL_ERROR "Could NOT find UriParser library")
++ else ()
++ message(STATUS "Could NOT find UriParser library")
++ endif ()
++endif ()
+diff --git a/dom/CMakeLists.txt b/dom/CMakeLists.txt
+index f7ffb27..62e1b8a 100644
+--- a/dom/CMakeLists.txt
++++ b/dom/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ set(COLLADA_INTERNAL_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/include)
+ include_directories(${COLLADA_INTERNAL_INCLUDE})
+-set(COLLADA_LIBS minizip ${liburiparser_LIBRARIES} ${libpcrecpp_LIBRARIES} ${ZLIB_LIBRARIES} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
++set(COLLADA_LIBS minizip ${URIPARSER_LIBRARIES} ${libpcrecpp_LIBRARIES} ${ZLIB_LIBRARIES} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
+
+ file(GLOB dae_files ${CMAKE_CURRENT_SOURCE_DIR}/src/dae/*.cpp)
+ if( LIBXML2_FOUND )
+@@ -13,7 +13,7 @@ file(GLOB stddatabase_files ${CMAKE_CURRENT_SOURCE_DIR}/src/modules/STLDatabase/
+ file(GLOB stderrplugin_files ${CMAKE_CURRENT_SOURCE_DIR}/src/modules/stdErrPlugin/*.cpp)
+
+ set(COLLADA_BASE_SOURCES ${dae_files} ${libxmlplugin_files} ${stddatabase_files} ${stderrplugin_files})
+-set(COLLADA_COMPILE_FLAGS "${liburiparser_CFLAGS_OTHERS} ${libpcrecpp_CFLAGS_OTHERS} ${EXTRA_COMPILE_FLAGS} ${Boost_CFLAGS}")
++set(COLLADA_COMPILE_FLAGS "${URIPARSER_CFLAGS_OTHERS} ${libpcrecpp_CFLAGS_OTHERS} ${EXTRA_COMPILE_FLAGS} ${Boost_CFLAGS}")
+ # create dynamic libraries
+ set(COLLADA_COMPILE_FLAGS "${COLLADA_COMPILE_FLAGS} -DDOM_DYNAMIC -DDOM_EXPORT")
+
+diff --git a/dom/src/dae/daeURI.cpp b/dom/src/dae/daeURI.cpp
+index 3a8f815..1623753 100644
+--- a/dom/src/dae/daeURI.cpp
++++ b/dom/src/dae/daeURI.cpp
+@@ -790,7 +790,7 @@ bool cdom::parseUriRef(const string& uriRef,
+ scheme = fromRange(uri.scheme);
+ authority = fromRange(uri.hostText);
+ path = fromList(uri.pathHead, "/");
+- if (uri.absolutePath != URI_TRUE and uri.hostText.first == NULL)
++ if (uri.absolutePath != URI_TRUE && uri.hostText.first == NULL)
+ path = path.erase(0, 1);
+ query = fromRange(uri.query);
+ fragment = fromRange(uri.fragment);
diff --git a/vcpkg/ports/collada-dom/use-vcpkg-minizip.patch b/vcpkg/ports/collada-dom/use-vcpkg-minizip.patch new file mode 100644 index 0000000..61a595c --- /dev/null +++ b/vcpkg/ports/collada-dom/use-vcpkg-minizip.patch @@ -0,0 +1,43 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f6c2bb6..3351ab0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -222,7 +222,8 @@ else() + endif() + endif() + +-pkg_check_modules(minizip minizip) ++find_package(minizip NAMES unofficial-minizip REQUIRED) ++add_library(minizip ALIAS unofficial::minizip::minizip) + if(minizip_FOUND) + set(MINIZIP_INCLUDE_DIR ${minizip_INCLUDE_DIRS}) + else() +diff --git a/dom/include/dae/daeZAEUncompressHandler.h b/dom/include/dae/daeZAEUncompressHandler.h +index e9b0e9e..3d120da 100644 +--- a/dom/include/dae/daeZAEUncompressHandler.h ++++ b/dom/include/dae/daeZAEUncompressHandler.h +@@ -9,7 +9,7 @@ + #ifndef __DAE_ZAE_UNCOMPRESS_HANDLER_H__ + #define __DAE_ZAE_UNCOMPRESS_HANDLER_H__ + +-#include <unzip.h> ++#include <../minizip/unzip.h> + #include <libxml/xmlreader.h> + #include <dae/daeURI.h> + +diff --git a/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp b/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp +index 4536275..2666959 100644 +--- a/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp ++++ b/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp +@@ -32,9 +32,9 @@ + #include <iomanip> + using namespace std; + +-#include <zip.h> // for saving compressed files ++#include <../minizip/zip.h> // for saving compressed files + #ifdef _WIN32 +-#include <iowin32.h> ++#include <../minizip/iowin32.h> + #else + #include <unistd.h> + #endif diff --git a/vcpkg/ports/collada-dom/vcpkg.json b/vcpkg/ports/collada-dom/vcpkg.json new file mode 100644 index 0000000..7e0c3d5 --- /dev/null +++ b/vcpkg/ports/collada-dom/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "collada-dom", + "version": "2.5.0", + "port-version": 11, + "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", + "libxml2", + "minizip", + "uriparser", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/vcpkg/ports/collada-dom/vs-version-detection.patch b/vcpkg/ports/collada-dom/vs-version-detection.patch new file mode 100644 index 0000000..7379f33 --- /dev/null +++ b/vcpkg/ports/collada-dom/vs-version-detection.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2596a23..3ec1527 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required (VERSION 2.6.0)
++cmake_minimum_required (VERSION 3.7.0)
+ project (collada-dom)
+ set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE )
+
+@@ -89,14 +89,22 @@ string(TOUPPER ${COMPONENT_PREFIX} COMPONENT_PREFIX_UPPER)
+ set(CPACK_COMPONENTS_ALL ${COMPONENT_PREFIX}-base ${COMPONENT_PREFIX}-dev)
+
+ if( MSVC )
+- if( MSVC70 OR MSVC71 )
+- set(MSVC_PREFIX "vc70")
+- elseif( MSVC80 )
+- set(MSVC_PREFIX "vc80")
+- elseif( MSVC90 )
++ if( MSVC_VERSION GREATER_EQUAL 1910 )
++ set(MSVC_PREFIX "vc140")
++ elseif( MSVC_VERSION GREATER_EQUAL 1900 )
++ set(MSVC_PREFIX "vc130")
++ elseif( MSVC_VERSION GREATER_EQUAL 1800 )
++ set(MSVC_PREFIX "vc120")
++ elseif( MSVC_VERSION GREATER_EQUAL 1700 )
++ set(MSVC_PREFIX "vc110")
++ elseif( MSVC_VERSION GREATER_EQUAL 1600 )
++ set(MSVC_PREFIX "vc100")
++ elseif( MSVC_VERSION GREATER_EQUAL 1500 )
+ set(MSVC_PREFIX "vc90")
++ elseif( MSVC_VERSION GREATER_EQUAL 1400 )
++ set(MSVC_PREFIX "vc80")
+ else()
+- set(MSVC_PREFIX "vc100")
++ set(MSVC_PREFIX "vc70")
+ endif()
+ set(COLLADA_DOM_LIBRARY_SUFFIX "${COLLADA_DOM_SOVERSION}-${COLLADA_PRECISION}-${MSVC_PREFIX}-mt")
+ else()
|