diff options
author | Sam James <sam@gentoo.org> | 2022-10-02 19:45:26 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-10-02 19:45:26 +0100 |
commit | d87dd9b2a4ad88c955cb42e6043191092471a475 (patch) | |
tree | 7d3241fd1b7535115d3fdb5204906a2f471424c3 /app-text | |
parent | net-ftp/atftp: update EAPI 7 -> 8, drop BDEPEND, add fix for test.sh (diff) | |
download | gentoo-d87dd9b2a4ad88c955cb42e6043191092471a475.tar.gz gentoo-d87dd9b2a4ad88c955cb42e6043191092471a475.tar.bz2 gentoo-d87dd9b2a4ad88c955cb42e6043191092471a475.zip |
app-text/dvisvgm: add 2.14
Closes: https://bugs.gentoo.org/873961
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/dvisvgm/Manifest | 1 | ||||
-rw-r--r-- | app-text/dvisvgm/dvisvgm-2.14.ebuild | 55 | ||||
-rw-r--r-- | app-text/dvisvgm/files/dvisvgm-2.14-Add-missing-cstdint-includes-for-GCC-13.patch | 118 | ||||
-rw-r--r-- | app-text/dvisvgm/files/dvisvgm-2.14-ghostscript.patch | 226 |
4 files changed, 400 insertions, 0 deletions
diff --git a/app-text/dvisvgm/Manifest b/app-text/dvisvgm/Manifest index cb823daaa58c..fc6aa6c95976 100644 --- a/app-text/dvisvgm/Manifest +++ b/app-text/dvisvgm/Manifest @@ -1,2 +1,3 @@ DIST dvisvgm-2.12.tar.gz 3164951 BLAKE2B 249f1ee43444ac95ed512eac803ab073e1ec04a58266fc569a272014510ab373890fdc7be2207d2037742f4192e266eb214078c0bb448de953ffdf5c29deabba SHA512 3f0ca530f24a8866839d71093dc6fd84f2a0f984d06cdd189425aeeb7c7e7e3c9e283d1fe2e7e9ec79845f36c8bd4d973224a321b8ad39da229a3b4fd59b7008 DIST dvisvgm-2.13.tar.gz 3174723 BLAKE2B bee6efd0fd32b1b0c116820df955a3b76cfd795acb75063f35bf2b6b15b6bacc8ddc60d9622d8554c80f7c2ab44c85c78a120d4e18fd7a0c902eabb70b6060fc SHA512 264643f9d9dcfa7e1d20df31c3514108ed45c88e0bd0f1ce88c37af22ae57447d624537720e902c5e5e799906d567999c9449fea411f755e75e4c4158e37de30 +DIST dvisvgm-2.14.tar.gz 3192670 BLAKE2B 16b290db680c57babba06d97250b26925223984af807695a5b24b2e134a0d41e0b7292efd47e6781e75c4790c3e6482d3447e8a5ad7e25b9b36526ba033d15d4 SHA512 874d2d3deed2b1c1cd3e459a53d43533e7fc19613ad2ade09fdf303cedfecd8091d944933c30a7107aad2e8901cc23f1debd4e36031a90b1ad8ba2f56d2a3ba6 diff --git a/app-text/dvisvgm/dvisvgm-2.14.ebuild b/app-text/dvisvgm/dvisvgm-2.14.ebuild new file mode 100644 index 000000000000..7a3027f6d6e0 --- /dev/null +++ b/app-text/dvisvgm/dvisvgm-2.14.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Converts DVI files to SVG" +HOMEPAGE="https://dvisvgm.de/" +SRC_URI="https://github.com/mgieseki/dvisvgm/releases/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" +IUSE="test" + +# Tests don't work from ${WORKDIR}: kpathsea tries to search in relative +# directories from where the binary is executed. +# We cannot really use absolute paths in the kpathsea configuration since that +# would make it harder for prefix installs. +RESTRICT="test" + +RDEPEND=" + >=app-arch/brotli-1.0.5:= + app-text/ghostscript-gpl:= + dev-libs/kpathsea:= + dev-libs/openssl:= + >=dev-libs/xxhash-0.8.1 + >=media-gfx/potrace-1.10-r1 + media-libs/freetype:2 + >=media-libs/woff2-1.0.2 + sys-libs/zlib + virtual/tex-base +" +DEPEND=" + ${RDEPEND} + test? ( >=dev-cpp/gtest-1.11 ) +" +BDEPEND=" + app-text/asciidoc + app-text/xmlto + dev-libs/libxslt + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${P}-ghostscript.patch + "${FILESDIR}"/${PN}-2.14-Add-missing-cstdint-includes-for-GCC-13.patch +) + +src_configure() { + local myargs=( + --without-ttfautohint + ) + + econf "${myargs[@]}" +} diff --git a/app-text/dvisvgm/files/dvisvgm-2.14-Add-missing-cstdint-includes-for-GCC-13.patch b/app-text/dvisvgm/files/dvisvgm-2.14-Add-missing-cstdint-includes-for-GCC-13.patch new file mode 100644 index 000000000000..cad403e34fc1 --- /dev/null +++ b/app-text/dvisvgm/files/dvisvgm-2.14-Add-missing-cstdint-includes-for-GCC-13.patch @@ -0,0 +1,118 @@ +https://github.com/mgieseki/dvisvgm/pull/196 + +From fe5fe3996056cd385e59692b8f60916aedb7d7b9 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Sun, 2 Oct 2022 19:43:23 +0100 +Subject: [PATCH] Add missing <cstdint> includes for GCC 13 + +--- a/src/BasicDVIReader.cpp ++++ b/src/BasicDVIReader.cpp +@@ -19,6 +19,7 @@ + *************************************************************************/ + + #include <algorithm> ++#include <cstdint> + #include "BasicDVIReader.hpp" + + using namespace std; +--- a/src/BasicDVIReader.hpp ++++ b/src/BasicDVIReader.hpp +@@ -21,6 +21,8 @@ + #ifndef BASICDVIREADER_HPP + #define BASICDVIREADER_HPP + ++#include <cstdint> ++ + #include "Matrix.hpp" + #include "MessageException.hpp" + #include "StreamReader.hpp" +--- a/src/Bitmap.hpp ++++ b/src/Bitmap.hpp +@@ -21,6 +21,7 @@ + #ifndef BITMAP_HPP + #define BITMAP_HPP + ++#include <cstdint> + #include <ostream> + #include <vector> + +--- a/src/CMap.hpp ++++ b/src/CMap.hpp +@@ -22,6 +22,7 @@ + #define CMAP_HPP + + #include <algorithm> ++#include <cstdint> + #include <ostream> + #include <vector> + #include "FontEncoding.hpp" +--- a/src/Color.hpp ++++ b/src/Color.hpp +@@ -21,6 +21,7 @@ + #ifndef COLOR_HPP + #define COLOR_HPP + ++#include <cstdint> + #include <string> + #include <valarray> + #include <vector> +--- a/src/DVIReader.hpp ++++ b/src/DVIReader.hpp +@@ -21,6 +21,7 @@ + #ifndef DVIREADER_HPP + #define DVIREADER_HPP + ++#include <cstdint> + #include <limits> + #include <map> + #include <stack> +--- a/src/FileSystem.hpp ++++ b/src/FileSystem.hpp +@@ -21,6 +21,7 @@ + #ifndef FILESYSTEM_HPP + #define FILESYSTEM_HPP + ++#include <cstdint> + #include <string> + #include <vector> + +--- a/src/InputBuffer.hpp ++++ b/src/InputBuffer.hpp +@@ -22,6 +22,7 @@ + #define INPUTBUFFER_HPP + + #include <algorithm> ++#include <cstdint> + #include <cstring> + #include <istream> + #include <string> +--- a/src/RangeMap.hpp ++++ b/src/RangeMap.hpp +@@ -22,6 +22,7 @@ + #define RANGEMAP_HPP + + #include <algorithm> ++#include <cstdint> + #include <ostream> + #include <vector> + +--- a/src/Unicode.cpp ++++ b/src/Unicode.cpp +@@ -21,6 +21,7 @@ + #include <algorithm> + #include <cctype> + #include <cstddef> ++#include <cstdint> + #include <iomanip> + #include <sstream> + #include <xxhash.h> +--- a/src/Unicode.hpp ++++ b/src/Unicode.hpp +@@ -21,6 +21,7 @@ + #ifndef UNICODE_HPP + #define UNICODE_HPP + ++#include <cstdint> + #include <string> + + struct Unicode { diff --git a/app-text/dvisvgm/files/dvisvgm-2.14-ghostscript.patch b/app-text/dvisvgm/files/dvisvgm-2.14-ghostscript.patch new file mode 100644 index 000000000000..88b3dcfde3f0 --- /dev/null +++ b/app-text/dvisvgm/files/dvisvgm-2.14-ghostscript.patch @@ -0,0 +1,226 @@ +https://github.com/mgieseki/dvisvgm/commit/629544928877362d0c6d64f20695f7df3073c5eb +https://github.com/mgieseki/dvisvgm/commit/0213b9252e4aa44034520112dd59a8d5d2ca4e85 +https://github.com/mgieseki/dvisvgm/commit/9bf81fd0b6e7876e5079e917ed7e12163b9e7f7f +https://bugs.gentoo.org/873961 + +From 629544928877362d0c6d64f20695f7df3073c5eb Mon Sep 17 00:00:00 2001 +From: Martin Gieseking <martin.gieseking@uos.de> +Date: Thu, 22 Sep 2022 10:41:11 +0200 +Subject: [PATCH] fixed compilation error when DISABLE_GS is set + +--- a/src/Ghostscript.hpp ++++ b/src/Ghostscript.hpp +@@ -47,8 +47,8 @@ struct Ghostscript { + Ghostscript (int argc, const char **argv, void *caller=0) {} + bool init (int argc, const char **argv, void *caller=0) {return false;} + bool available () {return false;} +- bool revision (gsapi_revision_t *r) {return false;} +- int revision () {return 0;} ++ bool revision (gsapi_revision_t *r) const {return false;} ++ int revision () const {return 0;} + std::string revisionstr () {return "";} + int set_stdio (Stdin in, Stdout out, Stderr err) {return 0;} + int run_string_begin (int user_errors, int *pexit_code) {return 0;} + +From 0213b9252e4aa44034520112dd59a8d5d2ca4e85 Mon Sep 17 00:00:00 2001 +From: Martin Gieseking <martin.gieseking@uos.de> +Date: Fri, 23 Sep 2022 19:59:01 +0200 +Subject: [PATCH] updated ierrors.h + +--- a/src/ierrors.h ++++ b/src/ierrors.h +@@ -1,22 +1,26 @@ +-/* Copyright (C) 2001-2006 Artifex Software, Inc. ++/* Copyright (C) 2001-2022 Artifex Software, Inc. + All Rights Reserved. +- ++ + This software is provided AS-IS with no warranty, either express or + implied. + +- This software is distributed under license and may not be copied, modified +- or distributed except as expressly authorized under the terms of that +- license. Refer to licensing information at http://www.artifex.com/ +- or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, +- San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. ++ This software is distributed under license and may not be copied, ++ modified or distributed except as expressly authorized under the terms ++ of the license contained in the file LICENSE in this distribution. ++ ++ Refer to licensing information at http://www.artifex.com or contact ++ Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, ++ CA 94945, U.S.A., +1(415)492-9861, for further information. + */ + +-/* $Id: ierrors.h 8022 2007-06-05 22:23:38Z giles $ */ ++ + /* Definition of error codes */ + + #ifndef ierrors_INCLUDED + # define ierrors_INCLUDED + ++//#include "gserrors.h" ++ + /* + * DO NOT USE THIS FILE IN THE GRAPHICS LIBRARY. + * THIS FILE IS PART OF THE POSTSCRIPT INTERPRETER. +@@ -33,33 +37,7 @@ + /* Define the error name table */ + extern const char *const gs_error_names[]; + +- /* ------ PostScript Level 1 errors ------ */ +- +-#define e_unknownerror (-1) /* unknown error */ +-#define e_dictfull (-2) +-#define e_dictstackoverflow (-3) +-#define e_dictstackunderflow (-4) +-#define e_execstackoverflow (-5) +-#define e_interrupt (-6) +-#define e_invalidaccess (-7) +-#define e_invalidexit (-8) +-#define e_invalidfileaccess (-9) +-#define e_invalidfont (-10) +-#define e_invalidrestore (-11) +-#define e_ioerror (-12) +-#define e_limitcheck (-13) +-#define e_nocurrentpoint (-14) +-#define e_rangecheck (-15) +-#define e_stackoverflow (-16) +-#define e_stackunderflow (-17) +-#define e_syntaxerror (-18) +-#define e_timeout (-19) +-#define e_typecheck (-20) +-#define e_undefined (-21) +-#define e_undefinedfilename (-22) +-#define e_undefinedresult (-23) +-#define e_unmatchedmark (-24) +-#define e_VMerror (-25) /* must be the last Level 1 error */ ++ /* ------ PostScript Level 1 errors ------ */ + + #define LEVEL1_ERROR_NAMES\ + "unknownerror", "dictfull", "dictstackoverflow", "dictstackunderflow",\ +@@ -69,85 +47,26 @@ extern const char *const gs_error_names[]; + "stackunderflow", "syntaxerror", "timeout", "typecheck", "undefined",\ + "undefinedfilename", "undefinedresult", "unmatchedmark", "VMerror" + +- /* ------ Additional Level 2 errors (also in DPS) ------ */ +- +-#define e_configurationerror (-26) +-#define e_undefinedresource (-27) +-#define e_unregistered (-28) ++ /* ------ Additional Level 2 errors (also in DPS) ------ */ + + #define LEVEL2_ERROR_NAMES\ + "configurationerror", "undefinedresource", "unregistered" + +- /* ------ Additional DPS errors ------ */ +- +-#define e_invalidcontext (-29) +-/* invalidid is for the NeXT DPS extension. */ +-#define e_invalidid (-30) ++ /* ------ Additional DPS errors ------ */ + + #define DPS_ERROR_NAMES\ + "invalidcontext", "invalidid" + +-#define ERROR_NAMES\ +- LEVEL1_ERROR_NAMES, LEVEL2_ERROR_NAMES, DPS_ERROR_NAMES +- +- /* ------ Pseudo-errors used internally ------ */ +- +-/* +- * Internal code for a fatal error. +- * gs_interpret also returns this for a .quit with a positive exit code. +- */ +-#define e_Fatal (-100) +- +-/* +- * Internal code for the .quit operator. +- * The real quit code is an integer on the operand stack. +- * gs_interpret returns this only for a .quit with a zero exit code. +- */ +-#define e_Quit (-101) +- +-/* +- * Internal code for a normal exit from the interpreter. +- * Do not use outside of interp.c. +- */ +-#define e_InterpreterExit (-102) +- +-/* +- * Internal code that indicates that a procedure has been stored in the +- * remap_proc of the graphics state, and should be called before retrying +- * the current token. This is used for color remapping involving a call +- * back into the interpreter -- inelegant, but effective. +- */ +-#define e_RemapColor (-103) +- +-/* +- * Internal code to indicate we have underflowed the top block +- * of the e-stack. +- */ +-#define e_ExecStackUnderflow (-104) +- +-/* +- * Internal code for the vmreclaim operator with a positive operand. +- * We need to handle this as an error because otherwise the interpreter +- * won't reload enough of its state when the operator returns. +- */ +-#define e_VMreclaim (-105) +- +-/* +- * Internal code for requesting more input from run_string. +- */ +-#define e_NeedInput (-106) ++#define PDF_ERROR_NAMES\ ++ "pdf_stackoverflow", "pdf_circular_reference" + +-/* +- * Internal code for a normal exit when usage info is displayed. +- * This allows Window versions of Ghostscript to pause until +- * the message can be read. +- */ +-#define e_Info (-110) ++#define ERROR_NAMES\ ++ LEVEL1_ERROR_NAMES, LEVEL2_ERROR_NAMES, DPS_ERROR_NAMES, PDF_ERROR_NAMES + + /* + * Define which error codes require re-executing the current object. + */ +-#define ERROR_IS_INTERRUPT(ecode)\ +- ((ecode) == e_interrupt || (ecode) == e_timeout) ++#define GS_ERROR_IS_INTERRUPT(ecode)\ ++ ((ecode) == gs_error_interrupt || (ecode) == gs_error_timeout) + + #endif /* ierrors_INCLUDED */ + +From 9bf81fd0b6e7876e5079e917ed7e12163b9e7f7f Mon Sep 17 00:00:00 2001 +From: Martin Gieseking <martin.gieseking@uos.de> +Date: Fri, 23 Sep 2022 20:01:46 +0200 +Subject: [PATCH] dropped usage of gs_error_names() because it's no longer + accessible as of GS 10.0.0 (closes #195) + +--- a/src/Ghostscript.cpp ++++ b/src/Ghostscript.cpp +@@ -375,19 +375,9 @@ const char* Ghostscript::error_name (int code) { + if (code < 0) + code = -code; + const char *error_names[] = { ERROR_NAMES }; +- if (code == 0 || (size_t)code > sizeof(error_names)/sizeof(error_names[0])) ++ if (code == 0 || size_t(code) > sizeof(error_names)/sizeof(error_names[0])) + return nullptr; +-#if defined(HAVE_LIBGS) +- // use array defined in libgs to avoid linking the error strings into the binary +- return gs_error_names[code-1]; +-#elif defined(_WIN32) +- // gs_error_names is private in the Ghostscript DLL so we can't access it here + return error_names[code-1]; +-#else +- if (auto error_names = loadSymbol<const char**>("gs_error_names")) +- return error_names[code-1]; +- return nullptr; +-#endif + } + + #endif // !DISABLE_GS + |