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 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup cxx11 1.0 |
---|
6 | # qgpgme is mostly used as a KDE dependency, so prefer qt5-kde |
---|
7 | set qt5.prefer_kde 1 |
---|
8 | PortGroup qt5 1.0 |
---|
9 | |
---|
10 | name qgpgme |
---|
11 | version 1.9.0 |
---|
12 | categories devel security crypto |
---|
13 | license GPL-2+ |
---|
14 | maintainers gmail.com:rjvbertin mk openmaintainer |
---|
15 | description Qt5 wrapper for the gpgme library for easy acces to GnuPG. |
---|
16 | long_description QGpgME is the Qt5 wrapper for GnuPG Made Easy (GPGME). |
---|
17 | |
---|
18 | platforms darwin linux |
---|
19 | |
---|
20 | homepage http://www.gnupg.org/related_software/gpgme/ |
---|
21 | master_sites gnupg:gpgme |
---|
22 | use_bzip2 yes |
---|
23 | |
---|
24 | distname gpgme-${version} |
---|
25 | # we use the same distfiles as port:gpgme: |
---|
26 | dist_subdir gpgme |
---|
27 | checksums rmd160 55719b4a7263ae8d0ef79205e26409ff5693ea27 \ |
---|
28 | sha256 1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb |
---|
29 | |
---|
30 | # either gnupg2 (the default) or gnupg21 is needed for running the unit tests |
---|
31 | # and at runtime but nothing from gnupg2 links directly with qgpgme |
---|
32 | depends_build port:pkgconfig \ |
---|
33 | path:bin/gpg2:gnupg2 |
---|
34 | |
---|
35 | depends_lib port:gpgme |
---|
36 | |
---|
37 | depends_run path:bin/gpg2:gnupg2 |
---|
38 | |
---|
39 | use_parallel_build yes |
---|
40 | |
---|
41 | # we have to build everything, but we can do the install (destroot) step from the lang/qt subdir |
---|
42 | destroot.dir ${worksrcpath}/lang/qt |
---|
43 | |
---|
44 | patchfiles patch-configure.ac.diff \ |
---|
45 | patch-tests-gpg-Makefile.am.diff |
---|
46 | |
---|
47 | platform darwin { |
---|
48 | pre-patch { |
---|
49 | # use /bin/echo to avoid garbling the C++ headers |
---|
50 | reinplace -W ${worksrcpath} "s|echo -n|/bin/echo -n|g" lang/qt/src/Makefile.am lang/qt/src/Makefile.in |
---|
51 | } |
---|
52 | } |
---|
53 | post-patch { |
---|
54 | reinplace "s|thread_modules=\"\"|thread_modules=\"pthread\"|" ${worksrcpath}/src/gpgme-config.in |
---|
55 | reinplace "s|@GPG@|${prefix}/bin/gpg2|" ${worksrcpath}/src/gpgme-config.in |
---|
56 | reinplace "s|@GPGSM@|${prefix}/bin/gpgsm|" ${worksrcpath}/src/gpgme-config.in |
---|
57 | } |
---|
58 | |
---|
59 | # cpp bindings require libc++ which we can rely on having thanks to the cxx11 portgroup |
---|
60 | lappend languages cpp qt |
---|
61 | |
---|
62 | use_autoreconf yes |
---|
63 | autoreconf.args -fvi |
---|
64 | |
---|
65 | post-configure { |
---|
66 | reinplace "s|CC -dynamiclib|CC -dynamiclib [get_canonical_archflags]|g" ${worksrcpath}/libtool |
---|
67 | } |
---|
68 | |
---|
69 | # rename libqgpgme to libq5gpgme to avoid conflicts with port:kdepimlibs4 |
---|
70 | # The library is found through CMake files (also modified), so well behaved |
---|
71 | # software (presumably KF5) won't have issues with the non-standard name. |
---|
72 | patchfiles-append patch-libqgpgme-name.diff |
---|
73 | |
---|
74 | |
---|
75 | # for building gpgme and gpgme++ |
---|
76 | configure.cflags-append \ |
---|
77 | -D_POSIX_C_SOURCE=200112L |
---|
78 | configure.cxxflags-append \ |
---|
79 | -D_POSIX_C_SOURCE=200112L |
---|
80 | |
---|
81 | configure.args --disable-dependency-tracking \ |
---|
82 | --enable-languages="${languages}" |
---|
83 | |
---|
84 | test.run yes |
---|
85 | test.target check |
---|
86 | test.dir ${destroot.dir} |
---|
87 | pre-test { |
---|
88 | ui_warn "enter \"abc\" when a passphrase is requested" |
---|
89 | } |
---|
90 | |
---|
91 | post-destroot { |
---|
92 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} |
---|
93 | ln -s ../gpgme ${destroot}${prefix}/share/doc/${name} |
---|
94 | xinstall -m 644 -W ${worksrcpath} lang/qt/README \ |
---|
95 | ${destroot}${prefix}/share/doc/${name} |
---|
96 | } |
---|
97 | |
---|
98 | livecheck.type regex |
---|
99 | livecheck.url ftp://ftp.gnupg.org/gcrypt/gpgme/ |
---|
100 | livecheck.regex "gpgme-(\\d+(?:\\.\\d+)*)${extract.suffix}" |
---|