[qt5-location] Rename vendored libs to avoid conflicts (#13451)

* [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 <stesinigardi@hotmail.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
This commit is contained in:
ras0219 2020-09-26 05:10:38 -07:00 коммит произвёл GitHub
Родитель 95638456fa
Коммит 501e44e02c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
12 изменённых файлов: 103 добавлений и 258 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -1,111 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4cb6927..d642832 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -352,7 +352,7 @@ IF (NOT TARGET uninstall)
ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
ENDIF()
-IF(HUNTER_ENABLED)
+IF(HUNTER_ENABLED OR 1)
set(CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}")
set(INCLUDE_INSTALL_DIR "include")
@@ -389,7 +389,7 @@ IF(HUNTER_ENABLED)
NAMESPACE "${NAMESPACE}"
DESTINATION "${CONFIG_INSTALL_DIR}"
)
-ELSE(HUNTER_ENABLED)
+ELSE()
# cmake configuration files
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" @ONLY IMMEDIATE)
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets.cmake" @ONLY IMMEDIATE)
@@ -412,7 +412,7 @@ ELSE(HUNTER_ENABLED)
"${CMAKE_CURRENT_BINARY_DIR}/assimpTargets.cmake"
${PACKAGE_TARGETS_FILE}
DESTINATION "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}" COMPONENT ${LIBASSIMP-DEV_COMPONENT})
-ENDIF(HUNTER_ENABLED)
+ENDIF()
FIND_PACKAGE( DirectX )
diff --git a/cmake/assimp-hunter-config.cmake.in b/cmake/assimp-hunter-config.cmake.in
index 34762ac..ec1f554 100644
--- a/cmake/assimp-hunter-config.cmake.in
+++ b/cmake/assimp-hunter-config.cmake.in
@@ -1,14 +1,8 @@
@PACKAGE_INIT@
find_package(RapidJSON CONFIG REQUIRED)
-find_package(ZLIB CONFIG REQUIRED)
-find_package(utf8 CONFIG REQUIRED)
-find_package(irrXML CONFIG REQUIRED)
+find_package(ZLIB REQUIRED)
find_package(minizip CONFIG REQUIRED)
-find_package(openddlparser CONFIG REQUIRED)
-find_package(poly2tri CONFIG REQUIRED)
-find_package(polyclipping CONFIG REQUIRED)
-find_package(zip CONFIG REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")
diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt
index 8e14fcf..91a3a7b 100644
--- a/code/CMakeLists.txt
+++ b/code/CMakeLists.txt
@@ -676,7 +676,7 @@ SET( PostProcessing_SRCS
)
SOURCE_GROUP( PostProcessing FILES ${PostProcessing_SRCS})
-SET( IrrXML_SRCS ${HEADER_PATH}/irrXMLWrapper.h )
+SET( IrrXML_SRCS ${PROJECT_SOURCE_DIR}/contrib/irrXML/irrXML.cpp ${HEADER_PATH}/irrXMLWrapper.h )
SOURCE_GROUP( IrrXML FILES ${IrrXML_SRCS})
ADD_ASSIMP_IMPORTER( Q3D
@@ -1125,7 +1125,7 @@ IF(HUNTER_ENABLED)
zip::zip
)
ELSE(HUNTER_ENABLED)
- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} minizip::minizip)
+ TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} minizip::minizip)
ENDIF(HUNTER_ENABLED)
if(ASSIMP_ANDROID_JNIIOSYSTEM)
@@ -1222,7 +1222,7 @@ IF (RT_FOUND AND ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC)
TARGET_LINK_LIBRARIES(assimp ${RT_LIBRARY})
ENDIF (RT_FOUND AND ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC)
-IF(HUNTER_ENABLED)
+IF(HUNTER_ENABLED OR 1)
INSTALL( TARGETS assimp
EXPORT "${TARGETS_EXPORT_NAME}"
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
@@ -1231,14 +1231,14 @@ IF(HUNTER_ENABLED)
FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
COMPONENT ${LIBASSIMP_COMPONENT}
INCLUDES DESTINATION "include")
-ELSE(HUNTER_ENABLED)
+ELSE()
INSTALL( TARGETS assimp
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR}
FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
COMPONENT ${LIBASSIMP_COMPONENT})
-ENDIF(HUNTER_ENABLED)
+ENDIF()
INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev)
INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev)
diff --git a/contrib/irrXML/CMakeLists.txt b/contrib/irrXML/CMakeLists.txt
index 7f58af3..6d4b41e 100644
--- a/contrib/irrXML/CMakeLists.txt
+++ b/contrib/irrXML/CMakeLists.txt
@@ -21,6 +21,7 @@ ENDIF()
set(IRRXML_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "IrrXML_Include" )
set(IRRXML_LIBRARY "IrrXML" CACHE INTERNAL "IrrXML" )
+return()
install(TARGETS IrrXML
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR}

Просмотреть файл

@ -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:

Просмотреть файл

@ -6,6 +6,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
build_fixes.patch
irrlicht.patch
)
file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake)
@ -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)

Просмотреть файл

@ -1,56 +0,0 @@
cmake_minimum_required(VERSION 3.2)
project(irrXML)
enable_language(CXX)
set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed")
set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed")
set(INSTALL_INCLUDE_DIR "include" CACHE PATH "Path where headers will be installed")
set(INSTALL_CMAKE_DIR "share/irrxml" CACHE PATH "Path where cmake configs will be installed")
# Make relative paths absolute (needed later on)
set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR})
foreach(p LIB BIN INCLUDE CMAKE)
set(var INSTALL_${p}_DIR)
if(NOT IS_ABSOLUTE "${${var}}")
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
endforeach()
set(SOURCES
${CMAKE_CURRENT_LIST_DIR}/src/CXMLReaderImpl.h
${CMAKE_CURRENT_LIST_DIR}/src/fast_atof.h
${CMAKE_CURRENT_LIST_DIR}/src/heapsort.h
${CMAKE_CURRENT_LIST_DIR}/src/irrArray.h
${CMAKE_CURRENT_LIST_DIR}/src/irrString.h
${CMAKE_CURRENT_LIST_DIR}/src/irrTypes.h
${CMAKE_CURRENT_LIST_DIR}/src/irrXML.cpp
${CMAKE_CURRENT_LIST_DIR}/src/irrXML.h
)
add_library(${CMAKE_PROJECT_NAME} ${SOURCES})
if(MSVC)
target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE _SCL_SECURE_NO_WARNINGS)
target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS)
endif(MSVC)
if (WIN32 AND BUILD_SHARED_LIBS)
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES PUBLIC_HEADER src/irrXML.h)
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:${RELATIVE_INSTALL_INCLUDE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src>)
install(TARGETS ${CMAKE_PROJECT_NAME} EXPORT ${CMAKE_PROJECT_NAME}Targets
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}"
COMPONENT dev
)
install(EXPORT ${CMAKE_PROJECT_NAME}Targets
FILE ${CMAKE_PROJECT_NAME}Config.cmake
NAMESPACE ${CMAKE_PROJECT_NAME}::
DESTINATION "${INSTALL_CMAKE_DIR}"
)

Просмотреть файл

@ -1,20 +0,0 @@
--- a/src/irrTypes.h
+++ b/src/irrTypes.h
@@ -79,17 +79,13 @@ typedef unsigned short wchar_t;
#endif // microsoft compiler
//! define a break macro for debugging only in Win32 mode.
-#if defined(WIN32) && defined(_MSC_VER) && defined(_DEBUG)
-#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3}
-#else
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ )
-#endif
//! Defines a small statement to work around a microsoft compiler bug.
/** The microsft compiler 7.0 - 7.1 has a bug:
When you call unmanaged code that returns a bool type value of false from managed code,
the return value may appear as true. See
http://support.microsoft.com/default.aspx?kbid=823071 for details.
Compiler version defines: VC6.0 : 1200, VC7.0 : 1300, VC7.1 : 1310, VC8.0 : 1400*/
#if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER > 1299) && (_MSC_VER < 1400)
#define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX __asm mov eax,100

Просмотреть файл

@ -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)

Просмотреть файл

@ -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"
]
}

Просмотреть файл

@ -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

Просмотреть файл

@ -1,39 +0,0 @@
diff --git a/src/3rdparty/clip2tri/clip2tri.pro b/src/3rdparty/clip2tri/clip2tri.pro
index 802c040..3545025 100644
--- a/src/3rdparty/clip2tri/clip2tri.pro
+++ b/src/3rdparty/clip2tri/clip2tri.pro
@@ -18,5 +18,5 @@ gcc {
HEADERS += clip2tri.h
SOURCES += clip2tri.cpp
-LIBS_PRIVATE += -L$$MODULE_BASE_OUTDIR/lib -lpoly2tri$$qtPlatformTargetSuffix() -lclipper$$qtPlatformTargetSuffix()
+LIBS_PRIVATE += -L$$MODULE_BASE_OUTDIR/lib -lpoly2tri$$qtPlatformTargetSuffix() -lqtclipper$$qtPlatformTargetSuffix()
diff --git a/src/3rdparty/clipper/clipper.pro b/src/3rdparty/clipper/clipper.pro
index 874d55c..5abedf5 100644
--- a/src/3rdparty/clipper/clipper.pro
+++ b/src/3rdparty/clipper/clipper.pro
@@ -1,4 +1,4 @@
-TARGET = clipper
+TARGET = qtclipper
CONFIG += staticlib exceptions warn_off optimize_full
diff --git a/src/src.pro b/src/src.pro
index 417e227..612748e 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -6,10 +6,10 @@ include($$OUT_PWD/positioning/qtpositioning-config.pri)
clip2tri.subdir = 3rdparty/clip2tri
poly2tri.subdir = 3rdparty/poly2tri
-clipper.subdir = 3rdparty/clipper
+qtclipper.subdir = 3rdparty/clipper
-SUBDIRS += clip2tri clipper poly2tri
-clip2tri.depends = clipper poly2tri
+SUBDIRS += clip2tri qtclipper poly2tri
+clip2tri.depends = qtclipper poly2tri
SUBDIRS += positioning
positioning.depends = clip2tri

Просмотреть файл

@ -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}")

Просмотреть файл

@ -56,7 +56,7 @@ function(vcpkg_download_distfile VAR)
set(options SKIP_SHA512 SILENT_EXIT QUIET)
set(oneValueArgs FILENAME SHA512)
set(multipleValuesArgs URLS HEADERS)
cmake_parse_arguments(vcpkg_download_distfile "${options}" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN})
cmake_parse_arguments(PARSE_ARGV 1 vcpkg_download_distfile "${options}" "${oneValueArgs}" "${multipleValuesArgs}")
if(NOT DEFINED vcpkg_download_distfile_URLS)
message(FATAL_ERROR "vcpkg_download_distfile requires a URLS argument.")
@ -164,7 +164,7 @@ function(vcpkg_download_distfile VAR)
list(APPEND request_headers HTTPHEADER ${header})
endforeach()
endif()
file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status ${request_headers})
file(DOWNLOAD "${url}" "${download_file_path_part}" STATUS download_status ${request_headers})
list(GET download_status 0 status_code)
if (NOT "${status_code}" STREQUAL "0")
message(STATUS "Downloading ${url}... Failed. Status: ${download_status}")