summaryrefslogtreecommitdiff
path: root/geography
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
commit022c4606fcc3bd0780b781561db11a457e1b2757 (patch)
tree647e974495c5d41703d41ca2e71c9b6063b9153a /geography
parentdf774e13d463dae87662491d7021d1153d110ece (diff)
downloadpkgsrc-022c4606fcc3bd0780b781561db11a457e1b2757.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 'geography')
-rw-r--r--geography/gdal-lib/buildlink3.mk19
-rw-r--r--geography/geos/buildlink3.mk19
-rw-r--r--geography/gpsd/buildlink3.mk19
-rw-r--r--geography/shapelib/buildlink3.mk19
4 files changed, 24 insertions, 52 deletions
diff --git a/geography/gdal-lib/buildlink3.mk b/geography/gdal-lib/buildlink3.mk
index 8979ec0e79e..0a170566c51 100644
--- a/geography/gdal-lib/buildlink3.mk
+++ b/geography/gdal-lib/buildlink3.mk
@@ -1,21 +1,13 @@
-# $NetBSD: buildlink3.mk,v 1.9 2008/02/16 01:29:00 gdt Exp $
+# $NetBSD: buildlink3.mk,v 1.10 2009/03/20 19:24:35 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-GDAL_LIB_BUILDLINK3_MK:= ${GDAL_LIB_BUILDLINK3_MK}+
+BUILDLINK_TREE+= gdal-lib
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= gdal-lib
-.endif
-
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ngdal-lib}
-BUILDLINK_PACKAGES+= gdal-lib
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}gdal-lib
+.if !defined(GDAL_LIB_BUILDLINK3_MK)
+GDAL_LIB_BUILDLINK3_MK:=
-.if !empty(GDAL_LIB_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.gdal-lib+= gdal-lib>=1.3.1
BUILDLINK_ABI_DEPENDS.gdal-lib?= gdal-lib>=1.4.0nb4
BUILDLINK_PKGSRCDIR.gdal-lib?= ../../geography/gdal-lib
-.endif # GDAL_LIB_BUILDLINK3_MK
pkgbase := gdal-lib
.include "../../mk/pkg-build-options.mk"
@@ -32,5 +24,6 @@ pkgbase := gdal-lib
.include "../../geography/geos/buildlink3.mk"
.include "../../textproc/xerces-c/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
+.endif # GDAL_LIB_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -gdal-lib
diff --git a/geography/geos/buildlink3.mk b/geography/geos/buildlink3.mk
index 440546f2715..2a6e7f093bc 100644
--- a/geography/geos/buildlink3.mk
+++ b/geography/geos/buildlink3.mk
@@ -1,20 +1,13 @@
-# $NetBSD: buildlink3.mk,v 1.7 2008/02/16 01:29:00 gdt Exp $
+# $NetBSD: buildlink3.mk,v 1.8 2009/03/20 19:24:35 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-GEOS_BUILDLINK3_MK:= ${GEOS_BUILDLINK3_MK}+
+BUILDLINK_TREE+= geos
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= geos
-.endif
+.if !defined(GEOS_BUILDLINK3_MK)
+GEOS_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ngeos}
-BUILDLINK_PACKAGES+= geos
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}geos
-
-.if !empty(GEOS_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.geos+= geos>=2.2.3
BUILDLINK_ABI_DEPENDS.geos?= geos>=3.0.0
BUILDLINK_PKGSRCDIR.geos?= ../../geography/geos
-.endif # GEOS_BUILDLINK3_MK
+.endif # GEOS_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -geos
diff --git a/geography/gpsd/buildlink3.mk b/geography/gpsd/buildlink3.mk
index bc63dc409b7..32779b69654 100644
--- a/geography/gpsd/buildlink3.mk
+++ b/geography/gpsd/buildlink3.mk
@@ -1,19 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.1 2009/03/10 23:12:29 gdt Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2009/03/20 19:24:35 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-GPSD_BUILDLINK3_MK:= ${GPSD_BUILDLINK3_MK}+
+BUILDLINK_TREE+= gpsd
-.if ${BUILDLINK_DEPTH} == "+"
-BUILDLINK_DEPENDS+= gpsd
-.endif
+.if !defined(GPSD_BUILDLINK3_MK)
+GPSD_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ngpsd}
-BUILDLINK_PACKAGES+= gpsd
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}gpsd
-
-.if ${GPSD_BUILDLINK3_MK} == "+"
BUILDLINK_API_DEPENDS.gpsd+= gpsd>=2.37nb1
BUILDLINK_PKGSRCDIR.gpsd?= ../../geography/gpsd
-.endif # GPSD_BUILDLINK3_MK
+.endif # GPSD_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -gpsd
diff --git a/geography/shapelib/buildlink3.mk b/geography/shapelib/buildlink3.mk
index b5b15d4af53..33c641f5ec8 100644
--- a/geography/shapelib/buildlink3.mk
+++ b/geography/shapelib/buildlink3.mk
@@ -1,19 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.5 2006/07/08 23:10:50 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.6 2009/03/20 19:24:35 joerg Exp $
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-SHAPELIB_BUILDLINK3_MK:= ${SHAPELIB_BUILDLINK3_MK}+
+BUILDLINK_TREE+= shapelib
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= shapelib
-.endif
+.if !defined(SHAPELIB_BUILDLINK3_MK)
+SHAPELIB_BUILDLINK3_MK:=
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nshapelib}
-BUILDLINK_PACKAGES+= shapelib
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}shapelib
-
-.if !empty(SHAPELIB_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.shapelib+= shapelib>=1.2.10
BUILDLINK_PKGSRCDIR.shapelib?= ../../geography/shapelib
-.endif # SHAPELIB_BUILDLINK3_MK
+.endif # SHAPELIB_BUILDLINK3_MK
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_TREE+= -shapelib