[gentoo-commits] repo/gentoo:master commit in: dev-libs/argtable/, dev-libs/argtable/files/

2023-05-09 Thread Sam James
commit: 2d23fccf8d1ffc5034d1bffefce1328476d38168
Author: Brahmajit Das  gmail  com>
AuthorDate: Sat May  6 18:39:19 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Tue May  9 17:50:55 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d23fccf

dev-libs/argtable: fix call to undeclared library function strcmp

Closes: https://bugs.gentoo.org/885609
Signed-off-by: Brahmajit Das  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/30899
Signed-off-by: Sam James  gentoo.org>

 dev-libs/argtable/argtable-2.13-r4.ebuild  | 49 ++
 ...able-2.13-Fix-undeclared-library-function.patch | 28 +
 2 files changed, 77 insertions(+)

diff --git a/dev-libs/argtable/argtable-2.13-r4.ebuild 
b/dev-libs/argtable/argtable-2.13-r4.ebuild
new file mode 100644
index ..f5b108d4161e
--- /dev/null
+++ b/dev-libs/argtable/argtable-2.13-r4.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PV="$(ver_rs 1 '-')"
+MY_P=${PN}${MY_PV}
+
+DESCRIPTION="An ANSI C library for parsing GNU-style command-line options with 
minimal fuss"
+HOMEPAGE="https://argtable.sourceforge.net;
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="doc debug examples static-libs"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-2.13-Fix-implicit-function-declaration.patch
+   "${FILESDIR}"/${PN}-2.13-Fix-undeclared-library-function.patch
+)
+
+src_configure() {
+   econf \
+   $(use_enable debug) \
+   $(use_enable static-libs static)
+}
+
+src_install() {
+   default
+
+   rm -rf "${ED}"/usr/share/doc/${PF}/
+
+   if use doc ; then
+   cd "${S}"/doc || die
+   dodoc *.pdf *.ps
+   docinto html
+   dodoc *.html *.gif
+   fi
+
+   if use examples ; then
+   cd "${S}"/example || die
+   docinto examples
+   dodoc Makefile *.[ch] README.txt
+   fi
+
+   find "${ED}" -name "*.la" -delete || die "failed to delete .la files"
+}

diff --git 
a/dev-libs/argtable/files/argtable-2.13-Fix-undeclared-library-function.patch 
b/dev-libs/argtable/files/argtable-2.13-Fix-undeclared-library-function.patch
new file mode 100644
index ..7f42d43727a5
--- /dev/null
+++ 
b/dev-libs/argtable/files/argtable-2.13-Fix-undeclared-library-function.patch
@@ -0,0 +1,28 @@
+From 519609d844f1e5bbf37407de8e43fa2d2be03262 Mon Sep 17 00:00:00 2001
+From: Brahmajit Das 
+Date: Sun, 7 May 2023 00:03:40 +0530
+Subject: [PATCH] Fix undeclared library function strcmp
+
+Bug: https://bugs.gentoo.org/885609
+--- a/tests/fntests.c
 b/tests/fntests.c
+@@ -1,5 +1,6 @@
+ #include "../src/argtable2.h"
+ #include 
++#include 
+
+ /* for memory leak debugging */
+ #ifdef DMALLOC
+--- a/tests/test_file.c
 b/tests/test_file.c
+@@ -21,6 +21,7 @@ USA.
+
+ #include "../src/argtable2.h"
+ #include 
++#include 
+
+ /* for memory leak debugging */
+ #ifdef DMALLOC
+--
+2.40.1
+



[gentoo-commits] repo/gentoo:master commit in: dev-libs/argtable/, dev-libs/argtable/files/

2022-10-06 Thread Sam James
commit: 28b0e6b360bca9840cba0f185df826897206bf31
Author: Sam James  gentoo  org>
AuthorDate: Thu Oct  6 17:12:23 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Oct  6 17:13:31 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28b0e6b3

dev-libs/argtable: fix build w/ Clang 16

Closes: https://bugs.gentoo.org/871231
Signed-off-by: Sam James  gentoo.org>

 ...rgtable-2.13-r2.ebuild => argtable-2.13-r3.ebuild} | 19 ++-
 ...table-2.13-Fix-implicit-function-declaration.patch | 16 
 2 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/dev-libs/argtable/argtable-2.13-r2.ebuild 
b/dev-libs/argtable/argtable-2.13-r3.ebuild
similarity index 82%
rename from dev-libs/argtable/argtable-2.13-r2.ebuild
rename to dev-libs/argtable/argtable-2.13-r3.ebuild
index 5ce3f4197fd4..22112e07aadc 100644
--- a/dev-libs/argtable/argtable-2.13-r2.ebuild
+++ b/dev-libs/argtable/argtable-2.13-r3.ebuild
@@ -3,20 +3,22 @@
 
 EAPI=8
 
-DESCRIPTION="An ANSI C library for parsing GNU-style command-line options with 
minimal fuss"
-HOMEPAGE="http://argtable.sourceforge.net/;
-
 MY_PV="$(ver_rs 1 '-')"
 MY_P=${PN}${MY_PV}
 
+DESCRIPTION="An ANSI C library for parsing GNU-style command-line options with 
minimal fuss"
+HOMEPAGE="http://argtable.sourceforge.net/;
 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+S="${WORKDIR}"/${MY_P}
 
 LICENSE="LGPL-2"
 SLOT="0"
 KEYWORDS="~alpha amd64 ~arm64 ~ia64 ppc ppc64 ~riscv sparc x86"
 IUSE="doc debug examples static-libs"
 
-S="${WORKDIR}"/${MY_P}
+PATCHES=(
+   "${FILESDIR}"/${PN}-2.13-Fix-implicit-function-declaration.patch
+)
 
 src_configure() {
econf \
@@ -25,20 +27,19 @@ src_configure() {
 }
 
 src_install() {
-   emake DESTDIR="${D}" install
-   rm -rf "${D}"/usr/share/doc/${PF}/
+   default
 
-   dodoc AUTHORS ChangeLog NEWS README
+   rm -rf "${ED}"/usr/share/doc/${PF}/
 
if use doc ; then
-   cd "${S}/doc"
+   cd "${S}"/doc || die
dodoc *.pdf *.ps
docinto html
dodoc *.html *.gif
fi
 
if use examples ; then
-   cd "${S}/example"
+   cd "${S}"/example || die
docinto examples
dodoc Makefile *.[ch] README.txt
fi

diff --git 
a/dev-libs/argtable/files/argtable-2.13-Fix-implicit-function-declaration.patch 
b/dev-libs/argtable/files/argtable-2.13-Fix-implicit-function-declaration.patch
new file mode 100644
index ..14ade74afaa6
--- /dev/null
+++ 
b/dev-libs/argtable/files/argtable-2.13-Fix-implicit-function-declaration.patch
@@ -0,0 +1,16 @@
+From febb2928d1e72c7adc914b2ef8e0611e1a5ea3fd Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Thu, 6 Oct 2022 18:10:52 +0100
+Subject: [PATCH] Fix implicit function declaration
+
+Bug: https://bugs.gentoo.org/871231
+--- a/src/arg_int.c
 b/src/arg_int.c
+@@ -29,6 +29,7 @@ USA.
+ /* #endif */
+ 
+ #include "argtable2.h"
++#include 
+ #include 
+ 
+ /* local error codes */