Ticket #36671: Portfile

File Portfile, 1.8 KB (added by ryandesign (Ryan Carsten Schmidt), 12 years ago)
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$
3
4PortSystem          1.0
5PortGroup           qt4 1.0
6
7name                texstudio
8version             2.5
9categories          editors
10platforms           darwin
11license             GPL-2+
12maintainers         nomaintainer
13supported_archs     i386 x86_64
14
15description         TeX editor
16
17long_description    texstudio is a TeX editor forked off texmarker.
18
19homepage            http://texstudio.sourceforge.net/
20master_sites        sourceforge:project/texstudio/texstudio/TeXstudio%20${version}
21
22checksums           rmd160  f72a092657f4f401841611f717f99e7840ca2f63 \
23                    sha256  0e24af04aa6ab6e4b52c6c787c4a5687c3208457ad3bb5eb670b9703bb529d2a
24
25depends_lib-append  port:poppler
26
27if {![file exists ${prefix}/lib/libpoppler-qt4.dylib]} {
28    depends_lib-delete port:poppler
29    pre-configure {
30        ui_error "
31****
32**** ${name} requires port poppler installed with the variants +qt4 +quartz.
33**** Please do the following then try installing ${name} again:
34****
35****     sudo port install poppler +qt4 +quartz
36****
37
38"
39        return -code error "incompatible poppler installation"
40    }
41}
42
43worksrcdir          ${name}${version}
44
45pre-patch {
46    # DOS to UNIX line endings so we can patch
47    reinplace "s|\r||g" ${worksrcpath}/texstudio.pro
48}
49
50patchfiles          patch-texstudio.pro.diff
51
52post-patch {
53    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/texstudio.pro
54}
55
56universal_variant       no
57
58configure.cmd           ${qt_qmake_cmd}
59configure.pre_args      PREFIX=${prefix}
60configure.args-append   CONFIG+="${qt_arch_types}"
61
62destroot {
63    copy ${worksrcpath}/texstudio.app ${destroot}${applications_dir}
64    ln -s ${applications_dir}/texstudio.app/Contents/MacOS/texstudio ${destroot}${prefix}/bin/texstudio
65}