# -*- 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 PortSystem 1.0 PortGroup xcode 1.0 PortGroup xcodeversion 1.0 name TeXShop version 5.47 revision 0 set major [lindex [split ${version} .] 0] categories aqua editors license GPL-2+ maintainers {mps @Schamschula} openmaintainer description TeX previewer for Mac OS X long_description \ TeXShop is a TeX previewer for Mac OS X, written in Cocoa. \ Since pdf is a native file format on OS X, TeXShop uses \ "pdftex" and "pdflatex" rather than "tex" and "latex" to \ typeset, these programs in the standard teTeX distribution \ of TeX produce pdf output instead of dvi output. homepage http://pages.uoregon.edu/koch/texshop master_sites ${homepage}/texshop-64 use_zip yes distname texshopsource[strsed ${version} {/\.//}] dist_subdir TeXShop/ worksrcdir ${name}-${version} checksums rmd160 dacbc0d49396153257dd5dcc16ad3af349b35983 \ sha256 d517a74bbee04d60bc7fb73b489dc28341a3af9b9d9c034d9a7d9481439710a5 \ size 188511405 minimum_xcodeversions {21 13.4} # This is a temporary kludge. The new Xcode build system fails to # destroot this for reasons that are poorly understood. # Remove this when a better fix is known. if {[vercmp ${xcodeversion} 10.0] >= 0} { build.pre_args -UseNewBuildSystem=NO destroot.pre_args -UseNewBuildSystem=NO } configure.cxx_stdlib libstdc++ platform darwin { if { [vercmp ${macosx_deployment_target} >= 15.0]} { # See: https://trac.macports.org/ticket/70901 macosx_deployment_target 14.0 } if {${os.major} > 20} { # Don't build Sparkle # See: https://trac.macports.org/ticket/66382 patchfiles patch-Sources-UseSparkle.h.diff \ patch-TeXShop.xcodeproj-project.pbxproj.diff post-patch { delete ${worksrcpath}/Sparkle.framework } } if {${os.major} == 20} { version 4.79 revision 1 checksums rmd160 ba6ff730a0ab391b039bdac315c41404cd99959c \ sha256 dfa9f54b93502a6487c31adf39c47051483a4b4bd1f974d8b35e66a90c6c660d \ size 158553155 minimum_xcodeversions {20 12.2} distname texshopsource[strsed ${version} {/\.//}] worksrcdir ${name}-${version} # Don't build Sparkle # See: https://trac.macports.org/ticket/66382 patchfiles patch-TeXShop-4.79.xcodeproj-project.pbxproj.diff \ patch-TeXShop-4.79-Sources-TSPreferences.diff post-patch { delete ${worksrcpath}/Sparkle.framework } livecheck.type none } if {${os.major} < 11} { # Version for legacy systems. version 2.47 revision 0 checksums rmd160 cd02b93bafa72de885338d32e98c61de39e11aa6 \ sha256 cd8f9fd827d9b080423da0f1d9664bdbfdfebb4525bbb7542ee54c44e2f9ce19 \ size 75049777 distname texshopsource[strsed ${version} {/\.//}] worksrcdir texshopsource-${version} post-extract { set sparkle "Sparkle.framework/Versions/A/Sparkle" set ogrekit "OgreKit.framework/Versions/A/OgreKit" if {![variant_isset universal]} { # thin the bundled frameworks system "cd ${worksrcpath} && lipo -thin ${configure.build_arch} $sparkle -output $sparkle" system "cd ${worksrcpath} && lipo -thin ${configure.build_arch} $ogrekit -output $ogrekit" } elseif {${os.major} == 8} { # Tiger chokes on the x86_64 system "cd ${worksrcpath} && lipo -remove x86_64 $sparkle -output $sparkle" } reinplace "s|defaultConfigurationName = Debug|defaultConfigurationName = Release|" ${worksrcpath}/${name}.xcodeproj/project.pbxproj reinplace "s|GCC_VERSION_i386 = 4\.0|GCC_VERSION_i386 = [lindex [split ${configure.objc} -] 1]|g" ${worksrcpath}/3rdparty/OgreKit/OgreKit.xcodeproj/project.pbxproj reinplace "s|GCC_VERSION_ppc = 3\.3|GCC_VERSION_ppc = [lindex [split ${configure.objc} -] 1]|g" ${worksrcpath}/3rdparty/OgreKit/OgreKit.xcodeproj/project.pbxproj reinplace "s|GCC_VERSION = 4\.0|GCC_VERSION = [lindex [split ${configure.objc} -] 1]|" ${worksrcpath}/TeXShop.xcodeproj/project.pbxproj reinplace "s|GCC_VERSION = 4\.0|GCC_VERSION = [lindex [split ${configure.objc} -] 1]|" ${worksrcpath}/3rdparty/TeX-mdimporter/TeX.xcodeproj/project.pbxproj } patchfiles patch-TSDocument.m.diff compiler.blacklist clang destroot.target ${name} notes "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" livecheck.type none } elseif {${os.major} < 20} { version 4.44 revision 0 checksums rmd160 bcbccbd35ecbf9f09d38e43a7bc5392f1e0f419c \ sha256 e73f79a87cb02faa37b080fbdddec5edc384b7e80ff5b1d3828f86a3160da032 \ size 151971878 minimum_xcodeversions {13 6.2} distname texshopsource[strsed ${version} {/\.//}] worksrcdir ${distname} post-patch { if {${os.major} < 17} { reinplace "s|#define HIGHSIERRAORHIGHER|// #define HIGHSIERRAORHIGHER|g" ${worksrcpath}/Sources/globals.h } if {${os.major} < 18} { reinplace "s|#define MOJAVEORHIGHER|// #define MOJAVEORHIGHER|g" ${worksrcpath}/Sources/globals.h } } livecheck.type none } } build.target ${name} xcode.project ${name}.xcodeproj xcode.configuration Release xcode.build.settings FRAMEWORK_SEARCH_PATHS=${worksrcpath} \ CONFIGURATION_BUILD_DIR=${worksrcpath}/build \ CODE_SIGN_IDENTITY= xcode.destroot.settings INSTALL_MODE_FLAG=755 {*}${xcode.build.settings} post-destroot { file delete -force ${destroot}${applications_dir}/TeX.mdimporter if {${os.platform} eq "darwin" && ${os.major} < 11} { xinstall -m 755 ${filespath}/lilypond.engine ${destroot}${applications_dir}/${name}.app/Contents/Resources/${name}/Engines/Lilypond.engine reinplace s|@@PREFIX@@|${prefix}|g ${destroot}${applications_dir}/${name}.app/Contents/Resources/${name}/Engines/Lilypond.engine } } livecheck.type regex livecheck.regex TeXShop \\(v (${major}\.\[0-9.\]+)\\)