Date: Wed, 25 Jan 2023 16:28:35 GMT From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: d966de5a7dd6 - main - devel/elfutils: Fix build with disabled NLS Message-ID: <202301251628.30PGSZBk059870@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=d966de5a7dd68918795218e7ee75da149fb17e06 commit d966de5a7dd68918795218e7ee75da149fb17e06 Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2023-01-25 16:09:41 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2023-01-25 16:25:04 +0000 devel/elfutils: Fix build with disabled NLS libintl.h is included unconditionally, but gettext include path is not added to CFLAGS when gettext is disabled, so the compilation fails: cc ... -I. -I.. -I. -I. -I../lib -I.. -I./../libelf ... -I/usr/local/share/gnulib/lib ... -o xasprintf.o xasprintf.c xasprintf.c:36:10: fatal error: 'libintl.h' file not found So always add LOCALBASE/include to CFLAGS for libintl.h to be available. Note that the order is important and it should appear before gnulib includes, otherwise wrong argp.h gets included. Approved by: portmgr blanket --- devel/elfutils/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devel/elfutils/Makefile b/devel/elfutils/Makefile index a06ff3ff739f..e810b0382271 100644 --- a/devel/elfutils/Makefile +++ b/devel/elfutils/Makefile @@ -22,7 +22,8 @@ BUILD_DEPENDS= gnulib>=0:devel/gnulib PLIST_SUB= VERSION=${PORTVERSION} -CFLAGS+= -I${LOCALBASE}/share/gnulib/lib +CFLAGS+= -I${LOCALBASE}/include \ + -I${LOCALBASE}/share/gnulib/lib LDFLAGS+= ${LOCALBASE}/lib/libargp.so \ ${LOCALBASE}/lib/libintl.so
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301251628.30PGSZBk059870>