Skip to content

Commit

Permalink
Update ports (#1005)
Browse files Browse the repository at this point in the history
* LLVM to 15.0.7
* z3 to 4.12.0
* vcpkg to latest 2023.01.09
  • Loading branch information
ekilmer authored Jan 15, 2023
1 parent 2adea3b commit d77dd7b
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 6 deletions.
7 changes: 6 additions & 1 deletion build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,18 @@ if [[ ${UPGRADE_PORTS} == "true" ]]; then
) || exit 1
fi

dep_file='@dependencies.txt'
if [ ! -f "${repo_dir}/dependencies.txt" ] ; then
dep_file=''
fi

# Run the vcpkg installation of our packages
(
cd "${repo_dir}"
(
set -x

"${vcpkg_dir}/vcpkg" install "${extra_vcpkg_args[@]}" '@overlays.txt' '@dependencies.txt' "${VCPKG_ARGS[@]}"
"${vcpkg_dir}/vcpkg" install "${extra_vcpkg_args[@]}" '@overlays.txt' "${dep_file}" "${VCPKG_ARGS[@]}"
)
) || exit 1

Expand Down
4 changes: 2 additions & 2 deletions ports/llvm-15/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
set(LLVM_VERSION "15.0.6")
set(LLVM_VERSION "15.0.7")

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO llvm/llvm-project
REF llvmorg-${LLVM_VERSION}
SHA512 070944b322d8629986ec40d01c2c9bbd0da32c929b60133209e08c284346c8631a34d5b7833f71733aa3979f321f0f7450c42a35740340f414606a4e5849dbe3
SHA512 99beff9ee6f8c26f16ea53f03ba6209a119099cbe361701b0d5f4df9d5cc5f2f0da7c994c899a4cec876da8428564dc7a8e798226a9ba8b5c18a3ef8b181d39e
HEAD_REF release/15.x
PATCHES
0001-Fix-install-paths.patch # This patch fixes paths in ClangConfig.cmake, LLVMConfig.cmake, LLDConfig.cmake etc.
Expand Down
3 changes: 1 addition & 2 deletions ports/llvm-15/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "llvm-15",
"version": "15.0.6",
"port-version": 4,
"version": "15.0.7",
"description": "The LLVM Compiler Infrastructure.",
"homepage": "https://llvm.org",
"license": "Apache-2.0",
Expand Down
23 changes: 23 additions & 0 deletions ports/z3/fix-install-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e8de0c7e4..064c18eab 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -173,6 +173,7 @@ install(TARGETS libz3
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" # On Windows this installs ``libz3.lib`` which CMake calls the "corresponding import library". Do we want this installed?
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" # For Windows. DLLs are runtime targets for CMake
+ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" # For MACOSX.
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)

diff --git a/src/shell/CMakeLists.txt b/src/shell/CMakeLists.txt
index 278246341..b6cd2f1c1 100644
--- a/src/shell/CMakeLists.txt
+++ b/src/shell/CMakeLists.txt
@@ -44,5 +44,5 @@ target_link_libraries(shell PRIVATE ${Z3_DEPENDENT_LIBS})
z3_add_component_dependencies_to_target(shell ${shell_expanded_deps})
z3_append_linker_flag_list_to_target(shell ${Z3_DEPENDENT_EXTRA_CXX_LINK_FLAGS})
install(TARGETS shell
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ RUNTIME DESTINATION tools/z3
)
36 changes: 36 additions & 0 deletions ports/z3/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path("${PYTHON3_DIR}")

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Z3Prover/z3
REF z3-4.12.0
SHA512 53a51c8304fa4356d13293f68b14d9d9eef57a0771c6698d38aea5fac62c4e52c41ff003cb6d771a32645d2aa4ef59be5f792f2efbee927d06ac8280094976e5
HEAD_REF master
PATCHES
fix-install-path.patch
remove-flag-overrides.patch
)

if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(BUILD_STATIC "-DZ3_BUILD_LIBZ3_SHARED=OFF")
endif()

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
${BUILD_STATIC}
-DZ3_BUILD_TEST_EXECUTABLES=OFF
-DZ3_ENABLE_EXAMPLE_TARGETS=OFF
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/z3)
vcpkg_copy_pdbs()

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

file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

vcpkg_fixup_pkgconfig()
12 changes: 12 additions & 0 deletions ports/z3/remove-flag-overrides.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 477410ba8..fcca03917 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,6 @@
# Enforce some CMake policies
cmake_minimum_required(VERSION 3.4)

-set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cxx_compiler_flags_overrides.cmake")
project(Z3 VERSION 4.12.0.0 LANGUAGES CXX)

################################################################################
18 changes: 18 additions & 0 deletions ports/z3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "z3",
"version": "4.12.0",
"description": "Z3 is a theorem prover from Microsoft Research",
"homepage": "https://github.com/Z3Prover/z3",
"license": "MIT",
"supports": "!uwp",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion vcpkg_info.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
https://github.com/microsoft/vcpkg.git
2022.11.14
2023.01.09

0 comments on commit d77dd7b

Please sign in to comment.