summaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2018-04-29 21:18:16 +0000
committerryoon <ryoon@pkgsrc.org>2018-04-29 21:18:16 +0000
commit89d409ccbe801c117b3858e0b6c516bd83abdc9a (patch)
tree0407e33782c189e13f35d97fb7e086ce4b12f446 /archivers
parent30a1d3396fa6524366a9ba789b14d589619135ee (diff)
downloadpkgsrc-89d409ccbe801c117b3858e0b6c516bd83abdc9a.tar.gz
Provide liblzma.pc for builtin case
This is required by upcoming gimp-2.10.0.
Diffstat (limited to 'archivers')
-rw-r--r--archivers/xz/builtin.mk34
1 files changed, 33 insertions, 1 deletions
diff --git a/archivers/xz/builtin.mk b/archivers/xz/builtin.mk
index 1e544bae42a..ddcdf6b533e 100644
--- a/archivers/xz/builtin.mk
+++ b/archivers/xz/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.4 2014/05/22 12:10:52 obache Exp $
+# $NetBSD: builtin.mk,v 1.5 2018/04/29 21:18:16 ryoon Exp $
BUILTIN_PKG:= xz
@@ -98,4 +98,36 @@ CHECK_BUILTIN.xz?= no
BUILDLINK_FILES.xz+= lib/pkgconfig/xz.pc
. endif
+# Fake pkg-config for builtin xz on NetBSD
+
+.if !empty(USE_BUILTIN.xz:M[yY][eE][sS])
+. if !empty(USE_TOOLS:C/:.*//:Mpkg-config)
+do-configure-pre-hook: override-liblzma-pkgconfig
+
+BLKDIR_PKGCFG= ${BUILDLINK_DIR}/lib/pkgconfig
+LIBLZMA_PKGCFGF= liblzma.pc
+
+override-liblzma-pkgconfig: override-message-liblzma-pkgconfig
+override-message-liblzma-pkgconfig:
+ @${STEP_MSG} "Generating pkg-config files for builtin xz package."
+
+override-liblzma-pkgconfig:
+ ${RUN} \
+ ${MKDIR} ${BLKDIR_PKGCFG}; \
+ { \
+ ${ECHO} "prefix=${LIBLZMA_PREFIX}"; \
+ ${ECHO} "exec_prefix=\$${prefix}"; \
+ ${ECHO} "libdir=\$${exec_prefix}/lib"; \
+ ${ECHO} "includedir=\$${prefix}/include"; \
+ ${ECHO} ""; \
+ ${ECHO} "Name: liblzma"; \
+ ${ECHO} "Description: Generic purpose data compression library"; \
+ ${ECHO} "Version: ${BUILTIN_VERSION.xz}"; \
+ ${ECHO} "Libs: ${COMPILER_RPATH_FLAG}\$${libdir} -L\$${libdir} -llzma"; \
+ ${ECHO} "Libs.private: -pthread"; \
+ ${ECHO} "Cflags: -I\$${includedir}"; \
+ } >> ${BLKDIR_PKGCFG}/${LIBLZMA_PKGCFGF};
+. endif
+.endif
+
.endif # CHECK_BUILTIN.xz