Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -0,0 +1,3 @@
The texlive2pkg program creates a new pkgsrc package for the
corresponding texlive package. It is intended to help pkgsrc
developers create new texlive packages quickly and easily.

View File

@@ -0,0 +1,40 @@
# $NetBSD: Makefile,v 1.3 2016/07/09 06:38:49 wiz Exp $
#
PKGNAME= texlive2pkg-1.1
PKGREVISION= 1
CATEGORIES= pkgtools
MAINTAINER= markd@NetBSD.org
HOMEPAGE= # none
COMMENT= Tool to automate initial steps in building a texlive package
LICENSE= modified-bsd
WRKSRC= ${WRKDIR}
NO_BUILD= yes
USE_LANGUAGES= # none
USE_TOOLS+= perl:run xzcat:run
AUTO_MKDIRS= yes
SUBST_CLASSES+= tools
SUBST_STAGE.tools= pre-configure
SUBST_MESSAGE.tools= Substituting tool locations.
SUBST_FILES.tools= texlive2pkg.sh
SUBST_VARS.tools= DISTDIR MAKE PREFIX
REPLACE_PERL+= texlive.pkg texlive.pkg.doc
INSTALLATION_DIRS+= bin libexec/texlive2pkg ${PKGMANDIR}/man8
do-extract:
${CP} ${FILESDIR}/texlive2pkg.sh ${WRKSRC}
${CP} ${FILESDIR}/texlive2pkg.8 ${WRKSRC}
${CP} ${FILESDIR}/texlive.pkg* ${WRKSRC}
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/texlive2pkg.sh ${DESTDIR}${PREFIX}/bin/texlive2pkg
${INSTALL_SCRIPT} ${WRKSRC}/texlive.pkg ${DESTDIR}${PREFIX}/libexec/texlive2pkg/texlive.pkg
${INSTALL_SCRIPT} ${WRKSRC}/texlive.pkg.doc ${DESTDIR}${PREFIX}/libexec/texlive2pkg/texlive.pkg.doc
${INSTALL_MAN} ${WRKSRC}/texlive2pkg.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/texlive2pkg.8
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,5 @@
@comment $NetBSD: PLIST,v 1.1 2016/01/24 19:34:44 markd Exp $
bin/texlive2pkg
libexec/texlive2pkg/texlive.pkg
libexec/texlive2pkg/texlive.pkg.doc
man/man8/texlive2pkg.8

View File

@@ -0,0 +1,90 @@
#!/usr/pkg/bin/perl
# $NetBSD: texlive.pkg,v 1.2 2016/01/30 04:59:57 markd Exp $
$version = "2015";
$pkgname = $shortdesc = $revision = $license = $longdesc = $depend = $homepage = "";
$plist = $other = $maps = "";
while (<>) {
$pkgname = $1,next if (/^name (\S+)/);
$shortdesc = $1,next if (/^shortdesc +(.+)/);
$revision = $1,next if (/^revision (\S+)/);
$license = $1,next if (/^catalogue-license (\S+)/);
$version = $1,next if (/^catalogue-version +(.+)/);
$homepage = $1,next if (/^catalogue +(.+)/);
next if (/^category /);
next if (/^catalogue-also /);
next if (/^catalogue-ctan /);
next if (/^catalogue-date /);
next if (/^catalogue-topics /);
next if (/^relocated /);
next if (/^runfiles /);
$longdesc .= "$1\n",next if (/^longdesc (.+)/);
$depend .= "DEPENDS+=\ttex-$1-[0-9]*:../../print/tex-$1\n",next if (/^depend (.+)/);
$maps .= "TEX_MAP_FILES+=\t$1\n",next if (/^execute addMap (.+)/);
$maps .= "TEX_MIXEDMAP_FILES+=\t$1\n",next if (/^execute addMixedMap (.+)/);
$plist .= "share/texmf-dist$1\n", next if (/^ RELOC(.+)/);
$plist .= "share/$1\n",next if (/^ (.+)/);
$other .= "# " . $_;
}
$shortdesc =~ s/\.$//;
$version =~ s:/::g;
$version =~ s: :_:g; # 5th edition
$version =~ s:-::g; # 2013-05-12
$license = "apache-2.0" if ($license eq "apache2");
$license = "gnu-fdl-v1.3" if ($license eq "fdl");
$license = "gnu-lgpl-v2" if ($license eq "lgpl");
$license = "gnu-gpl-v2" if ($license eq "gpl");
$license = "gnu-gpl-v2" if ($license eq "gpl2");
$license = "gnu-gpl-v3" if ($license eq "gpl3");
$license = "lppl-1.0" if ($license eq "lppl1");
$license = "lppl-1.2" if ($license eq "lppl1.2");
$license = "lppl-1.3c" if ($license eq "lppl");
$license = "lppl-1.3c" if ($license eq "lppl1.3");
$license = "modified-bsd" if ($license eq "bsd");
$license = "ofl-v1.1" if ($license eq "ofl");
$license = "public-domain" if ($license eq "pd");
$extras = "";
$extras .= "\n$depend" if ($depend);
$extras .= "\n$maps" if ($maps);
$extras .= "\n$other" if ($other);
$homepage = $pkgname if ($homepage eq "");
mkdir "tex-$pkgname";
open(DESCR, ">tex-$pkgname/DESCR");
print DESCR "$longdesc";
close(DESCR);
open(PLIST, ">tex-$pkgname/PLIST");
print PLIST "\@comment \$NetBSD\$\n";
print PLIST "$plist";
close(PLIST);
open(MAKE, ">tex-$pkgname/Makefile");
print MAKE <<OUT;
# \$NetBSD\$
DISTNAME= $pkgname
PKGNAME= tex-\${DISTNAME}-$version
TEXLIVE_REV= $revision
MAINTAINER= pkgsrc-users\@NetBSD.org
HOMEPAGE= http://ctan.org/pkg/$homepage
COMMENT= $shortdesc
LICENSE= $license
$extras
.include "../../print/texlive/package.mk"
.include "../../mk/bsd.pkg.mk"
OUT
close(MAKE);
print STDERR "$pkgname $version rev $revision ($license) $shortdesc $homepage \n\n";
print "PKG=$pkgname VERSION=$version REV=$revision LICENSE=\"$license\" HOMEPAGE=$homepage\n";

View File

@@ -0,0 +1,66 @@
#!/usr/pkg/bin/perl
# $NetBSD: texlive.pkg.doc,v 1.1 2016/01/24 19:34:44 markd Exp $
$pkgname = $ARGV[0];
$revision= $ARGV[1];
$version = $ARGV[2];
$license = $ARGV[3];
$homepage = $ARGV[4];
$pkgdocname = $shortdesc = $revdoc = $longdesc = $depend = "";
$plist = $other = $maps = "";
while (<STDIN>) {
$pkgdocname = $1,next if (/^name (\S+)/);
$shortdesc = $1,next if (/^shortdesc +(.+)/);
$revdoc = $1,next if (/^revision (\S+)/);
$license = $1,next if (/^catalogue-license (\S+)/);
$version = $1,next if (/^catalogue-version +(.+)/);
next if (/^category /);
next if (/^catalogue-ctan /);
next if (/^catalogue-date /);
next if (/^relocated /);
next if (/^runfiles /);
next if (/^docfiles /);
next if (/^longdesc /);
$plist .= "share/texmf-dist$1\n", next if (/^ RELOC(.+)/);
$plist .= "share/$1\n",next if (/^ (.+)/);
$other .= "# " . $_;
}
die "pkgname doesn't match" if ($pkgname . ".doc" ne $pkgdocname);
die "revision doesn't match" if ($revision ne $revdoc);
mkdir "tex-${pkgname}-doc";
open(DESCR, ">tex-${pkgname}-doc/DESCR");
print DESCR "Documentation for tex-${pkgname}.\n";
close(DESCR);
open(PLIST, ">tex-${pkgname}-doc/PLIST");
print PLIST "\@comment \$NetBSD\$\n";
print PLIST "$plist";
close(PLIST);
open(MAKE, ">tex-${pkgname}-doc/Makefile");
print MAKE <<OUT;
# \$NetBSD\$
DISTNAME= ${pkgname}.doc
PKGNAME= tex-\${DISTNAME:S/./-/}-$version
TEXLIVE_REV= $revision
MAINTAINER= pkgsrc-users\@NetBSD.org
HOMEPAGE= http://ctan.org/pkg/$homepage
COMMENT= Documentation for tex-${pkgname}
LICENSE= $license
.include "../../print/texlive/package.mk"
.include "../../mk/bsd.pkg.mk"
OUT
close(MAKE);
exit 0;

View File

@@ -0,0 +1,84 @@
.\" $NetBSD: texlive2pkg.8,v 1.2 2016/01/24 19:45:30 wiz Exp $
.\"
.\" Copyright (c) 2016
.\" Mark Davies. All rights reserved.
.\"
.\" 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. Neither the name of the author nor the names of any contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 REGENTS 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 January 24, 2016
.Dt TEXLIVE2PKG 8
.Os
.Sh NAME
.Nm texlive2pkg
.Nd create a pkgsrc package for a texlive package
.Sh SYNOPSIS
.Nm
.Ar package-tarball
.Op Ar doc-tarball
.Sh DESCRIPTION
.Nm
takes a texlive
.Ar package-tarball
and optional
.Ar doc-tarball
that should be turned into
.Xr pkgsrc 7
packages under the current directory.
The generated packages include a
.Pa Makefile
and a mostly complete set of files to get the package going.
However, the files should be reviewed and perhaps adjusted manually after
.Nm
has finished its job.
.Pp
.Nm
is intended to help the process of creating a package but is not
intended to fly on autopilot.
.Sh EXAMPLES
Use the following commands to create a
.Xr pkgsrc 7
package for the texlive package
.Ar foo :
.Dl cd pkgsrc/print
.Dl texlive2pkg foo.tar.xz foo.doc.tar.xz
Remember to test the resulting package.
.Sh SEE ALSO
.Xr pkgsrc 7
.Sh AUTHORS
.Nm
was written by
.An Mark Davies Aq Mt markd@NetBSD.org .
.Sh BUGS
.Nm
does not create a finished package; instead, it facilitates the task.
However, the resulting files must be reviewed and possibly edited by
hand.
Although dependencies are included in the generated
.Pa Makefile ,
they are only comments; no attempt is made to find corresponding
packages within
.Xr pkgsrc 7 .
As a consequence, the category of dependencies is also not determined.

View File

@@ -0,0 +1,91 @@
#!/bin/sh
# texlive2pkg
# $NetBSD: texlive2pkg.sh,v 1.1 2016/01/24 19:34:44 markd Exp $
#
# Copyright (c) 2016
# Mark Davies. All rights reserved.
#
# 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. Neither the name of the author nor the names of any contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 REGENTS 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 a texlive package in the current directory
NAME=texlive2pkg
TDIR=/tmp/tl.$$
DISTDIR=@DISTDIR@
LIBEXECDIR=@PREFIX@/libexec/texlive2pkg
MAKE=@MAKE@
pkgtarball=""
doctarball=""
USAGE="${NAME} package-tarball [doc-tarball] -- create a texlive package for pkgsrc"
if [ ${#} -eq 1 ]; then
pkgtarball=$1
elif [ ${#} -eq 2 ]; then
pkgtarball=$1
doctarball=$2
case $doctarball in
/*.doc.tar.xz)
break ;;
*.doc.tar.xz)
doctarball=$PWD/$doctarball
break ;;
*)
echo ${USAGE}
exit 1
esac
else
echo ${USAGE}
exit 1
fi
case $pkgtarball in
/*.tar.xz)
break ;;
*.tar.xz)
pkgtarball=$PWD/$pkgtarball
break ;;
*)
echo ${USAGE}
exit 1
esac
if [ ! -f $pkgtarball ]; then
echo "File not found - $pkgtarball"
exit 1
fi
(mkdir $TDIR; cd $TDIR ; xzcat $pkgtarball | tar xf - tlpkg)
eval `$LIBEXECDIR/texlive.pkg $TDIR/tlpkg/tlpobj/*.tlpobj`
mkdir -p $DISTDIR/tex-$PKG-$REV
cp $* $DISTDIR/tex-$PKG-$REV/
(cd tex-$PKG; $MAKE makesum)
if [ -f "$doctarball" ]; then
(cd $TDIR; xzcat $doctarball | tar xf - tlpkg)
$LIBEXECDIR/texlive.pkg.doc $PKG $REV "$VERSION" "$LICENSE" "$HOMEPAGE" < $TDIR/tlpkg/tlpobj/${PKG}.doc.tlpobj && \
(cd tex-$PKG-doc; $MAKE makesum)
fi
rm -rf $TDIR