From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libtar/files/, dev-libs/libtar/
Date: Fri, 28 Apr 2023 06:05:14 +0000 (UTC) [thread overview]
Message-ID: <1682661851.b5d27ba41941be450cada145f6a03367ecb0a525.sam@gentoo> (raw)
commit: b5d27ba41941be450cada145f6a03367ecb0a525
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 28 05:52:12 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 28 06:04:11 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5d27ba4
dev-libs/libtar: fix configure w/ clang 16
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/libtar-1.2.20-configure-clang16.patch | 43 +++++++++++++++
dev-libs/libtar/libtar-1.2.20-r6.ebuild | 64 ++++++++++++++++++++++
2 files changed, 107 insertions(+)
diff --git a/dev-libs/libtar/files/libtar-1.2.20-configure-clang16.patch b/dev-libs/libtar/files/libtar-1.2.20-configure-clang16.patch
new file mode 100644
index 000000000000..c47ae7f3c8f2
--- /dev/null
+++ b/dev-libs/libtar/files/libtar-1.2.20-configure-clang16.patch
@@ -0,0 +1,43 @@
+https://src.fedoraproject.org/rpms/libtar/raw/175c39e7e572fea263fd2e35175646852a785def/f/libtar-configure-c99.patch
+
+Add additional #include directives to prevent implicit function
+declarations and build failures with future compilers.
+
+--- a/compat/module.ac
++++ b/compat/module.ac
+@@ -31,6 +31,8 @@ AC_DEFUN([COMPAT_FUNC_BASENAME], [
+ [compat_cv_func_basename_works],
+ [AC_TRY_RUN([
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #ifdef HAVE_LIBGEN_H
+ # include <libgen.h>
+ #endif
+@@ -85,6 +87,8 @@ AC_DEFUN([COMPAT_FUNC_DIRNAME], [
+ [compat_cv_func_dirname_works],
+ [AC_TRY_RUN([
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #ifdef HAVE_LIBGEN_H
+ # include <libgen.h>
+ #endif
+@@ -208,6 +212,7 @@ AC_DEFUN([COMPAT_FUNC_MAKEDEV], [
+ [compat_cv_func_makedev_three_args],
+ [AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
++#include <stdlib.h>
+ #include <sys/types.h>
+ #ifdef MAJOR_IN_MKDEV
+ # include <sys/mkdev.h>
+@@ -248,6 +253,8 @@ AC_DEFUN([COMPAT_FUNC_SNPRINTF], [
+ [compat_cv_func_snprintf_works],
+ [AC_TRY_RUN([
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+
+ typedef struct {
+ int length;
+
diff --git a/dev-libs/libtar/libtar-1.2.20-r6.ebuild b/dev-libs/libtar/libtar-1.2.20-r6.ebuild
new file mode 100644
index 000000000000..de4f3b50ca80
--- /dev/null
+++ b/dev-libs/libtar/libtar-1.2.20-r6.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="C library for manipulating tar archives"
+HOMEPAGE="https://repo.or.cz/w/libtar.git/"
+SRC_URI="https://dev.gentoo.org/~pinkbyte/distfiles/snapshots/${P}.tar.gz"
+S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="zlib"
+# There is no test and 'check' target errors out due to mixing of automake &
+# non-automake makefiles.
+# https://bugs.gentoo.org/526436
+RESTRICT="test"
+
+RDEPEND="
+ zlib? ( sys-libs/zlib:= )
+ !zlib? ( app-arch/gzip )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.2.11-free.patch
+ "${FILESDIR}"/${PN}-1.2.11-impl-dec.patch
+ "${FILESDIR}"/CVE-2013-4420.patch
+ "${FILESDIR}"/${P}-fd-leaks.patch
+ "${FILESDIR}"/${P}-tar_open-memleak.patch
+ "${FILESDIR}"/${P}-bin-memleaks.patch
+ "${FILESDIR}"/${P}-configure-clang16.patch
+)
+
+src_prepare() {
+ default
+
+ sed -e '/INSTALL_PROGRAM/s:-s::' \
+ -i {doc,lib{,tar}}/Makefile.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-encap
+ --disable-epkg-install
+ $(use_with zlib)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ dodoc ChangeLog-1.0.x
+ newdoc compat/README README.compat
+ newdoc compat/TODO TODO.compat
+ newdoc listhash/TODO TODO.listhash
+
+ find "${ED}" -name '*.la' -delete || die
+}
next reply other threads:[~2023-04-28 6:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 6:05 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-02-17 13:37 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libtar/files/, dev-libs/libtar/ Andreas Sturmlechner
2018-02-17 13:37 Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1682661851.b5d27ba41941be450cada145f6a03367ecb0a525.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox