From 930a6e70491c41f707913f465787c250f5047833 Mon Sep 17 00:00:00 2001 From: talregev Date: Thu, 22 Aug 2024 12:43:17 +0300 Subject: [PATCH] [octave] add new port (#40582) --- ports/octave/portfile.cmake | 56 +++++++++++++++++++++++++++++++++++++ ports/octave/vcpkg.json | 30 ++++++++++++++++++++ scripts/ci.baseline.txt | 5 ++++ versions/baseline.json | 4 +++ versions/o-/octave.json | 9 ++++++ 5 files changed, 104 insertions(+) create mode 100644 ports/octave/portfile.cmake create mode 100644 ports/octave/vcpkg.json create mode 100644 versions/o-/octave.json diff --git a/ports/octave/portfile.cmake b/ports/octave/portfile.cmake new file mode 100644 index 0000000000..9dfcbbd280 --- /dev/null +++ b/ports/octave/portfile.cmake @@ -0,0 +1,56 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +include(vcpkg_find_fortran) +vcpkg_find_fortran(FORTRAN) + +vcpkg_find_acquire_program(BISON) +get_filename_component(BISON_EXE_PATH "${BISON}" DIRECTORY) +vcpkg_add_to_path("${BISON_EXE_PATH}") + +vcpkg_find_acquire_program(FLEX) +get_filename_component(FLEX_EXE_PATH "${FLEX}" DIRECTORY) +vcpkg_add_to_path("${FLEX_EXE_PATH}") + +vcpkg_find_acquire_program(GPERF) +get_filename_component(GPERF_EXE_PATH "${GPERF}" DIRECTORY) +vcpkg_add_to_path("${GPERF_EXE_PATH}") + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftpmirror.gnu.org/octave/octave-${VERSION}.tar.xz" + FILENAME "octave-${VERSION}.tar.xz" + SHA512 cb1667cd6557d48ecd7ae191bc44c9b9fd4f79e7cf4bf6c917093d120c4312e9594e6dddc5287661627ac053e9f23faaec40a1286d792d859f1fefbfdb3eeb8c +) + +vcpkg_extract_source_archive( + SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES +) + +vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}/bin") +vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}/debug/bin") + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + OPTIONS + --disable-docs + --without-hdf5 +) + +vcpkg_install_make() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/octave/site/") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/octave/site/") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/octave/site/") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/octave/${VERSION}/site/") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/octave/${VERSION}/site/") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/libexec/") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/libexec") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/octave/octave/${VERSION}/site") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/octave/octave/site") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") + +vcpkg_fixup_pkgconfig() diff --git a/ports/octave/vcpkg.json b/ports/octave/vcpkg.json new file mode 100644 index 0000000000..6d1a4fae44 --- /dev/null +++ b/ports/octave/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "octave", + "version": "9.2.0", + "description": "High-level interpreted language, primarily intended for numerical computations.", + "homepage": "https://octave.org/", + "license": "GPL-3.0-or-later", + "supports": "!arm", + "dependencies": [ + "blas", + { + "name": "curl", + "default-features": false + }, + "fftw3", + "lapack", + "opengl", + "pcre2", + "qhull", + "readline", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 23e066cd0e..f9d9d5dd76 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -810,6 +810,11 @@ nrf-ble-driver:arm64-android=fail nrf-ble-driver:x64-android=fail nvtt:x64-android=fail oatpp-libressl:x64-android=fail +octave:x86-windows=fail +octave:x64-windows=fail +octave:x64-windows-static=fail +octave:x64-windows-static-md=fail +octave:x64-osx=fail ode:arm64-windows=fail offscale-libetcd-cpp:arm64-uwp=fail offscale-libetcd-cpp:x64-uwp=fail diff --git a/versions/baseline.json b/versions/baseline.json index d85d9c426b..09399e9b30 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6412,6 +6412,10 @@ "baseline": "4.7.6", "port-version": 0 }, + "octave": { + "baseline": "9.2.0", + "port-version": 0 + }, "octomap": { "baseline": "1.10.0", "port-version": 0 diff --git a/versions/o-/octave.json b/versions/o-/octave.json new file mode 100644 index 0000000000..e71a4a7429 --- /dev/null +++ b/versions/o-/octave.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "6bb24fb39b584c5298f49de82807d011368c9eeb", + "version": "9.2.0", + "port-version": 0 + } + ] +}