aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/mathgl/fix_link_gsl.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/mathgl/fix_link_gsl.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/mathgl/fix_link_gsl.patch')
-rw-r--r--vcpkg/ports/mathgl/fix_link_gsl.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/vcpkg/ports/mathgl/fix_link_gsl.patch b/vcpkg/ports/mathgl/fix_link_gsl.patch
new file mode 100644
index 0000000..7715f80
--- /dev/null
+++ b/vcpkg/ports/mathgl/fix_link_gsl.patch
@@ -0,0 +1,37 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1c931e2..4987f2d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -485,25 +485,13 @@ endif(enable-openmp)
+
+ if(enable-gsl)
+ set(MGL_HAVE_GSL 1)
+- find_library(GSL_LIB gsl)
+- find_library(GSL_CBLAS_LIB gslcblas)
+- find_path(GSL_INCLUDE_DIR gsl/gsl_fft_complex.h)
+- if(NOT GSL_LIB OR NOT GSL_CBLAS_LIB OR NOT GSL_INCLUDE_DIR)
+- message(SEND_ERROR "${GSL_LIB}")
+- message(SEND_ERROR "${GSL_CBLAS_LIB}")
+- message(SEND_ERROR "${GSL_INCLUDE_DIR}")
+- message(SEND_ERROR "Couldn't find GSL libraries.")
+- else(NOT GSL_LIB OR NOT GSL_CBLAS_LIB OR NOT GSL_INCLUDE_DIR)
+- set(CMAKE_REQUIRED_INCLUDES ${GSL_INCLUDE_DIR})
+- set(CMAKE_REQUIRED_LIBRARIES ${GSL_LIB} ${GSL_CBLAS_LIB})
+- CHECK_CXX_SOURCE_COMPILES("#include <gsl/gsl_multifit_nlin.h>
+- int main(){gsl_multifit_fdfsolver *s=0;gsl_matrix *J = 0;
+- gsl_multifit_fdfsolver_jac(s, J);}" MGL_HAVE_GSL2)
+- unset(CMAKE_REQUIRED_INCLUDES)
+- unset(CMAKE_REQUIRED_LIBRARIES)
+- endif(NOT GSL_LIB OR NOT GSL_CBLAS_LIB OR NOT GSL_INCLUDE_DIR)
+- set(MGL_DEP_LIBS ${GSL_LIB} ${GSL_CBLAS_LIB} ${MGL_DEP_LIBS})
+- include_directories(${GSL_INCLUDE_DIR})
++ find_package(GSL REQUIRED)
++ set(MGL_DEP_LIBS GSL::gsl GSL::gslcblas ${MGL_DEP_LIBS})
++ set(CMAKE_REQUIRED_LIBRARIES GSL::gsl GSL::gslcblas)
++ CHECK_CXX_SOURCE_COMPILES("#include <gsl/gsl_multifit_nlin.h>
++ int main(){gsl_multifit_fdfsolver *s=0;gsl_matrix *J = 0;
++ gsl_multifit_fdfsolver_jac(s, J);}" MGL_HAVE_GSL2)
++ unset(CMAKE_REQUIRED_LIBRARIES)
+ else(enable-gsl)
+ set(MGL_HAVE_GSL 0)
+ endif(enable-gsl)