| 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 | |
|---|
| 4 | PortSystem 1.0 |
|---|
| 5 | PortGroup compiler_blacklist_versions 1.0 |
|---|
| 6 | |
|---|
| 7 | name firebird |
|---|
| 8 | set v 2.5.2 |
|---|
| 9 | set suffix 26540-0 |
|---|
| 10 | version ${v}.${suffix} |
|---|
| 11 | distname Firebird-${version} |
|---|
| 12 | extract.suffix .tar.bz2 |
|---|
| 13 | categories databases |
|---|
| 14 | platforms darwin |
|---|
| 15 | maintainers yahoo.fr:jul_bsd openmaintainer |
|---|
| 16 | description Firebird SQL Database |
|---|
| 17 | long_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 | |
|---|
| 27 | homepage http://www.firebirdsql.org |
|---|
| 28 | license based on Mozilla Public License |
|---|
| 29 | master_sites sourceforge:project/firebird/firebird/${v}-Release/ |
|---|
| 30 | checksums rmd160 cad7fef7f47263f4a6a53f3eb962649bf90bf9c8 \ |
|---|
| 31 | sha256 bbb9a408198898818d5be3c301dde0f8524fd8e2f509662121d7393e02520721 |
|---|
| 32 | use_bzip2 yes |
|---|
| 33 | |
|---|
| 34 | ## Firebird can't compiled w clang (w/o TLS): use mp-gcc |
|---|
| 35 | depends_build port:libtool port:gmake |
|---|
| 36 | compiler.blacklist clang |
|---|
| 37 | #configure.compiler macports-gcc-4.9 |
|---|
| 38 | |
|---|
| 39 | configure.env LIBTOOLIZE=glibtoolize \ |
|---|
| 40 | LIBTOOL=glibtool |
|---|
| 41 | configure.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 | |
|---|
| 47 | configure.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 |
|---|
| 63 | post-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 | |
|---|
| 69 | build.cmd ${prefix}/bin/gmake |
|---|
| 70 | |
|---|
| 71 | startupitem.create yes |
|---|
| 72 | startupitem.name fb_inet_server |
|---|
| 73 | startupitem.executable "${prefix}/bin/fb_inet_server" |
|---|
| 74 | startupitem.logfile ${prefix}/var/log/fb_inet_server.log |
|---|
| 75 | startupitem.netchange yes |
|---|
| 76 | |
|---|
| 77 | destroot { |
|---|
| 78 | xinstall -m 755 -d ${frameworks_dir}/ |
|---|
| 79 | file copy ${worksrcpath}/gen/firebird/frameworks/Firebird.framework \ |
|---|
| 80 | ${frameworks_dir}/ |
|---|
| 81 | } |
|---|
| 82 | |
|---|
| 83 | default_variants +includedicu |
|---|
| 84 | |
|---|
| 85 | variant superserver description { use superserver configuration } { |
|---|
| 86 | configure-append --enable-superserver |
|---|
| 87 | } |
|---|
| 88 | |
|---|
| 89 | variant 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 | |
|---|
| 98 | variant 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 | |
|---|
| 107 | variant 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 | |
|---|
| 115 | livecheck.type regex |
|---|
| 116 | livecheck.url ${homepage}/en/server-packages/ |
|---|
| 117 | livecheck.regex "Firebird-(\\d+\\.\\d+\\.\\d+\\.\\d+-\\d+).tar.bz2" |
|---|