Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Aug 2023 18:07:31 GMT
From:      Cy Schubert <cy@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: d8da18a69ca0 - main - sysutils/nut-devel: Remove GCC requirement.
Message-ID:  <202308011807.371I7VQZ013244@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d8da18a69ca0bc07e6566ee7bf92eb100ba7b08f

commit d8da18a69ca0bc07e6566ee7bf92eb100ba7b08f
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2023-08-01 14:56:33 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2023-08-01 18:06:52 +0000

    sysutils/nut-devel: Remove GCC requirement.
    
    Remove the GCC requirement by adding -lpthread and removing the
    nullification of CFLAGS and LDFLAGS in the M4 script that verifies
    we have a working libltdl.
---
 sysutils/nut-devel/Makefile                         |  3 +--
 .../nut-devel/files/patch-m4_nut__check_libltdl.m4  | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/sysutils/nut-devel/Makefile b/sysutils/nut-devel/Makefile
index f119ef8d95e4..fea20af2d89a 100644
--- a/sysutils/nut-devel/Makefile
+++ b/sysutils/nut-devel/Makefile
@@ -22,7 +22,6 @@ GH_TAGNAME=	2ced48d1b
 NUT_COMMIT_DATE=	2023.07.30
 
 MAKE_JOBS_UNSAFE=	yes
-USE_GCC=	yes
 GNU_CONFIGURE=	yes
 USES=		autoreconf:build compiler:c11 gmake libtool pkgconfig python
 USE_LDCONFIG=	yes
@@ -84,7 +83,7 @@ CONFIGURE_ARGS=	--sysconfdir=${PREFIX}/etc/nut \
 		--with-dev \
 		--with-ltdl --with-nut-scanner
 
-CFLAGS+=	-I${LOCALBASE}/include -L${LOCALBASE}/lib
+CFLAGS+=	-I${LOCALBASE}/include -L${LOCALBASE}/lib -lpthread
 LIB_DEPENDS+=	libltdl.so:devel/libltdl
 
 # XXX Remove this when copying this port to sysutils/nut. The GA version
diff --git a/sysutils/nut-devel/files/patch-m4_nut__check_libltdl.m4 b/sysutils/nut-devel/files/patch-m4_nut__check_libltdl.m4
new file mode 100644
index 000000000000..ae4a2710adf5
--- /dev/null
+++ b/sysutils/nut-devel/files/patch-m4_nut__check_libltdl.m4
@@ -0,0 +1,21 @@
+--- m4/nut_check_libltdl.m4.orig	2023-08-01 07:33:24.593954000 -0700
++++ m4/nut_check_libltdl.m4	2023-08-01 07:35:18.506094000 -0700
+@@ -10,10 +10,7 @@
+ 	dnl No NUT_CHECK_PKGCONFIG here: (lib)ltdl.pc was not seen on any OS
+ 
+ 	dnl save CFLAGS and LIBS
+-	CFLAGS_ORIG="${CFLAGS}"
+-	LIBS_ORIG="${LIBS}"
+ 	LIBS=""
+-	CFLAGS=""
+ 	dnl For fallback below:
+ 	myCFLAGS=""
+ 
+@@ -71,7 +68,5 @@
+ 	unset myCFLAGS
+ 
+ 	dnl restore original CFLAGS and LIBS
+-	CFLAGS="${CFLAGS_ORIG}"
+-	LIBS="${LIBS_ORIG}"
+ fi
+ ])



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308011807.371I7VQZ013244>