Ticket #34805: poedit.Portfile

File poedit.Portfile, 2.9 KB (added by mojca (Mojca Miklavec), 12 years ago)

Portfile for Poedit 1.5.2

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 1.5.2 v
6
7name            poedit
8version         1.5.2
9
10categories      devel aqua
11platforms       darwin
12license         MIT
13maintainers     raimue \
14                openmaintainer
15
16description     Poedit is a cross-platform gettext catalogs (.po files) editor.
17long_description \
18    Poedit is a cross-platform gettext catalogs (.po files) editor. It aims to \
19    provide more convenient approach to editing catalogs than editing the file by \
20    hand. This port installs Poedit.app.
21
22homepage        http://www.poedit.net/
23
24checksums       rmd160  5688912928b5416c83a1ea2ce32908fe8abda4ad \
25                sha256  8f27acaa052f28478a3674f48aab2a231028fb7511692b807792b45af4d89d9f
26
27depends_build   bin:grep:grep \
28                port:pkgconfig \
29                port:bakefile \
30                port:asciidoc \
31                port:boost \
32                port:libicns
33depends_lib     port:wxWidgets \
34                port:gettext
35
36patchfiles      patch-sparkle.diff
37
38use_autoconf    yes
39autoconf.cmd    ./bootstrap
40
41variant wxwidgets_devel description {Uses wxWidgets-devel (allows 64-bit build)} {
42    depends_lib-delete        port:wxWidgets
43    depends_lib-append        port:wxWidgets-devel
44}
45
46# python crashes while running bakefile_gen without this patch
47# it might be worth investigating why
48post-patch {
49    reinplace "s|(cd win32 ; bakefile_gen) && ||" ${worksrcpath}/bootstrap
50}
51
52if {![variant_isset wxwidgets_devel]} {
53    # wxWidgets 2.8 is not universal and is 32-bit only
54    universal_variant       no
55    supported_archs         i386 ppc
56}
57
58# remove some additional features, especially sparkle because macports handles updates
59configure.args  --disable-transmem --disable-spellchecking --without-sparkle
60
61build.dir           ${build.dir}/src
62build.target        bundle
63build.env-append    GETTEXT_PREFIX=${prefix}
64
65variant transmem description {Enables translation memory for often used phrases} {
66    depends_lib-append      port:db44
67    configure.args-delete   --disable-transmem
68    configure.args-append   --enable-transmem
69}
70
71variant spellcheck description {Enables spellchecking} {
72    depends_lib-append      port:gtkspell2
73    configure.args-delete   --disable-spellchecking
74    configure.args-append   --enable-spellchecking
75}
76
77destroot {
78    # the gettext binaries are copied into Poedit.app during build,
79    # but we rather delete and symlink them to get updates to gettext automatically {
80    foreach extra { msgfmt msgmerge msgunfmt xgettext } {
81        file delete ${worksrcpath}/src/Poedit.app/Contents/MacOS/${extra}
82        ln -s ${prefix}/bin/${extra} ${worksrcpath}/src/Poedit.app/Contents/MacOS/${extra}
83    }
84    file delete ${worksrcpath}/src/Poedit.app/Contents/MacOS/gnu_gettext.COPYING
85    # }
86
87    file copy ${worksrcpath}/src/Poedit.app ${destroot}${applications_dir}/Poedit.app
88}