diff --git a/x11/library/libexplain/actions.py b/x11/library/libexplain/actions.py index 70043dbf9c..389bfeff71 100644 --- a/x11/library/libexplain/actions.py +++ b/x11/library/libexplain/actions.py @@ -11,9 +11,13 @@ from pisi.actionsapi import get def setup(): + shelltools.copy("etc/configure.ac", "configure.ac") skiptests=["t0555a","t0524a"] for t in skiptests: shelltools.system('sed -i "s/\([ \t]\)$t\([ \t]\)/\1/g" Makefile.in') + + shelltools.export("CPPFLAGS", "-fPIC") + autotools.autoreconf("-fiv") autotools.configure("--disable-static") def build(): diff --git a/x11/library/libexplain/files/0001-Fix-build-failure-with-GCC10.patch b/x11/library/libexplain/files/0001-Fix-build-failure-with-GCC10.patch new file mode 100644 index 0000000000..919be31c3b --- /dev/null +++ b/x11/library/libexplain/files/0001-Fix-build-failure-with-GCC10.patch @@ -0,0 +1,25 @@ +From b021f9835185ed262f203f83b9e6643d6374f9be Mon Sep 17 00:00:00 2001 +From: Christophe Giboudeaux +Date: Thu, 4 Feb 2021 22:42:13 +0100 +Subject: [PATCH] Fix build failure with GCC10 + +--- + libexplain/output/stderr.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libexplain/output/stderr.h b/libexplain/output/stderr.h +index 5494880..7956cfc 100644 +--- a/libexplain/output/stderr.h ++++ b/libexplain/output/stderr.h +@@ -22,7 +22,7 @@ + + #include + +-explain_output_t explain_output_static_stderr; ++extern explain_output_t explain_output_static_stderr; + + #endif /* LIBEXPLAIN_OUTPUT_STDERR_H */ + /* vim: set ts=8 sw=4 et : */ +-- +2.30.0 + diff --git a/x11/library/libexplain/files/libexplain-1.4-largefile.patch b/x11/library/libexplain/files/libexplain-1.4-largefile.patch new file mode 100644 index 0000000000..6e01765a3d --- /dev/null +++ b/x11/library/libexplain/files/libexplain-1.4-largefile.patch @@ -0,0 +1,19 @@ +Index: libexplain/ac/fcntl.h +=================================================================== +--- libexplain/ac/fcntl.h.orig ++++ libexplain/ac/fcntl.h +@@ -65,8 +65,14 @@ + * flags values returned by the kernel. + */ + #if defined(__linux__) && (O_LARGEFILE == 0) ++#if defined(__aarch64__) ++#define O_LARGEFILE_HIDDEN 0400000 ++#elif defined(__powerpc64__) ++#define O_LARGEFILE_HIDDEN 0200000 ++#else + #define O_LARGEFILE_HIDDEN 0100000 + #endif ++#endif + + + /* diff --git a/x11/library/libexplain/files/libexplain-1.4-missing-defines.patch b/x11/library/libexplain/files/libexplain-1.4-missing-defines.patch index fe723d76d6..8d1c556249 100644 --- a/x11/library/libexplain/files/libexplain-1.4-missing-defines.patch +++ b/x11/library/libexplain/files/libexplain-1.4-missing-defines.patch @@ -1,9 +1,11 @@ ---- libexplain-1.4.D001.orig/libexplain/buffer/file_inode_flags.c -+++ libexplain-1.4.D001/libexplain/buffer/file_inode_flags.c +Index: libexplain/buffer/file_inode_flags.c +=================================================================== +--- libexplain/buffer/file_inode_flags.c.orig ++++ libexplain/buffer/file_inode_flags.c @@ -28,6 +28,14 @@ - + #if defined(FS_IOC_GETFLAGS) || defined(FS_IOC32_GETFLAGS) - + +#ifndef FS_ECOMPR_FL +#define FS_ECOMPR_FL 0x00000800 /* Compression error */ +#endif @@ -14,4 +16,16 @@ + void explain_buffer_file_inode_flags(explain_string_buffer_t *sb, int value) - { \ No newline at end of file + { +Index: libexplain/ac/linux/net_tstamp.h +=================================================================== +--- libexplain/ac/linux/net_tstamp.h.orig ++++ libexplain/ac/linux/net_tstamp.h +@@ -28,6 +28,7 @@ + #include + + #ifdef HAVE_LINUX_NET_TSTAMP_H ++#include + #include + #endif + diff --git a/x11/library/libexplain/files/libexplain-1.4-syscall.patch b/x11/library/libexplain/files/libexplain-1.4-syscall.patch new file mode 100644 index 0000000000..e3369571fe --- /dev/null +++ b/x11/library/libexplain/files/libexplain-1.4-syscall.patch @@ -0,0 +1,39 @@ +Index: explain/syscall/ustat.c +=================================================================== +--- explain/syscall/ustat.c.orig ++++ explain/syscall/ustat.c +@@ -30,7 +30,7 @@ + #include + + +-#ifndef HAVE_USTAT ++#if !defined(HAVE_USTAT_H) && !defined(LINUX_TYPES_H_STRUCT_USTAT) + + struct ustat + { +Index: libexplain/buffer/enfile.c +=================================================================== +--- libexplain/buffer/enfile.c.orig ++++ libexplain/buffer/enfile.c +@@ -38,7 +38,7 @@ get_maxfile(void) + { + if (explain_option_dialect_specific()) + { +-#ifdef __linux__ ++#ifdef SYS__sysctl + /* + * In the linux kernel, if get_empty_filp() returns NULL, the open + * system call (and others) will return ENFILE. +Index: libexplain/buffer/errno/listen.c +=================================================================== +--- libexplain/buffer/errno/listen.c.orig ++++ libexplain/buffer/errno/listen.c +@@ -72,7 +72,7 @@ append_getsockname(explain_string_buffer + static int + get_somaxconn(void) + { +-#ifdef __linux__ ++#ifdef SYS__sysctl + struct __sysctl_args args; + long somaxconn; + size_t somaxconn_size = sizeof(somaxconn); diff --git a/x11/library/libexplain/files/sanitize-bison.patch b/x11/library/libexplain/files/sanitize-bison.patch new file mode 100644 index 0000000000..5c4ee77ef9 --- /dev/null +++ b/x11/library/libexplain/files/sanitize-bison.patch @@ -0,0 +1,108 @@ +Author: Andreas Beckmann +Description: sanitize bison usage + use + %define api.prefix {...} + instead of crude + sed -e 's/[yY][yY]/.../g' + + Thanks to Akim Demaille for the hint! (#960608) + +--- a/codegen/gram.y ++++ b/codegen/gram.y +@@ -17,6 +17,8 @@ + * with this program. If not, see . + */ + ++%define api.prefix {gram_} ++ + %{ + + #include +--- a/libexplain/acl_grammar.y ++++ b/libexplain/acl_grammar.y +@@ -17,6 +17,8 @@ + * along with this program. If not, see . + */ + ++%define api.prefix {acl_grammar_} ++ + %{ + + #include +--- a/libexplain/parse_bits.y ++++ b/libexplain/parse_bits.y +@@ -17,6 +17,8 @@ + along with this program. If not, see . + */ + ++%define api.prefix {parse_bits_} ++ + %{ + + #include +--- a/libexplain/printf_format.y ++++ b/libexplain/printf_format.y +@@ -17,6 +17,8 @@ + * along with this program. If not, see . + */ + ++%define api.prefix {printf_format_} ++ + %{ + + #include +--- a/Makefile.in ++++ b/Makefile.in +@@ -357,9 +357,9 @@ codegen/get_user_name.$(OBJEXT) codegen/ + + codegen/gram.yacc.c codegen/gram.yacc.h: codegen/gram.y + $(YACC) -d $(YFLAGS) codegen/gram.y +- sed -e 's/[yY][yY]/gram_/g' -e '//d' -e '//d' -e \ ++ sed -e '//d' -e '//d' -e \ + '//d' y.tab.c > codegen/gram.yacc.c +- sed -e 's/[yY][yY]/gram_/g' -e 's/Y_TAB_H/codegen_gram_YACC_H/g' \ ++ sed -e '' \ + y.tab.h > codegen/gram.yacc.h + test -f y.output && mv y.output codegen/gram.output || true + rm -f y.tab.c y.tab.h y.output || true +@@ -4016,11 +4016,10 @@ libexplain/acl_get_file_or_die.$(OBJEXT) + libexplain/acl_grammar.yacc.c libexplain/acl_grammar.yacc.h: \ + libexplain/acl_grammar.y + $(YACC) -d $(YFLAGS) libexplain/acl_grammar.y +- sed -e 's/[yY][yY]/acl_grammar_/g' -e '//d' -e \ ++ sed -e '//d' -e \ + '//d' -e '//d' y.tab.c > \ + libexplain/acl_grammar.yacc.c +- sed -e 's/[yY][yY]/acl_grammar_/g' -e \ +- 's/Y_TAB_H/libexplain_acl_grammar_YACC_H/g' y.tab.h > \ ++ sed -e '' y.tab.h > \ + libexplain/acl_grammar.yacc.h + test -f y.output && mv y.output libexplain/acl_grammar.output || true + rm -f y.tab.c y.tab.h y.output || true +@@ -31058,10 +31057,9 @@ libexplain/output/warning.$(OBJEXT) libe + libexplain/parse_bits.yacc.c libexplain/parse_bits.yacc.h: \ + libexplain/parse_bits.y + $(YACC) -d $(YFLAGS) libexplain/parse_bits.y +- sed -e 's/[yY][yY]/parse_bits_/g' -e '//d' -e '//d' \ ++ sed -e '//d' -e '//d' \ + -e '//d' y.tab.c > libexplain/parse_bits.yacc.c +- sed -e 's/[yY][yY]/parse_bits_/g' -e \ +- 's/Y_TAB_H/libexplain_parse_bits_YACC_H/g' y.tab.h > \ ++ sed -e '' y.tab.h > \ + libexplain/parse_bits.yacc.h + test -f y.output && mv y.output libexplain/parse_bits.output || true + rm -f y.tab.c y.tab.h y.output || true +@@ -31418,11 +31416,10 @@ $(includedir)/libexplain/printf.h: .mkdi + libexplain/printf_format.yacc.c libexplain/printf_format.yacc.h: \ + libexplain/printf_format.y + $(YACC) -d $(YFLAGS) libexplain/printf_format.y +- sed -e 's/[yY][yY]/printf_format_/g' -e '//d' -e \ ++ sed -e '//d' -e \ + '//d' -e '//d' y.tab.c > \ + libexplain/printf_format.yacc.c +- sed -e 's/[yY][yY]/printf_format_/g' -e \ +- 's/Y_TAB_H/libexplain_printf_format_YACC_H/g' y.tab.h > \ ++ sed -e '' y.tab.h > \ + libexplain/printf_format.yacc.h + test -f y.output && mv y.output libexplain/printf_format.output || true + rm -f y.tab.c y.tab.h y.output || true diff --git a/x11/library/libexplain/pspec.xml b/x11/library/libexplain/pspec.xml index 62ffb6777a..0e5d113a6a 100644 --- a/x11/library/libexplain/pspec.xml +++ b/x11/library/libexplain/pspec.xml @@ -25,7 +25,11 @@ ghostscript-devel + 0001-Fix-build-failure-with-GCC10.patch + sanitize-bison.patch libexplain-1.4-missing-defines.patch + libexplain-1.4-largefile.patch + libexplain-1.4-syscall.patch