Ticket #38453: Portfile.diff

File Portfile.diff, 10.4 KB (added by zan@…, 12 years ago)
  • Portfile

    old new  
    33PortSystem              1.0
    44
    55name                    hydra
    6 version                 5.4
    7 revision                3
    8 distname                ${name}-${version}-src
     6version                 7.4.2
    97categories              security net
    108platforms               darwin
    119maintainers             nomaintainer
     10license                 GPL-3 OpenSSL SSLeay
    1211
    1312description \
    1413    A very fast network logon cracker which support many services
     
    1918    NNTP, VNC, ICQ, Socks5, PCNFS and more services within SSL \
    2019    support.
    2120
    22 homepage                http://www.thc.org/thc-hydra
    23 master_sites            http://freeworld.thc.org/releases
    24 checksums               md5 fa08b465d19321e77b1a0ef912eeecc1
    25 
    26 depends_lib             port:openssl port:libssh01
     21homepage                https://www.thc.org/thc-hydra
     22master_sites            https://www.thc.org/releases
     23fetch.ignore_sslcert    yes
     24
     25checksums               rmd160 8b085872e96fd7ecd4c43a8bc5c3075d2ebb1806 \
     26                        sha256 bdf670f8d197e1e7e03fb1bca9156ac34cd961496f1a4c3a3b7d79706d4d19df
     27
     28depends_lib             port:openssl \
     29                        port:libssh \
     30                        port:libidn \
     31                        port:ncurses \
     32                        port:pcre
    2733
     34# place cut-markers and fix xhydra_support setting in line 957
    2835patchfiles              patch-configure.diff
    2936
     37set incdir "${prefix}/include"
     38set libdir "${prefix}/lib"
     39
    3040post-patch {
    31     reinplace "s|SSL_PATH=\"\"|SSL_PATH=\"${prefix}/lib\"|" ${worksrcpath}/configure
    32     reinplace "s|SSL_IPATH=\"\"|SSL_IPATH=\"${prefix}/include\"|" ${worksrcpath}/configure
    33     reinplace "s|CRYPTO_PATH=\"\"|CRYPTO_PATH=\"${prefix}/lib\"|" ${worksrcpath}/configure
    34     reinplace "s|SSH_PATH=\"\"|SSH_PATH=\"${prefix}/lib/libssh01\"|" ${worksrcpath}/configure
    35     reinplace "s|SSH_IPATH=\"\"|SSH_IPATH=\"${prefix}/include/libssh01\"|" ${worksrcpath}/configure
     41    # Look only in Macports directories
     42    reinplace "s|^INCDIRS=.*$|INCDIRS=\"${incdir}\"|g" ${worksrcpath}/configure
     43    reinplace "s|^LIBDIRS=.*$|LIBDIRS=\"${libdir}\"|g" ${worksrcpath}/configure
     44    reinplace "s|XLIBPATHS=\"-L/usr/lib -L/usr/local/lib -L/lib\"|XLIBPATHS=\"\"|g" ${worksrcpath}/configure
     45
     46    # Disable searching for libs/headers for any module NOT set as variant
     47    if {![variant_isset postgresql80] && ![variant_isset postgresql81] && \
     48        ![variant_isset postgresql82] && ![variant_isset postgresql83] && \
     49        ![variant_isset postgresql84] && ![variant_isset postgresql90] && \
     50        ![variant_isset postgresql91] && ![variant_isset postgresql92]} {
     51        reinplace -E "/#@@CUT_POSTGRES/,/#CUT_POSTGRES@@/d" ${worksrcpath}/configure
     52    }
     53
     54    if {![variant_isset mysql5] && ![variant_isset mysql51] && [variant_isset mysql55] && \
     55        ![variant_isset mariadb] && ![variant_isset percona]} {
     56        reinplace -E "/#@@CUT_MYSQLA/,/#CUT_MYSQLA@@/d" ${worksrcpath}/configure
     57        reinplace -E "/#@@CUT_MYSQLB/,/#CUT_MYSQLB@@/d" ${worksrcpath}/configure
     58    } else {
     59        # Fix include path
     60        reinplace "s|MYSQL_IPATH=\"\$i/mysql\"|MYSQL_IPATH=\"\$i\"|" ${worksrcpath}/configure
     61    }
     62
     63    if {![variant_isset oracle]} {
     64        reinplace -E "/#@@CUT_ORACLE/,/#CUT_ORACLE@@/d" ${worksrcpath}/configure
     65    } else {
     66        # Async I/O is compiled into libSystem.B.dylib
     67        reinplace "s|LIBAIO=\"\"|LIBAIO=\"YES_WE_HAVE\"|g" ${worksrcpath}/configure
     68    }
     69
     70    if {![variant_isset subversion]} {
     71        reinplace -E "/#@@CUT_SVN/,/#CUT_SVN@@/d" ${worksrcpath}/configure
     72    }
     73   
     74    # These are not in variants, because they do not exist as ports (yet)
     75    reinplace -E "/#@@CUT_FB/,/#CUT_FB@@/d" ${worksrcpath}/configure
     76    reinplace -E "/#@@CUT_AFP/,/#CUT_AFP@@/d" ${worksrcpath}/configure
     77    reinplace -E "/#@@CUT_NCP/,/#CUT_NCP@@/d" ${worksrcpath}/configure
     78    reinplace -E "/#@@CUT_SAP/,/#CUT_SAP@@/d" ${worksrcpath}/configure
     79       
     80    # This one is very strange, it adds /usr/kerberos/include to the path
     81    # but I cannot find that it's being used anywhere. At the same time,
     82    # krb5.h is in /opt/local/include, so it's found from the default search path
     83    # if installed. We delete it here, because it we do not want anything from /usr,
     84    # but I don't know how to otherwise disable kerberos, or that it even matters.
     85    reinplace -E "/#@@CUT_KRB/,/CUT_KRB@@/d" ${worksrcpath}/configure
    3686}
    3787
    3888configure.args          --disable-xhydra
    3989
    4090post-configure {
    4191    reinplace "s|CC=gcc|CC=${configure.cc}|" ${worksrcpath}/Makefile
     92    reinplace "s|^OPTS=.*$|OPTS=-I. -Wall ${configure.cflags}|" ${worksrcpath}/Makefile
    4293}
    4394
    44 build.args              XIPATHS="-I${prefix}/include/libssh01 -I${prefix}/include" \
    45                         XLIBPATHS="-L${prefix}/lib/libssh01 -L${prefix}/lib"
    46 
    4795pre-destroot {
    4896    reinplace "s|PREFIX=${prefix}|PREFIX=${destroot}${prefix}|" ${worksrcpath}/Makefile
     97    reinplace "s|/man/man1|/share/man/man1|g" ${worksrcpath}/Makefile
    4998    set docdir ${destroot}${prefix}/share/doc/${name}-${version}
    5099    xinstall -d ${docdir}
    51100    xinstall -m 644 -W ${worksrcpath} \
    52101        CHANGES \
    53         LICENCE.HYDRA \
    54         LICENSE.GNU \
     102        LICENSE \
     103        LICENSE.OPENSSL \
    55104        README \
    56         TODO \
    57105        ${docdir}
    58106}
    59107
     
    62110    configure.args-delete   --disable-xhydra
    63111}
    64112
     113variant postgresql80 \
     114conflicts postgresql81 postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 \
     115description {Add support for PostgreSQL 8.0} {
     116    depends_lib-append    port:postgresql80
     117    set incdir "${incdir} ${prefix}/include/postgresql80"
     118    set libdir "${libdir} ${prefix}/lib/postgresql80"
     119}
     120
     121variant postgresql81 \
     122conflicts postgresql80 postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 \
     123description {Add support for PostgreSQL 8.1} {
     124    depends_lib-append    port:postgresql81
     125    set incdir "${incdir} ${prefix}/include/postgresql81"
     126    set libdir "${libdir} ${prefix}/lib/postgresql81"
     127}
     128
     129variant postgresql82 \
     130conflicts postgresql80 postgresql81 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 \
     131description {Add support for PostgreSQL 8.2} {
     132    depends_lib-append    port:postgresql82
     133    set incdir "${incdir} ${prefix}/include/postgresql82"
     134    set libdir "${libdir} ${prefix}/lib/postgresql82"
     135}
     136
     137variant postgresql83 \
     138conflicts postgresql80 postgresql81 postgresql82 postgresql84 postgresql90 postgresql91 postgresql92 \
     139description {Add support for PostgreSQL 8.3} {
     140    depends_lib-append    port:postgresql83
     141    set incdir "${incdir} ${prefix}/include/postgresql83"
     142    set libdir "${libdir} ${prefix}/lib/postgresql83"
     143}
     144
     145variant postgresql84 \
     146conflicts postgresql80 postgresql81 postgresql82 postgresql83 postgresql90 postgresql91 postgresql92 \
     147description {Add support for PostgreSQL 8.4} {
     148    depends_lib-append    port:postgresql84
     149    set incdir "${incdir} ${prefix}/include/postgresql84"
     150    set libdir "${libdir} ${prefix}/lib/postgresql84"
     151}
     152
     153variant postgresql90 \
     154conflicts postgresql80 postgresql81 postgresql82 postgresql83 postgresql84 postgresql91 postgresql92 \
     155description {Add support for PostgreSQL 9.0} {
     156    depends_lib-append    port:postgresql90
     157    set incdir "${incdir} ${prefix}/include/postgresql90"
     158    set libdir "${libdir} ${prefix}/lib/postgresql90"
     159}
     160
     161variant postgresql91 \
     162conflicts postgresql80 postgresql81 postgresql82 postgresql83 postgresql84 postgresql90 postgresql92 \
     163description {Add support for PostgreSQL 9.1} {
     164    depends_lib-append    port:postgresql91
     165    set incdir "${incdir} ${prefix}/include/postgresql91"
     166    set libdir "${libdir} ${prefix}/lib/postgresql91"
     167}
     168
     169variant postgresql92 \
     170conflicts postgresql80 postgresql81 postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 \
     171description {Add support for PostgreSQL 9.2} {
     172    depends_lib-append    port:postgresql92
     173    set incdir "${incdir} ${prefix}/include/postgresql92"
     174    set libdir "${libdir} ${prefix}/lib/postgresql92"
     175}
     176
     177variant mysql5 conflicts mysql51 mysql55 mariadb percona description {Add support for MySQL5} {
     178    depends_lib-append    port:mysql5
     179    set incdir "${incdir} ${prefix}/include/mysql5"
     180    set libdir "${incdir} ${prefix}/lib/mysql5/mysql"
     181}
     182
     183variant mysql51 conflicts mysql5 mysql55 mariadb percona description {Add support for MySQL 5.1} {
     184    depends_lib-append    port:mysql51
     185    set incdir "${incdir} ${prefix}/include/mysql51"
     186    set libdir "${libdir} ${prefix}/lib/mysql51/mysql"
     187}
     188
     189variant mysql55 conflicts mysql5 mysql51 mariadb percona description {Add support for MySQL 5.5} {
     190    depends_lib-append    port:mysql55
     191    set incdir "${incdir} ${prefix}/include/mysql55"
     192    set libdir "${libdir} ${prefix}/lib/mysql55/mysql"
     193}
     194
     195variant mariadb conflicts mysql5 mysql51 mysql55 percona description {Add support for MariaDB} {
     196    depends_lib-append    port:mariadb
     197    set incdir "${incdir} ${prefix}/include/mariadb"
     198    set libdir "${libdir} ${prefix}/lib/mariadb/mysql"
     199}
     200
     201variant percona conflicts mysql5 mysql51 mysql55 mariadb description {Add support for Percona} {
     202    depends_lib-append    port:percona
     203    set incdir "${incdir} ${prefix}/include/percona"
     204    set libdir "${libdir} ${prefix}/lib/percona/mysql"
     205}
     206
     207variant oracle description {Add support for Oracle} {
     208    depends_lib-append    port:oracle-instantclient
     209    configure.args-append --with-oracle=${prefix}/lib/oracle/sdk/include \
     210                          --with-oracle-lib=${prefix}/lib/oracle
     211}
     212
     213variant subversion description {Add support for Subversion} {
     214    depends_lib-append    port:subversion
     215}
     216
     217# Add this variant once someone creates a port for FirebirdSQL.
     218# See: http://www.firebirdsql.org/
     219# variant firebird description {Add support for FirebirdSQL} {}
     220
     221# Add this variant once someone creates a port for AFP-fs, the FUSE filesystem for Apple Filing Protocol
     222# See: https://sites.google.com/site/alexthepuffin/
     223# variant afp description {Add support for Apple Filing Protocol} {}
     224
     225# Add this variant once someone creates a port for ncpfs, an implementation of the Netware Core Protocol
     226# See: http://prope.insa-lyon.fr/~ppollet/ncpfs/
     227# variant ncp description {Add support for Netware Core Protocol} {}
     228
    65229livecheck.type          regex
    66230livecheck.url           ${homepage}
    67 livecheck.regex         "${name}-(.*?)-src"
     231livecheck.regex         "Current Version: (.*)"