summaryrefslogtreecommitdiff
path: root/converters
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2009-03-20 19:23:50 +0000
committerjoerg <joerg@pkgsrc.org>2009-03-20 19:23:50 +0000
commit2d1ba244e90207d03eef397a99aa4091baeec5b3 (patch)
tree647e974495c5d41703d41ca2e71c9b6063b9153a /converters
parent4bf0a20854ae9e07b7965977a713f2efee890976 (diff)
downloadpkgsrc-2d1ba244e90207d03eef397a99aa4091baeec5b3.tar.gz
Simply and speed up buildlink3.mk files and processing.
This changes the buildlink3.mk files to use an include guard for the recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS, BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of enter/exit marker, which can be used to reconstruct the tree and to determine first level includes. Avoiding := for large variables (BUILDLINK_ORDER) speeds up parse time as += has linear complexity. The include guard reduces system time by avoiding reading files over and over again. For complex packages this reduces both %user and %sys time to half of the former time.
Diffstat (limited to 'converters')
-rw-r--r--converters/TECkit/buildlink3.mk19
-rw-r--r--converters/fribidi/buildlink3.mk19
-rw-r--r--converters/libiconv/buildlink3.mk19
-rw-r--r--converters/libwpd/buildlink3.mk19
-rw-r--r--converters/psiconv/buildlink3.mk19
-rw-r--r--converters/qrencode/buildlink3.mk19
-rw-r--r--converters/recode/buildlink3.mk19
-rw-r--r--converters/uulib/buildlink3.mk19
-rw-r--r--converters/wv/buildlink3.mk19
-rw-r--r--converters/wv2/buildlink3.mk19
10 files changed, 60 insertions, 130 deletions
diff --git a/converters/TECkit/buildlink3.mk b/converters/TECkit/buildlink3.mk
index c1ff7b4841f..3fe984738cb 100644
--- a/converters/TECkit/buildlink3.mk
+++ b/converters/TECkit/buildlink3.mk
@@ -1,21 +1,14 @@
-# $NetBSD: buildlink3.mk,v 1.1.1.1 2008/11/24 02:09:31 minskim Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2009/03/20 19:24:03 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-TECKIT_BUILDLINK3_MK:= ${TECKIT_BUILDLINK3_MK}+
+BUILDLINK_TREE+= TECkit
-.if ${BUILDLINK_DEPTH} == "+"
-BUILDLINK_DEPENDS+= TECkit
-.endif
+.if !defined(TECKIT_BUILDLINK3_MK)
+TECKIT_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:NTECkit}
-BUILDLINK_PACKAGES+= TECkit
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}TECkit
-
-.if ${TECKIT_BUILDLINK3_MK} == "+"
BUILDLINK_API_DEPENDS.TECkit+= TECkit>=2.5.1
BUILDLINK_PKGSRCDIR.TECkit?= ../../converters/TECkit
-.endif # TECKIT_BUILDLINK3_MK
.include "../../devel/zlib/buildlink3.mk"
+.endif # TECKIT_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -TECkit
diff --git a/converters/fribidi/buildlink3.mk b/converters/fribidi/buildlink3.mk
index 373c1878f0f..ee5bf90d524 100644
--- a/converters/fribidi/buildlink3.mk
+++ b/converters/fribidi/buildlink3.mk
@@ -1,20 +1,13 @@
-# $NetBSD: buildlink3.mk,v 1.7 2006/07/08 23:10:39 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.8 2009/03/20 19:24:03 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-FRIBIDI_BUILDLINK3_MK:= ${FRIBIDI_BUILDLINK3_MK}+
+BUILDLINK_TREE+= fribidi
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= fribidi
-.endif
+.if !defined(FRIBIDI_BUILDLINK3_MK)
+FRIBIDI_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nfribidi}
-BUILDLINK_PACKAGES+= fribidi
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}fribidi
-
-.if !empty(FRIBIDI_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.fribidi+= fribidi>=0.10.4
BUILDLINK_ABI_DEPENDS.fribidi+= fribidi>=0.10.4nb1
BUILDLINK_PKGSRCDIR.fribidi?= ../../converters/fribidi
-.endif # FRIBIDI_BUILDLINK3_MK
+.endif # FRIBIDI_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -fribidi
diff --git a/converters/libiconv/buildlink3.mk b/converters/libiconv/buildlink3.mk
index b3143523d93..bd61139690a 100644
--- a/converters/libiconv/buildlink3.mk
+++ b/converters/libiconv/buildlink3.mk
@@ -1,22 +1,15 @@
-# $NetBSD: buildlink3.mk,v 1.25 2008/02/27 22:10:34 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.26 2009/03/20 19:24:03 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-ICONV_BUILDLINK3_MK:= ${ICONV_BUILDLINK3_MK}+
+BUILDLINK_TREE+= iconv
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= iconv
-.endif
+.if !defined(ICONV_BUILDLINK3_MK)
+ICONV_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Niconv}
-BUILDLINK_PACKAGES+= iconv
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}iconv
-
-.if !empty(ICONV_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.iconv+= libiconv>=1.9.1
BUILDLINK_ABI_DEPENDS.iconv+= libiconv>=1.9.1nb4
BUILDLINK_PKGSRCDIR.iconv?= ../../converters/libiconv
BUILDLINK_LIBNAME.iconv= iconv
BUILDLINK_LDADD.iconv= ${BUILDLINK_LIBNAME.iconv:S/^/-l/:S/^-l$//}
-.endif # ICONV_BUILDLINK3_MK
+.endif # ICONV_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -iconv
diff --git a/converters/libwpd/buildlink3.mk b/converters/libwpd/buildlink3.mk
index 1e6e1f3e619..833caeb6f5a 100644
--- a/converters/libwpd/buildlink3.mk
+++ b/converters/libwpd/buildlink3.mk
@@ -1,22 +1,15 @@
-# $NetBSD: buildlink3.mk,v 1.12 2008/03/06 14:53:48 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.13 2009/03/20 19:24:03 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-LIBWPD_BUILDLINK3_MK:= ${LIBWPD_BUILDLINK3_MK}+
+BUILDLINK_TREE+= libwpd
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= libwpd
-.endif
+.if !defined(LIBWPD_BUILDLINK3_MK)
+LIBWPD_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlibwpd}
-BUILDLINK_PACKAGES+= libwpd
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}libwpd
-
-.if !empty(LIBWPD_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.libwpd+= libwpd>=0.8.1nb1
BUILDLINK_ABI_DEPENDS.libwpd?= libwpd>=0.8.9nb4
BUILDLINK_PKGSRCDIR.libwpd?= ../../converters/libwpd
-.endif # LIBWPD_BUILDLINK3_MK
.include "../../devel/libgsf/buildlink3.mk"
+.endif # LIBWPD_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -libwpd
diff --git a/converters/psiconv/buildlink3.mk b/converters/psiconv/buildlink3.mk
index 4a23f5c8150..2c7d7ee47fe 100644
--- a/converters/psiconv/buildlink3.mk
+++ b/converters/psiconv/buildlink3.mk
@@ -1,20 +1,13 @@
-# $NetBSD: buildlink3.mk,v 1.8 2006/07/08 23:10:39 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.9 2009/03/20 19:24:03 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-PSICONV_BUILDLINK3_MK:= ${PSICONV_BUILDLINK3_MK}+
+BUILDLINK_TREE+= psiconv
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= psiconv
-.endif
+.if !defined(PSICONV_BUILDLINK3_MK)
+PSICONV_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Npsiconv}
-BUILDLINK_PACKAGES+= psiconv
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}psiconv
-
-.if !empty(PSICONV_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.psiconv+= psiconv>=0.8.3nb1
BUILDLINK_ABI_DEPENDS.psiconv+= psiconv>=0.9.6nb1
BUILDLINK_PKGSRCDIR.psiconv?= ../../converters/psiconv
-.endif # PSICONV_BUILDLINK3_MK
+.endif # PSICONV_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -psiconv
diff --git a/converters/qrencode/buildlink3.mk b/converters/qrencode/buildlink3.mk
index 771707e8f20..09bfe2560b5 100644
--- a/converters/qrencode/buildlink3.mk
+++ b/converters/qrencode/buildlink3.mk
@@ -1,19 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.1 2008/06/15 10:33:38 gavan Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2009/03/20 19:24:04 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-QRENCODE_BUILDLINK3_MK:= ${QRENCODE_BUILDLINK3_MK}+
+BUILDLINK_TREE+= qrencode
-.if ${BUILDLINK_DEPTH} == "+"
-BUILDLINK_DEPENDS+= qrencode
-.endif
+.if !defined(QRENCODE_BUILDLINK3_MK)
+QRENCODE_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nqrencode}
-BUILDLINK_PACKAGES+= qrencode
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}qrencode
-
-.if ${QRENCODE_BUILDLINK3_MK} == "+"
BUILDLINK_API_DEPENDS.qrencode+= qrencode>=3.0.3
BUILDLINK_PKGSRCDIR.qrencode?= ../../converters/qrencode
-.endif # QRENCODE_BUILDLINK3_MK
+.endif # QRENCODE_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -qrencode
diff --git a/converters/recode/buildlink3.mk b/converters/recode/buildlink3.mk
index 51e423bf20b..3d40a2ed3d0 100644
--- a/converters/recode/buildlink3.mk
+++ b/converters/recode/buildlink3.mk
@@ -1,22 +1,15 @@
-# $NetBSD: buildlink3.mk,v 1.7 2006/07/08 23:10:39 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.8 2009/03/20 19:24:04 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-RECODE_BUILDLINK3_MK:= ${RECODE_BUILDLINK3_MK}+
+BUILDLINK_TREE+= recode
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= recode
-.endif
+.if !defined(RECODE_BUILDLINK3_MK)
+RECODE_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nrecode}
-BUILDLINK_PACKAGES+= recode
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}recode
-
-.if !empty(RECODE_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.recode+= recode>=3.6nb1
BUILDLINK_ABI_DEPENDS.recode+= recode>=3.6nb3
BUILDLINK_PKGSRCDIR.recode?= ../../converters/recode
-.endif # RECODE_BUILDLINK3_MK
.include "../../devel/gettext-lib/buildlink3.mk"
+.endif # RECODE_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -recode
diff --git a/converters/uulib/buildlink3.mk b/converters/uulib/buildlink3.mk
index 49140a2f598..e4b0e788d40 100644
--- a/converters/uulib/buildlink3.mk
+++ b/converters/uulib/buildlink3.mk
@@ -1,20 +1,13 @@
-# $NetBSD: buildlink3.mk,v 1.6 2006/07/08 23:10:39 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.7 2009/03/20 19:24:04 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-UULIB_BUILDLINK3_MK:= ${UULIB_BUILDLINK3_MK}+
+BUILDLINK_TREE+= uulib
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= uulib
-.endif
+.if !defined(UULIB_BUILDLINK3_MK)
+UULIB_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nuulib}
-BUILDLINK_PACKAGES+= uulib
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}uulib
-
-.if !empty(UULIB_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.uulib+= uulib>=0.5.20
BUILDLINK_ABI_DEPENDS.uulib+= uulib>=0.5.20nb2
BUILDLINK_PKGSRCDIR.uulib?= ../../converters/uulib
-.endif # UULIB_BUILDLINK3_MK
+.endif # UULIB_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -uulib
diff --git a/converters/wv/buildlink3.mk b/converters/wv/buildlink3.mk
index 827f20142cf..fcbb126911f 100644
--- a/converters/wv/buildlink3.mk
+++ b/converters/wv/buildlink3.mk
@@ -1,26 +1,19 @@
-# $NetBSD: buildlink3.mk,v 1.17 2008/03/06 14:53:48 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.18 2009/03/20 19:24:04 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-WV_BUILDLINK3_MK:= ${WV_BUILDLINK3_MK}+
+BUILDLINK_TREE+= wv
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= wv
-.endif
+.if !defined(WV_BUILDLINK3_MK)
+WV_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nwv}
-BUILDLINK_PACKAGES+= wv
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}wv
-
-.if !empty(WV_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.wv+= wv>=1.0.0
BUILDLINK_ABI_DEPENDS.wv+= wv>=1.2.4nb4
BUILDLINK_PKGSRCDIR.wv?= ../../converters/wv
-.endif # WV_BUILDLINK3_MK
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/libgsf/buildlink3.mk"
.include "../../graphics/libwmf/buildlink3.mk"
+.endif # WV_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -wv
diff --git a/converters/wv2/buildlink3.mk b/converters/wv2/buildlink3.mk
index 170e3d92d05..97c5f57133c 100644
--- a/converters/wv2/buildlink3.mk
+++ b/converters/wv2/buildlink3.mk
@@ -1,23 +1,16 @@
-# $NetBSD: buildlink3.mk,v 1.13 2008/03/06 14:53:48 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.14 2009/03/20 19:24:04 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-WV2_BUILDLINK3_MK:= ${WV2_BUILDLINK3_MK}+
+BUILDLINK_TREE+= wv2
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= wv2
-.endif
+.if !defined(WV2_BUILDLINK3_MK)
+WV2_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nwv2}
-BUILDLINK_PACKAGES+= wv2
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}wv2
-
-.if !empty(WV2_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.wv2?= wv2>=0.2.2nb1
BUILDLINK_ABI_DEPENDS.wv2?= wv2>=0.2.3nb5
BUILDLINK_PKGSRCDIR.wv2?= ../../converters/wv2
-.endif # WV2_BUILDLINK3_MK
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/libgsf/buildlink3.mk"
+.endif # WV2_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -wv2