From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: TeX Live 2019 wanted Date: Thu, 09 Jan 2020 23:10:45 +0100 Message-ID: <878smg1dsq.fsf@devup.no> References: <871rt6enh0.fsf@devup.no> <20191216185714.GA6488@jurong> <20191216194950.GA8280@jurong> <87tv60c8fx.fsf@devup.no> <87r213dhai.fsf@devup.no> <20191227100508.GA15022@jurong> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38153) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipg13-0008Vr-7p for guix-devel@gnu.org; Thu, 09 Jan 2020 17:11:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipg0y-0005yf-Dm for guix-devel@gnu.org; Thu, 09 Jan 2020 17:10:57 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:50571) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ipg0x-0005hx-0h for guix-devel@gnu.org; Thu, 09 Jan 2020 17:10:52 -0500 In-Reply-To: <20191227100508.GA15022@jurong> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Andreas Enge Cc: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Andreas Enge writes: > On Mon, Dec 16, 2019 at 11:41:57PM +0100, Marius Bakke wrote: >> Errh, the patch only works if you already have Poppler 0.83.0. For the >> current 'core-updates' branch, I believe you can use the same approach >> but fetch poppler-0.76.0.cc instead (or take Arch's patch[0]). > > Ah, this is rocket science! I guessed so much as to use the 0.76.0 file; > however, the build now fails with the following: > > /gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash ./libtool --tag=CXX --mode=link g++ -Wreturn-type -Wno-write-strings -g -O2 -o pdftex pdftexdir/pdftex-pdftexextra.o synctexdir/pdftex-synctex.o pdftex-pdftexini.o pdftex-pdftex0.o pdftex-pdftex-pool.o libpdftex.a -L/gnu/store/3snpwk7jl8i125bhiilvk9scqc4mnsx7-libpng-1.6.37/lib -L/gnu/store/qx7p7hiq90mi7r78hcr9cyskccy2j4bg-zlib-1.2.11/lib -lpng16 -lz -lz -L/gnu/store/18q4r8bpwmpm4w15zipf66l3bvdjzfbs-poppler-0.79.0/lib -lpoppler libmd5.a lib/lib.a /tmp/guix-build-texlive-bin-20190410.drv-0/build/texk/kpathsea/libkpathsea.la -lm > libtool: link: g++ -Wreturn-type -Wno-write-strings -g -O2 -o pdftex pdftexdir/pdftex-pdftexextra.o synctexdir/pdftex-synctex.o pdftex-pdftexini.o pdftex-pdftex0.o pdftex-pdftex-pool.o libpdftex.a -L/gnu/store/3snpwk7jl8i125bhiilvk9scqc4mnsx7-libpng-1.6.37/lib -L/gnu/store/qx7p7hiq90mi7r78hcr9cyskccy2j4bg-zlib-1.2.11/lib /gnu/store/3snpwk7jl8i125bhiilvk9scqc4mnsx7-libpng-1.6.37/lib/libpng16.so -lz -L/gnu/store/18q4r8bpwmpm4w15zipf66l3bvdjzfbs-poppler-0.79.0/lib -lpoppler libmd5.a lib/lib.a /tmp/guix-build-texlive-bin-20190410.drv-0/build/texk/kpathsea/.libs/libkpathsea.a -lm -Wl,-rpath -Wl,/gnu/store/3snpwk7jl8i125bhiilvk9scqc4mnsx7-libpng-1.6.37/lib -Wl,-rpath -Wl,/gnu/store/3snpwk7jl8i125bhiilvk9scqc4mnsx7-libpng-1.6.37/lib > ld: libpdftex.a(libpdftex_a-writeimg.o): in function `readimage': > /tmp/guix-build-texlive-bin-20190410.drv-0/build/texk/web2c/../../../texlive-20190410-source/texk/web2c/pdftexdir/writeimg.c:320: undefined reference to `read_pdf_info' > ld: libpdftex.a(libpdftex_a-writeimg.o): in function `undumpimagemeta': > /tmp/guix-build-texlive-bin-20190410.drv-0/build/texk/web2c/../../../texlive-20190410-source/texk/web2c/pdftexdir/writeimg.c:546: undefined reference to `read_pdf_info' > collect2: error: ld returned 1 exit status > > read_pdf_info is defined precisely in the pdftoepdf-poppler*.cc > > And using "strings" on libpdftex.a shows that the function name occurs. This turned out to be because poppler0.83.0.cc depends on another revision, which changed the read_pdf_info function signature: https://github.com/TeX-Live/texlive-source/commit/371f874f0945435b9b577a130bb97368311e981a I was able to build it with Poppler 0.84 by taking the Arch patches, and forking their poppler-0.83 patch: --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=texlive-bin.patch Content-Transfer-Encoding: quoted-printable From=204278c74b3ad87e6b6df5b2cca8bdd906d61ff097 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 9 Jan 2020 18:36:50 +0100 Subject: [PATCH 1/5] gnu: poppler: Update to 0.84.0. * gnu/packages/pdf.scm (poppler): Update to 0.84.0. =2D-- gnu/packages/pdf.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 3b6829c4bc..78f652164b 100644 =2D-- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -90,14 +90,14 @@ (define-public poppler (package (name "poppler") =2D (version "0.79.0") + (version "0.84.0") (source (origin (method url-fetch) (uri (string-append "https://poppler.freedesktop.org/poppler-" version ".tar.xz")) (sha256 (base32 =2D "1j18jlv1q6h21azb939gqjsgcbsh5qcd8dwxdmad54p5ixha91gr")))) + "0ccp2gx05cz5y04k5pgbyi4ikyq60nafa7x2yx4aaf1vfkd318f7")))) (build-system cmake-build-system) ;; FIXME: ;; use libcurl: no =2D-=20 2.24.1 From=203b1ceabd25651952aee0834985770538a313b734 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 9 Jan 2020 22:36:40 +0100 Subject: [PATCH 2/5] build-system/texlive: Update to texlive-2019.3, revisi= on 51265. * guix/build-system/texlive.scm (%texlive-tag): Change to "2019.3". (%texlive-revision): Change to 51265. =2D-- guix/build-system/texlive.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm index ad99d1e2d0..8bbca0ccb7 100644 =2D-- a/guix/build-system/texlive.scm +++ b/guix/build-system/texlive.scm @@ -42,8 +42,8 @@ =20 ;; These variables specify the SVN tag and the matching SVN revision. They ;; are taken from https://www.tug.org/svn/texlive/tags/ =2D(define %texlive-tag "texlive-2018.2") =2D(define %texlive-revision 49435) +(define %texlive-tag "texlive-2019.3") +(define %texlive-revision 51265) =20 (define (texlive-origin name version locations hash) "Return an object for a TeX Live package consisting of multiple =2D-=20 2.24.1 From=209fc158fc135ab718cb767f5eecb16cd81d4847f6 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 9 Jan 2020 22:37:10 +0100 Subject: [PATCH 3/5] gnu: texlive-bin: Update to 20190410. * gnu/packages/patches/texlive-bin-CVE-2018-17407.patch, gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch: Delete files. * gnu/packages/patches/texlive-bin-poppler-0.83.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/tex.scm (texlive-extra-src, texlive-texmf-src): Update to 20= 190419. (texlive-bin): Likewise. [source](patches): Update Arch patches for Poppler 0.84 compatibility. [arguments]: Remove phase 'use-code-for-even-newer-poppler'; add phase 'patch-dvisgm-build-files'. =2D-- gnu/local.mk | 3 +- .../patches/texlive-bin-CVE-2018-17407.patch | 249 --------------- .../texlive-bin-luatex-poppler-compat.patch | 293 ------------------ .../patches/texlive-bin-poppler-0.83.patch | 52 ++++ gnu/packages/tex.scm | 48 ++- 5 files changed, 74 insertions(+), 571 deletions(-) delete mode 100644 gnu/packages/patches/texlive-bin-CVE-2018-17407.patch delete mode 100644 gnu/packages/patches/texlive-bin-luatex-poppler-compat.= patch create mode 100644 gnu/packages/patches/texlive-bin-poppler-0.83.patch diff --git a/gnu/local.mk b/gnu/local.mk index de8bb837ec..c458d5a308 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -1409,8 +1409,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/teensy-loader-cli-help.patch \ %D%/packages/patches/teeworlds-use-latest-wavpack.patch \ %D%/packages/patches/texinfo-5-perl-compat.patch \ =2D %D%/packages/patches/texlive-bin-CVE-2018-17407.patch \ =2D %D%/packages/patches/texlive-bin-luatex-poppler-compat.patch \ + %D%/packages/patches/texlive-bin-poppler-0.83.patch \ %D%/packages/patches/telegram-purple-adjust-test.patch \ %D%/packages/patches/texi2html-document-encoding.patch \ %D%/packages/patches/texi2html-i18n.patch \ diff --git a/gnu/packages/patches/texlive-bin-CVE-2018-17407.patch b/gnu/pa= ckages/patches/texlive-bin-CVE-2018-17407.patch deleted file mode 100644 index 63646d420c..0000000000 =2D-- a/gnu/packages/patches/texlive-bin-CVE-2018-17407.patch +++ /dev/null @@ -1,249 +0,0 @@ =2DThis patch adds support for newer versions of Poppler and some upstream =2DTexLive fixes, including one for CVE-2018-17407. =2D =2DIt is taken from Linux From Scratch: =2D. =2D =2DSubmitted By: Ken Moffat =2DDate: 2018-12-26 =2DInitial Package Version: 20180414 =2DUpstream Status: Applied =2DOrigin: Upstream =2DDescription: Two fixes, cherry-picked from svn plus a CVE fix. =2DI have removed the partial fixes for various system versions of poppler. =2D =2Dr47469 Fix segfault in dvipdfm-x (XeTeX) on 1/2/4-bit transparent indexe= d PNGs. =2D =2Dr47477 Fix a ptex regression for discontinuous kinsoku table. =2D =2DAlso, via fedora (I got lost in svn) a critical fix for CVE-2018-17407 =2D =2D"A buffer overflow in the handling of Type 1 fonts allows arbitrary code =2Dexecution when a malicious font is loaded by one of the vulnerable tools: =2Dpdflatex, pdftex, dvips, or luatex." =2D =2Ddiff -Naur a/texk/dvipdfm-x/pngimage.c b/texk/dvipdfm-x/pngimage.c =2D--- a/texk/dvipdfm-x/pngimage.c 2018-02-17 08:41:35.000000000 +0000 =2D+++ b/texk/dvipdfm-x/pngimage.c 2018-10-09 01:52:01.648670875 +0100 =2D@@ -964,12 +964,16 @@ =2D png_bytep trans; =2D int num_trans; =2D png_uint_32 i; =2D+ png_byte bpc, mask, shift; =2D=20 =2D if (!png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) || =2D !png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, NULL)) { =2D WARN("%s: PNG does not have valid tRNS chunk but tRNS is requested.= ", PNG_DEBUG_STR); =2D return NULL; =2D } =2D+ bpc =3D png_get_bit_depth(png_ptr, info_ptr); =2D+ mask =3D 0xff >> (8 - bpc); =2D+ shift =3D 8 - bpc; =2D=20 =2D smask =3D pdf_new_stream(STREAM_COMPRESS); =2D dict =3D pdf_stream_dict(smask); =2D@@ -981,7 +985,8 @@ =2D pdf_add_dict(dict, pdf_new_name("ColorSpace"), pdf_new_name("DeviceGr= ay")); =2D pdf_add_dict(dict, pdf_new_name("BitsPerComponent"), pdf_new_number(8= )); =2D for (i =3D 0; i < width*height; i++) { =2D- png_byte idx =3D image_data_ptr[i]; =2D+ /* data is packed for 1/2/4 bpc formats, msb first */ =2D+ png_byte idx =3D (image_data_ptr[bpc * i / 8] >> (shift - bpc * i %= 8)) & mask; =2D smask_data_ptr[i] =3D (idx < num_trans) ? trans[idx] : 0xff; =2D } =2D pdf_add_stream(smask, (char *)smask_data_ptr, width*height); =2Ddiff -Naur a/texk/dvipsk/writet1.c b/texk/dvipsk/writet1.c =2D--- a/texk/dvipsk/writet1.c 2016-11-25 18:24:26.000000000 +0000 =2D+++ b/texk/dvipsk/writet1.c 2018-10-09 01:52:01.648670875 +0100 =2D@@ -1449,7 +1449,9 @@ =2D *(strend(t1_buf_array) - 1) =3D ' '; =2D=20 =2D t1_getline(); =2D+ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array= ) + 1, T1_BUF_SIZE); =2D strcat(t1_buf_array, t1_line_array); =2D+ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE); =2D strcpy(t1_line_array, t1_buf_array); =2D t1_line_ptr =3D eol(t1_line_array); =2D } =2Ddiff -Naur a/texk/web2c/luatexdir/font/writet1.w b/texk/web2c/luatexdir/= font/writet1.w =2D--- a/texk/web2c/luatexdir/font/writet1.w 2016-11-25 18:24:34.000000000 = +0000 =2D+++ b/texk/web2c/luatexdir/font/writet1.w 2018-10-09 01:52:01.648670875 = +0100 =2D@@ -1625,7 +1625,9 @@ =2D if (sscanf(p, "%i", &i) !=3D 1) { =2D strcpy(t1_buf_array, t1_line_array); =2D t1_getline(); =2D+ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array= ) + 1, T1_BUF_SIZE); =2D strcat(t1_buf_array, t1_line_array); =2D+ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE); =2D strcpy(t1_line_array, t1_buf_array); =2D t1_line_ptr =3D eol(t1_line_array); =2D } =2Ddiff -Naur a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexd= ir/image/pdftoepdf.w =2D--- a/texk/web2c/luatexdir/image/pdftoepdf.w 2018-01-17 18:00:12.0000000= 00 +0000 =2D+++ b/texk/web2c/luatexdir/image/pdftoepdf.w 2018-10-09 01:52:01.6486708= 75 +0100 =2D@@ -472,10 +472,10 @@ =2D break; =2D */ =2D case objString: =2D- copyString(pdf, obj->getString()); =2D+ copyString(pdf, (GooString *)obj->getString()); =2D break; =2D case objName: =2D- copyName(pdf, obj->getName()); =2D+ copyName(pdf, (char *)obj->getName()); =2D break; =2D case objNull: =2D pdf_add_null(pdf); =2Ddiff -Naur a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir= /lua/lepdflib.cc =2D--- a/texk/web2c/luatexdir/lua/lepdflib.cc 2018-02-14 14:44:38.000000000= +0000 =2D+++ b/texk/web2c/luatexdir/lua/lepdflib.cc 2018-10-09 01:52:01.649670868= +0100 =2D@@ -674,7 +674,7 @@ =2D uin =3D (udstruct *) luaL_checkudata(L, 1, M_##in); \ =2D if (uin->pd !=3D NULL && uin->pd->pc !=3D uin->pc) \ =2D pdfdoc_changed_error(L); \ =2D- gs =3D ((in *) uin->d)->function(); \ =2D+ gs =3D (GooString *)((in *) uin->d)->function(); \ =2D if (gs !=3D NULL) \ =2D lua_pushlstring(L, gs->getCString(), gs->getLength()); \ =2D else \ =2D@@ -1813,7 +1813,7 @@ =2D if (uin->pd !=3D NULL && uin->pd->pc !=3D uin->pc) =2D pdfdoc_changed_error(L); =2D if (((Object *) uin->d)->isString()) { =2D- gs =3D ((Object *) uin->d)->getString(); =2D+ gs =3D (GooString *)((Object *) uin->d)->getString(); =2D lua_pushlstring(L, gs->getCString(), gs->getLength()); =2D } else =2D lua_pushnil(L); =2Ddiff -Naur a/texk/web2c/pdftexdir/writet1.c b/texk/web2c/pdftexdir/write= t1.c =2D--- a/texk/web2c/pdftexdir/writet1.c 2016-11-25 18:24:37.000000000 +0000 =2D+++ b/texk/web2c/pdftexdir/writet1.c 2018-10-09 01:52:01.649670868 +0100 =2D@@ -1598,7 +1598,9 @@ =2D *(strend(t1_buf_array) - 1) =3D ' '; =2D=20 =2D t1_getline(); =2D+ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array= ) + 1, T1_BUF_SIZE); =2D strcat(t1_buf_array, t1_line_array); =2D+ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE); =2D strcpy(t1_line_array, t1_buf_array); =2D t1_line_ptr =3D eol(t1_line_array); =2D } =2Ddiff -Naur a/texk/web2c/ptexdir/ptex_version.h b/texk/web2c/ptexdir/ptex= _version.h =2D--- a/texk/web2c/ptexdir/ptex_version.h 2018-01-21 03:48:06.000000000 +0= 000 =2D+++ b/texk/web2c/ptexdir/ptex_version.h 2018-10-09 01:52:01.649670868 +0= 100 =2D@@ -1 +1 @@ =2D-#define PTEX_VERSION "p3.8.0" =2D+#define PTEX_VERSION "p3.8.1" =2Ddiff -Naur a/texk/web2c/ptexdir/tests/free_ixsp.tex b/texk/web2c/ptexdir= /tests/free_ixsp.tex =2D--- a/texk/web2c/ptexdir/tests/free_ixsp.tex 1970-01-01 01:00:00.0000000= 00 +0100 =2D+++ b/texk/web2c/ptexdir/tests/free_ixsp.tex 2018-10-09 01:52:01.6496708= 68 +0100 =2D@@ -0,0 +1,53 @@ =2D+%#!eptex -ini -etex =2D+\let\dump\relax =2D+\batchmode =2D+\input plain =2D+ =2D+\errorstopmode =2D+\catcode`@=3D11 =2D+\newcount\@tempcnta =2D+\newcount\@tempcntb =2D+\newcount\@tempcntc =2D+\mathchardef\LIM=3D256 =2D+ =2D+\def\MYCHAR#1{% =2D+ \@tempcntc=3D\numexpr7*#1+"101\relax =2D+ \@tempcnta=3D\@tempcntc\divide\@tempcnta 94 =2D+ \@tempcntb=3D\numexpr\@tempcntc-94*\@tempcnta+1\relax =2D+ \ifnum\@tempcntb<0\advance\@tempcntb94 \advance\@tempcnta-1\fi =2D+ \advance\@tempcnta18 % 18=E5=8C=BA=E4=BB=A5=E9=99=8D =2D+ \CNTA=3D\kuten\numexpr"100*\@tempcnta+\@tempcntb\relax =2D+} =2D+ =2D+\newcount\CNT\newcount\CNTA =2D+\CNT=3D0 =2D+\loop =2D+ \MYCHAR\CNT =2D+ \message{\the\CNT.} =2D+ \inhibitxspcode\CNTA=3D1\relax =2D+ \advance\CNT1\relax =2D+ \ifnum\CNT<\LIM =2D+\repeat =2D+ =2D+\newcount\CNTB =2D+ =2D+\loop =2D+ \MYCHAR\CNTB =2D+ \global\inhibitxspcode\CNTA=3D3 =2D+{% =2D+\CNT=3D0 =2D+\loop =2D+ \MYCHAR\CNT =2D+ \count@=3D\numexpr 1-\inhibitxspcode\CNTA\relax =2D+ \ifnum\count@=3D0\else\ifnum\CNTB=3D\CNT\else =2D+ \errmessage{<\the\CNTB, \the\CNT, \the\inhibitxspcode\CNTA>}\fi\fi =2D+ \advance\CNT1\relax =2D+ \ifnum\CNT<\LIM =2D+\repeat =2D+} =2D+ \MYCHAR\CNTB =2D+ \global\inhibitxspcode\CNTA=3D1\relax =2D+ \advance\CNTB1\relax =2D+ \ifnum\CNTB<\LIM =2D+\repeat =2D+\bye =2Ddiff -Naur a/texk/web2c/ptexdir/tests/free_pena.tex b/texk/web2c/ptexdir= /tests/free_pena.tex =2D--- a/texk/web2c/ptexdir/tests/free_pena.tex 1970-01-01 01:00:00.0000000= 00 +0100 =2D+++ b/texk/web2c/ptexdir/tests/free_pena.tex 2018-10-09 01:52:01.6496708= 68 +0100 =2D@@ -0,0 +1,52 @@ =2D+%#!eptex -ini -etex =2D+\let\dump\relax =2D+\batchmode =2D+\input plain =2D+ =2D+\errorstopmode =2D+\catcode`@=3D11 =2D+\newcount\@tempcnta =2D+\newcount\@tempcntb =2D+\newcount\@tempcntc =2D+\mathchardef\LIM=3D256 =2D+ =2D+\def\MYCHAR#1{% =2D+ \@tempcntc=3D\numexpr7*#1+"101\relax =2D+ \@tempcnta=3D\@tempcntc\divide\@tempcnta 94 =2D+ \@tempcntb=3D\numexpr\@tempcntc-94*\@tempcnta+1\relax =2D+ \ifnum\@tempcntb<0\advance\@tempcntb94 \advance\@tempcnta-1\fi =2D+ \advance\@tempcnta18 % 18=E5=8C=BA=E4=BB=A5=E9=99=8D =2D+ \CNTA=3D\kuten\numexpr"100*\@tempcnta+\@tempcntb\relax =2D+} =2D+ =2D+\newcount\CNT\newcount\CNTA =2D+\CNT=3D0 =2D+\loop =2D+ \MYCHAR\CNT =2D+ \message{\the\CNT.} =2D+ \prebreakpenalty\CNTA=3D\numexpr\CNT+1\relax =2D+ \advance\CNT1\relax =2D+ \ifnum\CNT<\LIM =2D+\repeat =2D+ =2D+\newcount\CNTB =2D+ =2D+\loop =2D+ \MYCHAR\CNTB =2D+ \global\prebreakpenalty\CNTA=3D0 =2D+{% =2D+\CNT=3D0 =2D+\loop =2D+ \MYCHAR\CNT =2D+ \count@=3D\numexpr -\CNT-1+\prebreakpenalty\CNTA\relax =2D+ \ifnum\count@=3D0\else\ifnum\CNTB=3D\CNT\else\errmessage{<\the\CNTB, = \the\CNT>}\fi\fi =2D+ \advance\CNT1\relax =2D+ \ifnum\CNT<\LIM =2D+\repeat =2D+} =2D+ \MYCHAR\CNTB =2D+ \global\prebreakpenalty\CNTA=3D\numexpr\CNTB+1\relax =2D+ \advance\CNTB1\relax =2D+ \ifnum\CNTB<\LIM =2D+\repeat =2D+\bye diff --git a/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch b= /gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch deleted file mode 100644 index 024ff416af..0000000000 =2D-- a/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch +++ /dev/null @@ -1,293 +0,0 @@ =2DFix LuaTeX compatibility with Poppler 0.75. =2D =2DUpstream LuaTeX have moved from Poppler to "pplib" and thus upstream =2Dfixes are unavailable. This is based on Archs patch, with minor =2Dtweaks to comply with texlive-bin-CVE-2018-17407.patch. =2Dhttps://git.archlinux.org/svntogit/packages.git/tree/trunk?h=3Dpackages/= texlive-bin&id=3D418dd6f008c3d41a461353fdb60f2d73d87c58ed =2D =2Ddiff --git a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexd= ir/image/pdftoepdf.w =2D--- a/texk/web2c/luatexdir/image/pdftoepdf.w =2D+++ b/texk/web2c/luatexdir/image/pdftoepdf.w =2D@@ -363,7 +363,7 @@ void copyReal(PDF pdf, double d) =2D=20 =2D static void copyString(PDF pdf, GooString * string) =2D { =2D- char *p; =2D+ const char *p; =2D unsigned char c; =2D size_t i, l; =2D p =3D string->getCString(); =2D@@ -393,7 +393,7 @@ static void copyString(PDF pdf, GooString * string) =2D pdf->cave =3D true; =2D } =2D=20 =2D-static void copyName(PDF pdf, char *s) =2D+static void copyName(PDF pdf, const char *s) =2D { =2D pdf_out(pdf, '/'); =2D for (; *s !=3D 0; s++) { =2D@@ -412,7 +412,7 @@ static void copyArray(PDF pdf, PdfDocument * pdf_doc= , Array * array) =2D Object obj1; =2D pdf_begin_array(pdf); =2D for (i =3D 0, l =3D array->getLength(); i < l; ++i) { =2D- obj1 =3D array->getNF(i); =2D+ obj1 =3D array->getNF(i).copy(); =2D copyObject(pdf, pdf_doc, &obj1); =2D } =2D pdf_end_array(pdf); =2D@@ -425,7 +425,7 @@ static void copyDict(PDF pdf, PdfDocument * pdf_doc,= Dict * dict) =2D pdf_begin_dict(pdf); =2D for (i =3D 0, l =3D dict->getLength(); i < l; ++i) { =2D copyName(pdf, dict->getKey(i)); =2D- obj1 =3D dict->getValNF(i); =2D+ obj1 =3D dict->getValNF(i).copy(); =2D copyObject(pdf, pdf_doc, &obj1); =2D } =2D pdf_end_dict(pdf); =2D@@ -475,7 +475,7 @@ static void copyObject(PDF pdf, PdfDocument * pdf_do= c, Object * obj) =2D copyString(pdf, (GooString *)obj->getString()); =2D break; =2D case objName: =2D- copyName(pdf, (char *)obj->getName()); =2D+ copyName(pdf, obj->getName()); =2D break; =2D case objNull: =2D pdf_add_null(pdf); =2D@@ -531,22 +531,22 @@ static PDFRectangle *get_pagebox(Page * page, int = pagebox_spec) =2D { =2D switch (pagebox_spec) { =2D case PDF_BOX_SPEC_MEDIA: =2D- return page->getMediaBox(); =2D+ return (PDFRectangle *) page->getMediaBox(); =2D break; =2D case PDF_BOX_SPEC_CROP: =2D- return page->getCropBox(); =2D+ return (PDFRectangle *) page->getCropBox(); =2D break; =2D case PDF_BOX_SPEC_BLEED: =2D- return page->getBleedBox(); =2D+ return (PDFRectangle *) page->getBleedBox(); =2D break; =2D case PDF_BOX_SPEC_TRIM: =2D- return page->getTrimBox(); =2D+ return (PDFRectangle *) page->getTrimBox(); =2D break; =2D case PDF_BOX_SPEC_ART: =2D- return page->getArtBox(); =2D+ return (PDFRectangle *) page->getArtBox(); =2D break; =2D default: =2D- return page->getMediaBox(); =2D+ return (PDFRectangle *) page->getMediaBox(); =2D break; =2D } =2D } =2D@@ -788,12 +788,12 @@ void write_epdf(PDF pdf, image_dict * idict, int s= uppress_optional_info) =2D Now all relevant parts of the Page dictionary are copied. Metad= ata validity =2D check is needed(as a stream it must be indirect). =2D */ =2D- obj1 =3D pageDict->lookupNF("Metadata"); =2D+ obj1 =3D pageDict->lookupNF("Metadata").copy(); =2D if (!obj1.isNull() && !obj1.isRef()) =2D formatted_warning("pdf inclusion","/Metadata must be indirect o= bject"); =2D /* copy selected items in Page dictionary */ =2D for (i =3D 0; pagedictkeys[i] !=3D NULL; i++) { =2D- obj1 =3D pageDict->lookupNF(pagedictkeys[i]); =2D+ obj1 =3D pageDict->lookupNF(pagedictkeys[i]).copy(); =2D if (!obj1.isNull()) { =2D pdf_add_name(pdf, pagedictkeys[i]); =2D /* preserves indirection */ =2D@@ -806,13 +806,13 @@ void write_epdf(PDF pdf, image_dict * idict, int s= uppress_optional_info) =2D PDF file, climbing up the tree until the Resources are found. =2D (This fixes a problem with Scribus 1.3.3.14.) =2D */ =2D- obj1 =3D pageDict->lookupNF("Resources"); =2D+ obj1 =3D pageDict->lookupNF("Resources").copy(); =2D if (obj1.isNull()) { =2D op1 =3D &pagesobj1; =2D op2 =3D &pagesobj2; =2D *op1 =3D pageDict->lookup("Parent"); =2D while (op1->isDict()) { =2D- obj1 =3D op1->dictLookupNF("Resources"); =2D+ obj1 =3D op1->dictLookupNF("Resources").copy(); =2D if (!obj1.isNull()) { =2D pdf_add_name(pdf, "Resources"); =2D copyObject(pdf, pdf_doc, &obj1); =2Ddiff --git a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir= /lua/lepdflib.cc =2D--- a/texk/web2c/luatexdir/lua/lepdflib.cc =2D+++ b/texk/web2c/luatexdir/lua/lepdflib.cc =2D@@ -240,7 +240,7 @@ static int l_new_Attribute(lua_State * L) =2D if (uobj->pd !=3D NULL && uobj->pd->pc !=3D uobj->pc) =2D pdfdoc_changed_error(L); =2D uout =3D new_Attribute_userdata(L); =2D- uout->d =3D new Attribute(n, nlen, (Object *)uobj->d); =2D+ uout->d =3D new Attribute((GooString)n, (Object *)uobj->d); =2D uout->atype =3D ALLOC_LEPDF; =2D uout->pc =3D uobj->pc; =2D uout->pd =3D uobj->pd; =2D@@ -496,7 +496,7 @@ static int l_new_Object(lua_State * L) =2D double numA =3D lua_tonumber(L,1); =2D double genA =3D lua_tonumber(L,2); =2D if ( ((numA)=3D=3D(int)(numA)) && ((genA)=3D=3D(int)(genA)) ){ =2D- uout->d =3D new Object((int)(numA), (int)(genA)); =2D+ uout->d =3D new Object({(int)(numA), (int)(genA)}); =2D uout->atype =3D ALLOC_LEPDF; =2D uout->pc =3D 0; =2D uout->pd =3D NULL; =2D@@ -596,7 +596,7 @@ static int m_##in##_##function(lua_State * L) = \ =2D uin =3D (udstruct *) luaL_checkudata(L, 1, M_##in); \ =2D if (uin->pd !=3D NULL && uin->pd->pc !=3D uin->pc) \ =2D pdfdoc_changed_error(L); \ =2D- o =3D ((in *) uin->d)->function(); \ =2D+ o =3D (out *) ((in *) uin->d)->function(); = \ =2D if (o !=3D NULL) { \ =2D uout =3D new_##out##_userdata(L); \ =2D uout->d =3D o; \ =2D@@ -889,7 +889,7 @@ static int m_Array_getNF(lua_State * L) =2D if (i > 0 && i <=3D len) { =2D uout =3D new_Object_userdata(L); =2D uout->d =3D new Object(); =2D- *((Object *) uout->d) =3D ((Array *) uin->d)->getNF(i - 1); =2D+ *((Object *) uout->d) =3D ((Array *) uin->d)->getNF(i - 1).copy= (); =2D uout->atype =3D ALLOC_LEPDF; =2D uout->pc =3D uin->pc; =2D uout->pd =3D uin->pd; =2D@@ -1125,12 +1125,12 @@ m_poppler_get_INT(Dict, getLength); =2D=20 =2D static int m_Dict_add(lua_State * L) =2D { =2D- char *s; =2D+ const char *s; =2D udstruct *uin, *uobj; =2D uin =3D (udstruct *) luaL_checkudata(L, 1, M_Dict); =2D if (uin->pd !=3D NULL && uin->pd->pc !=3D uin->pc) =2D pdfdoc_changed_error(L); =2D- s =3D copyString(luaL_checkstring(L, 2)); =2D+ s =3D luaL_checkstring(L, 2); =2D uobj =3D (udstruct *) luaL_checkudata(L, 3, M_Object); =2D ((Dict *) uin->d)->add(s, std::move(*((Object *) uobj->d))); =2D return 0; =2D@@ -1190,7 +1190,7 @@ static int m_Dict_lookupNF(lua_State * L) =2D s =3D luaL_checkstring(L, 2); =2D uout =3D new_Object_userdata(L); =2D uout->d =3D new Object(); =2D- *((Object *) uout->d) =3D ((Dict *) uin->d)->lookupNF(s); =2D+ *((Object *) uout->d) =3D ((Dict *) uin->d)->lookupNF(s).copy(); =2D uout->atype =3D ALLOC_LEPDF; =2D uout->pc =3D uin->pc; =2D uout->pd =3D uin->pd; =2D@@ -1263,7 +1263,7 @@ static int m_Dict_getValNF(lua_State * L) =2D if (i > 0 && i <=3D len) { =2D uout =3D new_Object_userdata(L); =2D uout->d =3D new Object(); =2D- *((Object *) uout->d) =3D ((Dict *) uin->d)->getValNF(i - 1); =2D+ *((Object *) uout->d) =3D ((Dict *) uin->d)->getValNF(i - 1).co= py(); =2D uout->atype =3D ALLOC_LEPDF; =2D uout->pc =3D uin->pc; =2D uout->pd =3D uin->pd; =2D@@ -1653,7 +1653,7 @@ static int m_Object_initRef(lua_State * L) =2D pdfdoc_changed_error(L); =2D num =3D luaL_checkint(L, 2); =2D gen =3D luaL_checkint(L, 3); =2D- *((Object *) uin->d) =3D Object(num, gen); =2D+ *((Object *) uin->d) =3D Object({num, gen}); =2D return 0; =2D } =2D=20 =2D@@ -2011,7 +2011,7 @@ static int m_Object_arrayGetNF(lua_State * L) =2D if (i > 0 && i <=3D len) { =2D uout =3D new_Object_userdata(L); =2D uout->d =3D new Object(); =2D- *((Object *) uout->d) =3D ((Object *) uin->d)->arrayGetNF(i= - 1); =2D+ *((Object *) uout->d) =3D ((Object *) uin->d)->arrayGetNF(i= - 1).copy(); =2D uout->atype =3D ALLOC_LEPDF; =2D uout->pc =3D uin->pc; =2D uout->pd =3D uin->pd; =2D@@ -2051,7 +2051,7 @@ static int m_Object_dictAdd(lua_State * L) =2D pdfdoc_changed_error(L); =2D if (!((Object *) uin->d)->isDict()) =2D luaL_error(L, "Object is not a Dict"); =2D- ((Object *) uin->d)->dictAdd(copyString(s), std::move(*((Object *) = uobj->d))); =2D+ ((Object *) uin->d)->dictAdd(s, std::move(*((Object *) uobj->d))); =2D return 0; =2D } =2D=20 =2D@@ -2104,7 +2104,7 @@ static int m_Object_dictLookupNF(lua_State * L) =2D if (((Object *) uin->d)->isDict()) { =2D uout =3D new_Object_userdata(L); =2D uout->d =3D new Object(); =2D- *((Object *) uout->d) =3D ((Object *) uin->d)->dictLookupNF(s); =2D+ *((Object *) uout->d) =3D ((Object *) uin->d)->dictLookupNF(s).= copy(); =2D uout->atype =3D ALLOC_LEPDF; =2D uout->pc =3D uin->pc; =2D uout->pd =3D uin->pd; =2D@@ -2169,7 +2169,7 @@ static int m_Object_dictGetValNF(lua_State * L) =2D if (i > 0 && i <=3D len) { =2D uout =3D new_Object_userdata(L); =2D uout->d =3D new Object(); =2D- *((Object *) uout->d) =3D ((Object *) uin->d)->dictGetValNF= (i - 1); =2D+ *((Object *) uout->d) =3D ((Object *) uin->d)->dictGetValNF= (i - 1).copy(); =2D uout->atype =3D ALLOC_LEPDF; =2D uout->pc =3D uin->pc; =2D uout->pd =3D uin->pd; =2D@@ -2470,7 +2470,7 @@ static int m_PDFDoc_getFileName(lua_State * L) =2D uin =3D (udstruct *) luaL_checkudata(L, 1, M_PDFDoc); =2D if (uin->pd !=3D NULL && uin->pd->pc !=3D uin->pc) =2D pdfdoc_changed_error(L); =2D- gs =3D ((PdfDocument *) uin->d)->doc->getFileName(); =2D+ gs =3D (GooString *) ((PdfDocument *) uin->d)->doc->getFileName(); =2D if (gs !=3D NULL) =2D lua_pushlstring(L, gs->getCString(), gs->getLength()); =2D else =2D@@ -2559,7 +2559,7 @@ static int m_PDFDoc_readMetadata(lua_State * L) =2D if (uin->pd !=3D NULL && uin->pd->pc !=3D uin->pc) =2D pdfdoc_changed_error(L); =2D if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) { =2D- gs =3D ((PdfDocument *) uin->d)->doc->readMetadata(); =2D+ gs =3D (GooString *) ((PdfDocument *) uin->d)->doc->readMetadat= a(); =2D if (gs !=3D NULL) =2D lua_pushlstring(L, gs->getCString(), gs->getLength()); =2D else =2D@@ -2577,7 +2577,7 @@ static int m_PDFDoc_getStructTreeRoot(lua_State * = L) =2D if (uin->pd !=3D NULL && uin->pd->pc !=3D uin->pc) =2D pdfdoc_changed_error(L); =2D if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) { =2D- obj =3D ((PdfDocument *) uin->d)->doc->getStructTreeRoot(); =2D+ obj =3D (StructTreeRoot *) ((PdfDocument *) uin->d)->doc->getSt= ructTreeRoot(); =2D uout =3D new_StructTreeRoot_userdata(L); =2D uout->d =3D obj; =2D uout->pc =3D uin->pc; =2D--- texlive-source/texk/web2c/luatexdir/lua/lepdflib.cc.orig 2019-04-= 24 09:41:05.090522664 +0000 =2D+++ texlive-source/texk/web2c/luatexdir/lua/lepdflib.cc 2019-04-24 09:43= :37.119184926 +0000 =2D@@ -994,7 +994,8 @@ =2D pdfdoc_changed_error(L); =2D num =3D luaL_checkint(L, 2); =2D gen =3D luaL_checkint(L, 3); =2D- i =3D ((Catalog *) uin->d)->findPage(num, gen); =2D+ Ref numgen =3D {num, gen}; =2D+ i =3D ((Catalog *) uin->d)->findPage(numgen); =2D if (i > 0) =2D lua_pushinteger(L, i); =2D else =2D@@ -2596,8 +2597,9 @@ =2D pdfdoc_changed_error(L); =2D num =3D luaL_checkint(L, 2); =2D gen =3D luaL_checkint(L, 3); =2D+ Ref numgen =3D {num, gen}; =2D if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) { =2D- i =3D ((PdfDocument *) uin->d)->doc->findPage(num, gen); =2D+ i =3D ((PdfDocument *) uin->d)->doc->findPage(numgen); =2D if (i > 0) =2D lua_pushinteger(L, i); =2D else =2D--- texlive-source/texk/web2c/luatexdir/image/pdftoepdf.w.orig 2019-04-= 24 09:56:38.406498975 +0000 =2D+++ texlive-source/texk/web2c/luatexdir/image/pdftoepdf.w 2019-04-= 24 09:56:57.020081327 +0000 =2D@@ -630,7 +630,7 @@ =2D if (link =3D=3D NULL || !link->isOk()) =2D formatted_error("pdf inclusion","invalid destination '%s'",= img_pagename(idict)); =2D Ref ref =3D link->getPageRef(); =2D- img_pagenum(idict) =3D catalog->findPage(ref.num, ref.gen); =2D+ img_pagenum(idict) =3D catalog->findPage(ref); =2D if (img_pagenum(idict) =3D=3D 0) =2D formatted_error("pdf inclusion","destination is not a page = '%s'",img_pagename(idict)); =2D delete link; diff --git a/gnu/packages/patches/texlive-bin-poppler-0.83.patch b/gnu/pack= ages/patches/texlive-bin-poppler-0.83.patch new file mode 100644 index 0000000000..5e57e3efac =2D-- /dev/null +++ b/gnu/packages/patches/texlive-bin-poppler-0.83.patch @@ -0,0 +1,52 @@ +Fix build with Poppler 0.83 and later. + +Taken from Arch Linux, but adjusted to patch the versioned Poppler +files, as upstream applies it after copying them in place. +https://git.archlinux.org/svntogit/packages.git/tree/trunk/texlive-poppler= -0.83.patch?h=3Dpackages/texlive-bin + +diff -ru texlive-source-orig/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.= cc texlive-source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc +--- texlive-source-orig/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc ++++ texlive-source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc +@@ -723,7 +723,7 @@ + #endif + // initialize + if (!isInit) { +- globalParams =3D new GlobalParams(); ++ globalParams.reset(new GlobalParams()); + globalParams->setErrQuiet(false); + isInit =3D true; + } +@@ -1108,6 +1108,5 @@ + delete_document(p); + } + // see above for globalParams +- delete globalParams; + } + } +diff -ru texlive-source-orig/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.c= c texlive-source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc +--- texlive-source-orig/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc ++++ texlive-source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc +@@ -79,7 +79,7 @@ + exit(1); + } + fileName =3D new GString(argv[1]); +- globalParams =3D new GlobalParams(); ++ globalParams.reset(new GlobalParams()); + doc =3D new PDFDoc(fileName); + if (!doc->isOk()) { + fprintf(stderr, "Invalid PDF file\n"); +@@ -100,7 +100,7 @@ + if (objnum =3D=3D 0) { + srcStream =3D catalogDict.dictLookup("SourceObject"); + static char const_SourceFile[] =3D "SourceFile"; +- if (!srcStream.isStream(const_SourceFile)) { ++ if (!srcStream.isDict(const_SourceFile)) { + fprintf(stderr, "No SourceObject found\n"); + exit(1); + } +@@ -202,5 +202,4 @@ + fprintf(stderr, "Cross-reference table extracted to %s\n", outnam= e); + fclose(outfile); + delete doc; +- delete globalParams; + } diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index e4346d1232..4ea40126ae 100644 =2D-- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -227,29 +227,29 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-= SYSTEM is used." (define texlive-extra-src (origin (method url-fetch) =2D (uri "ftp://tug.org/historic/systems/texlive/2018/texlive-20180414-e= xtra.tar.xz") + (uri "ftp://tug.org/historic/systems/texlive/2019/texlive-20190410-ext= ra.tar.xz") (sha256 (base32 =2D "0a83kymxc8zmlxjb0y1gf6mx7qnf0hxffwkivwh5yh138y2rfhsv")))) + "13ncf2an4nlqv18lki6y2p6pcsgs1i54zqkhfwprax5j53bk70j8")))) =20 (define texlive-texmf-src (origin (method url-fetch) =2D (uri "ftp://tug.org/historic/systems/texlive/2018/texlive-20180414-t= exmf.tar.xz") + (uri "ftp://tug.org/historic/systems/texlive/2019/texlive-20190410-tex= mf.tar.xz") (sha256 (base32 =2D "1b8zigzg8raxkhhzphcmynf84rbdbj2ym2qkz24v8n0qx82zmqms")))) + "00n4qh9fj8v9zzy3y488hpfq1g3dnnh72y4yjsaikfcqpi59gv62")))) =20 (define-public texlive-bin (package (name "texlive-bin") =2D (version "20180414") + (version "20190410") (source (origin (method url-fetch) =2D (uri (string-append "ftp://tug.org/historic/systems/texlive/2018/" + (uri (string-append "ftp://tug.org/historic/systems/texlive/2019/" "texlive-" version "-source.tar.xz")) (sha256 (base32 =2D "0khyi6h015r2zfqgg0a44a2j7vmr1cy42knw7jbss237yvakc07y")) + "1dfps39q6bdr1zsbp9p74mvalmy3bycihv19sb9c6kg30kprz8nj")) (patches (let ((arch-patch (lambda (name revision hash) @@ -260,14 +260,13 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-= SYSTEM is used." "&id=3D" revision)) (file-name (string-append "texlive-bin-" name)) (sha256 (base32 hash))))) =2D (arch-revision "c4b99aba97213ea554b6592a4916d3c7394a6d7b")) =2D (append (search-patches "texlive-bin-CVE-2018-17407.patch" =2D "texlive-bin-luatex-poppler-compat.pat= ch") =2D (list =2D (arch-patch "pdftex-poppler0.76.patch" arch-revision =2D "15ypbh21amfsdxy7ca825x28lkmmkklxk1w660gpg= vzdi7s70h0b") =2D (arch-patch "xetex-poppler-fixes.patch" arch-revision =2D "1jj1p5zkjljb7id9pjv29cw0cf8mwrgrh4ackgzz9= c200vaqpsvx"))))))) + (arch-revision "49d7fe25e5ea63f136ebc20270c1d8fc9b00041c")) + (list + (arch-patch "pdftex-poppler0.76.patch" arch-revision + "03vc88dz37mjjyaspzv0fik2fp5gp8qv82114869akd1dhszbaa= x") + (search-patch "texlive-bin-poppler-0.83.patch") + (arch-patch "texlive-poppler-0.84.patch" arch-revision + "1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlnghks= a")))))) (build-system gnu-build-system) (inputs `(("texlive-extra-src" ,texlive-extra-src) @@ -284,7 +283,7 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SY= STEM is used." "-checkout")) (sha256 (base32 =2D "0wrjls1y9b4k1z10l9l8w2l3yjcw7v7by2y16kchdpkiyldlkry6")))) + "1cj04svl8bpfwjr4gqfcc04rmklz3aggrxvgj7q5bxrh7c7g18xh")))) ("cairo" ,cairo) ("fontconfig" ,fontconfig) ("fontforge" ,fontforge) @@ -362,18 +361,13 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-= SYSTEM is used." (copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc" "texk/web2c/pdftexdir/pdftosrc.cc") #t)) =2D (add-after 'use-code-for-new-poppler 'use-code-for-even-newer-po= ppler + (add-after 'unpack 'patch-dvisvgm-build-files (lambda _ =2D ;; Adjust for deprecated types in Poppler 0.73 and later. =2D (substitute* (append =2D (find-files "texk/web2c/luatexdir/" "\\.(cc|w)= $") =2D '("texk/web2c/pdftexdir/pdftosrc.cc")) =2D (("GBool") "bool") =2D (("gFalse") "false") =2D (("gTrue") "true") =2D (("getCString") "c_str") =2D (("Guint") "unsigned int") =2D (("Guchar") "unsigned char")) + ;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, = so + ;; the appropriate linker flags are not added. + (substitute* "texk/dvisvgm/configure" + (("^have_libgs=3Dyes" all) + (string-append all "\nHAVE_LIBGS=3D1"))) #t)) (add-after 'unpack 'disable-failing-test (lambda _ =2D-=20 2.24.1 From=208300b90d94a02c17e65a81ac51add5f511a28d04 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 9 Jan 2020 22:38:01 +0100 Subject: [PATCH 4/5] gnu: texlive-bin: Do not build static libraries. * gnu/packages/tex.scm (texlive-bin)[arguments]: Add "--disable-static" in #:configure-flags. =2D-- gnu/packages/tex.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 4ea40126ae..442baf6ed1 100644 =2D-- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -314,7 +314,8 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SY= STEM is used." (arguments `(#:out-of-source? #t #:configure-flags =2D `("--disable-native-texlive-build" + '("--disable-static" + "--disable-native-texlive-build" "--with-system-cairo" "--with-system-freetype2" "--with-system-gd" =2D-=20 2.24.1 From=200b1558e9f388a3d7787d0ea629ce685468e73e86 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 9 Jan 2020 22:38:35 +0100 Subject: [PATCH 5/5] gnu: texlive-bin: Purge unused bundled software from t= he source. * gnu/packages/tex.scm (texlive-bin)[source](modules, snippet): New fields. =2D-- gnu/packages/tex.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 442baf6ed1..b3703d1c4f 100644 =2D-- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -266,7 +266,22 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-S= YSTEM is used." "03vc88dz37mjjyaspzv0fik2fp5gp8qv82114869akd1dhszbaa= x") (search-patch "texlive-bin-poppler-0.83.patch") (arch-patch "texlive-poppler-0.84.patch" arch-revision =2D "1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlngh= ksa")))))) + "1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlnghks= a")))) + (modules '((guix build utils) + (ice-9 ftw))) + (snippet + '(begin + (with-directory-excursion "libs" + (let ((preserved-directories '("." ".." "lua53" "luajit"))) + ;; Delete bundled software, except Lua which cannot easily be + ;; used as an external dependency. + (for-each delete-file-recursively + (scandir "." + (lambda (file) + (and (not (member file preserved-direct= ories)) + (eq? 'directory (stat:type (stat f= ile))))))))) + ;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too. + #t)))) (build-system gnu-build-system) (inputs `(("texlive-extra-src" ,texlive-extra-src) =2D-=20 2.24.1 --=-=-= Content-Type: text/plain I'll look into updating the remaining texlive packages shortly. --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4XpOUACgkQoqBt8qM6 VPptagf/WNoS3mX95fdTDIl3YMTpkT2RcoSBYFvHZEsb/+fqJC6OxhUIqq8i6z/O TzONiyR+1u/9i/HZaA7L02dw7OBmQDrb6WJH6IIXV/FGBDYUsAnhtsQCC+wFDxVY KHL7YDRAm8UWv3+ooL6TK7FirluriVEn5kYG6ymAvznDUO+sfjCJkOosEdCPGJAs rFM+xKRf35wFyCML3DxVnw7cs2Zji19JajFbTfT3nxXToR2d7BWt8j3knBrLa5zw 8kIcxRzTM6vh1KOCh8VB60rzsFtrqY64DnQNb9N/gKIqrmnQJMx0+2ceo2w1rtn/ 9bLsrf8gRU4rn1WS3z7eB84BhA2hGg== =Wuhp -----END PGP SIGNATURE----- --==-=-=--