Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ampl-asl] Update to 20240201 and disable generated header when cross-compiling #40958

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ports/ampl-asl/0006-disable-generate-arith-h.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d4b65e..21b32ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -104,7 +104,7 @@ file(WRITE ${GENERATED_INCLUDE_DIR}/details.c "${DETAILS}")
configure_file(${SRCDIR}/solvers/stdio1.h0 ${GENERATED_INCLUDE_DIR}/stdio1.h
COPYONLY)

-if(CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "^x86")
+if(0)
include(CheckTypeSize)
check_type_size(double DOUBLE_SIZE)
check_type_size(long LONG_SIZE)
59 changes: 0 additions & 59 deletions ports/ampl-asl/copyright

This file was deleted.

13 changes: 0 additions & 13 deletions ports/ampl-asl/fix-crt-linkage.patch

This file was deleted.

12 changes: 0 additions & 12 deletions ports/ampl-asl/install-extra-headers.patch

This file was deleted.

39 changes: 0 additions & 39 deletions ports/ampl-asl/install-targets.patch

This file was deleted.

13 changes: 5 additions & 8 deletions ports/ampl-asl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ampl/asl
REF 934d34719c8a620fcf16ae5a3c00c326eb22e748
SHA512 b6fcb3dcb53a53d975666db1643d7ea518246e8fb6745621ce4b63de4393f7767844e9241baa6fdf1a45c241a9aa0866844c47deec0020313278128cccff6869
REF 2f5d9de248c53a3063bba23af2013cd3db768bf8
SHA512 a551420f60b2419285195063fc42b208e59f076d1d00e4b90847c15613997ba35d319d57275687df37e74a7486420fec2cde7da71a6126802ed19a12dcb8ffdc
HEAD_REF master
PATCHES
workaround-msvc-optimizer-ice.patch
fix-crt-linkage.patch # CRT linkage uses C/CXX FLAGS in vcpkg
install-extra-headers.patch
install-targets.patch
0006-disable-generate-arith-h.diff
)

vcpkg_cmake_configure(
Expand All @@ -26,9 +24,8 @@ vcpkg_cmake_install()

vcpkg_copy_pdbs()

vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-asl)
vcpkg_cmake_config_fixup()

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

# from ampl-mp license
file(INSTALL "${CURRENT_PORT_DIR}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
7 changes: 3 additions & 4 deletions ports/ampl-asl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "ampl-asl",
"version-date": "2020-11-11",
"port-version": 3,
"version-date": "2024-02-01",
"description": "AMPL Solver Library",
"homepage": "https://github.com/ampl/asl",
"license": null,
"supports": "!uwp & !(osx & arm64)",
"license": "BSD-3-Clause",
"supports": "!uwp",
"dependencies": [
{
"name": "vcpkg-cmake",
Expand Down
25 changes: 25 additions & 0 deletions ports/ampl-mp/0007-unofficial-export.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

install(
EXPORT unofficial-mp-targets
NAMESPACE
DESTINATION share/unofficial-mp
)

file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-mp-config.cmake.in" [[
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(ampl-asl CONFIG)
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-mp-targets.cmake")
]]
)

include(CMakePackageConfigHelpers)
configure_package_config_file("${CMAKE_CURRENT_BINARY_DIR}/unofficial-mp-config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/unofficial-mp-config.cmake"
INSTALL_DESTINATION "share/unofficial-mp"
)

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/unofficial-mp-config.cmake"
DESTINATION "share/unofficial-mp"
)
2 changes: 1 addition & 1 deletion ports/ampl-mp/fix-dependency-asl.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ index 13f11cb..92089a3 100644
endif()
endif ()

+find_package(unofficial-asl CONFIG REQUIRED)
+find_package(ampl-asl CONFIG REQUIRED)
WangWeiLin-MV marked this conversation as resolved.
Show resolved Hide resolved
add_subdirectory(doc)
add_subdirectory(src/amplsig)
-add_subdirectory(src/asl)
Expand Down
4 changes: 2 additions & 2 deletions ports/ampl-mp/install-targets.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ index d4c6762..c7b15b6 100644

install(DIRECTORY include/mp DESTINATION include)
-install(TARGETS mp DESTINATION lib RUNTIME DESTINATION bin)
+install(TARGETS mp EXPORT unofficial-mp-config DESTINATION lib RUNTIME DESTINATION bin)
+install(TARGETS mp EXPORT unofficial-mp-targets DESTINATION lib RUNTIME DESTINATION bin)
install(FILES LICENSE.rst DESTINATION share/mp)
+install(EXPORT unofficial-mp-config DESTINATION share/unofficial-mp)
+include(0007-unofficial-export.cmake)
install(TARGETS gen-expr-info RUNTIME DESTINATION bin)
\ No newline at end of file
1 change: 1 addition & 0 deletions ports/ampl-mp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vcpkg_from_github(
fix-arm-build.patch # https://github.com/ampl/mp/issues/115
install-targets.patch
)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/0007-unofficial-export.cmake" DESTINATION "${SOURCE_PATH}/")

if (NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET)
set(ARITHCHK_EXEC ${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}/gen-expr-info${VCPKG_HOST_EXECUTABLE_SUFFIX})
Expand Down
2 changes: 1 addition & 1 deletion ports/ampl-mp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ampl-mp",
"version-date": "2020-11-11",
"port-version": 4,
"port-version": 5,
"description": "An open-source library for mathematical programming",
"homepage": "https://github.com/ampl/mp",
"supports": "!uwp",
Expand Down
1 change: 0 additions & 1 deletion scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ ace:x64-android=fail
allegro5:arm-neon-android=fail
allegro5:arm64-android=fail
allegro5:x64-android=fail
ampl-asl:x64-android=fail
apr:arm-neon-android=fail
apr:arm64-android=fail
apr:x64-android=fail
Expand Down
5 changes: 5 additions & 0 deletions versions/a-/ampl-asl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "af475f9134b986c7677f68e74b1658725d60b876",
"version-date": "2024-02-01",
"port-version": 0
},
{
"git-tree": "2a88fb5c85a975bf5c5b49b6d87224b25504553d",
"version-date": "2020-11-11",
Expand Down
5 changes: 5 additions & 0 deletions versions/a-/ampl-mp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5d383d7b192993a98f67775f292f9443d041e516",
"version-date": "2020-11-11",
"port-version": 5
},
{
"git-tree": "adc07c10ee68ac3ebb3ea916bc4a62bf1ceaf5cc",
"version-date": "2020-11-11",
Expand Down
6 changes: 3 additions & 3 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@
"port-version": 1
},
"ampl-asl": {
"baseline": "2020-11-11",
"port-version": 3
"baseline": "2024-02-01",
"port-version": 0
},
"ampl-mp": {
"baseline": "2020-11-11",
"port-version": 4
"port-version": 5
},
"amqpcpp": {
"baseline": "4.3.26",
Expand Down
Loading