From owner-dev-commits-ports-main@freebsd.org Thu May 6 21:29:53 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7750962E857; Thu, 6 May 2021 21:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fbmv530sDz55X4; Thu, 6 May 2021 21:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59FB51F3F6; Thu, 6 May 2021 21:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 146LTrpS088515; Thu, 6 May 2021 21:29:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 146LTrnm088514; Thu, 6 May 2021 21:29:53 GMT (envelope-from git) Date: Thu, 6 May 2021 21:29:53 GMT Message-Id: <202105062129.146LTrnm088514@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: b8aceeb60194 - main - print/tex-luatex: Avoid mixing libc++ and libstdc++, and don't use -fcommon MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8aceeb60194bcd8f8caf6789193c46271d3480e Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2021 21:29:53 -0000 The branch main has been updated by dim (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=b8aceeb60194bcd8f8caf6789193c46271d3480e commit b8aceeb60194bcd8f8caf6789193c46271d3480e Author: Dimitry Andric AuthorDate: 2021-05-06 21:29:24 +0000 Commit: Dimitry Andric CommitDate: 2021-05-06 21:29:24 +0000 print/tex-luatex: Avoid mixing libc++ and libstdc++, and don't use -fcommon This port was not respecting the CC and CXX variables, thus it could pick up gcc and g++ instead, and that would cause mixups between libstdc++ (which is preferred by gcc) and libc++ (which is in base), ultimately leading to link errors. Also, the port uses a very old version of tex so it suffers from a few -fno-common issues, mostly variables that have been declared without an 'extern' specifier. Add a few patches to fix these. Appproved by: maintainer timeout PR: 234221 MFH: 2021Q2 --- print/tex-luatex/Makefile | 8 +++----- print/tex-luatex/files/patch-luatexdir_font_luatexfont.h | 11 +++++++++++ print/tex-luatex/files/patch-luatexdir_image_writeimg.h | 11 +++++++++++ print/tex-luatex/files/patch-luatexdir_image_writeimg.w | 11 +++++++++++ print/tex-luatex/files/patch-luatexdir_pdf_pdftables.h | 11 +++++++++++ print/tex-luatex/files/patch-luatexdir_tex_textoken.w | 11 +++++++++++ 6 files changed, 58 insertions(+), 5 deletions(-) diff --git a/print/tex-luatex/Makefile b/print/tex-luatex/Makefile index 2170772f1dd4..5ef297e9fae9 100644 --- a/print/tex-luatex/Makefile +++ b/print/tex-luatex/Makefile @@ -1,6 +1,6 @@ PORTNAME= luatex PORTVERSION= 0.80.0 -PORTREVISION= 23 +PORTREVISION= 24 CATEGORIES= print MASTER_SITES= ftp://tug.org/historic/systems/texlive/2015/ PKGNAMEPREFIX= tex- @@ -72,14 +72,12 @@ CONFIGURE_ARGS+=--with-system-$L \ --with-$L-include=${LOCALBASE}/include \ --with-$L-libdir=${LOCALBASE}/lib .endfor +CONFIGURE_ARGS+=CC="${CC}" \ + CXX="${CXX}" CPPFLAGS+= -I${LOCALBASE}/include MAKE_JOBS_UNSAFE= yes TEX_FORMATS= luatex -# Fix build on recent current -- our tex is so outdated, -# that it's unlikely that any upstream patches apply. -CFLAGS+= -fcommon - # buildenv and dumpenv in Makefile uses hard-coded TEXMFCNF. post-extract: cd ${WRKSRC}/.. && \ diff --git a/print/tex-luatex/files/patch-luatexdir_font_luatexfont.h b/print/tex-luatex/files/patch-luatexdir_font_luatexfont.h new file mode 100644 index 000000000000..f3feeb7a31c9 --- /dev/null +++ b/print/tex-luatex/files/patch-luatexdir_font_luatexfont.h @@ -0,0 +1,11 @@ +--- luatexdir/font/luatexfont.h.orig 2015-03-20 07:59:58 UTC ++++ luatexdir/font/luatexfont.h +@@ -149,8 +149,6 @@ void replace_packet_fonts(internal_font_number f, int + int *new_fontid, int count); + int *packet_local_fonts(internal_font_number f, int *num); + +-int packet_cur_s; /* current |do_vf_packet()| recursion level */ +-int packet_stack_ptr; /* pointer into |packet_stack| */ + vf_struct *new_vfstruct(void); + + /* writecff.c */ diff --git a/print/tex-luatex/files/patch-luatexdir_image_writeimg.h b/print/tex-luatex/files/patch-luatexdir_image_writeimg.h new file mode 100644 index 000000000000..264feada74cf --- /dev/null +++ b/print/tex-luatex/files/patch-luatexdir_image_writeimg.h @@ -0,0 +1,11 @@ +--- luatexdir/image/writeimg.h.orig 2015-03-20 07:59:58 UTC ++++ luatexdir/image/writeimg.h +@@ -27,7 +27,7 @@ + # include "pdf/pdfpage.h" + + typedef image_dict *idict_entry; +-idict_entry *idict_array; ++extern idict_entry *idict_array; + + void new_img_pdfstream_struct(image_dict *); + image *new_image(void); diff --git a/print/tex-luatex/files/patch-luatexdir_image_writeimg.w b/print/tex-luatex/files/patch-luatexdir_image_writeimg.w new file mode 100644 index 000000000000..cdbf579e417a --- /dev/null +++ b/print/tex-luatex/files/patch-luatexdir_image_writeimg.w @@ -0,0 +1,11 @@ +--- luatexdir/image/writeimg.w.orig 2015-03-20 07:59:58 UTC ++++ luatexdir/image/writeimg.w +@@ -125,6 +125,8 @@ + #define HEADER_PDF "%PDF-1." + #define MAX_HEADER (sizeof(HEADER_PNG)-1) + ++idict_entry *idict_array; ++ + static void check_type_by_header(image_dict * idict) + { + int i; diff --git a/print/tex-luatex/files/patch-luatexdir_pdf_pdftables.h b/print/tex-luatex/files/patch-luatexdir_pdf_pdftables.h new file mode 100644 index 000000000000..1b22db82488a --- /dev/null +++ b/print/tex-luatex/files/patch-luatexdir_pdf_pdftables.h @@ -0,0 +1,11 @@ +--- luatexdir/pdf/pdftables.h.orig 2015-03-20 07:59:58 UTC ++++ luatexdir/pdf/pdftables.h +@@ -21,7 +21,7 @@ + #ifndef PDFTABLES_H + # define PDFTABLES_H + +-const char *pdf_obj_typenames[PDF_OBJ_TYPE_MAX + 1]; ++extern const char *pdf_obj_typenames[PDF_OBJ_TYPE_MAX + 1]; + + typedef enum { + union_type_int, diff --git a/print/tex-luatex/files/patch-luatexdir_tex_textoken.w b/print/tex-luatex/files/patch-luatexdir_tex_textoken.w new file mode 100644 index 000000000000..6beaab5efe4d --- /dev/null +++ b/print/tex-luatex/files/patch-luatexdir_tex_textoken.w @@ -0,0 +1,11 @@ +--- luatexdir/tex/textoken.w.orig 2015-03-28 00:34:27 UTC ++++ luatexdir/tex/textoken.w +@@ -75,7 +75,7 @@ maximum memory usage. When code between the delimiters + report these statistics when |tracing_stats| is sufficiently large. + + @c +-int var_used, dyn_used; /* how much memory is in use */ ++int dyn_used; /* how much memory is in use */ + + halfword avail; /* head of the list of available one-word nodes */ + unsigned fix_mem_end; /* the last one-word node used in |mem| */