From owner-freebsd-ports@FreeBSD.ORG Tue Aug 14 01:49:33 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31DE31065672 for ; Tue, 14 Aug 2012 01:49:33 +0000 (UTC) (envelope-from dennylin93@hs.ntnu.edu.tw) Received: from mail.hs.ntnu.edu.tw (mail.hs.ntnu.edu.tw [140.131.149.3]) by mx1.freebsd.org (Postfix) with ESMTP id DDCC18FC0C for ; Tue, 14 Aug 2012 01:49:32 +0000 (UTC) Received: by mail.hs.ntnu.edu.tw (Postfix, from userid 1001) id 2EDB51C643D; Tue, 14 Aug 2012 09:49:30 +0800 (CST) Date: Tue, 14 Aug 2012 09:49:30 +0800 From: Denny Lin To: Dominic Fandrey Message-ID: <20120814014929.GD57907@mail.hs.ntnu.edu.tw> References: <50170F2E.2060804@bsdforen.de> <50276571.5070709@bsdforen.de> <20120813024530.GC57907@mail.hs.ntnu.edu.tw> <5028B1B7.4030909@bsdforen.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: <5028B1B7.4030909@bsdforen.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: ports@freebsd.org Subject: Re: [CFT] TexLive port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2012 01:49:33 -0000 --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--