From 4152e32f2faea04e014ff410862fe71328c2bf1e Mon Sep 17 00:00:00 2001 From: edd Date: Tue, 10 Apr 2018 20:43:51 +0000 Subject: [PATCH] print/texlive/base: Make it build with clang 6. OK naddy@, thanks. --- print/texlive/base/Makefile | 6 +----- ...patch-texk_web2c_luatexdir_image_pdftoepdf_w | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 print/texlive/base/patches/patch-texk_web2c_luatexdir_image_pdftoepdf_w diff --git a/print/texlive/base/Makefile b/print/texlive/base/Makefile index d5583da60c0..33d16a9906b 100755 --- a/print/texlive/base/Makefile +++ b/print/texlive/base/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.98 2018/02/21 21:00:27 kili Exp $ +# $OpenBSD: Makefile,v 1.99 2018/04/10 20:43:51 edd Exp $ COMMENT = base binaries for TeXLive typesetting distribution @@ -55,10 +55,6 @@ CONFIGURE_STYLE = gnu CPPFLAGS = -I${X11BASE}/include \ -I${LOCALBASE}/include -# Not yet. Some parts (like luatex) will need patches to build with -# this: -# CXXFLAGS += -std=c++11 - LDFLAGS = -L${LOCALBASE}/lib \ -L${X11BASE}/lib diff --git a/print/texlive/base/patches/patch-texk_web2c_luatexdir_image_pdftoepdf_w b/print/texlive/base/patches/patch-texk_web2c_luatexdir_image_pdftoepdf_w new file mode 100644 index 00000000000..d187a5a8057 --- /dev/null +++ b/print/texlive/base/patches/patch-texk_web2c_luatexdir_image_pdftoepdf_w @@ -0,0 +1,17 @@ +$OpenBSD: patch-texk_web2c_luatexdir_image_pdftoepdf_w,v 1.3 2018/04/10 20:43:51 edd Exp $ + +Fix C++11 build problem in generated C++ code. +http://www.tug.org/pipermail/tex-live/2017-June/040365.html + +Index: texk/web2c/luatexdir/image/pdftoepdf.w +--- texk/web2c/luatexdir/image/pdftoepdf.w.orig ++++ texk/web2c/luatexdir/image/pdftoepdf.w +@@ -71,7 +71,7 @@ static char *get_file_checksum(const char *a, file_err + ck = (char *) malloc(PDF_CHECKSUM_SIZE); + if (ck == NULL) + formatted_error("pdf inclusion","out of memory while processing '%s'", a); +- snprintf(ck, PDF_CHECKSUM_SIZE, "%" PRIu64 "_%" PRIu64, (uint64_t) size,(uint64_t) mtime); ++ snprintf(ck, PDF_CHECKSUM_SIZE, "%"@= @>PRIu64@= @>"_%"@= @>PRIu64, (uint64_t) size,(uint64_t) mtime); + } else { + switch (fe) { + case FE_FAIL: