Ticket #17710: Portfile.bind9.diff

File Portfile.bind9.diff, 5.2 KB (added by pixilla (Bradley Giesbrecht), 16 years ago)

Patch to add dlz-mysql

  • Portfile

    old new  
    22
    33PortSystem 1.0
    44
    5 name                    bind9
    6 version                 9.5.0-P2
     5name      bind9
     6version      9.5.0-P2
    77
    8 categories              net
    9 maintainers             dluke@geeklair.net
    10 platforms               darwin freebsd sunos
    11 
    12 description             Domain Name System server
    13 long_description        The BIND DNS Server is used on the vast majority of name \
    14                                 serving machines on the Internet, providing a robust \
    15                                 and stable \
    16                                 architecture on top of which an organization's naming architecture \
    17                                 can be built.  The resolver library included in the BIND distribution \
    18                                 provides the standard APIs for translation between domain names \
    19                                 and Internet addresses and is intended to be linked with applications \
    20                                 requiring name service.
    21 homepage                http://www.isc.org
    22 
    23 distname                bind-${version}
    24 master_sites            isc:${name}/${version}
    25 checksums               md5 16c893f73a394c8cc36d7900cb9bb801 \
    26                         sha1 e93a230e0e80e8e5975c83bf0ca0b1186f53fe52 \
    27                         rmd160 2ac07f4d48f22cfeabd4d8089aaf955b81199dc0
    28 
    29 depends_lib             port:openssl
    30 
    31 use_parallel_build      no
    32 universal_variant       no
    33 
    34 test.run                yes
    35 test.target             test
    36 
    37 startupitem.create      yes
    38 startupitem.netchange   yes
    39 startupitem.executable  ${prefix}/sbin/named -f
    40 
    41 configure.args          --mandir=${prefix}/share/man --enable-libbind \
    42                                 --with-openssl=${prefix} \
    43                                 --enable-threads \
    44                                 --enable-ipv6
     8categories    net
     9maintainers    dluke@geeklair.net
     10platforms    darwin freebsd sunos
     11
     12description    Domain Name System server
     13long_description    The BIND DNS Server is used on the vast majority of name \
     14        serving machines on the Internet, providing a robust \
     15        and stable \
     16        architecture on top of which an organization's naming architecture \
     17        can be built.  The resolver library included in the BIND distribution \
     18        provides the standard APIs for translation between domain names \
     19        and Internet addresses and is intended to be linked with applications \
     20        requiring name service.
     21homepage    http://www.isc.org
     22
     23distname    bind-${version}
     24master_sites    isc:${name}/${version}
     25checksums    md5 16c893f73a394c8cc36d7900cb9bb801 \
     26      sha1 e93a230e0e80e8e5975c83bf0ca0b1186f53fe52 \
     27      rmd160 2ac07f4d48f22cfeabd4d8089aaf955b81199dc0
     28
     29depends_lib    port:openssl
     30
     31use_parallel_build  no
     32universal_variant  no
     33
     34test.run yes
     35test.target test
     36
     37startupitem.create yes
     38startupitem.netchange yes
     39startupitem.executable ${prefix}/sbin/named -f
     40
     41configure.args --mandir=${prefix}/share/man --enable-libbind \
     42        --with-openssl=${prefix} \
     43        --enable-threads \
     44        --enable-ipv6
    4545
    4646post-patch {
    47         # Put bind includes in ${prefix}/include/bind
    48         reinplace "s|/bind/include|/include/bind|" \
    49                 ${worksrcpath}/lib/bind/configure
    50         # Put bind libs in ${prefix}/lib/bind
    51         reinplace "s|/bind/lib|/lib/bind|" \
    52                 ${worksrcpath}/lib/bind/configure
     47  # Put bind includes in ${prefix}/include/bind
     48  reinplace "s|/bind/include|/include/bind|" \
     49    ${worksrcpath}/lib/bind/configure
     50  # Put bind libs in ${prefix}/lib/bind
     51  reinplace "s|/bind/lib|/lib/bind|" \
     52    ${worksrcpath}/lib/bind/configure
    5353}
    5454
    55 post-destroot   {
    56         # Ensure needed directories
    57         xinstall -m 755 -d \
    58                 ${destroot}${prefix}/var/named \
    59                 ${destroot}${prefix}/var/run
    60        
    61         # Install the conf file as a sample
    62         xinstall -o root -m 644 ${filespath}/named.conf \
    63                 ${destroot}${prefix}/etc/named.conf.dist
    64         reinplace "s|%%PREFIX%%|${prefix}|g" \
    65                 ${destroot}${prefix}/etc/named.conf.dist
    66        
    67         # Install the db files as samples
    68         foreach f "db.127.0.0 db.cache db.localhost" {
    69                 xinstall -o root -m 644 ${filespath}/${f} \
    70                         ${destroot}${prefix}/var/named/${f}.dist
    71         }
     55post-destroot  {
     56  # Ensure needed directories
     57  xinstall -m 755 -d \
     58    ${destroot}${prefix}/var/named \
     59    ${destroot}${prefix}/var/run
     60 
     61  # Install the conf file as a sample
     62  xinstall -o root -m 644 ${filespath}/named.conf \
     63    ${destroot}${prefix}/etc/named.conf.dist
     64  reinplace "s|%%PREFIX%%|${prefix}|g" \
     65    ${destroot}${prefix}/etc/named.conf.dist
     66 
     67  # Install the db files as samples
     68  foreach f "db.127.0.0 db.cache db.localhost" {
     69    xinstall -o root -m 644 ${filespath}/${f} \
     70    ${destroot}${prefix}/var/named/${f}.dist
     71  }
    7272
    73         destroot.keepdirs ${destroot}${prefix}/var/run
     73  destroot.keepdirs ${destroot}${prefix}/var/run
    7474}
    7575
    7676platform darwin 6 { depends_lib-append lib:libdl:dlcompat }
    7777
    7878variant mysql description {Dynamically load zone data from mysql} {
    79         depends_lib-append \
    80                 port:mysql5
    81         configure.args-delete \
    82                 --with-threads
    83         configure.args-append \
    84                 --with-dlz-mysql=/usr/local
     79  set RANLIB "ranlib -c"
     80  patch {
     81    reinplace "s| -lcrypt | |g" \
     82    ${worksrcpath}/configure \
     83    ${worksrcpath}/contrib/dlz/config.dlz.in
     84  }
     85  depends_build-append \
     86    port:mysql5
     87  configure.args-delete \
     88    --enable-threads
     89  configure.args-append \
     90    --disable-threads \
     91    --with-dlz-mysql="${workpath}/mysql"
     92  post-extract {
     93    file mkdir "${workpath}/mysql"
     94    file link -symbolic "${workpath}/mysql/lib" "${prefix}/lib/mysql5"
     95    file link -symbolic "${workpath}/mysql/include" "${prefix}/include/mysql5"
     96  }
    8597}
    8698