|
From: Mojca M. <moj...@gm...> - 2012-05-01 13:22:27
|
Dear gnuplot developers,
for some unknown reason macports has always used
make install prefix=$destdir
for installing gnuplot (= creating a package) as opposed to
make install DESTDIR=$destdir
If you try to use
./configure --prefix=/tmp/configureprefix
make
make install prefix=/tmp/makeprefix
you'll end up with all the gnuplot files in /tmp/configureprefix
except for the four tex files (= TEXDIR) in /tmp/makeprefix. Using
make install DESTDIR=$destdir
works properly.
My question is: would it make sense to fix the behaviour? Below are the patches:
--- a/configure.in
+++ b/configure.in
@@ -120,14 +120,14 @@ if test "$with_latex" = yes; then
dnl texdir has priority
if test "$TEXDIR" = "no"; then
if test "x$prefix" != "xNONE"; then
- TEXDIR=${prefix}/share/texmf
+ TEXDIR='${prefix}/share/texmf'
else
TEXDIR=`$KPSEXPAND '$TEXMFLOCAL'`
if test "x$TEXDIR" = "x" -o "$TEXDIR" = "\$TEXMFLOCAL"; then
- TEXDIR=${ac_default_prefix}/share/texmf
+ TEXDIR='${prefix}/share/texmf'
fi
fi
- TEXDIR=${TEXDIR}/tex/latex/gnuplot
+ TEXDIR="${TEXDIR}/tex/latex/gnuplot"
fi
fi
(I'm not exactly sure why ${ac_default_prefix} was there, so I'm not
100% sure about correctness of the replacement for that line, but
double braces in third line don't hurt and single brackets in the
first line are absolutely needed in order to prevent too early
expansion.)
Actually even more correct would be:
--- a/configure.in
+++ b/configure.in
@@ -120,14 +120,18 @@ if test "$with_latex" = yes; then
dnl texdir has priority
if test "$TEXDIR" = "no"; then
if test "x$prefix" != "xNONE"; then
- TEXDIR=${prefix}/share/texmf
+ TEXDIR='${prefix}/share/texmf'
else
TEXDIR=`$KPSEXPAND '$TEXMFLOCAL'`
if test "x$TEXDIR" = "x" -o "$TEXDIR" = "\$TEXMFLOCAL"; then
- TEXDIR=${ac_default_prefix}/share/texmf
+ TEXDIR='${prefix}/share/texmf'
+ elif
+ TEXDIR='${prefix}'"${TEXDIR}"
fi
fi
- TEXDIR=${TEXDIR}/tex/latex/gnuplot
+ TEXDIR="${TEXDIR}/tex/latex/gnuplot"
+ elif
+ TEXDIR='${prefix}'"${TEXDIR}"
fi
fi
For MacPorts this can easily be fixed by using DESTDIR instead of
prefix and I was told that DESTDIR is the right way to go anyway, but
I thought that it might nevertheless make sense to fix some quoting
"errors" in gnuplot sources. I didn't check yet how --with-lispdir
behaves.
My preference would actually be to rather switch to
--with-texmfdir=
instead, so that something like
--with-texmfdir=/usr/local/texlive/texmf-local
would end up with
/usr/local/texlive/texmf-local/tex/context/third/gnuplot-lua-tikz/t-gnuplot-lua-tikz.tex
/usr/local/texlive/texmf-local/tex/generic/gnuplot-lua-tikz/gnuplot-lua-tikz-common.tex
/usr/local/texlive/texmf-local/tex/latex/gnuplot-lua-tikz/gnuplot-lua-tikz.sty
/usr/local/texlive/texmf-local/tex/latex/gnuplot/gnuplot.cfg
/usr/local/texlive/texmf-local/tex/plain/gnuplot-lua-tikz/gnuplot-lua-tikz.tex
in contrast to current behaviour that simply puts plain TeX and
ConTeXt files to LaTeX directory where they are completely useless
(kpathsea won't find them).
Mojca
|