summaryrefslogtreecommitdiff
path: root/lang/perl5/files
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-08-06 06:18:44 +0000
committerjlam <jlam@pkgsrc.org>2005-08-06 06:18:44 +0000
commit86f92684818eb77da677366cd49b4fa35e87b579 (patch)
tree554688efac79710dce203345436bb3e8cb9748b1 /lang/perl5/files
parent948ada653aefeccbbb05b811348b0025017134ba (diff)
downloadpkgsrc-86f92684818eb77da677366cd49b4fa35e87b579.tar.gz
Update lang/perl5 to 5.8.7. Changes from version 5.8.6 include updates
for many "core" modules, UTF-8 and Unicode bugfixes, and ithreads bugfixes. The major changes are in the pkgsrc infrastructure to handle Perl and Perl modules. All pkgsrc-installed Perl modules are now installed in "vendor" directories, and the perl interpreter has been modifed to search for libraries in the following order: site, vendor, perl. The Perl library is stored in a directory that is named for the Perl ABI version associated with the Perl release, so any updates of Perl to newer versions can be done "in-place" as long as Perl ABI version remains the same. All Perl scripts and man pages are stored in locations that won't conflict between site, vendor, and perl modules, and a new utility perllink(1) now manages symlinks to those scripts and man pages under the usual ${LOCALBASE}/bin and ${LOCALBASE}/man/man1. PERL5_SITEPREFIX may be set to the prefix where local, site-specific modules will be installed, e.g. PERL5_SITEPREFIX=/usr/local. Note that modules installed here are completely unmanaged by pkgsrc. Update the buildlink and tool dependencies on perl to require perl>=5.8.7 to reflect the new locations for Perl modules and the Perl shared library.
Diffstat (limited to 'lang/perl5/files')
-rw-r--r--lang/perl5/files/deinstall_link.tmpl16
-rw-r--r--lang/perl5/files/install_link.tmpl11
-rw-r--r--lang/perl5/files/perllink.1126
-rw-r--r--lang/perl5/files/perllink.in195
4 files changed, 348 insertions, 0 deletions
diff --git a/lang/perl5/files/deinstall_link.tmpl b/lang/perl5/files/deinstall_link.tmpl
new file mode 100644
index 00000000000..6c7bc8b4867
--- /dev/null
+++ b/lang/perl5/files/deinstall_link.tmpl
@@ -0,0 +1,16 @@
+# $NetBSD: deinstall_link.tmpl,v 1.1 2005/08/06 06:18:45 jlam Exp $
+
+case ${STAGE} in
+DEINSTALL)
+ eval `${PERL5} -V:scriptdir`
+ PERL5_PACKLIST="@PERL5_PACKLIST@"
+
+ # Remove any symlinked bits that belong to this module.
+ $scriptdir/perllink -f -p ${PKG_PREFIX} delete ${PERL5_PACKLIST}
+
+ # If this is not the perl package, then re-link any perl bits
+ # back into place.
+ #
+ @PERL5_COMMENT@$scriptdir/perllink -p ${PKG_PREFIX} add
+ ;;
+esac
diff --git a/lang/perl5/files/install_link.tmpl b/lang/perl5/files/install_link.tmpl
new file mode 100644
index 00000000000..ad196d32d2e
--- /dev/null
+++ b/lang/perl5/files/install_link.tmpl
@@ -0,0 +1,11 @@
+# $NetBSD: install_link.tmpl,v 1.1 2005/08/06 06:18:45 jlam Exp $
+
+case ${STAGE} in
+POST-INSTALL)
+ eval `${PERL5} -V:scriptdir`
+ PERL5_PACKLIST="@PERL5_PACKLIST@"
+
+ # Symlink the bits that belong to this module.
+ $scriptdir/perllink -f -p ${PKG_PREFIX} add ${PERL5_PACKLIST}
+ ;;
+esac
diff --git a/lang/perl5/files/perllink.1 b/lang/perl5/files/perllink.1
new file mode 100644
index 00000000000..71154ac12c0
--- /dev/null
+++ b/lang/perl5/files/perllink.1
@@ -0,0 +1,126 @@
+.\" $NetBSD: perllink.1,v 1.1 2005/08/06 06:18:45 jlam Exp $
+.\"
+.\" Copyright (c) 2005 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Johnny C. Lam.
+.\"
+.\" 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 July 15, 2005
+.Dt PERLLINK 1
+.Sh NAME
+.Nm perllink
+.Nd add and delete symlinks in the standard Perl installation
+.Sh SYNOPSIS
+.Nm perllink
+.Op Fl fnv
+.Op Fl p Ar prefix
+.Ar action
+.Op Ar packlist ...
+.Sh DESCRIPTION
+.Nm
+manages the symlinks that match the files listed in the given
+packlists.
+.Pp
+The perl configuration library defines the main directory trees
+containing the standard Perl installation in the following variables:
+.Bl -column -offset indent
+.It Va prefix
+.It Va siteprefix
+.It Va vendorprefix
+.El
+.Pp
+The perl configuration library also defines the locations of scripts
+and manual pages in the following variables:
+.Bl -column -offset indent ".Va vendorscript" ".Va vendorman1dir"
+.It Va scriptdir Ta Va man1dir
+.It Va sitescript Ta Va siteman1dir
+.It Va vendorscript Ta Va vendorman1dir
+.El
+.Pp
+For each file listed in the packlists that is in one of the script
+or manual page locations,
+a relative symbolic link to that file is added or deleted from
+. Va prefix Ns Pa /bin
+and
+. Va prefix Ns Pa /man/man1 .
+.Pp
+If
+.Fl p Ar prefix
+is specified, then the script and manual page locations are recomputed
+relative to the given
+.Ar prefix
+instead of to perl's
+.Va prefix ,
+and the symlinks are managed under the given
+.Ar prefix
+instead.
+.Pp
+The options are as follows:
+.Bl -tag -width indent
+.It Ar action
+This required option is either
+.Dq add
+or
+.Dq delete
+and determines
+whether the managed symlinks are added or deleted.
+.It Ar packlist ...
+These are paths to packlists containing the files installed as
+part of a module.
+Each line of a packlist contains a path terminated by a newline.
+If no packlists are specified, then the packlist for Perl itself
+is used.
+.It Fl f , -force
+Unlink any already existing files, permitting the new symlinks
+to replace the existing ones.
+.It Fl n , -noaction
+Do not actually make any changes to the files in
+.Ar prefix .
+.It Fl p Ar prefix , Fl -prefix= Ns Ar prefix
+Manage the symlinks in
+.Ar prefix .
+By default,
+.Nm
+manages the symlinks in the location referenced by the perl configuration
+variable
+.Va prefix .
+.It Fl v
+Be verbose.
+Display on standard error the shell-equivalent commands that
+are being executed.
+.El
+.Sh SEE ALSO
+.Xr perl 1 ,
+.Xr symlink 2
+.Sh AUTHORS
+.An Johnny C. Lam
+.Aq jlam@NetBSD.org
diff --git a/lang/perl5/files/perllink.in b/lang/perl5/files/perllink.in
new file mode 100644
index 00000000000..44dfacca2d5
--- /dev/null
+++ b/lang/perl5/files/perllink.in
@@ -0,0 +1,195 @@
+#!@SH@
+# $NetBSD: perllink.in,v 1.1 2005/08/06 06:18:45 jlam Exp $
+#
+# Copyright (c) 2005 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Johnny C. Lam.
+#
+# 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.
+#
+
+#
+# This script parses the packlists listed on the command line and either
+# adds or deletes the symlinks in <prefix>/bin and <prefix>/man/man1 that
+# match the files in the packlists.
+#
+
+perlprog="@PERL5@"
+
+usage()
+{
+ echo 1>&2 "usage: $0 [-fnv] [-p prefix] add|delete [packlist ...]"
+ exit 1
+}
+
+opt_action=
+opt_force=
+opt_noaction=
+opt_prefix=
+opt_packlists=
+opt_verbose=
+
+while test $# -gt 0; do
+ opt="$1"
+ case "$opt" in
+ -f|--force) opt_force=yes; shift ;;
+ -n|--noaction) opt_noaction=yes; shift ;;
+ -p) opt_prefix="$2"; shift; shift ;;
+ --prefix=*) opt_prefix="${1#--prefix=}"; shift ;;
+ -v|--verbose) opt_verbose=yes; shift ;;
+ --) break; shift ;;
+ -*) usage ;;
+ [!-]*) break ;;
+ esac
+done
+
+# We expect the action argument, as well as any packlists, to be left
+# in the argument list.
+#
+test $# -gt 0 || usage
+opt_action="$1"; shift
+
+# Get the values of various Config.pm values from perl.
+eval `$perlprog -V:prefix -V:scriptdir -V:man1dir -V:vendorprefix -V:vendorscript -V:vendorman1dir -V:siteprefix -V:sitescript -V:siteman1dir -V:archlib`
+
+# The remaining arguments, if any, are packlists.
+if test $# -gt 0; then
+ opt_packlists="$@"
+elif test -f "$archlib/.packlist"; then
+ opt_packlists="$archlib/.packlist"
+fi
+
+test -n "$opt_prefix" || opt_prefix="$prefix"
+
+# Re-point variables so that if they are under $prefix, then they are
+# recomputed to point under $opt_prefix.
+#
+case "$scriptdir" in
+$prefix/*) scriptdir="$opt_prefix/${scriptdir#$prefix/}" ;;
+"") scriptdir="$opt_prefix/bin" ;;
+esac
+case "$man1dir" in
+$prefix/*) man1dir="$opt_prefix/${man1dir#$prefix/}" ;;
+"") man1dir="$opt_prefix/man/man1" ;;
+esac
+case "$siteprefix" in
+$prefix/*) siteprefix="$opt_prefix/${siteprefix#$prefix/}" ;;
+"") siteprefix="$opt_prefix" ;;
+esac
+case "$sitescript" in
+$prefix/*) sitescript="$opt_prefix/${sitescript#$prefix/}" ;;
+"") sitescript="$scriptdir" ;;
+esac
+case "$siteman1dir" in
+$prefix/*) siteman1dir="$opt_prefix/${siteman1dir#$prefix/}" ;;
+"") siteman1dir="$man1dir" ;;
+esac
+case "$vendorprefix" in
+$prefix/*) vendorprefix="$opt_prefix/${vendorprefix#$prefix/}" ;;
+"") vendorprefix="$opt_prefix" ;;
+esac
+case "$vendorscript" in
+$prefix/*) vendorscript="$opt_prefix/${vendorscript#$prefix/}" ;;
+"") vendorscript="$scriptdir" ;;
+esac
+case "$vendorman1dir" in
+$prefix/*) vendorman1dir="$opt_prefix/${vendorman1dir#$prefix/}" ;;
+"") vendorman1dir="$man1dir" ;;
+esac
+
+destbindir="$opt_prefix/bin"
+destman1dir="$opt_prefix/man/man1"
+
+echo __dummy__ | perl -pe '0' $opt_packlists |
+{ while read file junk; do
+ case "$file" in
+ $scriptdir/*|$sitescript/*|$vendorscript/*) destdir="$destbindir" ;;
+ $man1dir/*|$siteman1dir/*|$vendorman1dir/*) destdir="$destman1dir" ;;
+ esac
+
+ case "$file" in
+ $scriptdir/*) dest="$destdir/${file#$scriptdir/}" ;;
+ $sitescript/*) dest="$destdir/${file#$sitescript/}" ;;
+ $vendorscript/*) dest="$destdir/${file#$vendorscript/}" ;;
+ $man1dir/*) dest="$destdir/${file#$man1dir/}" ;;
+ $siteman1dir/*) dest="$destdir/${file#$siteman1dir/}" ;;
+ $vendorman1dir/*) dest="$destdir/${file#$vendorman1dir/}" ;;
+ *) continue ;;
+ esac
+
+ test "$file" != "$dest" || continue
+
+ # Set $src to be a relative symlink from $file into $destdir.
+ file="${file#/}"
+ destdir="${destdir#/}"
+ while test "${file%%/*}" = "${destdir%%/*}"; do
+ case "$file" in
+ */*) file="${file#*/}" ;;
+ *) file= ;;
+ esac
+ case "$destdir" in
+ */*) destdir="${destdir#*/}" ;;
+ *) destdir= ;;
+ esac
+ done
+ src=""
+ while test -n "$destdir"; do
+ src="../$src"
+ case "$destdir" in
+ */*) destdir="${destdir#*/}" ;;
+ *) destdir= ;;
+ esac
+ done
+ src="$src$file"
+
+ case "$opt_action" in
+ add|delete)
+ if test -n "$opt_force"; then
+ test -z "$opt_verbose" || \
+ echo "print STDERR \"rm $dest\\n\";"
+ test -n "$opt_noaction" || \
+ echo "unlink(\"$dest\");"
+ fi
+ ;;
+ *)
+ usage
+ ;;
+ esac
+ case "$opt_action" in
+ add)
+ test -z "$opt_verbose" || \
+ echo "print STDERR \"ln -s $src $dest\\n\";"
+ test -n "$opt_noaction" || \
+ echo "symlink(\"$src\", \"$dest\");"
+ ;;
+ esac
+done;
+echo "exit(0);"; } | $perlprog -w -