Generate lj_vm_asm.S at build time using a patched generator, should ensure both SunOS and NetBSD builds are fixed.diff -r1.49 -r1.50 pkgsrc/print/luatex/Makefile
(jperkin)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.49 2016/07/05 01:17:23 dholland Exp $ | 1 | # $NetBSD: Makefile,v 1.50 2016/07/06 09:47:52 jperkin Exp $ | |
2 | 2 | |||
3 | DISTNAME= texlive-20160523-source | 3 | DISTNAME= texlive-20160523-source | |
4 | PKGNAME= luatex-0.95 | 4 | PKGNAME= luatex-0.95 | |
5 | PKGREVISION= 1 | 5 | PKGREVISION= 1 | |
6 | CATEGORIES= print | 6 | CATEGORIES= print | |
7 | MASTER_SITES= ftp://tug.org/historic/systems/texlive/2016/ | 7 | MASTER_SITES= ftp://tug.org/historic/systems/texlive/2016/ | |
8 | EXTRACT_SUFX= .tar.xz | 8 | EXTRACT_SUFX= .tar.xz | |
9 | 9 | |||
10 | MAINTAINER= minskim@NetBSD.org | 10 | MAINTAINER= minskim@NetBSD.org | |
11 | HOMEPAGE= http://www.luatex.org/ | 11 | HOMEPAGE= http://www.luatex.org/ | |
12 | COMMENT= Extended version of pdfTeX using Lua | 12 | COMMENT= Extended version of pdfTeX using Lua | |
13 | LICENSE= gnu-gpl-v2 | 13 | LICENSE= gnu-gpl-v2 | |
14 | 14 | |||
@@ -64,21 +64,25 @@ SUBST_VARS.prefix= PREFIX | @@ -64,21 +64,25 @@ SUBST_VARS.prefix= PREFIX | |||
64 | CFLAGS.SunOS+= -std=gnu99 -D_XOPEN_SOURCE_EXTENDED=0 | 64 | CFLAGS.SunOS+= -std=gnu99 -D_XOPEN_SOURCE_EXTENDED=0 | |
65 | 65 | |||
66 | .include "../../archivers/zziplib/buildlink3.mk" | 66 | .include "../../archivers/zziplib/buildlink3.mk" | |
67 | .include "../../devel/zlib/buildlink3.mk" | 67 | .include "../../devel/zlib/buildlink3.mk" | |
68 | .include "../../graphics/cairo/buildlink3.mk" | 68 | .include "../../graphics/cairo/buildlink3.mk" | |
69 | .include "../../graphics/png/buildlink3.mk" | 69 | .include "../../graphics/png/buildlink3.mk" | |
70 | .include "../../math/mpfr/buildlink3.mk" | 70 | .include "../../math/mpfr/buildlink3.mk" | |
71 | BUILDLINK_API_DEPENDS.kpathsea+= kpathsea>=6.2.1 | 71 | BUILDLINK_API_DEPENDS.kpathsea+= kpathsea>=6.2.1 | |
72 | .include "../../print/kpathsea/buildlink3.mk" | 72 | .include "../../print/kpathsea/buildlink3.mk" | |
73 | .include "../../print/poppler/buildlink3.mk" | 73 | .include "../../print/poppler/buildlink3.mk" | |
74 | .include "../../print/poppler-includes/buildlink3.mk" | 74 | .include "../../print/poppler-includes/buildlink3.mk" | |
75 | .include "../../x11/pixman/buildlink3.mk" | 75 | .include "../../x11/pixman/buildlink3.mk" | |
76 | 76 | |||
77 | pre-configure: | |||
78 | # Ensure we generate our patched version | |||
79 | ${RM} -f libs/luajit/lj_vm_asm.S | |||
80 | ||||
77 | do-install: | 81 | do-install: | |
78 | ${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/libs/lua52/libtexlua52.la ${DESTDIR}${PREFIX}/lib | 82 | ${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/libs/lua52/libtexlua52.la ${DESTDIR}${PREFIX}/lib | |
79 | ${LIBTOOL} --mode=install ${INSTALL_PROGRAM} ${WRKSRC}/texk/web2c/luatex ${DESTDIR}${PREFIX}/bin | 83 | ${LIBTOOL} --mode=install ${INSTALL_PROGRAM} ${WRKSRC}/texk/web2c/luatex ${DESTDIR}${PREFIX}/bin | |
80 | .for f in texlua texluac | 84 | .for f in texlua texluac | |
81 | ${LN} -s luatex ${DESTDIR}${PREFIX}/bin/${f} | 85 | ${LN} -s luatex ${DESTDIR}${PREFIX}/bin/${f} | |
82 | .endfor | 86 | .endfor | |
83 | 87 | |||
84 | .include "../../mk/bsd.pkg.mk" | 88 | .include "../../mk/bsd.pkg.mk" |
@@ -1,8 +1,8 @@ | @@ -1,8 +1,8 @@ | |||
1 | $NetBSD: distinfo,v 1.21 2016/07/05 12:34:12 jperkin Exp $ | 1 | $NetBSD: distinfo,v 1.22 2016/07/06 09:47:52 jperkin Exp $ | |
2 | 2 | |||
3 | SHA1 (texlive-20160523-source.tar.xz) = 8cdcc00492fc642db59a9a07f9ea080ff6765460 | 3 | SHA1 (texlive-20160523-source.tar.xz) = 8cdcc00492fc642db59a9a07f9ea080ff6765460 | |
4 | RMD160 (texlive-20160523-source.tar.xz) = 4ffc4d92f8c6408c23a34815e2d4b0f4877d9c3f | 4 | RMD160 (texlive-20160523-source.tar.xz) = 4ffc4d92f8c6408c23a34815e2d4b0f4877d9c3f | |
5 | SHA512 (texlive-20160523-source.tar.xz) = 9fdd69d237238385240e918456f54791a38e57b573edf5df839c57e56a0009012b68b7b92298c3e137181325e2be84d7a84e9c7cf41ae9739bb3329d84194564 | 5 | SHA512 (texlive-20160523-source.tar.xz) = 9fdd69d237238385240e918456f54791a38e57b573edf5df839c57e56a0009012b68b7b92298c3e137181325e2be84d7a84e9c7cf41ae9739bb3329d84194564 | |
6 | Size (texlive-20160523-source.tar.xz) = 258176464 bytes | 6 | Size (texlive-20160523-source.tar.xz) = 258176464 bytes | |
7 | SHA1 (patch-ac) = 1ee83833a03eace2eada892130ddb2198e829f3d | 7 | SHA1 (patch-ac) = 1ee83833a03eace2eada892130ddb2198e829f3d | |
8 | SHA1 (patch-libs_luajit_Makefile.in) = 830b8a503cf754e1952bb812701296edfb0dedad | 8 | SHA1 (patch-libs_luajit_LuaJIT-src_src_host_buildvm__asm.c) = 34fa742ed696f97df637c5086bf1faf3d718cb69 |
$NetBSD: patch-libs_luajit_LuaJIT-src_src_host_buildvm__asm.c,v 1.1 2016/07/06 09:47:52 jperkin Exp $
Generate SunOS compatible assembly.
--- libs/luajit/LuaJIT-src/src/host/buildvm_asm.c.orig 2016-03-09 22:32:00.000000000 +0000
+++ libs/luajit/LuaJIT-src/src/host/buildvm_asm.c
@@ -29,7 +29,11 @@ static void emit_asm_reloc(BuildCtx *ctx
switch (ctx->mode) {
case BUILD_elfasm:
if (type)
+#ifdef __sun
+ fprintf(ctx->fp, "\t.long %s@PLT-.-4\n", sym);
+#else
fprintf(ctx->fp, "\t.long %s-.-4\n", sym);
+#endif
else
fprintf(ctx->fp, "\t.long %s\n", sym);
break;
@@ -75,7 +79,11 @@ err:
/* Various fixups for external symbols outside of our binary. */
if (ctx->mode == BUILD_elfasm) {
if (LJ_32)
+#ifdef __sun
+ fprintf(ctx->fp, "#if __PIC__\n\t%s lj_wrap_%s@PLT\n#else\n", opname, sym);
+#else
fprintf(ctx->fp, "#if __PIC__\n\t%s lj_wrap_%s\n#else\n", opname, sym);
+#endif
fprintf(ctx->fp, "\t%s %s@PLT\n", opname, sym);
if (LJ_32)
fprintf(ctx->fp, "#endif\n");
@@ -85,7 +93,11 @@ err:
return;
}
}
+#ifdef __sun
+ fprintf(ctx->fp, "\t%s %s@PLT\n", opname, sym);
+#else
fprintf(ctx->fp, "\t%s %s\n", opname, sym);
+#endif
}
#else
/* Emit words piecewise as assembler text. */