Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
This package installs a shell script that will take a Makefile
and a PLIST file of an existing package and create an initial
buildlink3.mk file from it. The script tries to interpret the
contents of the include and lib subdirectories (if any) of the
package and add the corresponding BUILDLINK files.

View File

@@ -0,0 +1,36 @@
# $NetBSD: Makefile,v 1.49 2012/09/11 23:19:34 asau Exp $
DISTNAME= createbuildlink-3.16
CATEGORIES= pkgtools sysutils
MASTER_SITES= # Nothing
DISTFILES= # Nothing
MAINTAINER= rh@NetBSD.org
COMMENT= Shell script to help creating buildlink3.mk files
PKG_INSTALLATION_TYPES= overwrite pkgviews
WRKSRC= ${WRKDIR}
USE_LANGUAGES= # empty
NO_BUILD= yes
SCRIPT= ${DISTNAME:C/-.*$//}
SCRIPTS= ${SCRIPT} substplistbasedirs
REPLACE_SH+= ${SCRIPTS}
INSTALLATION_DIRS= bin ${PKGMANDIR}/man8
do-extract:
.for scr in ${SCRIPTS}
${SED} -e 's|@PKGVERSION@|${PKGVERSION}|' \
-e 's|@MAKE@|${MAKE}|' \
< ${FILESDIR:Q}/${scr:Q} > ${WRKSRC:Q}/${scr:Q}
.endfor
do-install:
.for scr in ${SCRIPTS}
${INSTALL_SCRIPT} ${WRKSRC:Q}/${scr:Q} ${DESTDIR}${PREFIX}/bin/${scr:Q}
.endfor
${INSTALL_MAN} ${FILESDIR:Q}/${SCRIPT:Q}.8 ${DESTDIR}${PREFIX}/${PKGMANDIR:Q}/man8
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,4 @@
@comment $NetBSD: PLIST,v 1.4 2004/09/26 23:48:09 rh Exp $
bin/createbuildlink
bin/substplistbasedirs
man/man8/createbuildlink.8

View File

@@ -0,0 +1,186 @@
#!/bin/sh
#
# $NetBSD: createbuildlink,v 1.35 2010/01/13 15:27:52 wiz Exp $
#
# Copyright (c) 2002 The NetBSD Foundation, Inc.
# All rights reserved.
#
# This code is derived from software contributed to The NetBSD Foundation
# by Rene Hexel.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the NetBSD
# Foundation, Inc. and its contributors.
# 4. Neither the name of The NetBSD Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Create an initial buildlink3.mk from a package's Makefile and PLIST
#
REV=`echo '$Revision: 1.35 $' | sed 's/\\$//g'`
tmpdir=/tmp
spacesintab=8
makefile=Makefile
sedrules=$tmpdir/sedrules.buildlink.$$
PLIST=PLIST
CREATEPLSUBST=false
args=`getopt 3p $*`
if [ $? != 0 ]; then
echo "Usage: $0 [-p] > buildlink3.mk"
exit 2
fi
set -- $args
while [ $# -gt 0 ]; do
case "$1" in
-3)
shift;;
-p)
CREATEPLSUBST=true
shift;;
--)
shift; break
;;
esac
shift
done
##
## some simple integrity checking
##
if [ ! -f $makefile ]; then
echo "===> Incomplete package! To create a buildlink file <==="
echo "===> a working $makefile is required! <==="
exit 1
fi
##
## try to find any included Makefile.common's
##
commons=`grep '^.include.*Makefile.common\"' $makefile | \
sed 's/^.*"\(.*\)".*/\1/'`
##
## package specific variables
##
CURDIR=`pwd | sed 's|^.*/\([^/]*/[^/]*\)$|\1|'`
PKGNAME=`@MAKE@ show-var VARNAME=PKGNAME`
PKGVER=`echo $PKGNAME | sed -e 's/^.*-//'`
PKGNOVER=`echo $PKGNAME | sed -e 's/-[^-]*$//'`
PKGUPPER=`echo $PKGNOVER | tr '[:lower:]' '[:upper:]' | tr - _`
PREFIX=X11PREFIX
USE_X11BASE=`@MAKE@ show-var VARNAME=USE_X11BASE`
if [ -z "$USE_X11BASE" ]; then
if ! grep "^USE_X11BASE" $makefile $commons > /dev/null; then
PREFIX=LOCALBASE
fi
fi
##
## create sed rules
##
echo >$sedrules "s|@@CURDIR@@|$CURDIR|g"
echo >>$sedrules "s|@@ID@@|\$Net""BSD\$|g"
echo >>$sedrules "s|@@PKGNAME@@|$PKGNAME|g"
echo >>$sedrules "s|@@PKGNOVER@@|$PKGNOVER|g"
echo >>$sedrules "s|@@PKGUPPER@@|$PKGUPPER|g"
echo >>$sedrules "s|@@PKGVER@@|$PKGVER|g"
echo >>$sedrules "s|@@PREFIX@@|$PREFIX|g"
echo >>$sedrules "s|@@REV@@|$REV|g"
echo >>$sedrules "s|@@PKGVERSION@@|@PKGVERSION@|g"
#
# buildlink header
#
sed -f $sedrules <<EOF
# @@ID@@
# XXX
# XXX This file was created automatically using createbuildlink-@PKGVERSION@.
# XXX After this file has been verified as correct, the comment lines
# XXX beginning with "XXX" should be removed. Please do not commit
# XXX unverified buildlink3.mk files.
# XXX
# XXX Packages that only install static libraries or headers should
# XXX include the following line:
# XXX
# XXX BUILDLINK_DEPMETHOD.$PKGNOVER?= build
EOF
gap=" "
for i in 1 2 3; do
n=`expr $i \* $spacesintab`
if [ ${#PKGUPPER} -ge $n ]; then
gap=" $gap"
fi
done
sed -f $sedrules <<EOF
BUILDLINK_TREE+= $PKGNOVER
.if !defined(${PKGUPPER}_BUILDLINK3_MK)
${PKGUPPER}_BUILDLINK3_MK:=
EOF
sed -f $sedrules <<EOF
BUILDLINK_API_DEPENDS.$PKGNOVER+= $PKGNOVER>=$PKGVER
EOF
sed -f $sedrules <<EOF
BUILDLINK_PKGSRCDIR.$PKGNOVER?= ../../$CURDIR
EOF
if [ $CREATEPLSUBST = "true" ]; then
echo ""
substplistbasedirs
echo ""
fi
##
## buildlinked dependencies
##
grep -l '^.include.*\.\.\/.*\/.*/buildlink3.mk\"' $makefile $commons \
>/dev/null 2>&1 && cat <<EOF
# XXX
# XXX Uncomment and keep only the buildlink3 lines below which are directly
# XXX needed for dependencies to compile, link, and run. If this package
# XXX provides a wrappered API or otherwise does not expose the APIs of the
# XXX buildlink3 lines below to dependencies, remove them.
# XXX
EOF
for i in $makefile $commons ; do
[ ! -f $i ] || grep '^.include.*\.\.\/.*\/.*/buildlink3.mk\"' $i |
egrep -v '/devel/pkg-config/|/textproc/intltool/|/graphics/hicolor-icon-theme/' | sed 's,^,#,'
done
sed -f $sedrules <<EOF
.endif # ${PKGUPPER}_BUILDLINK3_MK
BUILDLINK_TREE+= -$PKGNOVER
EOF
rm -f $sedrules

View File

@@ -0,0 +1,93 @@
.\" $NetBSD: createbuildlink.8,v 1.11 2004/09/27 12:55:00 wiz Exp $
.\"
.\" Copyright (c) 2002,2004 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Rene Hexel.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd September 27, 2004
.Dt CREATEBUILDLINK 8
.Os
.Sh NAME
.Nm createbuildlink
.Nd automatic pkgsrc buildlink3.mk generator
.Sh SYNOPSIS
.Nm
.Op Fl p
.Sh DESCRIPTION
.Nm
reads in the
.Pa Makefile
and
.Pa PLIST
of a package and creates
an initial
.Pa buildlink3.mk
file on stdout.
.Pp
The following options are available:
.Bl -tag -width indent
.It Fl p
Create PRINT_PLIST_AWK substitution patterns for directories created
and removed by this package.
This is useful for base packages that create a directory structure
for a number of dependent packages.
.El
.Pp
While
.Nm
is supposed to help starting create a buildlink file
for a package, it is not intended to fly on autopilot.
That means that while the script makes some simplistic attempts
to interpret some elements of the
.Pa Makefile
and the
.Pa PLIST
such as the contents of the include and lib subdirectories or
package config scripts, the results should not be put into a
package directory without some scrutiny.
.Pp
Using
.Nm
helps maneuver through the initial process of creating a buildlink
file for a package to be included by depending packages.
Using
.Nm
is less error-prone than copying an existing buildlink file
as a template and renaming the entries in there.
.Sh SEE ALSO
.Xr packages 7 ,
.Xr url2pkg 8
.Sh AUTHORS
.Nm
was written by
.An Rene Hexel Aq rh@netbsd.org .

View File

@@ -0,0 +1,73 @@
#!/bin/sh
#
# $NetBSD: substplistbasedirs,v 1.3 2009/06/14 22:40:45 joerg Exp $
#
# Copyright (c) 2002 The NetBSD Foundation, Inc.
# All rights reserved.
#
# This code is derived from software contributed to The NetBSD Foundation
# by Rene Hexel.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the NetBSD
# Foundation, Inc. and its contributors.
# 4. Neither the name of The NetBSD Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Create substitution patterns for dependent packages for directories listed
# in a base package
#
REV=`echo '$Revision: 1.3 $' | sed 's/\\$//g'`
CURDIR=`pwd | sed 's|^.*/\([^/]*/[^/]*\)$|\1|'`
PLIST=PLIST
MDFLAG=true
args=`getopt n $*`
if [ $? != 0 ]; then
echo "Usage: $0 [-n]"
exit 2
fi
set -- $args
while [ $# -gt 0 ]; do
case "$1" in
-n)
MDFLAG=no_mkdir_patterns
shift;;
--)
shift; break
;;
esac
shift
done
##
## some simple integrity checking
##
if [ ! -f $PLIST ]; then
echo "###> Incomplete package! To create a substitution pattern <###"
echo "###> a working $PLIST is required! <###"
exit 1
fi