source: trunk/dports/tex/texlive-bin/Portfile @ 111334

Last change on this file since 111334 was 111334, checked in by dports@…, 7 years ago

texlive-bin: readd +x11 to default_variants (#40525)

Remove reference to +no_x11 variant which no longer exists

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.7 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 111334 2013-09-19 01:39:54Z dports@macports.org $
3
4PortSystem      1.0
5PortGroup       compiler_blacklist_versions 1.0
6PortGroup       texlive 1.0
7
8name            texlive-bin
9version         2013
10revision        2
11
12categories      tex
13maintainers     dports
14description     TeX Live Binaries.
15long_description    TeX Live is an easy way to get up and running with TeX. \
16    It provides a comprehensive TeX system with binaries for most flavors \
17    of Unix, including GNU/Linux, and also Windows. It includes all the \
18    major TeX-related programs, macro packages, and fonts that are free \
19    software, including support for many languages around the world.
20
21homepage        http://www.tug.org/texlive/
22platforms       darwin
23
24# This port installs two libraries: kpathsea (LGPL-2.1+) and ptexenc (BSD).
25# The binaries are covered under various licenses, but all distributable;
26# see the texlive portfile for more information.
27license         Copyleft Permissive LGPL-2.1+ BSD
28
29# Our distfile is a stripped-down version of the texlive source
30# tarball, available from CTAN in systems/texlive/Source. For faster
31# download time, it omits a number of libraries and utilities that we
32# don't build. However, the port should still work with an unmodified
33# texlive distfile.
34master_sites    http://giraffe.cs.washington.edu/texlive/
35set distversion 20130619
36use_xz          yes
37distname        texlive-source-${distversion}-stripped
38worksrcdir      ${distname}
39
40set tlpkgdistname   tlpkg-TeXLive-${distversion}
41distfiles-append    ${tlpkgdistname}${extract.suffix}
42
43checksums       texlive-source-20130619-stripped.tar.xz \
44                rmd160  566e82917575c8d26a90c73b3d5a780a6017462a \
45                sha256  7a5fc3574f3609fc722cc0f7e6a6b9989d03f2ef536ac13412e152717b6a3172 \
46                tlpkg-TeXLive-20130619.tar.xz \
47                rmd160  fd998013e216d576b41986183069adaeb637f56b \
48                sha256  77c1d0859025f28410805ec493f384c705279e94471790aac7ba80badd586a74
49
50depends_lib     port:fontconfig \
51                port:freetype \
52                port:libpng \
53                port:ncurses \
54                port:zlib \
55                port:libzzip \
56                port:t1lib \
57                port:poppler \
58                path:lib/pkgconfig/cairo.pc:cairo \
59                path:lib/pkgconfig/pixman-1.pc:libpixman \
60                port:graphite2 \
61                port:icu \
62                port:harfbuzz \
63                port:harfbuzz-icu \
64                port:texlive-common
65
66depends_run     port:ghostscript
67
68depends_build   path:bin/perl:perl5 \
69                path:bin/pkg-config:pkgconfig
70
71# make luatex less sensitive to zlib version changes
72# (cf. http://bugs.debian.org/581818)
73patchfiles-append   patch-texk_web2c_luatexdir_luazlib_lzlib.c.diff
74
75# patches related to changes in install paths
76patchfiles-append   patch-texk_kpathsea_Makefile.in.diff \
77                    patch-texk_tex4htk_Makefile.in.diff \
78                    patch-texk_texlive_linked_scripts_Makefile.in.diff \
79                    patch-texk_texlive_tl_scripts_Makefile.in.diff \
80                    patch-texk_xdvik_xdvi-sh.in.diff \
81                    patch-texk_chktex_Makefile.in.diff
82
83# # fixes for makefile brokenness not otherwise specified
84patchfiles-append   patch-libs-freetype-Makefile.in.diff
85
86post-patch {
87    reinplace "s|@@TEXMFDIST@@|${texlive_texmfdist}|" ${worksrcpath}/texk/texlive/linked_scripts/Makefile.in
88    reinplace "s|@@TEXMFDIST@@|${texlive_texmfdist}|" ${worksrcpath}/texk/texlive/tl_scripts/Makefile.in
89    reinplace "s|@@TEXMFDIST@@|${texlive_texmfdist}|" ${worksrcpath}/texk/tex4htk/Makefile.in
90    reinplace "s|@@TEXLIVE_BINDIR@@|${texlive_bindir}|" ${worksrcpath}/texk/xdvik/xdvi-sh.in
91    reinplace "s|@@TEXMFDIST@@|${texlive_texmfdist}|" ${worksrcpath}/texk/chktex/Makefile.in
92
93    # Defaults for the texmf search paths need to be compiled into
94    # libkpathsea -- really, just the location of texmf.cnf, which
95    # defines all the other paths. texlive normally finds this file
96    # using a bindir-relative path extracted from texmf.cnf, but this
97    # is both incorrect (it fails to find our texmf.cnf) and overkill
98    # (we know the absolute path of texmf.cnf).
99    #
100    # Accordingly, we patch the kpathsea makefile to not try to derive
101    # the default paths from texmf.cnf, and just provide our own
102    # paths.h with the right path substituted in.
103    delete ${worksrcpath}/texk/kpathsea/texmf.cnf
104    file copy ${filespath}/texk_kpathsea_paths.h ${worksrcpath}/texk/kpathsea/paths.h
105    reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/texk/kpathsea/paths.h
106    reinplace "s|@@TEXMFSYSCONFIG@@|${texlive_texmfsysconfig}|" ${worksrcpath}/texk/kpathsea/paths.h
107}
108
109# llvm-gcc apparently fails on Xcode 4.0.x (#30758)
110compiler.blacklist {llvm-gcc-4.2 < 2335.15}
111
112
113# We use MacPorts-provided libraries instead of the ones included in
114# texlive whenever possible, to avoid redundancy and to better keep
115# current with respect to security updates and the like.
116#
117# Exceptions are freetype1 (not in MacPorts anymore)
118#
119# Many of the --with-system-* and --disable-* flags are actually
120# redundant because we've removed those components from the distfile,
121# but we leave them here for compatibility with the stock distfile.
122configure.args  --bindir=${texlive_bindir} \
123                --mandir=${texlive_bindir} \
124                --infodir=${prefix}/share/info \
125                --enable-shared \
126                --disable-multiplatform \
127                --disable-native-texlive-build \
128                --without-old-mac-fonts \
129                --with-banner-add="/MacPorts ${version}_${revision}" \
130                --with-system-freetype2 \
131                --without-system-freetype \
132                --without-system-icu \
133                --with-system-cairo \
134                --with-system-gd \
135                --with-system-graphite2 \
136                --with-system-harfbuzz \
137                --with-system-icu \
138                --with-system-libpng \
139                --with-libpng-includes=${prefix}/include \
140                --with-libpng-libdir=${prefix}/lib \
141                --with-system-ncurses \
142                --with-system-pixman \
143                --with-system-poppler \
144                --with-system-t1lib \
145                --with-t1lib-includes=${prefix}/include \
146                --with-t1lib-libdir=${prefix}/lib \
147                --with-system-xpdf \
148                --with-system-zlib \
149                --with-system-zziplib \
150                --disable-biber \
151                --disable-etex \
152                --disable-detex \
153                --disable-dvi2tty \
154                --disable-dvipng \
155                --disable-lcdf-typetools \
156                --disable-ps2eps \
157                --disable-psutils \
158                --disable-t1utils \
159                --disable-texinfo \
160                --disable-xindy \
161                --without-x \
162                --without-pdfopen \
163                --enable-build-in-source-tree
164
165# makejvf has some invalid character encodings in one of its source
166# files, which cause certain versions of clang to hang (#38643). Using
167# -Wno-invalid-source-encoding avoids this problem.
168# It appears to be specific to Xcode 4.6, but there's no harm in
169# silencing the warning for all versions of clang.
170post-patch {
171    if {[string match *clang* ${configure.compiler}]} { 
172        reinplace "/^WARNING_CFLAGS =/s/$/ -Wno-invalid-source-encoding/" ${worksrcpath}/texk/makejvf/Makefile.in
173    }
174}
175
176variant universal {}
177configure.cppflags-delete   -I${prefix}/include
178configure.ldflags-delete    -L${prefix}/lib
179configure.cppflags-append   -isystem${prefix}/include
180configure.env-append        LIBRARY_PATH=${prefix}/lib
181
182set cxx_stdlibflags {}
183if {[info exists configure.cxx_stdlib] &&
184    ${configure.cxx_stdlib} ne {} &&
185    [string match *clang* ${configure.cxx}]
186} then {
187    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
188}
189
190# TODO: Remove when base supports OBJCXX and OBJCXXFLAGS (2.2.1?).
191configure.env-append        OBJCXX=${configure.cxx} \
192                            OBJCXXFLAGS="${configure.objcflags} ${cxx_stdlibflags} [get_canonical_archflags objc]"
193
194# work around bug in texlive makefiles where $OBJC is not recorded
195# during configure phase
196build.env                   OBJC=${configure.objc} \
197                            OBJCFLAGS="${configure.objcflags} [get_canonical_archflags objc]" \
198                            OBJCXX=${configure.cxx} \
199                            OBJCXXFLAGS="${configure.objcflags} ${cxx_stdlibflags} [get_canonical_archflags objc]"           
200
201post-destroot   {
202    # Anything that gets installed into texmf-dist will be installed
203    # by one of the texmf ports
204    delete ${destroot}${prefix}/share/texmf-dist
205    delete ${destroot}${texlive_texmfdist}
206
207    # Do not install symlinks to scripts that we don't install
208    delete ${destroot}${texlive_bindir}/latexmk
209    delete ${destroot}${texlive_bindir}/tlmgr   
210
211    # install the tlpkg/TeXLive perl module
212    xinstall -d ${destroot}${prefix}/share/tlpkg
213    copy ${workpath}/${tlpkgdistname} ${destroot}${prefix}/share/tlpkg/TeXLive
214
215    # gzip manpages that are installed into texlive_bindir
216    foreach manpage [glob -directory ${destroot}${texlive_bindir} man*/*] {
217        # need to make sure it isn't a symlink
218        if {[file type $manpage] == "file"} {
219            system "gzip $manpage"
220        }
221    }
222
223    # Create version/arch-specific links to the texbin directory used
224    # by the TeXDist prefpane; it seems that future versions of the
225    # prefpane will want these.
226    xinstall -d ${destroot}${texlive_mactex_texdistdir}-${version}
227    if {[variant_isset universal]} {
228        ln -s ${texlive_mactex_texbindir} \
229            ${destroot}${texlive_mactex_texdistdir}-${version}/universal-darwin
230    } else {
231        ln -s ${texlive_mactex_texbindir} \
232            ${destroot}${texlive_mactex_texdistdir}-${version}/${configure.build_arch}-darwin
233    }
234    ln -s ${texlive_mactex_texdistdir}-${version} \
235          ${destroot}${texlive_mactex_texdistdir}
236}
237
238post-activate {
239    system "${texlive_bindir}/mktexlsr"
240}
241
242variant x11 description {Build with x11 support, using Xaw widgets for xdvi} {
243    depends_lib-append port:xorg-libXp
244    configure.args-delete --without-x --without-pdfopen
245    depends_lib-append port:xorg-libXaw
246    configure.args-append --with-xdvi-x-toolkit=xaw
247}
248
249variant motif requires x11 description {Use Motif to build xdvi} {
250    depends_lib-delete port:xorg-libXaw
251    configure.args-delete --with-xdvi-x-toolkit=xaw
252    depends_lib-append lib:libXm:openmotif
253    configure.args-append --with-xdvi-x-toolkit=motif
254}
255
256default_variants    +x11
257
258livecheck.type      regex
259livecheck.url       ${homepage}acquire.html
260livecheck.regex     "TeX Live (\[0-9\]+) "
Note: See TracBrowser for help on using the repository browser.