1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 74826 2011-01-03 10:28:48Z nox@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name scite |
---|
7 | version 2.23 |
---|
8 | categories editors |
---|
9 | platforms darwin |
---|
10 | maintainers nomaintainer |
---|
11 | description SciTE is a SCIntilla based Text Editor. |
---|
12 | |
---|
13 | long_description \ |
---|
14 | Originally built to demonstrate Scintilla, it has grown to be a generally \ |
---|
15 | useful editor with facilities for building and running programs. It is best \ |
---|
16 | used for jobs with simple configurations. |
---|
17 | |
---|
18 | homepage http://scintilla.sourceforge.net/SciTE.html |
---|
19 | master_sites sourceforge:scintilla |
---|
20 | distname ${name}[strsed ${version} {g/\.//}] |
---|
21 | extract.suffix .tgz |
---|
22 | |
---|
23 | depends_build port:pkgconfig |
---|
24 | depends_lib port:gtk2 |
---|
25 | |
---|
26 | checksums md5 8802f8a7f72bad2af44c3c277d57c415 \ |
---|
27 | sha1 8ffaee5a9eb5a0d7aec3a24ffce84bfbdb78cbe0 |
---|
28 | |
---|
29 | worksrcdir ${name}/gtk |
---|
30 | |
---|
31 | patchfiles scite-makefile.diff |
---|
32 | |
---|
33 | use_configure no |
---|
34 | |
---|
35 | build.args prefix=${prefix} GTK2=yes |
---|
36 | |
---|
37 | use_parallel_build yes |
---|
38 | |
---|
39 | pre-build { |
---|
40 | if {[variant_isset universal]} { |
---|
41 | set lipo_args {} |
---|
42 | set sysrootflags "" |
---|
43 | if {${configure.sdkroot} != ""} { |
---|
44 | set sysrootflags "-isysroot ${configure.sdkroot} " |
---|
45 | } |
---|
46 | |
---|
47 | foreach arch ${configure.universal_archs} { |
---|
48 | system "make -C ${workpath}/scintilla/gtk \ |
---|
49 | GTK2=yes UNIVERSAL_CFLAGS=\"${sysrootflags}-arch ${arch}\"" |
---|
50 | |
---|
51 | file mkdir ${workpath}/scintilla/bin/${arch} |
---|
52 | move ${workpath}/scintilla/bin/scintilla.a ${workpath}/scintilla/bin/${arch}/scintilla.a |
---|
53 | |
---|
54 | system "make -C ${workpath}/scintilla/gtk \ |
---|
55 | clean" |
---|
56 | |
---|
57 | lappend lipo_args -arch ${arch} ${workpath}/scintilla/bin/${arch}/scintilla.a |
---|
58 | } |
---|
59 | |
---|
60 | system "lipo -create [join ${lipo_args}] -output ${workpath}/scintilla/bin/scintilla.a" |
---|
61 | } else { |
---|
62 | system "make -C ${workpath}/scintilla/gtk \ |
---|
63 | GTK2=yes" |
---|
64 | } |
---|
65 | } |
---|
66 | |
---|
67 | destroot.destdir prefix=${destroot}${prefix} |
---|
68 | |
---|
69 | post-destroot { |
---|
70 | xinstall -m 444 ${worksrcpath}/../doc/scite.1 ${destroot}${prefix}/share/man/man1 |
---|
71 | set docdir ${prefix}/share/doc/${name}-${version} |
---|
72 | xinstall -d ${destroot}${docdir} |
---|
73 | xinstall -m 644 -W ${workpath}/scite License.txt README ${destroot}${docdir} |
---|
74 | } |
---|
75 | |
---|
76 | variant universal { |
---|
77 | post-patch { |
---|
78 | reinplace -E "/^CXXBASEFLAGS/s|\$| \$(UNIVERSAL_CFLAGS)|" \ |
---|
79 | ${workpath}/scintilla/gtk/makefile |
---|
80 | reinplace -E "/^CXXBASEFLAGS/s|\$| ${configure.universal_cflags}|" \ |
---|
81 | ${worksrcpath}/makefile |
---|
82 | } |
---|
83 | |
---|
84 | build.args-append "UNIVERSAL_LDFLAGS=\"${configure.universal_ldflags}\"" |
---|
85 | } |
---|
86 | |
---|
87 | livecheck.distname SciTE |
---|