Ticket #42128: Portfile

File Portfile, 5.3 KB (added by jul_bsd@…, 10 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# $Id$
3
4PortSystem          1.0
5PortGroup           compiler_blacklist_versions 1.0
6
7name                firebird
8set v               2.5.2
9set suffix          26540-0
10version             ${v}.${suffix}
11distname            Firebird-${version}
12extract.suffix      .tar.bz2
13categories          databases
14platforms           darwin
15maintainers         yahoo.fr:jul_bsd openmaintainer
16description         Firebird SQL Database
17long_description    Firebird is a relational database offering many \
18                    ANSI SQL standard features that runs on Linux, \
19                    Windows, and a variety of Unix platforms. \
20                    Firebird offers excellent concurrency, high \
21                    performance, and powerful language support for \
22                    stored procedures and triggers. It has been \
23                    used in production systems, under a variety of \
24                    names, since 1981 and is common in embedded \
25                    applications.
26
27homepage            http://www.firebirdsql.org
28license             based on Mozilla Public License
29master_sites        sourceforge:project/firebird/firebird/${v}-Release/
30checksums           rmd160  cad7fef7f47263f4a6a53f3eb962649bf90bf9c8 \
31                    sha256  bbb9a408198898818d5be3c301dde0f8524fd8e2f509662121d7393e02520721
32use_bzip2           yes
33
34## Firebird can't compiled w clang (w/o TLS): use mp-gcc
35depends_build       port:libtool port:gmake
36compiler.blacklist  clang
37#configure.compiler  macports-gcc-4.9
38
39configure.env       LIBTOOLIZE=glibtoolize \
40            LIBTOOL=glibtool
41configure.args      --mandir=${prefix}/share/man \
42## default compiler: "error: thread-local storage is unsupported for the current target" => better force recent gcc
43## FIXME! need review to adjust blacklist
44#compiler.blacklist gcc-4.0 gcc-4.2 macports-gcc-4.2 macports-gcc-4.3 {clang < 500}
45#configure.compiler macports-gcc-4.9
46
47configure.args      --mandir=${prefix}/share/man \
48                    --with-editline \
49                    --with-fbbin=${prefix}/bin --with-fbsbin=${prefix}/sbin \
50                    --with-fbconf=${prefix}/etc/firebird --with-fbdoc=${prefix}/share/firebird/doc \
51                    --with-fbudf=${prefix}/share/examples/firebird/UDF --with-fbsample=${prefix}/share/examples/firebird \
52                    --with-fbsample-db=${prefix}/share/examples/firebird/empbuild \
53                    --with-fbintl=${prefix}/share/doc/firebird/intl \
54                    --with-fbmisc=${prefix}/share/doc/firebird/misc \
55                    --with-fbsecure-db=${prefix}/etc/firebird \
56                    --with-fbmsg=${prefix}/etc/firebird \
57                    --with-fblog=${prefix}/var/log/firebird \
58                    --with-fbglock=${prefix}/var/log/firebird \
59                    --with-fbplugins=${prefix}/share/doc/firebird
60
61## for some reason, customizing CFLAGS,CPPFLAGS,LDFLAGS,LD_LIBRARY_PATH doesn't seem to work be it as configure.cflags or env ... go bad, but fall on another/different error...
62#configure.cxx       ${prefix}/bin/g++-mp-4.9 -L${prefix}/lib
63post-configure {
64    addgroup firebird
65    add_users firebird gid=[existsgroup firebird] home=${prefix}/var/firebird shell=/sbin/nologin realname=Firebird\ DB\ user
66}
67
68
69build.cmd           ${prefix}/bin/gmake
70
71startupitem.create  yes
72startupitem.name    fb_inet_server
73startupitem.executable "${prefix}/bin/fb_inet_server"
74startupitem.logfile ${prefix}/var/log/fb_inet_server.log
75startupitem.netchange yes
76
77destroot {
78    xinstall -m 755 -d ${frameworks_dir}/
79    file copy ${worksrcpath}/gen/firebird/frameworks/Firebird.framework \
80        ${frameworks_dir}/
81}
82
83default_variants +includedicu
84
85variant superserver description { use superserver configuration } {
86    configure-append    --enable-superserver
87}
88
89variant includedicu description { use Firebird internal ICU } conflicts systemicu {
90#    configure.env-append    LDFLAGS="-L${worksrcpath}/gen/firebird/lib" LD_LIBRARY_PATH="${worksrcpath}/gen/firebird/lib" ## NOK
91#    configure.env-append    LDFLAGS="-L../lib"    ## NOK
92#    configure.env-append    LDFLAGS="-L${worksrcpath}/extern/icu/source/lib" ## NOK
93#    configure.env-append    LDFLAGS="-L${worksrcpath}/extern/icu/source/lib -search_paths_first" ## NOK
94#    configure.env-append    LDFLAGS="-L${worksrcpath}/extern/icu/source/stubdata" ## NOK
95#    configure.env-append    LDFLAGS="-L${worksrcpath}/extern/icu/source/lib -Wl,-search_paths_first"
96}
97
98variant systemicu description { use Macports ICU } conflicts includedicu {
99    ## Note: recommendation seems to avoid using outside icu
100    ## FIXME! conflict w previous variant or replace it
101    configure.args-append    --with-system-icu
102    configure.env-append    CXXFLAGS='-L${prefix}/lib'
103
104    default_variants-delete +includedicu
105}
106
107variant clang description { fix to compile with clang } {
108
109    post-patch {
110        reinplace "s|MACOSX_DEPLOYMENT_TARGET=10.6|MACOSX_DEPLOYMENT_TARGET=10.7|" ${worksrcpath}/builds/posix/prefix.darwin_x86_64
111        reinplace "s|macosx-version-min=10.6|macosx-version-min=10.7|" ${worksrcpath}/builds/posix/prefix.darwin_x86_64
112    }
113}
114
115livecheck.type      regex
116livecheck.url       ${homepage}/en/server-packages/
117livecheck.regex     "Firebird-(\\d+\\.\\d+\\.\\d+\\.\\d+-\\d+).tar.bz2"