summaryrefslogtreecommitdiff
path: root/archivers/bzip2/buildlink2.mk
diff options
context:
space:
mode:
Diffstat (limited to 'archivers/bzip2/buildlink2.mk')
-rw-r--r--archivers/bzip2/buildlink2.mk15
1 files changed, 14 insertions, 1 deletions
diff --git a/archivers/bzip2/buildlink2.mk b/archivers/bzip2/buildlink2.mk
index 41ec56ed95e..91227163b9b 100644
--- a/archivers/bzip2/buildlink2.mk
+++ b/archivers/bzip2/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 21:49:00 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.3 2003/02/04 18:40:07 jlam Exp $
.if !defined(BZIP2_BUILDLINK2_MK)
BZIP2_BUILDLINK2_MK= # defined
@@ -42,14 +42,27 @@ _NEED_BZIP2= YES
BUILDLINK_PACKAGES+= bzip2
EVAL_PREFIX+= BUILDLINK_PREFIX.bzip2=bzip2
BUILDLINK_PREFIX.bzip2_DEFAULT= ${LOCALBASE}
+_BLNK_BZ2_LDFLAGS= -L${BUILDLINK_PREFIX.bzip2}/lib -lbz2
.else
BUILDLINK_PREFIX.bzip2= /usr
+_BLNK_BZ2_LDFLAGS= -lbz2
.endif
+LIBTOOL_ARCHIVE_UNTRANSFORM_SED+= \
+ -e "s|${BUILDLINK_PREFIX.bzip2}/lib/libbz2.la|${_BLNK_BZ2_LDFLAGS}|g" \
+ -e "s|${LOCALBASE}/lib/libbz2.la|${_BLNK_BZ2_LDFLAGS}|g"
+
BUILDLINK_FILES.bzip2= include/bzlib.h
BUILDLINK_FILES.bzip2+= lib/libbz2.*
BUILDLINK_TARGETS+= bzip2-buildlink
+BUILDLINK_TARGETS+= bzip2-libbz2-la
+
+bzip2-libbz2-la:
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ lafile="${BUILDLINK_DIR}/lib/libbz2.la"; \
+ libpattern="${BUILDLINK_PREFIX.bzip2}/lib/libbz2.*"; \
+ ${BUILDLINK_FAKE_LA}
bzip2-buildlink: _BUILDLINK_USE