Makefile 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. # $OpenBSD: Makefile,v 1.47 2017/05/21 11:57:47 edd Exp $
  2. COMMENT-context = texlive texmf for conTeXt
  3. COMMENT-docs = texlive documentation
  4. COMMENT-full = texlive texmf for extra macros
  5. COMMENT-main = texlive texmf for basic functionality
  6. COMMENT-buildset = smallest texlive texmf for building ports
  7. # If you move things out of another texmf into the buildset, don't forget to:
  8. # * Update the buildset conflict markers in PLIST-buildset.
  9. # * Add a more restrictive RUN_DEPEND upon the buildset.
  10. DISTNAME = texlive-${DIST_V}b-texmf
  11. MASTER_SITES0 = https://spacehopper.org/mirrors/
  12. DISTFILES = ${DISTNAME}${EXTRACT_SUFX} \
  13. texlive-${DIST_V}-extra${EXTRACT_SUFX} \
  14. texmf-var-pregen-${V}${EXTRACT_SUFX}:0
  15. PKGNAME-main = texlive_texmf-minimal-${V}
  16. PKGNAME-full = texlive_texmf-full-${V}
  17. PKGNAME-docs = texlive_texmf-docs-${V}
  18. PKGNAME-context = texlive_texmf-context-${V}
  19. PKGNAME-buildset = texlive_texmf-buildset-${V}
  20. NO_BUILD = Yes
  21. NO_TEST = Yes
  22. PKG_ARCH = *
  23. BUILD_DEPENDS = archivers/xz
  24. # We dont use auto module deps for these, as MODULES is not per SUBPACKAGE
  25. .include "adj.mk"
  26. MODULES += lang/ruby lang/python
  27. MODRUBY_REV = 1.8
  28. MODRUBY_BUILDDEP = No
  29. MODRUBY_RUNDEP = No
  30. MODPY_BUILDDEP = No
  31. MODPY_RUNDEP = No
  32. RUN_DEPENDS-main += texlive_base-${V}:print/texlive/base \
  33. texlive_texmf-buildset-${V}:print/texlive/texmf,-buildset
  34. RUN_DEPENDS-full = texlive_texmf-minimal-${V}:print/texlive/texmf,-main \
  35. ${MODPY_RUN_DEPENDS} \
  36. ${_MODLUA_RUNDEPENDS}
  37. RUN_DEPENDS-context += texlive_texmf-full-${V}:print/texlive/texmf,-full \
  38. ${MODRUBY_RUNDEPENDS}
  39. RUN_DEPENDS-docs += texlive_base-${V}:print/texlive/base \
  40. x11/p5-Tk
  41. MULTI_PACKAGES = -context -docs -full -main -buildset
  42. MODULES += lang/lua lang/ruby lang/python x11/tk perl
  43. MODLUA_RUNDEP = No
  44. MODLUA_BUILDDEP = No
  45. MODRUBY_REV = 1.8
  46. MODRUBY_BUILDDEP = No
  47. MODRUBY_RUNDEP = No
  48. MODPY_BUILDDEP = No
  49. MODPY_RUNDEP = No
  50. SUBST_VARS += RUBY
  51. WRKDIST = ${WRKDIR}/texlive-${DIST_V}-texmf
  52. # Substitute correct interpreter paths into scripts.
  53. # Some are done automatically by MODULES
  54. pre-configure:
  55. @# Don't use substitution from the Python port, since we need to swap in
  56. @# different versions.
  57. for F in ${PYTHON2_ADJ_FILES}; do \
  58. perl -pi -e '($$. == 1) && s@^.*$$@#!${LOCALBASE}/bin/python${MODPY_DEFAULT_VERSION_2}@' ${WRKSRC}/$$F; \
  59. done
  60. for F in ${PYTHON3_ADJ_FILES}; do \
  61. perl -pi -e '($$. == 1) && s@^.*$$@#!${LOCALBASE}/bin/python${MODPY_DEFAULT_VERSION_3}@' ${WRKSRC}/$$F; \
  62. done
  63. @# Don't use builtin ruby.port.mk substitution. It uses
  64. @# find, which takes an age on such a large directory.
  65. for F in ${RUBY_ADJ_FILES}; do \
  66. perl -pi -e '($$. == 1) && s@^.*$$@#!${RUBY}@' ${WRKSRC}/$$F; \
  67. done
  68. for F in ${WISH_ADJ_FILES}; do \
  69. ${MODTCL_WISH_ADJ} ${WRKSRC}/$$F; \
  70. done
  71. for F in ${TEXLUA_ADJ_FILES}; do \
  72. perl -pi -e '($$. == 1) && s@^.*$$@#!${PREFIX}/bin/texlua@' \
  73. ${WRKSRC}/$$F; \
  74. done
  75. for F in ${LUA_ADJ_FILES}; do \
  76. perl -pi -e '($$. == 1) && s@^.*$$@#!${MODLUA_BIN}@' ${WRKSRC}/$$F; \
  77. done
  78. for F in ${BASH_ADJ_FILES}; do \
  79. perl -pi -e '($$. == 1) && s@^.*$$@#!${LOCALBASE}/bin/bash@' \
  80. ${WRKSRC}/$$F; \
  81. done
  82. ${SUBST_CMD} ${WRKSRC}/texmf-dist/scripts/context/stubs/unix/mtxrun
  83. do-install:
  84. mv ${WRKDIST}/texmf-dist ${PREFIX}/share
  85. # plug in my pregenerated map and formats
  86. #
  87. # These are created (as root) with:
  88. # updmap-sys
  89. # fmtutil-sys --all
  90. # context --make
  91. #
  92. # Make sure you hashed the tree before running the above commands:
  93. # mktexlsr
  94. # mtxrun --generate
  95. mv ${WRKDIR}/texmf-var ${PREFIX}/share
  96. # Put manuals in the right place.
  97. #
  98. # The rest of share/texmf-dist/doc/man does not appear
  99. # in the packing list, so the PDF versions will not be installed.
  100. #
  101. # I am told by upstream that any manual page not under
  102. # texmf-dist/doc/man is intentionally this way and should not be
  103. # moved into the system manual path. So be it.
  104. mv ${PREFIX}/share/texmf-dist/doc/man/man1/*.1 ${PREFIX}/man/man1/
  105. mv ${PREFIX}/share/texmf-dist/doc/man/man5/*.5 ${PREFIX}/man/man5/
  106. # Info pages
  107. mv ${PREFIX}/share/texmf-dist/doc/info/*.info \
  108. ${PREFIX}/info/
  109. # adjust permissions
  110. chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/{share/texmf*,man/man*/*,info/*}
  111. # selfauto does not work with our legacy texmf paths, patch in paths.
  112. post-install:
  113. ${SUBST_CMD} ${PREFIX}/share/texmf-dist/web2c/texmf.cnf
  114. ${SUBST_CMD} ${PREFIX}/share/texmf-dist/web2c/texmfcnf.lua
  115. # Generating PLISTs is special for texlive.
  116. # This target requires py-texscythe.
  117. update-plist: plist
  118. plist:
  119. cd ${FILESDIR} && ${MODPY_BIN} mk_plists.py \
  120. ${TRUEPREFIX}/share/examples/py-texscythe/texlive2016.tlpdb.gz
  121. .include <bsd.port.mk>