diff --git a/.gitignore b/.gitignore index f1ba163..76f70fa 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ !COPYING !README.md !*.cmake +!*.cmake.in *.local.cmake diff --git a/CMakeGraphVizOptions.cmake.in b/CMakeGraphVizOptions.cmake.in new file mode 100644 index 0000000..ffaa794 --- /dev/null +++ b/CMakeGraphVizOptions.cmake.in @@ -0,0 +1,64 @@ +# This file is part of OpenOrienteering. + +# Copyright 2021 Kai Pastor +# +# Redistribution and use is allowed according to the terms of the BSD license: +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# https://cmake.org/cmake/help/v3.17/module/CMakeGraphVizOptions.html + +set(GRAPHVIZ_GRAPH_NAME Superbuild) + +set(GRAPHVIZ_EXECUTABLES FALSE) +set(GRAPHVIZ_STATIC_LIBS FALSE) +set(GRAPHVIZ_SHARED_LIBS FALSE) +set(GRAPHVIZ_MODULE_LIBS FALSE) +set(GRAPHVIZ_INTERFACE_LIBS FALSE) +set(GRAPHVIZ_OBJECT_LIBS FALSE) +set(GRAPHVIZ_UNKNOWN_LIBS FALSE) +set(GRAPHVIZ_EXTERNAL_LIBS FALSE) +set(GRAPHVIZ_CUSTOM_TARGETS TRUE) + +set(GRAPHVIZ_IGNORE_TARGETS + @GRAPHVIZ_IGNORE_TOOLCHAINS@ + .*-ci + .*-dev + .*-multi-.* + .*-package + .*-patches-.* + .*-source + .*-toolchain + boost.*-bootstrap-.* + CI + common-licenses-.* + doc + iwyu-.* + qt5.*-openorienteering-git + superbuild-graphviz.* + toolchain-info.* +) + +set(GRAPHVIZ_GENERATE_PER_TARGET TRUE) +set(GRAPHVIZ_GENERATE_DEPENDERS TRUE) diff --git a/CMakeLists.txt b/CMakeLists.txt index f3d926f..531a80a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ # This file is part of OpenOrienteering. -# Copyright 2016-2020 Kai Pastor +# Copyright 2016-2021 Kai Pastor # # Redistribution and use is allowed according to the terms of the BSD license: # @@ -27,7 +27,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.10) project(Superbuild C) @@ -76,12 +76,6 @@ list(REMOVE_DUPLICATES SUPERBUILD_HANDLE_ENV) set(SUPERBUILD_STEP_TARGETS "" CACHE STRING "CMake ExternalProject step targets to be created") -if(DEFINED DISABLE_DEPENDENCIES) - message(WARNING "DISABLE_DEPENDENCIES is deprecated, use SUPERBUILD_DISABLE_DEPENDENCIES instead") - set(SUPERBUILD_DISABLE_DEPENDENCIES "${DISABLE_DEPENDENCIES}" CACHE BOOL - "Disable dependencies between binary packages") - unset(DISABLE_DEPENDENCIES CACHE) -endif() set(SUPERBUILD_DISABLE_DEPENDENCIES FALSE CACHE BOOL "Disable dependencies between binary packages") mark_as_advanced(SUPERBUILD_DISABLE_DEPENDENCIES) @@ -99,6 +93,35 @@ set(no_warn_unused # Global utilities +function(_sb_configure_graphviz) + find_program(DOT_EXECUTABLE + NAMES "dot" + DOC "Path of the dot executable from Graphviz" + ) + if(NOT DOT_EXECUTABLE) + return() + endif() + + set(GRAPHVIZ_IGNORE_TOOLCHAINS ) + get_property(toolchains GLOBAL PROPERTY SB_TOOLCHAINS) + foreach(toolchain ${toolchains}) + get_property(system_name TARGET ${toolchain} PROPERTY SB_PACKAGE_SYSTEM_NAME) + list(APPEND GRAPHVIZ_IGNORE_TOOLCHAINS ".*-${system_name}") + endforeach() + configure_file(CMakeGraphVizOptions.cmake.in CMakeGraphVizOptions.cmake @ONLY) + add_custom_target(superbuild-graphviz + COMMAND "${CMAKE_COMMAND}" -E make_directory "graphviz" + COMMAND "${CMAKE_COMMAND}" -E chdir "graphviz" + "${CMAKE_COMMAND}" .. --graphviz=Superbuild.dot + ) + add_custom_target(superbuild-graphviz-pdf + COMMAND "${DOT_EXECUTABLE}" -Tpdf -Grankdir=LR -oSuperbuild.pdf "graphviz/Superbuild.dot" + DEPENDS superbuild-graphviz + ) +endfunction() + + + function(sb_install_dir var system_name) if(DEFINED ${system_name}_INSTALL_DIR) set(${var} "${${system_name}_INSTALL_DIR}" PARENT_SCOPE) @@ -915,8 +938,10 @@ endfunction() # Setup package dependencies function(_sb_resolve_dependencies) set(suffix "${ARGV0}") + get_property(source_packages GLOBAL PROPERTY SB_SOURCE_PACKAGES) get_property(packages GLOBAL PROPERTY SB_PACKAGES) - foreach(package ${packages}) + get_property(aliases GLOBAL PROPERTY SB_ALIASES) + foreach(package ${source_packages} ${packages}) if(NOT TARGET ${package}${suffix}) continue() endif() @@ -942,6 +967,9 @@ function(_sb_resolve_dependencies) string(REGEX REPLACE "^source:" "" real_dependency ${dependency}) set(real_suffix "-source") set(real_package ${package}-source) + if(NOT TARGET ${real_package}) + string(REGEX REPLACE "-source-source$" "-source" real_package ${real_package}) + endif() else() if(SUPERBUILD_DISABLE_DEPENDENCIES) continue() @@ -951,11 +979,22 @@ function(_sb_resolve_dependencies) set(real_package ${package}${suffix}) endif() get_property(default_version GLOBAL PROPERTY SB_DEFAULT_${real_dependency}) + set(dependee NOTFOUND) if(TARGET ${real_dependency}${real_suffix}) - add_dependencies(${real_package} ${real_dependency}${real_suffix}) + set(dependee ${real_dependency}${real_suffix}) elseif(TARGET ${real_dependency}-${default_version}${real_suffix}) - add_dependencies(${real_package} ${real_dependency}-${default_version}${real_suffix}) - elseif(NOT suffix) + set(dependee ${real_dependency}-${default_version}${real_suffix}) + else() + foreach(alias ${aliases}) + if ("${alias}" MATCHES "${real_dependency} ") + string(REPLACE "${real_dependency} " "" dependee "${alias}${real_suffix}") + break() + endif() + endforeach() + endif() + if(dependee) + add_dependencies(${real_package} ${dependee}) + else() message(SEND_ERROR "No rule to satisfy dependency '${dependency}' for package '${package}'") endif() endforeach() @@ -981,6 +1020,7 @@ function(_sb_handle_toolchains) list(APPEND virtual_packages ${package}) endif() endforeach() + set_property(GLOBAL PROPERTY SB_TOOLCHAINS "${toolchains}") foreach(toolchain ${toolchains}) foreach(package ${regular_packages}) _sb_make_toolchained_build(${package} ${toolchain}) @@ -1269,6 +1309,7 @@ function(superbuild_package) SOURCE BUILD PACKAGE + PROVIDES USING EXECUTABLES ) @@ -1306,6 +1347,9 @@ function(superbuild_package) endif() _sb_make_source(${package}) + set(binary_dependencies "${SB_PACKAGE_DEPENDS}") + list(FILTER binary_dependencies EXCLUDE REGEX "^source:.*") + if(DEFINED SB_PACKAGE_BUILD OR "${package}" STREQUAL "toolchain-info") if(TARGET ${package}-source) @@ -1381,28 +1425,41 @@ function(superbuild_package) add_dependencies(${executable}-${SB_PACKAGE_VERSION} ${package}) set(keyword "") endforeach() - elseif(DEFINED SB_PACKAGE_DEPENDS) + elseif(binary_dependencies) add_custom_target(${package}) - else() + elseif(NOT DEFINED SB_PACKAGE_DEPENDS) return() endif() + if(TARGET ${package}) + # Publish package via global properties + set(target ${package}) + set_property(GLOBAL APPEND PROPERTY SB_PACKAGES ${package}) + + string(REPLACE "-" "." version ${SB_PACKAGE_VERSION}) + get_property(default_version GLOBAL PROPERTY SB_DEFAULT_${SB_PACKAGE_NAME}) + string(REPLACE "-" "." default_version "${default_version}") + if(NOT SB_PACKAGE_NO_DEFAULT + AND (NOT default_version + OR version VERSION_GREATER default_version)) + set_property(GLOBAL PROPERTY SB_DEFAULT_${SB_PACKAGE_NAME} ${SB_PACKAGE_VERSION}) + endif() + + # Publish provided aliases + foreach(alias ${SB_PACKAGE_PROVIDES}) + set_property(GLOBAL APPEND PROPERTY SB_ALIASES "${alias} ${package}") + endforeach() + else() + # Publish source package via global properties + set(target ${package}-source) + set_property(GLOBAL APPEND PROPERTY SB_SOURCE_PACKAGES ${target}) + endif() + # Publish package properties - set_property(TARGET ${package} PROPERTY SB_PACKAGE_FILE ${CMAKE_CURRENT_LIST_FILE}) + set_property(TARGET ${target} PROPERTY SB_PACKAGE_FILE ${CMAKE_CURRENT_LIST_FILE}) foreach(arg ${sb_options} ${sb_one_value_args} ${sb_multi_value_args}) - set_property(TARGET ${package} PROPERTY SB_PACKAGE_${arg} ${SB_PACKAGE_${arg}}) + set_property(TARGET ${target} PROPERTY SB_PACKAGE_${arg} ${SB_PACKAGE_${arg}}) endforeach() - - # Publish package via global properties - set_property(GLOBAL APPEND PROPERTY SB_PACKAGES ${package}) - string(REPLACE "-" "." version ${SB_PACKAGE_VERSION}) - get_property(default_version GLOBAL PROPERTY SB_DEFAULT_${SB_PACKAGE_NAME}) - string(REPLACE "-" "." default_version "${default_version}") - if(NOT SB_PACKAGE_NO_DEFAULT - AND (NOT default_version - OR version VERSION_GREATER default_version)) - set_property(GLOBAL PROPERTY SB_DEFAULT_${SB_PACKAGE_NAME} ${SB_PACKAGE_VERSION}) - endif() endfunction() @@ -1417,12 +1474,6 @@ endforeach() add_custom_target(doc SOURCES ${documentation}) add_custom_target(CI SOURCES ${ci}) -# ExternalPackage < 3.8.0 has bug with UPDATE_DISCONNECTED -if(NOT CMAKE_VERSION VERSION_LESS 3.8.0) - option(SUPERBUILD_UPDATE_DISCONNECTED "Skip package update steps" ON) - set_directory_properties(PROPERTIES EP_UPDATE_DISCONNECTED "${SUPERBUILD_UPDATE_DISCONNECTED}") -endif() - _sb_create_main_c() _sb_create_default_toolchain() _sb_create_host_toolchain() @@ -1433,3 +1484,4 @@ _sb_read_packages() _sb_create_toolchain_info() # after package reading, affected by toolchains _sb_resolve_dependencies() _sb_handle_toolchains() +_sb_configure_graphviz() diff --git a/android-toolchain-ndk-r19c.cmake b/android-toolchain-ndk-r19c.cmake index 654320f..66335a6 100644 --- a/android-toolchain-ndk-r19c.cmake +++ b/android-toolchain-ndk-r19c.cmake @@ -118,12 +118,20 @@ else() set(ANDROID_COMPILE_SDK android-28) endif() -if(ANDROID_SDK_ROOT AND ANDROID_NDK_ROOT) - set(sdk_host "") # external SDK and NDK -elseif(APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") +if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + message(FATAL_ERROR "System processor must be x86_64") +elseif(APPLE) set(sdk_host "darwin") -elseif(UNIX AND NOT APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") +elseif(UNIX) set(sdk_host "linux") +elseif(WIN32) + set(sdk_host "windows") # Untested +else() + message(FATAL_ERROR "Unsupported sdk_host") +endif() + +if(sdk_host AND NOT sdk_host STREQUAL "windows") + # Not relying on ANDROID_SDK_ROOT / ANDROID_NDK_ROOT elseif(NOT ANDROID_SDK_ROOT) message(FATAL_ERROR "ANDROID_SDK_ROOT must be set to an external SDK") elseif(NOT ANDROID_NDK_ROOT) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 4adae86..3d134b1 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -1,6 +1,6 @@ # This file is part of OpenOrienteering. -# Copyright 2019-2020 Kai Pastor +# Copyright 2019-2021 Kai Pastor # # Redistribution and use is allowed according to the terms of the BSD license: # @@ -65,6 +65,7 @@ jobs: variables: IMAGE_NAME: 'ubuntu-18.04' SUPERBUILD_INSTALL_DIR: $(HOME)/superbuild + WITH_GRAPHVIZ: true pool: vmImage: '$(IMAGE_NAME)' steps: diff --git a/ci/build.yml b/ci/build.yml index 7a0bb5e..c8142bb 100644 --- a/ci/build.yml +++ b/ci/build.yml @@ -1,6 +1,6 @@ # This file is part of OpenOrienteering. -# Copyright 2019-2020 Kai Pastor +# Copyright 2019-2021 Kai Pastor # # Redistribution and use is allowed according to the terms of the BSD license: # @@ -84,3 +84,14 @@ steps: -- ${{ parameters.buildArgs }} timeoutInMinutes: 210 displayName: 'Build' + +- task: CMake@1 + inputs: + workingDirectory: 'build' + cmakeArgs: > + $(CMAKE_WRAPPING) + --build . + --target superbuild-graphviz-pdf + timeoutInMinutes: 5 + condition: and(succeeded(), in(variables['WITH_GRAPHVIZ'], '1', 'on', 'true', 'yes')) + displayName: 'Generate dependencies documentation' diff --git a/ci/publish.yml b/ci/publish.yml index 096c1e1..3ef68c4 100644 --- a/ci/publish.yml +++ b/ci/publish.yml @@ -1,6 +1,6 @@ # This file is part of OpenOrienteering. -# Copyright 2019 Kai Pastor +# Copyright 2019-2021 Kai Pastor # # Redistribution and use is allowed according to the terms of the BSD license: # @@ -76,3 +76,19 @@ steps: condition: and(succeeded(), in(variables['CREATE_ARTIFACTS'], '1', 'on', 'true', 'yes')) displayName: 'Publish binary artifacts' +- bash: | + set -e + set -x + test -f build/Superbuild.pdf || exit 1 + rm -Rf "${BUILD_ARTIFACTSTAGINGDIRECTORY}/dependencies" + mkdir "${BUILD_ARTIFACTSTAGINGDIRECTORY}/dependencies" + cp build/Superbuild.pdf "${BUILD_ARTIFACTSTAGINGDIRECTORY}/dependencies/" + condition: and(succeeded(), in(variables['WITH_GRAPHVIZ'], '1', 'on', 'true', 'yes')) + displayName: 'Prepare dependencies documentation publishing' + +- task: PublishPipelineArtifact@0 + inputs: + artifactName: 'superbuild-dependencies' + targetPath: $(Build.ArtifactStagingDirectory)/dependencies + condition: and(succeeded(), in(variables['WITH_GRAPHVIZ'], '1', 'on', 'true', 'yes')) + displayName: 'Publish dependencies documentation' diff --git a/giflib-5.1.9.cmake b/giflib-5.1.9.cmake index ae54c84..c99d594 100644 --- a/giflib-5.1.9.cmake +++ b/giflib-5.1.9.cmake @@ -71,6 +71,7 @@ superbuild_package( superbuild_package( NAME giflib VERSION ${patch_version}_${openorienteering_version} + PROVIDES libgif DEPENDS source:giflib-patches-${patch_version} source:giflib-openorienteering-${openorienteering_version} @@ -106,9 +107,3 @@ superbuild_package( > ]] ) - -superbuild_package( - NAME libgif - VERSION ${patch_version} - DEPENDS giflib-${patch_version}_${openorienteering_version} -) diff --git a/libjpeg-turbo-2.0.5.cmake b/libjpeg-turbo-2.0.5.cmake index fbeb694..5b6b5d7 100644 --- a/libjpeg-turbo-2.0.5.cmake +++ b/libjpeg-turbo-2.0.5.cmake @@ -109,6 +109,7 @@ superbuild_package( superbuild_package( NAME libjpeg-turbo VERSION ${patch_version} + PROVIDES libjpeg DEPENDS source:libjpeg-turbo-patches-${patch_version} host:nasm @@ -146,10 +147,3 @@ superbuild_package( "${DESTDIR}${CMAKE_STAGING_PREFIX}/share/doc/copyright/libjpeg-turbo-${patch_version}.txt" ]] ) - -superbuild_package( - NAME libjpeg - VERSION 99-${patch_version}-turbo - DEPENDS - libjpeg-turbo-${patch_version} -) diff --git a/libpng1.6-1.6.37.cmake b/libpng1.6-1.6.37.cmake index a119044..1b02d25 100644 --- a/libpng1.6-1.6.37.cmake +++ b/libpng1.6-1.6.37.cmake @@ -74,6 +74,7 @@ superbuild_package( superbuild_package( NAME libpng1.6 VERSION ${patch_version} + PROVIDES libpng DEPENDS source:libpng1.6-patches-${patch_version} common-licenses @@ -113,9 +114,3 @@ superbuild_package( "${DESTDIR}${CMAKE_STAGING_PREFIX}/share/doc/copyright/libpng1.6-${patch_version}.txt" ]] ) - -superbuild_package( - NAME libpng - VERSION ${patch_version} - DEPENDS libpng1.6 -) diff --git a/libpolyclipping-6.4.2.cmake b/libpolyclipping-6.4.2.cmake index 83c5d39..0d294bf 100644 --- a/libpolyclipping-6.4.2.cmake +++ b/libpolyclipping-6.4.2.cmake @@ -58,12 +58,10 @@ superbuild_package( ) superbuild_package( - NAME libpolyclipping + NAME libpolyclipping-multi VERSION ${patch_version} DEPENDS source:libpolyclipping-patches-${patch_version} - libpolyclipping-cpp-${patch_version} - common-licenses SOURCE URL ${base_url}libpolyclipping_${version}.orig.tar.bz2 @@ -80,18 +78,19 @@ superbuild_package( sed -i -e [[ s/polyclipping ARCHIVE DESTINATION/polyclipping RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}\/bin" ARCHIVE DESTINATION/ ]] cpp/CMakeLists.txt ) -# Build from a copy of the cpp directory, using ExternalPackage's CMake support +# Build from a copy of the cpp directory superbuild_package( - NAME libpolyclipping-cpp + NAME libpolyclipping VERSION ${patch_version} + PROVIDES libpolyclipping DEPENDS - source:libpolyclipping-${patch_version} + source:libpolyclipping-multi-${patch_version} common-licenses SOURCE DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory - /../libpolyclipping-${patch_version}/cpp + /../libpolyclipping-multi-${patch_version}/cpp USING USE_SYSTEM_POLYCLIPPING patch_version version diff --git a/openorienteering-mapper-git.cmake b/openorienteering-mapper-git.cmake index ea343b7..47094fc 100644 --- a/openorienteering-mapper-git.cmake +++ b/openorienteering-mapper-git.cmake @@ -57,11 +57,12 @@ foreach(git_tag ${Mapper_GIT_TAGS}) qtimageformats-${Mapper_GIT_QT_VERSION} qtlocation-${Mapper_GIT_QT_VERSION} qtsensors-${Mapper_GIT_QT_VERSION} - qttools-${Mapper_GIT_QT_VERSION} + qttools-assistant-${Mapper_GIT_QT_VERSION} + qttools-linguist-${Mapper_GIT_QT_VERSION} qttranslations-${Mapper_GIT_QT_VERSION} zlib host:doxygen - host:qttools-${Mapper_GIT_QT_VERSION} + host:qttools-assistant-${Mapper_GIT_QT_VERSION} SOURCE GIT_REPOSITORY https://github.com/OpenOrienteering/mapper.git diff --git a/qt-5.12.10.cmake b/qt-5.12.10.cmake index ffcf10b..931410b 100644 --- a/qt-5.12.10.cmake +++ b/qt-5.12.10.cmake @@ -116,17 +116,11 @@ superbuild_package( set(qtbase_version 5.12.10) set(qtbase_patch_version ${qtbase_version}-1) -superbuild_package( - NAME qtbase - VERSION ${short_version} - DEPENDS - qtbase-everywhere-src-${qtbase_patch_version} -) - set(module Qt5Core) superbuild_package( NAME qtbase-everywhere-src VERSION ${qtbase_patch_version} + PROVIDES qtbase-${short_version} DEPENDS source:qt-${short_version}-openorienteering-${openorienteering_version} freetype @@ -287,16 +281,11 @@ superbuild_package( # qtandroidextras set(qtandroidextras_version ${patch_version}) -superbuild_package( - NAME qtandroidextras - VERSION ${short_version} - DEPENDS qtandroidextras-everywhere-src-${qtandroidextras_version} -) - set(module Qt5AndroidExtras) superbuild_package( NAME qtandroidextras-everywhere-src VERSION ${qtandroidextras_version} + PROVIDES qtandroidextras-${short_version} DEPENDS source:qt-${short_version}-openorienteering-${openorienteering_version} qtbase-${short_version} @@ -324,19 +313,15 @@ superbuild_package( # qtimageformats set(qtimageformats_version ${patch_version}) -superbuild_package( - NAME qtimageformats - VERSION ${short_version} - DEPENDS qtimageformats-everywhere-src-${qtimageformats_version} -) - set(module Qt5Gui) # qtimageformats adds plugins to Qt5Gui superbuild_package( NAME qtimageformats-everywhere-src VERSION ${qtimageformats_version} + PROVIDES qtimageformats-${short_version} DEPENDS source:qt-${short_version}-openorienteering-${openorienteering_version} qtbase-${short_version} + libwebp tiff SOURCE @@ -375,18 +360,11 @@ superbuild_package( # qtlocation set(qtlocation_version ${patch_version}) -superbuild_package( - NAME qtlocation - VERSION ${short_version} - DEPENDS qtlocation-everywhere-src-${qtlocation_version} - libwebp - tiff -) - set(module Qt5Location) superbuild_package( NAME qtlocation-everywhere-src VERSION ${qtlocation_version} + PROVIDES qtlocation-${short_version} DEPENDS source:qt-${short_version}-openorienteering-${openorienteering_version} qtbase-${short_version} @@ -415,17 +393,11 @@ superbuild_package( # qtsensors set(qtsensors_version ${patch_version}) -superbuild_package( - NAME qtsensors - VERSION ${short_version} - DEPENDS - qtsensors-everywhere-src-${qtsensors_version} -) - set(module Qt5Sensors) superbuild_package( NAME qtsensors-everywhere-src VERSION ${qtsensors_version} + PROVIDES qtsensors-${short_version} DEPENDS source:qt-${short_version}-openorienteering-${openorienteering_version} qtbase-${short_version} @@ -453,16 +425,11 @@ superbuild_package( # qtserialport set(qtserialport_version ${patch_version}) -superbuild_package( - NAME qtserialport - VERSION ${short_version} - DEPENDS qtserialport-everywhere-src-${qtserialport_version} -) - set(module Qt5SerialPort) superbuild_package( NAME qtserialport-everywhere-src VERSION ${qtserialport_version} + PROVIDES qtserialport-${short_version} DEPENDS source:qt-${short_version}-openorienteering-${openorienteering_version} qtbase-${short_version} @@ -490,17 +457,13 @@ superbuild_package( # qttools set(qttools_version ${patch_version}) -superbuild_package( - NAME qttools - VERSION ${short_version} - DEPENDS qttools-everywhere-src-${qttools_version} -) - superbuild_package( NAME qttools-everywhere-src VERSION ${qttools_version} + PROVIDES qttools-${short_version} DEPENDS source:qt-${short_version}-openorienteering-${openorienteering_version} + # FIXME: Dependers shall use the sub-packages. qttools-linguist qttools-assistant qttools-qtattributionsscanner @@ -540,6 +503,7 @@ set(module Qt5Help) superbuild_package( NAME qttools-assistant VERSION ${qttools_version} + PROVIDES qttools-assistant-${short_version} DEPENDS qtbase-${short_version} qttools-copyright-${qttools_version} @@ -571,6 +535,7 @@ set(module Qt5LinguistTools) superbuild_package( NAME qttools-linguist VERSION ${qttools_version} + PROVIDES qttools-linguist-${short_version} DEPENDS qtbase-${short_version} qttools-copyright-${qttools_version} @@ -595,6 +560,7 @@ set(module qtattributionsscanner) # dummy superbuild_package( NAME qttools-qtattributionsscanner VERSION ${qttools_version} + PROVIDES qttools-qtattributionsscanner-${short_version} DEPENDS qtbase-${short_version} qttools-copyright-${qttools_version} @@ -620,20 +586,15 @@ superbuild_package( # qttranslations set(qttranslations_version ${patch_version}) -superbuild_package( - NAME qttranslations - VERSION ${short_version} - DEPENDS qttranslations-everywhere-src-${qttranslations_version} -) - set(module Qt5Core) # Can't find qttranslations via CMake. superbuild_package( NAME qttranslations-everywhere-src VERSION ${qttranslations_version} + PROVIDES qttranslations-${short_version} DEPENDS source:qt-${short_version}-openorienteering-${openorienteering_version} qtbase-${short_version} - qttools-${short_version} + qttools-linguist-${short_version} SOURCE URL https://download.qt.io/archive/qt/${short_version}/${version}/submodules/qttranslations-everywhere-src-${version}.tar.xz diff --git a/xz-utils-5.2.4.cmake b/xz-utils-5.2.4.cmake index 0706c6b..eecec9a 100644 --- a/xz-utils-5.2.4.cmake +++ b/xz-utils-5.2.4.cmake @@ -70,6 +70,7 @@ superbuild_package( superbuild_package( NAME xz-utils VERSION ${patch_version} + PROVIDES liblzma DEPENDS source:xz-utils-patches-${patch_version} common-licenses @@ -105,23 +106,7 @@ superbuild_package( "${CMAKE_COMMAND}" -E copy "/../xz-utils-patches-${patch_version}/copyright" "${DESTDIR}${CMAKE_STAGING_PREFIX}/share/doc/copyright/xz-utils-${patch_version}.txt" - ]] -) - -superbuild_package( - NAME liblzma - VERSION ${patch_version} - DEPENDS - xz-utils-${patch_version} - SOURCE - xz-utils-${patch_version} - - USING USE_SYSTEM_LZMA patch_version - BUILD_CONDITION ${test_system_lzma} - BUILD [[ - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND + COMMAND "${CMAKE_COMMAND}" -E copy "/../xz-utils-patches-${patch_version}/copyright" "${DESTDIR}${CMAKE_STAGING_PREFIX}/share/doc/copyright/liblzma-${patch_version}.txt"