source: trunk/dports/aqua/TeXShop/Portfile

Last change on this file was 110376, checked in by jeremyhu@…, 4 years ago

TeXShop: Adjust compiler.blacklist to match MP's clangs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 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 110376 2013-08-30 19:17:57Z ryandesign@macports.org $
3
4PortSystem      1.0
5PortGroup       xcode 1.0
6
7name            TeXShop
8conflicts       TeXShop3
9version         2.47
10set major       [lindex [split ${version} .] 0]
11categories      aqua editors
12license         GPL-2+
13maintainers     nomaintainer
14description     TeX previewer for Mac OS X
15long_description   \
16    TeXShop is a TeX previewer for Mac OS X, written in Cocoa.  \
17    Since pdf is a native file format on OS X, TeXShop uses     \
18    "pdftex" and "pdflatex" rather than "tex" and "latex" to    \
19    typeset, these programs in the standard teTeX distribution  \
20    of TeX produce pdf output instead of dvi output.
21homepage        http://pages.uoregon.edu/koch/texshop/
22master_sites    ${homepage}
23use_zip         yes
24distname        texshopsource[strsed ${version} {g/\.//}]
25worksrcdir      texshopsource-${version}
26
27checksums       rmd160  cd02b93bafa72de885338d32e98c61de39e11aa6 \
28                sha256  cd8f9fd827d9b080423da0f1d9664bdbfdfebb4525bbb7542ee54c44e2f9ce19
29
30# force 32-bit, ticket #20291
31supported_archs i386 ppc
32
33post-extract    {
34    set sparkle "Sparkle.framework/Versions/A/Sparkle"
35    set ogrekit "OgreKit.framework/Versions/A/OgreKit"
36    if {![variant_isset universal]} {
37        # thin the bundled frameworks
38        system "cd ${worksrcpath} && lipo -thin ${configure.build_arch} $sparkle -output $sparkle"
39        system "cd ${worksrcpath} && lipo -thin ${configure.build_arch} $ogrekit -output $ogrekit"
40    } elseif {${os.major} == 8} {
41        # Tiger chokes on the x86_64
42        system "cd ${worksrcpath} && lipo -remove x86_64 $sparkle -output $sparkle"
43    }
44    reinplace "s|defaultConfigurationName = Debug|defaultConfigurationName = Release|" ${worksrcpath}/${name}.xcodeproj/project.pbxproj
45    reinplace "s|GCC_VERSION_i386 = 4\.0|GCC_VERSION_i386 = [lindex [split ${configure.objc} -] 1]|g" ${worksrcpath}/3rdparty/OgreKit/OgreKit.xcodeproj/project.pbxproj
46    reinplace "s|GCC_VERSION_ppc = 3\.3|GCC_VERSION_ppc = [lindex [split ${configure.objc} -] 1]|g" ${worksrcpath}/3rdparty/OgreKit/OgreKit.xcodeproj/project.pbxproj
47    reinplace "s|GCC_VERSION = 4\.0|GCC_VERSION = [lindex [split ${configure.objc} -] 1]|" ${worksrcpath}/TeXShop.xcodeproj/project.pbxproj
48    reinplace "s|GCC_VERSION = 4\.0|GCC_VERSION = [lindex [split ${configure.objc} -] 1]|" ${worksrcpath}/3rdparty/TeX-mdimporter/TeX.xcodeproj/project.pbxproj
49}
50
51patchfiles              patch-TSDocument.m.diff
52
53compiler.blacklist  *clang*
54
55build.target    ${name}
56
57xcode.project   ${name}.xcodeproj
58xcode.configuration Release
59xcode.build.settings    FRAMEWORK_SEARCH_PATHS=${worksrcpath} \
60                        CONFIGURATION_BUILD_DIR=${worksrcpath}/build
61
62destroot.target     ${name}
63eval xcode.destroot.settings INSTALL_MODE_FLAG=755 ${xcode.build.settings}
64post-destroot        {
65    file delete -force ${destroot}${applications_dir}/TeX.mdimporter
66
67    xinstall -m 755 ${filespath}/lilypond.engine ${destroot}${applications_dir}/${name}.app/Contents/Resources/${name}/Engines/Lilypond.engine
68    reinplace s|@@PREFIX@@|${prefix}|g ${destroot}${applications_dir}/${name}.app/Contents/Resources/${name}/Engines/Lilypond.engine
69}
70
71notes "If you intend to use the Lilypond engine, please copy ${applications_dir}/${name}.app/Contents/Resources/${name}/Engines/Lilypond.engine to ~/Library/${name}/Engines/Lilypond.engine"
72
73platform darwin {
74    if {${os.major} >= 11} {
75        universal_variant   no
76        supported_archs     i386
77        set os_note "${name} ${version} is designed for OS X 10.6 Snow Leopard and older; for OS X 10.7 Lion and newer you may prefer to use the TeXShop3 port."
78        notes-append "\n\n${os_note}"
79        pre-fetch {
80            ui_msg ${os_note}
81        }
82    }
83}
84
85livecheck.type      regex
86livecheck.regex     TeXShop \\(v (${major}\.\[0-9.\]+)\\)
Note: See TracBrowser for help on using the repository browser.