[open62541] Update to v1.0 (#9767)

* [open62541] Update to v1.0

* Remove dependency on python-six

* Fix CI

* Manually specify the version

* Fix install binaries directory

* Fix end line

* Add homepage and modernize cmake
This commit is contained in:
yurybura 2020-01-21 23:25:05 +03:00 committed by Victor Romero
parent 9b901bf801
commit 127d497681
4 changed files with 26 additions and 52 deletions

View File

@ -1,3 +1,4 @@
Source: open62541
Version: 0.3.0-4
Version: 1.0
Homepage: https://open62541.org
Description: open62541 is an open source C (C99) implementation of OPC UA licensed under the Mozilla Public License v2.0.

View File

@ -0,0 +1,16 @@
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d426e1da..09589b6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1151,7 +1151,7 @@ install(TARGETS open62541
EXPORT open62541Targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION include)
if(UA_ENABLE_AMALGAMATION)

View File

@ -1,77 +1,35 @@
include(vcpkg_common_functions)
vcpkg_fail_port_install(ON_TARGET "UWP")
if(NOT CMAKE_HOST_WIN32)
message("${PORT} currently requires the following tools from the system package manager:\n python-six\n\nThis can be installed on Ubuntu systems via apt-get install python-six python3-six (depending on your current python default interpreter)")
endif()
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP")
endif()
set(VERSION v1.0)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO open62541/open62541
REF v0.3.0
SHA512 67766d226e1b900c0c37309099ecdbe987d10888ebf43f9066b21cf79f64d34e6ac30c2671a4901892f044859da4e8dbaa9fed5a49c633f73fef3bec75774050
REF ${VERSION}
SHA512 a1cc614147ee7fc0b4246abb0dd1a3405e330760c1d9d76980700853f136f7562690906cb428bae81232355d03f27c1cdc71da85e23e0cf16167f42d4faff93b
HEAD_REF master
PATCHES fix-install-bindir.patch
)
file(READ ${SOURCE_PATH}/CMakeLists.txt OPEN62541_CMAKELISTS)
string(REPLACE
"RUNTIME DESTINATION \${CMAKE_INSTALL_PREFIX}"
"RUNTIME DESTINATION \${BIN_INSTALL_DIR}"
OPEN62541_CMAKELISTS "${OPEN62541_CMAKELISTS}")
file(WRITE ${SOURCE_PATH}/CMakeLists.txt "${OPEN62541_CMAKELISTS}")
if(CMAKE_HOST_WIN32)
set(EXECUTABLE_SUFFIX ".exe")
else()
set(EXECUTABLE_SUFFIX "")
endif()
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path("${PYTHON3_DIR}")
if(CMAKE_HOST_WIN32)
# Must not modify system copy of python3 -- on CMAKE_HOST_WIN32, we have our own private copy
if(NOT EXISTS ${PYTHON3_DIR}/easy_install${EXECUTABLE_SUFFIX})
if(NOT EXISTS ${PYTHON3_DIR}/Scripts/pip${EXECUTABLE_SUFFIX})
get_filename_component(PYTHON3_DIR_NAME "${PYTHON3_DIR}" NAME)
vcpkg_download_distfile(GET_PIP
URLS "https://bootstrap.pypa.io/3.3/get-pip.py"
FILENAME "tools/python/${PYTHON3_DIR_NAME}/get-pip.py"
SHA512 92e68525830bb23955a31cb19ebc3021ef16b6337eab83d5db2961b791283d2867207545faf83635f6027f2f7b7f8fee2c85f2cfd8e8267df25406474571c741
)
execute_process(COMMAND ${PYTHON3_DIR}/python${EXECUTABLE_SUFFIX} ${GET_PIP})
endif()
execute_process(COMMAND ${PYTHON3_DIR}/Scripts/pip${EXECUTABLE_SUFFIX} install six)
else()
execute_process(COMMAND ${PYTHON3_DIR}/easy_install${EXECUTABLE_SUFFIX} six)
endif()
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBIN_INSTALL_DIR:STRING=bin
-DOPEN62541_VERSION=${VERSION}
OPTIONS_DEBUG
-DCMAKE_DEBUG_POSTFIX=d
)
vcpkg_install_cmake()
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT})
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
else()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
endif()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/open62541/tools)
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1196,7 +1196,6 @@ ompl:x64-osx=fail
ompl:x64-linux=ignore
open62541:arm-uwp=fail
open62541:x64-uwp=fail
open62541:x64-osx=fail
openal-soft:arm-uwp=fail
openal-soft:x64-uwp=fail
openblas:arm64-windows=fail