aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2013-11-03 01:34:44 +0800
committerhrs <hrs@FreeBSD.org>2013-11-03 01:34:44 +0800
commit869b9403ca12cbdb2c8dda4717c5d842345486cb (patch)
treecb2f6eb5f10a5a79b338558282f45f14ec004411
parente314e0ad55b8892bd8e06698605cfa6ae62f2c1b (diff)
downloadfreebsd-ports-gnome-869b9403ca12cbdb2c8dda4717c5d842345486cb.tar.gz
freebsd-ports-gnome-869b9403ca12cbdb2c8dda4717c5d842345486cb.tar.zst
freebsd-ports-gnome-869b9403ca12cbdb2c8dda4717c5d842345486cb.zip
Add STAGEDIR support.
-rw-r--r--textproc/latex2html/Makefile41
-rw-r--r--textproc/latex2html/files/patch-config-install.pl11
-rw-r--r--textproc/latex2html/pkg-plist3
3 files changed, 29 insertions, 26 deletions
diff --git a/textproc/latex2html/Makefile b/textproc/latex2html/Makefile
index cdb1bc9fe1af..08860bb6c2ee 100644
--- a/textproc/latex2html/Makefile
+++ b/textproc/latex2html/Makefile
@@ -11,41 +11,34 @@ MASTER_SITE_SUBDIR= support/${PORTNAME}
MAINTAINER= hrs@FreeBSD.org
COMMENT= Convert LaTeX documents to HTML
-BUILD_DEPENDS= ${LOCALBASE}/bin/dvips:${PORTSDIR}/print/dvipsk-tetex \
- ${LOCALBASE}/bin/anytopnm:${PORTSDIR}/graphics/netpbm
+BUILD_DEPENDS= ${LOCALBASE}/bin/anytopnm:${PORTSDIR}/graphics/netpbm
RUN_DEPENDS:= ${BUILD_DEPENDS}
CONFLICTS= ja-latex2html-[0-9]*
-USES= perl5
-USE_GHOSTSCRIPT= yes
-USE_TEX= latex dvipsk
-GNU_CONFIGURE= yes
+USES= perl5
+USE_GHOSTSCRIPT=yes
+USE_TEX= latex dvipsk texhash
+GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-perl=${PERL} \
--disable-gif \
--shlibdir=${DATADIR} \
- --with-texpath=${PREFIX}/${TEXMFDIR}/tex/latex/html
+ --with-texpath=${PREFIX}/${TEXMFDIR}/tex/latex/html \
+ --without-mktexlsr
SUB_FILES= pkg-message
-PLIST_SUB= TEXMFDIR=${TEXMFDIR} MKTEXLSR=${MKTEXLSR}
-
-MAN1= latex2html.1
-
-TEXMFDIR= share/texmf
-MKTEXLSR= ${LOCALBASE}/bin/mktexlsr
+PLIST_SUB= TEXMFDIR=${TEXMFDIR}
+TEXHASHDIRS= ${TEXMFDIR}
PORTDOCS= FAQ INSTALL LICENSE README
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE= DOCS
+
+.include <bsd.port.options.mk>
post-install:
- ${INSTALL_MAN} ${FILESDIR}/latex2html.1 ${MANPREFIX}/man/man1
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
-.for file in ${PORTDOCS}
- @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
-.endfor
+ ${INSTALL_MAN} ${FILESDIR}/latex2html.1 ${STAGEDIR}${MANPREFIX}/man/man1
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.endif
- @${MKTEXLSR} ${PREFIX}/${TEXMFDIR}
- @${CAT} ${PKGMESSAGE}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/textproc/latex2html/files/patch-config-install.pl b/textproc/latex2html/files/patch-config-install.pl
new file mode 100644
index 000000000000..ef4ed1a1cd99
--- /dev/null
+++ b/textproc/latex2html/files/patch-config-install.pl
@@ -0,0 +1,11 @@
+--- config/install.pl.orig 2002-11-29 20:49:01.000000000 +0900
++++ config/install.pl 2013-11-03 02:31:07.000000000 +0900
+@@ -372,7 +372,7 @@
+
+ if($cfg{TEXPATH}) {
+ print "\nNote: trying to install LaTeX2HTML style files in TeX directory tree\n ($cfg{TEXPATH})\n";
+- unless(mkpath($cfg{TEXPATH})) {
++ unless(mkpath($ENV{DESTDIR}.$cfg{TEXPATH})) {
+ #my $testpath = $cfg{TEXPATH}; # to strip (latex2)html
+ #$testpath =~ s/[$dd$dd][^$dd$dd]*$//;
+ #if((-d $cfg{TEXPATH} && !-w _) || (-d $testpath && !-w _)) {
diff --git a/textproc/latex2html/pkg-plist b/textproc/latex2html/pkg-plist
index 472055d4f513..b15068d01a47 100644
--- a/textproc/latex2html/pkg-plist
+++ b/textproc/latex2html/pkg-plist
@@ -4,6 +4,7 @@ bin/pstoimg
bin/texexpand
lib/latex2html/cfgcache.pm
lib/latex2html/l2hconf.pm
+man/man1/latex2html.1.gz
%%DATADIR%%/IndicTeX-HTML/README
%%DATADIR%%/IndicTeX-HTML/bengali.perl
%%DATADIR%%/IndicTeX-HTML/bengali.sty
@@ -315,8 +316,6 @@ lib/latex2html/l2hconf.pm
%%TEXMFDIR%%/tex/latex/html/techexplHTML.tex
%%TEXMFDIR%%/tex/latex/html/url.sty
%%TEXMFDIR%%/tex/latex/html/verbatimfiles.sty
-@exec %%MKTEXLSR%% %D/%%TEXMFDIR%%
-@unexec %%MKTEXLSR%% %D/%%TEXMFDIR%%
@dirrm lib/latex2html
@dirrm %%DATADIR%%/IndicTeX-HTML
@dirrm %%DATADIR%%/L2hos