summaryrefslogtreecommitdiffstats
path: root/lib/liblzma
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-01-10 00:11:10 +0000
committerbapt <bapt@FreeBSD.org>2015-01-10 00:11:10 +0000
commitcc3e2f37122061a6dd34d6b165f2877d554f593b (patch)
tree1a67f9849f7ce2e6bf6d269a6061fdeea06e0700 /lib/liblzma
parentb8cd639303f87f52c2e9d1309a64fdb456a0c405 (diff)
parent65c6ce7f7d9cc183f3196d163fd1c0208f5bf13e (diff)
downloadFreeBSD-src-cc3e2f37122061a6dd34d6b165f2877d554f593b.zip
FreeBSD-src-cc3e2f37122061a6dd34d6b165f2877d554f593b.tar.gz
Install the liblzma pkg-config file
MFC after: 1 week
Diffstat (limited to 'lib/liblzma')
-rw-r--r--lib/liblzma/Makefile28
1 files changed, 27 insertions, 1 deletions
diff --git a/lib/liblzma/Makefile b/lib/liblzma/Makefile
index 8d614cf..b2c22c8 100644
--- a/lib/liblzma/Makefile
+++ b/lib/liblzma/Makefile
@@ -117,7 +117,16 @@ SRCS+= simple_coder.c \
arm.c \
armthumb.c \
sparc.c
-
+
+.PATH: ${LZMADIR}
+
+VERSION_MAJOR!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MAJOR" {print $$3 } ' \
+ ${LZMADIR}/api/lzma/version.h
+VERSION_MINOR!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MINOR" {print $$3 } ' \
+ ${LZMADIR}/api/lzma/version.h
+VERSION_PATCH!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_PATCH" {print $$3 } ' \
+ ${LZMADIR}/api/lzma/version.h
+
WARNS?= 3
CFLAGS+= -DHAVE_CONFIG_H \
@@ -137,4 +146,21 @@ VERSION_DEF= ${.CURDIR}/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
CFLAGS+= -DSYMBOL_VERSIONING
+CLEANFILES+= liblzma.pc
+
+all: liblzma.pc
+liblzma.pc: liblzma.pc.in
+ @sed -e 's,@prefix@,/usr,g ; \
+ s,@exec_prefix@,/usr,g ; \
+ s,@libdir@,${LIBDIR},g ; \
+ s,@includedir@,${INCLUDEDIR},g ; \
+ s,@PACKAGE_URL@,http://tukaani.org/xz/,g ; \
+ s,@PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \
+ s,@PTHREAD_CFLAGS@,,g ; \
+ s,@PTHREAD_LIBS@,,g' ${.ALLSRC} > ${.TARGET}
+
+beforeinstall:
+ @${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ liblzma.pc ${DESTDIR}${LIBDATADIR}/pkgconfig
+
.include <bsd.lib.mk>
OpenPOWER on IntegriCloud