pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/createbuildlink Remove support for creating b...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3ba7fc2543a5
branches:  trunk
changeset: 477678:3ba7fc2543a5
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Tue Jul 06 23:18:04 2004 +0000

description:
Remove support for creating buildlink2.mk files.
Make buildlink3.mk file output the default, and ignore any "-3" flags
on the command line for people who can't change their habits quickly.
Increase version to 3.5.

diffstat:

 pkgtools/createbuildlink/Makefile                |    4 +-
 pkgtools/createbuildlink/files/createbuildlink   |  130 +---------------------
 pkgtools/createbuildlink/files/createbuildlink.8 |   19 +--
 3 files changed, 16 insertions(+), 137 deletions(-)

diffs (275 lines):

diff -r bd3e2a06a6fe -r 3ba7fc2543a5 pkgtools/createbuildlink/Makefile
--- a/pkgtools/createbuildlink/Makefile Tue Jul 06 23:07:35 2004 +0000
+++ b/pkgtools/createbuildlink/Makefile Tue Jul 06 23:18:04 2004 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.29 2004/03/18 10:47:04 jlam Exp $
+# $NetBSD: Makefile,v 1.30 2004/07/06 23:18:04 wiz Exp $
 
-DISTNAME=      createbuildlink-3.4
+DISTNAME=      createbuildlink-3.5
 CATEGORIES=    pkgtools sysutils
 MASTER_SITES=  # Nothing
 DISTFILES=     # Nothing
diff -r bd3e2a06a6fe -r 3ba7fc2543a5 pkgtools/createbuildlink/files/createbuildlink
--- a/pkgtools/createbuildlink/files/createbuildlink    Tue Jul 06 23:07:35 2004 +0000
+++ b/pkgtools/createbuildlink/files/createbuildlink    Tue Jul 06 23:18:04 2004 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $NetBSD: createbuildlink,v 1.22 2004/04/27 03:51:24 dmcmahill Exp $
+#      $NetBSD: createbuildlink,v 1.23 2004/07/06 23:18:04 wiz Exp $
 #
 # Copyright (c) 2002 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -40,35 +40,23 @@
 # and PLIST
 #
 
-REV=`echo '$Revision: 1.22 $' | sed 's/\\$//g'`
+REV=`echo '$Revision: 1.23 $' | sed 's/\\$//g'`
 tmpdir=/tmp
 spacesintab=8
 makefile=Makefile
 sedrules=$tmpdir/sedrules.buildlink.$$
 PLIST=PLIST
-blver=2
-otherver=3
 
-args=`getopt j23 $*`
+args=`getopt 3 $*`
 if [ $? != 0 ]; then
-       echo "Usage: $0 -2 [-j] > buildlink2.mk"
-       echo "   or: $0 -3 > buildlink3.mk"
+       echo "Usage: $0 > buildlink3.mk"
        exit 2
 fi
 set -- $args
 while [ $# -gt 0 ]; do
        case "$1" in
-       -j)
-               join=YES
-               ;;
-       -2)
-               blver=2
-               otherver=3
-               ;;
        -3)
-               blver=3
-               otherver=2
-               ;;
+               shift;;
        --)
                shift; break
                ;;
@@ -85,12 +73,6 @@
        exit 1
 fi
 
-if [ $blver = 2 -a ! -f "$PLIST" ]; then
-       echo "===> Incomplete package! To create a buildlink file <==="
-       echo "===> a working PLIST is required!                   <==="
-       exit 1
-fi
-
 ##
 ## try to find any included Makefile.common's
 ## 
@@ -135,7 +117,7 @@
 # XXX This file was created automatically using createbuildlink-@PKGVERSION@.
 # XXX After this file as been verified as correct, the comment lines
 # XXX beginning with "XXX" should be removed.  Please do not commit
-# XXX unverified buildlink[23].mk files.
+# XXX unverified buildlink3.mk files.
 # XXX
 # XXX Packages that only install static libraries or headers should
 # XXX include the following line:
@@ -144,19 +126,6 @@
 
 EOF
 
-##
-## buildlink 2
-##
-if [ $blver = 2 ]; then
-
-sed -f $sedrules <<EOF
-.if !defined(${PKGUPPER}_BUILDLINK2_MK)
-${PKGUPPER}_BUILDLINK2_MK=     # defined
-
-EOF
-
-else   # buildlink 3
-
 gap="  "
 for i in 1 2 3; do
        n=`expr $i \* $spacesintab`
@@ -182,114 +151,31 @@
 .if !empty(${PKGUPPER}_BUILDLINK3_MK:M+)
 EOF
 
-fi     # buildlink 2/3
-
-if [ $blver = 2 ]; then
-
-sed -f $sedrules <<EOF
-BUILDLINK_PACKAGES+=           $PKGNOVER
-BUILDLINK_DEPENDS.$PKGNOVER?=  $PKGNOVER>=$PKGVER
-EOF
-
-else # [ $blver = 3 ]
-
 sed -f $sedrules <<EOF
 BUILDLINK_DEPENDS.$PKGNOVER+=  $PKGNOVER>=$PKGVER
 EOF
 
-fi
-
 sed -f $sedrules <<EOF
 BUILDLINK_PKGSRCDIR.$PKGNOVER?=        ../../$CURDIR
 EOF
 
-if [ $blver = 3 ]; then
-
 sed -f $sedrules <<EOF
 .endif # ${PKGUPPER}_BUILDLINK3_MK
 EOF
 
-fi
-
-##
-## buildlink2-only part
-##
-if [ $blver = 2 ]; then
-sed -f $sedrules <<EOF
-
-EVAL_PREFIX+=  BUILDLINK_PREFIX.$PKGNOVER=$PKGNOVER
-BUILDLINK_PREFIX.${PKGNOVER}_DEFAULT=  \${$PREFIX}
-EOF
-
-##
-## buildlinked includes (buildlink2 only)
-##
-if [ "$join" = "YES" ]; then
-       for i in `egrep "^include/|/Headers/.*\.h" $PLIST \
-       | sed -e 's|[^/]*\.h\([Hhpx+]*\)$|*.h\1|' | sort -u`; do
-               echo "BUILDLINK_FILES.$PKGNOVER+=       $i"
-       done
-else
-       for i in `egrep "^include/|/Headers/.*\.h" $PLIST` ; do
-               echo "BUILDLINK_FILES.$PKGNOVER+=       $i"
-       done
-fi
-
-##
-## buildlinked libraries (buildlink2 only)
-##
-for i in \
-`egrep '^lib/|/Libraries/.*/lib[^\.]*\.a$|/Libraries/.*/lib[^\.]*\.so' $PLIST \
-| egrep -v '\.pc$' | sed -e 's/\.a$/.*/' -e 's/\.la$/.*/' -e 's/\.so.*$/.*/'  \
-| sort -u`; do
-       echo "BUILDLINK_FILES.$PKGNOVER+=       $i"
-done
-
-fi     ## end of buildlink2-only part
-
 ##
 ## buildlinked dependencies
 ##
-grep -l '^.include.*\.\.\/.*\/.*/buildlink[23].mk\"' $makefile $commons \
+grep -l '^.include.*\.\.\/.*\/.*/buildlink3.mk\"' $makefile $commons \
        >/dev/null 2>&1 && echo ""      # Be careful not to print duplicate \n
 for i in $makefile $commons ; do
-       [ ! -f $i ] || grep '^.include.*\.\.\/.*\/.*/buildlink[23].mk\"' $i |
-               sed "s/buildlink$otherver/buildlink$blver/"             |
+       [ ! -f $i ] || grep '^.include.*\.\.\/.*\/.*/buildlink3.mk\"' $i |
                egrep -v '/devel/pkgconfig/|/textproc/intltool/'
 done
-if [ $blver = 2 ]; then
-grep -l '^.include.*\.\.\/.*\/.*/buildlink[23].mk\"' $makefile $commons \
-       >/dev/null 2>&1 && echo ""      # Be careful not to print duplicate \n
-fi
-
-##
-## buildlink2-only part
-##
-if [ $blver = 2 ]; then
-##
-## main buildlink target for this package
-##
-sed -f $sedrules <<EOF
-BUILDLINK_TARGETS+=    ${PKGNOVER}-buildlink
-
-EOF
-
-##
-## buildlink targets for this package
-##
-sed -f $sedrules <<EOF
-${PKGNOVER}-buildlink: _BUILDLINK_USE
-
-.endif # ${PKGUPPER}_BUILDLINK2_MK
-EOF
-
-else   # buildlink 3
 
 sed -f $sedrules <<EOF
 
 BUILDLINK_DEPTH:=     \${BUILDLINK_DEPTH:S/+\$//}
 EOF
 
-fi     # buildlink 2/3
-
 rm -f $sedrules
diff -r bd3e2a06a6fe -r 3ba7fc2543a5 pkgtools/createbuildlink/files/createbuildlink.8
--- a/pkgtools/createbuildlink/files/createbuildlink.8  Tue Jul 06 23:07:35 2004 +0000
+++ b/pkgtools/createbuildlink/files/createbuildlink.8  Tue Jul 06 23:18:04 2004 +0000
@@ -1,6 +1,6 @@
-.\"    $NetBSD: createbuildlink.8,v 1.7 2004/01/14 14:17:47 wiz Exp $
+.\"    $NetBSD: createbuildlink.8,v 1.8 2004/07/06 23:18:04 wiz Exp $
 .\"
-.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2002,2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -34,7 +34,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 14, 2004
+.Dd July 6, 2004
 .Dt CREATEBUILDLINK 8
 .Os
 .Sh NAME
@@ -42,7 +42,7 @@
 .Nd automatic pkgsrc buildlink2.mk and buildlink3.mk generator
 .Sh SYNOPSIS
 .Nm
-.Op Fl 23j
+.Op Fl 3
 .Sh DESCRIPTION
 .Nm
 reads in the
@@ -51,20 +51,13 @@
 .Pa PLIST
 of a package and creates
 an initial
-.Pa buildlink2.mk
+.Pa buildlink3.mk
 file on stdout.
 .Pp
 The following options are available:
 .Bl -tag -width indent
-.It Fl 2
-Create buildlink2.mk style output (the default).
 .It Fl 3
-Create buildlink3.mk style output.
-.It Fl j
-Join together all .h files in an include directory and list as *.h.
-Be careful with this option and only use it if you are sure that the
-package in question is the only one providing header files in the PLISTed
-directory.
+Create buildlink3.mk style output. (default)
 .El
 .Pp
 While



Home | Main Index | Thread Index | Old Index