diff --git a/user/texlive-devel b/user/texlive-devel new file mode 120000 index 00000000000..c6cca627ba9 --- /dev/null +++ b/user/texlive-devel @@ -0,0 +1 @@ +texlive \ No newline at end of file diff --git a/user/texlive-libs b/user/texlive-libs new file mode 120000 index 00000000000..c6cca627ba9 --- /dev/null +++ b/user/texlive-libs @@ -0,0 +1 @@ +texlive \ No newline at end of file diff --git a/user/texlive/patches/00-texk-dvipsk-afm2tfm_c.patch b/user/texlive/patches/00-texk-dvipsk-afm2tfm_c.patch new file mode 100644 index 00000000000..6f39ede0754 --- /dev/null +++ b/user/texlive/patches/00-texk-dvipsk-afm2tfm_c.patch @@ -0,0 +1,13 @@ +--- a/texk/dvipsk/afm2tfm.c ++++ b/texk/dvipsk/afm2tfm.c +@@ -66,10 +66,6 @@ + + #include "dvips.h" + /* debug.h redefines fopen to my_real_fopen, but it's still a FILE * */ +-#ifdef fopen +-#undef fopen +-extern FILE *fopen (); +-#endif + + struct encoding { + const char *name; diff --git a/user/texlive/template.py b/user/texlive/template.py new file mode 100644 index 00000000000..91d1fe2a8fb --- /dev/null +++ b/user/texlive/template.py @@ -0,0 +1,105 @@ +pkgname = "texlive" +pkgver = "20240312" +pkgrel = 0 +build_wrksrc = "build" +build_style = "configure" +configure_script = "../configure" +configure_args = [ + "-C", + "--prefix=/usr", + "--sysconfdir=/etc", + "--disable-native-texlive-build", + "--disable-silent-rules", + "--disable-static", + "--disable-xdvik", # XXX: Needs libXaw + "--enable-shared", + "--enable-tex-synctex", + "--with-banner-add=/Alpine Linux", + "--with-system-cairo", + "--with-system-freetype2", + "--with-system-gd", + "--with-system-gmp", + "--with-system-graphite2", + "--with-system-harfbuzz", + "--with-system-icu", + "--with-system-libpaper", + "--with-system-libpng", + "--with-system-mpfr", + "--with-system-pixman", + "--with-system-potrace", + "--with-system-teckit", + "--with-system-zlib", + "--with-system-zziplib", + # "--with-system-kpathsea", + # "--with-system-ptexenc", +] +make_cmd = "gmake" +hostmakedepends = [ + "automake", + "libtool", + "pkgconf", +] +makedepends = [ + "cairo-devel", + "freetype-devel", + "gmp-devel", + "graphite2-devel", + "harfbuzz-devel", + "icu-devel", + "libgd-devel", + "libpaper-devel", + "libpng-devel", + "mpfr-devel", + "pixman-devel", + "potrace-devel", + "teckit-devel", + "zlib-ng-compat-devel", + "zziplib-devel", +] +depends = [self.with_pkgver("texmf")] +pkgdesc = "Comprehensive TeX distribution" +maintainer = "Subhaditya Nath " +license = "GPL-3.0-or-later" +url = "https://tug.org/texlive" +source = f"ftp://tug.org/historic/systems/texlive/{pkgver[:4]}/texlive-{pkgver}-source.tar.xz" +sha256 = "7b6d87cf01661670fac45c93126bed97b9843139ed510f975d047ea938b6fe96" +broken_symlinks = ["usr/bin/*"] +# XXX: few tests are failing with SIGILL +options = ["!check"] + + +def post_extract(self): + self.mkdir(self.build_wrksrc) + for lib in ( + "cairo", + "freetype2", + "gd", + "gmp", + "graphite2", + "harfbuzz", + "icu", + "libpaper", + "libpng", + "mpfr", + "pixman", + "potrace", + "teckit", + "zlib", + "zziplib", + ): + self.rm(f"libs/{lib}", recursive=True) + + +def post_install(self): + # texmf-dist is provided by texmf + self.uninstall("usr/share/texmf-dist") + + +@subpackage("texlive-libs") +def _(self): + return self.default_libs() + + +@subpackage("texlive-devel") +def _(self): + return self.default_devel()