summaryrefslogtreecommitdiff
path: root/app-text/dvisvgm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-03 01:13:47 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-03 01:13:47 +0100
commit7748146936014bb364c51e2547982e9f59a5f31a (patch)
tree07d616b7c4f3455728c1226ab7a989051efc7f6a /app-text/dvisvgm
parenteb2235d914984bff74c625de4fa4887d4f86f971 (diff)
gentoo auto-resync : 03:10:2022 - 01:13:47
Diffstat (limited to 'app-text/dvisvgm')
-rw-r--r--app-text/dvisvgm/Manifest4
-rw-r--r--app-text/dvisvgm/dvisvgm-2.14.ebuild55
-rw-r--r--app-text/dvisvgm/files/dvisvgm-2.14-Add-missing-cstdint-includes-for-GCC-13.patch118
-rw-r--r--app-text/dvisvgm/files/dvisvgm-2.14-ghostscript.patch226
4 files changed, 403 insertions, 0 deletions
diff --git a/app-text/dvisvgm/Manifest b/app-text/dvisvgm/Manifest
index 6fe963fef546..70572e0ab0e4 100644
--- a/app-text/dvisvgm/Manifest
+++ b/app-text/dvisvgm/Manifest
@@ -1,5 +1,9 @@
+AUX dvisvgm-2.14-Add-missing-cstdint-includes-for-GCC-13.patch 2368 BLAKE2B ace726ea5eb8364b1a5fdf18649b3b5096b915db87528a8016f59ec1b5ac0d2290502cc2ecf116cda4ccc8a308847a1f1b7cf01d535ade5ed878249fe8022e7b SHA512 ce9c08f3f7c902a6a2127b43420b07d016d821bafd3650a36c3f08acd5650ad204f55346a46928ea445c55be562549b81c3eec494917ca1b76b3d54ec388e610
+AUX dvisvgm-2.14-ghostscript.patch 7790 BLAKE2B b9220dbbc39ba015f17f4b330dcffe4506a233753faa4b99b5e70fdc42aaff739b649c6f2d91056db7380dd352e7e694557c92710d0a7adc076cd48ca218102a SHA512 5b4acabfdca5748d28a579c27b294bb247d126dcabbef2d8e385b0b091587ff34a7dfd81e19dfd4cabee4d5b6f3206e9c69a7182a45f4201310fbbda4f288504
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
EBUILD dvisvgm-2.12.ebuild 1133 BLAKE2B 682c6f278485d685080c7cd998a0e55a39e52a8bddca2fd0ffe3a1964773a283bfaaf16771eb66fc850e5755842a8ad325c40bc96e6bb2cac8c4a8547e80d463 SHA512 74a88a33242e5f7b7511f97557b2f70afdb3e28d1cf51a53789e552a215671d58229378d65bddd342da3bf4cef6b6539674753fe0fd46970f4835d416bfe70da
EBUILD dvisvgm-2.13.ebuild 1149 BLAKE2B 7a169d678e8f57eba8a15243116d053f6a2acc04346f69a13d2b97291d9089f4f86961ecadc20b1e4a4465c993814975f0eddbbd4089d1da5927425c263cc762 SHA512 4a408fb8dc501c660f581ce8369c5ae1605230e2fe2f57dcfb90a29a33f5a22df193ce846d841fad7510a86ac0b0e6401e25687a3f423dcc466c06a19654a400
+EBUILD dvisvgm-2.14.ebuild 1281 BLAKE2B fbf6665daff2d9e0fbe321bfacb51069a771f7d17f53d405482963988b11595800c01b9795d00a9c0d07c8607d7a79b9a72374a10af954c4bb79348b2b83e278 SHA512 6780e12c7479de2154ab40a8589b81b2d786e9378b44aff672c12af4d4bc53ed81baa90da103507c739c7048a3de44074e10f16e4b2d24e0dfc8b5373e12e8b8
MISC metadata.xml 383 BLAKE2B d4d13b1caf7ebbd81baf9d911434c0ca57f5b9c5d5c136c0ae569341c511e61fbbaf9211accff192d86bdcedca81ad9f6dab2e23f65778a0b2b7c4be0a286a1e SHA512 563b8459b11497c84145cd7dca5cfa38cafbd5bbeb2c2709080633e785509073b96d1ee999fa87b4263f2babefe32b030361fb537b9016cc3eb5ccf423639573
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
+