Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 484140 - app-text/texlive-core: please review prefix changes
Summary: app-text/texlive-core: please review prefix changes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords: Inclusion, PATCH
Depends on:
Blocks: prefix-gx86
  Show dependency tree
 
Reported: 2013-09-07 22:17 UTC by Christoph Junghans (RETIRED)
Modified: 2013-09-11 15:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch against texlive-core-2013-r1.ebuild (texlive-core-2013-r1.ebuild.patch,5.92 KB, patch)
2013-09-07 22:17 UTC, Christoph Junghans (RETIRED)
Details | Diff
patch against texlive-core-2013-r1.ebuild (texlive-core-2013-r1.ebuild.patch,5.35 KB, patch)
2013-09-11 02:20 UTC, Christoph Junghans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2013-09-07 22:17:04 UTC
Created attachment 358214 [details, diff]
patch against texlive-core-2013-r1.ebuild

After bug #482346, the changes left are trivial:
- added ${EPREFIX} in a couple of configure options
- added --with-kpathsea-includes and --with-freetype2-libdir, the latter needs get_libdir and hence multilib.eclass
- added --disable-xdv2pdf, which changes nothing as it was disabled by default
- ${ROOT} -> ${EROOT}
- ${D} -> ${ED}
Comment 1 Alexis Ballier gentoo-dev 2013-09-07 23:07:16 UTC
Comment on attachment 358214 [details, diff]
patch against texlive-core-2013-r1.ebuild

>-		--with-freetype2-include=/usr/include \
>+		--with-freetype2-include="${EPREFIX}"/usr/include/freetype2 \

doesnt look right


>@@ -216,6 +218,7 @@
> 		--disable-dvisvgm \
> 		--disable-vlna \
> 		--disable-xdvipdfmx \
>+		--disable-xdv2pdf \


why ? 
iirc this is an improved xdvipdfmx for macos


> src_compile() {
> 	tc-export CC CXX AR RANLIB
>-	emake SHELL=/bin/sh texmf=${TEXMF_PATH:-/usr/share/texmf-dist} || die "emake failed"
>+	emake SHELL="${EPREFIX}"/bin/sh texmf="${EPREFIX}"${TEXMF_PATH:-/usr/share/texmf-dist} || die "emake failed"

better change the value of TEXMF_PATH (and remove the :-default which is useless here)

>-	emake DESTDIR="${D}" texmf="${D}${TEXMF_PATH:-/usr/share/texmf-dist}" run_texlinks="true" run_mktexlsr="true" install || die "install failed"
>+	emake DESTDIR="${D}" texmf="${ED}${TEXMF_PATH:-/usr/share/texmf-dist}" run_texlinks="true" run_mktexlsr="true" install || die "install failed"

ditto

>-	echo 'CONFIG_PROTECT_MASK="/etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d"' > "${D}/etc/env.d/98texlive"
>+	echo 'CONFIG_PROTECT_MASK="/etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d"' > "${ED}/etc/env.d/98texlive"

dont you want EPREFIX in the CONFIG_PROTECT_MASK too ?
Comment 2 Christoph Junghans (RETIRED) gentoo-dev 2013-09-07 23:58:00 UTC
(In reply to Alexis Ballier from comment #1)
> Comment on attachment 358214 [details, diff] [details, diff]
> patch against texlive-core-2013-r1.ebuild
> 
> >-		--with-freetype2-include=/usr/include \
> >+		--with-freetype2-include="${EPREFIX}"/usr/include/freetype2 \
> doesnt look right
$ freetype-config --cflags
-I/usr/include/freetype2

> >@@ -216,6 +218,7 @@
> > 		--disable-dvisvgm \
> > 		--disable-vlna \
> > 		--disable-xdvipdfmx \
> >+		--disable-xdv2pdf \
> why ? 
> iirc this is an improved xdvipdfmx for macos
I don't know the historic reason for that, but like I said above, xdv2pdf is disabled by default and needs to explicitly be enabled with --enable-xdv2pdf, so this makes no difference to the current state. Maybe grobian remember why this is here.

> > src_compile() {
> > 	tc-export CC CXX AR RANLIB
> >-	emake SHELL=/bin/sh texmf=${TEXMF_PATH:-/usr/share/texmf-dist} || die "emake failed"
> >+	emake SHELL="${EPREFIX}"/bin/sh texmf="${EPREFIX}"${TEXMF_PATH:-/usr/share/texmf-dist} || die "emake failed"
> better change the value of TEXMF_PATH (and remove the :-default which is
> useless here)
Could be done, but then some other locations look more ugly then, namely
mv "${ED}${TEXMF_PATH}/web2c/updmap.cfg" "${ED}/etc/texmf/updmap.d/00updmap.cfg"
becomes
mv "${D}${TEXMF_PATH}/web2c/updmap.cfg" "${ED}/etc/texmf/updmap.d/00updmap.cfg
same for
rm -f "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf" -> ${D}

I prefer having ${ED} everywhere except in emake install DESTDIR="${D}", but in  the end it is up to you as the maintainer. How do you want it?

> >-	echo 'CONFIG_PROTECT_MASK="/etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d"' > "${D}/etc/env.d/98texlive"
> >+	echo 'CONFIG_PROTECT_MASK="/etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d"' > "${ED}/etc/env.d/98texlive"
> dont you want EPREFIX in the CONFIG_PROTECT_MASK too ?
No, this is automatically done by portage internally.
Comment 3 Alexis Ballier gentoo-dev 2013-09-10 21:11:36 UTC
(In reply to Christoph Junghans from comment #2)
> (In reply to Alexis Ballier from comment #1)
> > Comment on attachment 358214 [details, diff] [details, diff] [details, diff]
> > patch against texlive-core-2013-r1.ebuild
> > 
> > >-		--with-freetype2-include=/usr/include \
> > >+		--with-freetype2-include="${EPREFIX}"/usr/include/freetype2 \
> > doesnt look right
> $ freetype-config --cflags
> -I/usr/include/freetype2

IIRC this was correct for texlive since it wanted the toplevel include dir and then would append the freetype2 subdir by itself. what does configure say ? what does texlive source include ?

> > >@@ -216,6 +218,7 @@
> > > 		--disable-dvisvgm \
> > > 		--disable-vlna \
> > > 		--disable-xdvipdfmx \
> > >+		--disable-xdv2pdf \
> > why ? 
> > iirc this is an improved xdvipdfmx for macos
> I don't know the historic reason for that, but like I said above, xdv2pdf is
> disabled by default and needs to explicitly be enabled with
> --enable-xdv2pdf, so this makes no difference to the current state. Maybe
> grobian remember why this is here.

I don't really mind since it is macos specific but I think xdv2pdf is better since it makes better use of macos system fonts. it might even be what xetex calls by default. maybe its not the case anymore though.


> > > src_compile() {
> > > 	tc-export CC CXX AR RANLIB
> > >-	emake SHELL=/bin/sh texmf=${TEXMF_PATH:-/usr/share/texmf-dist} || die "emake failed"
> > >+	emake SHELL="${EPREFIX}"/bin/sh texmf="${EPREFIX}"${TEXMF_PATH:-/usr/share/texmf-dist} || die "emake failed"
> > better change the value of TEXMF_PATH (and remove the :-default which is
> > useless here)
> Could be done, but then some other locations look more ugly then, namely
> mv "${ED}${TEXMF_PATH}/web2c/updmap.cfg"
> "${ED}/etc/texmf/updmap.d/00updmap.cfg"
> becomes
> mv "${D}${TEXMF_PATH}/web2c/updmap.cfg"
> "${ED}/etc/texmf/updmap.d/00updmap.cfg
> same for
> rm -f "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf" -> ${D}
> 
> I prefer having ${ED} everywhere except in emake install DESTDIR="${D}", but
> in  the end it is up to you as the maintainer. How do you want it?

As you prefer. I thought it'd be simpler to have it in TEXMF_PATH and do the same in texlive-common.eclass but it seems it's not simpler for texlive-core and since we insinto TEXMF_PATH in the eclasses it'd be even worse.

> 
> > >-	echo 'CONFIG_PROTECT_MASK="/etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d"' > "${D}/etc/env.d/98texlive"
> > >+	echo 'CONFIG_PROTECT_MASK="/etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d"' > "${ED}/etc/env.d/98texlive"
> > dont you want EPREFIX in the CONFIG_PROTECT_MASK too ?
> No, this is automatically done by portage internally.

ok, good.
Comment 4 Alexis Ballier gentoo-dev 2013-09-10 21:13:10 UTC
(In reply to Alexis Ballier from comment #3)
> > > >@@ -216,6 +218,7 @@
> > > > 		--disable-dvisvgm \
> > > > 		--disable-vlna \
> > > > 		--disable-xdvipdfmx \
> > > >+		--disable-xdv2pdf \
> > > why ? 
> > > iirc this is an improved xdvipdfmx for macos
> > I don't know the historic reason for that, but like I said above, xdv2pdf is
> > disabled by default and needs to explicitly be enabled with
> > --enable-xdv2pdf, so this makes no difference to the current state. Maybe
> > grobian remember why this is here.
> 
> I don't really mind since it is macos specific but I think xdv2pdf is better
> since it makes better use of macos system fonts. it might even be what xetex
> calls by default. maybe its not the case anymore though.

anyway, if it is disabled by default I'd rather let texlive upstream chose whether to install it or not and remove that --disable line
Comment 5 Christoph Junghans (RETIRED) gentoo-dev 2013-09-11 02:17:10 UTC
(In reply to Alexis Ballier from comment #3)
> (In reply to Christoph Junghans from comment #2)
> > (In reply to Alexis Ballier from comment #1)
> > > Comment on attachment 358214 [details, diff] [details, diff] [details, diff] [details, diff]
> > > patch against texlive-core-2013-r1.ebuild
> > > 
> > > >-		--with-freetype2-include=/usr/include \
> > > >+		--with-freetype2-include="${EPREFIX}"/usr/include/freetype2 \
> > > doesnt look right
> > $ freetype-config --cflags
> > -I/usr/include/freetype2
> IIRC this was correct for texlive since it wanted the toplevel include dir
> and then would append the freetype2 subdir by itself. what does configure
> say ? what does texlive source include ?
I got it, configure has no option with-freetype2-*, but --with-freetype-*. However, if these options are missing, which is the case here, configure runs
freetype-config internally (see m4/kpse-freetype2-flags.m4). So in the end these two option could just be removed.

> 
> > > >@@ -216,6 +218,7 @@
> > > > 		--disable-dvisvgm \
> > > > 		--disable-vlna \
> > > > 		--disable-xdvipdfmx \
> > > >+		--disable-xdv2pdf \
> > > why ? 
> > > iirc this is an improved xdvipdfmx for macos
> > I don't know the historic reason for that, but like I said above, xdv2pdf is
> > disabled by default and needs to explicitly be enabled with
> > --enable-xdv2pdf, so this makes no difference to the current state. Maybe
> > grobian remember why this is here.
> I don't really mind since it is macos specific but I think xdv2pdf is better
> since it makes better use of macos system fonts. it might even be what xetex
> calls by default. maybe its not the case anymore though.
Will get removed.
> 
> 
> > > > src_compile() {
> > > > 	tc-export CC CXX AR RANLIB
> > > >-	emake SHELL=/bin/sh texmf=${TEXMF_PATH:-/usr/share/texmf-dist} || die "emake failed"
> > > >+	emake SHELL="${EPREFIX}"/bin/sh texmf="${EPREFIX}"${TEXMF_PATH:-/usr/share/texmf-dist} || die "emake failed"
> > > better change the value of TEXMF_PATH (and remove the :-default which is
> > > useless here)
> > Could be done, but then some other locations look more ugly then, namely
> > mv "${ED}${TEXMF_PATH}/web2c/updmap.cfg"
> > "${ED}/etc/texmf/updmap.d/00updmap.cfg"
> > becomes
> > mv "${D}${TEXMF_PATH}/web2c/updmap.cfg"
> > "${ED}/etc/texmf/updmap.d/00updmap.cfg
> > same for
> > rm -f "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf" -> ${D}
> > 
> > I prefer having ${ED} everywhere except in emake install DESTDIR="${D}", but
> > in  the end it is up to you as the maintainer. How do you want it?
> As you prefer. I thought it'd be simpler to have it in TEXMF_PATH and do the
> same in texlive-common.eclass but it seems it's not simpler for texlive-core
> and since we insinto TEXMF_PATH in the eclasses it'd be even worse.
So I leave it like it is!
Comment 6 Christoph Junghans (RETIRED) gentoo-dev 2013-09-11 02:20:50 UTC
Created attachment 358454 [details, diff]
patch against texlive-core-2013-r1.ebuild

Updated version after discussion with aballier.

Please commit or give a ok for me to commit.
Comment 7 Alexis Ballier gentoo-dev 2013-09-11 13:39:42 UTC
(In reply to Christoph Junghans from comment #6)
> Created attachment 358454 [details, diff] [details, diff]
> patch against texlive-core-2013-r1.ebuild
> 
> Updated version after discussion with aballier.
> 
> Please commit or give a ok for me to commit.

all good. feel free to commit, thanks.
Comment 8 Christoph Junghans (RETIRED) gentoo-dev 2013-09-11 15:38:37 UTC
+  11 Sep 2013; Christoph Junghans <ottxor@gentoo.org>
+  texlive-core-2013-r1.ebuild:
+  added prefix support (bug #484140)
+