* [gentoo-commits] repo/gentoo:master commit in: app-text/ghostscript-gpl/, app-text/ghostscript-gpl/files/
@ 2015-10-23 10:00 Justin Lecher
0 siblings, 0 replies; 8+ messages in thread
From: Justin Lecher @ 2015-10-23 10:00 UTC (permalink / raw
To: gentoo-commits
commit: 496566c75f483786d581f34196309bc4becb2481
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 23 09:59:51 2015 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Oct 23 10:00:05 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=496566c7
app-text/ghostscript-gpl: Backport fix for missing header
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=563540
Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
.../ghostscript-gpl-9.18-gserrors.h-backport.patch | 43 ++++++++++++++++++++++
.../ghostscript-gpl/ghostscript-gpl-9.18.ebuild | 2 +
2 files changed, 45 insertions(+)
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.18-gserrors.h-backport.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.18-gserrors.h-backport.patch
new file mode 100644
index 0000000..c34e486
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.18-gserrors.h-backport.patch
@@ -0,0 +1,43 @@
+From feafe5e540a0545ec5d28f3f66bb542056bba495 Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Fri, 23 Oct 2015 10:16:11 +0100
+Subject: [PATCH] Bug 696301: add gserrors.h to the installed files
+
+for the so-install target.
+
+Also remove a spurious (copy'n'paste error) comment.
+
+No cluster differences
+---
+ base/gserrors.h | 2 +-
+ base/unix-dll.mak | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/base/gserrors.h b/base/gserrors.h
+index 5f18081..cdebb38 100644
+--- a/base/gserrors.h
++++ b/base/gserrors.h
+@@ -25,7 +25,7 @@
+ /* We don't use a typedef internally to avoid a lot of casting. */
+
+ enum gs_error_type {
+- gs_error_ok = 0, /* unknown error */
++ gs_error_ok = 0,
+ gs_error_unknownerror = -1, /* unknown error */
+ gs_error_dictfull = -2,
+ gs_error_dictstackoverflow = -3,
+diff --git a/base/unix-dll.mak b/base/unix-dll.mak
+index 7b67aa1..73b4fa9 100644
+--- a/base/unix-dll.mak
++++ b/base/unix-dll.mak
+@@ -186,6 +186,7 @@ install-so-subtarget: so-subtarget
+ ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
+ $(INSTALL_DATA) $(PSSRC)iapi.h $(DESTDIR)$(gsincludedir)iapi.h
+ $(INSTALL_DATA) $(PSSRC)ierrors.h $(DESTDIR)$(gsincludedir)ierrors.h
++ $(INSTALL_DATA) $(GLSRC)gserrors.h $(DESTDIR)$(gsincludedir)gserrors.h
+ $(INSTALL_DATA) $(DEVSRC)gdevdsp.h $(DESTDIR)$(gsincludedir)gdevdsp.h
+
+ soinstall:
+--
+2.5.1
+
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.18.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.18.ebuild
index 4cf5c85..a9ba6bf 100644
--- a/app-text/ghostscript-gpl/ghostscript-gpl-9.18.ebuild
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-9.18.ebuild
@@ -94,6 +94,8 @@ src_prepare() {
ghostscript-gpl-9.12-icc-missing-check.patch"
epatch
+ epatch "${FILESDIR}"/${P}-gserrors.h-backport.patch
+
if use djvu ; then
unpack gsdjvu-${GSDJVU_PV}.tar.gz
cp gsdjvu-${GSDJVU_PV}/gsdjvu "${S}" || die
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-text/ghostscript-gpl/, app-text/ghostscript-gpl/files/
@ 2020-10-20 8:09 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2020-10-20 8:09 UTC (permalink / raw
To: gentoo-commits
commit: ef7d73bef37f8b7cb76484574e4d316fdb06984b
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 08:09:31 2020 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 08:09:31 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef7d73be
app-text/ghostscript-gpl: fix compat. with >=media-libs/freetype-2.10.3
Closes: https://bugs.gentoo.org/747808
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../ghostscript-gpl-9.53.3-freetype-2.10.3.patch | 20 ++++++++++++++++++++
.../ghostscript-gpl/ghostscript-gpl-9.52-r1.ebuild | 5 +++++
....3-r1.ebuild => ghostscript-gpl-9.53.3-r2.ebuild} | 6 +++++-
3 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.53.3-freetype-2.10.3.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.53.3-freetype-2.10.3.patch
new file mode 100644
index 00000000000..59d9ae0095f
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.53.3-freetype-2.10.3.patch
@@ -0,0 +1,20 @@
+https://bugs.ghostscript.com/show_bug.cgi?id=702985
+https://bugs.gentoo.org/747808
+
+--- ghostscript-9.53.3/base/fapi_ft.c
++++ ghostscript-9.53.3/base/fapi_ft.c
+@@ -125,6 +125,14 @@
+ delete_inc_int_info(gs_fapi_server * a_server,
+ FT_IncrementalRec * a_inc_int_info);
+
++#ifndef FT_CALLBACK_DEF
++#ifdef __cplusplus
++#define FT_CALLBACK_DEF( x ) extern "C" x
++#else
++#define FT_CALLBACK_DEF( x ) static x
++#endif
++#endif
++
+ FT_CALLBACK_DEF(void *)
+ FF_alloc(FT_Memory memory, long size)
+ {
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.52-r1.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.52-r1.ebuild
index b22f3b060f4..362f03559a7 100644
--- a/app-text/ghostscript-gpl/ghostscript-gpl-9.52-r1.ebuild
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-9.52-r1.ebuild
@@ -60,6 +60,11 @@ RDEPEND="${DEPEND}
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ # bug #747808
+ "${FILESDIR}/${PN}-9.53.3-freetype-2.10.3.patch"
+)
+
src_prepare() {
if [[ -n "${MY_PATCHSET}" ]] ; then
# apply various patches, many borrowed from Fedora
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.53.3-r1.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.53.3-r2.ebuild
similarity index 98%
rename from app-text/ghostscript-gpl/ghostscript-gpl-9.53.3-r1.ebuild
rename to app-text/ghostscript-gpl/ghostscript-gpl-9.53.3-r2.ebuild
index 9e5d5486db8..47929e088e2 100644
--- a/app-text/ghostscript-gpl/ghostscript-gpl-9.53.3-r1.ebuild
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-9.53.3-r2.ebuild
@@ -35,7 +35,6 @@ DEPEND="
app-text/libpaper
media-libs/fontconfig
>=media-libs/freetype-2.4.9:2=
- <media-libs/freetype-2.10.3
>=media-libs/jbig2dec-0.19:=
>=media-libs/lcms-2.6:2
>=media-libs/libpng-1.6.2:0=
@@ -61,6 +60,11 @@ RDEPEND="${DEPEND}
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ # bug #747808
+ "${FILESDIR}/${PN}-9.53.3-freetype-2.10.3.patch"
+)
+
src_prepare() {
if [[ -n "${MY_PATCHSET}" ]] ; then
# apply various patches, many borrowed from Fedora
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-text/ghostscript-gpl/, app-text/ghostscript-gpl/files/
@ 2020-12-14 20:10 Thomas Deutschmann
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Deutschmann @ 2020-12-14 20:10 UTC (permalink / raw
To: gentoo-commits
commit: e795a8337fce689d9c4afc94e7e54181fa8f0522
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 14 20:07:31 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Dec 14 20:10:49 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e795a833
app-text/ghostscript-gpl: apply upstream fix for ps2epsi problem
Bug: https://bugs.gentoo.org/749399
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
.../files/ghostscript-gpl-9.53.3-fix-ps2epsi.patch | 16 ++++++++++++++++
...9.53.3-r3.ebuild => ghostscript-gpl-9.53.3-r4.ebuild} | 7 ++-----
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.53.3-fix-ps2epsi.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.53.3-fix-ps2epsi.patch
new file mode 100644
index 00000000000..9d7f53e2fd1
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.53.3-fix-ps2epsi.patch
@@ -0,0 +1,16 @@
+https://bugs.ghostscript.com/show_bug.cgi?id=703270
+
+--- a/lib/ps2epsi
++++ b/lib/ps2epsi
+@@ -40,8 +40,8 @@ else
+ outfile=$2
+ fi
+
+-# Note, we expect 'ps2epsi.ps' to be in the same directory as 'ps2epsi'
++# Note, we expect 'ps2epsi.ps' to be on one of the search paths which can be seen by: gs -h
+ "$GS_EXECUTABLE" -q -dNOOUTERSAVE -dNODISPLAY -dLastPage=1 -sOutputFile="${outfile}" \
+- --permit-file-all="${infile}" -- "$LIBDIR/ps2epsi.ps" "${infile}" 1>&2
++ --permit-file-all="${infile}" -- ps2epsi.ps "${infile}" 1>&2
+
+ exit 0
+
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.53.3-r3.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.53.3-r4.ebuild
similarity index 96%
rename from app-text/ghostscript-gpl/ghostscript-gpl-9.53.3-r3.ebuild
rename to app-text/ghostscript-gpl/ghostscript-gpl-9.53.3-r4.ebuild
index eeee9813774..e4d3e176be9 100644
--- a/app-text/ghostscript-gpl/ghostscript-gpl-9.53.3-r3.ebuild
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-9.53.3-r4.ebuild
@@ -61,8 +61,8 @@ RDEPEND="${DEPEND}
S="${WORKDIR}/${MY_P}"
PATCHES=(
- # bug #747808
- "${FILESDIR}/${PN}-9.53.3-freetype-2.10.3.patch"
+ "${FILESDIR}/${PN}-9.53.3-freetype-2.10.3.patch" # bug #747808
+ "${FILESDIR}/${P}-fix-ps2epsi.patch"
)
src_prepare() {
@@ -185,9 +185,6 @@ src_install() {
# install the CMaps from poppler-data properly, bug #409361
dosym ../../../poppler/cMaps "/usr/share/ghostscript/${PV}/Resource/CMap"
- # ps2epsi requires ps2epsi.ps in same directory, bug #749399
- dosym "../share/ghostscript/${PV}/lib/ps2epsi.ps" /usr/bin/ps2epsi.ps
-
if ! use static-libs; then
find "${ED}" -name '*.la' -delete || die
fi
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-text/ghostscript-gpl/, app-text/ghostscript-gpl/files/
@ 2021-09-13 0:54 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2021-09-13 0:54 UTC (permalink / raw
To: gentoo-commits
commit: eeb37a3981b77ed60be7975287e1a503375fa493
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 13 00:53:50 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Sep 13 00:54:18 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eeb37a39
app-text/ghostscript-gpl: patch CVE-2021-3781
Bug: https://bugs.gentoo.org/812509
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../ghostscript-gpl-9.54.0-CVE-2021-3781.patch | 213 +++++++++++++++++++++
.../ghostscript-gpl-9.54.0-r1.ebuild | 191 ++++++++++++++++++
2 files changed, 404 insertions(+)
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-CVE-2021-3781.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-CVE-2021-3781.patch
new file mode 100644
index 00000000000..779bedad4bd
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-CVE-2021-3781.patch
@@ -0,0 +1,213 @@
+https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=a9bd3dec9fde03327a4a2c69dad1036bf9632e20
+https://bugs.gentoo.org/812509
+
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Tue, 7 Sep 2021 20:36:12 +0100
+Subject: [PATCH 1/1] Bug 704342: Include device specifier strings in access
+ validation
+
+for the "%pipe%", %handle%" and %printer% io devices.
+
+We previously validated only the part after the "%pipe%" Postscript device
+specifier, but this proved insufficient.
+
+This rebuilds the original file name string, and validates it complete. The
+slight complication for "%pipe%" is it can be reached implicitly using
+"|" so we have to check both prefixes.
+
+Addresses CVE-2021-3781
+--- a/base/gdevpipe.c
++++ b/base/gdevpipe.c
+@@ -72,8 +72,28 @@ pipe_fopen(gx_io_device * iodev, const char *fname, const char *access,
+ #else
+ gs_lib_ctx_t *ctx = mem->gs_lib_ctx;
+ gs_fs_list_t *fs = ctx->core->fs;
++ /* The pipe device can be reached in two ways, explicltly with %pipe%
++ or implicitly with "|", so we have to check for both
++ */
++ char f[gp_file_name_sizeof];
++ const char *pipestr = "|";
++ const size_t pipestrlen = strlen(pipestr);
++ const size_t preflen = strlen(iodev->dname);
++ const size_t nlen = strlen(fname);
++ int code1;
++
++ if (preflen + nlen >= gp_file_name_sizeof)
++ return_error(gs_error_invalidaccess);
++
++ memcpy(f, iodev->dname, preflen);
++ memcpy(f + preflen, fname, nlen + 1);
++
++ code1 = gp_validate_path(mem, f, access);
++
++ memcpy(f, pipestr, pipestrlen);
++ memcpy(f + pipestrlen, fname, nlen + 1);
+
+- if (gp_validate_path(mem, fname, access) != 0)
++ if (code1 != 0 && gp_validate_path(mem, f, access) != 0 )
+ return gs_error_invalidfileaccess;
+
+ /*
+--- a/base/gp_mshdl.c
++++ b/base/gp_mshdl.c
+@@ -95,8 +95,17 @@ mswin_handle_fopen(gx_io_device * iodev, const char *fname, const char *access,
+ long hfile; /* Correct for Win32, may be wrong for Win64 */
+ gs_lib_ctx_t *ctx = mem->gs_lib_ctx;
+ gs_fs_list_t *fs = ctx->core->fs;
++ char f[gp_file_name_sizeof];
++ const size_t preflen = strlen(iodev->dname);
++ const size_t nlen = strlen(fname);
+
+- if (gp_validate_path(mem, fname, access) != 0)
++ if (preflen + nlen >= gp_file_name_sizeof)
++ return_error(gs_error_invalidaccess);
++
++ memcpy(f, iodev->dname, preflen);
++ memcpy(f + preflen, fname, nlen + 1);
++
++ if (gp_validate_path(mem, f, access) != 0)
+ return gs_error_invalidfileaccess;
+
+ /* First we try the open_handle method. */
+--- a/base/gp_msprn.c
++++ b/base/gp_msprn.c
+@@ -168,8 +168,16 @@ mswin_printer_fopen(gx_io_device * iodev, const char *fname, const char *access,
+ uintptr_t *ptid = &((tid_t *)(iodev->state))->tid;
+ gs_lib_ctx_t *ctx = mem->gs_lib_ctx;
+ gs_fs_list_t *fs = ctx->core->fs;
++ const size_t preflen = strlen(iodev->dname);
++ const size_t nlen = strlen(fname);
+
+- if (gp_validate_path(mem, fname, access) != 0)
++ if (preflen + nlen >= gp_file_name_sizeof)
++ return_error(gs_error_invalidaccess);
++
++ memcpy(pname, iodev->dname, preflen);
++ memcpy(pname + preflen, fname, nlen + 1);
++
++ if (gp_validate_path(mem, pname, access) != 0)
+ return gs_error_invalidfileaccess;
+
+ /* First we try the open_printer method. */
+--- a/base/gp_os2pr.c
++++ b/base/gp_os2pr.c
+@@ -107,9 +107,20 @@ os2_printer_fopen(gx_io_device * iodev, const char *fname, const char *access,
+ FILE ** pfile, char *rfname, uint rnamelen)
+ {
+ os2_printer_t *pr = (os2_printer_t *)iodev->state;
+- char driver_name[256];
++ char driver_name[gp_file_name_sizeof];
+ gs_lib_ctx_t *ctx = mem->gs_lib_ctx;
+ gs_fs_list_t *fs = ctx->core->fs;
++ const size_t preflen = strlen(iodev->dname);
++ const int size_t = strlen(fname);
++
++ if (preflen + nlen >= gp_file_name_sizeof)
++ return_error(gs_error_invalidaccess);
++
++ memcpy(driver_name, iodev->dname, preflen);
++ memcpy(driver_name + preflen, fname, nlen + 1);
++
++ if (gp_validate_path(mem, driver_name, access) != 0)
++ return gs_error_invalidfileaccess;
+
+ /* First we try the open_printer method. */
+ /* Note that the loop condition here ensures we don't
+--- a/base/gslibctx.c
++++ b/base/gslibctx.c
+@@ -655,82 +655,39 @@ rewrite_percent_specifiers(char *s)
+ int
+ gs_add_outputfile_control_path(gs_memory_t *mem, const char *fname)
+ {
+- char *fp, f[gp_file_name_sizeof];
+- const int pipe = 124; /* ASCII code for '|' */
+- const int len = strlen(fname);
+- int i, code;
++ char f[gp_file_name_sizeof];
++ int code;
+
+ /* Be sure the string copy will fit */
+- if (len >= gp_file_name_sizeof)
++ if (strlen(fname) >= gp_file_name_sizeof)
+ return gs_error_rangecheck;
+ strcpy(f, fname);
+- fp = f;
+ /* Try to rewrite any %d (or similar) in the string */
+ rewrite_percent_specifiers(f);
+- for (i = 0; i < len; i++) {
+- if (f[i] == pipe) {
+- fp = &f[i + 1];
+- /* Because we potentially have to check file permissions at two levels
+- for the output file (gx_device_open_output_file and the low level
+- fopen API, if we're using a pipe, we have to add both the full string,
+- (including the '|', and just the command to which we pipe - since at
+- the pipe_fopen(), the leading '|' has been stripped.
+- */
+- code = gs_add_control_path(mem, gs_permit_file_writing, f);
+- if (code < 0)
+- return code;
+- code = gs_add_control_path(mem, gs_permit_file_control, f);
+- if (code < 0)
+- return code;
+- break;
+- }
+- if (!IS_WHITESPACE(f[i]))
+- break;
+- }
+- code = gs_add_control_path(mem, gs_permit_file_control, fp);
++
++ code = gs_add_control_path(mem, gs_permit_file_control, f);
+ if (code < 0)
+ return code;
+- return gs_add_control_path(mem, gs_permit_file_writing, fp);
++ return gs_add_control_path(mem, gs_permit_file_writing, f);
+ }
+
+ int
+ gs_remove_outputfile_control_path(gs_memory_t *mem, const char *fname)
+ {
+- char *fp, f[gp_file_name_sizeof];
+- const int pipe = 124; /* ASCII code for '|' */
+- const int len = strlen(fname);
+- int i, code;
++ char f[gp_file_name_sizeof];
++ int code;
+
+ /* Be sure the string copy will fit */
+- if (len >= gp_file_name_sizeof)
++ if (strlen(fname) >= gp_file_name_sizeof)
+ return gs_error_rangecheck;
+ strcpy(f, fname);
+- fp = f;
+ /* Try to rewrite any %d (or similar) in the string */
+- for (i = 0; i < len; i++) {
+- if (f[i] == pipe) {
+- fp = &f[i + 1];
+- /* Because we potentially have to check file permissions at two levels
+- for the output file (gx_device_open_output_file and the low level
+- fopen API, if we're using a pipe, we have to add both the full string,
+- (including the '|', and just the command to which we pipe - since at
+- the pipe_fopen(), the leading '|' has been stripped.
+- */
+- code = gs_remove_control_path(mem, gs_permit_file_writing, f);
+- if (code < 0)
+- return code;
+- code = gs_remove_control_path(mem, gs_permit_file_control, f);
+- if (code < 0)
+- return code;
+- break;
+- }
+- if (!IS_WHITESPACE(f[i]))
+- break;
+- }
+- code = gs_remove_control_path(mem, gs_permit_file_control, fp);
++ rewrite_percent_specifiers(f);
++
++ code = gs_remove_control_path(mem, gs_permit_file_control, f);
+ if (code < 0)
+ return code;
+- return gs_remove_control_path(mem, gs_permit_file_writing, fp);
++ return gs_remove_control_path(mem, gs_permit_file_writing, f);
+ }
+
+ int
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild
new file mode 100644
index 00000000000..f494a7875d2
--- /dev/null
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic toolchain-funcs
+
+DESCRIPTION="Interpreter for the PostScript language and PDF"
+HOMEPAGE="https://ghostscript.com/"
+
+MY_PN=${PN/-gpl}
+MY_P="${MY_PN}-${PV/_}"
+PVM=$(ver_cut 1-2)
+PVM_S=$(ver_rs 1-2 "")
+
+MY_PATCHSET="ghostscript-gpl-9.54-patchset-01.tar.xz"
+
+SRC_URI="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${PVM_S}/${MY_P}.tar.xz"
+
+if [[ -n "${MY_PATCHSET}" ]] ; then
+ SRC_URI+=" https://dev.gentoo.org/~whissi/dist/ghostscript-gpl/${MY_PATCHSET}"
+fi
+
+LICENSE="AGPL-3 CPL-1.0"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="cups dbus gtk +jpeg2k l10n_de static-libs unicode X"
+
+LANGS="ja ko zh-CN zh-TW"
+for X in ${LANGS} ; do
+ IUSE="${IUSE} l10n_${X}"
+done
+
+DEPEND="
+ app-text/libpaper
+ media-libs/fontconfig
+ >=media-libs/freetype-2.4.9:2=
+ >=media-libs/jbig2dec-0.19:=
+ >=media-libs/lcms-2.6:2
+ >=media-libs/libpng-1.6.2:0=
+ >=media-libs/tiff-4.0.1:0=
+ >=sys-libs/zlib-1.2.7
+ virtual/jpeg:0
+ cups? ( >=net-print/cups-1.3.8 )
+ dbus? ( sys-apps/dbus )
+ gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2= )
+ unicode? ( net-dns/libidn:0= )
+ X? ( x11-libs/libXt x11-libs/libXext )
+"
+BDEPEND="virtual/pkgconfig"
+RDEPEND="${DEPEND}
+ app-text/poppler-data
+ >=media-fonts/urw-fonts-2.4.9
+ l10n_ja? ( media-fonts/kochi-substitute )
+ l10n_ko? ( media-fonts/baekmuk-fonts )
+ l10n_zh-CN? ( media-fonts/arphicfonts )
+ l10n_zh-TW? ( media-fonts/arphicfonts )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ if [[ -n "${MY_PATCHSET}" ]] ; then
+ # apply various patches, many borrowed from Fedora
+ # https://src.fedoraproject.org/rpms/ghostscript
+ # and Debian
+ # https://salsa.debian.org/printing-team/ghostscript/-/tree/debian/latest/debian/patches
+ eapply "${WORKDIR}/patches/"*.patch
+ fi
+
+ eapply "${FILESDIR}"/${P}-CVE-2021-3781.patch
+
+ default
+
+ # remove internal copies of various libraries
+ rm -r cups/libs || die
+ rm -r freetype || die
+ rm -r jbig2dec || die
+ rm -r jpeg || die
+ rm -r lcms2mt || die
+ rm -r libpng || die
+ rm -r tiff || die
+ rm -r zlib || die
+ rm -r openjpeg || die
+ # remove internal CMaps (CMaps from poppler-data are used instead)
+ rm -r Resource/CMap || die
+
+ if ! use gtk ; then
+ sed -e "s:\$(GSSOX)::" \
+ -e "s:.*\$(GSSOX_XENAME)$::" \
+ -i base/unix-dll.mak || die "sed failed"
+ fi
+
+ # Force the include dirs to a neutral location.
+ sed -e "/^ZLIBDIR=/s:=.*:=${T}:" \
+ -i configure.ac || die
+ # Some files depend on zlib.h directly. Redirect them. #573248
+ # Also make sure to not define OPJ_STATIC to avoid linker errors due to
+ # hidden symbols (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203327#c1)
+ sed -e '/^zlib_h/s:=.*:=:' \
+ -e 's|-DOPJ_STATIC ||' \
+ -i base/lib.mak || die
+
+ # search path fix
+ # put LDFLAGS after BINDIR, bug #383447
+ sed -e "s:\$\(gsdatadir\)/lib:@datarootdir@/ghostscript/${PV}/$(get_libdir):" \
+ -e "s:exdir=.*:exdir=@datarootdir@/doc/${PF}/examples:" \
+ -e "s:docdir=.*:docdir=@datarootdir@/doc/${PF}/html:" \
+ -e "s:GS_DOCDIR=.*:GS_DOCDIR=@datarootdir@/doc/${PF}/html:" \
+ -e 's:-L$(BINDIR):& $(LDFLAGS):g' \
+ -i Makefile.in base/*.mak || die "sed failed"
+
+ # remove incorrect symlink, bug 590384
+ rm ijs/ltmain.sh || die
+ eautoreconf
+
+ cd ijs || die
+ eautoreconf
+}
+
+src_configure() {
+ local FONTPATH
+ for path in \
+ "${EPREFIX}"/usr/share/fonts/urw-fonts \
+ "${EPREFIX}"/usr/share/fonts/Type1 \
+ "${EPREFIX}"/usr/share/fonts \
+ "${EPREFIX}"/usr/share/poppler/cMap/Adobe-CNS1 \
+ "${EPREFIX}"/usr/share/poppler/cMap/Adobe-GB1 \
+ "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan1 \
+ "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan2 \
+ "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Korea1
+ do
+ FONTPATH="$FONTPATH${FONTPATH:+:}${EPREFIX}$path"
+ done
+
+ PKGCONFIG=$(type -P $(tc-getPKG_CONFIG)) \
+ econf \
+ --enable-dynamic \
+ --enable-freetype \
+ --enable-fontconfig \
+ $(use_enable jpeg2k openjpeg) \
+ --disable-compile-inits \
+ --with-drivers=ALL \
+ --with-fontpath="$FONTPATH" \
+ --with-ijs \
+ --with-jbig2dec \
+ --with-libpaper \
+ --with-system-libtiff \
+ $(use_enable cups) \
+ $(use_enable dbus) \
+ $(use_enable gtk) \
+ $(use_with cups pdftoraster) \
+ $(use_with unicode libidn) \
+ $(use_with X x) \
+ DARWIN_LDFLAGS_SO_PREFIX="${EPREFIX}/usr/lib/"
+
+ cd "${S}/ijs" || die
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake so all
+
+ cd ijs || die
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" install-so install
+
+ # move gsc to gs, bug #343447
+ # gsc collides with gambit, bug #253064
+ mv -f "${ED}"/usr/bin/{gsc,gs} || die
+
+ cd "${S}/ijs" || die
+ emake DESTDIR="${D}" install
+
+ # install the CMaps from poppler-data properly, bug #409361
+ dosym ../../../poppler/cMaps "/usr/share/ghostscript/${PV}/Resource/CMap"
+
+ if ! use static-libs; then
+ find "${ED}" -name '*.la' -delete || die
+ fi
+
+ if ! use l10n_de; then
+ rm -r "${ED}"/usr/share/man/de || die
+ fi
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-text/ghostscript-gpl/, app-text/ghostscript-gpl/files/
@ 2021-09-21 19:02 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2021-09-21 19:02 UTC (permalink / raw
To: gentoo-commits
commit: b7805f02f359138edf4384f2b7df317bfc27e3cb
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 21 19:01:50 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep 21 19:02:14 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7805f02
app-text/ghostscript-gpl: add parallel build patch to 9.54.0-r1
Bug: https://bugs.gentoo.org/800125
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../ghostscript-gpl-9.54.0-makefile-deps.patch | 110 +++++++++++++++++++++
.../ghostscript-gpl-9.54.0-r1.ebuild | 2 +
2 files changed, 112 insertions(+)
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-makefile-deps.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-makefile-deps.patch
new file mode 100644
index 00000000000..33858f763db
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-makefile-deps.patch
@@ -0,0 +1,110 @@
+https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=4874418fd031617212336b8b55f8fcba3b9cfb68#patch1
+https://bugs.gentoo.org/800125
+
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Thu, 6 May 2021 12:23:59 +0100
+Subject: [PATCH] Remove makefile reference to non-existent header file
+
+Fixes (spurious) parallel make failure on the cluster
+--- a/base/lib.mak
++++ b/base/lib.mak
+@@ -488,7 +488,6 @@ gxcoord_h=$(GLSRC)gxcoord.h
+ gxcpath_h=$(GLSRC)gxcpath.h
+ gxdda_h=$(GLSRC)gxdda.h
+ gxdevbuf_h=$(GLSRC)gxdevbuf.h
+-gxdevrop_h=$(GLSRC)gxdevrop.h
+ gxdevmem_h=$(GLSRC)gxdevmem.h
+ gxdhtres_h=$(GLSRC)gxdhtres.h
+ gxfont0_h=$(GLSRC)gxfont0.h
+@@ -2407,13 +2406,13 @@ $(GLD)roplib.dev : $(LIB_MAK) $(ECHOGS_XE) $(roplib_) $(LIB_MAK) $(MAKEDIRS)
+
+ $(GLOBJ)gdevdrop_1.$(OBJ) : $(GLSRC)gdevdrop.c $(AK) $(gx_h) $(gserrors_h) \
+ $(memory__h) $(gxdevsop_h) $(gsbittab_h) $(gsropt_h) $(gxcindex_h) \
+- $(gxdcolor_h) $(gxdevice_h) $(gxdevmem_h) $(gxdevrop_h) $(gxgetbit_h) \
++ $(gxdcolor_h) $(gxdevice_h) $(gxdevmem_h) $(gxgetbit_h) \
+ $(gdevmem_h) $(gdevmrop_h) $(gdevmpla_h) $(stdint__h) $(LIB_MAK) $(MAKEDIRS)
+ $(GLCC) $(D_)WITH_CAL$(_D) $(I_)$(CALSRCDIR)$(_I) $(GLO_)gdevdrop_1.$(OBJ) $(C_) $(GLSRC)gdevdrop.c
+
+ $(GLOBJ)gdevdrop_0.$(OBJ) : $(GLSRC)gdevdrop.c $(AK) $(gx_h) $(gserrors_h) \
+ $(memory__h) $(gxdevsop_h) $(gsbittab_h) $(gsropt_h) $(gxcindex_h) \
+- $(gxdcolor_h) $(gxdevice_h) $(gxdevmem_h) $(gxdevrop_h) $(gxgetbit_h) \
++ $(gxdcolor_h) $(gxdevice_h) $(gxdevmem_h) $(gxgetbit_h) \
+ $(gdevmem_h) $(gdevmrop_h) $(gdevmpla_h) $(stdint__h) $(LIB_MAK) $(MAKEDIRS)
+ $(GLCC) $(GLO_)gdevdrop_0.$(OBJ) $(C_) $(GLSRC)gdevdrop.c
+
+@@ -5585,75 +5584,6 @@ $(GLSRC)gxdevbuf.h:$(GLSRC)std.h
+ $(GLSRC)gxdevbuf.h:$(GLSRC)stdpre.h
+ $(GLSRC)gxdevbuf.h:$(GLGEN)arch.h
+ $(GLSRC)gxdevbuf.h:$(GLSRC)gs_dll_call.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxdevcli.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxcmap.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxtext.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gstext.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsnamecl.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gstparam.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxfmap.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsfunc.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxcspace.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxrplane.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gscsel.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxfcache.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsfont.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsimage.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsdcolor.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxcvalue.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxbcache.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsropt.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxdda.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxpath.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxfrac.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxtmap.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxftype.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gscms.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsrect.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gslparam.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsdevice.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gscpm.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gscspace.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsgstate.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsxfont.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsdsrc.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsiparam.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxfixed.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gscompt.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsmatrix.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gspenum.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxhttile.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsparam.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsrefct.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gp.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)memento.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)memory_.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsuid.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsstruct.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxsync.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxbitmap.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)srdline.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)scommon.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsbitmap.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsccolor.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxarith.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)stat_.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gpsync.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsstype.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsmemory.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gpgetenv.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gscdefs.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gslibctx.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gxcindex.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)stdio_.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gsccode.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)stdint_.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gssprintf.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gstypes.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)std.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)stdpre.h
+-$(GLSRC)gxdevrop.h:$(GLGEN)arch.h
+-$(GLSRC)gxdevrop.h:$(GLSRC)gs_dll_call.h
+ $(GLSRC)gxdevmem.h:$(GLSRC)gxdevcli.h
+ $(GLSRC)gxdevmem.h:$(GLSRC)gxcmap.h
+ $(GLSRC)gxdevmem.h:$(GLSRC)gxtext.h
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild
index 710ac1d7f7a..8c45437e8ef 100644
--- a/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild
@@ -69,7 +69,9 @@ src_prepare() {
eapply "${WORKDIR}/patches/"*.patch
fi
+ # Upstream patches
eapply "${FILESDIR}"/${P}-CVE-2021-3781.patch
+ eapply "${FILESDIR}"/${P}-makefile-deps.patch
default
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-text/ghostscript-gpl/, app-text/ghostscript-gpl/files/
@ 2022-01-15 14:15 Andreas Sturmlechner
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Sturmlechner @ 2022-01-15 14:15 UTC (permalink / raw
To: gentoo-commits
commit: 721a4664fee78f80d4c0a370b80479e22bf1f1bb
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 15 12:43:39 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Jan 15 14:14:59 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=721a4664
app-text/ghostscript-gpl: Drop 9.54.0-r1
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
app-text/ghostscript-gpl/Manifest | 2 -
.../ghostscript-gpl-9.54.0-CVE-2021-3781.patch | 213 ---------------------
.../ghostscript-gpl-9.54.0-makefile-deps-2.patch | 96 ----------
.../ghostscript-gpl-9.54.0-makefile-deps.patch | 112 -----------
.../ghostscript-gpl-9.54.0-r1.ebuild | 194 -------------------
5 files changed, 617 deletions(-)
diff --git a/app-text/ghostscript-gpl/Manifest b/app-text/ghostscript-gpl/Manifest
index 7715946cfaaf..6458096e7f7b 100644
--- a/app-text/ghostscript-gpl/Manifest
+++ b/app-text/ghostscript-gpl/Manifest
@@ -1,4 +1,2 @@
-DIST ghostscript-9.54.0.tar.xz 56001768 BLAKE2B 4a98b1af74c4b4caf8d263cd5529059304a76884418c90401b0fc9a89e0f5de5417a439f6e08b95374e62158eec65528ef5f949497d5050a6408fb7c87e54aa9 SHA512 a3c96925f4dbf5e276fc543b88df185a0435c68166db15ac532094329ba8db314d739a292da18be7954daaafeeb290e641ea03edf888854d7e752998ec6062cc
DIST ghostscript-9.55.0.tar.xz 67417724 BLAKE2B 87827856aa60c2c4a4ed209bc4203a837107df0404af036a48e5baa23fccfc945a97fe328a80b15c7357fc71acb82721d4b96e5f726d8c9d836fee031916aef7 SHA512 42c7e05ba72e9fdd626c5412187b13fc3c9459cae57dfe49ddd3011bf4e2cbd10bc88f09068a9f777c2ec6ae881cd737fd700ab62ec5108f2aca69152588f38e
-DIST ghostscript-gpl-9.54-patchset-01.tar.xz 2600 BLAKE2B e89f16f149ba3c46b1e81d774a3dca8345dfb60ec959249292cc0f3d8bc811ac169e232e3fb85de9d0ce65dd41453f90461798007b8b9fdd2c6e44d55e7a9d10 SHA512 0c49fbe6ece86b0c7729421cf06a6a210341fbe676efd89c0f97c96a426d3156e6a8ee596e050b8ee6a1af7a94ea8d1d54a6166f020a7d40fec95949cd7f3b12
DIST ghostscript-gpl-9.55-patchset-01.tar.xz 2940 BLAKE2B 450498f0bd191d5936de1c2bdff659f075c39f7f7fefaf85b438f51967c4a8c294c6c887b36d5c0429d3677fb06e171e77da4b81ec911efea96df5b107d489dc SHA512 87411e68a078f77171128392962a9cd7a639bf6082447c658a50017cbf3f4e3ebce63af46eb9befdf2c1317de3a7a17e389f4de6e3aeae83d519b1c7b36de3c8
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-CVE-2021-3781.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-CVE-2021-3781.patch
deleted file mode 100644
index 779bedad4bde..000000000000
--- a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-CVE-2021-3781.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=a9bd3dec9fde03327a4a2c69dad1036bf9632e20
-https://bugs.gentoo.org/812509
-
-From: Chris Liddell <chris.liddell@artifex.com>
-Date: Tue, 7 Sep 2021 20:36:12 +0100
-Subject: [PATCH 1/1] Bug 704342: Include device specifier strings in access
- validation
-
-for the "%pipe%", %handle%" and %printer% io devices.
-
-We previously validated only the part after the "%pipe%" Postscript device
-specifier, but this proved insufficient.
-
-This rebuilds the original file name string, and validates it complete. The
-slight complication for "%pipe%" is it can be reached implicitly using
-"|" so we have to check both prefixes.
-
-Addresses CVE-2021-3781
---- a/base/gdevpipe.c
-+++ b/base/gdevpipe.c
-@@ -72,8 +72,28 @@ pipe_fopen(gx_io_device * iodev, const char *fname, const char *access,
- #else
- gs_lib_ctx_t *ctx = mem->gs_lib_ctx;
- gs_fs_list_t *fs = ctx->core->fs;
-+ /* The pipe device can be reached in two ways, explicltly with %pipe%
-+ or implicitly with "|", so we have to check for both
-+ */
-+ char f[gp_file_name_sizeof];
-+ const char *pipestr = "|";
-+ const size_t pipestrlen = strlen(pipestr);
-+ const size_t preflen = strlen(iodev->dname);
-+ const size_t nlen = strlen(fname);
-+ int code1;
-+
-+ if (preflen + nlen >= gp_file_name_sizeof)
-+ return_error(gs_error_invalidaccess);
-+
-+ memcpy(f, iodev->dname, preflen);
-+ memcpy(f + preflen, fname, nlen + 1);
-+
-+ code1 = gp_validate_path(mem, f, access);
-+
-+ memcpy(f, pipestr, pipestrlen);
-+ memcpy(f + pipestrlen, fname, nlen + 1);
-
-- if (gp_validate_path(mem, fname, access) != 0)
-+ if (code1 != 0 && gp_validate_path(mem, f, access) != 0 )
- return gs_error_invalidfileaccess;
-
- /*
---- a/base/gp_mshdl.c
-+++ b/base/gp_mshdl.c
-@@ -95,8 +95,17 @@ mswin_handle_fopen(gx_io_device * iodev, const char *fname, const char *access,
- long hfile; /* Correct for Win32, may be wrong for Win64 */
- gs_lib_ctx_t *ctx = mem->gs_lib_ctx;
- gs_fs_list_t *fs = ctx->core->fs;
-+ char f[gp_file_name_sizeof];
-+ const size_t preflen = strlen(iodev->dname);
-+ const size_t nlen = strlen(fname);
-
-- if (gp_validate_path(mem, fname, access) != 0)
-+ if (preflen + nlen >= gp_file_name_sizeof)
-+ return_error(gs_error_invalidaccess);
-+
-+ memcpy(f, iodev->dname, preflen);
-+ memcpy(f + preflen, fname, nlen + 1);
-+
-+ if (gp_validate_path(mem, f, access) != 0)
- return gs_error_invalidfileaccess;
-
- /* First we try the open_handle method. */
---- a/base/gp_msprn.c
-+++ b/base/gp_msprn.c
-@@ -168,8 +168,16 @@ mswin_printer_fopen(gx_io_device * iodev, const char *fname, const char *access,
- uintptr_t *ptid = &((tid_t *)(iodev->state))->tid;
- gs_lib_ctx_t *ctx = mem->gs_lib_ctx;
- gs_fs_list_t *fs = ctx->core->fs;
-+ const size_t preflen = strlen(iodev->dname);
-+ const size_t nlen = strlen(fname);
-
-- if (gp_validate_path(mem, fname, access) != 0)
-+ if (preflen + nlen >= gp_file_name_sizeof)
-+ return_error(gs_error_invalidaccess);
-+
-+ memcpy(pname, iodev->dname, preflen);
-+ memcpy(pname + preflen, fname, nlen + 1);
-+
-+ if (gp_validate_path(mem, pname, access) != 0)
- return gs_error_invalidfileaccess;
-
- /* First we try the open_printer method. */
---- a/base/gp_os2pr.c
-+++ b/base/gp_os2pr.c
-@@ -107,9 +107,20 @@ os2_printer_fopen(gx_io_device * iodev, const char *fname, const char *access,
- FILE ** pfile, char *rfname, uint rnamelen)
- {
- os2_printer_t *pr = (os2_printer_t *)iodev->state;
-- char driver_name[256];
-+ char driver_name[gp_file_name_sizeof];
- gs_lib_ctx_t *ctx = mem->gs_lib_ctx;
- gs_fs_list_t *fs = ctx->core->fs;
-+ const size_t preflen = strlen(iodev->dname);
-+ const int size_t = strlen(fname);
-+
-+ if (preflen + nlen >= gp_file_name_sizeof)
-+ return_error(gs_error_invalidaccess);
-+
-+ memcpy(driver_name, iodev->dname, preflen);
-+ memcpy(driver_name + preflen, fname, nlen + 1);
-+
-+ if (gp_validate_path(mem, driver_name, access) != 0)
-+ return gs_error_invalidfileaccess;
-
- /* First we try the open_printer method. */
- /* Note that the loop condition here ensures we don't
---- a/base/gslibctx.c
-+++ b/base/gslibctx.c
-@@ -655,82 +655,39 @@ rewrite_percent_specifiers(char *s)
- int
- gs_add_outputfile_control_path(gs_memory_t *mem, const char *fname)
- {
-- char *fp, f[gp_file_name_sizeof];
-- const int pipe = 124; /* ASCII code for '|' */
-- const int len = strlen(fname);
-- int i, code;
-+ char f[gp_file_name_sizeof];
-+ int code;
-
- /* Be sure the string copy will fit */
-- if (len >= gp_file_name_sizeof)
-+ if (strlen(fname) >= gp_file_name_sizeof)
- return gs_error_rangecheck;
- strcpy(f, fname);
-- fp = f;
- /* Try to rewrite any %d (or similar) in the string */
- rewrite_percent_specifiers(f);
-- for (i = 0; i < len; i++) {
-- if (f[i] == pipe) {
-- fp = &f[i + 1];
-- /* Because we potentially have to check file permissions at two levels
-- for the output file (gx_device_open_output_file and the low level
-- fopen API, if we're using a pipe, we have to add both the full string,
-- (including the '|', and just the command to which we pipe - since at
-- the pipe_fopen(), the leading '|' has been stripped.
-- */
-- code = gs_add_control_path(mem, gs_permit_file_writing, f);
-- if (code < 0)
-- return code;
-- code = gs_add_control_path(mem, gs_permit_file_control, f);
-- if (code < 0)
-- return code;
-- break;
-- }
-- if (!IS_WHITESPACE(f[i]))
-- break;
-- }
-- code = gs_add_control_path(mem, gs_permit_file_control, fp);
-+
-+ code = gs_add_control_path(mem, gs_permit_file_control, f);
- if (code < 0)
- return code;
-- return gs_add_control_path(mem, gs_permit_file_writing, fp);
-+ return gs_add_control_path(mem, gs_permit_file_writing, f);
- }
-
- int
- gs_remove_outputfile_control_path(gs_memory_t *mem, const char *fname)
- {
-- char *fp, f[gp_file_name_sizeof];
-- const int pipe = 124; /* ASCII code for '|' */
-- const int len = strlen(fname);
-- int i, code;
-+ char f[gp_file_name_sizeof];
-+ int code;
-
- /* Be sure the string copy will fit */
-- if (len >= gp_file_name_sizeof)
-+ if (strlen(fname) >= gp_file_name_sizeof)
- return gs_error_rangecheck;
- strcpy(f, fname);
-- fp = f;
- /* Try to rewrite any %d (or similar) in the string */
-- for (i = 0; i < len; i++) {
-- if (f[i] == pipe) {
-- fp = &f[i + 1];
-- /* Because we potentially have to check file permissions at two levels
-- for the output file (gx_device_open_output_file and the low level
-- fopen API, if we're using a pipe, we have to add both the full string,
-- (including the '|', and just the command to which we pipe - since at
-- the pipe_fopen(), the leading '|' has been stripped.
-- */
-- code = gs_remove_control_path(mem, gs_permit_file_writing, f);
-- if (code < 0)
-- return code;
-- code = gs_remove_control_path(mem, gs_permit_file_control, f);
-- if (code < 0)
-- return code;
-- break;
-- }
-- if (!IS_WHITESPACE(f[i]))
-- break;
-- }
-- code = gs_remove_control_path(mem, gs_permit_file_control, fp);
-+ rewrite_percent_specifiers(f);
-+
-+ code = gs_remove_control_path(mem, gs_permit_file_control, f);
- if (code < 0)
- return code;
-- return gs_remove_control_path(mem, gs_permit_file_writing, fp);
-+ return gs_remove_control_path(mem, gs_permit_file_writing, f);
- }
-
- int
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-makefile-deps-2.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-makefile-deps-2.patch
deleted file mode 100644
index 38f0eaa1516f..000000000000
--- a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-makefile-deps-2.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From: Sam James <sam@gentoo.org>
-Date: Tue, 28 Sep 2021 03:40:19 +0100
-Subject: [PATCH] Rebased versions of upstream Makefile patches
-
-https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=cf868c13c03a781243c1d8764cbeba3a49ffb92e
-https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=c8285e6e9cd42277ae298475ad0c96da009b0e98
-https://bugs.gentoo.org/800125
---- a/devices/devs.mak
-+++ b/devices/devs.mak
-@@ -669,7 +669,7 @@ $(DD)txtwrite.dev : $(ECHOGS_XE) $(txtwrite_) $(GDEV)\
- $(DEVOBJ)gdevtxtw.$(OBJ) : $(DEVVECSRC)gdevtxtw.c $(GDEV) $(gdevkrnlsclass_h) \
- $(memory__h) $(string__h) $(gp_h) $(gsparam_h) $(gsutil_h) \
- $(gsdevice_h) $(gxfont_h) $(gxfont0_h) $(gstext_h) $(gxfcid_h)\
-- $(gxgstate_h) $(gxpath_h) $(gdevagl_h) $(DEVS_MAK) $(MAKEDIRS) $(DEVVECSRC)doc_common.h
-+ $(gxgstate_h) $(gxpath_h) $(gdevagl_h) $(DEVS_MAK) $(DEVVECSRC)doc_common.h $(MAKEDIRS)
- $(DEVCC) $(DEVO_)gdevtxtw.$(OBJ) $(C_) $(DEVVECSRC)gdevtxtw.c
-
- $(DEVOBJ)gdevagl.$(OBJ) : $(DEVVECSRC)gdevagl.c $(GDEV)\
-@@ -684,14 +684,14 @@ gdevagl_h=$(DEVVECSRC)gdevagl.h
- docxwrite_=$(DEVOBJ)gdevdocxw.$(OBJ) $(DEVOBJ)gdevagl.$(OBJ) $(DEVOBJ)doc_common.$(OBJ)
-
- $(DD)docxwrite.dev : $(ECHOGS_XE) $(docxwrite_) $(GDEV)\
-- $(gdevagl_h) $(DEVS_MAK) $(MAKEDIRS) $(EXTRACT_OBJS)
-+ $(gdevagl_h) $(DEVS_MAK) $(EXTRACT_OBJS) $(MAKEDIRS)
- $(SETDEV2) $(DD)docxwrite $(docxwrite_) $(EXTRACT_OBJS)
-
- $(DEVOBJ)gdevdocxw.$(OBJ) : $(DEVVECSRC)gdevdocxw.c $(GDEV) $(gdevkrnlsclass_h) \
- $(memory__h) $(string__h) $(gp_h) $(gsparam_h) $(gsutil_h) \
- $(gsdevice_h) $(gxfont_h) $(gxfont0_h) $(gstext_h) $(gxfcid_h)\
-- $(gxgstate_h) $(gxpath_h) $(gdevagl_h) $(DEVS_MAK) $(MAKEDIRS) \
-- $(DEVVECSRC)doc_common.h
-+ $(gxgstate_h) $(gxpath_h) $(gdevagl_h) $(DEVS_MAK) $(DEVVECSRC)doc_common.h \
-+ $(MAKEDIRS)
- $(DEVCC) $(DEVO_)gdevdocxw.$(OBJ) $(C_) $(DEVVECSRC)gdevdocxw.c
-
- # Shared code used by txtwrite and docxwrite.
-@@ -699,7 +699,7 @@ $(DEVOBJ)gdevdocxw.$(OBJ) : $(DEVVECSRC)gdevdocxw.c $(GDEV) $(gdevkrnlsclass_h)
- $(DEVOBJ)doc_common.$(OBJ) : $(DEVVECSRC)doc_common.c $(GDEV) $(gdevkrnlsclass_h) \
- $(memory__h) $(string__h) $(gp_h) $(gsparam_h) $(gsutil_h) \
- $(gsdevice_h) $(gxfont_h) $(gxfont0_h) $(gstext_h) $(gxfcid_h)\
-- $(gxgstate_h) $(gxpath_h) $(gdevagl_h) $(DEVS_MAK) $(MAKEDIRS) $(DEVVECSRC)doc_common.h
-+ $(gxgstate_h) $(gxpath_h) $(gdevagl_h) $(DEVS_MAK) $(DEVVECSRC)doc_common.h $(MAKEDIRS)
- $(DEVCC) $(DEVO_)doc_common.$(OBJ) $(C_) $(DEVVECSRC)doc_common.c
-
-
---- a/devices/extract.mak
-+++ b/devices/extract.mak
-@@ -1,37 +1,37 @@
- extract_cc = $(CC) $(CCFLAGS) $(I_)$(EXTRACT_DIR)/include$(_I) $(I_)$(ZSRCDIR)$(_I) $(O_)
- extract_out_prefix = $(GLOBJDIR)$(D)extract_
-
--$(extract_out_prefix)alloc.$(OBJ): $(EXTRACT_DIR)/src/alloc.c
-+$(extract_out_prefix)alloc.$(OBJ): $(EXTRACT_DIR)/src/alloc.c $(MAKEDIRS)
- $(extract_cc)$@ $(C_) $(EXTRACT_DIR)/src/alloc.c
-
--$(extract_out_prefix)astring.$(OBJ): $(EXTRACT_DIR)/src/astring.c
-+$(extract_out_prefix)astring.$(OBJ): $(EXTRACT_DIR)/src/astring.c $(MAKEDIRS)
- $(extract_cc)$@ $(C_) $(EXTRACT_DIR)/src/astring.c
-
--$(extract_out_prefix)buffer.$(OBJ): $(EXTRACT_DIR)/src/buffer.c
-+$(extract_out_prefix)buffer.$(OBJ): $(EXTRACT_DIR)/src/buffer.c $(MAKEDIRS)
- $(extract_cc)$@ $(C_) $(EXTRACT_DIR)/src/buffer.c
-
--$(extract_out_prefix)docx.$(OBJ): $(EXTRACT_DIR)/src/docx.c
-+$(extract_out_prefix)docx.$(OBJ): $(EXTRACT_DIR)/src/docx.c $(MAKEDIRS)
- $(extract_cc)$@ $(C_) $(EXTRACT_DIR)/src/docx.c
-
--$(extract_out_prefix)docx_template.$(OBJ): $(EXTRACT_DIR)/src/docx_template.c
-+$(extract_out_prefix)docx_template.$(OBJ): $(EXTRACT_DIR)/src/docx_template.c $(MAKEDIRS)
- $(extract_cc)$@ $(C_) $(EXTRACT_DIR)/src/docx_template.c
-
--$(extract_out_prefix)extract.$(OBJ): $(EXTRACT_DIR)/src/extract.c
-+$(extract_out_prefix)extract.$(OBJ): $(EXTRACT_DIR)/src/extract.c $(MAKEDIRS)
- $(extract_cc)$@ $(C_) $(EXTRACT_DIR)/src/extract.c
-
--$(extract_out_prefix)join.$(OBJ): $(EXTRACT_DIR)/src/join.c
-+$(extract_out_prefix)join.$(OBJ): $(EXTRACT_DIR)/src/join.c $(MAKEDIRS)
- $(extract_cc)$@ $(C_) $(EXTRACT_DIR)/src/join.c
-
--$(extract_out_prefix)mem.$(OBJ): $(EXTRACT_DIR)/src/mem.c
-+$(extract_out_prefix)mem.$(OBJ): $(EXTRACT_DIR)/src/mem.c $(MAKEDIRS)
- $(extract_cc)$@ $(C_) $(EXTRACT_DIR)/src/mem.c
-
--$(extract_out_prefix)outf.$(OBJ): $(EXTRACT_DIR)/src/outf.c
-+$(extract_out_prefix)outf.$(OBJ): $(EXTRACT_DIR)/src/outf.c $(MAKEDIRS)
- $(extract_cc)$@ $(C_) $(EXTRACT_DIR)/src/outf.c
-
--$(extract_out_prefix)xml.$(OBJ): $(EXTRACT_DIR)/src/xml.c
-+$(extract_out_prefix)xml.$(OBJ): $(EXTRACT_DIR)/src/xml.c $(MAKEDIRS)
- $(extract_cc)$@ $(C_) $(EXTRACT_DIR)/src/xml.c
-
--$(extract_out_prefix)zip.$(OBJ): $(EXTRACT_DIR)/src/zip.c
-+$(extract_out_prefix)zip.$(OBJ): $(EXTRACT_DIR)/src/zip.c $(MAKEDIRS)
- $(extract_cc)$@ $(C_) $(EXTRACT_DIR)/src/zip.c
-
- EXTRACT_OBJS = \
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-makefile-deps.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-makefile-deps.patch
deleted file mode 100644
index 51ce95958ba1..000000000000
--- a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-makefile-deps.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=4874418fd031617212336b8b55f8fcba3b9cfb68#patch1
-https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=cf868c13c03a781243c1d8764cbeba3a49ffb92e
-https://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=c8285e6e9cd42277ae298475ad0c96da009b0e98
-https://bugs.gentoo.org/800125
-
-From: Chris Liddell <chris.liddell@artifex.com>
-Date: Thu, 6 May 2021 12:23:59 +0100
-Subject: [PATCH] Remove makefile reference to non-existent header file
-
-Fixes (spurious) parallel make failure on the cluster
---- a/base/lib.mak
-+++ b/base/lib.mak
-@@ -488,7 +488,6 @@ gxcoord_h=$(GLSRC)gxcoord.h
- gxcpath_h=$(GLSRC)gxcpath.h
- gxdda_h=$(GLSRC)gxdda.h
- gxdevbuf_h=$(GLSRC)gxdevbuf.h
--gxdevrop_h=$(GLSRC)gxdevrop.h
- gxdevmem_h=$(GLSRC)gxdevmem.h
- gxdhtres_h=$(GLSRC)gxdhtres.h
- gxfont0_h=$(GLSRC)gxfont0.h
-@@ -2407,13 +2406,13 @@ $(GLD)roplib.dev : $(LIB_MAK) $(ECHOGS_XE) $(roplib_) $(LIB_MAK) $(MAKEDIRS)
-
- $(GLOBJ)gdevdrop_1.$(OBJ) : $(GLSRC)gdevdrop.c $(AK) $(gx_h) $(gserrors_h) \
- $(memory__h) $(gxdevsop_h) $(gsbittab_h) $(gsropt_h) $(gxcindex_h) \
-- $(gxdcolor_h) $(gxdevice_h) $(gxdevmem_h) $(gxdevrop_h) $(gxgetbit_h) \
-+ $(gxdcolor_h) $(gxdevice_h) $(gxdevmem_h) $(gxgetbit_h) \
- $(gdevmem_h) $(gdevmrop_h) $(gdevmpla_h) $(stdint__h) $(LIB_MAK) $(MAKEDIRS)
- $(GLCC) $(D_)WITH_CAL$(_D) $(I_)$(CALSRCDIR)$(_I) $(GLO_)gdevdrop_1.$(OBJ) $(C_) $(GLSRC)gdevdrop.c
-
- $(GLOBJ)gdevdrop_0.$(OBJ) : $(GLSRC)gdevdrop.c $(AK) $(gx_h) $(gserrors_h) \
- $(memory__h) $(gxdevsop_h) $(gsbittab_h) $(gsropt_h) $(gxcindex_h) \
-- $(gxdcolor_h) $(gxdevice_h) $(gxdevmem_h) $(gxdevrop_h) $(gxgetbit_h) \
-+ $(gxdcolor_h) $(gxdevice_h) $(gxdevmem_h) $(gxgetbit_h) \
- $(gdevmem_h) $(gdevmrop_h) $(gdevmpla_h) $(stdint__h) $(LIB_MAK) $(MAKEDIRS)
- $(GLCC) $(GLO_)gdevdrop_0.$(OBJ) $(C_) $(GLSRC)gdevdrop.c
-
-@@ -5585,75 +5584,6 @@ $(GLSRC)gxdevbuf.h:$(GLSRC)std.h
- $(GLSRC)gxdevbuf.h:$(GLSRC)stdpre.h
- $(GLSRC)gxdevbuf.h:$(GLGEN)arch.h
- $(GLSRC)gxdevbuf.h:$(GLSRC)gs_dll_call.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxdevcli.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxcmap.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxtext.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gstext.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsnamecl.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gstparam.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxfmap.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsfunc.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxcspace.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxrplane.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gscsel.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxfcache.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsfont.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsimage.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsdcolor.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxcvalue.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxbcache.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsropt.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxdda.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxpath.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxfrac.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxtmap.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxftype.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gscms.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsrect.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gslparam.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsdevice.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gscpm.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gscspace.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsgstate.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsxfont.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsdsrc.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsiparam.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxfixed.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gscompt.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsmatrix.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gspenum.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxhttile.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsparam.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsrefct.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gp.h
--$(GLSRC)gxdevrop.h:$(GLSRC)memento.h
--$(GLSRC)gxdevrop.h:$(GLSRC)memory_.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsuid.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsstruct.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxsync.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxbitmap.h
--$(GLSRC)gxdevrop.h:$(GLSRC)srdline.h
--$(GLSRC)gxdevrop.h:$(GLSRC)scommon.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsbitmap.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsccolor.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxarith.h
--$(GLSRC)gxdevrop.h:$(GLSRC)stat_.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gpsync.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsstype.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsmemory.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gpgetenv.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gscdefs.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gslibctx.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gxcindex.h
--$(GLSRC)gxdevrop.h:$(GLSRC)stdio_.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gsccode.h
--$(GLSRC)gxdevrop.h:$(GLSRC)stdint_.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gssprintf.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gstypes.h
--$(GLSRC)gxdevrop.h:$(GLSRC)std.h
--$(GLSRC)gxdevrop.h:$(GLSRC)stdpre.h
--$(GLSRC)gxdevrop.h:$(GLGEN)arch.h
--$(GLSRC)gxdevrop.h:$(GLSRC)gs_dll_call.h
- $(GLSRC)gxdevmem.h:$(GLSRC)gxdevcli.h
- $(GLSRC)gxdevmem.h:$(GLSRC)gxcmap.h
- $(GLSRC)gxdevmem.h:$(GLSRC)gxtext.h
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild
deleted file mode 100644
index d112d0051958..000000000000
--- a/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild
+++ /dev/null
@@ -1,194 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools toolchain-funcs
-
-DESCRIPTION="Interpreter for the PostScript language and PDF"
-HOMEPAGE="https://ghostscript.com/"
-
-MY_PN=${PN/-gpl}
-MY_P="${MY_PN}-${PV/_}"
-PVM=$(ver_cut 1-2)
-PVM_S=$(ver_rs 1-2 "")
-
-MY_PATCHSET="ghostscript-gpl-9.54-patchset-01.tar.xz"
-
-SRC_URI="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${PVM_S}/${MY_P}.tar.xz"
-
-if [[ -n "${MY_PATCHSET}" ]] ; then
- SRC_URI+=" https://dev.gentoo.org/~whissi/dist/ghostscript-gpl/${MY_PATCHSET}"
-fi
-
-LICENSE="AGPL-3 CPL-1.0"
-SLOT="0/$(ver_cut 1-2)"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="cups dbus gtk +jpeg2k l10n_de static-libs unicode X"
-
-LANGS="ja ko zh-CN zh-TW"
-for X in ${LANGS} ; do
- IUSE="${IUSE} l10n_${X}"
-done
-
-DEPEND="
- app-text/libpaper
- media-libs/fontconfig
- >=media-libs/freetype-2.4.9:2=
- >=media-libs/jbig2dec-0.19:=
- >=media-libs/lcms-2.6:2
- >=media-libs/libpng-1.6.2:0=
- >=media-libs/tiff-4.0.1:0=
- >=sys-libs/zlib-1.2.7
- virtual/jpeg:0
- cups? ( >=net-print/cups-1.3.8 )
- dbus? ( sys-apps/dbus )
- gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
- jpeg2k? ( >=media-libs/openjpeg-2.1.0:2= )
- unicode? ( net-dns/libidn:0= )
- X? ( x11-libs/libXt x11-libs/libXext )
-"
-BDEPEND="virtual/pkgconfig"
-RDEPEND="${DEPEND}
- app-text/poppler-data
- >=media-fonts/urw-fonts-2.4.9
- l10n_ja? ( media-fonts/kochi-substitute )
- l10n_ko? ( media-fonts/baekmuk-fonts )
- l10n_zh-CN? ( media-fonts/arphicfonts )
- l10n_zh-TW? ( media-fonts/arphicfonts )
-"
-
-S="${WORKDIR}/${MY_P}"
-
-src_prepare() {
- if [[ -n "${MY_PATCHSET}" ]] ; then
- # apply various patches, many borrowed from Fedora
- # https://src.fedoraproject.org/rpms/ghostscript
- # and Debian
- # https://salsa.debian.org/printing-team/ghostscript/-/tree/debian/latest/debian/patches
- eapply "${WORKDIR}/patches/"*.patch
- fi
-
- # Upstream patches
- eapply "${FILESDIR}"/${P}-CVE-2021-3781.patch
- eapply "${FILESDIR}"/${P}-makefile-deps.patch
- eapply "${FILESDIR}"/${P}-makefile-deps-2.patch
-
- default
-
- # remove internal copies of various libraries
- rm -r cups/libs || die
- rm -r freetype || die
- rm -r jbig2dec || die
- rm -r jpeg || die
- rm -r lcms2mt || die
- rm -r libpng || die
- rm -r tiff || die
- rm -r zlib || die
- rm -r openjpeg || die
- # remove internal CMaps (CMaps from poppler-data are used instead)
- rm -r Resource/CMap || die
-
- if ! use gtk ; then
- sed -e "s:\$(GSSOX)::" \
- -e "s:.*\$(GSSOX_XENAME)$::" \
- -i base/unix-dll.mak || die "sed failed"
- fi
-
- # Force the include dirs to a neutral location.
- sed -e "/^ZLIBDIR=/s:=.*:=${T}:" \
- -i configure.ac || die
- # Some files depend on zlib.h directly. Redirect them. #573248
- # Also make sure to not define OPJ_STATIC to avoid linker errors due to
- # hidden symbols (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203327#c1)
- sed -e '/^zlib_h/s:=.*:=:' \
- -e 's|-DOPJ_STATIC ||' \
- -i base/lib.mak || die
-
- # search path fix
- # put LDFLAGS after BINDIR, bug #383447
- sed -e "s:\$\(gsdatadir\)/lib:@datarootdir@/ghostscript/${PV}/$(get_libdir):" \
- -e "s:exdir=.*:exdir=@datarootdir@/doc/${PF}/examples:" \
- -e "s:docdir=.*:docdir=@datarootdir@/doc/${PF}/html:" \
- -e "s:GS_DOCDIR=.*:GS_DOCDIR=@datarootdir@/doc/${PF}/html:" \
- -e 's:-L$(BINDIR):& $(LDFLAGS):g' \
- -i Makefile.in base/*.mak || die "sed failed"
-
- # remove incorrect symlink, bug 590384
- rm ijs/ltmain.sh || die
- eautoreconf
-
- cd ijs || die
- eautoreconf
-}
-
-src_configure() {
- local FONTPATH
- for path in \
- "${EPREFIX}"/usr/share/fonts/urw-fonts \
- "${EPREFIX}"/usr/share/fonts/Type1 \
- "${EPREFIX}"/usr/share/fonts \
- "${EPREFIX}"/usr/share/poppler/cMap/Adobe-CNS1 \
- "${EPREFIX}"/usr/share/poppler/cMap/Adobe-GB1 \
- "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan1 \
- "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan2 \
- "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Korea1
- do
- FONTPATH="$FONTPATH${FONTPATH:+:}${EPREFIX}$path"
- done
-
- PKGCONFIG=$(type -P $(tc-getPKG_CONFIG)) \
- econf \
- --enable-dynamic \
- --enable-freetype \
- --enable-fontconfig \
- $(use_enable jpeg2k openjpeg) \
- --disable-compile-inits \
- --with-drivers=ALL \
- --with-fontpath="$FONTPATH" \
- --with-ijs \
- --with-jbig2dec \
- --with-libpaper \
- --with-system-libtiff \
- $(use_enable cups) \
- $(use_enable dbus) \
- $(use_enable gtk) \
- $(use_with cups pdftoraster) \
- $(use_with unicode libidn) \
- $(use_with X x) \
- DARWIN_LDFLAGS_SO_PREFIX="${EPREFIX}/usr/lib/"
-
- cd "${S}/ijs" || die
- econf \
- --enable-shared \
- $(use_enable static-libs static)
-}
-
-src_compile() {
- emake so all
-
- cd ijs || die
- emake
-}
-
-src_install() {
- emake DESTDIR="${D}" install-so install
-
- # move gsc to gs, bug #343447
- # gsc collides with gambit, bug #253064
- mv -f "${ED}"/usr/bin/{gsc,gs} || die
-
- cd "${S}/ijs" || die
- emake DESTDIR="${D}" install
-
- # install the CMaps from poppler-data properly, bug #409361
- dosym ../../../poppler/cMaps "/usr/share/ghostscript/${PV}/Resource/CMap"
-
- if ! use static-libs; then
- find "${ED}" -name '*.la' -delete || die
- fi
-
- if ! use l10n_de; then
- rm -r "${ED}"/usr/share/man/de || die
- fi
-}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-text/ghostscript-gpl/, app-text/ghostscript-gpl/files/
@ 2024-03-12 17:01 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-03-12 17:01 UTC (permalink / raw
To: gentoo-commits
commit: 7d147261aada657d34e83e4d29c0c13cfec2d0b1
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 12 17:01:23 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar 12 17:01:32 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d147261
app-text/ghostscript-gpl: add 10.03.0
Signed-off-by: Sam James <sam <AT> gentoo.org>
app-text/ghostscript-gpl/Manifest | 1 +
.../files/ghostscript-gpl-10.03.0-c99.patch | 25 +++
.../ghostscript-gpl/ghostscript-gpl-10.03.0.ebuild | 195 +++++++++++++++++++++
3 files changed, 221 insertions(+)
diff --git a/app-text/ghostscript-gpl/Manifest b/app-text/ghostscript-gpl/Manifest
index a5b8c30e741e..d536b91c10ca 100644
--- a/app-text/ghostscript-gpl/Manifest
+++ b/app-text/ghostscript-gpl/Manifest
@@ -1,2 +1,3 @@
DIST ghostscript-10.02.1.tar.xz 68017088 BLAKE2B b491473f0b3d50121e4373e21af3d8cdf55d9ca4390b240c4cb88d0d44e707e32570a7f1f05cb656d1b65443fcd7e37f5eab404d72a20f83d8fd87370a585467 SHA512 ee0f754c1bd8a18428ad14eaa3ead80ff8b96275af5012e7a8384f1f10490da056eec9ae3cc791a7a13a24e16e54df5bccdd109c7d53a14534bbd7360a300b11
+DIST ghostscript-10.03.0.tar.xz 68041176 BLAKE2B c64e0fc9dd290b81e61793671e8645f16b04070685f6ab9d35a60cb910d7504e1e686525af8b74121ae31a5b344e2332efd8bdf99f2a4c5586bff747b8df78d7 SHA512 74d7da586eefbf3fb3c085bb4d2b73ee667fd0ae9cff73ece613c77c443148b847086f91802124baf91ac35cdc83be07199799378def92c8fbd96ced7d0ee9a8
DIST ghostscript-gpl-10.0-patches.tar.xz 2980 BLAKE2B e2c20195b153bf45f374e84d91a4df1885a3696f4061340a0a2ac5f586b9723b45eade343ad0e5760e66616624b5f7dad82d62747040493d7ca40c13329b2df2 SHA512 dac26d7f75bbdc2a56891db7d607c2120717fdf8b1cd55c53ed3be09de3e0a62338585f4dac74496d634ce03ecb2212f386187e72b5e6b59debf8d07694e0c83
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-10.03.0-c99.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-10.03.0-c99.patch
new file mode 100644
index 000000000000..494c7080317a
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/ghostscript-gpl-10.03.0-c99.patch
@@ -0,0 +1,25 @@
+https://bugs.ghostscript.com/show_bug.cgi?id=707649
+https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=90cabe08422afdd16bac5dd9217602679d943045
+
+From 90cabe08422afdd16bac5dd9217602679d943045 Mon Sep 17 00:00:00 2001
+From: Ken Sharp <Ken.Sharp@artifex.com>
+Date: Fri, 8 Mar 2024 09:19:05 +0000
+Subject: [PATCH] Bug #707649 - fix apply_sasl in error cases.
+
+Forgot to dereference the pointers before assigning the values, if we
+get non-fatal errors returned from stringprep.
+--- a/pdf/pdf_sec.c
++++ b/pdf/pdf_sec.c
+@@ -183,8 +183,8 @@ static int apply_sasl(pdf_context *ctx, char *Password, int Len, char **NewPassw
+ * this easy: the errors we want to ignore are the ones with
+ * codes less than 100. */
+ if ((int)err < 100) {
+- NewPassword = Password;
+- NewLen = Len;
++ *NewPassword = Password;
++ *NewLen = Len;
+ return 0;
+ }
+
+--
+2.34.1
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-10.03.0.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-10.03.0.ebuild
new file mode 100644
index 000000000000..47f978bcfebf
--- /dev/null
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-10.03.0.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic toolchain-funcs
+
+MY_PN=${PN/-gpl}
+MY_P="${MY_PN}-${PV/_}"
+PVM=$(ver_cut 1-2)
+PVM_S=$(ver_rs 1-2 "")
+
+# Use https://gitweb.gentoo.org/proj/codec/ghostscript-gpl-patches.git/ for patches
+# See 'index' branch for README
+MY_PATCHSET="ghostscript-gpl-10.0-patches.tar.xz"
+
+DESCRIPTION="Interpreter for the PostScript language and PDF"
+HOMEPAGE="https://ghostscript.com/ https://git.ghostscript.com/?p=ghostpdl.git;a=summary"
+SRC_URI="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${PVM_S}/${MY_P}.tar.xz"
+if [[ -n "${MY_PATCHSET}" ]] ; then
+ SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_PATCHSET}"
+fi
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="AGPL-3 CPL-1.0"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="cups dbus gtk l10n_de static-libs unicode X"
+
+LANGS="ja ko zh-CN zh-TW"
+for X in ${LANGS} ; do
+ IUSE="${IUSE} l10n_${X}"
+done
+
+DEPEND="
+ app-text/libpaper:=
+ media-libs/fontconfig
+ >=media-libs/freetype-2.4.9:2=
+ >=media-libs/jbig2dec-0.19:=
+ >=media-libs/lcms-2.6:2
+ >=media-libs/libpng-1.6.2:=
+ media-libs/libjpeg-turbo:=
+ >=media-libs/openjpeg-2.1.0:2=
+ >=media-libs/tiff-4.0.1:=
+ >=sys-libs/zlib-1.2.7
+ cups? ( >=net-print/cups-1.3.8 )
+ dbus? ( sys-apps/dbus )
+ gtk? ( x11-libs/gtk+:3 )
+ unicode? ( net-dns/libidn:= )
+ X? ( x11-libs/libXt x11-libs/libXext )
+"
+BDEPEND="virtual/pkgconfig"
+# bug #844115 for newer poppler-data dep
+RDEPEND="
+ ${DEPEND}
+ >=app-text/poppler-data-0.4.11-r2
+ >=media-fonts/urw-fonts-2.4.9
+ l10n_ja? ( media-fonts/kochi-substitute )
+ l10n_ko? ( media-fonts/baekmuk-fonts )
+ l10n_zh-CN? ( media-fonts/arphicfonts )
+ l10n_zh-TW? ( media-fonts/arphicfonts )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-10.03.0-c99.patch
+)
+
+src_prepare() {
+ if [[ -n ${MY_PATCHSET} ]] ; then
+ # apply various patches, many borrowed from Fedora
+ # https://src.fedoraproject.org/rpms/ghostscript
+ # and Debian
+ # https://salsa.debian.org/printing-team/ghostscript/-/tree/debian/latest/debian/patches
+ eapply "${WORKDIR}"/${MY_PATCHSET%%.tar*}
+ fi
+
+ default
+
+ # Remove internal copies of various libraries
+ rm -r cups/libs || die
+ rm -r freetype || die
+ rm -r jbig2dec || die
+ rm -r jpeg || die
+ rm -r lcms2mt || die
+ rm -r libpng || die
+ rm -r tiff || die
+ rm -r zlib || die
+ rm -r openjpeg || die
+ # Remove internal CMaps (CMaps from poppler-data are used instead)
+ rm -r Resource/CMap || die
+
+ if ! use gtk ; then
+ sed -e "s:\$(GSSOX)::" \
+ -e "s:.*\$(GSSOX_XENAME)$::" \
+ -i base/unix-dll.mak || die "sed failed"
+ fi
+
+ # Force the include dirs to a neutral location.
+ sed -e "/^ZLIBDIR=/s:=.*:=${T}:" \
+ -i configure.ac || die
+ # Some files depend on zlib.h directly. Redirect them. #573248
+ # Also make sure to not define OPJ_STATIC to avoid linker errors due to
+ # hidden symbols (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203327#c1)
+ sed -e '/^zlib_h/s:=.*:=:' \
+ -e 's|-DOPJ_STATIC ||' \
+ -i base/lib.mak || die
+
+ # Search path fix
+ # put LDFLAGS after BINDIR, bug #383447
+ sed -e "s:\$\(gsdatadir\)/lib:@datarootdir@/ghostscript/${PV}/$(get_libdir):" \
+ -e "s:exdir=.*:exdir=@datarootdir@/doc/${PF}/examples:" \
+ -e "s:docdir=.*:docdir=@datarootdir@/doc/${PF}/html:" \
+ -e "s:GS_DOCDIR=.*:GS_DOCDIR=@datarootdir@/doc/${PF}/html:" \
+ -e 's:-L$(BINDIR):& $(LDFLAGS):g' \
+ -i Makefile.in base/*.mak || die "sed failed"
+
+ # Remove incorrect symlink, bug 590384
+ rm ijs/ltmain.sh || die
+ eautoreconf
+
+ cd ijs || die
+ eautoreconf
+}
+
+src_configure() {
+ # Unsupported upstream, bug #884841
+ filter-lto
+
+ local FONTPATH
+ for path in \
+ "${EPREFIX}"/usr/share/fonts/urw-fonts \
+ "${EPREFIX}"/usr/share/fonts/Type1 \
+ "${EPREFIX}"/usr/share/fonts
+ do
+ FONTPATH="${FONTPATH}${FONTPATH:+:}${EPREFIX}${path}"
+ done
+
+ # Do not add --enable-dynamic here, it's not supported fully upstream
+ # https://bugs.ghostscript.com/show_bug.cgi?id=705895
+ # bug #884707
+ #
+ # leptonica and tesseract are bundled but modified upstream, like in
+ # mujs/mupdf.
+ PKGCONFIG=$(type -P $(tc-getPKG_CONFIG)) econf \
+ --enable-freetype \
+ --enable-fontconfig \
+ --enable-openjpeg \
+ --disable-compile-inits \
+ --with-drivers=ALL \
+ --with-fontpath="${FONTPATH}" \
+ --with-ijs \
+ --with-jbig2dec \
+ --with-libpaper \
+ --with-system-libtiff \
+ $(use_enable cups) \
+ $(use_enable dbus) \
+ $(use_enable gtk) \
+ $(use_with cups pdftoraster) \
+ $(use_with unicode libidn) \
+ $(use_with X x) \
+ DARWIN_LDFLAGS_SO_PREFIX="${EPREFIX}/usr/lib/"
+
+ cd "${S}/ijs" || die
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake so all
+ emake -C ijs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install-so install
+
+ # move gsc to gs, bug #343447
+ # gsc collides with gambit, bug #253064
+ mv -f "${ED}"/usr/bin/{gsc,gs} || die
+
+ cd "${S}/ijs" || die
+ emake DESTDIR="${D}" install
+
+ # Sometimes the upstream versioning deviates from the tarball(!)
+ # bug #844115#c32
+ local my_gs_version=$(find "${ED}"/usr/share/ghostscript/ -maxdepth 1 -mindepth 1 -type d || die)
+ my_gs_version=${my_gs_version##*/}
+
+ # Install the CMaps from poppler-data properly, bug #409361
+ dosym -r /usr/share/poppler/cMaps /usr/share/ghostscript/${my_gs_version}/Resource/CMap
+
+ if ! use static-libs; then
+ find "${ED}" -name '*.la' -delete || die
+ fi
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-text/ghostscript-gpl/, app-text/ghostscript-gpl/files/
@ 2024-09-01 7:33 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-09-01 7:33 UTC (permalink / raw
To: gentoo-commits
commit: a122be2eff3e44ef7c039d052ac47da8361fd6ae
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 1 07:29:46 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 1 07:29:58 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a122be2e
app-text/ghostscript-gpl: fix arm* build w/o neon
Bug: https://bugs.gentoo.org/924757
Closes: https://bugs.gentoo.org/926891
Signed-off-by: Sam James <sam <AT> gentoo.org>
...stscript-gpl-10.03.1-arm64-neon-tesseract.patch | 35 ++++++++++++++++++++++
.../ghostscript-gpl/ghostscript-gpl-10.03.1.ebuild | 1 +
2 files changed, 36 insertions(+)
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-10.03.1-arm64-neon-tesseract.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-10.03.1-arm64-neon-tesseract.patch
new file mode 100644
index 000000000000..4b64fff16f5e
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/ghostscript-gpl-10.03.1-arm64-neon-tesseract.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/926891
+https://bugs.gentoo.org/924757
+https://src.fedoraproject.org/rpms/tesseract/raw/rawhide/f/tesseract_neon.patch
+(See https://github.com/tesseract-ocr/tesseract/pull/4154 too)
+--- a/tesseract/CMakeLists.txt
++++ b/tesseract/CMakeLists.txt
+@@ -249,7 +249,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64|aarch64.*|AARCH64.*")
+ set(HAVE_AVX512F FALSE)
+ set(HAVE_FMA FALSE)
+ set(HAVE_SSE4_1 FALSE)
+- set(HAVE_NEON TRUE)
++ check_cxx_compiler_flag("-mfpu=neon" HAVE_NEON)
+
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*")
+
+--- a/tesseract/src/arch/simddetect.cpp
++++ b/tesseract/src/arch/simddetect.cpp
+@@ -254,7 +254,7 @@ SIMDDetect::SIMDDetect() {
+ // SSE detected.
+ SetDotProduct(DotProductSSE, &IntSimdMatrix::intSimdMatrixSSE);
+ #endif
+-#if defined(HAVE_NEON) || defined(__aarch64__)
++#if defined(HAVE_NEON)
+ } else if (neon_available_) {
+ // NEON detected.
+ SetDotProduct(DotProductNEON, &IntSimdMatrix::intSimdMatrixNEON);
+@@ -311,7 +311,7 @@ void SIMDDetect::Update() {
+ } else if (dotproduct == "accelerate") {
+ SetDotProduct(DotProductAccelerate, IntSimdMatrix::intSimdMatrix);
+ #endif
+-#if defined(HAVE_NEON) || defined(__aarch64__)
++#if defined(HAVE_NEON)
+ } else if (dotproduct == "neon" && neon_available_) {
+ // NEON selected by config variable.
+ SetDotProduct(DotProductNEON, &IntSimdMatrix::intSimdMatrixNEON);
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-10.03.1.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-10.03.1.ebuild
index 54f3cdcf36f3..663558774565 100644
--- a/app-text/ghostscript-gpl/ghostscript-gpl-10.03.1.ebuild
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-10.03.1.ebuild
@@ -63,6 +63,7 @@ RDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-10.03.0-c99.patch
+ "${FILESDIR}"/${PN}-10.03.1-arm64-neon-tesseract.patch
)
src_prepare() {
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-09-01 7:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-12 17:01 [gentoo-commits] repo/gentoo:master commit in: app-text/ghostscript-gpl/, app-text/ghostscript-gpl/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-09-01 7:33 Sam James
2022-01-15 14:15 Andreas Sturmlechner
2021-09-21 19:02 Sam James
2021-09-13 0:54 Sam James
2020-12-14 20:10 Thomas Deutschmann
2020-10-20 8:09 Sam James
2015-10-23 10:00 Justin Lecher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox