# -*- 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

PortSystem          1.0
PortGroup           github 1.0
universal_variant   no
PortGroup           qmake5 1.0

github.setup        QupZilla qupzilla 2.2.6 v
revision            2
name                QupZilla
categories          www
platforms           darwin
maintainers         {ryandesign @ryandesign} openmaintainer
license             GPL-3+
supported_archs     x86_64

description         fast lightweight web browser made with Qt

long_description    QupZilla is a ${description}. QupZilla has all the \
                    standard features you expect from a web browser, \
                    including bookmarks, history, tabbed browsing, RSS \
                    feeds, ad blocking, Flash blocking, and an SSL \
                    certificate manager.

homepage            https://qupzilla.com
github.tarball_from releases
distname            ${name}-${version}
use_xz              yes

checksums           rmd160  3f598076d0fd697032e5cc1a68938364890e1da9 \
                    sha256  ef88afbaa85df9ed01e7848be1a82d910a9a62933f0f22acce299226dc4aeed4 \
                    size    2553780

qt5.depends_build_component     qttools
qt5.depends_component           qtwebengine
qt5.depends_runtime_component   sqlite-plugin

depends_lib-append  path:lib/libssl.dylib:openssl

patchfiles          patch-mac-macdeploy.sh.diff \
                    patch-src-lib-lib.pro.diff

build.args-append   QUPZILLA_PREFIX=${prefix}/

destroot.cmd        mac/macdeploy.sh
destroot.args       true
destroot.target
destroot.destdir

post-destroot {
    copy ${worksrcpath}/bin/QupZilla.app ${destroot}${applications_dir}
}
