summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-02-11 03:49:23 +0000
committerSam James <sam@gentoo.org>2023-02-11 04:18:57 +0000
commit9758efbe00df43b3e94721bbc12325ccd97ad15b (patch)
tree31f2e2a7686c5b54461fd2dd4ec154fc21ce99e6 /net-proxy
parentnet-libs/gnutls: add 3.7.9 (diff)
downloadgentoo-9758efbe00df43b3e94721bbc12325ccd97ad15b.tar.gz
gentoo-9758efbe00df43b3e94721bbc12325ccd97ad15b.tar.bz2
gentoo-9758efbe00df43b3e94721bbc12325ccd97ad15b.zip
net-proxy/cntlm: fix configure w/ clang 16
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-proxy')
-rw-r--r--net-proxy/cntlm/cntlm-0.93_beta5-r4.ebuild (renamed from net-proxy/cntlm/cntlm-0.93_beta5-r3.ebuild)12
-rw-r--r--net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch8
-rw-r--r--net-proxy/cntlm/files/cntlm-0.93_beta5-configure-clang16.patch31
3 files changed, 41 insertions, 10 deletions
diff --git a/net-proxy/cntlm/cntlm-0.93_beta5-r3.ebuild b/net-proxy/cntlm/cntlm-0.93_beta5-r4.ebuild
index 4c6879ddacc1..91df0610c922 100644
--- a/net-proxy/cntlm/cntlm-0.93_beta5-r3.ebuild
+++ b/net-proxy/cntlm/cntlm-0.93_beta5-r4.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit systemd toolchain-funcs
@@ -19,10 +19,10 @@ RDEPEND="
acct-user/cntlm
"
-src_prepare() {
- default
- eapply -p0 "${FILESDIR}"/${P}-buildsystem.patch # 334647
-}
+PATCHES=(
+ "${FILESDIR}"/${P}-buildsystem.patch # bug #334647
+ "${FILESDIR}"/${P}-configure-clang16.patch
+)
src_configure() {
tc-export CC
diff --git a/net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch b/net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch
index d553e8661484..d6df267582d4 100644
--- a/net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch
+++ b/net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch
@@ -1,8 +1,8 @@
Gentoo Bug#334647:
Respect CC, CFLAGS, LDFLAGS (with gcc).
Support verbose building via 'make V=1'.
---- configure.orig 2012-10-02 14:01:48.735669564 +0200
-+++ configure 2012-10-02 14:23:01.224271511 +0200
+--- a/configure.orig
++++ b/configure
@@ -10,7 +10,7 @@
# This can be disabled if neccessary.
#
@@ -57,8 +57,8 @@ Support verbose building via 'make V=1'.
rc=$?
if [ $rc -ne 0 ]; then # -o -n "$OUT" ]; then
---- Makefile.orig 2012-10-02 15:31:03.986270993 +0200
-+++ Makefile 2012-10-02 15:40:10.277689068 +0200
+--- a/Makefile.orig
++++ b/Makefile
@@ -16,14 +16,13 @@
CC := gcc
VER := $(shell cat VERSION)
diff --git a/net-proxy/cntlm/files/cntlm-0.93_beta5-configure-clang16.patch b/net-proxy/cntlm/files/cntlm-0.93_beta5-configure-clang16.patch
new file mode 100644
index 000000000000..3cfde3cbbd5a
--- /dev/null
+++ b/net-proxy/cntlm/files/cntlm-0.93_beta5-configure-clang16.patch
@@ -0,0 +1,31 @@
+Based on https://sourceforge.net/p/cntlm/bugs/79/ but rebased on our cntlm-0.93_beta5-buildsystem.patch.
+--- a/Makefile
++++ b/Makefile
+@@ -20,7 +20,7 @@ LIBS := $(shell [ $(OS) = "SunOS" ] && echo "-lrt -lsocket -lnsl")
+ LDFLAGS := -pthread
+ CYGWIN_REQS := cygwin1.dll cyggcc_s-1.dll cygstdc++-6.dll cygrunsrv.exe
+
+-CFLAGS=-D__BSD_VISIBLE -D_ALL_SOURCE -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_ISOC99_SOURCE -D_REENTRANT -D_BSD_SOURCE -DVERSION=\"'$(VER)'\"
++CFLAGS=-D__BSD_VISIBLE -D_ALL_SOURCE -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_ISOC99_SOURCE -D_REENTRANT -D_BSD_SOURCE -D_DEFAULT_SOURCE -DVERSION=\"'$(VER)'\"
+ ifeq ($(DEBUG),1)
+ CFLAGS += -g -O0
+ endif
+--- a/config/gethostname.c
++++ b/config/gethostname.c
+@@ -1,3 +1,5 @@
++#include <stdio.h>
++#include <string.h>
+ #include <unistd.h>
+
+ int main(int argc, char **argv) {
+--- a/configure
++++ b/configure
+@@ -67,7 +67,7 @@ rm -f $CONFIG
+ for i in $TESTS; do
+ printf "Checking $i... "
+ printf "#define config_$i " >> $CONFIG
+- OUT=`$CC $CFLAGS $LDFLAGS -D_POSIX_C_SOURCE=199506L -D_ISOC99_SOURCE -D_REENTRANT -o config/$i config/$i.c 2>&1`
++ OUT=`$CC $CFLAGS $LDFLAGS -D_POSIX_C_SOURCE=199506L -D_ISOC99_SOURCE -D_DEFAULT_SOURCE -D_REENTRANT -o config/$i config/$i.c 2>&1`
+ rc=$?
+
+ if [ $rc -ne 0 ]; then # -o -n "$OUT" ]; then