summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2023-05-29 08:53:31 +0000
committerBernard Cafarelli <voyageur@gentoo.org>2023-06-13 16:12:05 +0200
commite4fbab63c9307ea2361f125a6f51303e0b146e15 (patch)
tree3e45db9dd61c4bbd07669ab082654e7f0a8c7a9b /net-misc/wget2
parentwww-client/chromium: update maintainers (diff)
downloadgentoo-e4fbab63c9307ea2361f125a6f51303e0b146e15.tar.gz
gentoo-e4fbab63c9307ea2361f125a6f51303e0b146e15.tar.bz2
gentoo-e4fbab63c9307ea2361f125a6f51303e0b146e15.zip
net-misc/wget2: Fix incompatible pointer to integer conversion
Closes: https://bugs.gentoo.org/898058 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/31207 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'net-misc/wget2')
-rw-r--r--net-misc/wget2/files/wget2-fix-build-issues-with-clang-16.patch28
-rw-r--r--net-misc/wget2/wget2-2.0.1-r3.ebuild96
2 files changed, 124 insertions, 0 deletions
diff --git a/net-misc/wget2/files/wget2-fix-build-issues-with-clang-16.patch b/net-misc/wget2/files/wget2-fix-build-issues-with-clang-16.patch
new file mode 100644
index 000000000000..ca671879a1e3
--- /dev/null
+++ b/net-misc/wget2/files/wget2-fix-build-issues-with-clang-16.patch
@@ -0,0 +1,28 @@
+https://gitlab.com/gnuwget/wget2/-/merge_requests/523
+From: Brahmajit Das <brahmajit.xyz@gmail.com>
+Date: Mon, 29 May 2023 08:34:33 +0000
+Subject: [PATCH] libwget/thread.c: Fix build issues with clang-16
+
+With clang 16, specially on with musl libc, it would result in an
+incompatible pointer to integer conversion error. As clang 16 has made a
+few options default, including -Wincompatible-function-pointer-types.
+This patch fixes that error.
+
+First discovered on Gentoo's musl llvm profile. Please refer
+https://bugs.gentoo.org/898058.
+
+Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
+--- a/libwget/thread.c
++++ b/libwget/thread.c
+@@ -289,7 +289,7 @@ int wget_thread_join(wget_thread *thread)
+ */
+ wget_thread_id wget_thread_self(void)
+ {
+- return gl_thread_self();
++ return (wget_thread_id) gl_thread_self();
+ }
+
+ /**
+--
+2.40.1
+
diff --git a/net-misc/wget2/wget2-2.0.1-r3.ebuild b/net-misc/wget2/wget2-2.0.1-r3.ebuild
new file mode 100644
index 000000000000..7963200843bb
--- /dev/null
+++ b/net-misc/wget2/wget2-2.0.1-r3.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="GNU Wget2 is a file and recursive website downloader"
+HOMEPAGE="https://gitlab.com/gnuwget/wget2"
+SRC_URI="mirror://gnu/wget/${P}.tar.gz"
+
+# LGPL for libwget
+LICENSE="GPL-3+ LGPL-3+"
+SLOT="0/0" # subslot = libwget.so version
+QA_PKGCONFIG_VERSION="2.1.0" # libwget pkg-config versioning
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="brotli bzip2 doc +gnutls gpgme +http2 idn lzip lzma openssl pcre psl +ssl test xattr zlib"
+
+RDEPEND="
+ brotli? ( app-arch/brotli )
+ bzip2? ( app-arch/bzip2 )
+ !gnutls? ( dev-libs/libgcrypt:= )
+ ssl? (
+ gnutls? ( net-libs/gnutls:= )
+ !gnutls? (
+ dev-libs/openssl:0=
+ )
+ )
+ gpgme? (
+ app-crypt/gpgme:=
+ dev-libs/libassuan
+ dev-libs/libgpg-error
+ )
+ http2? ( net-libs/nghttp2 )
+ idn? ( net-dns/libidn2:= )
+ lzip? ( app-arch/lzlib )
+ lzma? ( app-arch/xz-utils )
+ pcre? ( dev-libs/libpcre2 )
+ psl? ( net-libs/libpsl )
+ xattr? ( sys-apps/attr )
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen[dot] )
+"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-fix-build-issues-with-clang-16.patch
+)
+
+src_configure() {
+ local myeconfargs=(
+ --disable-static
+ --disable-valgrind-tests
+ --with-plugin-support
+ --with-ssl="$(usex ssl $(usex gnutls gnutls openssl) none)"
+ --without-libidn
+ --without-libmicrohttpd
+ $(use_enable doc)
+ $(use_enable xattr)
+ $(use_with brotli brotlidec)
+ $(use_with bzip2)
+ $(use_with gpgme)
+ $(use_with http2 libnghttp2)
+ $(use_with idn libidn2)
+ $(use_with lzip)
+ $(use_with lzma)
+ $(use_with pcre libpcre2)
+ $(use_with psl libpsl)
+ $(use_with zlib)
+
+ # Avoid calling ldconfig
+ LDCONFIG=:
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ if [[ ${PV} == *9999 ]] ; then
+ if use doc ; then
+ local mpage
+ for mpage in $(find docs/man -type f -regextype grep -regex ".*\.[[:digit:]]$") ; do
+ doman ${mpage}
+ done
+ fi
+ else
+ doman docs/man/man{1/*.1,3/*.3}
+ fi
+
+ find "${D}" -type f -name '*.la' -delete || die
+ rm "${ED}"/usr/bin/${PN}_noinstall || die
+}