pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/archivers/bzip2 Added computation of version number fo...
details: https://anonhg.NetBSD.org/pkgsrc/rev/ddf32e28e042
branches: trunk
changeset: 516053:ddf32e28e042
user: heinz <heinz%pkgsrc.org@localhost>
date: Thu Jul 13 13:04:54 2006 +0000
description:
Added computation of version number for package bzip2 if there is a
native version available in the system.
The awk skript looks for the line in bzlib.h containing the version
information. This works for versions < 1.0.0. For versions >= 1.0.0 the
script additionally evaluates the copyright date.
According to the change history, version 1.0 and 1.0.1 are identical except
for a documentation update so we treat both as version 1.0.1 to avoid
changing BUILDLINK_API_DEPENDS.bzip2 in buildlink3.mk.
diffstat:
archivers/bzip2/builtin.mk | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diffs (41 lines):
diff -r 0a1dec1fcb15 -r ddf32e28e042 archivers/bzip2/builtin.mk
--- a/archivers/bzip2/builtin.mk Thu Jul 13 11:55:37 2006 +0000
+++ b/archivers/bzip2/builtin.mk Thu Jul 13 13:04:54 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.6 2006/04/06 06:21:32 reed Exp $
+# $NetBSD: builtin.mk,v 1.7 2006/07/13 13:04:54 heinz Exp $
BUILTIN_PKG:= bzip2
@@ -21,6 +21,31 @@
MAKEVARS+= IS_BUILTIN.bzip2
###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.bzip2) && \
+ !empty(IS_BUILTIN.bzip2:M[yY][eE][sS])
+BUILTIN_VERSION.bzip2!= \
+ ${AWK} '/Copyright[ ]+\(C\).*rights[ ]+reserved/ { \
+ years=$$3; \
+ } \
+ /bzip2\/libbzip2[ ]+version[ ]+/ { \
+ vers=$$3; \
+ if ( vers == "1.0" ) { \
+ vers="1.0.1"; \
+ if ( years == "1996-2002" ) vers="1.0.2";\
+ if ( years == "1996-2005" ) vers="1.0.3";\
+ }; \
+ print vers; \
+ }; \
+ ' ${H_BZIP2:Q}
+
+BUILTIN_PKG.bzip2= bzip2-${BUILTIN_VERSION.bzip2}
+.endif
+MAKEVARS+= BUILTIN_PKG.bzip2
+
+###
### Determine whether we should use the built-in implementation if it
### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
###
Home |
Main Index |
Thread Index |
Old Index