aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2015-09-26 05:42:25 +0800
committerhrs <hrs@FreeBSD.org>2015-09-26 05:42:25 +0800
commit0633a409d18129e9cda24d2e153cdea70336d1bc (patch)
tree7c43c2551b8b6bd4b1bfd57c3ca167e250b07681
parentd665d2f1699c8d3e0dffedfb1e65cf81810cef97 (diff)
downloadfreebsd-ports-gnome-0633a409d18129e9cda24d2e153cdea70336d1bc.tar.gz
freebsd-ports-gnome-0633a409d18129e9cda24d2e153cdea70336d1bc.tar.zst
freebsd-ports-gnome-0633a409d18129e9cda24d2e153cdea70336d1bc.zip
Add preliminary support of tlmgr.
- TLPDB and tlmgr.log are located in /var/db/tlpkg. - "tlmgr conf texmf" modifies /var/db/tlpkg/texmf.cnf. libkpathsea looks up it first if it exists and ignore the standard ones in PREFIX/share/texmf-dist/web2c/texmf.cnf or PREFIX/share/texmf-local/web2c/texmf.cnf. - "tlmgr update" can still break consistency of the installed texmf-* hierarchy by FreeBSD Ports Collection if it runs by root.
-rw-r--r--Mk/bsd.tex.mk2
-rw-r--r--devel/tex-kpathsea/Makefile1
-rw-r--r--devel/tex-kpathsea/files/patch-texmf.cnf20
-rw-r--r--print/texlive-base/Makefile2
-rw-r--r--print/texlive-base/files/patch-texk-texlive-linked_scripts-Makfile.in10
-rw-r--r--print/texlive-base/pkg-plist2
-rw-r--r--print/texlive-tlmgr/Makefile44
-rw-r--r--print/texlive-tlmgr/distinfo4
-rw-r--r--print/texlive-tlmgr/files/patch-texlive-20150521-source-texk-texlive-linked_scripts-texlive-tlmgr.pl86
-rw-r--r--print/texlive-tlmgr/files/patch-texlive-20150523-extra-tlpkg-TeXLive-TLUtils.pm32
-rw-r--r--print/texlive-tlmgr/pkg-plist9
11 files changed, 196 insertions, 16 deletions
diff --git a/Mk/bsd.tex.mk b/Mk/bsd.tex.mk
index 7d4137f6cc85..301b38a3a246 100644
--- a/Mk/bsd.tex.mk
+++ b/Mk/bsd.tex.mk
@@ -81,7 +81,7 @@ IGNORE= "texlive" must not be defined in USE_TEX
_USE_TEX_TEXMF_DEP= ${LOCALBASE}/${TEXMFDISTDIR}/README
_USE_TEX_TEXMF_PORT= print/${_USE_TEX_TEXMF_PKGNAME}
_USE_TEX_TEXMF_PKGNAME= texlive-texmf
-_USE_TEX_BASE_DEP= tlmgr
+_USE_TEX_BASE_DEP= texconfig
_USE_TEX_BASE_PORT= print/${_USE_TEX_BASE_PKGNAME}
_USE_TEX_BASE_PKGNAME= texlive-base
_USE_TEX_GBKLATEX_DEP= gbklatex
diff --git a/devel/tex-kpathsea/Makefile b/devel/tex-kpathsea/Makefile
index 586bfb302883..68a4b7f82168 100644
--- a/devel/tex-kpathsea/Makefile
+++ b/devel/tex-kpathsea/Makefile
@@ -2,6 +2,7 @@
PORTNAME= kpathsea
PORTVERSION= 6.2.1
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= ftp://tug.org/historic/systems/texlive/2015/
PKGNAMEPREFIX= tex-
diff --git a/devel/tex-kpathsea/files/patch-texmf.cnf b/devel/tex-kpathsea/files/patch-texmf.cnf
index ccb7aa455502..88dee70ebf9a 100644
--- a/devel/tex-kpathsea/files/patch-texmf.cnf
+++ b/devel/tex-kpathsea/files/patch-texmf.cnf
@@ -1,5 +1,5 @@
---- texmf.cnf.orig 2015-04-12 15:20:30 UTC
-+++ texmf.cnf
+--- texmf.cnf.orig 2015-04-13 00:20:30.000000000 +0900
++++ texmf.cnf 2015-09-26 04:35:35.579765000 +0900
@@ -51,7 +51,7 @@
% Redistributors will probably want $SELFAUTODIR/share, i.e., /usr/share.
% Kpathsea sets SELFAUTOLOC (the directory with the binary),
@@ -9,7 +9,7 @@
% The main tree of distributed packages and programs:
TEXMFDIST = $TEXMFROOT/texmf-dist
-@@ -61,7 +61,7 @@ TEXMFDIST = $TEXMFROOT/texmf-dist
+@@ -61,7 +61,7 @@
TEXMFMAIN = $TEXMFDIST
% Local additions to the distribution trees.
@@ -18,7 +18,15 @@
% TEXMFSYSVAR, where *-sys store cached runtime data.
TEXMFSYSVAR = $TEXMFROOT/texmf-var
-@@ -722,7 +722,7 @@ hash_extra = 600000
+@@ -495,6 +495,7 @@
+ $SELFAUTOLOC/texmf-dist/web2c,\
+ $SELFAUTOLOC/texmf/web2c,\
+ \
++/var/db/tlpkg,\
+ $SELFAUTODIR,\
+ $SELFAUTODIR/share/texmf-local/web2c,\
+ $SELFAUTODIR/share/texmf-dist/web2c,\
+@@ -722,7 +723,7 @@
pool_size = 6250000
% Minimum pool space after TeX's own strings; must be at least
% 25000 less than pool_size, but doesn't need to be nearly that large.
@@ -27,7 +35,7 @@
% Maximum number of strings.
max_strings = 500000
% min pool space left after loading .fmt
-@@ -732,7 +732,7 @@ pool_free = 47500
+@@ -732,7 +733,7 @@
% expansion works by writing material into the buffer and reparsing the
% line. As a consequence, certain constructs require the buffer to be
% very large, even though most documents can be handled with a small value.
@@ -36,7 +44,7 @@
% Hyphenation trie. The maximum possible is 4194303 (ssup_trie_size in
% the sources), but we don't need that much. The value here suffices
-@@ -743,7 +743,7 @@ trie_size = 1000000
+@@ -743,7 +744,7 @@
hyph_size = 8191 % prime number of hyphenation exceptions, >610, <32767.
% http://primes.utm.edu/curios/page.php/8191.html
diff --git a/print/texlive-base/Makefile b/print/texlive-base/Makefile
index 161e7700cfeb..74b92f71fda0 100644
--- a/print/texlive-base/Makefile
+++ b/print/texlive-base/Makefile
@@ -2,7 +2,7 @@
PORTNAME= texlive
PORTVERSION= 20150521
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= print
MASTER_SITES= TEX_CTAN/systems/texlive/Source/
PKGNAMESUFFIX= -base
diff --git a/print/texlive-base/files/patch-texk-texlive-linked_scripts-Makfile.in b/print/texlive-base/files/patch-texk-texlive-linked_scripts-Makfile.in
new file mode 100644
index 000000000000..67a144bd09ae
--- /dev/null
+++ b/print/texlive-base/files/patch-texk-texlive-linked_scripts-Makfile.in
@@ -0,0 +1,10 @@
+--- texk/texlive/linked_scripts/Makefile.in.orig 2015-09-25 04:27:05.446437000 +0900
++++ texk/texlive/linked_scripts/Makefile.in 2015-09-25 04:27:13.904147000 +0900
+@@ -386,7 +386,6 @@
+ texlive/fmtutil.pl \
+ texlive/fmtutil-sys.sh \
+ texlive/rungs.tlu \
+- texlive/tlmgr.pl \
+ texlive/updmap.pl \
+ texlive/updmap-sys.sh \
+ texliveonfly/texliveonfly.py \
diff --git a/print/texlive-base/pkg-plist b/print/texlive-base/pkg-plist
index a7817fb36ef7..6a589977ffc1 100644
--- a/print/texlive-base/pkg-plist
+++ b/print/texlive-base/pkg-plist
@@ -226,7 +226,6 @@ bin/texliveonfly
bin/texloganalyser
bin/texmfstart
bin/thumbpdf
-bin/tlmgr
bin/tpic2pdftex
bin/ttf2kotexfont
bin/ttf2pk
@@ -484,7 +483,6 @@ man/man5/updmap.cfg.5.gz
%%TEXMFDISTDIR%%/scripts/texlive/texconfig-sys.sh
%%TEXMFDISTDIR%%/scripts/texlive/texconfig.sh
%%TEXMFDISTDIR%%/scripts/texlive/texlinks.sh
-%%TEXMFDISTDIR%%/scripts/texlive/tlmgr.pl
%%TEXMFDISTDIR%%/scripts/texlive/updmap-sys.sh
%%TEXMFDISTDIR%%/scripts/texlive/updmap.pl
%%TEXMFDISTDIR%%/scripts/texliveonfly/texliveonfly.py
diff --git a/print/texlive-tlmgr/Makefile b/print/texlive-tlmgr/Makefile
index a4186dc5d0b9..823ba9cfb4ab 100644
--- a/print/texlive-tlmgr/Makefile
+++ b/print/texlive-tlmgr/Makefile
@@ -2,28 +2,60 @@
PORTNAME= texlive
PORTVERSION= 20150523
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= print perl5
-MASTER_SITES= ftp://tug.org/historic/systems/texlive/2015/
+MASTER_SITES= ftp://tug.org/historic/systems/texlive/2015/:tlmgr \
+ LOCAL/hrs:tlpkg
PKGNAMESUFFIX= -tlmgr
-DISTNAME= ${PORTNAME}-${PORTVERSION}-extra
+DISTFILES= ${PORTNAME}-${PORTVERSION}-extra${EXTRACT_SUFX}:tlmgr \
+ ${PORTNAME}-20150521-source${EXTRACT_SUFX}:tlmgr \
+ ${TLPKG_FILE}.xz:tlpkg
DIST_SUBDIR= TeX
+EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}-extra${EXTRACT_SUFX}
MAINTAINER= hrs@FreeBSD.org
COMMENT= TeXLive manager modules
-CONFLICTS= texlive-infra-[0-9]*
+RUN_DEPENDS= tex-kpathsea>=6.2.1_1:${PORTSDIR}/devel/tex-kpathsea
+
+CONFLICTS= texlive-infra-[0-9]* texlive-base-20150521_[12345]
USES= perl5 tar:xz
USE_PERL5= run
-USE_TEX= yes
+USE_TEX= kpathsea
+PATCH_WRKSRC= ${WRKDIR}
NO_BUILD= yes
+TLPKG_FILE= ${PORTNAME}-20150924.tlpdb
+EXTRACT_AFTER_ARGS_SOURCE= \
+ | ${TAR} -xf - -C ${WRKDIR} \
+ --no-same-permission --no-same-owner \
+ ${PORTNAME}-20150521-source/texk/texlive/linked_scripts/texlive
+
+post-extract:
+ ${CAT} ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-20150521-source${EXTRACT_SUFX} \
+ ${EXTRACT_AFTER_ARGS_SOURCE}
+
do-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}/scripts/texlive
+ ${INSTALL_SCRIPT} \
+ ${WRKDIR}/${PORTNAME}-20150521-source/texk/texlive/linked_scripts/texlive/tlmgr.pl \
+ ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}/scripts/texlive
+ cd ${STAGEDIR}${PREFIX}/bin && \
+ ${LN} -s ../${TEXMFDISTDIR}/scripts/texlive/tlmgr.pl tlmgr
@${MKDIR} ${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/TeXLive
- ${INSTALL_DATA} ${WRKSRC}/tlpkg/TeXLive/*.pm \
+ ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}-${PORTVERSION}-extra/tlpkg/TeXLive/*.pm \
${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/TeXLive
@${MKDIR} ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}
${TOUCH} ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}/.texlive-tlmgr
+ ${MKDIR} ${STAGEDIR}/var/db/tlpkg
+ ${TOUCH} ${STAGEDIR}/var/db/tlpkg/tlmgr.log
+ ${XZCAT} ${DISTDIR}/${DIST_SUBDIR}/${TLPKG_FILE}.xz \
+ > ${STAGEDIR}/var/db/tlpkg/texlive.tlpdb
+ ${INSTALL_DATA} ${LOCALBASE}/share/texmf-dist/web2c/texmf.cnf \
+ ${STAGEDIR}/var/db/tlpkg
+ ${MKDIR} ${STAGEDIR}/var/db/tlpkg/backups
+ ${MKDIR} ${STAGEDIR}/var/db/tlpkg/tlpobj
+ ${LN} -s /var/db/tlpkg ${STAGEDIR}${PREFIX}/share/tlpkg
.include <bsd.port.mk>
diff --git a/print/texlive-tlmgr/distinfo b/print/texlive-tlmgr/distinfo
index 3580e8ba6ca7..924b8c26cb64 100644
--- a/print/texlive-tlmgr/distinfo
+++ b/print/texlive-tlmgr/distinfo
@@ -1,2 +1,6 @@
SHA256 (TeX/texlive-20150523-extra.tar.xz) = d1282d91943ead1f7c50345c475115aab5459f003cec9eaad80122f5988270b6
SIZE (TeX/texlive-20150523-extra.tar.xz) = 369436
+SHA256 (TeX/texlive-20150521-source.tar.xz) = ed9bcd7bdce899c3c27c16a8c5c3017c4f09e1d7fd097038351b72497e9d4669
+SIZE (TeX/texlive-20150521-source.tar.xz) = 45459552
+SHA256 (TeX/texlive-20150924.tlpdb.xz) = 827e4a9446c5657d6714ef5b9be81fad5731b47d9b1b58df7eacc922aca9fb30
+SIZE (TeX/texlive-20150924.tlpdb.xz) = 1112660
diff --git a/print/texlive-tlmgr/files/patch-texlive-20150521-source-texk-texlive-linked_scripts-texlive-tlmgr.pl b/print/texlive-tlmgr/files/patch-texlive-20150521-source-texk-texlive-linked_scripts-texlive-tlmgr.pl
new file mode 100644
index 000000000000..0c9aaae4e3a0
--- /dev/null
+++ b/print/texlive-tlmgr/files/patch-texlive-20150521-source-texk-texlive-linked_scripts-texlive-tlmgr.pl
@@ -0,0 +1,86 @@
+--- texlive-20150521-source/texk/texlive/linked_scripts/texlive/tlmgr.pl.orig 2015-05-11 21:37:36 UTC
++++ texlive-20150521-source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+@@ -72,7 +72,7 @@ BEGIN {
+ }
+ if (-r "$bindir/$kpsewhichname") {
+ # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+- chomp($Master = `kpsewhich -var-value=SELFAUTOPARENT`);
++ chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
+ }
+ $::installerdir = $Master;
+
+@@ -581,13 +581,16 @@ for the full story.\n";
+ # besides doing normal logging if -logfile is specified, we try to log
+ # package related actions (install, remove, update) to
+ # the package-log file TEXMFSYSVAR/web2c/tlmgr.log
++ #
++ # *** FreeBSD specific: FreeBSD port uses /var/db/tlpkg/tlmgr.log.
++ #
+ $packagelogged = 0; # how many msgs we logged
+ chomp (my $texmfsysvar = `kpsewhich -var-value=TEXMFSYSVAR`);
+ $packagelogfile = $opts{"package-logfile"};
+ if ($opts{"usermode"}) {
+ $packagelogfile ||= "$::maintree/web2c/tlmgr.log";
+ } else {
+- $packagelogfile ||= "$texmfsysvar/web2c/tlmgr.log";
++ $packagelogfile ||= "/var/db/tlpkg/tlmgr.log";
+ }
+ #
+ # Try to open the packagelog file, but do NOT die when that does not work
+@@ -650,8 +653,8 @@ sub give_version {
+ if (!defined($::version_string)) {
+ $::version_string = "";
+ $::version_string .= "tlmgr revision $tlmgrrevision\n";
+- $::version_string .= "tlmgr using installation: $Master\n";
+- if (open (REL_TL, "$Master/release-texlive.txt")) {
++ $::version_string .= "tlmgr using installation: $Master/tlpkg\n";
++ if (open (REL_TL, "$Master/tlpkg/release-texlive.txt")) {
+ # print first and last lines, which have the TL version info.
+ my @rel_tl = <REL_TL>;
+ $::version_string .= $rel_tl[0];
+@@ -2085,7 +2088,7 @@ sub write_w32_updater {
+ my $opt_src = $localtlpdb->option("install_srcfiles");
+ my $opt_doc = $localtlpdb->option("install_docfiles");
+ my $root = $localtlpdb->root;
+- my $temp = "$root/temp";
++ my $temp = "$root/tlpkg/temp";
+ TeXLive::TLUtils::mkdirhier($temp);
+ tlwarn("Backup option not implemented for infrastructure update.\n") if ($opts{"backup"});
+ if ($media eq 'local_uncompressed') {
+@@ -4663,19 +4666,19 @@ sub action_uninstall {
+ system("rm", "-rf", "$Master/texmf-var");
+ system("rm", "-rf", "$Master/tlpkg");
+ system("rm", "-rf", "$Master/bin");
+- system("rm", "-rf", "$Master/readme-html.dir");
+- system("rm", "-rf", "$Master/readme-txt.dir");
++ system("rm", "-rf", "$Master/tlpkg/readme-html.dir");
++ system("rm", "-rf", "$Master/tlpkg/readme-txt.dir");
+ for my $f (qw/doc.html index.html LICENSE.CTAN LICENSE.TL README
+ README.usergroups release-texlive.txt texmf.cnf/) {
+- system("rm", "-f", "$Master/$f");
++ system("rm", "-f", "$Master/tlpkg/$f");
+ }
+- if (-d "$Master/temp") {
+- system("rmdir", "--ignore-fail-on-non-empty", "$Master/temp");
++ if (-d "$Master/tlpkg/temp") {
++ system("rmdir", "--ignore-fail-on-non-empty", "$Master/tlpkg/temp");
+ }
+- unlink("$Master/install-tl.log");
++ unlink("$Master/tlpkg/install-tl.log");
+ # should we do that????
+- system("rm", "-rf", "$Master/texmf-config");
+- system("rmdir", "--ignore-fail-on-non-empty", "$Master");
++ # system("rm", "-rf", "$Master/texmf-config");
++ # system("rmdir", "--ignore-fail-on-non-empty", "$Master");
+ }
+
+
+@@ -5466,7 +5469,7 @@ sub action_conf {
+ $fn || ( $fn = "$TEXMFCONFIG/tlmgr/config" ) ;
+ $cf = TeXLive::TLConfFile->new($fn, "#", "=");
+ } elsif ($arg eq "texmf") {
+- $fn || ( $fn = "$Master/texmf.cnf" ) ;
++ $fn || ( $fn = "$Master/tlpkg/texmf.cnf" ) ;
+ $cf = TeXLive::TLConfFile->new($fn, "[%#]", "=");
+ } elsif ($arg eq "updmap") {
+ $fn || ( chomp ($fn = `kpsewhich updmap.cfg`) ) ;
diff --git a/print/texlive-tlmgr/files/patch-texlive-20150523-extra-tlpkg-TeXLive-TLUtils.pm b/print/texlive-tlmgr/files/patch-texlive-20150523-extra-tlpkg-TeXLive-TLUtils.pm
new file mode 100644
index 000000000000..be5d2e9bb81f
--- /dev/null
+++ b/print/texlive-tlmgr/files/patch-texlive-20150523-extra-tlpkg-TeXLive-TLUtils.pm
@@ -0,0 +1,32 @@
+--- texlive-20150523-extra/tlpkg/TeXLive/TLUtils.pm.orig 2015-05-06 20:30:33 UTC
++++ texlive-20150523-extra/tlpkg/TeXLive/TLUtils.pm
+@@ -228,22 +228,14 @@ subsequent calls just return that value.
+
+ sub platform {
+ unless (defined $::_platform_) {
+- if ($^O =~ /^MSWin/i) {
+- $::_platform_ = "win32";
+- } else {
+- my $config_guess = "$::installerdir/tlpkg/installer/config.guess";
+-
+- # We cannot rely on #! in config.guess but have to call /bin/sh
+- # explicitly because sometimes the 'noexec' flag is set in
+- # /etc/fstab for ISO9660 file systems.
+- chomp (my $guessed_platform = `/bin/sh '$config_guess'`);
+-
+- # For example, if the disc or reader has hardware problems.
+- die "$0: could not run $config_guess, cannot proceed, sorry"
+- if ! $guessed_platform;
+-
++ chomp(my $uname_m = `uname -m`);
++ chomp(my $uname_r = `uname -r`);
++ chomp(my $uname_s = `uname -s`);
++ $uname_r =~ s/-.*$//;
++ $uname_s = lc($uname_s);
++ $guessed_platform = sprintf("%s-unknown-%s%s", $uname_m,
++ $uname_s, $uname_r);
+ $::_platform_ = platform_name($guessed_platform);
+- }
+ }
+ return $::_platform_;
+ }
diff --git a/print/texlive-tlmgr/pkg-plist b/print/texlive-tlmgr/pkg-plist
index 1cae25b4652c..2d6be1845131 100644
--- a/print/texlive-tlmgr/pkg-plist
+++ b/print/texlive-tlmgr/pkg-plist
@@ -1,3 +1,5 @@
+bin/tlmgr
+share/tlpkg
%%SITE_PERL%%/TeXLive/TLConfFile.pm
%%SITE_PERL%%/TeXLive/TLConfig.pm
%%SITE_PERL%%/TeXLive/TLDownload.pm
@@ -10,3 +12,10 @@
%%SITE_PERL%%/TeXLive/TLWinGoo.pm
%%SITE_PERL%%/TeXLive/TeXCatalogue.pm
%%TEXMFDISTDIR%%/.texlive-tlmgr
+%%TEXMFDISTDIR%%/scripts/texlive/tlmgr.pl
+/var/db/tlpkg/texlive.tlpdb
+/var/db/tlpkg/texmf.cnf
+/var/db/tlpkg/tlmgr.log
+@dir /var/db/tlpkg/backups
+@dir /var/db/tlpkg/tlpobj
+@dir /var/db/tlpkg