texlive: fix build with clang 16
There are two instances of `main` with an implicit `int` return type. This is fixed upstream, so this patch is to allow texlive-2022 to build until texlive-2023 is merged into nixpkgs.
This commit is contained in:
parent
9ae5c2de7f
commit
0ea638dac5
|
@ -102,6 +102,12 @@ core = stdenv.mkDerivation rec {
|
|||
perl
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Fix implicit `int` on `main`, which results in an error when building with clang 16.
|
||||
# This is fixed upstream and can be dropped with the 2023 release.
|
||||
./fix-implicit-int.patch
|
||||
];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
preConfigure = ''
|
||||
|
@ -224,6 +230,9 @@ core-big = stdenv.mkDerivation { #TODO: upmendex
|
|||
stripLen = 1;
|
||||
extraPrefix = "libs/luajit/LuaJIT-src/";
|
||||
})
|
||||
# Fix implicit `int` on `main`, which results in an error when building with clang 16.
|
||||
# This is fixed upstream and can be dropped with the 2023 release.
|
||||
./fix-implicit-int.patch
|
||||
];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
|
22
pkgs/tools/typesetting/tex/texlive/fix-implicit-int.patch
Normal file
22
pkgs/tools/typesetting/tex/texlive/fix-implicit-int.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
diff -ur a/utils/m-tx/mtx-src/prepmx.c b/utils/m-tx/mtx-src/prepmx.c
|
||||
--- a/utils/m-tx/mtx-src/prepmx.c 2018-04-28 17:56:18.000000000 -0600
|
||||
+++ b/utils/m-tx/mtx-src/prepmx.c 2023-07-11 15:21:26.351024424 -0600
|
||||
@@ -769,6 +769,7 @@
|
||||
}
|
||||
|
||||
|
||||
+int
|
||||
main(int argc, Char *argv[])
|
||||
{ /* ---- Main program ------------------------ */
|
||||
PASCAL_MAIN(argc, argv);
|
||||
diff -ur a/utils/pmx/pmx-src/libf2c/main.c b/utils/pmx/pmx-src/libf2c/main.c
|
||||
--- a/utils/pmx/pmx-src/libf2c/main.c 2016-02-09 22:31:26.000000000 -0700
|
||||
+++ b/utils/pmx/pmx-src/libf2c/main.c 2023-07-11 15:49:35.043438384 -0600
|
||||
@@ -106,6 +106,7 @@
|
||||
#ifdef KR_headers
|
||||
main(argc, argv) int argc; char **argv;
|
||||
#else
|
||||
+int
|
||||
main(int argc, char **argv)
|
||||
#endif
|
||||
{
|
Loading…
Reference in a new issue