Ticket #51083: Portfile

File Portfile, 2.0 KB (added by RJVB (René Bertin), 4 years ago)
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           qt5 1.0
5PortGroup           cmake 1.1
6PortGroup           github 1.0
7cmake.out_of_source yes
8
9fetch.type          git
10github.setup        tibirna qgit 74fd5f41db0a0d0ee40e01888d9fb5069b84bbac
11github.master_sites ${github.homepage}/archive
12name                qgit
13# qgit-2.9-10-g74fd5f4
14version             2.9.0.10
15categories          devel
16maintainers         nomaintainer
17description         A QT graphical interface to git repositories
18long_description    A QT graphical interface to git repositories
19
20distname            ${name}-git
21platforms           darwin linux
22
23#use_gz             yes
24worksrcdir          ${name}
25
26depends_lib-append  port:git
27
28patchfiles          patch_src_namespace_def.cpp.diff \
29                    patch_src_qgit.cpp.diff
30platform darwin {
31    patchfiles-append \
32                    patch-build-app-bundle.diff
33}
34
35post-patch {
36    reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/CMakeLists.txt
37}
38
39configure.args-append \
40                -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON
41platform linux {
42    cmake.install_rpath-prepend \
43                ${qt_libs_dir}
44}
45
46platform darwin {
47    destroot {
48        xinstall -m 755 -d ${destroot}${qt_apps_dir}
49        copy ${build.dir}/qgit.app ${destroot}${qt_apps_dir}
50
51        # Also link to ${prefix}/bin for easier access from the command line
52        # Especially useful since qgit is supposed to be started from
53        # the GIT repository location.
54        if {[info proc qt5.add_app_wrapper] ne ""} {
55            qt5.add_app_wrapper qgit
56        } else {
57            system "echo \"#!/bin/sh\nexport KDE_SESSION_VERSION=5\nexec \\\"${qt_apps_dir}/qgit.app/Contents/MacOS/qgit\\\" \\\"\\\$\@\\\"\" > ${destroot}${prefix}/bin/qgit"
58            system "chmod 755 ${destroot}${prefix}/bin/qgit"
59        }
60    }
61}
62
63github.tag_prefix ${name}-