source: trunk/dports/aqua/qt4-mac-sqlite2-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: 3.5 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 (indirectly via the qmake PortGroup); set
7# 'building_qt4' so that the portgroup does not include certain parts
8set building_qt4    1
9PortGroup           qmake 1.0
10PortGroup           xcodeversion 1.0
11
12name                qt4-mac-sqlite2-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
34if {${name} == ${subport}} {
35
36    set DB              sqlite2
37
38    description         Qt sqlite database plugin for sqlite2
39    long_description    ${description}
40    conflicts-append    qt4-mac-sqlite3-plugin
41    depends_lib-append  port:sqlite2
42    configure.args-append \
43                        INCLUDEPATH+=${worksrcpath}/include \
44                        LIBS+="-L${prefix}/lib -lsqlite"
45
46    configure.post_args sqlite2.pro
47
48    variant debug description {Build both release and debug plugin} {}
49
50    pre-configure {
51        configure.args-append CONFIG+=\"${qt_arch_types}\"
52    }
53
54    post-patch {
55        if {![variant_isset debug]} {
56            reinplace "s@debug_and_release@release@" \
57                ${worksrcpath}/src/plugins/qpluginbase.pri
58        }
59    }
60
61}
62
63subport qt4-mac-sqlite3-plugin {
64
65    set DB              sqlite
66
67    description         Qt sqlite database plugin for sqlite3
68    long_description    ${description}
69    conflicts-append    qt4-mac-sqlite2-plugin
70    depends_lib-append  port:sqlite3
71    configure.args-append INCLUDEPATH+=${worksrcpath}/include \
72                        LIBS+="-L${prefix}/lib -lsqlite3"
73    configure.post_args sqlite.pro
74
75    variant debug description \
76        {Build both release and debug plugin} {}
77
78    pre-configure {
79        configure.args-append CONFIG+=\"${qt_arch_types}\"
80    }
81
82    post-patch {
83        if {![variant_isset debug]} {
84            reinplace "s@debug_and_release@release@" \
85                ${worksrcpath}/src/plugins/qpluginbase.pri
86        }
87    }
88}
89
90set DRIVER          src/sql/drivers/${DB}
91set PLUGIN          src/plugins/sqldrivers/${DB}
92
93extract.post_args   | tar -xf - \
94                    ${distname}/${DRIVER} \
95                    ${distname}/${PLUGIN} \
96                    ${distname}/src/plugins/sqldrivers/qsqldriverbase.pri \
97                    ${distname}/src/plugins/qpluginbase.pri \
98                    ${distname}/src/qt_targets.pri \
99                    ${distname}/include/QtSql/private \
100                    ${distname}/src/sql/kernel
101
102configure.dir       ${worksrcpath}/${PLUGIN}
103configure.env-append \
104                    QMAKESPEC=${qt_mkspecs_dir}/macx-g++
105
106build.dir           ${worksrcpath}/${PLUGIN}
107build.target        {}
108
109livecheck.type      regex
110livecheck.url       http://download.qt.io/official_releases/qt/${branch}/
111livecheck.regex     >(\[0-9.\]+)/<
Note: See TracBrowser for help on using the repository browser.