Skip to content

Commit

Permalink
sysutils/nut-devel: Remove GCC requirement.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cschuber committed Aug 1, 2023
1 parent e387042 commit d8da18a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
3 changes: 1 addition & 2 deletions sysutils/nut-devel/Makefile
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions 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
])

0 comments on commit d8da18a

Please sign in to comment.