diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/octave | |
Diffstat (limited to 'vcpkg/ports/octave')
| -rw-r--r-- | vcpkg/ports/octave/add_other_linkage_flags.patch | 22 | ||||
| -rw-r--r-- | vcpkg/ports/octave/portfile.cmake | 229 | ||||
| -rw-r--r-- | vcpkg/ports/octave/qhull.patch | 41 | ||||
| -rw-r--r-- | vcpkg/ports/octave/vcpkg.json | 216 |
4 files changed, 508 insertions, 0 deletions
diff --git a/vcpkg/ports/octave/add_other_linkage_flags.patch b/vcpkg/ports/octave/add_other_linkage_flags.patch new file mode 100644 index 0000000..5725be8 --- /dev/null +++ b/vcpkg/ports/octave/add_other_linkage_flags.patch @@ -0,0 +1,22 @@ +diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 +index 0f5042422d..05ac0178ea 100644 +--- a/m4/acinclude.m4 ++++ b/m4/acinclude.m4 +@@ -963,7 +963,7 @@ AC_DEFUN([OCTAVE_CHECK_LIB], [ + if test -z "$m4_toupper([$1])_LDFLAGS"; then + m4_toupper([$1])_LDFLAGS="$($PKG_CONFIG --libs-only-L m4_default([$9], [$1]) | $SED -e 's/^ *$//')" + fi +- m4_toupper([$1])_LIBS="$($PKG_CONFIG --libs-only-l m4_default([$9], [$1]) | $SED -e 's/^ *$//')" ++ m4_toupper([$1])_LIBS="$($PKG_CONFIG --libs-only-l --libs-only-other m4_default([$9], [$1]) | $SED -e 's/^ *$//')" + ]) + fi + +@@ -2194,7 +2194,7 @@ AC_DEFUN([OCTAVE_CHECK_QT_VERSION], [AC_MSG_CHECKING([Qt version $1]) + ## Retrieve Qt compilation and linker flags + QT_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $QT_MODULES | $SED -e 's/^ *$//')" + QT_LDFLAGS="$($PKG_CONFIG --libs-only-L $QT_MODULES | $SED -e 's/^ *$//')" +- QT_LIBS="$($PKG_CONFIG --libs-only-l $QT_MODULES | $SED -e 's/^ *$//')" ++ QT_LIBS="$($PKG_CONFIG --libs-only-l --libs-only-other $QT_MODULES | $SED -e 's/^ *$//')" + + case $host_os in + *darwin*) diff --git a/vcpkg/ports/octave/portfile.cmake b/vcpkg/ports/octave/portfile.cmake new file mode 100644 index 0000000..5860c3b --- /dev/null +++ b/vcpkg/ports/octave/portfile.cmake @@ -0,0 +1,229 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftpmirror.gnu.org/octave/octave-${VERSION}.tar.xz" + "https://ftp.gnu.org/gnu/octave/octave-${VERSION}.tar.xz" + FILENAME "octave-${VERSION}.tar.xz" + SHA512 4ba4d65e326ab85ffcf8864b073910b8ec5ecaba96d18cffa2b13e8f38e5382e7a200bd9bc8838c47b947edcf8388ad3dd749e2d4f529f1f110946d99adf188f +) + +vcpkg_extract_source_archive( + SOURCE_PATH + ARCHIVE "${ARCHIVE}" + PATCHES + add_other_linkage_flags.patch + qhull.patch +) + +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_find_acquire_program(PKGCONFIG) +set(ENV{PKG_CONFIG} "${PKGCONFIG}") + +if(VCPKG_HOST_IS_OSX) + message("${PORT} currently requires the following programs from the system package manager:\n gsed\n\nIt can be installed with brew gnu-sed") +endif() + +if("arpack" IN_LIST FEATURES) + set(ARPACK_OPTION "yes") +else() + set(ARPACK_OPTION "no") +endif() + +if("bz2" IN_LIST FEATURES) + set(BZ2_OPTION "yes") +else() + set(BZ2_OPTION "no") +endif() + +set(SUITESPARSECONFIG_OPTION "no") + +if("amd" IN_LIST FEATURES) + set(AMD_OPTION "yes") + set(SUITESPARSECONFIG_OPTION "yes") +else() + set(AMD_OPTION "no") +endif() + +if("camd" IN_LIST FEATURES) + set(CAMD_OPTION "yes") + set(SUITESPARSECONFIG_OPTION "yes") +else() + set(CAMD_OPTION "no") +endif() + +if("ccolamd" IN_LIST FEATURES) + set(CCOLAMD_OPTION "yes") + set(SUITESPARSECONFIG_OPTION "yes") +else() + set(CCOLAMD_OPTION "no") +endif() + +if("cholmod" IN_LIST FEATURES) + set(CHOLMOD_OPTION "yes") + set(SUITESPARSECONFIG_OPTION "yes") +else() + set(CHOLMOD_OPTION "no") +endif() + +if("colamd" IN_LIST FEATURES) + set(COLAMD_OPTION "yes") + set(SUITESPARSECONFIG_OPTION "yes") +else() + set(COLAMD_OPTION "no") +endif() + +if("cxsparse" IN_LIST FEATURES) + set(CXSPARSE_OPTION "yes") + set(SUITESPARSECONFIG_OPTION "yes") +else() + set(CXSPARSE_OPTION "no") +endif() + +if("klu" IN_LIST FEATURES) + set(KLU_OPTION "yes") + set(SUITESPARSECONFIG_OPTION "yes") +else() + set(KLU_OPTION "no") +endif() + +if("umfpack" IN_LIST FEATURES) + set(UMFPACK_OPTION "yes") + set(SUITESPARSECONFIG_OPTION "yes") +else() + set(UMFPACK_OPTION "no") +endif() + +if("spqr" IN_LIST FEATURES) + set(SPQR_OPTION "yes") + set(SUITESPARSECONFIG_OPTION "yes") +else() + set(SPQR_OPTION "no") +endif() + +if("hdf5" IN_LIST FEATURES) + set(HDF5_OPTION "yes") +else() + set(HDF5_OPTION "no") +endif() + +if("fltk" IN_LIST FEATURES) + set(FLTK_OPTION "yes") +else() + set(FLTK_OPTION "no") +endif() + +if("fontconfig" IN_LIST FEATURES) + set(FONTCONFIG_OPTION "yes") +else() + set(FONTCONFIG_OPTION "no") +endif() + +if("freetype" IN_LIST FEATURES) + set(FREETYPE_OPTION "yes") +else() + set(FREETYPE_OPTION "no") +endif() + +if("portaudio" IN_LIST FEATURES) + set(PORTAUDIO_OPTION "yes") +else() + set(PORTAUDIO_OPTION "no") +endif() + +if("gui" IN_LIST FEATURES) + set(GUI_OPTION "yes") +else() + set(GUI_OPTION "no") +endif() + +if("qhull" IN_LIST FEATURES) + set(QHULL_OPTION "yes") + set(QHULL_PKG_OPTION "qhullstatic_r") +else() + set(QHULL_OPTION "no") +endif() + +if("curl" IN_LIST FEATURES) + set(CURL_OPTION "yes") +else() + set(CURL_OPTION "no") +endif() + +if("graphicsmagick" IN_LIST FEATURES) + set(GRAPHICSMAGICK_OPTION "GraphicsMagick++") +else() + set(GRAPHICSMAGICK_OPTION "no") +endif() + +vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}/tools/fltk") +vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}/tools/qt5/bin") + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + OPTIONS + --disable-docs + --disable-java + --disable-hg-id + --enable-lib-visibility-flags + --enable-relocate-all + --with-amd=${AMD_OPTION} + --with-arpack=${ARPACK_OPTION} + --with-bz2=${BZ2_OPTION} + --with-camd=${CAMD_OPTION} + --with-ccolamd=${CCOLAMD_OPTION} + --with-cholmod=${CHOLMOD_OPTION} + --with-colamd=${COLAMD_OPTION} + --with-cxsparse=${CXSPARSE_OPTION} + --with-curl=${CURL_OPTION} + --with-fftw3 # yes + --with-fftw3f # yes + --with-fltk=${FLTK_OPTION} + --with-fontconfig=${FONTCONFIG_OPTION} + --with-freetype=${FREETYPE_OPTION} + --with-glpk # yes + --with-hdf5=${HDF5_OPTION} + --with-klu=${KLU_OPTION} + --with-magick=${GRAPHICSMAGICK_OPTION} + --with-opengl # yes + --with-portaudio=${PORTAUDIO_OPTION} + --with-pcre2 # yes + --with-qhull_r=${QHULL_OPTION} + --with-qhull_r-pkg-config=${QHULL_PKG_OPTION} + --with-qrupdate=no + --with-qscintilla=no + --with-qt=${GUI_OPTION} + --with-sndfile # yes + --with-spqr=${SPQR_OPTION} + --with-suitesparseconfig=${SUITESPARSECONFIG_OPTION} + --with-sundials_ida=no + --with-sundials_nvecserial=no + --with-umfpack=${UMFPACK_OPTION} + --with-z # yes +) +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +foreach(subdir IN ITEMS libexec lib/octave/site lib/octave/${VERSION}/site share/octave/octave/${VERSION}/site share/octave/octave/site/api-v59) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/${subdir}") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/${subdir}") +endforeach() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/octave/octave/site/") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/vcpkg/ports/octave/qhull.patch b/vcpkg/ports/octave/qhull.patch new file mode 100644 index 0000000..52bacde --- /dev/null +++ b/vcpkg/ports/octave/qhull.patch @@ -0,0 +1,41 @@ +diff --git a/configure.ac b/configure.ac +--- configure.ac ++++ configure.ac +@@ -1429,8 +1429,25 @@ + AC_MSG_ERROR([to build Octave, you must have the PCRE or PCRE2 library and header files installed]) + fi + + ### Check for Qhull library. ++AC_ARG_WITH([qhull_r-pkg-config], ++ [AS_HELP_STRING([--with-qhull_r-pkg-config=LIB], ++ [search the qhull library with pkg-config (options: qhull_r (default) or qhullstatic_r)]) ++dnl Second help string must not be indented for correct alignment ++AS_HELP_STRING([--without-qhull_r-pkg-config], [don't search qhull_r library with pkg-config])], ++ [case $withval in ++ yes | "") ++ qhull_pc_name="qhull_r" ++ ;; ++ no) ++ qhull_pc_name="" ++ ;; ++ *) ++ qhull_pc_name="$withval" ++ ;; ++ esac], ++ [qhull_pc_name="qhull_r"]) + + QHULL_CPPFLAGS= + QHULL_LDFLAGS= + QHULL_LIBS= +@@ -1444,9 +1461,10 @@ + [AC_DEFINE(HAVE_QHULL, 1, [Define to 1 if Qhull is available.]) + QHULL_CPPFLAGS="$QHULL_R_CPPFLAGS" + QHULL_LDFLAGS="$QHULL_R_LDFLAGS" + QHULL_LIBS="$QHULL_R_LIBS"], +- [warn_qhull_r="Qhull library found, but does not seem to work properly. This will result in loss of functionality for some geometry functions. Please try recompiling the library with -fno-strict-aliasing."])]) ++ [warn_qhull_r="Qhull library found, but does not seem to work properly. This will result in loss of functionality for some geometry functions. Please try recompiling the library with -fno-strict-aliasing."])], ++ [$qhull_pc_name]) + AC_SUBST(QHULL_CPPFLAGS) + AC_SUBST(QHULL_LDFLAGS) + AC_SUBST(QHULL_LIBS) + diff --git a/vcpkg/ports/octave/vcpkg.json b/vcpkg/ports/octave/vcpkg.json new file mode 100644 index 0000000..8d9fcf1 --- /dev/null +++ b/vcpkg/ports/octave/vcpkg.json @@ -0,0 +1,216 @@ +{ + "name": "octave", + "version": "10.2.0", + "port-version": 1, + "description": "High-level interpreted language, primarily intended for numerical computations.", + "homepage": "https://octave.org/", + "documentation": "https://docs.octave.org/latest/", + "license": "GPL-3.0-or-later", + "supports": "!windows | mingw", + "dependencies": [ + "blas", + "fftw3", + "glpk", + "lapack", + "libsndfile", + "opengl", + "pcre2", + "readline", + "zlib" + ], + "features": { + "amd": { + "description": "suitesparse-amd support", + "dependencies": [ + { + "name": "suitesparse-amd", + "default-features": false + } + ] + }, + "arpack": { + "description": "arpack support", + "dependencies": [ + { + "name": "arpack-ng", + "default-features": false + } + ] + }, + "bz2": { + "description": "bzip2 support", + "dependencies": [ + { + "name": "bzip2", + "default-features": false + } + ] + }, + "camd": { + "description": "suitesparse-camd support", + "dependencies": [ + { + "name": "suitesparse-camd", + "default-features": false + } + ] + }, + "ccolamd": { + "description": "suitesparse-ccolamd support", + "dependencies": [ + { + "name": "suitesparse-ccolamd", + "default-features": false + } + ] + }, + "cholmod": { + "description": "suitesparse-cholmod support", + "dependencies": [ + { + "name": "suitesparse-cholmod", + "default-features": false + } + ] + }, + "colamd": { + "description": "suitesparse-colamd support", + "dependencies": [ + { + "name": "suitesparse-colamd", + "default-features": false + } + ] + }, + "curl": { + "description": "curl support", + "dependencies": [ + { + "name": "curl", + "default-features": false + } + ] + }, + "cxsparse": { + "description": "suitesparse-cxsparse support", + "dependencies": [ + { + "name": "suitesparse-cxsparse", + "default-features": false + } + ] + }, + "fltk": { + "description": "fltk support", + "dependencies": [ + { + "name": "fltk", + "default-features": false + } + ] + }, + "fontconfig": { + "description": "fontconfig support", + "dependencies": [ + { + "name": "fontconfig", + "default-features": false + } + ] + }, + "freetype": { + "description": "freetype support", + "dependencies": [ + { + "name": "freetype", + "default-features": false + } + ] + }, + "graphicsmagick": { + "description": "graphicsmagick support", + "dependencies": [ + { + "name": "graphicsmagick", + "default-features": false + } + ] + }, + "gui": { + "description": "build with gui support", + "dependencies": [ + { + "name": "freeglut", + "platform": "linux" + }, + { + "name": "octave", + "default-features": false, + "features": [ + "fontconfig", + "freetype" + ] + }, + { + "name": "qt5-base", + "default-features": false + }, + { + "name": "qt5-tools", + "default-features": false + } + ] + }, + "hdf5": { + "description": "hdf5 support", + "dependencies": [ + { + "name": "hdf5", + "default-features": false + } + ] + }, + "klu": { + "description": "suitesparse-klu support", + "dependencies": [ + { + "name": "suitesparse-klu", + "default-features": false + } + ] + }, + "portaudio": { + "description": "portaudio support", + "dependencies": [ + { + "name": "portaudio", + "default-features": false + } + ] + }, + "qhull": { + "description": "qhull support", + "dependencies": [ + "qhull" + ] + }, + "spqr": { + "description": "suitesparse-spqr support", + "dependencies": [ + { + "name": "suitesparse-spqr", + "default-features": false + } + ] + }, + "umfpack": { + "description": "suitesparse-umfpack support", + "dependencies": [ + { + "name": "suitesparse-umfpack", + "default-features": false + } + ] + } + } +} |