Ravenports generated: 17 Sep 2022 15:25
[ravenports.git] / bucket_E0 / mupdf
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               mupdf
4 VERSION=                1.20.3
5 KEYWORDS=               graphics
6 VARIANTS=               standard
7 SDESC[standard]=        Lightweight PDF and XPS viewer
8 HOMEPAGE=               https://mupdf.com/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            https://mupdf.com/downloads/archive/
13                         https://mupdf.com/downloads/
14 DISTFILE[1]=            mupdf-1.20.3-source.tar.gz:main
15 DF_INDEX=               1
16 SPKGS[standard]=        complete
17                         primary
18                         docs
19                         examples
20
21 OPTIONS_AVAILABLE=      none
22 OPTIONS_STANDARD=       none
23
24 BUILDRUN_DEPENDS=       curl:primary:standard
25                         freetype:primary:standard
26                         harfbuzz:primary:standard
27                         openjpeg:single:standard
28                         jbig2dec:single:standard
29                         freeglut:primary:standard
30                         gumbo:single:standard
31
32 USES=                   cpe gmake pkgconfig
33 XORG_COMPONENTS=        x11 xcursor xext xinerama xrandr
34
35 DISTNAME=               mupdf-1.20.3-source
36
37 LICENSE=                AGPLv3+:primary
38 LICENSE_TERMS=          primary:{{WRKDIR}}/TERMS
39 LICENSE_FILE=           AGPLv3+:{{WRKSRC}}/COPYING
40 LICENSE_SCHEME=         solo
41
42 CPE_VENDOR=             artifex
43 FPC_EQUIVALENT=         graphics/mupdf
44
45 MAKE_ARGS=              build=release
46                         prefix={{PREFIX}}
47                         mandir={{MANPREFIX}}/man
48                         verbose=yes
49                         SOVERSION=1.20.3
50
51 SOVERSION=              1.20.3
52
53 CFLAGS=                 `pkg-config
54                         --cflags
55                         libopenjp2`
56                         -I{{WRKSRC}}/include/mupdf
57                         -I{{LOCALBASE}}/include/freetype2
58                         -I{{LOCALBASE}}/include/harfbuzz
59 VAR_ARCH[x86_64]=       CFLAGS=-fPIC
60
61 post-patch:
62         ${REINPLACE_CMD} -e "s|%%OPSYS%%|${OPSYS}|; s/-pipe -O2 //" \
63                 ${WRKSRC}/Makerules
64
65 post-install:
66         ${MV} ${STAGEDIR}${PREFIX}/bin/mupdf-x11 ${STAGEDIR}${PREFIX}/bin/mupdf
67         ${INSTALL_PROGRAM} ${WRKSRC}/build/release/muraster \
68                 ${STAGEDIR}${PREFIX}/bin
69         ${LN} -s libmupdf.so.1.20.3 \
70                 ${STAGEDIR}${PREFIX}/lib/libmupdf.so
71         ${LN} -s libmupdfthird.so.1.20.3 \
72                 ${STAGEDIR}${PREFIX}/lib/libmupdfthird.so
73         ${MKDIR ${STAGEDIR}${PREFIX}/share/examples
74         ${MV} ${STAGEDIR}${PREFIX}/share/doc/mupdf/examples \
75                 ${STAGEDIR}${STD_EXAMPLESDIR}
76         ${RM} ${STAGEDIR}${STD_DOCDIR}/COPYING
77
78 post-extract:
79         ${RM} -r ${WRKSRC}/thirdparty/curl \
80                 ${WRKSRC}/thirdparty/freetype \
81                 ${WRKSRC}/thirdparty/freeglut \
82                 ${WRKSRC}/thirdparty/harfbuzz \
83                 ${WRKSRC}/thirdparty/jbig2dec \
84                 ${WRKSRC}/thirdparty/openjpeg \
85                 ${WRKSRC}/thirdparty/zlib
86         ${AWK} '/^LICENSE/,/^REPORTING/' ${WRKSRC}/README > ${WRKDIR}/TERMS
87
88 post-patch-sunos:
89         ${REINPLACE_CMD} -e '/define _XOPEN_SOURCE/d' \
90                 ${WRKSRC}/platform/x11/x11_image.c
91
92 [FILE:828:descriptions/desc.primary]
93 MuPDF is a lightweight PDF viewer and toolkit written in portable C.
94
95 The renderer in MuPDF is tailored for high quality anti-aliased graphics.
96 It renders text with metrics and spacing accurate to within fractions of a
97 pixel for the highest fidelity in reproducing the look of a printed page on
98 screen.
99
100 MuPDF has a small footprint. A binary that includes the standard Roman
101 fonts is only one megabyte. A build with full CJK support (including an
102 Asian font) is approximately five megabytes.
103
104 MuPDF has support for all non-interactive PDF 1.7 features, and the toolkit
105 provides a simple API for accessing the internal structures of the PDF
106 document. Example code for navigating interactive links and bookmarks,
107 encrypting PDF files, extracting fonts, images, and searchable text, and
108 rendering pages to image files is provided.
109
110
111 [FILE:105:distinfo]
112 6b60070f6eec20e8d87d2b5cd22cf49020311a3cf15ee10998e3e5f5f984b1eb     88457290 mupdf-1.20.3-source.tar.gz
113
114
115 [FILE:963:manifests/plist.primary]
116 bin/
117  mupdf
118  mupdf-gl
119  mupdf-x11-curl
120  muraster
121  mutool
122 include/mupdf/
123  fitz.h
124  memento.h
125  pdf.h
126  ucdn.h
127 include/mupdf/fitz/
128  archive.h
129  band-writer.h
130  bidi.h
131  bitmap.h
132  buffer.h
133  color.h
134  compress.h
135  compressed-buffer.h
136  config.h
137  context.h
138  crypt.h
139  device.h
140  display-list.h
141  document.h
142  export.h
143  filter.h
144  font.h
145  geometry.h
146  getopt.h
147  glyph-cache.h
148  glyph.h
149  hash.h
150  image.h
151  link.h
152  log.h
153  outline.h
154  output-svg.h
155  output.h
156  path.h
157  pixmap.h
158  pool.h
159  separation.h
160  shade.h
161  store.h
162  stream.h
163  string-util.h
164  structured-text.h
165  system.h
166  text.h
167  track-usage.h
168  transition.h
169  tree.h
170  types.h
171  util.h
172  version.h
173  write-pixmap.h
174  writer.h
175  xml.h
176 include/mupdf/pdf/
177  annot.h
178  clean.h
179  cmap.h
180  crypt.h
181  document.h
182  event.h
183  font.h
184  form.h
185  interpret.h
186  javascript.h
187  name-table.h
188  object.h
189  page.h
190  parse.h
191  resource.h
192  xref.h
193 lib/
194  libmupdf.so
195  libmupdf.so.%%SOVERSION%%
196  libmupdfthird.so
197  libmupdfthird.so.%%SOVERSION%%
198 share/man/man1/
199  mupdf.1.gz
200  mutool.1.gz
201
202
203 [FILE:627:manifests/plist.docs]
204 share/doc/mupdf/
205  CHANGES
206  README
207  android-library.html
208  artifex-logo.png
209  building.html
210  coding-overview.html
211  coding-progressive.html
212  coding-style.html
213  ecosystem.css
214  ecosystem.html
215  index.html
216  library.html
217  manual-mupdf-gl.html
218  manual-mutool-clean.html
219  manual-mutool-convert.html
220  manual-mutool-create.html
221  manual-mutool-draw.html
222  manual-mutool-extract.html
223  manual-mutool-info.html
224  manual-mutool-merge.html
225  manual-mutool-pages.html
226  manual-mutool-poster.html
227  manual-mutool-run.html
228  manual-mutool-show.html
229  manual-mutool-sign.html
230  manual-mutool-trace.html
231  mutool.html
232  style.css
233  thirdparty.html
234  viewers.html
235
236
237 [FILE:295:manifests/plist.examples]
238 share/examples/mupdf/
239  bbox-device.js
240  create-thumbnail.js
241  draw-device.js
242  draw-document.js
243  example.c
244  fix-s22pdf.js
245  jpx-to-pdf.js
246  multi-threaded.c
247  pdf-create-lowlevel.js
248  pdf-create.js
249  pdf-dejpx.js
250  pdf-extract-rich-media.js
251  pdf-merge.js
252  pdf-portfolio.js
253  pdf-trace.js
254  trace-device.js
255
256
257 [FILE:772:patches/patch-Makefile]
258 --- Makefile.orig       2022-06-14 12:19:22 UTC
259 +++ Makefile
260 @@ -257,9 +257,9 @@ $(THIRD_GLUT_LIB) : $(THIRD_GLUT_OBJ)
261  $(THREAD_LIB) : $(THREAD_OBJ)
262  $(PKCS7_LIB) : $(PKCS7_OBJ)
263  else
264 -MUPDF_LIB = $(OUT)/libmupdf.a
265 +MUPDF_LIB = libmupdf.so.$(SOVERSION)
266 +THIRD_LIB = libmupdfthird.so.$(SOVERSION)
267  LIBS_TO_INSTALL_IN_LIB = $(MUPDF_LIB) $(THIRD_LIB)
268 -THIRD_LIB = $(OUT)/libmupdf-third.a
269  ifneq ($(USE_SYSTEM_GLUT),yes)
270  THIRD_GLUT_LIB = $(OUT)/libmupdf-glut.a
271  endif
272 @@ -274,7 +274,11 @@ $(PKCS7_LIB) : $(PKCS7_OBJ)
273  endif
274  
275  $(MUPDF_LIB) : $(MUPDF_OBJ)
276 +       $(CC) $(LDFLAGS) -fPIC -shared -Wl,-soname=$@ -o $@ $^ $(LIBS)
277 +
278  $(THIRD_LIB) : $(THIRD_OBJ)
279 +       $(CC) $(LDFLAGS) -fPIC -shared -Wl,-soname=$@ -o $@ $^ $(LIBS)
280 +
281  $(THREAD_LIB) : $(THREAD_OBJ)
282  $(PKCS7_LIB) : $(PKCS7_OBJ)
283  
284
285
286 [FILE:646:patches/patch-Makerules]
287 --- Makerules.orig      2022-06-14 12:19:22 UTC
288 +++ Makerules
289 @@ -156,7 +156,7 @@ else ifeq ($(OS),MACOS)
290      endif
291    endif
292  
293 -else ifeq ($(OS),Linux)
294 +else ifeq ($(OS),%%OPSYS%%)
295    HAVE_OBJCOPY := yes
296  
297    ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
298 @@ -218,7 +218,7 @@ else ifeq ($(OS),Linux)
299         X11_LIBS := $(shell pkg-config --libs x11 xext)
300    endif
301  
302 -  HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)
303 +  HAVE_LIBCRYPTO := no
304    ifeq ($(HAVE_LIBCRYPTO),yes)
305         LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) -DHAVE_LIBCRYPTO
306         LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)
307
308
309 [FILE:546:patches/patch-Makethird]
310 --- Makethird.orig      2022-06-14 12:19:22 UTC
311 +++ Makethird
312 @@ -1,5 +1,6 @@
313  # GNU Makefile for third party libraries used by MuPDF
314  
315 +USE_SYSTEM_LIBS := yes
316  ifeq ($(USE_SYSTEM_LIBS),yes)
317    USE_SYSTEM_FREETYPE := yes
318    USE_SYSTEM_GUMBO := yes
319 @@ -7,7 +8,6 @@ ifeq ($(USE_SYSTEM_LIBS),yes)
320    USE_SYSTEM_JBIG2DEC := yes
321    USE_SYSTEM_JPEGXR := no # not available
322    USE_SYSTEM_LCMS2 := no # lcms2mt is strongly preferred
323 -  USE_SYSTEM_LIBJPEG := yes
324    USE_SYSTEM_MUJS := no # not available
325    USE_SYSTEM_OPENJPEG := yes
326    USE_SYSTEM_ZLIB := yes
327