From 5269a635ce21703cad788dd3364e3fb234fbf51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Wed, 21 Aug 2024 17:44:23 +0200 Subject: [PATCH] dvisvgm: unbundle from texlive_core TODO: check if some dependencies can be removed from texlive_core --- app-text/dvisvgm/dvisvgm-3.4.recipe | 77 +++++++++++++++++++ app-text/dvisvgm/patches/dvisvgm-3.4.patchset | 23 ++++++ .../texlive_core/texlive_core-2024.2.recipe | 3 +- 3 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 app-text/dvisvgm/dvisvgm-3.4.recipe create mode 100644 app-text/dvisvgm/patches/dvisvgm-3.4.patchset diff --git a/app-text/dvisvgm/dvisvgm-3.4.recipe b/app-text/dvisvgm/dvisvgm-3.4.recipe new file mode 100644 index 000000000..5836246d4 --- /dev/null +++ b/app-text/dvisvgm/dvisvgm-3.4.recipe @@ -0,0 +1,77 @@ +SUMMARY="A fast DVI, EPS, and PDF to SVG converter" +DESCRIPTION="The command-line utility dvisvgm is a tool for TEX/LATEX users. It converts DVI, \ +EPS, and PDF files to the XML-based vector graphics format SVG. In contrast to bitmap graphics, \ +vector graphics are arbitrarily scalable without loss of quality. All modern web browsers support \ +a large amount of the current SVG standard 1.1. Furthermore, SVG files can also be displayed with \ +the Java-based Squiggle SVG browser which is part of the Apache Batik project, and the free \ +vector graphics editor Inkscape." +HOMEPAGE="https://dvisvgm.de/" +COPYRIGHT="2005–2024 Martin Gieseking" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://github.com/mgieseki/dvisvgm/releases/download/$portVersion/dvisvgm-$portVersion.tar.gz" +CHECKSUM_SHA256="b13125c5e00e6e053b283cca6aaf8419c29f3a1b4ed9617ec7074a79d32de3d7" +PATCHES="dvisvgm-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + dvisvgm$secondaryArchSuffix = $portVersion + cmd:dvisvgm = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libbrotlienc$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libgs$secondaryArchSuffix + lib:libkpathsea$secondaryArchSuffix + lib:libpotrace$secondaryArchSuffix + lib:libwoff2enc$secondaryArchSuffix + lib:libxxhash$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libbrotlienc$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + devel:libgs$secondaryArchSuffix + devel:libkpathsea$secondaryArchSuffix + devel:libpotrace$secondaryArchSuffix + devel:libwoff2enc$secondaryArchSuffix + devel:libxxhash$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:autoconf + cmd:automake + cmd:awk + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +TEST_REQUIRES=" + cmd:python3 + " + +defineDebugInfoPackage dvisvgm$secondaryArchSuffix \ + $prefix/bin/dvisvgm + +BUILD() +{ + runConfigure --omit-dirs "binDir" ./configure \ + --bindir=$prefix/bin + make $jobArgs +} + +INSTALL() +{ + make install +} + +TEST() +{ + make check +} diff --git a/app-text/dvisvgm/patches/dvisvgm-3.4.patchset b/app-text/dvisvgm/patches/dvisvgm-3.4.patchset new file mode 100644 index 000000000..3eef51856 --- /dev/null +++ b/app-text/dvisvgm/patches/dvisvgm-3.4.patchset @@ -0,0 +1,23 @@ +From 3eeb63c1345ba4e03aa7d18ab7f4917bb131a476 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= +Date: Wed, 21 Aug 2024 17:35:29 +0200 +Subject: use python3 for test script + +(patching Makefile.in instead of Makefile.am to avoid the need for autoreconf) + +diff --git a/tests/Makefile.in b/tests/Makefile.in +index 5b34760..bdba9c7 100644 +--- a/tests/Makefile.in ++++ b/tests/Makefile.in +@@ -3540,7 +3540,7 @@ uninstall-am: + + + hashcheck.cpp: genhashcheck.py $(dvisvgm_srcdir)/src/AGLTable.hpp $(dvisvgm_srcdir)/libs/xxHash/xxhash.h +- python $^ >$@ ++ python3 $^ >$@ + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. +-- +2.45.2 + diff --git a/app-text/texlive_core/texlive_core-2024.2.recipe b/app-text/texlive_core/texlive_core-2024.2.recipe index 349f162dc..27795c5d2 100644 --- a/app-text/texlive_core/texlive_core-2024.2.recipe +++ b/app-text/texlive_core/texlive_core-2024.2.recipe @@ -127,7 +127,6 @@ PROVIDES=" cmd:dvired cmd:dviselect cmd:dvispc - cmd:dvisvgm cmd:dvitodvi cmd:dvitomp cmd:dvitype @@ -583,7 +582,6 @@ defineDebugInfoPackage texlive_core$secondaryArchSuffix \ $prefix/bin/dvips \ $prefix/bin/dviselect \ $prefix/bin/dvispc \ - $prefix/bin/dvisvgm \ $prefix/bin/dvitodvi \ $prefix/bin/dvitype \ $prefix/bin/epsffit \ @@ -862,6 +860,7 @@ BUILD() --disable-detex \ --disable-dvi2tty \ --disable-dvipng \ + --disable-dvisvgm \ --disable-t1utils \ --build=$HOST --host=$HOST