aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Traversaro <silvio.traversaro@iit.it>2020-05-12 00:57:50 +0200
committerGitHub <noreply@github.com>2020-05-11 15:57:50 -0700
commit09b769bf5e8d88efd5a3d062a5144d5bf850c8a6 (patch)
treefff4663895046688be7bc8a9b387b6b2b6a66fda
parenta64cf52dd52a001957a5e6e315cdf7188c2842ca (diff)
downloadvcpkg-09b769bf5e8d88efd5a3d062a5144d5bf850c8a6.tar.gz
vcpkg-09b769bf5e8d88efd5a3d062a5144d5bf850c8a6.zip
[eigen3] [ignition-modularscripts] Fix installed pkgconfig files (#11270)
* [eigen3] Fix generated pkgconfig files * [ignition-cmake2] Update to C++ library Now ignition-cmake also installs a C++ library, so it is possible to remove code specific for CMake-only ports. * [ignition-modularscripts] Fix pkgconfig files installed by ignition libraries Use the new function vcpkg_fixup_pkgconfig to fix the installed .pc pkgconfig files of the ignition libraries. As ignition-fuel-tools1 depends on curl that has a broken pkg-config file, disable installation of its pkg-config files.
-rw-r--r--ports/eigen3/CONTROL2
-rw-r--r--ports/eigen3/portfile.cmake7
-rw-r--r--ports/ignition-cmake2/CONTROL2
-rw-r--r--ports/ignition-cmake2/portfile.cmake6
-rw-r--r--ports/ignition-fuel-tools1/CONTROL2
-rw-r--r--ports/ignition-fuel-tools1/portfile.cmake7
-rw-r--r--ports/ignition-modularscripts/CONTROL2
-rw-r--r--ports/ignition-modularscripts/ignition_modular_library.cmake35
-rw-r--r--ports/ignition-transport4/CONTROL4
-rw-r--r--ports/ignition-transport4/portfile.cmake6
10 files changed, 44 insertions, 29 deletions
diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL
index b612dc881..f76900517 100644
--- a/ports/eigen3/CONTROL
+++ b/ports/eigen3/CONTROL
@@ -1,4 +1,4 @@
Source: eigen3
-Version: 3.3.7-4
+Version: 3.3.7-5
Homepage: http://eigen.tuxfamily.org
Description: C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
diff --git a/ports/eigen3/portfile.cmake b/ports/eigen3/portfile.cmake
index ad8779e75..85b429558 100644
--- a/ports/eigen3/portfile.cmake
+++ b/ports/eigen3/portfile.cmake
@@ -16,20 +16,25 @@ vcpkg_configure_cmake(
PREFER_NINJA
OPTIONS
-DBUILD_TESTING=OFF
+ -DEIGEN_BUILD_PKGCONFIG=ON
OPTIONS_RELEASE
-DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/eigen3
+ -DPKGCONFIG_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib/pkgconfig
OPTIONS_DEBUG
-DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/share/eigen3
+ -DPKGCONFIG_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig
)
vcpkg_install_cmake()
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
file(READ "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" EIGEN_TARGETS)
string(REPLACE "set(_IMPORT_PREFIX " "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}/../..\" ABSOLUTE) #" EIGEN_TARGETS "${EIGEN_TARGETS}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" "${EIGEN_TARGETS}")
+vcpkg_fixup_pkgconfig()
+
file(GLOB INCLUDES ${CURRENT_PACKAGES_DIR}/include/eigen3/*)
# Copy the eigen header files to conventional location for user-wide MSBuild integration
file(COPY ${INCLUDES} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
diff --git a/ports/ignition-cmake2/CONTROL b/ports/ignition-cmake2/CONTROL
index 996dac9bd..8a0ee5414 100644
--- a/ports/ignition-cmake2/CONTROL
+++ b/ports/ignition-cmake2/CONTROL
@@ -1,5 +1,5 @@
Source: ignition-cmake2
-Version: 2.2.0
+Version: 2.2.0-1
Homepage: https://ignitionrobotics.org/libs/cmake
Description: CMake helper functions for building robotic applications
Build-Depends: ignition-modularscripts
diff --git a/ports/ignition-cmake2/portfile.cmake b/ports/ignition-cmake2/portfile.cmake
index 39da65059..a9c895aac 100644
--- a/ports/ignition-cmake2/portfile.cmake
+++ b/ports/ignition-cmake2/portfile.cmake
@@ -6,11 +6,5 @@ ignition_modular_library(NAME cmake
VERSION ${PACKAGE_VERSION}
SHA512 079b6d0cc5e2de83cf01f5731dd4e2e55e18e46c7506b6267a19a230fbbaa7b89053be4b42ca21584cf7fdd64de1d6305c7bc16fa3e0c5751b098fd0e5b98149)
-# Permit empty include folder
-set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
-
-# Remove unneccessary directory, as ignition-cmake is a pure CMake package
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug)
-
# Install custom usage
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)
diff --git a/ports/ignition-fuel-tools1/CONTROL b/ports/ignition-fuel-tools1/CONTROL
index 51909da8a..acabd13df 100644
--- a/ports/ignition-fuel-tools1/CONTROL
+++ b/ports/ignition-fuel-tools1/CONTROL
@@ -1,4 +1,4 @@
Source: ignition-fuel-tools1
-Version: 1.2.0-1
+Version: 1.2.0-2
Build-Depends: curl, ignition-cmake0, ignition-common1, libyaml, libzip, jsoncpp
Description: Tools for using fuel API to download robot models
diff --git a/ports/ignition-fuel-tools1/portfile.cmake b/ports/ignition-fuel-tools1/portfile.cmake
index 1d87aef59..c7c310294 100644
--- a/ports/ignition-fuel-tools1/portfile.cmake
+++ b/ports/ignition-fuel-tools1/portfile.cmake
@@ -1,5 +1,3 @@
-include(vcpkg_common_functions)
-
include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake)
ignition_modular_library(NAME fuel-tools
@@ -7,4 +5,7 @@ ignition_modular_library(NAME fuel-tools
CMAKE_PACKAGE_NAME ignition-fuel_tools1
SHA512 a656fed74fb2138b3bcf7d35b25ad06da95cfb9a3ad7ded2c9c54db385f55ea310fd1a72dcf6400b0a6199e376c1ba2d11ee2a08c66e3c2cc8b2ee1b25406986
# Ensure yaml is correctly linked (backport of https://bitbucket.org/ignitionrobotics/ign-fuel-tools/pull-requests/103/use-yaml_target-instead-of-yaml-yaml/diff)
- PATCHES link-correct-yaml-target.patch)
+ PATCHES link-correct-yaml-target.patch
+ # This can be removed when the pc file of curl is fixed
+ DISABLE_PKGCONFIG_INSTALL
+ )
diff --git a/ports/ignition-modularscripts/CONTROL b/ports/ignition-modularscripts/CONTROL
index 776c16695..4dd2ac418 100644
--- a/ports/ignition-modularscripts/CONTROL
+++ b/ports/ignition-modularscripts/CONTROL
@@ -1,3 +1,3 @@
Source: ignition-modularscripts
-Version: 2020-04-16
+Version: 2020-05-09
Description: Vcpkg helpers to package ignition libraries
diff --git a/ports/ignition-modularscripts/ignition_modular_library.cmake b/ports/ignition-modularscripts/ignition_modular_library.cmake
index c8575978b..8b04d8177 100644
--- a/ports/ignition-modularscripts/ignition_modular_library.cmake
+++ b/ports/ignition-modularscripts/ignition_modular_library.cmake
@@ -1,5 +1,5 @@
-function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH CMAKE_PACKAGE_NAME DEFAULT_CMAKE_PACKAGE_NAME)
+function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH CMAKE_PACKAGE_NAME DEFAULT_CMAKE_PACKAGE_NAME IML_DISABLE_PKGCONFIG_INSTALL)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
@@ -17,11 +17,19 @@ function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH CMAKE_PAC
file(COPY ${CMAKE_RELEASE_FILES} DESTINATION
"${CURRENT_PACKAGES_DIR}/share/${CMAKE_PACKAGE_NAME}/")
-
- # Remove debug files
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
- ${CURRENT_PACKAGES_DIR}/debug/lib/cmake
- ${CURRENT_PACKAGES_DIR}/debug/share)
+ endif()
+
+ # Remove debug files
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
+ ${CURRENT_PACKAGES_DIR}/debug/lib/cmake
+ ${CURRENT_PACKAGES_DIR}/debug/share)
+
+ # Make pkg-config files relocatable
+ if(NOT IML_DISABLE_PKGCONFIG_INSTALL)
+ vcpkg_fixup_pkgconfig()
+ else()
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig
+ ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
endif()
# Find the relevant license file and install it
@@ -44,7 +52,9 @@ endfunction()
## SHA512 <sha512>
## [REF <ref>]
## [HEAD_REF <head_ref>]
-## [PATCHES <patches>])
+## [PATCHES <patches>]
+## [CMAKE_PACKAGE_NAME <cmake_package_name>]
+## [DISABLE_PKGCONFIG_INSTALL])
## ```
##
## ## Parameters:
@@ -72,6 +82,10 @@ endfunction()
## ### CMAKE_PACKAGE_NAME
## The name of the CMake package for the port.
## If not specified, defaults to `ignition-${NAME}${MAJOR_VERSION}`.
+##
+## ### DISABLE_PKGCONFIG_INSTALL
+## If present, disable installation of .pc pkg-config configuration files.
+##
##
## ## Examples:
##
@@ -79,9 +93,10 @@ endfunction()
## * [ignition-math4](https://github.com/Microsoft/vcpkg/blob/master/ports/ignition-math4/portfile.cmake)
## * [ignition-fuel-tools1](https://github.com/Microsoft/vcpkg/blob/master/ports/ignition-fuel-tools1/portfile.cmake)
function(ignition_modular_library)
+ set(options DISABLE_PKGCONFIG_INSTALL)
set(oneValueArgs NAME VERSION SHA512 REF HEAD_REF CMAKE_PACKAGE_NAME)
set(multiValueArgs PATCHES)
- cmake_parse_arguments(IML "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+ cmake_parse_arguments(IML "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
string(REPLACE "." ";" IML_VERSION_LIST ${IML_VERSION})
list(GET IML_VERSION_LIST 0 IML_MAJOR_VERSION)
@@ -101,7 +116,7 @@ function(ignition_modular_library)
if(NOT DEFINED IML_CMAKE_PACKAGE_NAME)
set(IML_CMAKE_PACKAGE_NAME ${DEFAULT_CMAKE_PACKAGE_NAME})
endif()
-
+
# Download library from github, to support also the --head option
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
@@ -113,5 +128,5 @@ function(ignition_modular_library)
)
# Build library
- ignition_modular_build_library(${IML_NAME} ${IML_MAJOR_VERSION} ${SOURCE_PATH} ${IML_CMAKE_PACKAGE_NAME} ${DEFAULT_CMAKE_PACKAGE_NAME})
+ ignition_modular_build_library(${IML_NAME} ${IML_MAJOR_VERSION} ${SOURCE_PATH} ${IML_CMAKE_PACKAGE_NAME} ${DEFAULT_CMAKE_PACKAGE_NAME} ${IML_DISABLE_PKGCONFIG_INSTALL})
endfunction()
diff --git a/ports/ignition-transport4/CONTROL b/ports/ignition-transport4/CONTROL
index e8b98950a..73f2eafd2 100644
--- a/ports/ignition-transport4/CONTROL
+++ b/ports/ignition-transport4/CONTROL
@@ -1,4 +1,4 @@
Source: ignition-transport4
-Version: 4.0.0-1
-Build-Depends: cppzmq, ignition-cmake0, ignition-msgs1, libuuid (!windows&!uwp), protobuf, zeromq
+Version: 4.0.0-2
+Build-Depends: cppzmq, ignition-cmake0, ignition-modularscripts, ignition-msgs1, libuuid (!windows&!uwp), protobuf, zeromq
Description: Transport middleware for robotics
diff --git a/ports/ignition-transport4/portfile.cmake b/ports/ignition-transport4/portfile.cmake
index a9765e2da..cdab5c0a6 100644
--- a/ports/ignition-transport4/portfile.cmake
+++ b/ports/ignition-transport4/portfile.cmake
@@ -1,7 +1,7 @@
-include(vcpkg_common_functions)
-
include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake)
ignition_modular_library(NAME transport
VERSION "4.0.0"
- SHA512 d4125044c21fdd6754f3b8b06f372df3f858080d5d33e97ed7a8ef8f6fb9857d562082aad41c89ea9146a33b1c3814305d33c5c8f8bcde66a16477b4a01655b4)
+ SHA512 d4125044c21fdd6754f3b8b06f372df3f858080d5d33e97ed7a8ef8f6fb9857d562082aad41c89ea9146a33b1c3814305d33c5c8f8bcde66a16477b4a01655b4
+ # This can be removed when the pc file of libuuid on Windows is fixed
+ DISABLE_PKGCONFIG_INSTALL)