diff --git a/devel/elfutils/Makefile b/devel/elfutils/Makefile index dcf2b11e0290..79dbde88b20b 100644 --- a/devel/elfutils/Makefile +++ b/devel/elfutils/Makefile @@ -1,65 +1,72 @@ PORTNAME= elfutils DISTVERSION= 0.187 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= https://sourceware.org/elfutils/ftp/${PORTVERSION}/ MAINTAINER= cem@FreeBSD.org COMMENT= Library for manipulating ELF files and partial implementation of binutils WWW= https://sourceware.org/elfutils/ LICENSE= LGPL3 GPLv2+ GPLv3+ LICENSE_COMB= multi LICENSE_FILE_GPLv3+ = ${WRKSRC}/COPYING LICENSE_FILE_GPLv2+ = ${WRKSRC}/COPYING-GPLV2 LICENSE_FILE_LGPL3= ${WRKSRC}/COPYING-LGPLV3 BROKEN_armv6= fails to build: fails to compile i386_disasm.c LIB_DEPENDS= libargp.so:devel/argp-standalone \ libcurl.so:ftp/curl BUILD_DEPENDS= gnulib>=0:devel/gnulib PLIST_SUB= VERSION=${PORTVERSION} # Although the following line is synonymous to USES=localbase # it breaks the build CFLAGS+= -I${LOCALBASE}/include \ -I${LOCALBASE}/share/gnulib/lib \ -DFREEBSD_HAS_MEMPCPY LDFLAGS+= ${LOCALBASE}/lib/libargp.so \ ${LOCALBASE}/lib/libintl.so OPTIONS_DEFINE= MANPAGES NLS OPTIONS_DEFAULT= MANPAGES OPTIONS_SUB= yes NLS_USES= gettext NLS_USES_OFF= gettext # used anyway NLS_CONFIGURE_ENABLE= nls USES= autoreconf cpe gmake libtool pkgconfig tar:bzip2 CPE_VENDOR= ${PORTNAME}_project GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX=${PREFIX}/share USE_LDCONFIG= yes CFLAGS+= -Wno-error -Wno-format-nonliteral CFLAGS+= -Wno-null-dereference -Wno-unused-value # Avoid conflict with binutils / elftoolchain programs with the same names: CONFIGURE_ARGS+= --program-prefix=eu- # Disable debuginfod until option support can be added: CONFIGURE_ARGS+= --disable-debuginfod pre-configure: @${CP} -a \ ${LOCALBASE}/share/gnulib/lib/obstack.c \ - ${LOCALBASE}/share/gnulib/lib/obstack.h \ ${LOCALBASE}/share/gnulib/lib/obstack_printf.c \ + ${LOCALBASE}/share/gnulib/lib/libc-config.h \ + ${LOCALBASE}/share/gnulib/lib/cdefs.h \ + ${LOCALBASE}/share/gnulib/lib/exitfail.h \ + ${LOCALBASE}/share/gnulib/lib/exitfail.c \ + ${LOCALBASE}/share/gnulib/lib/gettext.h \ ${WRKSRC}/lib + @${SED} -e 's|_GL_ATTRIBUTE_PURE|__attribute__ ((__pure__))|g' \ + ${LOCALBASE}/share/gnulib/lib/obstack.in.h > \ + ${WRKSRC}/lib/obstack.h post-configure: # remove -Werror since it causes build failures @${FIND} ${WRKSRC} -name Makefile | ${XARGS} ${REINPLACE_CMD} -e 's| -Werror| |; s|-Werror ||' .include diff --git a/devel/elfutils/files/patch-lib_Makefile.am b/devel/elfutils/files/patch-lib_Makefile.am index feed71ace33d..e173571bf42f 100644 --- a/devel/elfutils/files/patch-lib_Makefile.am +++ b/devel/elfutils/files/patch-lib_Makefile.am @@ -1,12 +1,12 @@ --- lib/Makefile.am.orig 2022-04-25 20:56:39 UTC +++ lib/Makefile.am @@ -35,7 +35,8 @@ noinst_LIBRARIES = libeu.a libeu_a_SOURCES = xasprintf.c xstrdup.c xstrndup.c xmalloc.c next_prime.c \ crc32.c crc32_file.c \ - color.c error.c printversion.c + color.c error.c printversion.c \ -+ error.c obstack.c obstack_printf.c ++ exitfail.c obstack.c obstack_printf.c noinst_HEADERS = fixedsizehash.h libeu.h system.h dynamicsizehash.h list.h \ eu-config.h color.h printversion.h bpf.h \ diff --git a/devel/elfutils/files/patch-lib_error.c b/devel/elfutils/files/patch-lib_error.c deleted file mode 100644 index 379bbbae032e..000000000000 --- a/devel/elfutils/files/patch-lib_error.c +++ /dev/null @@ -1,70 +0,0 @@ ---- lib/error.c.orig 2016-07-13 06:58:54 UTC -+++ lib/error.c -@@ -0,0 +1,64 @@ -+#include -+#include -+#include -+#include -+ -+#include "error.h" -+ -+unsigned int error_message_count; -+int error_one_per_line; -+void (*error_print_progname)(void) = NULL; -+ -+static const char *lastfile; -+static unsigned lastline; -+ -+/* Good enough. */ -+ -+void -+error_at_line(int status, int errnum, const char *fn, unsigned line, -+ const char *format, ...) -+{ -+ va_list ap; -+ int serrno; -+ -+ if (error_one_per_line != 0 && fn != NULL && fn == lastfile && line == -+ lastline) -+ return; -+ -+ serrno = errno; -+ errno = errnum; -+ -+ fflush(stdout); -+ -+ if (error_print_progname != NULL) { -+ error_print_progname(); -+ fprintf(stderr, ":"); -+ } -+ -+ if (fn != NULL) { -+ lastfile = fn; -+ lastline = line; -+ -+ fprintf(stderr, "%s:%u: ", fn, line); -+ } else if (error_print_progname != NULL) { -+ fprintf(stderr, " "); -+ } -+ -+ va_start(ap, format); -+ if (status) { -+ if (errnum) -+ verr(status, format, ap); -+ else -+ verrx(status, format, ap); -+ } else { -+ if (errnum) -+ vwarn(format, ap); -+ else -+ vwarnx(format, ap); -+ } -+ va_end(ap); -+ -+ errno = serrno; -+ error_message_count++; -+} -+ - /* Definitions for error fallback functions. - Copyright (C) 2021 Google, Inc. - This file is part of elfutils. diff --git a/devel/elfutils/files/patch-lib_error.h b/devel/elfutils/files/patch-lib_error.h deleted file mode 100644 index e2d04d681290..000000000000 --- a/devel/elfutils/files/patch-lib_error.h +++ /dev/null @@ -1,21 +0,0 @@ ---- lib/error.h.orig 2016-07-13 06:58:54 UTC -+++ lib/error.h -@@ -0,0 +1,18 @@ -+#pragma once -+ -+/* -+ * error, error_at_line, error_message_count, error_one_per_line, -+ * error_print_progname - glibc error reporting functions -+ */ -+ -+/* void error(int status, int errnum, const char *format, ...); */ -+#define error(st, en, ...) error_at_line(st, en, NULL, 0, __VA_ARGS__) -+ -+void error_at_line(int status, int errnum, const char *filename, -+ unsigned int linenum, const char *format, ...); -+ -+extern unsigned int error_message_count; -+ -+extern int error_one_per_line; -+ -+extern void (*error_print_progname) (void); diff --git a/devel/elfutils/files/patch-lib_exitfail.h b/devel/elfutils/files/patch-lib_exitfail.h deleted file mode 100644 index 0a416c7cae14..000000000000 --- a/devel/elfutils/files/patch-lib_exitfail.h +++ /dev/null @@ -1,5 +0,0 @@ ---- lib/exitfail.h.orig 2016-07-13 08:19:52 UTC -+++ lib/exitfail.h -@@ -0,0 +1,2 @@ -+#pragma once -+#define exit_failure EXIT_FAILURE diff --git a/devel/elfutils/files/patch-lib_gettext.h b/devel/elfutils/files/patch-lib_gettext.h deleted file mode 100644 index 90e2e7fde9b7..000000000000 --- a/devel/elfutils/files/patch-lib_gettext.h +++ /dev/null @@ -1,4 +0,0 @@ ---- lib/gettext.h.orig 2016-07-13 08:20:19 UTC -+++ lib/gettext.h -@@ -0,0 +1 @@ -+/* Nop */