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