source: trunk/dports/aqua/qt4-mac-postgresql91-plugin/Portfile

Last change on this file was 140960, checked in by michaelld@…, 22 months ago

qt4 various: change qt_dir to ${prefix}/libexec/qt4 to allow for a parallel install with qt5; rev-bump dependencies that are known to work with this change. Addresses the primary issue of #44193. Will address secondary issues down the road.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
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# $Id: Portfile 140960 2015-10-06 20:13:45Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6# use the qt4 group; set 'building_qt4' so that the portgroup
7# does not include certain parts
8set building_qt4    1
9PortGroup           qmake 1.0
10PortGroup           xcodeversion 1.0
11
12name                qt4-mac-postgresql91-plugin
13version             4.8.7
14revision            1
15set branch          [join [lrange [split ${version} .] 0 1] .]
16categories          aqua databases
17platforms           macosx
18maintainers         michaelld pixilla openmaintainer
19license             {LGPL-2.1 GPL-3}
20homepage            http://www.qt.io/
21
22master_sites        http://download.qt.io/official_releases/qt/${branch}/${version}/
23
24distname            qt-everywhere-opensource-src-${version}
25
26checksums           rmd160 afb5e5a99388e6429faca59cb5000054feffd166 \
27                    sha256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0
28
29dist_subdir         qt4-mac
30
31# when using 'building_qt4' and qmake, have to include dependency on qt4-mac
32depends_lib-append  port:qt4-mac
33
34set DB              psql
35set DRIVER          src/sql/drivers/${DB}
36set PLUGIN          src/plugins/sqldrivers/${DB}
37
38extract.post_args   | tar -xf - \
39                    ${distname}/${DRIVER} \
40                    ${distname}/${PLUGIN} \
41                    ${distname}/src/plugins/sqldrivers/qsqldriverbase.pri \
42                    ${distname}/src/plugins/qpluginbase.pri \
43                    ${distname}/src/qt_targets.pri
44
45configure.dir       ${worksrcpath}/${PLUGIN}
46configure.env-append \
47                    QMAKESPEC=${qt_mkspecs_dir}/macx-g++
48
49set mp.ports        {postgresql80 postgresql81 postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92}
50foreach mp.port ${mp.ports} {
51
52    lappend mp.names "qt4-mac-${mp.port}-plugin"
53}
54foreach mp.name ${mp.names} {
55
56    set idx             [lsearch ${mp.names} ${mp.name}]
57    set mp.port     [lindex ${mp.ports} $idx]
58    set mp.conflicts  [lreplace ${mp.names} $idx $idx]
59
60    if {[string compare ${mp.name} ${name}] == 0 && [string compare ${mp.name} ${subport}] == 0} {
61
62        description         Qt PostgreSQL database plugin for ${mp.port}
63        long_description    ${description}
64        eval conflicts-append    ${mp.conflicts}
65        depends_lib-append  port:${mp.port}
66        configure.args-append INCLUDEPATH+="${prefix}/include ${prefix}/include/${mp.port} ${prefix}/include/${mp.port}/server ${prefix}/include/Qt" \
67                            LIBS+="-L${prefix}/lib -L${prefix}/lib/${mp.port} -lpq"
68        configure.post_args psql.pro
69
70        variant debug description {Build both release and debug plugin} {}
71
72        pre-configure {
73            configure.args-append CONFIG+=\"${qt_arch_types}\"
74        }
75
76        post-patch {
77            if {![variant_isset debug]} {
78                reinplace "s@debug_and_release@release@" \
79                    ${worksrcpath}/src/plugins/qpluginbase.pri
80            }
81        }
82
83    } else {
84
85        subport ${mp.name} {
86       
87            description         Qt PostgreSQL database plugin for ${mp.port}
88            long_description    ${description}
89            eval conflicts-append    ${mp.conflicts}
90            depends_lib-append  port:${mp.port}
91            configure.args-append INCLUDEPATH+="${prefix}/include ${prefix}/include/${mp.port} ${prefix}/include/${mp.port}/server ${prefix}/include/Qt" \
92                                LIBS+="-L${prefix}/lib -L${prefix}/lib/${mp.port} -lpq"
93            configure.post_args psql.pro
94
95            variant debug description \
96                {Build both release and debug plugin} {}
97
98            pre-configure {
99                configure.args-append CONFIG+=\"${qt_arch_types}\"
100            }
101
102            post-patch {
103                if {![variant_isset debug]} {
104                    reinplace "s@debug_and_release@release@" \
105                        ${worksrcpath}/src/plugins/qpluginbase.pri
106                }
107            }
108        }
109    }
110}
111
112build.dir           ${worksrcpath}/${PLUGIN}
113build.target        {}
114
115livecheck.type      regex
116livecheck.url       http://download.qt.io/official_releases/qt/${branch}/
117livecheck.regex     >(\[0-9.\]+)/<
Note: See TracBrowser for help on using the repository browser.