japanese/tex-ptex: Update dists

- The distfile has been replaced with a locally modified distfile
  including all the patches required resulting in a smaller distfile.
  The delta is a huge step forward reducing the original file from 3.6GB
  to 10 MB.
- However this still does not change the build time a lot. Although it
  reduces the fetch and install target but the package target is still
  large. I have checked with a static plist and due to it's size the
  time difference is longer and does not yield any better results.
- There are still 9 more ports which uses the original upstream
  distfile of 3.6GB but I will slowly replace them with smaller targeted
  dists to reduce the fetch target duration.
- Not bumping as the resulting pkg is unchanged.

Sponsored by: Nepustil
This commit is contained in:
Muhammad Moinur Rahman 2023-10-26 16:21:33 +02:00
parent c90bc9281b
commit 94f7d7bfab
2 changed files with 67 additions and 54 deletions

View File

@ -2,11 +2,11 @@ PORTNAME= ptex
PORTVERSION= 3.6
PORTREVISION= 4
CATEGORIES= japanese print
MASTER_SITES= TEX_CTAN/systems/texlive/${TEXLIVE_YEAR}/
MASTER_SITES= TEX_CTAN/systems/texlive/${TEXLIVE_YEAR}/:source \
LOCAL/tex:texmf
PKGNAMEPREFIX= ja-tex-
DISTNAME= texlive-${TEXLIVE_VERSION}-source
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
${DISTNAME_TEXMF}${EXTRACT_SUFX}
DISTFILES= texlive-${TEXLIVE_VERSION}-source${EXTRACT_SUFX}:source \
texlive-${TEXLIVE_VERSION}-texmf-japanese_tex-ptex-freebsd${EXTRACT_SUFX}:texmf
DIST_SUBDIR= TeX
EXTRACT_ONLY= texlive-${TEXLIVE_VERSION}-source${EXTRACT_SUFX}
@ -16,32 +16,8 @@ WWW= https://ctan.org/pkg/ptex
USES= localbase perl5 pkgconfig tar:xz tex
USE_TEX= fmtutil formats kpathsea ptexenc web2c
TEXHASHDIRS= ${TEXMFDISTDIR} ${TEXMFVARDIR}
EXTRACT_AFTER_ARGS= ${EXTRACT_FILES:S,^,${DISTNAME}/,}
EXTRACT_FILES= build-aux libs/xpdf texk/web2c
EXTRACT_AFTER_ARGS_TEXMF= | ${TAR} -xf - -C ${STAGEDIR}${PREFIX}/share \
--strip-components 1 --no-same-permission \
--no-same-owner \
${EXTRACT_FILES_TEXMF:S,^,${DISTNAME_TEXMF}/,}
EXTRACT_FILES_TEXMF= texmf-dist/doc/ptex texmf-dist/doc/platex \
texmf-dist/doc/uptex texmf-dist/doc/uplatex \
texmf-dist/doc/fonts/japanese-otf \
texmf-dist/fonts/vf/public/japanese-otf \
texmf-dist/fonts/tfm/public/japanese-otf \
texmf-dist/fonts/ofm/public/japanese-otf \
texmf-dist/source/fonts/japanese-otf \
texmf-dist/source/platex \
texmf-dist/source/uplatex texmf-dist/tex/ptex \
texmf-dist/tex/uptex texmf-dist/tex/platex \
texmf-dist/tex/uplatex \
texmf-dist/tex/generic/hyph-utf8/patterns/ptex \
texmf-dist/fonts/map/dvipdfmx/updmap/kanjix.map
WRKSRC= ${WRKDIR}/${DISTNAME}/texk/web2c
GNU_CONFIGURE= yes
EXCLUDE_ENGINES= aleph etex pdftex luatex luajittex mf mf-nowin \
otangle mp pmp upmp web2c web-progs xetex tex \
synctex mflua mfluajit luahbtex luajithbtex
GNU_CONFIGURE= yes
CONFIGURE_ARGS= ${EXCLUDE_ENGINES:S/^/--disable-/} \
--enable-eptex \
--enable-euptex \
@ -54,40 +30,77 @@ CONFIGURE_ARGS+= --with-$L-include=${LOCALBASE}/include \
--with-$L-libdir=${LOCALBASE}/lib \
--with-system-$L
.endfor
MAKE_JOBS_UNSAFE= yes
EXTRACT_AFTER_ARGS= ${EXTRACT_FILES:S,^,${_DISTNAME_SOURCE}/,}
EXTRACT_FILES= build-aux libs/xpdf texk/web2c
WRKSRC= ${WRKDIR}/${_DISTNAME_SOURCE}/texk/web2c
EXCLUDE_ENGINES= aleph etex pdftex luatex luajittex mf mf-nowin \
otangle mp pmp upmp web2c web-progs xetex tex \
synctex mflua mfluajit luahbtex luajithbtex
_DISTNAME_SOURCE= texlive-${TEXLIVE_VERSION}-source
TEXHASHDIRS= ${TEXMFDISTDIR} ${TEXMFVARDIR}
TEX_FORMATS= ptex uptex
post-extract:
@${FIND} ${WRKSRC} -name '*.orig' -delete
#post-extract:
# @${FIND} ${WRKSRC} -name '*.orig' -delete
pre-configure:
for D in libs/xpdf; do \
cd ${WRKDIR}/${DISTNAME}/$$D && \
${SETENV} ${CONFIGURE_ENV} ${SH} ${CONFIGURE_SCRIPT} \
${CONFIGURE_ARGS}; \
done
cd ${WRKDIR}/${_DISTNAME_SOURCE}/libs/xpdf && \
${SETENV} ${CONFIGURE_ENV} ${SH} ${CONFIGURE_SCRIPT} \
${CONFIGURE_ARGS}; \
pre-install:
${CAT} ${DISTDIR}/${DIST_SUBDIR}/texlive-${TEXLIVE_VERSION}-texmf${EXTRACT_SUFX} \
${EXTRACT_AFTER_ARGS_TEXMF}
${TAR} -Jxf ${DISTDIR}/${DIST_SUBDIR}/texlive-${TEXLIVE_VERSION}-texmf-japanese_tex-ptex-freebsd${EXTRACT_SUFX} \
-C ${STAGEDIR}${PREFIX}/share \
--strip-components 1 --no-same-permission --no-same-owner
post-install:
${REINPLACE_CMD} -i '' -e 's|/usr/bin/perl|${PERL}|g' \
${STAGEDIR}${PREFIX}/share/texmf-dist/source/fonts/japanese-otf/mkjvf \
${STAGEDIR}${PREFIX}/share/texmf-dist/source/fonts/japanese-otf/script/mkcidvf.pl \
${STAGEDIR}${PREFIX}/share/texmf-dist/source/fonts/japanese-otf/script/mkjp04tfmvf.pl \
${STAGEDIR}${PREFIX}/share/texmf-dist/source/fonts/japanese-otf/script/mkmlcidvf.pl \
${STAGEDIR}${PREFIX}/share/texmf-dist/source/fonts/japanese-otf/script/mktfm.pl \
${STAGEDIR}${PREFIX}/share/texmf-dist/source/fonts/japanese-otf/script/mktfm_sp.pl \
${STAGEDIR}${PREFIX}/share/texmf-dist/source/fonts/japanese-otf/script/mkutf32list.pl \
${STAGEDIR}${PREFIX}/share/texmf-dist/source/fonts/japanese-otf/script/mkutfvf.pl \
${STAGEDIR}${PREFIX}/share/texmf-dist/source/fonts/japanese-otf/script/mkutfvf_sp.pl \
${STAGEDIR}${PREFIX}/share/texmf-dist/source/fonts/japanese-otf/script/umkvpkana.pl \
${STAGEDIR}${PREFIX}/share/texmf-dist/source/fonts/japanese-otf/script/umkpkana.pl \
${STAGEDIR}${PREFIX}/share/texmf-dist/source/fonts/japanese-otf/umkjvf
${FIND} -s ${STAGEDIR}${PREFIX}/share -not -type d | ${SORT} | \
${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
${FIND} -s ${STAGEDIR}${PREFIX}/share -type d -empty | ${SORT} -r | \
${SED} -e 's#^${STAGEDIR}${PREFIX}/#@dir #' >> ${TMPPLIST}
.if defined(MAINTAINER_MODE)
_MAINTAINER_DISTNAME= ${DISTNAME_TEXMF}${EXTRACT_SUFX}
_EXTRACT_TARGETDIR= texlive-${TEXLIVE_VERSION}-texmf-japanese_tex-ptex-freebsd
EXTRACT_FILES_TEXMF= doc/ptex doc/platex doc/uptex doc/uplatex \
doc/fonts/japanese-otf fonts/vf/public/japanese-otf \
fonts/tfm/public/japanese-otf source/uplatex tex/ptex \
fonts/ofm/public/japanese-otf source/platex \
tex/uplatex source/fonts/japanese-otf tex/uptex \
tex/platex tex/generic/hyph-utf8/patterns/ptex \
fonts/map/dvipdfmx/updmap/kanjix.map
_maintainer-extract:
${MAKE} clean
${MKDIR} ${WRKDIR}/${_EXTRACT_TARGETDIR}
${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/texlive-${TEXLIVE_VERSION}-texmf${EXTRACT_SUFX} \
-C ${WRKDIR}/${_EXTRACT_TARGETDIR} \
--strip-components 1 --no-same-permission --no-same-owner \
${EXTRACT_FILES_TEXMF:S,^,${DISTNAME_TEXMF}/texmf-dist/,}
_maintainer-patch: _maintainer-extract
${REINPLACE_CMD} -i '' -e 's|/usr/bin/perl|${PERL}|g' \
${WRKDIR}/${_EXTRACT_TARGETDIR}/texmf-dist/source/fonts/japanese-otf/mkjvf \
${WRKDIR}/${_EXTRACT_TARGETDIR}/texmf-dist/source/fonts/japanese-otf/script/mkcidvf.pl \
${WRKDIR}/${_EXTRACT_TARGETDIR}/texmf-dist/source/fonts/japanese-otf/script/mkjp04tfmvf.pl \
${WRKDIR}/${_EXTRACT_TARGETDIR}/texmf-dist/source/fonts/japanese-otf/script/mkmlcidvf.pl \
${WRKDIR}/${_EXTRACT_TARGETDIR}/texmf-dist/source/fonts/japanese-otf/script/mktfm.pl \
${WRKDIR}/${_EXTRACT_TARGETDIR}/texmf-dist/source/fonts/japanese-otf/script/mktfm_sp.pl \
${WRKDIR}/${_EXTRACT_TARGETDIR}/texmf-dist/source/fonts/japanese-otf/script/mkutf32list.pl \
${WRKDIR}/${_EXTRACT_TARGETDIR}/texmf-dist/source/fonts/japanese-otf/script/mkutfvf.pl \
${WRKDIR}/${_EXTRACT_TARGETDIR}/texmf-dist/source/fonts/japanese-otf/script/mkutfvf_sp.pl \
${WRKDIR}/${_EXTRACT_TARGETDIR}/texmf-dist/source/fonts/japanese-otf/script/umkvpkana.pl \
${WRKDIR}/${_EXTRACT_TARGETDIR}/texmf-dist/source/fonts/japanese-otf/script/umkpkana.pl \
${WRKDIR}/${_EXTRACT_TARGETDIR}/texmf-dist/source/fonts/japanese-otf/umkjvf
_maintainer-dist: _maintainer-patch
${TAR} --options xz:compression-level=9 -Jcvf \
${WRKDIR}/${_EXTRACT_TARGETDIR}${EXTRACT_SUFX} \
-C ${WRKDIR} ${_EXTRACT_TARGETDIR}
.endif
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
TIMESTAMP = 1680794675
TIMESTAMP = 1698325900
SHA256 (TeX/texlive-20230313-source.tar.xz) = 3878aa0e1ed0301c053b0e2ee4e9ad999c441345f4882e79bdd1c8f4ce9e79b9
SIZE (TeX/texlive-20230313-source.tar.xz) = 68630148
SHA256 (TeX/texlive-20230313-texmf.tar.xz) = 4c4dc77a025acaad90fb6140db2802cdb7ca7a9a2332b5e3d66aa77c43a81253
SIZE (TeX/texlive-20230313-texmf.tar.xz) = 3866405744
SHA256 (TeX/texlive-20230313-texmf-japanese_tex-ptex-freebsd.tar.xz) = b02128975b6653060bd656b7733439e1a10f2e51e6e89e8eb52d0373e4ddc652
SIZE (TeX/texlive-20230313-texmf-japanese_tex-ptex-freebsd.tar.xz) = 9401208