· 6 years ago · Feb 28, 2019, 05:44 PM
1➜ git diff 5afc9446869
2diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
3index 6ce73b2..3b14df3 100644
4--- a/.github/PULL_REQUEST_TEMPLATE.md
5+++ b/.github/PULL_REQUEST_TEMPLATE.md
6@@ -1,10 +1,10 @@
7 This feed contains unique packages, added by Entware team.
8
9 Please double check that your PR is for appropriate feed:
10-- [rtndev](https://github.com/Entware-for-kernel-3x/rtndev-3x) for packages which was never existed in OpenWrt before.
11-- [go](https://github.com/Entware-for-kernel-3x/entware-go-3x) for new packages in Golang.
12-- [oldports](https://github.com/Entware-for-kernel-3x/entware-oldpackages-ports-3x) for packages which is abandoned form OpenWrt for some reason.
13-- [packages](https://github.com/Entware-for-kernel-3x/entware-packages-3x), [routing](https://github.com/Entware-for-kernel-3x/entware-routing-3x), [telephony](https://github.com/Entware-for-kernel-3x/entware-telephony-3x) for packages, maintained by OpenWrt team.
14+- [rtndev](https://github.com/Entware/rtndev) for packages which was never existed in OpenWrt before.
15+- [go](https://github.com/Entware/entware-go) for new packages in Golang.
16+- [oldports](https://github.com/Entware/entware-oldpackages-ports) for packages which is abandoned form OpenWrt for some reason.
17+- [packages](https://github.com/Entware/entware-packages), [routing](https://github.com/Entware/entware-routing), [telephony](https://github.com/Entware/entware-telephony) for packages, maintained by OpenWrt team.
18
19 Please double check that your commits:
20 - all start with "<package name>: "
21diff --git a/3proxy/Makefile b/3proxy/Makefile
22index 64f62e7..d7bc1a8 100644
23--- a/3proxy/Makefile
24+++ b/3proxy/Makefile
25@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
26 PKG_NAME:=3proxy
27 PKG_VERSION:=0.8.12
28 PKG_REV:=d07500687c1a42f73ec5d96a4e1e028af985892f
29-PKG_RELEASE:=1
30+PKG_RELEASE:=1a
31
32 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.bz2
33 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
34diff --git a/3proxy/patches/030-add-user-script-paths.patch b/3proxy/patches/030-add-user-script-paths.patch
35index 93305f4..bd99445 100644
36--- a/3proxy/patches/030-add-user-script-paths.patch
37+++ b/3proxy/patches/030-add-user-script-paths.patch
38@@ -1,23 +1,15 @@
39 --- a/scripts/add3proxyuser.sh
40 +++ b/scripts/add3proxyuser.sh
41-@@ -1,10 +1,10 @@
42--#!/bin/sh
43+@@ -1,8 +1,8 @@
44+ #!/bin/sh
45 -if [ $4 ]; then
46 - echo $1:`/usr/local/etc/3proxy/bin/mycrypt $$ $2` >> /usr/local/etc/3proxy/passwd
47 - echo countin \"`wc -l /usr/local/etc/3proxy/counters|awk '{print $1}'`/$1\" D $3 $1 >> /usr/local/etc/3proxy/counters
48 - echo bandlimin $4 $1 >> /usr/local/etc/3proxy/bandlimiters
49--else
50-- echo usage: $0 username password day_limit bandwidth
51-- echo " "day_limit - traffic limit in MB per day
52-- echo " "bandwidth - bandwith in bits per second 1048576 = 1Mbps
53--fi
54-+#!/bin/sh
55 +if [ $4 ]; then
56 + echo $1:`/opt/bin/mycrypt $$ $2` >> /opt/etc/3proxy/passwd
57 + echo countin \"`wc -l /opt/etc/3proxy/counters|awk '{print $1}'`/$1\" D $3 $1 >> /opt/etc/3proxy/counters
58 + echo bandlimin $4 $1 >> /opt/etc/3proxy/bandlimiters
59-+else
60-+ echo usage: $0 username password day_limit bandwidth
61-+ echo " "day_limit - traffic limit in MB per day
62-+ echo " "bandwidth - bandwith in bits per second 1048576 = 1Mbps
63-+fi
64+ else
65+ echo usage: $0 username password day_limit bandwidth
66+ echo " "day_limit - traffic limit in MB per day
67diff --git a/3proxy/patches/999-fix_openssl.patch b/3proxy/patches/999-fix_openssl.patch
68new file mode 100644
69index 0000000..bc9eaeb
70--- /dev/null
71+++ b/3proxy/patches/999-fix_openssl.patch
72@@ -0,0 +1,18 @@
73+--- a/src/plugins/SSLPlugin/my_ssl.c
74++++ b/src/plugins/SSLPlugin/my_ssl.c
75+@@ -98,6 +98,7 @@ void del_ext(X509 *dst_cert, int nid, in
76+
77+ }
78+
79++#if OPENSSL_VERSION_NUMBER < 0x10100000L
80+ SSL_CERT ssl_copy_cert(SSL_CERT cert)
81+ {
82+ int err = -1;
83+@@ -185,6 +186,7 @@ SSL_CERT ssl_copy_cert(SSL_CERT cert)
84+ return dst_cert;
85+ }
86+
87++#endif
88+
89+ SSL_CONN ssl_handshake_to_server(SOCKET s, char * hostname, SSL_CERT *server_cert, char **errSSL)
90+ {
91diff --git a/baidupcs/Makefile b/baidupcs/Makefile
92index 8ab41f1..f0d504e 100644
93--- a/baidupcs/Makefile
94+++ b/baidupcs/Makefile
95@@ -37,7 +37,7 @@ endef
96
97 CONFIGURE_ARGS += \
98 --with-openssl="$(STAGING_DIR)/opt" \
99- --with-crypto
100+ --without-crypto
101
102 define Package/baidupcs/install
103 $(INSTALL_DIR) $(1)/opt/bin
104diff --git a/bip/Makefile b/bip/Makefile
105index 87b48e2..26f69d3 100644
106--- a/bip/Makefile
107+++ b/bip/Makefile
108@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
109
110 PKG_NAME:=bip
111 PKG_VERSION:=0.8.9
112-PKG_RELEASE:=2
113+PKG_RELEASE:=2a
114
115 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
116 PKG_SOURCE_URL:=https://projects.duckcorp.org/attachments/download/61
117diff --git a/bip/patches/999-fix_openssl.patch b/bip/patches/999-fix_openssl.patch
118new file mode 100644
119index 0000000..e6c2b4c
120--- /dev/null
121+++ b/bip/patches/999-fix_openssl.patch
122@@ -0,0 +1,76 @@
123+--- a/src/connection.c
124++++ b/src/connection.c
125+@@ -1080,6 +1080,7 @@ static DH *dh_512(void)
126+ mylog(LOG_WARN, "SSL: cannot create DH parameter set");
127+ return (0);
128+ }
129++#if OPENSSL_VERSION_NUMBER < 0x10100000L
130+ dh->p = BN_bin2bn(dh512_p, sizeof(dh512_p), (BIGNUM *) 0);
131+ dh->g = BN_bin2bn(dh512_g, sizeof(dh512_g), (BIGNUM *) 0);
132+ if ((dh->p == NULL) || (dh->g == NULL)) {
133+@@ -1089,6 +1090,7 @@ static DH *dh_512(void)
134+ return (0);
135+ } else
136+ dh_512 = dh;
137++#endif
138+ }
139+ return dh_512;
140+ }
141+@@ -1104,6 +1106,7 @@ static DH *dh_1024(void)
142+ mylog(LOG_WARN, "SSL: cannot create DH parameter set");
143+ return (0);
144+ }
145++#if OPENSSL_VERSION_NUMBER < 0x10100000L
146+ dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), (BIGNUM *) 0);
147+ dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), (BIGNUM *) 0);
148+ if ((dh->p == NULL) || (dh->g == NULL)) {
149+@@ -1113,6 +1116,7 @@ static DH *dh_1024(void)
150+ return (0);
151+ } else
152+ dh_1024 = dh;
153++#endif
154+ }
155+ return (dh_1024);
156+ }
157+@@ -1299,7 +1303,9 @@ static int bip_ssl_verify_callback(int p
158+ int err, depth;
159+ SSL *ssl;
160+ connection_t *c;
161++#if OPENSSL_VERSION_NUMBER < 0x10100000L
162+ X509_OBJECT xobj;
163++#endif
164+ int result;
165+
166+ err_cert = X509_STORE_CTX_get_current_cert(ctx);
167+@@ -1329,6 +1335,7 @@ static int bip_ssl_verify_callback(int p
168+ err == X509_V_ERR_CERT_HAS_EXPIRED ||
169+ err == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN)) {
170+
171++#if OPENSSL_VERSION_NUMBER < 0x10100000L
172+ if (X509_STORE_get_by_subject(ctx, X509_LU_X509,
173+ X509_get_subject_name(err_cert), &xobj) > 0 &&
174+ !X509_cmp(xobj.data.x509, err_cert)) {
175+@@ -1352,6 +1359,7 @@ static int bip_ssl_verify_callback(int p
176+
177+ link_add_untrusted(c->user_data, X509_dup(err_cert));
178+ }
179++#endif
180+ }
181+
182+ if (!result) {
183+--- a/src/moduli.h
184++++ b/src/moduli.h
185+@@ -6,6 +6,7 @@
186+ *
187+ * XXX What is the origin of these parameters?
188+ */
189++#if OPENSSL_VERSION_NUMBER < 0x10100000L
190+ static unsigned char dh512_p[] = {
191+ 0x88, 0x3F, 0x00, 0xAF, 0xFC, 0x0C, 0x8A, 0xB8, 0x35, 0xCD, 0xE5, 0xC2,
192+ 0x0F, 0x55, 0xDF, 0x06, 0x3F, 0x16, 0x07, 0xBF, 0xCE, 0x13, 0x35, 0xE4,
193+@@ -36,3 +37,5 @@ static unsigned char dh1024_g[] = {
194+ 0x02,
195+ };
196+
197++#endif
198++
199diff --git a/dos2unix/Makefile b/dos2unix/Makefile
200index d369b6c..3b7f4ca 100644
201--- a/dos2unix/Makefile
202+++ b/dos2unix/Makefile
203@@ -13,7 +13,7 @@ PKG_RELEASE:=1
204
205 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
206 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
207-PKG_HASH=bac765abdbd95cdd87a71989d4382c32cf3cbfeee2153f0086cb9cf18261048a
208+PKG_HASH:=bac765abdbd95cdd87a71989d4382c32cf3cbfeee2153f0086cb9cf18261048a
209
210 include $(INCLUDE_DIR)/package.mk
211
212diff --git a/gerbera/Makefile b/gerbera/Makefile
213index dc760f6..6a024a8 100644
214--- a/gerbera/Makefile
215+++ b/gerbera/Makefile
216@@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/cmake.mk
217 define Package/gerbera
218 SECTION:=multimedia
219 CATEGORY:=Multimedia
220- DEPENDS:=+libffmpeg-full +duktape +libupnp-1.8 +libsqlite3 +libcurl \
221+ DEPENDS:=+libffmpeg-full +duktape +libupnp +libsqlite3 +libcurl \
222 +libtheora +file +libexif +libexpat +libvorbis +libuuid +libstdcpp
223 TITLE:=a free media server
224 URL:=https://gerbera.io
225diff --git a/ghostscript/Makefile b/ghostscript/Makefile
226index 141f61b..e407f98 100644
227--- a/ghostscript/Makefile
228+++ b/ghostscript/Makefile
229@@ -11,12 +11,12 @@
230 include $(TOPDIR)/rules.mk
231
232 PKG_NAME:=ghostscript
233-PKG_VERSION:=9.16
234-PKG_RELEASE:=1
235+PKG_VERSION:=9.26
236+PKG_RELEASE:=2
237
238-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
239-PKG_SOURCE_URL:=http://downloads.ghostscript.com/public/old-gs-releases
240-PKG_HASH:=746d77280cca8afdd3d4c2c1389e332ed9b0605bd107bcaae1d761b061d1a68d
241+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
242+PKG_SOURCE_URL:=https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs926
243+PKG_HASH:=90ed475f37584f646e9ef829932b2525d5c6fc2e0147e8d611bc50aa0e718598
244
245 PKG_BUILD_DEPENDS:=ghostscript/host
246 PKG_INSTALL:=1
247@@ -105,9 +105,9 @@ define Package/ghostscript/install
248 $(1)/opt/share/ghostscript/$(PKG_VERSION)/lib
249 $(CP) -r $(PKG_BUILD_DIR)/Resource $(1)/opt/share/ghostscript/$(PKG_VERSION)/
250 $(CP) -r $(PKG_BUILD_DIR)/iccprofiles $(1)/opt/share/ghostscript/$(PKG_VERSION)/
251- # $(INSTALL_DIR) $(1)/opt/share/ghostscript/$(PKG_VERSION)/examples/cjk
252- $(CP) -r $(PKG_INSTALL_DIR)/opt/share/ghostscript/$(PKG_VERSION)/examples \
253- $(1)/opt/share/ghostscript/$(PKG_VERSION)/examples
254+ $(INSTALL_DIR) $(1)/opt/share/ghostscript/$(PKG_VERSION)/examples
255+ $(CP) -r $(PKG_BUILD_DIR)/examples/* \
256+ $(1)/opt/share/ghostscript/$(PKG_VERSION)/examples/
257 endef
258
259 $(eval $(call HostBuild))
260diff --git a/ghostscript/files/gs b/ghostscript/files/gs
261index d86ea5c..2570db6 100755
262--- a/ghostscript/files/gs
263+++ b/ghostscript/files/gs
264@@ -1,2 +1,2 @@
265 #!/bin/sh
266-GS_LIB=/opt/share/ghostscript/9.16/Resource exec /opt/bin/gs.orig "$@"
267+GS_LIB=/opt/share/ghostscript/9.26/Resource exec /opt/bin/gs.orig "$@"
268diff --git a/ghostscript/patches/03-ghostscript-9.05-cross.patch b/ghostscript/patches/003-ghostscript-9.05-cross.patch
269similarity index 85%
270rename from ghostscript/patches/03-ghostscript-9.05-cross.patch
271rename to ghostscript/patches/003-ghostscript-9.05-cross.patch
272index 3070068..bc70d3e 100644
273--- a/ghostscript/patches/03-ghostscript-9.05-cross.patch
274+++ b/ghostscript/patches/003-ghostscript-9.05-cross.patch
275@@ -1,6 +1,5 @@
276-diff -Naur ghostscript-9.05.orig/arm-arch.h ghostscript-9.05/arm-arch.h
277---- ghostscript-9.05.orig/arm-arch.h 1969-12-31 19:00:00.000000000 -0500
278-+++ ghostscript-9.05/arm-arch.h 2012-02-13 13:08:44.000000000 -0500
279+--- /dev/null
280++++ b/arm-arch.h
281 @@ -0,0 +1,41 @@
282 +/* Parameters derived from machine and compiler architecture. */
283 +/* This file is generated mechanically by genarch.c. */
284@@ -43,9 +42,8 @@ diff -Naur ghostscript-9.05.orig/arm-arch.h ghostscript-9.05/arm-arch.h
285 +#define ARCH_ARITH_RSHIFT 2
286 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
287 +
288-diff -Naur ghostscript-9.05.orig/armeb-arch.h ghostscript-9.05/armeb-arch.h
289---- ghostscript-9.05.orig/armeb-arch.h 1969-12-31 19:00:00.000000000 -0500
290-+++ ghostscript-9.05/armeb-arch.h 2012-02-13 13:08:44.000000000 -0500
291+--- /dev/null
292++++ b/armeb-arch.h
293 @@ -0,0 +1,41 @@
294 +/* Parameters derived from machine and compiler architecture. */
295 +/* This file is generated mechanically by genarch.c. */
296@@ -88,9 +86,8 @@ diff -Naur ghostscript-9.05.orig/armeb-arch.h ghostscript-9.05/armeb-arch.h
297 +#define ARCH_ARITH_RSHIFT 2
298 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
299 +
300-diff -Naur ghostscript-9.05.orig/avr32-arch.h ghostscript-9.05/avr32-arch.h
301---- ghostscript-9.05.orig/avr32-arch.h 1969-12-31 19:00:00.000000000 -0500
302-+++ ghostscript-9.05/avr32-arch.h 2012-02-13 13:08:44.000000000 -0500
303+--- /dev/null
304++++ b/avr32-arch.h
305 @@ -0,0 +1,41 @@
306 +/* Parameters derived from machine and compiler architecture. */
307 +/* This file is generated mechanically by genarch.c. */
308@@ -133,10 +130,9 @@ diff -Naur ghostscript-9.05.orig/avr32-arch.h ghostscript-9.05/avr32-arch.h
309 +#define ARCH_ARITH_RSHIFT 2
310 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
311 +
312-diff -Naur ghostscript-9.05.orig/base/unixhead.mak ghostscript-9.05/base/unixhead.mak
313---- ghostscript-9.05.orig/base/unixhead.mak 2012-02-13 13:07:44.000000000 -0500
314-+++ ghostscript-9.05/base/unixhead.mak 2012-02-13 13:08:44.000000000 -0500
315-@@ -53,7 +53,7 @@
316+--- a/base/unixhead.mak
317++++ b/base/unixhead.mak
318+@@ -53,7 +53,7 @@ SH=$(SHELL)
319
320 # Define generic commands.
321
322@@ -145,9 +141,8 @@ diff -Naur ghostscript-9.05.orig/base/unixhead.mak ghostscript-9.05/base/unixhea
323 RM_=rm -f
324 RMN_=rm -f
325
326-diff -Naur ghostscript-9.05.orig/i386-arch.h ghostscript-9.05/i386-arch.h
327---- ghostscript-9.05.orig/i386-arch.h 1969-12-31 19:00:00.000000000 -0500
328-+++ ghostscript-9.05/i386-arch.h 2012-02-13 13:08:44.000000000 -0500
329+--- /dev/null
330++++ b/i386-arch.h
331 @@ -0,0 +1,41 @@
332 +/* Parameters derived from machine and compiler architecture. */
333 +/* This file is generated mechanically by genarch.c. */
334@@ -190,9 +185,8 @@ diff -Naur ghostscript-9.05.orig/i386-arch.h ghostscript-9.05/i386-arch.h
335 +#define ARCH_ARITH_RSHIFT 2
336 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
337 +
338-diff -Naur ghostscript-9.05.orig/m68k-arch.h ghostscript-9.05/m68k-arch.h
339---- ghostscript-9.05.orig/m68k-arch.h 1969-12-31 19:00:00.000000000 -0500
340-+++ ghostscript-9.05/m68k-arch.h 2012-02-13 13:08:44.000000000 -0500
341+--- /dev/null
342++++ b/m68k-arch.h
343 @@ -0,0 +1,41 @@
344 +/* Parameters derived from machine and compiler architecture. */
345 +/* This file is generated mechanically by genarch.c. */
346@@ -235,9 +229,8 @@ diff -Naur ghostscript-9.05.orig/m68k-arch.h ghostscript-9.05/m68k-arch.h
347 +#define ARCH_ARITH_RSHIFT 2
348 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
349 +
350-diff -Naur ghostscript-9.05.orig/mips64-arch.h ghostscript-9.05/mips64-arch.h
351---- ghostscript-9.05.orig/mips64-arch.h 1969-12-31 19:00:00.000000000 -0500
352-+++ ghostscript-9.05/mips64-arch.h 2012-02-13 13:08:44.000000000 -0500
353+--- /dev/null
354++++ b/mips64-arch.h
355 @@ -0,0 +1,41 @@
356 +/* Parameters derived from machine and compiler architecture. */
357 +/* This file is generated mechanically by genarch.c. */
358@@ -280,9 +273,8 @@ diff -Naur ghostscript-9.05.orig/mips64-arch.h ghostscript-9.05/mips64-arch.h
359 +#define ARCH_ARITH_RSHIFT 2
360 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
361 +
362-diff -Naur ghostscript-9.05.orig/mips64el-arch.h ghostscript-9.05/mips64el-arch.h
363---- ghostscript-9.05.orig/mips64el-arch.h 1969-12-31 19:00:00.000000000 -0500
364-+++ ghostscript-9.05/mips64el-arch.h 2012-02-13 13:08:44.000000000 -0500
365+--- /dev/null
366++++ b/mips64el-arch.h
367 @@ -0,0 +1,41 @@
368 +/* Parameters derived from machine and compiler architecture. */
369 +/* This file is generated mechanically by genarch.c. */
370@@ -325,9 +317,8 @@ diff -Naur ghostscript-9.05.orig/mips64el-arch.h ghostscript-9.05/mips64el-arch.
371 +#define ARCH_ARITH_RSHIFT 2
372 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
373 +
374-diff -Naur ghostscript-9.05.orig/mips-arch.h ghostscript-9.05/mips-arch.h
375---- ghostscript-9.05.orig/mips-arch.h 1969-12-31 19:00:00.000000000 -0500
376-+++ ghostscript-9.05/mips-arch.h 2012-02-13 13:08:44.000000000 -0500
377+--- /dev/null
378++++ b/mips-arch.h
379 @@ -0,0 +1,41 @@
380 +/* Parameters derived from machine and compiler architecture. */
381 +/* This file is generated mechanically by genarch.c. */
382@@ -370,9 +361,8 @@ diff -Naur ghostscript-9.05.orig/mips-arch.h ghostscript-9.05/mips-arch.h
383 +#define ARCH_ARITH_RSHIFT 2
384 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
385 +
386-diff -Naur ghostscript-9.05.orig/mipsel-arch.h ghostscript-9.05/mipsel-arch.h
387---- ghostscript-9.05.orig/mipsel-arch.h 1969-12-31 19:00:00.000000000 -0500
388-+++ ghostscript-9.05/mipsel-arch.h 2012-02-13 13:08:44.000000000 -0500
389+--- /dev/null
390++++ b/mipsel-arch.h
391 @@ -0,0 +1,41 @@
392 +/* Parameters derived from machine and compiler architecture. */
393 +/* This file is generated mechanically by genarch.c. */
394@@ -415,9 +405,8 @@ diff -Naur ghostscript-9.05.orig/mipsel-arch.h ghostscript-9.05/mipsel-arch.h
395 +#define ARCH_ARITH_RSHIFT 2
396 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
397 +
398-diff -Naur ghostscript-9.05.orig/nios2-arch.h ghostscript-9.05/nios2-arch.h
399---- ghostscript-9.05.orig/nios2-arch.h 1969-12-31 19:00:00.000000000 -0500
400-+++ ghostscript-9.05/nios2-arch.h 2012-02-13 13:08:44.000000000 -0500
401+--- /dev/null
402++++ b/nios2-arch.h
403 @@ -0,0 +1,41 @@
404 +/* Parameters derived from machine and compiler architecture. */
405 +/* This file is generated mechanically by genarch.c. */
406@@ -460,9 +449,8 @@ diff -Naur ghostscript-9.05.orig/nios2-arch.h ghostscript-9.05/nios2-arch.h
407 +#define ARCH_ARITH_RSHIFT 2
408 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
409 +
410-diff -Naur ghostscript-9.05.orig/powerpc-arch.h ghostscript-9.05/powerpc-arch.h
411---- ghostscript-9.05.orig/powerpc-arch.h 1969-12-31 19:00:00.000000000 -0500
412-+++ ghostscript-9.05/powerpc-arch.h 2012-02-13 13:08:44.000000000 -0500
413+--- /dev/null
414++++ b/powerpc-arch.h
415 @@ -0,0 +1,41 @@
416 +/* Parameters derived from machine and compiler architecture. */
417 +/* This file is generated mechanically by genarch.c. */
418@@ -505,9 +493,8 @@ diff -Naur ghostscript-9.05.orig/powerpc-arch.h ghostscript-9.05/powerpc-arch.h
419 +#define ARCH_ARITH_RSHIFT 2
420 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
421 +
422-diff -Naur ghostscript-9.05.orig/sh-arch.h ghostscript-9.05/sh-arch.h
423---- ghostscript-9.05.orig/sh-arch.h 1969-12-31 19:00:00.000000000 -0500
424-+++ ghostscript-9.05/sh-arch.h 2012-02-13 13:08:44.000000000 -0500
425+--- /dev/null
426++++ b/sh-arch.h
427 @@ -0,0 +1,41 @@
428 +/* Parameters derived from machine and compiler architecture. */
429 +/* This file is generated mechanically by genarch.c. */
430@@ -550,9 +537,8 @@ diff -Naur ghostscript-9.05.orig/sh-arch.h ghostscript-9.05/sh-arch.h
431 +#define ARCH_ARITH_RSHIFT 2
432 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
433 +
434-diff -Naur ghostscript-9.05.orig/sparc-arch.h ghostscript-9.05/sparc-arch.h
435---- ghostscript-9.05.orig/sparc-arch.h 1969-12-31 19:00:00.000000000 -0500
436-+++ ghostscript-9.05/sparc-arch.h 2012-02-13 13:08:44.000000000 -0500
437+--- /dev/null
438++++ b/sparc-arch.h
439 @@ -0,0 +1,41 @@
440 +/* Parameters derived from machine and compiler architecture. */
441 +/* This file is generated mechanically by genarch.c. */
442@@ -595,9 +581,8 @@ diff -Naur ghostscript-9.05.orig/sparc-arch.h ghostscript-9.05/sparc-arch.h
443 +#define ARCH_ARITH_RSHIFT 2
444 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
445 +
446-diff -Naur ghostscript-9.05.orig/x86_64-arch.h ghostscript-9.05/x86_64-arch.h
447---- ghostscript-9.05.orig/x86_64-arch.h 1969-12-31 19:00:00.000000000 -0500
448-+++ ghostscript-9.05/x86_64-arch.h 2012-02-13 13:08:44.000000000 -0500
449+--- /dev/null
450++++ b/x86_64-arch.h
451 @@ -0,0 +1,41 @@
452 +/* Parameters derived from machine and compiler architecture. */
453 +/* This file is generated mechanically by genarch.c. */
454@@ -640,9 +625,8 @@ diff -Naur ghostscript-9.05.orig/x86_64-arch.h ghostscript-9.05/x86_64-arch.h
455 +#define ARCH_ARITH_RSHIFT 2
456 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
457 +
458-diff -Naur ghostscript-9.05.orig/xtensa-arch.h ghostscript-9.05/xtensa-arch.h
459---- ghostscript-9.05.orig/xtensa-arch.h 1969-12-31 19:00:00.000000000 -0500
460-+++ ghostscript-9.05/xtensa-arch.h 2012-02-13 13:08:44.000000000 -0500
461+--- /dev/null
462++++ b/xtensa-arch.h
463 @@ -0,0 +1,41 @@
464 +/* Parameters derived from machine and compiler architecture. */
465 +/* This file is generated mechanically by genarch.c. */
466@@ -685,7 +669,7 @@ diff -Naur ghostscript-9.05.orig/xtensa-arch.h ghostscript-9.05/xtensa-arch.h
467 +#define ARCH_ARITH_RSHIFT 2
468 +#define ARCH_DIV_NEG_POS_TRUNCATES 1
469 +
470---- a/aarch64-arch.h
471+--- /dev/null
472 +++ b/aarch64-arch.h
473 @@ -0,0 +1,40 @@
474 +/* Parameters derived from machine and compiler architecture. */
475diff --git a/ghostscript/patches/003-ln-several-aux-binaries.patch b/ghostscript/patches/003-ln-several-aux-binaries.patch
476index 5375406..c578238 100644
477--- a/ghostscript/patches/003-ln-several-aux-binaries.patch
478+++ b/ghostscript/patches/003-ln-several-aux-binaries.patch
479@@ -1,47 +1,51 @@
480 --- a/base/unix-aux.mak
481 +++ b/base/unix-aux.mak
482-@@ -72,21 +72,21 @@
483+@@ -57,24 +57,24 @@ $(AUX)gp_stdia.$(OBJ): $(GLSRC)gp_stdia.
484 # -------------------------- Auxiliary programs --------------------------- #
485
486- $(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS)
487+ $(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS)
488 - $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS)
489 + ln -fs OPENWRT_BASE_BUILD_PATH/obj/aux/echogs OPENWRT_PGK_BUILD_PATH/obj/aux/echogs
490
491+ $(PACKPS_XE): $(GLSRC)pack_ps.c $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS)
492+- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(PACKPS_XE) $(GLSRC)pack_ps.c $(AUXEXTRALIBS)
493++ ln -fs OPENWRT_BASE_BUILD_PATH/obj/aux/packps OPENWRT_PGK_BUILD_PATH/obj/aux/packps
494+
495 # On the RS/6000 (at least), compiling genarch.c with gcc with -O
496 # produces a buggy executable.
497- $(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS)
498+ $(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
499 - $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS)
500 + ln -fs OPENWRT_BASE_BUILD_PATH/obj/aux/genarch OPENWRT_PGK_BUILD_PATH/obj/aux/genarch
501
502- $(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS)
503+ $(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
504 - $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS)
505 + ln -fs OPENWRT_BASE_BUILD_PATH/obj/aux/genconf OPENWRT_PGK_BUILD_PATH/obj/aux/genconf
506
507- $(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS)
508+ $(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
509 - $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS)
510 + ln -fs OPENWRT_BASE_BUILD_PATH/obj/aux/gendev OPENWRT_PGK_BUILD_PATH/obj/aux/gendev
511
512- $(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS)
513+ $(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
514 - $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS)
515 + ln -fs OPENWRT_BASE_BUILD_PATH/obj/aux/genht OPENWRT_PGK_BUILD_PATH/obj/aux/genht
516
517 # To get GS to use the system zlib, you remove/hide the gs/zlib directory
518 # which means that the mkromfs build can't find the zlib source it needs.
519-@@ -96,7 +96,7 @@
520+@@ -84,7 +84,7 @@ MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AU
521 $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
522
523- $(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(MAKEDIRS)
524-- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
525+ $(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS)
526+- $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
527 + ln -fs OPENWRT_BASE_BUILD_PATH/obj/aux/mkromfs_1 OPENWRT_PGK_BUILD_PATH/obj/aux/mkromfs_1
528
529 # .... and one using the zlib library linked via the command line
530 MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
531-@@ -105,7 +105,7 @@
532+@@ -93,7 +93,7 @@ MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
533 $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ)
534
535- $(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(MAKEDIRS)
536-- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
537+ $(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS)
538+- $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
539 + ln -fs OPENWRT_BASE_BUILD_PATH/obj/aux/mkromfs_1 OPENWRT_PGK_BUILD_PATH/obj/aux/mkromfs_1
540
541- $(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
542+ $(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS)
543 $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
544diff --git a/ghostscript/patches/01-subconfig-options.patch b/ghostscript/patches/01-subconfig-options.patch
545deleted file mode 100644
546index a1e853b..0000000
547--- a/ghostscript/patches/01-subconfig-options.patch
548+++ /dev/null
549@@ -1,11 +0,0 @@
550---- a/configure
551-+++ b/configure
552-@@ -5276,7 +5276,7 @@
553- SUBCONFIG_OPTS=""
554-
555- if test x$build_alias != x; then
556--SUBCONFIG_OPTS="$SUBCONFIG_OPTS --build=$build_alias"
557-+SUBCONFIG_OPTS="$SUBCONFIG_OPTS --build=$build_alias --host=$host_alias"
558- fi
559-
560-
561diff --git a/ghostscript/patches/050-fix-paths.patch b/ghostscript/patches/050-fix-paths.patch
562index 9636135..200d9a3 100644
563--- a/ghostscript/patches/050-fix-paths.patch
564+++ b/ghostscript/patches/050-fix-paths.patch
565@@ -25,7 +25,7 @@
566
567 --- a/lib/lprsetup.sh
568 +++ b/lib/lprsetup.sh
569-@@ -33,14 +33,10 @@
570+@@ -33,14 +33,10 @@ PRINTERDEV=/dev/lp1
571 # The kind of printer (accepted values: 'parallel' and 'serial')
572 PRINTERTYPE=parallel
573
574@@ -42,7 +42,7 @@
575 GSIF=unix-lpr.sh
576 PCAP=printcap.insert
577
578-@@ -55,9 +51,6 @@
579+@@ -55,9 +51,6 @@ if [ "x$GSPATH"="x" ] ; then
580 echo
581 fi
582
583diff --git a/ghostscript/patches/060-cross-target.patch b/ghostscript/patches/060-cross-target.patch
584index 96109d1..3cf124f 100644
585--- a/ghostscript/patches/060-cross-target.patch
586+++ b/ghostscript/patches/060-cross-target.patch
587@@ -1,6 +1,6 @@
588 --- a/Makefile.in
589 +++ b/Makefile.in
590-@@ -642,3 +642,7 @@
591+@@ -760,3 +760,7 @@ maintainer-clean : distclean
592 check : default
593 $(NO_OP)
594
595diff --git a/ghostscript/patches/070-zlib.patch b/ghostscript/patches/070-zlib.patch
596index 6f901ae..057fe5a 100644
597--- a/ghostscript/patches/070-zlib.patch
598+++ b/ghostscript/patches/070-zlib.patch
599@@ -1,20 +1,20 @@
600 --- a/devices/devs.mak
601 +++ b/devices/devs.mak
602-@@ -1231,7 +1231,7 @@
603+@@ -1084,7 +1084,7 @@ $(gximdecode_h) $(DEVS_MAK) $(MAKEDIRS)
604
605- $(DEVOBJ)gdevxps.$(OBJ) : $(DEVVECSRC)gdevxps.c $(gdevvec_h) \
606+ $(DEVOBJ)gdevxps_0.$(OBJ) : $(DEVVECSRC)gdevxps.c $(gdevvec_h) \
607 $(string__h) $(stdio__h) $(libtiff_dev) $(gx_h) $(gserrors_h) \
608 -$(gxpath_h) $(gzcpath_h) $(stream_h) $(zlib_h) \
609 +$(gxpath_h) $(gzcpath_h) $(stream_h) \
610 $(stdint__h) $(gdevtifs_h) $(gsicc_create_h) $(gsicc_cache_h) \
611- $(gximdecode_h) $(MAKEDIRS)
612- $(XPSDEVCC) $(I_)$(TI_)$(_I) $(GLO_)gdevxps.$(OBJ) $(C_) $(DEVVECSRC)gdevxps.c
613-@@ -1683,7 +1683,7 @@
614+ $(gximdecode_h) $(DEVS_MAK) $(MAKEDIRS)
615+ $(XPSDEVCC) $(I_)$(TI_)$(_I) $(GLO_)gdevxps_0.$(OBJ) $(C_) $(DEVVECSRC)gdevxps.c
616+@@ -1509,7 +1509,7 @@ $(DD)pngalpha.dev : $(libpng_dev) $(png_
617 fpng_=$(DEVOBJ)gdevfpng.$(OBJ) $(DEVOBJ)gdevpccm.$(OBJ)
618
619 $(DEVOBJ)gdevfpng_0.$(OBJ) : $(DEVSRC)gdevfpng.c\
620-- $(gdevprn_h) $(gdevpccm_h) $(gscdefs_h) $(zlib_h) $(MAKEDIRS)
621-+ $(gdevprn_h) $(gdevpccm_h) $(gscdefs_h) $(MAKEDIRS)
622- $(CC_) $(I_)$(DEVI_) $(II)$(PI_)$(_I) $(PCF_) $(GLF_) $(DEVO_)gdevfpng_0.$(OBJ) $(C_) $(DEVSRC)gdevfpng.c
623+- $(gdevprn_h) $(gxdevsop_h) $(gdevpccm_h) $(gscdefs_h) $(zlib_h) $(DEVS_MAK) $(MAKEDIRS)
624++ $(gdevprn_h) $(gxdevsop_h) $(gdevpccm_h) $(gscdefs_h) $(DEVS_MAK) $(MAKEDIRS)
625+ $(CC_) $(I_)$(DEVI_) $(II)$(ZI_)$(_I) $(PCF_) $(GLF_) $(DEVO_)gdevfpng_0.$(OBJ) $(C_) $(DEVSRC)gdevfpng.c
626
627 $(DEVOBJ)gdevfpng_1.$(OBJ) : $(DEVSRC)gdevfpng.c\
628diff --git a/ghostscript/patches/100-CVE-2019-6116.patch b/ghostscript/patches/100-CVE-2019-6116.patch
629new file mode 100644
630index 0000000..9695d8e
631--- /dev/null
632+++ b/ghostscript/patches/100-CVE-2019-6116.patch
633@@ -0,0 +1,715 @@
634+From d3537a54740d78c5895ec83694a07b3e4f616f61 Mon Sep 17 00:00:00 2001
635+From: Chris Liddell <chris.liddell@artifex.com>
636+Date: Wed, 5 Dec 2018 12:22:13 +0000
637+Subject: [PATCH] Bug700317: Address .force* operators exposure
638+
639+Fix logic for an older change: unlike almost every other function in gs, dict_find_string() returns 1 on
640+success 0 or <0 on failure. The logic for this case was wrong.
641+
642+Sanitize op stack for error conditions
643+
644+We save the stacks to an array and store the array for the error handler to
645+access.
646+
647+For SAFER, we traverse the array, and deep copy any op arrays (procedures). As
648+we make these copies, we check for operators that do *not* exist in systemdict,
649+when we find one, we replace the operator with a name object (of the form
650+"/--opname--").
651+
652+Any transient procedures that call .force* operators
653+
654+(i.e. for conditionals or loops) make them executeonly.
655+
656+Harden some uses of .force* operators
657+
658+by adding a few immediate evalutions
659+
660+CVE-2019-6116
661+---
662+ Resource/Init/gs_diskn.ps | 2 +-
663+ Resource/Init/gs_dps1.ps | 8 ++--
664+ Resource/Init/gs_fntem.ps | 4 +-
665+ Resource/Init/gs_fonts.ps | 34 ++++++++---------
666+ Resource/Init/gs_init.ps | 10 ++---
667+ Resource/Init/gs_lev2.ps | 11 +++---
668+ Resource/Init/gs_pdfwr.ps | 2 +-
669+ Resource/Init/gs_res.ps | 4 +-
670+ Resource/Init/gs_setpd.ps | 2 +-
671+ Resource/Init/pdf_base.ps | 13 ++++---
672+ Resource/Init/pdf_draw.ps | 16 ++++----
673+ Resource/Init/pdf_font.ps | 6 +--
674+ Resource/Init/pdf_main.ps | 4 +-
675+ Resource/Init/pdf_ops.ps | 7 ++--
676+ psi/int.mak | 3 +-
677+ psi/interp.c | 10 ++++-
678+ psi/istack.c | 78 +++++++++++++++++++++++++++++++++++++++
679+ psi/istack.h | 3 ++
680+ 18 files changed, 157 insertions(+), 60 deletions(-)
681+
682+diff --git a/Resource/Init/gs_diskn.ps b/Resource/Init/gs_diskn.ps
683+index fd694bc44..8bf205420 100644
684+--- a/Resource/Init/gs_diskn.ps
685++++ b/Resource/Init/gs_diskn.ps
686+@@ -51,7 +51,7 @@ systemdict begin
687+ mark 5 1 roll ] mark exch { { } forall } forall ]
688+ //systemdict /.searchabledevs 2 index .forceput
689+ exch .setglobal
690+- }
691++ } executeonly
692+ if
693+ } .bind executeonly odef % must be bound and hidden for .forceput
694+
695+diff --git a/Resource/Init/gs_dps1.ps b/Resource/Init/gs_dps1.ps
696+index ec5db61b9..b75ea14e7 100644
697+--- a/Resource/Init/gs_dps1.ps
698++++ b/Resource/Init/gs_dps1.ps
699+@@ -74,18 +74,18 @@ level2dict begin
700+ } odef
701+ % undefinefont has to take local/global VM into account.
702+ /undefinefont % <fontname> undefinefont -
703+- { .FontDirectory 1 .argindex .forceundef % FontDirectory is readonly
704++ { //.FontDirectory 1 .argindex .forceundef % FontDirectory is readonly
705+ .currentglobal
706+ { % Current mode is global; delete from local directory too.
707+ //systemdict /LocalFontDirectory .knownget
708+- { 1 index .forceundef } % LocalFontDirectory is readonly
709++ { 1 index .forceundef } executeonly % LocalFontDirectory is readonly
710+ if
711+ }
712+ { % Current mode is local; if there was a shadowed global
713+ % definition, copy it into the local directory.
714+ //systemdict /SharedFontDirectory .knownget
715+ { 1 index .knownget
716+- { .FontDirectory 2 index 3 -1 roll { put } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse } % readonly
717++ { //.FontDirectory 2 index 3 -1 roll { put } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse } % readonly
718+ if
719+ }
720+ if
721+@@ -126,7 +126,7 @@ level2dict begin
722+ }
723+ ifelse
724+ } forall
725+- pop counttomark 2 idiv { .forceundef } repeat pop % readonly
726++ pop counttomark 2 idiv { .forceundef } executeonly repeat pop % readonly
727+ }
728+ if
729+ //SharedFontDirectory exch .forcecopynew pop
730+diff --git a/Resource/Init/gs_fntem.ps b/Resource/Init/gs_fntem.ps
731+index c1f7651f1..6eb672a68 100644
732+--- a/Resource/Init/gs_fntem.ps
733++++ b/Resource/Init/gs_fntem.ps
734+@@ -401,12 +401,12 @@ currentdict end def
735+ .forceput % FontInfo can be read-only.
736+ pop % bool <font>
737+ exit
738+- } if
739++ } executeonly if
740+ dup /FontInfo get % bool <font> <FI>
741+ /GlyphNames2Unicode /Unicode /Decoding findresource
742+ .forceput % FontInfo can be read-only.
743+ exit
744+- } loop
745++ } executeonly loop
746+ exch setglobal
747+ } .bind executeonly odef % must be bound and hidden for .forceput
748+
749+diff --git a/Resource/Init/gs_fonts.ps b/Resource/Init/gs_fonts.ps
750+index 803faca49..27f4135f6 100644
751+--- a/Resource/Init/gs_fonts.ps
752++++ b/Resource/Init/gs_fonts.ps
753+@@ -374,7 +374,7 @@ FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if
754+ /.setnativefontmapbuilt { % set whether we've been run
755+ dup type /booleantype eq {
756+ systemdict exch /.nativefontmapbuilt exch .forceput
757+- }
758++ } executeonly
759+ {pop}
760+ ifelse
761+ } .bind executeonly odef
762+@@ -516,7 +516,7 @@ buildfontdict 3 /.buildfont3 cvx put
763+ if
764+ }
765+ if
766+- dup .FontDirectory 4 -2 roll { .growput } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse % readonly
767++ dup //.FontDirectory 4 -2 roll { .growput } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse % readonly
768+ % If the font originated as a resource, register it.
769+ currentfile .currentresourcefile eq { dup .registerfont } if
770+ readonly
771+@@ -943,7 +943,7 @@ $error /SubstituteFont { } put
772+ % Try to find a font using only the present contents of Fontmap.
773+ /.tryfindfont { % <fontname> .tryfindfont <font> true
774+ % <fontname> .tryfindfont false
775+- .FontDirectory 1 index .fontknownget
776++ //.FontDirectory 1 index .fontknownget
777+ { % Already loaded
778+ exch pop //true
779+ }
780+@@ -975,7 +975,7 @@ $error /SubstituteFont { } put
781+ { % Font with a procedural definition
782+ exec % The procedure will load the font.
783+ % Check to make sure this really happened.
784+- .FontDirectory 1 index .knownget
785++ //.FontDirectory 1 index .knownget
786+ { exch pop //true exit }
787+ if
788+ }
789+@@ -1007,11 +1007,11 @@ $error /SubstituteFont { } put
790+ { 2 index gcheck currentglobal
791+ 2 copy eq {
792+ pop pop .forceput
793+- } {
794++ } executeonly {
795+ 5 1 roll setglobal
796+ dup length string copy
797+ .forceput setglobal
798+- } ifelse
799++ } executeonly ifelse
800+ } .bind executeonly odef % must be bound and hidden for .forceput
801+
802+ % Attempt to load a font from a file.
803+@@ -1081,11 +1081,11 @@ $error /SubstituteFont { } put
804+ % because it's different depending on language level.
805+ .currentglobal exch /.setglobal .systemvar exec
806+ % Remove the fake definition, if any.
807+- .FontDirectory 3 index .forceundef % readonly
808+- 1 index (r) file .loadfont .FontDirectory exch
809++ //.FontDirectory 3 index .forceundef % readonly
810++ 1 index (r) file .loadfont //.FontDirectory exch
811+ /.setglobal .systemvar exec
812+- }
813+- { .loadfont .FontDirectory
814++ } executeonly
815++ { .loadfont //.FontDirectory
816+ }
817+ ifelse
818+ % Stack: fontname fontfilename fontdirectory
819+@@ -1105,7 +1105,7 @@ $error /SubstituteFont { } put
820+ dup 3 index .fontknownget
821+ { dup /PathLoad 4 index .putgstringcopy
822+ 4 1 roll pop pop pop //true exit
823+- } if
824++ } executeonly if
825+
826+ % Maybe the file had a different FontName.
827+ % See if we can get a FontName from the file, and if so,
828+@@ -1119,8 +1119,8 @@ $error /SubstituteFont { } put
829+ % Stack: origfontname fontdirectory filefontname fontdict
830+ 3 -1 roll pop
831+ % Stack: origfontname filefontname fontdict
832+- dup /FontName get dup FontDirectory exch .forceundef
833+- GlobalFontDirectory exch .forceundef
834++ dup /FontName get dup //.FontDirectory exch .forceundef
835++ /GlobalFontDirectory .systemvar exch .forceundef
836+ dup length dict .copydict dup 3 index /FontName exch put
837+ 2 index exch definefont
838+ exch
839+@@ -1134,9 +1134,9 @@ $error /SubstituteFont { } put
840+ ifelse % Stack: origfontname fontdict
841+ exch pop //true exit
842+ % Stack: fontdict
843+- }
844++ } executeonly
845+ if pop % Stack: origfontname fontdirectory path
846+- }
847++ } executeonly
848+ if pop pop % Stack: origfontname
849+
850+ % The font definitely did not load correctly.
851+@@ -1176,10 +1176,10 @@ currentdict /.putgstringcopy .undef
852+ {
853+ {
854+ pop dup type /stringtype eq { cvn } if
855+- .FontDirectory 1 index known not {
856++ //.FontDirectory 1 index known not {
857+ 2 dict dup /FontName 3 index put
858+ dup /FontType 1 put
859+- .FontDirectory 3 1 roll { put } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse % readonly
860++ //.FontDirectory 3 1 roll { put } systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse % readonly
861+ } {
862+ pop
863+ } ifelse
864+diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
865+index d733124b9..d9a0829f7 100644
866+--- a/Resource/Init/gs_init.ps
867++++ b/Resource/Init/gs_init.ps
868+@@ -1168,8 +1168,8 @@ errordict /unknownerror .undef
869+ }ifelse
870+ }forall
871+ noaccess pop
872+- systemdict /.setsafeerrors .forceundef
873+- systemdict /.SAFERERRORLIST .forceundef
874++ //systemdict /.setsafeerrors .forceundef
875++ //systemdict /.SAFERERRORLIST .forceundef
876+ } bind executeonly odef
877+
878+ SAFERERRORS {.setsafererrors} if
879+@@ -2114,7 +2114,7 @@ currentdict /tempfilepaths undef
880+
881+ /.locksafe {
882+ .locksafe_userparams
883+- systemdict /getenv {pop //false} .forceput
884++ //systemdict /getenv {pop //false} .forceput
885+ % setpagedevice has the side effect of clearing the page, but
886+ % we will just document that. Using setpagedevice keeps the device
887+ % properties and pagedevice .LockSafetyParams in agreement even
888+@@ -2357,7 +2357,7 @@ SAFER { .setsafeglobal } if
889+ % Update the copy of the user parameters.
890+ mark .currentuserparams counttomark 2 idiv {
891+ userparams 3 1 roll .forceput % userparams is read-only
892+- } repeat pop
893++ } executeonly repeat pop
894+ % Turn on idiom recognition, if available.
895+ currentuserparams /IdiomRecognition known {
896+ /IdiomRecognition //true .definepsuserparam
897+@@ -2376,7 +2376,7 @@ SAFER { .setsafeglobal } if
898+ % Remove real system params from pssystemparams.
899+ mark .currentsystemparams counttomark 2 idiv {
900+ pop pssystemparams exch .forceundef
901+- } repeat pop
902++ } executeonly repeat pop
903+ } if
904+
905+ % Set up AlignToPixels :
906+diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps
907+index 44fe61956..0f0d57331 100644
908+--- a/Resource/Init/gs_lev2.ps
909++++ b/Resource/Init/gs_lev2.ps
910+@@ -154,7 +154,8 @@ end
911+ % protect top level of parameters that we copied
912+ dup type dup /arraytype eq exch /stringtype eq or { readonly } if
913+ /userparams .systemvar 3 1 roll .forceput % userparams is read-only
914+- } {
915++ } executeonly
916++ {
917+ pop pop
918+ } ifelse
919+ } forall
920+@@ -224,7 +225,7 @@ end
921+ % protect top level parameters that we copied
922+ dup type dup /arraytype eq exch /stringtype eq or { readonly } if
923+ //pssystemparams 3 1 roll .forceput % pssystemparams is read-only
924+- }
925++ } executeonly
926+ { pop pop
927+ }
928+ ifelse
929+@@ -934,7 +935,7 @@ mark
930+ dup /PaintProc get
931+ 1 index /Implementation known not {
932+ 1 index dup /Implementation //null .forceput readonly pop
933+- } if
934++ } executeonly if
935+ exec
936+ }.bind odef
937+
938+@@ -958,7 +959,7 @@ mark
939+ dup /PaintProc get
940+ 1 index /Implementation known not {
941+ 1 index dup /Implementation //null .forceput readonly pop
942+- } if
943++ } executeonly if
944+ /UNROLLFORMS where {/UNROLLFORMS get}{false}ifelse not
945+ %% [CTM] <<Form>> PaintProc .beginform -
946+ {
947+@@ -1005,7 +1006,7 @@ mark
948+ %% Form dictioanry using the /Implementation key).
949+ 1 dict dup /FormID 4 -1 roll put
950+ 1 index exch /Implementation exch .forceput readonly pop
951+- }
952++ } executeonly
953+ ifelse
954+ }
955+ {
956+diff --git a/Resource/Init/gs_pdfwr.ps b/Resource/Init/gs_pdfwr.ps
957+index 58e75d3a4..b425103d1 100644
958+--- a/Resource/Init/gs_pdfwr.ps
959++++ b/Resource/Init/gs_pdfwr.ps
960+@@ -650,7 +650,7 @@ currentdict /.pdfmarkparams .undef
961+ } ifelse
962+ } bind .makeoperator .forceput
963+ systemdict /.pdf_hooked_DSC_Creator //true .forceput
964+- } if
965++ } executeonly if
966+ pop
967+ } if
968+ } {
969+diff --git a/Resource/Init/gs_res.ps b/Resource/Init/gs_res.ps
970+index 8eb8bb0e5..d9b34599e 100644
971+--- a/Resource/Init/gs_res.ps
972++++ b/Resource/Init/gs_res.ps
973+@@ -152,7 +152,7 @@ setglobal
974+ % use .forceput / .forcedef later to replace the dummy,
975+ % empty .Instances dictionary with the real one later.
976+ readonly
977+- } {
978++ }{
979+ /defineresource cvx /typecheck signaloperror
980+ } ifelse
981+ } bind executeonly odef
982+@@ -424,7 +424,7 @@ status {
983+ % As noted above, Category dictionaries are read-only,
984+ % so we have to use .forcedef here.
985+ /.Instances 1 index .forcedef % Category dict is read-only
986+- } if
987++ } executeonly if
988+ }
989+ { .LocalInstances dup //.emptydict eq
990+ { pop 3 dict localinstancedict Category 2 index put
991+diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps
992+index e22597ebb..7875d1f2f 100644
993+--- a/Resource/Init/gs_setpd.ps
994++++ b/Resource/Init/gs_setpd.ps
995+@@ -634,7 +634,7 @@ NOMEDIAATTRS {
996+ SETPDDEBUG { (Rolling back.) = pstack flush } if
997+ 3 index 2 index 3 -1 roll .forceput
998+ 4 index 1 index .knownget
999+- { 4 index 3 1 roll .forceput }
1000++ { 4 index 3 1 roll .forceput } executeonly
1001+ { 3 index exch .undef }
1002+ ifelse
1003+ } bind executeonly odef
1004+diff --git a/Resource/Init/pdf_base.ps b/Resource/Init/pdf_base.ps
1005+index b45e98031..73127296c 100644
1006+--- a/Resource/Init/pdf_base.ps
1007++++ b/Resource/Init/pdf_base.ps
1008+@@ -130,26 +130,29 @@ currentdict /num-chars-dict .undef
1009+
1010+ /.pdfexectoken { % <count> <opdict> <exectoken> .pdfexectoken ?
1011+ PDFDEBUG {
1012+- pdfdict /PDFSTEPcount known not { pdfdict /PDFSTEPcount 1 .forceput } if
1013++ pdfdict /PDFSTEPcount known not { pdfdict /PDFSTEPcount 1 .forceput } executeonly if
1014+ PDFSTEP {
1015+ pdfdict /PDFtokencount 2 copy .knownget { 1 add } { 1 } ifelse .forceput
1016+ PDFSTEPcount 1 gt {
1017+ pdfdict /PDFSTEPcount PDFSTEPcount 1 sub .forceput
1018+- } {
1019++ } executeonly
1020++ {
1021+ dup ==only
1022+ ( step # ) print PDFtokencount =only
1023+ ( ? ) print flush 1 //false .outputpage
1024+ (%stdin) (r) file 255 string readline {
1025+ token {
1026+ exch pop pdfdict /PDFSTEPcount 3 -1 roll .forceput
1027+- } {
1028++ } executeonly
1029++ {
1030+ pdfdict /PDFSTEPcount 1 .forceput
1031+- } ifelse % token
1032++ } executeonly ifelse % token
1033+ } {
1034+ pop /PDFSTEP //false def % EOF on stdin
1035+ } ifelse % readline
1036+ } ifelse % PDFSTEPcount > 1
1037+- } {
1038++ } executeonly
1039++ {
1040+ dup ==only () = flush
1041+ } ifelse % PDFSTEP
1042+ } if % PDFDEBUG
1043+diff --git a/Resource/Init/pdf_draw.ps b/Resource/Init/pdf_draw.ps
1044+index 6b0ba93e1..40c6ac80a 100644
1045+--- a/Resource/Init/pdf_draw.ps
1046++++ b/Resource/Init/pdf_draw.ps
1047+@@ -1118,14 +1118,14 @@ currentdict end readonly def
1048+ pdfdict /.Qqwarning_issued //true .forceput
1049+ .setglobal
1050+ pdfformaterror
1051+- } ifelse
1052++ } executeonly ifelse
1053+ }
1054+ {
1055+ currentglobal pdfdict gcheck .setglobal
1056+ pdfdict /.Qqwarning_issued //true .forceput
1057+ .setglobal
1058+ pdfformaterror
1059+- } ifelse
1060++ } executeonly ifelse
1061+ end
1062+ } ifelse
1063+ } loop
1064+@@ -1141,14 +1141,14 @@ currentdict end readonly def
1065+ pdfdict /.Qqwarning_issued //true .forceput
1066+ .setglobal
1067+ pdfformaterror
1068+- } ifelse
1069++ } executeonly ifelse
1070+ }
1071+ {
1072+ currentglobal pdfdict gcheck .setglobal
1073+ pdfdict /.Qqwarning_issued //true .forceput
1074+ .setglobal
1075+ pdfformaterror
1076+- } ifelse
1077++ } executeonly ifelse
1078+ } if
1079+ pop
1080+
1081+@@ -2350,9 +2350,10 @@ currentdict /last-ditch-bpc-csp undef
1082+ /IncrementAppearanceNumber {
1083+ pdfdict /AppearanceNumber .knownget {
1084+ 1 add pdfdict /AppearanceNumber 3 -1 roll .forceput
1085+- }{
1086++ } executeonly
1087++ {
1088+ pdfdict /AppearanceNumber 0 .forceput
1089+- } ifelse
1090++ } executeonly ifelse
1091+ }bind executeonly odef
1092+
1093+ /MakeAppearanceName {
1094+@@ -2510,7 +2511,8 @@ currentdict /last-ditch-bpc-csp undef
1095+ %% want to preserve it.
1096+ pdfdict /.PreservePDFForm false .forceput
1097+ /q cvx /execform cvx 5 -2 roll
1098+- }{
1099++ } executeonly
1100++ {
1101+ /q cvx /PDFexecform cvx 5 -2 roll
1102+ } ifelse
1103+
1104+diff --git a/Resource/Init/pdf_font.ps b/Resource/Init/pdf_font.ps
1105+index bea9ea95a..4cd62b9d9 100644
1106+--- a/Resource/Init/pdf_font.ps
1107++++ b/Resource/Init/pdf_font.ps
1108+@@ -714,7 +714,7 @@ currentdict end readonly def
1109+ pop pop pop
1110+ currentdict /.stackdepth .forceundef
1111+ currentdict /.dstackdepth .forceundef
1112+- }
1113++ } executeonly
1114+ {pop pop pop}
1115+ ifelse
1116+
1117+@@ -1232,7 +1232,7 @@ currentdict /eexec_pdf_param_dict .undef
1118+ (\n **** Warning: Type 3 glyph has unbalanced q/Q operators \(too many q's\)\n Output may be incorrect.\n)
1119+ pdfformatwarning
1120+ pdfdict /.Qqwarning_issued //true .forceput
1121+- } if
1122++ } executeonly if
1123+ Q
1124+ } repeat
1125+ Q
1126+@@ -2016,7 +2016,7 @@ currentdict /CMap_read_dict undef
1127+ /CIDFallBack /CIDFont findresource
1128+ } if
1129+ exit
1130+- } if
1131++ } executeonly if
1132+ } if
1133+ } if
1134+
1135+diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps
1136+index 00da47a48..37e69b39a 100644
1137+--- a/Resource/Init/pdf_main.ps
1138++++ b/Resource/Init/pdf_main.ps
1139+@@ -2701,14 +2701,14 @@ currentdict /PDF2PS_matrix_key undef
1140+ pdfdict /.Qqwarning_issued //true .forceput
1141+ .setglobal
1142+ pdfformaterror
1143+- } ifelse
1144++ } executeonly ifelse
1145+ }
1146+ {
1147+ currentglobal pdfdict gcheck .setglobal
1148+ pdfdict /.Qqwarning_issued //true .forceput
1149+ .setglobal
1150+ pdfformaterror
1151+- } ifelse
1152++ } executeonly ifelse
1153+ } if
1154+ } if
1155+ pop
1156+diff --git a/Resource/Init/pdf_ops.ps b/Resource/Init/pdf_ops.ps
1157+index 8672d617f..aa0964139 100644
1158+--- a/Resource/Init/pdf_ops.ps
1159++++ b/Resource/Init/pdf_ops.ps
1160+@@ -184,14 +184,14 @@ currentdict /gput_always_allow .undef
1161+ pdfdict /.Qqwarning_issued //true .forceput
1162+ .setglobal
1163+ pdfformaterror
1164+- } ifelse
1165++ } executeonly ifelse
1166+ }
1167+ {
1168+ currentglobal pdfdict gcheck .setglobal
1169+ pdfdict /.Qqwarning_issued //true .forceput
1170+ .setglobal
1171+ pdfformaterror
1172+- } ifelse
1173++ } executeonly ifelse
1174+ } if
1175+ } bind executeonly odef
1176+
1177+@@ -439,7 +439,8 @@ currentdict /gput_always_allow .undef
1178+ dup type /booleantype eq {
1179+ .currentSMask type /dicttype eq {
1180+ .currentSMask /Processed 2 index .forceput
1181+- } {
1182++ } executeonly
1183++ {
1184+ .setSMask
1185+ }ifelse
1186+ }{
1187+diff --git a/psi/int.mak b/psi/int.mak
1188+index 6ab5bf006..6b349cb04 100644
1189+--- a/psi/int.mak
1190++++ b/psi/int.mak
1191+@@ -204,7 +204,8 @@ $(PSOBJ)iparam.$(OBJ) : $(PSSRC)iparam.c $(GH)\
1192+ $(PSOBJ)istack.$(OBJ) : $(PSSRC)istack.c $(GH) $(memory__h)\
1193+ $(ierrors_h) $(gsstruct_h) $(gsutil_h)\
1194+ $(ialloc_h) $(istack_h) $(istkparm_h) $(istruct_h) $(iutil_h) $(ivmspace_h)\
1195+- $(store_h) $(INT_MAK) $(MAKEDIRS)
1196++ $(store_h) $(icstate_h) $(iname_h) $(dstack_h) $(idict_h) \
1197++ $(INT_MAK) $(MAKEDIRS)
1198+ $(PSCC) $(PSO_)istack.$(OBJ) $(C_) $(PSSRC)istack.c
1199+
1200+ $(PSOBJ)iutil.$(OBJ) : $(PSSRC)iutil.c $(GH) $(math__h) $(memory__h) $(string__h)\
1201+diff --git a/psi/interp.c b/psi/interp.c
1202+index 6dc0ddae1..f6c45bbe2 100644
1203+--- a/psi/interp.c
1204++++ b/psi/interp.c
1205+@@ -703,7 +703,7 @@ again:
1206+ * i.e. it's an internal operator we have hidden
1207+ */
1208+ code = dict_find_string(systemdict, (const char *)bufptr, &tobj);
1209+- if (code < 0) {
1210++ if (code <= 0) {
1211+ buf[0] = buf[1] = buf[rlen + 2] = buf[rlen + 3] = '-';
1212+ rlen += 4;
1213+ bufptr = buf;
1214+@@ -761,6 +761,7 @@ copy_stack(i_ctx_t *i_ctx_p, const ref_stack_t * pstack, int skip, ref * arr)
1215+ uint size = ref_stack_count(pstack) - skip;
1216+ uint save_space = ialloc_space(idmemory);
1217+ int code, i;
1218++ ref *safety, *safe;
1219+
1220+ if (size > 65535)
1221+ size = 65535;
1222+@@ -778,6 +779,13 @@ copy_stack(i_ctx_t *i_ctx_p, const ref_stack_t * pstack, int skip, ref * arr)
1223+ make_null(&arr->value.refs[i]);
1224+ }
1225+ }
1226++ if (pstack == &o_stack && dict_find_string(systemdict, "SAFETY", &safety) > 0 &&
1227++ dict_find_string(safety, "safe", &safe) > 0 && r_has_type(safe, t_boolean) &&
1228++ safe->value.boolval == true) {
1229++ code = ref_stack_array_sanitize(i_ctx_p, arr, arr);
1230++ if (code < 0)
1231++ return code;
1232++ }
1233+ ialloc_set_space(idmemory, save_space);
1234+ return code;
1235+ }
1236+diff --git a/psi/istack.c b/psi/istack.c
1237+index 8fe151fa5..f1a3e5115 100644
1238+--- a/psi/istack.c
1239++++ b/psi/istack.c
1240+@@ -27,6 +27,10 @@
1241+ #include "iutil.h"
1242+ #include "ivmspace.h" /* for local/global test */
1243+ #include "store.h"
1244++#include "icstate.h"
1245++#include "iname.h"
1246++#include "dstack.h"
1247++#include "idict.h"
1248+
1249+ /* Forward references */
1250+ static void init_block(ref_stack_t *pstack, const ref *pblock_array,
1251+@@ -294,6 +298,80 @@ ref_stack_store_check(const ref_stack_t *pstack, ref *parray, uint count,
1252+ return 0;
1253+ }
1254+
1255++int
1256++ref_stack_array_sanitize(i_ctx_t *i_ctx_p, ref *sarr, ref *darr)
1257++{
1258++ int i, code;
1259++ ref obj, arr2;
1260++ ref *pobj2;
1261++ gs_memory_t *mem = (gs_memory_t *)idmemory->current;
1262++
1263++ if (!r_is_array(sarr) || !r_has_type(darr, t_array))
1264++ return_error(gs_error_typecheck);
1265++
1266++ for (i = 0; i < r_size(sarr); i++) {
1267++ code = array_get(mem, sarr, i, &obj);
1268++ if (code < 0)
1269++ make_null(&obj);
1270++ switch(r_type(&obj)) {
1271++ case t_operator:
1272++ {
1273++ int index = op_index(&obj);
1274++
1275++ if (index > 0 && index < op_def_count) {
1276++ const byte *data = (const byte *)(op_index_def(index)->oname + 1);
1277++ if (dict_find_string(systemdict, (const char *)data, &pobj2) <= 0) {
1278++ byte *s = gs_alloc_bytes(mem, strlen((char *)data) + 5, "ref_stack_array_sanitize");
1279++ if (s) {
1280++ s[0] = '\0';
1281++ strcpy((char *)s, "--");
1282++ strcpy((char *)s + 2, (char *)data);
1283++ strcpy((char *)s + strlen((char *)data) + 2, "--");
1284++ }
1285++ else {
1286++ s = (byte *)data;
1287++ }
1288++ code = name_ref(imemory, s, strlen((char *)s), &obj, 1);
1289++ if (code < 0) make_null(&obj);
1290++ if (s != data)
1291++ gs_free_object(mem, s, "ref_stack_array_sanitize");
1292++ }
1293++ }
1294++ else {
1295++ make_null(&obj);
1296++ }
1297++ ref_assign(darr->value.refs + i, &obj);
1298++ break;
1299++ }
1300++ case t_array:
1301++ case t_shortarray:
1302++ case t_mixedarray:
1303++ {
1304++ int attrs = r_type_attrs(&obj) & (a_write | a_read | a_execute | a_executable);
1305++ /* We only want to copy executable arrays */
1306++ if (attrs & (a_execute | a_executable)) {
1307++ code = ialloc_ref_array(&arr2, attrs, r_size(&obj), "ref_stack_array_sanitize");
1308++ if (code < 0) {
1309++ make_null(&arr2);
1310++ }
1311++ else {
1312++ code = ref_stack_array_sanitize(i_ctx_p, &obj, &arr2);
1313++ }
1314++ ref_assign(darr->value.refs + i, &arr2);
1315++ }
1316++ else {
1317++ ref_assign(darr->value.refs + i, &obj);
1318++ }
1319++ break;
1320++ }
1321++ default:
1322++ ref_assign(darr->value.refs + i, &obj);
1323++ }
1324++ }
1325++ return 0;
1326++}
1327++
1328++
1329+ /*
1330+ * Store the top 'count' elements of a stack, starting 'skip' elements below
1331+ * the top, into an array, with or without store/undo checking. age=-1 for
1332+diff --git a/psi/istack.h b/psi/istack.h
1333+index 051dcbe21..54be405ad 100644
1334+--- a/psi/istack.h
1335++++ b/psi/istack.h
1336+@@ -129,6 +129,9 @@ int ref_stack_store(const ref_stack_t *pstack, ref *parray, uint count,
1337+ uint skip, int age, bool check,
1338+ gs_dual_memory_t *idmem, client_name_t cname);
1339+
1340++int
1341++ref_stack_array_sanitize(i_ctx_t *i_ctx_p, ref *sarr, ref *darr);
1342++
1343+ /*
1344+ * Pop the top N elements off a stack.
1345+ * The number must not exceed the number of elements in use.
1346+--
1347+2.17.1
1348+
1349diff --git a/libupnp-1.8/Makefile b/libupnp-1.8/Makefile
1350deleted file mode 100644
1351index 65984c6..0000000
1352--- a/libupnp-1.8/Makefile
1353+++ /dev/null
1354@@ -1,59 +0,0 @@
1355-#
1356-# Copyright (C) 2011-2019 Entware
1357-#
1358-# This is free software, licensed under the GNU General Public License v2.
1359-# See /LICENSE for more information.
1360-#
1361-# Used by gerbera package
1362-# This is the last version with "-1.8" suffix https://github.com/mrjimenez/pupnp/commit/07f504c61bd9e4d93eb3d373ffc8527cafe0b9af
1363-
1364-include $(TOPDIR)/rules.mk
1365-
1366-PKG_NAME:=libupnp-1.8
1367-PKG_VERSION:=1.8.3
1368-PKG_REV:=cea5496e27f5122369c897d82304ca9e8fa49ba7
1369-PKG_RELEASE:=1
1370-
1371-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
1372-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
1373-PKG_SOURCE_URL:=https://github.com/mrjimenez/pupnp.git
1374-PKG_SOURCE_PROTO:=git
1375-PKG_SOURCE_VERSION:=$(PKG_REV)
1376-
1377-PKG_FIXUP:=autoreconf
1378-PKG_INSTALL:=1
1379-
1380-include $(INCLUDE_DIR)/package.mk
1381-
1382-define Package/libupnp-1.8
1383- SECTION:=libs
1384- CATEGORY:=Libraries
1385- DEPENDS:=+libpthread
1386- TITLE:=UPnP 1.8 SDK library
1387- URL:=http://pupnp.sourceforge.net/
1388- MAINTAINER:=Entware team, https://entware.net
1389-endef
1390-
1391-define Package/libupnp-1.8/description
1392- The portable SDK for UPnP Devices (libupnp 1.8).
1393-endef
1394-
1395-CONFIGURE_ARGS += \
1396- --enable-reuseaddr \
1397- --disable-samples
1398-
1399-define Build/InstallDev
1400- $(INSTALL_DIR) $(1)/opt/include
1401- $(CP) $(PKG_INSTALL_DIR)/opt/include/upnp-1.8 $(1)/opt/include
1402- $(INSTALL_DIR) $(1)/opt/lib
1403- $(CP) $(PKG_INSTALL_DIR)/opt/lib/lib{ixml,upnp}-1.8.{a,so*} $(1)/opt/lib
1404- $(INSTALL_DIR) $(1)/opt/lib/pkgconfig
1405- $(CP) $(PKG_INSTALL_DIR)/opt/lib/pkgconfig/libupnp.pc $(1)/opt/lib/pkgconfig/libupnp-1.8.pc
1406-endef
1407-
1408-define Package/libupnp-1.8/install
1409- $(INSTALL_DIR) $(1)/opt/lib
1410- $(CP) $(PKG_INSTALL_DIR)/opt/lib/lib{ixml,upnp}-1.8.so* $(1)/opt/lib
1411-endef
1412-
1413-$(eval $(call BuildPackage,libupnp-1.8))
1414diff --git a/libupnp-1.8/patches/010-revert-lib-suffix.patch b/libupnp-1.8/patches/010-revert-lib-suffix.patch
1415deleted file mode 100644
1416index 4c89cf9..0000000
1417--- a/libupnp-1.8/patches/010-revert-lib-suffix.patch
1418+++ /dev/null
1419@@ -1,346 +0,0 @@
1420-diff -ur libupnp-1.8-1.8.3.orig/ixml/Makefile.am libupnp-1.8-1.8.3/ixml/Makefile.am
1421---- libupnp-1.8-1.8.3.orig/ixml/Makefile.am 2017-11-14 14:02:53.000000000 +0300
1422-+++ libupnp-1.8-1.8.3/ixml/Makefile.am 2018-08-29 16:52:03.577037705 +0300
1423-@@ -11,7 +11,7 @@
1424- -I$(top_srcdir)/upnp/inc
1425- AM_CFLAGS =
1426-
1427--LDADD = libixml.la
1428-+LDADD = libixml-1.8.la
1429-
1430- if ENABLE_DEBUG
1431- AM_CPPFLAGS += -DDEBUG
1432-@@ -23,12 +23,12 @@
1433- AM_CPPFLAGS += -DIXML_HAVE_SCRIPTSUPPORT
1434- endif
1435-
1436--lib_LTLIBRARIES = libixml.la
1437-+lib_LTLIBRARIES = libixml-1.8.la
1438-
1439--libixml_la_LDFLAGS = -version-info $(LT_VERSION_IXML) \
1440-+libixml_1_8_la_LDFLAGS = -version-info $(LT_VERSION_IXML) \
1441- -export-symbols-regex '^ixml.*'
1442-
1443--libixml_la_SOURCES = \
1444-+libixml_1_8_la_SOURCES = \
1445- src/attr.c \
1446- src/document.c \
1447- src/element.c \
1448-@@ -42,15 +42,15 @@
1449- src/node.c \
1450- src/nodeList.c
1451-
1452--upnpincludedir = $(includedir)/upnp
1453-+upnpincludedir = $(includedir)/upnp-1.8
1454- upnpinclude_HEADERS = \
1455- inc/ixml.h \
1456- inc/ixmldebug.h
1457-
1458--check_PROGRAMS = test_document
1459-+check_PROGRAMS = test_document-1.8
1460- TESTS = test/test_document.sh
1461-
1462--test_document_SOURCES = test/test_document.c
1463-+test_document_1_8_SOURCES = test/test_document.c
1464-
1465- EXTRA_DIST = test/test_document.sh test/testdata
1466-
1467-diff -ur libupnp-1.8-1.8.3.orig/libupnp.pc.in libupnp-1.8-1.8.3/libupnp.pc.in
1468---- libupnp-1.8-1.8.3.orig/libupnp.pc.in 2017-11-14 14:02:53.000000000 +0300
1469-+++ libupnp-1.8-1.8.3/libupnp.pc.in 2018-08-29 16:52:03.577037705 +0300
1470-@@ -3,9 +3,9 @@
1471- libdir=@libdir@
1472- includedir=@includedir@
1473-
1474--Name: libupnp
1475-+Name: libupnp-1.8
1476- Description: Linux SDK for UPnP Devices
1477- Version: @VERSION@
1478--Libs: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ -L${libdir} -lupnp -lixml
1479--Cflags: @PTHREAD_CFLAGS@ -I${includedir}/upnp
1480-+Libs: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ -L${libdir} -lupnp-1.8 -lixml-1.8
1481-+Cflags: @PTHREAD_CFLAGS@ -I${includedir}/upnp-1.8
1482-
1483-diff -ur libupnp-1.8-1.8.3.orig/libupnp.spec libupnp-1.8-1.8.3/libupnp.spec
1484---- libupnp-1.8-1.8.3.orig/libupnp.spec 2017-11-14 14:02:53.000000000 +0300
1485-+++ libupnp-1.8-1.8.3/libupnp.spec 2018-08-29 16:52:03.577037705 +0300
1486-@@ -48,7 +48,7 @@
1487- %{__mv} %{buildroot}%{docdir}/html \
1488- %{buildroot}%{docdeveldir}/
1489-
1490--%{__rm} %{buildroot}%{_libdir}/{libixml.la,libupnp.la}
1491-+%{__rm} %{buildroot}%{_libdir}/{libixml-1.8.la,libupnp-1.8.la}
1492-
1493- %post -p /sbin/ldconfig
1494-
1495-@@ -57,18 +57,18 @@
1496- %files
1497- %defattr(-,root,root,-)
1498- %doc %{docdir}
1499--%{_libdir}/libixml.so.*
1500--%{_libdir}/libupnp.so.*
1501-+%{_libdir}/libixml-1.8.so.*
1502-+%{_libdir}/libupnp-1.8.so.*
1503-
1504- %files devel
1505- %defattr(0644,root,root,0755)
1506- %doc %{docdeveldir}
1507--%{_includedir}/upnp/
1508--%{_libdir}/libixml.so
1509--%{_libdir}/libupnp.so
1510--%{_libdir}/libixml.a
1511--%{_libdir}/libupnp.a
1512--%{_libdir}/pkgconfig/libupnp.pc
1513-+%{_includedir}/upnp-1.8/
1514-+%{_libdir}/libixml-1.8.so
1515-+%{_libdir}/libupnp-1.8.so
1516-+%{_libdir}/libixml-1.8.a
1517-+%{_libdir}/libupnp-1.8.a
1518-+%{_libdir}/pkgconfig/libupnp-1.8.pc
1519-
1520- %clean
1521- rm -rf %{buildroot}
1522-diff -ur libupnp-1.8-1.8.3.orig/upnp/Makefile.am libupnp-1.8-1.8.3/upnp/Makefile.am
1523---- libupnp-1.8-1.8.3.orig/upnp/Makefile.am 2017-11-14 14:02:53.000000000 +0300
1524-+++ libupnp-1.8-1.8.3/upnp/Makefile.am 2018-08-29 16:52:03.577037705 +0300
1525-@@ -11,11 +11,11 @@
1526- -I$(top_srcdir)/ixml/inc
1527-
1528- LDADD = \
1529-- libupnp.la \
1530-- $(top_builddir)/ixml/libixml.la
1531-+ libupnp-1.8.la \
1532-+ $(top_builddir)/ixml/libixml-1.8.la
1533-
1534-
1535--upnpincludedir = $(includedir)/upnp
1536-+upnpincludedir = $(includedir)/upnp-1.8
1537- upnpinclude_HEADERS = \
1538- inc/ActionComplete.h \
1539- inc/ActionRequest.h \
1540-@@ -47,16 +47,16 @@
1541- endif
1542-
1543-
1544--lib_LTLIBRARIES = libupnp.la
1545-+lib_LTLIBRARIES = libupnp-1.8.la
1546-
1547--libupnp_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/src/inc
1548-+libupnp_1_8_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/src/inc
1549-
1550--libupnp_la_LDFLAGS = \
1551-+libupnp_1_8_la_LDFLAGS = \
1552- -version-info $(LT_VERSION_UPNP) \
1553- -export-symbols-regex '^Upnp.*' \
1554-- $(top_builddir)/ixml/libixml.la
1555-+ $(top_builddir)/ixml/libixml-1.8.la
1556-
1557--libupnp_la_SOURCES = \
1558-+libupnp_1_8_la_SOURCES = \
1559- src/inc/config.h \
1560- src/inc/client_table.h \
1561- src/inc/ClientSubscription.h \
1562-@@ -95,8 +95,8 @@
1563- upnpinclude_HEADERS += \
1564- inc/ithread.h
1565-
1566--libupnp_la_CPPFLAGS += -I$(srcdir)/src/threadutil
1567--libupnp_la_SOURCES += \
1568-+libupnp_1_8_la_CPPFLAGS += -I$(srcdir)/src/threadutil
1569-+libupnp_1_8_la_SOURCES += \
1570- src/threadutil/FreeList.h \
1571- src/threadutil/FreeList.c \
1572- src/threadutil/LinkedList.h \
1573-@@ -108,7 +108,7 @@
1574-
1575- # ssdp
1576- if ENABLE_SSDP
1577--libupnp_la_SOURCES += \
1578-+libupnp_1_8_la_SOURCES += \
1579- src/ssdp/ssdp_ResultData.c \
1580- src/ssdp/ssdp_ResultData.h \
1581- src/ssdp/ssdp_device.c \
1582-@@ -118,14 +118,14 @@
1583-
1584- # soap
1585- if ENABLE_SOAP
1586--libupnp_la_SOURCES += \
1587-+libupnp_1_8_la_SOURCES += \
1588- src/soap/soap_device.c \
1589- src/soap/soap_ctrlpt.c \
1590- src/soap/soap_common.c
1591- endif
1592-
1593- # genlib
1594--libupnp_la_SOURCES += \
1595-+libupnp_1_8_la_SOURCES += \
1596- src/genlib/miniserver/miniserver.c \
1597- src/genlib/client_table/client_table.c \
1598- src/genlib/client_table/ClientSubscription.c \
1599-@@ -144,14 +144,14 @@
1600-
1601- # gena
1602- if ENABLE_GENA
1603--libupnp_la_SOURCES += \
1604-+libupnp_1_8_la_SOURCES += \
1605- src/gena/gena_device.c \
1606- src/gena/gena_ctrlpt.c \
1607- src/gena/gena_callback2.c
1608- endif
1609-
1610- # api
1611--libupnp_la_SOURCES += \
1612-+libupnp_1_8_la_SOURCES += \
1613- src/api/ActionComplete.c \
1614- src/api/ActionRequest.c \
1615- src/api/Discovery.c \
1616-@@ -165,11 +165,11 @@
1617- src/api/upnpapi.c
1618-
1619- if ENABLE_TOOLS
1620--libupnp_la_SOURCES += src/api/upnptools.c
1621-+libupnp_1_8_la_SOURCES += src/api/upnptools.c
1622- endif
1623-
1624- if ENABLE_DEBUG
1625--libupnp_la_SOURCES += src/api/upnpdebug.c
1626-+libupnp_1_8_la_SOURCES += src/api/upnpdebug.c
1627- AM_CPPFLAGS += -DDEBUG -DSTATS
1628- else
1629- AM_CPPFLAGS += -DNDEBUG
1630-@@ -178,7 +178,7 @@
1631-
1632- # uuid
1633- if ENABLE_UUID
1634--libupnp_la_SOURCES += \
1635-+libupnp_1_8_la_SOURCES += \
1636- src/uuid/md5.c \
1637- src/uuid/sysdep.c \
1638- src/uuid/uuid.c
1639-@@ -186,20 +186,20 @@
1640-
1641-
1642- # urlconfig
1643--libupnp_la_SOURCES += src/urlconfig/urlconfig.c
1644-+libupnp_1_8_la_SOURCES += src/urlconfig/urlconfig.c
1645-
1646-
1647- # inet_pton (needed on Win32, compiles to nothing elsewhere)
1648--libupnp_la_SOURCES += \
1649-+libupnp_1_8_la_SOURCES += \
1650- src/inet_pton.c \
1651- src/inc/inet_pton.h
1652-
1653-
1654- # check / distcheck tests
1655--check_PROGRAMS = test_init test_url
1656--TESTS = test_init test_url
1657--test_init_SOURCES = test/test_init.c
1658--test_url_SOURCES = test/test_url.c
1659-+check_PROGRAMS = test_init-1.8 test_url-1.8
1660-+TESTS = test_init-1.8 test_url-1.8
1661-+test_init_1_8_SOURCES = test/test_init.c
1662-+test_url_1_8_SOURCES = test/test_url.c
1663-
1664-
1665- EXTRA_DIST = \
1666-diff -ur libupnp-1.8-1.8.3.orig/upnp/sample/Makefile.am libupnp-1.8-1.8.3/upnp/sample/Makefile.am
1667---- libupnp-1.8-1.8.3.orig/upnp/sample/Makefile.am 2017-11-14 14:02:53.000000000 +0300
1668-+++ libupnp-1.8-1.8.3/upnp/sample/Makefile.am 2018-08-29 16:52:03.577037705 +0300
1669-@@ -9,49 +9,49 @@
1670- -I$(top_srcdir)/ixml/inc
1671-
1672- LDADD = \
1673-- $(top_builddir)/upnp/libupnp.la \
1674-- $(top_builddir)/ixml/libixml.la
1675-+ $(top_builddir)/upnp/libupnp-1.8.la \
1676-+ $(top_builddir)/ixml/libixml-1.8.la
1677-
1678- # samples
1679- noinst_PROGRAMS =
1680- if ENABLE_SAMPLES
1681- if ENABLE_CLIENT
1682--noinst_PROGRAMS += tv_ctrlpt
1683--tv_ctrlpt_CPPFLAGS = \
1684-+noinst_PROGRAMS += tv_ctrlpt-1.8
1685-+tv_ctrlpt_1_8_CPPFLAGS = \
1686- $(AM_CPPFLAGS) \
1687- -I$(srcdir)/common/ \
1688- -I$(srcdir)/tvctrlpt
1689- if ENABLE_DEVICE
1690--noinst_PROGRAMS += tv_combo
1691--tv_combo_CPPFLAGS = $(AM_CPPFLAGS) \
1692-+noinst_PROGRAMS += tv_combo-1.8
1693-+tv_combo_1_8_CPPFLAGS = $(AM_CPPFLAGS) \
1694- -I$(srcdir)/common/ \
1695- -I$(srcdir)/tvcombo
1696- endif
1697- endif
1698- if ENABLE_DEVICE
1699--noinst_PROGRAMS += tv_device
1700--tv_device_CPPFLAGS = \
1701-+noinst_PROGRAMS += tv_device-1.8
1702-+tv_device_1_8_CPPFLAGS = \
1703- $(AM_CPPFLAGS) \
1704- -I$(srcdir)/common/ \
1705- -I$(srcdir)/tvdevice
1706- endif
1707- endif
1708-
1709--tv_device_SOURCES = \
1710-+tv_device_1_8_SOURCES = \
1711- common/sample_util.c \
1712- common/sample_util.h \
1713- common/tv_device.c \
1714- common/tv_device.h \
1715- linux/tv_device_main.c
1716-
1717--tv_ctrlpt_SOURCES = \
1718-+tv_ctrlpt_1_8_SOURCES = \
1719- common/sample_util.c \
1720- common/sample_util.h \
1721- common/tv_ctrlpt.c \
1722- common/tv_ctrlpt.h \
1723- linux/tv_ctrlpt_main.c
1724-
1725--tv_combo_SOURCES = \
1726-+tv_combo_1_8_SOURCES = \
1727- common/sample_util.c \
1728- common/sample_util.h \
1729- common/tv_ctrlpt.c \
1730-@@ -63,8 +63,8 @@
1731- if WITH_DOCUMENTATION
1732- examplesdir = $(docdir)/examples
1733- examples_DATA = \
1734-- $(tv_ctrlpt_SOURCES) \
1735-- $(tv_device_SOURCES)
1736-+ $(tv_ctrlpt_1_8_SOURCES) \
1737-+ $(tv_device_1_8_SOURCES)
1738- endif
1739-
1740- EXTRA_DIST = \
1741-diff -ur libupnp-1.8-1.8.3.orig/upnp/unittest/Makefile.am libupnp-1.8-1.8.3/upnp/unittest/Makefile.am
1742---- libupnp-1.8-1.8.3.orig/upnp/unittest/Makefile.am 2017-11-14 14:02:53.000000000 +0300
1743-+++ libupnp-1.8-1.8.3/upnp/unittest/Makefile.am 2018-08-29 16:52:03.577037705 +0300
1744-@@ -10,16 +10,16 @@
1745- -I$(top_srcdir)/upnp/src/inc
1746-
1747- LDADD = \
1748-- $(top_builddir)/upnp/libupnp.la \
1749-- $(top_builddir)/ixml/libixml.la
1750-+ $(top_builddir)/upnp/libupnp-1.8.la \
1751-+ $(top_builddir)/ixml/libixml-1.8.la
1752-
1753- #unittest
1754--noinst_PROGRAMS = unittest
1755-+noinst_PROGRAMS = unittest-1.8
1756-
1757--unittest_CPPFLAGS = \
1758-+unittest_1_8_CPPFLAGS = \
1759- $(AM_CPPFLAGS)
1760-
1761--unittest_SOURCES = \
1762-+unittest_1_8_SOURCES = \
1763- main.c \
1764- templates/FirstObject.c \
1765- templates/FirstObject.h \
1766diff --git a/lynx/Makefile b/lynx/Makefile
1767deleted file mode 100644
1768index 2293677..0000000
1769--- a/lynx/Makefile
1770+++ /dev/null
1771@@ -1,59 +0,0 @@
1772-#
1773-# Copyright (C) 2011-2019 Entware
1774-#
1775-# This is free software, licensed under the GNU General Public License v2.
1776-# See /LICENSE for more information.
1777-#
1778-
1779-include $(TOPDIR)/rules.mk
1780-
1781-PKG_NAME:=lynx
1782-PKG_VERSION:=2.9.0dev.1
1783-PKG_RELEASE:=1
1784-
1785-PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.bz2
1786-PKG_SOURCE_URL:=http://invisible-mirror.net/archives/lynx/tarballs
1787-PKG_HASH:=a907afa7c9cfc38cc7c6b4ce5d5ff6d2ae2bfd4497230e831567c0d506caecb9
1788-
1789-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION)
1790-
1791-include $(INCLUDE_DIR)/package.mk
1792-
1793-define Package/lynx
1794- SECTION:=net
1795- CATEGORY:=Network
1796- DEPENDS:=+libncursesw +libopenssl +zlib +libbz2 +libidn
1797- TITLE:=a text web browser
1798- URL:=http://lynx.isc.org/
1799- MAINTAINER:=Entware team, https://entware.net
1800-endef
1801-
1802-define Package/lynx/description
1803- Lynx is the text web browser
1804-endef
1805-
1806-CONFIGURE_ARGS += \
1807- --with-ssl \
1808- --enable-ipv6 \
1809- --with-screen=ncursesw \
1810- --enable-widec \
1811- --with-bzlib \
1812- --with-zlib \
1813- --with-build-cc=$(HOSTCC) \
1814- --with-build-cflags= \
1815- --with-build-ldflags=
1816-
1817-define Package/lynx/conffiles
1818-/opt/etc/lynx.cfg
1819-/opt/etc/lynx.lss
1820-endef
1821-
1822-define Package/lynx/install
1823- $(INSTALL_DIR) $(1)/opt/bin
1824- $(INSTALL_BIN) $(PKG_BUILD_DIR)/lynx $(1)/opt/bin
1825- $(INSTALL_DIR) $(1)/opt/etc
1826- $(INSTALL_CONF) $(PKG_BUILD_DIR)/lynx.cfg $(1)/opt/etc
1827- $(INSTALL_CONF) $(PKG_BUILD_DIR)/samples/lynx.lss $(1)/opt/etc
1828-endef
1829-
1830-$(eval $(call BuildPackage,lynx))
1831diff --git a/mediatomb/Makefile b/mediatomb/Makefile
1832index 6f47466..fc7fb56 100644
1833--- a/mediatomb/Makefile
1834+++ b/mediatomb/Makefile
1835@@ -11,8 +11,7 @@ include $(TOPDIR)/rules.mk
1836
1837 PKG_NAME:=mediatomb
1838 PKG_VERSION:=0.12.1-20140713
1839-PKG_RELEASE:=2
1840-PKG_FIXUP:=autoreconf
1841+PKG_RELEASE:=2a
1842
1843 PKG_REV:=7ab761696354868bd5d67ff4f2d849994e4c98e2
1844 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
1845@@ -21,6 +20,7 @@ PKG_SOURCE_PROTO:=git
1846 PKG_SOURCE_URL:=git://git.code.sf.net/p/mediatomb/code
1847 PKG_SOURCE_VERSION:=$(PKG_REV)
1848
1849+PKG_FIXUP:=autoreconf
1850 PKG_BUILD_PARALLEL:=0
1851 PKG_INSTALL:=1
1852
1853@@ -75,7 +75,8 @@ CONFIGURE_ARGS += \
1854 --enable-iconv-lib \
1855 --with-iconv-h=$(ICONV_PREFIX)/include \
1856 --with-iconv-libs=$(ICONV_PREFIX)/lib \
1857- --disable-libmp4v2
1858+ --disable-libmp4v2 \
1859+ --with-search=$(STAGING_DIR)/opt
1860
1861 define Package/mediatomb/install
1862 $(INSTALL_DIR) $(1)/opt/etc/mediatomb $(1)/opt/bin $(1)/opt/share $(1)/opt/var
1863diff --git a/movgrab/Makefile b/movgrab/Makefile
1864index 4c898d9..8c77649 100644
1865--- a/movgrab/Makefile
1866+++ b/movgrab/Makefile
1867@@ -10,8 +10,8 @@
1868 include $(TOPDIR)/rules.mk
1869
1870 PKG_NAME:=movgrab
1871-PKG_VERSION:=3.0.3
1872-PKG_REV:=c3483712163806199005e40c0e372ae29487b021
1873+PKG_VERSION:=3.1.2
1874+PKG_REV:=353e9770d64082b18a15bce683b627ace2bfd81b
1875 PKG_RELEASE:=1
1876
1877 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
1878diff --git a/movgrab/patches/999-fix.patch b/movgrab/patches/999-fix.patch
1879new file mode 100644
1880index 0000000..14ae064
1881--- /dev/null
1882+++ b/movgrab/patches/999-fix.patch
1883@@ -0,0 +1,21 @@
1884+--- a/libUseful-2.8/Process.c
1885++++ b/libUseful-2.8/Process.c
1886+@@ -1,6 +1,6 @@
1887+ #include "Process.h"
1888+ #define _GNU_SOURCE
1889+-#include "errno.h"
1890++#include <errno.h>
1891+ #include "includes.h"
1892+ #include "Time.h"
1893+ #include <pwd.h>
1894+@@ -60,8 +60,8 @@ for (i=0; environ[i] != NULL; i++) envir
1895+
1896+ //These might point to argv[0], so make copies of these too
1897+ #ifdef __GNU_LIBRARY__
1898+-extern char *program_invocation_name;
1899+-extern char *program_invocation_short_name;
1900++/* extern char *program_invocation_name;
1901++extern char *program_invocation_short_name; */
1902+
1903+ program_invocation_name=strdup(program_invocation_name);
1904+ program_invocation_short_name=strdup(program_invocation_short_name);
1905diff --git a/poppler/Makefile b/poppler/Makefile
1906index 7a4d340..f4795b7 100644
1907--- a/poppler/Makefile
1908+++ b/poppler/Makefile
1909@@ -18,7 +18,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
1910 PKG_SOURCE_URL:=https://poppler.freedesktop.org
1911 PKG_HASH:=92e09fd3302567fd36146b36bb707db43ce436e8841219025a82ea9fb0076b2f
1912
1913-PKG_INSTALL:=1
1914+CMAKE_INSTALL:=1
1915
1916 include $(INCLUDE_DIR)/package.mk
1917 include $(INCLUDE_DIR)/cmake.mk
1918diff --git a/python-gevent/patches/010-disable-configure.patch b/python-gevent/patches/010-disable-configure.patch
1919index e6c9362..03b5537 100644
1920--- a/python-gevent/patches/010-disable-configure.patch
1921+++ b/python-gevent/patches/010-disable-configure.patch
1922@@ -8,7 +8,7 @@
1923 " && cp ares_config.h ares_build.h \"$OLDPWD\" ",
1924 " && mv ares_build.h.orig ares_build.h)",
1925 "> configure-output.txt"])
1926---- /a/_setuplibev.py
1927+--- a/_setuplibev.py
1928 +++ b/_setuplibev.py
1929 @@ -30,7 +30,6 @@
1930 # and the PyPy branch will clean it up.
1931diff --git a/rar2fs/Makefile b/rar2fs/Makefile
1932index 10e286b..ece33ab 100644
1933--- a/rar2fs/Makefile
1934+++ b/rar2fs/Makefile
1935@@ -13,7 +13,7 @@ PKG_RELEASE:=1
1936
1937 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
1938 PKG_SOURCE_URL:=https://github.com/hasse69/rar2fs/releases/download/v$(PKG_VERSION)
1939-PKG_HASH:=9fbeb084073dc8b82494e1be951516765a2f441b
1940+PKG_HASH:=8b8f89bc715690dc67f6d5f66dac6ae4c4338ff960f5cfd0f46cfa666be570f1
1941
1942 PKG_INSTALL:=1
1943
1944diff --git a/rblibtorrent/Makefile b/rblibtorrent/Makefile
1945index 7a367d7..29736b6 100644
1946--- a/rblibtorrent/Makefile
1947+++ b/rblibtorrent/Makefile
1948@@ -10,12 +10,12 @@
1949 include $(TOPDIR)/rules.mk
1950
1951 PKG_NAME:=rblibtorrent
1952-PKG_VERSION:=1.1.7
1953+PKG_VERSION:=1.1.11
1954 PKG_RELEASE:=1
1955
1956 PKG_SOURCE:=libtorrent-rasterbar-$(PKG_VERSION).tar.gz
1957-PKG_SOURCE_URL:=https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_1_7
1958-PKG_HASH:=8133bf683308decc24da22aff17437e36c522d8959bcf934e94cf7a3a567f3a9
1959+PKG_SOURCE_URL:=https://github.com/arvidn/libtorrent/releases/download/libtorrent_1_1_11
1960+PKG_HASH:=7c23deba7fa279825642307587609d51c9935ac7606e0ef2f2d0ba10728b5847
1961
1962 PKG_BUILD_DIR:=$(BUILD_DIR)/libtorrent-rasterbar-$(PKG_VERSION)
1963
1964diff --git a/rblibtorrent/patches/999-fix.patch b/rblibtorrent/patches/999-fix.patch
1965deleted file mode 100644
1966index dba2c99..0000000
1967--- a/rblibtorrent/patches/999-fix.patch
1968+++ /dev/null
1969@@ -1,36 +0,0 @@
1970---- a/include/libtorrent/ip_filter.hpp
1971-+++ b/include/libtorrent/ip_filter.hpp
1972-@@ -41,10 +41,16 @@ POSSIBILITY OF SUCH DAMAGE.
1973- #include <vector>
1974-
1975- #include <boost/limits.hpp>
1976--#include <boost/utility.hpp>
1977- #include <boost/cstdint.hpp>
1978- #include <boost/tuple/tuple.hpp>
1979-
1980-+#include <boost/version.hpp>
1981-+#if BOOST_VERSION >= 106700
1982-+#include <boost/next_prior.hpp>
1983-+#else
1984-+#include <boost/utility.hpp>
1985-+#endif
1986-+
1987- #include "libtorrent/aux_/disable_warnings_pop.hpp"
1988-
1989- #include "libtorrent/address.hpp"
1990---- a/src/kademlia/routing_table.cpp
1991-+++ b/src/kademlia/routing_table.cpp
1992-@@ -54,6 +54,13 @@ POSSIBILITY OF SUCH DAMAGE.
1993- #include <boost/cstdint.hpp>
1994- #include <boost/bind.hpp>
1995-
1996-+#include <boost/version.hpp>
1997-+#if BOOST_VERSION >= 106700
1998-+#include <boost/next_prior.hpp>
1999-+#else
2000-+#include <boost/utility.hpp>
2001-+#endif
2002-+
2003- #include "libtorrent/aux_/disable_warnings_pop.hpp"
2004-
2005- using boost::uint8_t;
2006diff --git a/rtmpdump/Makefile b/rtmpdump/Makefile
2007index e480d5d..77a51e4 100644
2008--- a/rtmpdump/Makefile
2009+++ b/rtmpdump/Makefile
2010@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
2011 PKG_NAME:=rtmpdump
2012 PKG_VERSION:=2.4-20151223
2013 PKG_REV:=fa8646daeb19dfd12c181f7d19de708d623704c0
2014-PKG_RELEASE:=1
2015+PKG_RELEASE:=1a
2016
2017 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
2018 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
2019diff --git a/rtmpdump/patches/999-fix_openssl.patch b/rtmpdump/patches/999-fix_openssl.patch
2020new file mode 100644
2021index 0000000..0144f91
2022--- /dev/null
2023+++ b/rtmpdump/patches/999-fix_openssl.patch
2024@@ -0,0 +1,263 @@
2025+--- a/librtmp/handshake.h
2026++++ b/librtmp/handshake.h
2027+@@ -63,6 +63,7 @@ typedef struct arcfour_ctx* RC4_handle;
2028+ #define RC4_free(h) free(h)
2029+
2030+ #else /* USE_OPENSSL */
2031++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2032+ #include <openssl/sha.h>
2033+ #include <openssl/hmac.h>
2034+ #include <openssl/rc4.h>
2035+@@ -80,6 +81,7 @@ typedef RC4_KEY * RC4_handle;
2036+ #define RC4_encrypt2(h,l,s,d) RC4(h,l,(uint8_t *)s,(uint8_t *)d)
2037+ #define RC4_free(h) free(h)
2038+ #endif
2039++#endif
2040+
2041+ #define FP10
2042+
2043+@@ -110,6 +112,7 @@ static const uint8_t GenuineFPKey[] = {
2044+ 0x31, 0xAE
2045+ }; /* 62 */
2046+
2047++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2048+ static void InitRC4Encryption
2049+ (uint8_t * secretKey,
2050+ uint8_t * pubKeyIn,
2051+@@ -1067,7 +1070,9 @@ HandShake(RTMP * r, int FP9HandShake)
2052+ RTMP_Log(RTMP_LOGDEBUG, "%s: Handshaking finished....", __FUNCTION__);
2053+ return TRUE;
2054+ }
2055++#endif
2056+
2057++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2058+ static int
2059+ SHandShake(RTMP * r)
2060+ {
2061+@@ -1313,13 +1318,6 @@ SHandShake(RTMP * r)
2062+ RTMP_Log(RTMP_LOGDEBUG, "%s: Server signature calculated:", __FUNCTION__);
2063+ RTMP_LogHex(RTMP_LOGDEBUG, signatureResp, SHA256_DIGEST_LENGTH);
2064+ }
2065+-#if 0
2066+- else
2067+- {
2068+- uptime = htonl(RTMP_GetTime());
2069+- memcpy(clientsig+4, &uptime, 4);
2070+- }
2071+-#endif
2072+
2073+ RTMP_Log(RTMP_LOGDEBUG2, "%s: Sending handshake response: ",
2074+ __FUNCTION__);
2075+@@ -1417,3 +1415,4 @@ SHandShake(RTMP * r)
2076+ RTMP_Log(RTMP_LOGDEBUG, "%s: Handshaking finished....", __FUNCTION__);
2077+ return TRUE;
2078+ }
2079++#endif
2080+--- a/librtmp/hashswf.c
2081++++ b/librtmp/hashswf.c
2082+@@ -284,6 +284,8 @@ leave:
2083+
2084+ #ifdef CRYPTO
2085+
2086++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2087++
2088+ #define CHUNK 16384
2089+
2090+ struct info
2091+@@ -663,3 +665,5 @@ RTMP_HashSWF(const char *url, unsigned i
2092+ return -1;
2093+ }
2094+ #endif
2095++#endif
2096++
2097+--- a/librtmp/dh.h
2098++++ b/librtmp/dh.h
2099+@@ -192,6 +192,7 @@ typedef BIGNUM * MP_t;
2100+ #include "log.h"
2101+ #include "dhgroups.h"
2102+
2103++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2104+ /* RFC 2631, Section 2.1.5, http://www.ietf.org/rfc/rfc2631.txt */
2105+ static int
2106+ isValidPublicKey(MP_t y, MP_t p, MP_t q)
2107+@@ -374,3 +375,5 @@ DHComputeSharedSecretKey(MDH *dh, uint8_
2108+
2109+ return res;
2110+ }
2111++
2112++#endif
2113+--- a/librtmp/rtmp.c
2114++++ b/librtmp/rtmp.c
2115+@@ -109,7 +109,9 @@ typedef enum {
2116+ } RTMPTCmd;
2117+
2118+ static int DumpMetaData(AMFObject *obj);
2119++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2120+ static int HandShake(RTMP *r, int FP9HandShake);
2121++#endif
2122+ static int SocksNegotiate(RTMP *r);
2123+
2124+ static int SendConnectPacket(RTMP *r, RTMPPacket *cp);
2125+@@ -1010,6 +1012,8 @@ RTMP_Connect1(RTMP *r, RTMPPacket *cp)
2126+ r->m_msgCounter = 0;
2127+ }
2128+ RTMP_Log(RTMP_LOGDEBUG, "%s, ... connected, handshaking", __FUNCTION__);
2129++
2130++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2131+ if (!HandShake(r, TRUE))
2132+ {
2133+ RTMP_Log(RTMP_LOGERROR, "%s, handshake failed.", __FUNCTION__);
2134+@@ -1017,6 +1021,7 @@ RTMP_Connect1(RTMP *r, RTMPPacket *cp)
2135+ return FALSE;
2136+ }
2137+ RTMP_Log(RTMP_LOGDEBUG, "%s, handshaked", __FUNCTION__);
2138++#endif
2139+
2140+ if (!SendConnectPacket(r, cp))
2141+ {
2142+@@ -1485,11 +1490,13 @@ ReadN(RTMP *r, char *buffer, int n)
2143+ r->m_resplen -= nBytes;
2144+
2145+ #ifdef CRYPTO
2146++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2147+ if (r->Link.rc4keyIn)
2148+ {
2149+ RC4_encrypt(r->Link.rc4keyIn, nBytes, ptr);
2150+ }
2151+ #endif
2152++#endif
2153+
2154+ n -= nBytes;
2155+ ptr += nBytes;
2156+@@ -1503,6 +1510,7 @@ WriteN(RTMP *r, const char *buffer, int
2157+ {
2158+ const char *ptr = buffer;
2159+ #ifdef CRYPTO
2160++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2161+ char *encrypted = 0;
2162+ char buf[RTMP_BUFFER_CACHE_SIZE];
2163+
2164+@@ -1516,6 +1524,7 @@ WriteN(RTMP *r, const char *buffer, int
2165+ RC4_encrypt2(r->Link.rc4keyOut, n, buffer, ptr);
2166+ }
2167+ #endif
2168++#endif
2169+
2170+ while (n > 0)
2171+ {
2172+@@ -1549,9 +1558,11 @@ WriteN(RTMP *r, const char *buffer, int
2173+ }
2174+
2175+ #ifdef CRYPTO
2176++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2177+ if (encrypted && encrypted != buf)
2178+ free(encrypted);
2179+ #endif
2180++#endif
2181+
2182+ return n == 0;
2183+ }
2184+@@ -2368,10 +2379,12 @@ RTMP_SendCtrl(RTMP *r, short nType, unsi
2185+ if (nType == 0x1B)
2186+ {
2187+ #ifdef CRYPTO
2188++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2189+ memcpy(buf, r->Link.SWFVerificationResponse, 42);
2190+ RTMP_Log(RTMP_LOGDEBUG, "Sending SWFVerification response: ");
2191+ RTMP_LogHex(RTMP_LOGDEBUG, (uint8_t *)packet.m_body, packet.m_nBodySize);
2192+ #endif
2193++#endif
2194+ }
2195+ else if (nType == 0x1A)
2196+ {
2197+@@ -2435,6 +2448,7 @@ AV_clear(RTMP_METHOD *vals, int num)
2198+
2199+
2200+ #ifdef CRYPTO
2201++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2202+ static int
2203+ b64enc(const unsigned char *input, int length, char *output, int maxsize)
2204+ {
2205+@@ -2874,7 +2888,7 @@ PublisherAuth(RTMP *r, AVal *description
2206+ return 1;
2207+ }
2208+ #endif
2209+-
2210++#endif
2211+
2212+ SAVC(onBWDone);
2213+ SAVC(onFCSubscribe);
2214+@@ -3048,6 +3062,7 @@ HandleInvoke(RTMP *r, const char *body,
2215+ else if (AVMATCH(&method, &av__error))
2216+ {
2217+ #ifdef CRYPTO
2218++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2219+ AVal methodInvoked = {0};
2220+ int i;
2221+
2222+@@ -3098,6 +3113,7 @@ HandleInvoke(RTMP *r, const char *body,
2223+ #else
2224+ RTMP_Log(RTMP_LOGERROR, "rtmp server sent error");
2225+ #endif
2226++#endif
2227+ }
2228+ else if (AVMATCH(&method, &av_close))
2229+ {
2230+@@ -3483,6 +3499,7 @@ HandleCtrl(RTMP *r, const RTMPPacket *pa
2231+ __FUNCTION__, packet->m_body[2]);
2232+ }
2233+ #ifdef CRYPTO
2234++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2235+ /*RTMP_LogHex(packet.m_body, packet.m_nBodySize); */
2236+
2237+ /* respond with HMAC SHA256 of decompressed SWF, key is the 30byte player key, also the last 30 bytes of the server handshake are applied */
2238+@@ -3501,6 +3518,7 @@ HandleCtrl(RTMP *r, const RTMPPacket *pa
2239+ "%s: Ignoring SWFVerification request, no CRYPTO support!",
2240+ __FUNCTION__);
2241+ #endif
2242++#endif
2243+ }
2244+ }
2245+
2246+@@ -3740,6 +3758,7 @@ RTMP_ReadPacket(RTMP *r, RTMPPacket *pac
2247+ }
2248+
2249+ #ifndef CRYPTO
2250++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2251+ static int
2252+ HandShake(RTMP *r, int FP9HandShake)
2253+ {
2254+@@ -3867,6 +3886,7 @@ SHandShake(RTMP *r)
2255+ return TRUE;
2256+ }
2257+ #endif
2258++#endif
2259+
2260+ int
2261+ RTMP_SendChunk(RTMP *r, RTMPChunk *chunk)
2262+@@ -4120,7 +4140,9 @@ RTMP_SendPacket(RTMP *r, RTMPPacket *pac
2263+ int
2264+ RTMP_Serve(RTMP *r)
2265+ {
2266++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2267+ return SHandShake(r);
2268++#endif
2269+ }
2270+
2271+ void
2272+@@ -4230,6 +4252,7 @@ CloseInternal(RTMP *r, int reconnect)
2273+ r->Link.playpath0.av_val = NULL;
2274+ }
2275+ #ifdef CRYPTO
2276++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2277+ if (r->Link.dh)
2278+ {
2279+ MDH_free(r->Link.dh);
2280+@@ -4246,6 +4269,7 @@ CloseInternal(RTMP *r, int reconnect)
2281+ r->Link.rc4keyOut = NULL;
2282+ }
2283+ #endif
2284++#endif
2285+ }
2286+
2287+ int
2288diff --git a/shellinabox/Makefile b/shellinabox/Makefile
2289index 830a0f2..b89689a 100644
2290--- a/shellinabox/Makefile
2291+++ b/shellinabox/Makefile
2292@@ -12,7 +12,7 @@ include $(TOPDIR)/rules.mk
2293 PKG_NAME:=shellinabox
2294 PKG_VERSION:=2.20
2295 PKG_REV:=048cecd2e77d659c8fefcd2e7dc437c533abeab4
2296-PKG_RELEASE:=1
2297+PKG_RELEASE:=1a
2298
2299 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
2300 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
2301diff --git a/shellinabox/patches/999-fix_openssl.patch b/shellinabox/patches/999-fix_openssl.patch
2302new file mode 100644
2303index 0000000..8cec685
2304--- /dev/null
2305+++ b/shellinabox/patches/999-fix_openssl.patch
2306@@ -0,0 +1,17 @@
2307+--- a/libhttp/ssl.c 2019-02-16 15:35:57.618900867 +0300
2308++++ b/libhttp/ssl.c 2019-02-16 15:35:42.698618549 +0300
2309+@@ -1015,6 +1015,7 @@
2310+
2311+ void sslFreeHndl(SSL **sslHndl) {
2312+ #if defined(HAVE_OPENSSL)
2313++#if OPENSSL_VERSION_NUMBER < 0x10100000L
2314+ if (*sslHndl) {
2315+ // OpenSSL does not always correctly perform reference counting for stacked
2316+ // BIOs. This is particularly a problem if an SSL connection has two
2317+@@ -1067,5 +1068,6 @@
2318+ dcheck(!ERR_peek_error());
2319+ }
2320+ #endif
2321++#endif
2322+ *sslHndl = NULL;
2323+ }
2324diff --git a/vorbis-tools/Makefile b/vorbis-tools/Makefile
2325index ddb16f4..71432de 100644
2326--- a/vorbis-tools/Makefile
2327+++ b/vorbis-tools/Makefile
2328@@ -14,6 +14,9 @@ PKG_RELEASE:=1
2329
2330 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
2331 PKG_SOURCE_URL:=http://downloads.xiph.org/releases/vorbis
2332+PKG_HASH:=a389395baa43f8e5a796c99daf62397e435a7e73531c9f44d9084055a05d22bc
2333+
2334+PKG_BUILD_DEPENDS:=curl
2335
2336 include $(INCLUDE_DIR)/package.mk
2337
2338@@ -30,8 +33,10 @@ define Package/vorbis-tools/description
2339 endef
2340
2341 CONFIGURE_ARGS+= \
2342- --without-flac \
2343- --disable-nls \
2344+ --without-flac \
2345+ --disable-nls \
2346+ --without-speex \
2347+ --disable-curltest
2348
2349 TARGET_LDFLAGS += -lm
2350
2351diff --git a/vsftpd-ext/Makefile b/vsftpd-ext/Makefile
2352index e33dc46..975da28 100644
2353--- a/vsftpd-ext/Makefile
2354+++ b/vsftpd-ext/Makefile
2355@@ -12,9 +12,8 @@ PKG_VERSION:=3.0.3
2356 PKG_RELEASE:=1
2357
2358 PKG_SOURCE:=vsftpd-$(PKG_VERSION).tar.gz
2359-PKG_HASH:=9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c955ef7
2360 PKG_SOURCE_URL:=http://vsftpd.devnet.ru/files/$(PKG_VERSION)
2361-PKG_MDSUM:=da119d084bd3f98664636ea05b5bb398
2362+PKG_HASH:=9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c955ef7
2363
2364 PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
2365
2366diff --git a/xpdf/Makefile b/xpdf/Makefile
2367index 86ab634..840f8ac 100644
2368--- a/xpdf/Makefile
2369+++ b/xpdf/Makefile
2370@@ -15,7 +15,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
2371 PKG_SOURCE_URL:=https://xpdfreader-dl.s3.amazonaws.com
2372 PKG_HASH:=a4de7369029ce6d920af39fe02b777d86721464c70a2a678087fe265e5557563
2373
2374-PKG_INSTALL:=1
2375+CMAKE_INSTALL:=1
2376
2377 include $(INCLUDE_DIR)/package.mk
2378 include $(INCLUDE_DIR)/cmake.mk
2379(END)