Skip to content

Commit

Permalink
[qt5-location] Rename vendored libs to avoid conflicts (microsoft#13451)
Browse files Browse the repository at this point in the history
* [qt5-location] Rename vendored libs to avoid conflicts

* [qt5-location] Use upstream patch

* [qt5-location] Replace / in patch url with %2F

* Update ports/qt5-location/CONTROL

* [assimp][irrxml] Remove outdated version of irrxml; redirect assimp at newer irrlicht

* [assimp] Apply skipped patch irrlicht.patch

Co-authored-by: Stefano Sinigardi <[email protected]>
Co-authored-by: Robert Schumacher <[email protected]>
Co-authored-by: Jack·Boos·Yu <[email protected]>
  • Loading branch information
4 people authored Sep 26, 2020
1 parent 9563845 commit 501e44e
Show file tree
Hide file tree
Showing 12 changed files with 103 additions and 258 deletions.
4 changes: 2 additions & 2 deletions ports/assimp/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: assimp
Version: 5.0.1
Port-Version: 1
Port-Version: 2
Homepage: https://github.com/assimp/assimp
Description: The Open Asset import library
Build-Depends: zlib, rapidjson, minizip, stb, kubazip, irrxml, polyclipping, utfcpp, poly2tri
Build-Depends: zlib, rapidjson, minizip, stb, kubazip, irrlicht, polyclipping, utfcpp, poly2tri
111 changes: 0 additions & 111 deletions ports/assimp/config.patch

This file was deleted.

82 changes: 82 additions & 0 deletions ports/assimp/irrlicht.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ec072d..3c8b5ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -132,7 +132,6 @@ OPTION ( IGNORE_GIT_HASH

find_package(Stb REQUIRED)
include_directories(${Stb_INCLUDE_DIR})
-find_package(irrXML CONFIG REQUIRED)
find_path(UTF8_INCLUDE_DIRS "utf8.h")
include_directories(${UTF8_INCLUDE_DIRS})
find_package(RapidJSON CONFIG REQUIRED)
@@ -389,7 +388,7 @@ ENDIF( BUILD_DOCS )

# Look for system installed irrXML
IF ( SYSTEM_IRRXML )
- FIND_PACKAGE( irrXML REQUIRED )
+ FIND_PACKAGE( irrlicht CONFIG REQUIRED )
ENDIF( SYSTEM_IRRXML )

# Search for external dependencies, and build them from source if not found
diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt
index 17fcea7..f08f59f 100644
--- a/code/CMakeLists.txt
+++ b/code/CMakeLists.txt
@@ -862,7 +862,7 @@ SET( Extra_SRCS
SOURCE_GROUP( Extra FILES ${Extra_SRCS})

# irrXML
- find_package(irrXML CONFIG REQUIRED)
+ find_package(irrlicht CONFIG REQUIRED)

# polyclipping
find_package(polyclipping CONFIG REQUIRED)
@@ -1033,7 +1033,7 @@ TARGET_INCLUDE_DIRECTORIES ( assimp PUBLIC

TARGET_LINK_LIBRARIES(assimp
polyclipping::polyclipping
- irrXML::irrXML
+ Irrlicht
minizip::minizip
ZLIB::ZLIB
kubazip::kubazip
diff --git a/code/X3D/FIReader.cpp b/code/X3D/FIReader.cpp
index 31d9aba..2c96052 100644
--- a/code/X3D/FIReader.cpp
+++ b/code/X3D/FIReader.cpp
@@ -654,8 +654,8 @@ public:
return currentNodeType;
}

- virtual int getAttributeCount() const /*override*/ {
- return static_cast<int>(attributes.size());
+ virtual unsigned int getAttributeCount() const /*override*/ {
+ return static_cast<unsigned int>(attributes.size());
}

virtual const char* getAttributeName(int idx) const /*override*/ {
@@ -1733,7 +1733,7 @@ public:
return reader->getNodeType();
}

- virtual int getAttributeCount() const /*override*/ {
+ virtual unsigned int getAttributeCount() const /*override*/ {
return reader->getAttributeCount();
}

diff --git a/include/assimp/irrXMLWrapper.h b/include/assimp/irrXMLWrapper.h
index 77cfd5e..ba584a0 100644
--- a/include/assimp/irrXMLWrapper.h
+++ b/include/assimp/irrXMLWrapper.h
@@ -133,8 +133,8 @@ public:

// ----------------------------------------------------------------------------------
//! Returns size of file in bytes
- virtual int getSize() {
- return (int)data.size();
+ virtual long getSize() const override {
+ return (long)data.size();
}

private:
3 changes: 2 additions & 1 deletion ports/assimp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
build_fixes.patch
irrlicht.patch
)

file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake)
Expand Down Expand Up @@ -49,7 +50,7 @@ file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/AssimpConfig.cmake ASSIMP_CONFIG)
file(WRITE ${CURRENT_PACKAGES_DIR}/share/assimp/AssimpConfig.cmake "
include(CMakeFindDependencyMacro)
find_dependency(ZLIB)
find_dependency(irrXML CONFIG)
find_dependency(irrlicht CONFIG)
find_dependency(polyclipping CONFIG)
find_dependency(minizip CONFIG)
find_dependency(kubazip CONFIG)
Expand Down
56 changes: 0 additions & 56 deletions ports/irrxml/CMakeLists.txt

This file was deleted.

20 changes: 0 additions & 20 deletions ports/irrxml/disable_asm_calls.patch

This file was deleted.

23 changes: 1 addition & 22 deletions ports/irrxml/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,22 +1 @@
vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
REPO irrlicht/irrXML%20SDK
REF 1.2
FILENAME irrxml-1.2.zip
SHA512 b6a7f76305c6d1e74a66bc182bd260428b9aa0b1db444f79de56095a7d39e320429756329202b44d3159f6b4d9ff13b7ebb6b88ca3d087f09c3a4a3a0ce08995
PATCHES
disable_asm_calls.patch
)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
8 changes: 5 additions & 3 deletions ports/irrxml/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "irrxml",
"version-string": "1.2",
"description": "XML library from IRRLICHT Enging",
"homepage": "http://irrlicht.sourceforge.net"
"version-string": "0",
"description": "Alias port for irrlicht",
"dependencies": [
"irrlicht"
]
}
2 changes: 1 addition & 1 deletion ports/qt5-location/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: qt5-location
Version: 5.15.0
Port-Version: 1
Port-Version: 2
Description: Qt5 Location Module - Displays map, navigation, and place content in a QML application.
Build-Depends: qt5-base[core], qt5-declarative, qt5-quickcontrols, qt5-quickcontrols2, qt5-serialport
39 changes: 0 additions & 39 deletions ports/qt5-location/clipper.patch

This file was deleted.

9 changes: 8 additions & 1 deletion ports/qt5-location/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
vcpkg_download_distfile(
PATCH
URLS "https://codereview.qt-project.org/gitweb?p=qt%2Fqtlocation.git;a=commitdiff_plain;h=6b2cf7e9d150b7be709fcd688c5045949cedc3d9;hp=7769ea903f87efc4ad55530a2749f104eddff2e4"
SHA512 99d16fb0e88a2250de3896815abbb22ff5aa4d3920397610cf37be701fe03a7241e0586aae5b85755aeb958926183c96a0482a8837335d20a2171ebb2a66e640
FILENAME qt5-location-rename-99d16fb0.patch
)

message(STATUS "${PORT} has a spurious failure in which it is unable to create a parent directory! Just retry.")
include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake)
qt_submodule_installation(PATCHES clipper.patch)
qt_submodule_installation(PATCHES "${PATCH}")
Loading

0 comments on commit 501e44e

Please sign in to comment.