Ticket #34805: Portfile

File Portfile, 3.2 KB (added by mojca (Mojca Miklavec), 12 years ago)

Poedit 1.5 Portfile (development version)

Line 
1# $Id: Portfile 78362 2011-05-04 22:45:06Z ryandesign@macports.org $
2
3PortSystem      1.0
4PortGroup       github 1.0
5github.setup    vslavik poedit b503277
6
7name            poedit-devel
8version         1.5
9# If Poedit.app is renamed into Poedit-Devel.app, there is no reason for a conflict and the two apps could happily coexist with each other
10#conflicts      poedit
11
12categories      devel aqua
13platforms       darwin
14license         MIT
15maintainers     raimue \
16                openmaintainer
17
18description     Poedit is a cross-platform gettext catalogs (.po files) editor.
19long_description \
20    Poedit is a cross-platform gettext catalogs (.po files) editor. It aims to \
21    provide more convenient approach to editing catalogs than editing the file by \
22    hand. This port installs Poedit.app.
23
24homepage        http://www.poedit.net/
25
26checksums       rmd160  1d8fe05d3e187d519f0ebfddd0f26adb60b66d59 \
27                sha256  cce200d84bbbece88b57bdc08a8c090c2ef57d6a5560f07ac76cb20dffe0fb35
28
29
30depends_build   bin:grep:grep \
31                port:pkgconfig \
32                port:bakefile \
33                port:asciidoc \
34                port:boost \
35                port:libicns
36depends_lib     port:wxWidgets \
37                port:gettext
38
39use_autoconf    yes
40autoconf.cmd    ./bootstrap
41
42# since this is the devel port anyway, this could just as well be the default option
43variant devel description {Uses wxWidgets-devel (allows 64-bit build)} {
44    depends_lib-delete        port:wxWidgets
45    depends_lib-append        port:wxWidgets-devel
46}
47
48# python crashes while running bakefile_gen without this patch
49# it might be worth investigating why
50post-patch {
51    reinplace "s|(cd win32 ; bakefile_gen) && ||" ${worksrcpath}/bootstrap
52}
53
54if {[variant_isset devel]} {
55    if {${configure.compiler} == "clang"} {
56        configure.compiler llvm-gcc-4.2
57    }
58} else {
59    # wxWidgets is not universal and is 32-bit only
60    universal_variant       no
61    supported_archs         i386 ppc
62}
63
64# remove some additional features, especially sparkle because macports handles updates
65configure.args  --disable-transmem --disable-spellchecking --without-sparkle
66
67build.dir           ${build.dir}/src
68build.target        bundle
69build.env-append    GETTEXT_BINARIES=${prefix}/bin
70
71variant transmem description {Enables translation memory for often used phrases} {
72    depends_lib-append      port:db44
73    configure.args-delete   --disable-transmem
74    configure.args-append   --enable-transmem
75}
76
77variant spellcheck description {Enables spellchecking} {
78    depends_lib-append      port:gtkspell2
79    configure.args-delete   --disable-spellchecking
80    configure.args-append   --enable-spellchecking
81}
82
83destroot {
84    # the gettext binaries are copied into Poedit.app during build,
85    # but we rather delete and symlink them to get updates to gettext automatically {
86    foreach extra { msgfmt msgmerge msgunfmt xgettext } {
87        file delete ${worksrcpath}/src/Poedit.app/Contents/MacOS/${extra}
88        ln -s ${prefix}/bin/${extra} ${worksrcpath}/src/Poedit.app/Contents/MacOS/${extra}
89    }
90    file delete ${worksrcpath}/src/Poedit.app/Contents/MacOS/gnu_gettext.COPYING
91    # }
92
93    file copy ${worksrcpath}/src/Poedit.app ${destroot}${applications_dir}/Poedit.app
94}