[octave] Add features (#46877)

This commit is contained in:
talregev 2025-08-12 21:27:48 +03:00 committed by GitHub
parent 6c9118d63d
commit 975757d63e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 93 additions and 4 deletions

View File

@ -12,6 +12,7 @@ vcpkg_extract_source_archive(
ARCHIVE "${ARCHIVE}"
PATCHES
add_other_linkage_flags.patch
qhull.patch
)
include(vcpkg_find_fortran)
@ -149,6 +150,25 @@ 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")
@ -169,7 +189,7 @@ vcpkg_configure_make(
--with-cholmod=${CHOLMOD_OPTION}
--with-colamd=${COLAMD_OPTION}
--with-cxsparse=${CXSPARSE_OPTION}
--with-curl=no
--with-curl=${CURL_OPTION}
--with-fftw3 # yes
--with-fftw3f # yes
--with-fltk=${FLTK_OPTION}
@ -178,11 +198,12 @@ vcpkg_configure_make(
--with-glpk # yes
--with-hdf5=${HDF5_OPTION}
--with-klu=${KLU_OPTION}
--with-magick=no
--with-magick=${GRAPHICSMAGICK_OPTION}
--with-opengl # yes
--with-portaudio=${PORTAUDIO_OPTION}
--with-pcre2 # yes
--with-qhull_r=no
--with-qhull_r=${QHULL_OPTION}
--with-qhull_r-pkg-config=${QHULL_PKG_OPTION}
--with-qrupdate=no
--with-qscintilla=no
--with-qt=${GUI_OPTION}

41
ports/octave/qhull.patch Normal file
View File

@ -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)

View File

@ -82,6 +82,15 @@
}
]
},
"curl": {
"description": "curl support",
"dependencies": [
{
"name": "curl",
"default-features": false
}
]
},
"cxsparse": {
"description": "suitesparse-cxsparse support",
"dependencies": [
@ -118,6 +127,15 @@
}
]
},
"graphicsmagick": {
"description": "graphicsmagick support",
"dependencies": [
{
"name": "graphicsmagick",
"default-features": false
}
]
},
"gui": {
"description": "build with gui support",
"dependencies": [
@ -170,6 +188,12 @@
}
]
},
"qhull": {
"description": "qhull support",
"dependencies": [
"qhull"
]
},
"spqr": {
"description": "suitesparse-spqr support",
"dependencies": [

View File

@ -13,14 +13,17 @@
"ccolamd",
"cholmod",
"colamd",
"curl",
"cxsparse",
"fltk",
"fontconfig",
"freetype",
"graphicsmagick",
"gui",
"hdf5",
"klu",
"portaudio",
"qhull",
"spqr",
"umfpack"
]

View File

@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "db1baa59f8c1b8247854bbe33d2addbb51c2599b",
"git-tree": "6c5b6328bfd441754e4d78c97a9d3d796e5119ee",
"version": "10.2.0",
"port-version": 1
},