diff options
Diffstat (limited to 'japanese/ptex/Makefile')
-rw-r--r-- | japanese/ptex/Makefile | 185 |
1 files changed, 139 insertions, 46 deletions
diff --git a/japanese/ptex/Makefile b/japanese/ptex/Makefile index bd7666407762..02cd4aff0931 100644 --- a/japanese/ptex/Makefile +++ b/japanese/ptex/Makefile @@ -1,69 +1,162 @@ -# New ports collection makefile for: pTeX -# Date created: 05 Oct 1997 -# Whom: max +# New ports collection makefile for: ptex +# Date created: 9 Feb 2004 +# Whom: hrs # # $FreeBSD$ -# PORTNAME= ptex -PORTVERSION= 3.1.3 +PORTVERSION= 3.1.9 +PORTREVISION= 5 CATEGORIES= japanese print -MASTER_SITES= ftp://ftp.ascii.co.jp/pub/TeX/ascii-ptex/tetex/ +MASTER_SITES= ${MASTER_SITE_TEX_CTAN} \ + ftp://ftp.ascii.co.jp/pub/TeX/ascii-ptex/tetex/:1 \ + ftp://ftp.ascii.co.jp/pub/TeX/ascii-ptex/jvf/:2 +MASTER_SITE_SUBDIR= systems/unix/teTeX/3.0/distrib PKGNAMEPREFIX= ja- -DISTNAME= ${PORTNAME}-src-${PORTVERSION} +PKGNAMESUFFIX= -tetex +DISTFILES= ptex-src-${VER_PTEX}${EXTRACT_SUFX}:1 \ + ptex-texmf-${VER_PTEXTEXMF}${EXTRACT_SUFX}:1 \ + ${TETEX_SRC}${EXTRACT_SUFX} \ + jis${EXTRACT_SUFX}:2 morisawa${EXTRACT_SUFX}:2 DIST_SUBDIR= teTeX -MAINTAINER= ports@FreeBSD.org -COMMENT= Japanese specific files for ASCII Japanese pTeX - -BUILD_DEPENDS= ${LOCALBASE}/share/texmf/ptex/plain/base/ptex.tex:${PORTSDIR}/japanese/ptex-base -RUN_DEPENDS= ${LOCALBASE}/share/texmf/ptex/plain/base/ptex.tex:${PORTSDIR}/japanese/ptex-base +MAINTAINER= hrs@FreeBSD.org +COMMENT= ASCII Japanese pTeX which supports teTeX distribution -BROKEN= Does not build (uses DESTDIR internally) -DEPRECATED= ${BROKEN} -EXPIRATION_DATE=2006-12-01 +BUILD_DEPENDS= ${TEXMFLOCAL_LSR}:${PORTSDIR}/print/tex-texmflocal \ + ${LOCALBASE}/${TEXMFDISTDIR}/LICENSE.texmf:${PORTSDIR}/print/teTeX-texmf \ + mktexlsr:${PORTSDIR}/print/teTeX-base +RUN_DEPENDS= ${TEXMFLOCAL_LSR}:${PORTSDIR}/print/tex-texmflocal \ + ${LOCALBASE}/${TEXMFDISTDIR}/LICENSE.texmf:${PORTSDIR}/print/teTeX-texmf \ + mktexlsr:${PORTSDIR}/print/teTeX-base +LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png \ + wwwcore.1:${PORTSDIR}/www/libwww \ + t1.5:${PORTSDIR}/devel/t1lib -USE_GMAKE= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= ${KANJICODE} -WRKSRC= ${WRKDIRPREFIX}${.CURDIR}/../ptex-base/work/tetex-src-${TETEX_VERSION}/texk/web2c/${SRCDIR} +CONFIGURE_ENV= INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ + INSTALL_DATA="${INSTALL_DATA}" \ + INSTALL_PROGRAM="${INSTALL_PROGRAM}" +USE_GMAKE= yes +.if make(post-extract) || make(do-build) +MAKE_ENV= TEXMFLOCALDIR=${WRKDIR}/texmf-tmp \ + TEXMFDUMP=${LOCALBASE}/${TEXMFLOCALDIR} \ + TEXMFDISTDIR=${LOCALBASE}/${TEXMFDISTDIR} +.endif ALL_TARGET= default +PLIST_SUB= MKTEXLSR=${MKTEXLSR} \ + TEXMFDISTDIR=${TEXMFDISTDIR} \ + TEXMFCONFIGDIR=${TEXMFCONFIGDIR} \ + TEXMFVARDIR=${TEXMFVARDIR} \ + TEXMFDIR=${TEXMFDIR} \ + UPDMAP_SYS="${UPDMAP_SYS}" \ + UPDMAPDIR=${UPDMAPDIR} \ + MAPDIR=${MAPDIR} \ + VFDIR=${VFDIR} \ + TFMDIR=${TFMDIR} + +.if !make(do-patch) +WRKSRC= ${WRKDIR}/${TETEX_SRC}/texk/web2c/ptex-${VER_PTEX} +.else +WRKSRC= ${WRKDIR}/${TETEX_SRC} +.endif + +WRKSRC_TETEX= ${WRKDIR}/${TETEX_SRC} +WRKSRC_PTEX= ${WRKDIR}/ptex-src-${VER_PTEX} +TETEX_SRC= tetex-src-3.0 +VER_PTEX= ${PORTVERSION} +VER_PTEXTEXMF= 2.4 KANJICODE?= euc -SRCDIR= ptex-src-${PORTVERSION} -TETEX_VERSION= 2.0.2 -BINARIES= ptex pdvitype jbibtex pltotf tftopl +TEXMFDIR?= share/texmf +TEXMFDISTDIR?= share/texmf-dist +TEXMFCONFIGDIR?=share/texmf-config +TEXMFLOCALDIR?= share/texmf-local +TEXMFVARDIR?= share/texmf-var +TEXMFLOCAL_LSR?=${LOCALBASE}/${TEXMFLOCALDIR}/ls-R +MKTEXLSR?= ${LOCALBASE}/bin/mktexlsr +LIBPNG_PREFIX?= ${LOCALBASE} +LIBWWW_PREFIX?= ${LOCALBASE} +LIBT1_PREFIX?= ${LOCALBASE} +FONTSMAPDIR= ${TEXMFDIR}/fonts/map/ptex +FONTSMAPVARDIR= ${TEXMFVARDIR}/fonts/map/ptex -pre-extract: - @${ECHO_MSG} "The default kanji code is ${KANJICODE}." - @${ECHO_MSG} "You can change the kanji code at ptex runtime with the -kanji option." - @${ECHO_MSG} "e.g. ptex -kanji=sjis" - @${ECHO_MSG} "If you would like to change the default kanji code, run make as follows:" - @${ECHO_MSG} " make KANJICODE=sjis" - @${ECHO_MSG} "for Shift-JIS. KANJICODE can be one of sjis, jis or euc." - @sleep 10 +UPDMAP_SYS= ${PREFIX}/bin/updmap-sys --progname=ptex +UPDMAPDIR= ${TEXMFDIR}/updmap -pre-configure: -.if !exists(${WRKDIRPREFIX}${.CURDIR}/../ptex-base/work/.build_done.ja-ptex-base-${PORTVERSION}) - @(cd ${.CURDIR}/../ptex-base; \ - ${SETENV} ${MAKE_ENV} ${MAKE}) -.endif - @${RM} -rf ${WRKSRC} - @${MV} ${WRKDIR}/${SRCDIR} ${WRKDIRPREFIX}${.CURDIR}/../ptex-base/work/tetex-src-${TETEX_VERSION}/texk/web2c +SUB_FILES= updmap-ptex +SUB_LIST= PREFIX=${PREFIX} \ + TEXMFDIR=${TEXMFDIR} \ + DVIPSDIR=${DVIPSDIR} \ + TEXMFVARDIR=${TEXMFVARDIR} \ + FONTSMAPDIR=${FONTSMAPDIR} \ + FONTSMAPVARDIR=${FONTSMAPVARDIR} \ + UPDMAPDIR=${UPDMAPDIR} + +INSTDIRS= doc fonts jbibtex ptex +DOC_FILES= COPYRIGHT COPYRIGHT.jis Changes.txt README.txt + +MAPDIR= ${TEXMFDIR}/fonts/map/ptex/dvips +VFDIR= ${TEXMFDIR}/fonts/vf/ptex +TFMDIR= ${TEXMFDIR}/fonts/tfm/ptex -pre-install: - @if [ -L ${PREFIX}/share/texmf/web2c/texmf.cnf ]; then \ - ${RM} ${PREFIX}/share/texmf/web2c/texmf.cnf; \ - fi +post-extract: + ${MV} ${WRKSRC_PTEX} ${WRKSRC} + ${MKDIR} ${WRKDIR}/texmf-tmp + cd ${WRKDIR} && \ + ${MV} ${INSTDIRS} texmf-tmp && \ + ${RM} -f texmf-tmp/ptex/platex/base/.cvsignore + +pre-configure: + ${SETENV} ${MAKE_ENV} ${MKTEXLSR} ${WRKDIR}/texmf-tmp + cd ${WRKSRC_TETEX} && \ + ${SETENV} ${CONFIGURE_ENV} ${SH} ${CONFIGURE_SCRIPT} \ + --prefix=${PREFIX} \ + --disable-multiplatform \ + --without-texinfo --without-dialog \ + --with-system-ncurses --with-system-zlib \ + --with-system-wwwlib --with-libwww-libdir=${LIBWWW_PREFIX}/lib \ + --with-libwww-include=${LIBWWW_PREFIX}/include/w3c-libwww \ + --with-system-pnglib --with-pnglib-libdir=${LIBPNG_PREFIX}/lib \ + --with-pnglib-include=${LIBPNG_PREFIX}/include \ + --with-system-t1lib --with-t1lib-libdir=${LIBT1_PREFIX}/lib \ + --with-t1lib-include=${LIBT1_PREFIX}/include \ + --without-xdvik --without-oxdvik \ + --without-dvipsk --without-odvipsk \ + --without-x11 --without-dvipdfm \ + --without-pdftex --without-pdfetex --without-pdfxtex \ + --without-omega --without-eomega + --without-etex && \ + ${SETENV} ${MAKE_ENV} ${MAKE} ${ALL_TARGET} post-install: -.for bin in ${BINARIES} - @${STRIP_CMD} ${PREFIX}/bin/${bin} + cd ${WRKDIR}/texmf-tmp && \ + ${TAR} cf - ${INSTDIRS} | \ + (cd ${PREFIX}/${TEXMFDIR} && ${TAR} xf -) + cd ${WRKDIR} && \ + ${INSTALL_DATA} ${DOC_FILES} ${PREFIX}/${TEXMFDIR}/doc/ptex + ${AWK} '/@comment INSTALL_DATA/{printf "${MKDIR} ${PREFIX}/%s && ${INSTALL_DATA} ${WRKDIR}/%s ${PREFIX}/%s\n",$$4,$$3,$$4}' < ${TMPPLIST} | ${SH} + ${MKDIR} ${PREFIX}/${TEXMFCONFIGDIR}/texconfig/ptex + ${INSTALL_DATA} ${FILESDIR}/tcfmgr.map \ + ${PREFIX}/${TEXMFCONFIGDIR}/texconfig/ptex/tcfmgr.map + ${INSTALL_DATA} ${LOCALBASE}/${TEXMFDISTDIR}/web2c/updmap.cfg \ + ${PREFIX}/${TEXMFDIR}/web2c/ptex/updmap.cfg + ${MKDIR} ${PREFIX}/${TEXMFCONFIGDIR}/web2c/ptex + ${INSTALL_DATA} ${LOCALBASE}/${TEXMFDISTDIR}/web2c/updmap.cfg \ + ${PREFIX}/${TEXMFCONFIGDIR}/web2c/ptex/updmap.cfg + ${MKDIR} ${PREFIX}/${TEXMFCONFIGDIR}/dvips/ptex +.for F in dvips dvipdfm pdftex + ${MKDIR} ${PREFIX}/${FONTSMAPDIR}/${F}/updmap + ${MKDIR} ${PREFIX}/${FONTSMAPVARDIR}/${F}/updmap .endfor - @${LN} -sf ptex ${PREFIX}/bin/platex - @${PREFIX}/bin/mktexlsr ${PREFIX}/share/texmf - -pre-clean: - @${RM} -rf ${WRKSRC} + ${INSTALL_SCRIPT} ${WRKDIR}/updmap-ptex ${PREFIX}/${UPDMAPDIR}/updmap.ptex + ${MKTEXLSR} + if ${PREFIX}/bin/kpsewhich -format=map psfonts_jp.map > /dev/null 2>&1; then \ + ${SH} ${UPDMAP_SYS} --enable Map=psfonts_jp.map; \ + else \ + ${SH} ${UPDMAP_SYS}; \ + fi + @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> |