Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2012 09:49:30 +0800
From:      Denny Lin <dennylin93@hs.ntnu.edu.tw>
To:        Dominic Fandrey <kamikaze@bsdforen.de>
Cc:        ports@freebsd.org
Subject:   Re: [CFT] TexLive port
Message-ID:  <20120814014929.GD57907@mail.hs.ntnu.edu.tw>
In-Reply-To: <5028B1B7.4030909@bsdforen.de>
References:  <50170F2E.2060804@bsdforen.de> <50276571.5070709@bsdforen.de> <20120813024530.GC57907@mail.hs.ntnu.edu.tw> <5028B1B7.4030909@bsdforen.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--T4sUOijqQbZv57TR
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline

Hi,

On Mon, Aug 13, 2012 at 09:50:15AM +0200, Dominic Fandrey wrote:
> On 13/08/2012 04:45, Denny Lin wrote:
> >On Sun, Aug 12, 2012 at 10:12:33AM +0200, Dominic Fandrey wrote:
> >>On 31/07/2012 00:48, Dominic Fandrey wrote:
> >>Here we go:
> >>http://www.home.hs-karlsruhe.de/~fado1011/texlive/
> >>
> >># mkdir ~/texlive
> >># cd ~/texlive
> >># fetch http://www.home.hs-karlsruhe.de/~fado1011/texlive/patch-ports-graphics-poppler.txt http://www.home.hs-karlsruhe.de/~fado1011/texlive/shar-ports-print-texlive.txt
> >># cd /usr
> >># patch < ~/texlive/patch-ports-graphics-poppler.txt
> >># sh ~/texlive/shar-ports-print-texlive.txt
> >># portmaster graphics/poppler
> >
> >Adding this line to print/texlive-base/Makefile should remove the need
> >to patch graphics/poppler:
> >CFLAGS+= -I${LOCALBASE}/include
> >
> >>If you don't have teTeX installed:
> >># portmaster print/texlive
> >>
> >>If you have teTeX installed:
> >># portmaster -o print/texlive-texmf print/teTeX-texmf
> >># portmaster -o print/texlive-base print/teTeX-base
> >># portmaster -o print/texlive print/teTeX
> >
> >This probably needs to be run before portmaster if teTeX is installed:
> ># pkg_delete -f 'dvipsk-tetex-*'
> ># pkg_delete -f 'xdvik-tetex-*'
> >
> >print/texlive-base fails to build/install for some reason:
> >gmake[4]: Leaving directory `/usr/ports/print/texlive-base/work/texlive-20120701-source/texk/texlive'
> >gmake[3]: Leaving directory `/usr/ports/print/texlive-base/work/texlive-20120701-source/texk/texlive'
> >gmake[2]: Leaving directory `/usr/ports/print/texlive-base/work/texlive-20120701-source/texk/texlive'
> >gmake[1]: Leaving directory `/usr/ports/print/texlive-base/work/texlive-20120701-source/texk'
> >texlinks: config file `fmtutil.cnf' not found.
> 
> Something must have gone wrong with texlive-texmf. The file should be
> in ${LOCALBASE}/share/texmf/web2c/fmtutil.cnf
> 
> >I tried searching for fmtutil.cnf:
> ># find work/texlive-20120701-source/ -name fmtutil.cnf
> >work/texlive-20120701-source/texk/tetex/fmtutil.cnf
> >
> >This error occurs even when I patched poppler, so it should be unrelated
> >to the workaround mentioned above.
> 
> Maybe just try to wipe all the teTeX stuff and make a clean start
> with print/texlive. It works in my Tinderbox, so the installation
> procedure should be fine.

Ok, it seems that a few files were accidentally deleted in the process
of replacing teTeX with Tex Live. I reinstalled the Tex Live ports, and
the error disappeared.

However, I noticed a problem with the symlinks in print/texlive-base.
For instance, /usr/local/bin/mktexfmt pointed to fmtutil at first, but
this line in post-install:
	link="${LOCALBASE}/share/texmf$${link##*/texmf}";
changed it to /usr/local/share/texmffmtutil. Not all the symlinks need
to be modified.

I've attached a fix although it's not very elegant (everything worked as
expected after the symlinks were fixed). I also reworked texlive-texmf
to build the plist and install the files at the same time to make it run
faster.

Thanks for all the time and effort you put into porting Tex Live! It
would be great to see TeX Live replace teTeX, regardless of whose port
is used.

-- 
Denny Lin

--T4sUOijqQbZv57TR
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment; filename="texlive.patch"

--- print/texlive-base/Makefile.orig	2012-08-14 00:21:52.000000000 +0800
+++ print/texlive-base/Makefile	2012-08-14 09:36:09.000000000 +0800
@@ -74,6 +74,8 @@
 		--with-system-libpng \
 		--with-system-zlib
 
+CFLAGS+=	-I${LOCALBASE}/include
+
 PLIST_TMP=	${WRKDIR}/plist_tmp/
 PLIST_REPL=	-e "s|${PLIST_TMP}||1" \
 		-e "/^man\//d" \
@@ -87,7 +89,7 @@
 	@for bin in $$(${SED} -ne 's,^bin/,${PREFIX}/bin/,p' ${PLIST}); do \
 		${TEST} -h $$bin || continue; \
 		link=$$(${READLINK_CMD} $$bin); \
-		link="${LOCALBASE}/share/texmf$${link##*/texmf}"; \
+		link=$$(${ECHO} $$link | ${SED} -e 's,.*/texmf,${LOCALBASE}/share/texmf,1'); \
 		${RM} $$bin; \
 		${LN} -s "$$link" $$bin; done
 	@${SETENV} PATH=${PREFIX}/bin:$$PATH ${PREFIX}/bin/texlinks -v \
--- print/texlive-texmf/Makefile.orig	2012-08-14 00:19:50.000000000 +0800
+++ print/texlive-texmf/Makefile	2012-08-14 00:20:04.000000000 +0800
@@ -25,23 +25,18 @@
 EXCLUDE_FILES+=	--exclude '*/doc/*'
 .endif
 
-PLIST_REPL+=	-e 's|^${DISTNAME}/|share/|1' \
+PLIST_REPL+=	-e 's|^x |share/|1' \
 		-e '/\/$$/{s,^,@dirrmtry ,${.newline}x${.newline}H${.newline}d${.newline}}' \
 		-e '$${p${.newline}x${.newline}}'
 
 do-extract:
 	@${MKDIR} ${WRKDIR}
-	@${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES} \
-		> ${WRKDIR}/${DISTNAME}.tar
-
-do-build:
-	@${TAR} -tf ${WRKDIR}/${DISTNAME}.tar ${EXCLUDE_FILES} \
-		| ${SED} ${PLIST_REPL} > ${PLIST}
 
 do-install:
 	@${MKDIR} ${PREFIX}/share
-	@${TAR} -vxf ${WRKDIR}/${DISTNAME}.tar ${EXCLUDE_FILES} \
-		-C ${PREFIX}/share --strip-components 1
+	@${TAR} -vxf ${DISTDIR}/${DISTFILES} ${EXCLUDE_FILES} \
+		-C ${PREFIX}/share --strip-components 1 2>&1 \
+		| ${SED} ${PLIST_REPL} > ${PLIST}
 	@${REINPLACE_CMD} \
 		's,^TEXMFROOT[[:space:]]*=.*,TEXMFROOT = ${PREFIX}/share,' \
 		${PREFIX}/share/texmf/web2c/texmf.cnf

--T4sUOijqQbZv57TR--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120814014929.GD57907>