summaryrefslogtreecommitdiff
path: root/devel/libinotify
diff options
context:
space:
mode:
Diffstat (limited to 'devel/libinotify')
-rw-r--r--devel/libinotify/Makefile7
-rw-r--r--devel/libinotify/files/extra-patch-libinotify.pc.in8
-rw-r--r--devel/libinotify/files/inotify.h2
3 files changed, 13 insertions, 4 deletions
diff --git a/devel/libinotify/Makefile b/devel/libinotify/Makefile
index 2e844386e02b..d748982036f5 100644
--- a/devel/libinotify/Makefile
+++ b/devel/libinotify/Makefile
@@ -19,11 +19,10 @@ INSTALL_TARGET= install-strip
USE_LDCONFIG= yes
.if exists(/usr/include/sys/inotify.h)
+EXTRA_PATCHES= ${PATCHDIR}/extra-patch-libinotify.pc.in
+
post-install:
- ${PRINTF} '#pragma GCC system_header\n#include_next <sys/inotify.h>\n' \
- > ${STAGEDIR}${PREFIX}/include/sys/inotify.h
- ${SED} -e '/Libs:/d' -e '/Cflags:/d' ${WRKSRC}/libinotify.pc \
- > ${STAGEDIR}${PREFIX}/libdata/pkgconfig/libinotify.pc
+ ${INSTALL_DATA} ${FILESDIR}/inotify.h ${STAGEDIR}${PREFIX}/include/sys/inotify.h
.endif
.include <bsd.port.mk>
diff --git a/devel/libinotify/files/extra-patch-libinotify.pc.in b/devel/libinotify/files/extra-patch-libinotify.pc.in
new file mode 100644
index 000000000000..eb58e5e51190
--- /dev/null
+++ b/devel/libinotify/files/extra-patch-libinotify.pc.in
@@ -0,0 +1,8 @@
+--- libinotify.pc.in.orig 2019-03-06 22:25:31 UTC
++++ libinotify.pc.in
+@@ -6,5 +6,3 @@ Version: @PACKAGE_VERSION@
+ Name: @PACKAGE_NAME@
+ Description: Kqueue based inotify shim library
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -linotify
+-Cflags: -I${includedir}
diff --git a/devel/libinotify/files/inotify.h b/devel/libinotify/files/inotify.h
new file mode 100644
index 000000000000..83b08bd27147
--- /dev/null
+++ b/devel/libinotify/files/inotify.h
@@ -0,0 +1,2 @@
+#pragma GCC system_header
+#include_next <sys/inotify.h>