File: 0005-CMakeLists.txt-use-system-gsl.patch

package info (click to toggle)
k2pdfopt 2.55%2Bds-3.1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,896 kB
  • sloc: ansic: 87,945; cpp: 5,915; makefile: 5
file content (45 lines) | stat: -rw-r--r-- 1,219 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 262b6a10005025df562f9256dfde3d52e24eeb7a Mon Sep 17 00:00:00 2001
From: yangfl <yangfl@users.noreply.github.com>
Date: Sun, 14 Jun 2020 12:48:01 +0800
Subject: [PATCH 05/11] CMakeLists.txt: use system gsl

---
 CMakeLists.txt         | 8 ++++++--
 willuslib/gslpolyfit.c | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca9d2defb280..ffc5019fb692 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,8 +61,12 @@ endif(JASPER_FOUND)
 
 set(HAVE_GHOSTSCRIPT 1)
 
-# willus.h
-# HAVE_GSL_LIB
+pkg_check_modules(GSL gsl)
+if(GSL_FOUND)
+  set(HAVE_GSL_LIB 1)
+  include_directories(SYSTEM ${GSL_INCLUDEDIR})
+  set(K2PDFOPT_LIB ${K2PDFOPT_LIB} ${GSL_LDFLAGS})
+endif(GSL_FOUND)
 
 
 # libfreetype6 (>= 2.3.9), libjbig2dec0, libjpeg8 (>= 8c), libx11-6, libxext6, zlib1g (>= 1:1.2.0)
diff --git a/willuslib/gslpolyfit.c b/willuslib/gslpolyfit.c
index 5d2b6fbb85cc..b34f4b5b8083 100644
--- a/willuslib/gslpolyfit.c
+++ b/willuslib/gslpolyfit.c
@@ -24,7 +24,7 @@
 #include <stdlib.h>
 #include "willus.h"
 #ifdef HAVE_GSL_LIB
-#include <gsl.h>
+#include <gsl/gsl_multifit.h>
 #endif
 
 void gslpolyfit(double *x,double *y0,int n,int d,double *c0)
-- 
2.43.0