Ticket #69827: Portfile.got0.98.2libreoropenssl

File Portfile.got0.98.2libreoropenssl, 2.5 KB (added by artkiver (グレェ), 3 weeks ago)

A got portable 0.98.2 Portfile with some logic to attempt to add a libressl and an openssl variant this functions sort of but not reliably in all my local tests so far hopefully others can improve upon it

Line 
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
3PortSystem          1.0
4PortGroup           legacysupport 1.1
5
6name                got
7version             0.98.2
8revision            0
9distname            ${name}-portable-${version}
10categories          devel
11license             ISC
12maintainers         {@artkiver gmail.com:artkiver} openmaintainer
13description         Game of Trees (Got)
14long_description    Game of Trees is a version control system which \
15                    prioritizes ease of use and simplicity over flexibility. \
16                    Got uses Git repositories to store versioned data. \
17                    Git can be used for any functionality which has \
18                    not yet been implemented in Got. It will always be \
19                    possible to work with both Got and Git on the same \
20                    repository.
21homepage            https://gameoftrees.org/
22master_sites        ${homepage}releases/portable/
23checksums           rmd160 00350a026f2de189d5361cc43bf2aca845140696 \
24                    sha256 ff5d4ad9922edf1c8055b2398650972fd463c809590dbe78e2eab1bf78a150c8 \
25                    size 1351206
26
27depends_lib         port:ncurses \
28                    port:ossp-uuid \
29                    port:libevent
30depends_build       port:bison \
31                    port:pkgconfig
32
33variant libressl conflicts openssl description {use LibreSSL} {
34    depends_lib-append  port:libressl
35}
36
37variant openssl conflicts libressl description {use OpenSSL} {
38    depends_lib-append  port:libretls \
39                        port:openssl
40}
41
42if {![catch {registry_active openssl}] && ![variant_isset libressl]} {
43  # openssl is installed and the libressl variant isn't manually requested, default to openssl
44  default_variants +openssl
45} elseif {(![catch {registry_active libressl}] || ![catch {registry_active libressl-devel}]) && ![variant_isset openssl]} {
46  # either libressl or libressl-devel are already installed, and the openssl variant is not explicitly requested, default to libressl
47  default_variants +libressl
48} elseif {![variant_isset openssl]} {
49  # neither openssl nor libressl-devel are installed, and the openssl variant isn't selected, so libressl should be the default
50  default_variants +libressl
51}
52
53livecheck.type      regex
54livecheck.url       https://gameoftrees.org/
55livecheck.regex     "Game of Trees -portable (\\d+\\.\\d+)"
56configure.checks.implicit_function_declaration.whitelist-append strchr