From 68d89f2518a03163a11de4ab77db2c4383bf7dc7 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Tue, 10 Aug 2021 22:56:36 +0000 Subject: [PATCH] (incomplete) devel/libsysinfo: prefix headers under non-default prefix Avoid unintentional usage, picking up Linux code paths where FreeBSD support already exists. TODO: !!! unbreak other consumers, remove this line and drop (incomplete) tag !!! PR: 242236 Approved by: imp (maintainer) --- benchmarks/libcelero/Makefile | 3 ++- devel/libsysinfo/Makefile | 9 +++++++-- devel/libsysinfo/files/libsysinfo.pc.in | 2 +- sysutils/procenv/Makefile | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/benchmarks/libcelero/Makefile b/benchmarks/libcelero/Makefile index 19a7bd5e2d64..d58c0cc180c5 100644 --- a/benchmarks/libcelero/Makefile +++ b/benchmarks/libcelero/Makefile @@ -9,7 +9,7 @@ COMMENT= C++ benchmark authoring library/framework LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/license.txt -BUILD_DEPENDS= ${LOCALBASE}/include/sys/sysinfo.h:devel/libsysinfo +BUILD_DEPENDS= ${LOCALBASE}/include/libsysinfo/sys/sysinfo.h:devel/libsysinfo LIB_DEPENDS= libsysinfo.so:devel/libsysinfo TEST_DEPENDS= googletest>0:devel/googletest @@ -20,6 +20,7 @@ USE_GITHUB= yes GH_ACCOUNT= DigitalInBlue GH_PROJECT= Celero +CFLAGS+= -isystem${LOCALBASE}/include/libsysinfo LDFLAGS+= -lsysinfo .include diff --git a/devel/libsysinfo/Makefile b/devel/libsysinfo/Makefile index 48ae73860adf..e8c5afaea20c 100644 --- a/devel/libsysinfo/Makefile +++ b/devel/libsysinfo/Makefile @@ -1,7 +1,7 @@ PORTNAME= libsysinfo PORTVERSION= 0.0.3 DISTVERSIONPREFIX= v -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MAINTAINER= imp@bsdimp.com @@ -16,9 +16,11 @@ GH_ACCOUNT= bsdimp USE_LDCONFIG= yes +MAKE_ARGS= INCLUDEDIR="${STAGEDIR}${INCLUDEDIR}" LDFLAGS+= -lkvm -PLIST_FILES= include/sys/sysinfo.h \ +INCLUDEDIR= ${PREFIX}/${PLIST_FILES:Minclude*:H} +PLIST_FILES= include/libsysinfo/sys/sysinfo.h \ lib/libsysinfo.a \ lib/libsysinfo.so \ lib/libsysinfo.so.0 \ @@ -28,6 +30,9 @@ PLIST_FILES= include/sys/sysinfo.h \ SUB_FILES= libsysinfo.pc SUB_LIST= PREFIX="${PREFIX}" PORTVERSION="${PORTVERSION}" COMMENT="${COMMENT}" +pre-install: + ${MKDIR} ${STAGEDIR}${INCLUDEDIR} + post-install: ${INSTALL_DATA} ${WRKDIR}/libsysinfo.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/ diff --git a/devel/libsysinfo/files/libsysinfo.pc.in b/devel/libsysinfo/files/libsysinfo.pc.in index 9b8803dc9b6d..028069a8cfa4 100644 --- a/devel/libsysinfo/files/libsysinfo.pc.in +++ b/devel/libsysinfo/files/libsysinfo.pc.in @@ -1,7 +1,7 @@ prefix=%%PREFIX%% exec_prefix=${prefix} libdir=${exec_prefix}/lib -includedir=${prefix}/include +includedir=${prefix}/include/libsysinfo Name: libsysinfo Description: %%COMMENT%% diff --git a/sysutils/procenv/Makefile b/sysutils/procenv/Makefile index 57cb07938978..02633095a3da 100644 --- a/sysutils/procenv/Makefile +++ b/sysutils/procenv/Makefile @@ -20,6 +20,7 @@ GH_ACCOUNT= jamesodhunt USE_PERL5= build GNU_CONFIGURE= yes +CPPFLAGS+= -isystem${LOCALBASE}/include/libsysinfo TEST_TARGET= check PLIST_FILES= bin/procenv \