summaryrefslogtreecommitdiff
path: root/Mk/Uses/meson.mk
diff options
context:
space:
mode:
authorKoop Mast <kwm@FreeBSD.org>2017-05-13 08:37:29 +0000
committerKoop Mast <kwm@FreeBSD.org>2017-05-13 08:37:29 +0000
commit9088dc0801a78668f3af12f8e54633bf9b438309 (patch)
tree9f995c7013c4a710da8045aa6339f186ce50a0e0 /Mk/Uses/meson.mk
parent- Mark BROKEN (diff)
Move the meson generated pkg-config files to libdata/pkg-config, this
makes ports build by meson respect the current policy regarding pkg-config files. I picked this solution over hacking meson itself, and potential breaking more. Bump graphics/graphene due to this change. Obtained from: Code copied from ports/218067 by mat@
Notes
Notes: svn path=/head/; revision=440761
Diffstat (limited to 'Mk/Uses/meson.mk')
-rw-r--r--Mk/Uses/meson.mk14
1 files changed, 14 insertions, 0 deletions
diff --git a/Mk/Uses/meson.mk b/Mk/Uses/meson.mk
index b3d4e0aca837..94245bd19e39 100644
--- a/Mk/Uses/meson.mk
+++ b/Mk/Uses/meson.mk
@@ -65,4 +65,18 @@ MESON_BUILD_DIR?= _build
# Add meson build dir at the end.
CONFIGURE_ARGS+= ${MESON_BUILD_DIR}
+# Add this workaround copied from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218067
+# to make sure meson installs the pkg-config in the current correct place
+.if !target(fixup-lib-pkgconfig)
+_USES_install+= 601:fixup-lib-pkgconfig
+fixup-lib-pkgconfig:
+ @if [ -d ${STAGEDIR}${PREFIX}/lib/pkgconfig ]; then \
+ if [ -z "$$(${FIND} ${STAGEDIR}${PREFIX}/lib/pkgconfig -maxdepth 0 -empty)" ]; then \
+ ${MKDIR} ${STAGEDIR}${PREFIX}/libdata/pkgconfig; \
+ ${MV} ${STAGEDIR}${PREFIX}/lib/pkgconfig/* ${STAGEDIR}${PREFIX}/libdata/pkgconfig; \
+ fi; \
+ ${RMDIR} ${STAGEDIR}${PREFIX}/lib/pkgconfig; \
+ fi
+.endif
+
.endif #!defined(_INCLUDE_USES_MESON_MK)