summaryrefslogtreecommitdiff
path: root/graphics/mupdf/files/patch-Makerules
blob: 3878e5d9a25cbbfb2e2da322f0c3fd8e83b2a6e7 (plain) (blame)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
--- Makerules.orig	2018-10-04 09:19:28 UTC
+++ Makerules
@@ -24,28 +24,28 @@ ifeq ($(build),debug)
   CFLAGS += -pipe -g
   LDFLAGS += -g $(LDREMOVEUNREACH)
 else ifeq ($(build),release)
-  CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
+  CFLAGS += -DNDEBUG -fomit-frame-pointer
   LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
 else ifeq ($(build),small)
   CFLAGS += -pipe -Os -DNDEBUG -fomit-frame-pointer
   LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
 else ifeq ($(build),valgrind)
-  CFLAGS += -pipe -O2 -DNDEBUG -DPACIFY_VALGRIND -fno-omit-frame-pointer
+  CFLAGS += -DNDEBUG -DPACIFY_VALGRIND -fno-omit-frame-pointer
   LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
 else ifeq ($(build),sanitize)
   CFLAGS += -pipe -g -fno-omit-frame-pointer $(SANITIZE_FLAGS)
   LDFLAGS += -g $(SANITIZE_FLAGS)
 else ifeq ($(build),sanitize-release)
-  CFLAGS += -pipe -O2 -DNDEBUG -fno-omit-frame-pointer $(SANITIZE_FLAGS)
+  CFLAGS += -DNDEBUG -fno-omit-frame-pointer $(SANITIZE_FLAGS)
   LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s $(SANITIZE_FLAGS)
 else ifeq ($(build),profile)
-  CFLAGS += -pipe -O2 -DNDEBUG -pg
+  CFLAGS += -DNDEBUG -pg
   LDFLAGS += -pg
 else ifeq ($(build),coverage)
   CFLAGS += -pipe -g -pg -fprofile-arcs -ftest-coverage
   LIBS += -lgcov
 else ifeq ($(build),native)
-  CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer -march=native
+  CFLAGS += -DNDEBUG -fomit-frame-pointer -march=native
   LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
 else ifeq ($(build),memento)
   CFLAGS += -pipe -g -DMEMENTO
@@ -55,7 +55,7 @@ else ifeq ($(build),memento)
     LIBS += -ldl
   endif
 else ifeq ($(build),gperf)
-  CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer -DGPERF
+  CFLAGS += -DNDEBUG -fomit-frame-pointer -DGPERF
   LIBS += -lprofiler
 else
   $(error unknown build setting: '$(build)')
@@ -143,7 +143,59 @@ else ifeq ($(OS),Linux)
 	PTHREAD_LIBS := -lpthread
   endif
 
-endif
+else ifeq ($(OS),FreeBSD)
+  PTHREAD_LIBS := -lthr
+# alphabetical order
+  # curl
+  USE_SYSTEM_CURL := yes
+  SYS_CURL_CFLAGS := $(shell pkg-config --cflags libcurl)
+  SYS_CURL_LIBS := $(shell pkg-config --libs libcurl)
+  # freetype
+  USE_SYSTEM_FREETYPE := yes
+  SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
+  SYS_FREETYPE_LIBS := $(shell pkg-config --libs freetype2)
+  # glut
+  HAVE_GLUT := yes
+  USE_SYSTEM_GLUT := yes
+  SYS_GLUT_CFLAGS :=
+  SYS_GLUT_LIBS := -lglut -lGL
+  # harfbuzz
+  USE_SYSTEM_HARFBUZZ := yes
+  SYS_HARFBUZZ_CFLAGS := $(shell pkg-config --cflags harfbuzz)
+  SYS_HARFBUZZ_LIBS := $(shell pkg-config --libs harfbuzz)
+  # jbig2dec
+  USE_SYSTEM_JBIG2DEC := yes
+  SYS_JBIG2DEC_CFLAGS := 
+  SYS_JIB2DEC_LIBS := -ljbig2dec
+  # lcms2 - needs a patched version of lcms2
+  USE_SYSTEM_LCMS2 := no
+  # libcrypto
+  HAVE_LIBCRYPTO := no
+  SYS_LIBCRYPTO_CFLAGS :=
+  SYS_LIBCRYPTO_LIBS :=
+  # libjpeg
+  USE_SYSTEM_LIBJPEG := yes
+  SYS_LIBJPEG_CFLAGS := $(shell pkg-config --cflags libjpeg)
+  SYS_LIBJPEG_LIBS := $(shell pkg-config --libs libjpeg)
+  # openjpeg
+  USE_SYSTEM_OPENJPEG := yes
+  SYS_OPENJPEG_CFLAGS := $(shell pkg-config --cflags libopenjp2)
+  SYS_OPENJPEG_LIBS := $(shell pkg-config --libs libopenjp2)
+  # openssl
+  HAVE_OPENSSL_SSL := no
+  # pthread
+  HAVE_PTHREAD := yes
+  SYS_PTHREAD_CFLAGS :=
+  SYS_PTHREAD_LIBS := -lpthread
+  # x11
+  HAVE_X11 := yes
+  X11_CFLAGS := $(shell pkg-config --cflags x11 xext)
+  X11_LIBS := $(shell pkg-config --libs x11 xext)
+  # zlib
+  USE_SYSTEM_ZLIB := yes
+  SYS_ZLIB_CFLAGS := $(shell pkg-config --cflags zlib)
+  SYS_ZLIB_LIBS := $(shell pkg-config --libs zlib)
+endif # FreeBSD
 
 # The following section has various cross compilation configurations.
 #