diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2023-01-25 16:09:41 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2023-01-25 16:25:04 +0000 |
commit | d966de5a7dd68918795218e7ee75da149fb17e06 (patch) | |
tree | 2d4bff6ef1e730b8905a4a84ded2d39e54dfd872 | |
parent | be34db4a020e41f3d7d2a4669d1440cbb2c80a8d (diff) | |
download | ports-d966de5a7dd68918795218e7ee75da149fb17e06.tar.gz ports-d966de5a7dd68918795218e7ee75da149fb17e06.zip |
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
-rw-r--r-- | devel/elfutils/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
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 |