source: trunk/dports/security/hydra/Portfile

Last change on this file was 146517, checked in by raimue@…, 21 months ago

Mass rev-bump dependents of port openssl due to ABI change

Disabling SSLv2 in r146162 changed the ABI of the library, leading to loading
errors for binaries with references to SSLv2 symbols.

https://lists.macosforge.org/pipermail/macports-dev/2016-March/032531.html

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.5 KB
Line 
1# $Id: Portfile 146517 2016-03-10 17:49:28Z ryandesign@macports.org $
2
3PortSystem              1.0
4
5name                    hydra
6version                 7.5
7revision                3
8categories              security net
9platforms               darwin
10maintainers             nomaintainer
11license                 {AGPL-3 OpenSSLException}
12
13description \
14    A very fast network logon cracker which support many services
15
16long_description \
17    Hydra is a parallelized logon cracker utility. Hydra can \
18    brute force attack on FTP, POP3, IMAP, Telnet, HTTP Auth, \
19    NNTP, VNC, ICQ, Socks5, PCNFS and more services within SSL \
20    support.
21
22homepage                https://www.thc.org/thc-hydra
23master_sites            https://www.thc.org/releases
24fetch.ignore_sslcert    yes
25
26checksums               rmd160  f5edc8473889ab90ef971226f4276683b193a466 \
27                        sha256  7293e7c32198219688e5bf5308f7e8eab37ad78d49701c9860a6b22aecda0ab6
28
29depends_lib             path:lib/libssl.dylib:openssl \
30                        port:libssh \
31                        port:libidn \
32                        port:ncurses \
33                        port:pcre
34
35# place cut-markers and fix xhydra_support setting in line 957
36patchfiles              patch-configure.diff
37
38set incdir "${prefix}/include"
39set libdir "${prefix}/lib"
40
41post-patch {
42    # Look only in Macports directories
43    reinplace "s|^INCDIRS=.*$|INCDIRS=\"${incdir}\"|g" ${worksrcpath}/configure
44    reinplace "s|^LIBDIRS=.*$|LIBDIRS=\"${libdir}\"|g" ${worksrcpath}/configure
45    reinplace "s|XLIBPATHS=\"-L/usr/lib -L/usr/local/lib -L/lib\"|XLIBPATHS=\"\"|g" ${worksrcpath}/configure
46
47    # Disable searching for libs/headers for any module NOT set as variant
48    if {![variant_isset postgresql80] && ![variant_isset postgresql81] && \
49        ![variant_isset postgresql82] && ![variant_isset postgresql83] && \
50        ![variant_isset postgresql84] && ![variant_isset postgresql90] && \
51        ![variant_isset postgresql91] && ![variant_isset postgresql92]} {
52        reinplace -E "/#@@CUT_POSTGRES/,/#CUT_POSTGRES@@/d" ${worksrcpath}/configure
53    }
54
55    if {![variant_isset mysql5] && ![variant_isset mysql51] && [variant_isset mysql55] && \
56        ![variant_isset mariadb] && ![variant_isset percona]} {
57        reinplace -E "/#@@CUT_MYSQLA/,/#CUT_MYSQLA@@/d" ${worksrcpath}/configure
58        reinplace -E "/#@@CUT_MYSQLB/,/#CUT_MYSQLB@@/d" ${worksrcpath}/configure
59    } else {
60        # Fix include path
61        reinplace "s|MYSQL_IPATH=\"\$i/mysql\"|MYSQL_IPATH=\"\$i\"|" ${worksrcpath}/configure
62    }
63
64    if {![variant_isset oracle]} {
65        reinplace -E "/#@@CUT_ORACLE/,/#CUT_ORACLE@@/d" ${worksrcpath}/configure
66    } else {
67        # Async I/O is compiled into libSystem.B.dylib
68        reinplace "s|LIBAIO=\"\"|LIBAIO=\"YES_WE_HAVE\"|g" ${worksrcpath}/configure
69    }
70
71    if {![variant_isset subversion]} {
72        reinplace -E "/#@@CUT_SVN/,/#CUT_SVN@@/d" ${worksrcpath}/configure
73    }
74   
75    # These are not in variants, because they do not exist as ports (yet)
76    reinplace -E "/#@@CUT_FB/,/#CUT_FB@@/d" ${worksrcpath}/configure
77    reinplace -E "/#@@CUT_AFP/,/#CUT_AFP@@/d" ${worksrcpath}/configure
78    reinplace -E "/#@@CUT_NCP/,/#CUT_NCP@@/d" ${worksrcpath}/configure
79    reinplace -E "/#@@CUT_SAP/,/#CUT_SAP@@/d" ${worksrcpath}/configure
80       
81    # This one is very strange, it adds /usr/kerberos/include to the path
82    # but I cannot find that it's being used anywhere. At the same time,
83    # krb5.h is in /opt/local/include, so it's found from the default search path
84    # if installed. We delete it here, because it we do not want anything from /usr,
85    # but I don't know how to otherwise disable kerberos, or that it even matters.
86    reinplace -E "/#@@CUT_KRB/,/CUT_KRB@@/d" ${worksrcpath}/configure
87}
88
89configure.args          --disable-xhydra
90
91post-configure {
92    reinplace "s|CC=gcc|CC=${configure.cc}|" ${worksrcpath}/Makefile
93    reinplace "s|^OPTS=.*$|OPTS=-I. -Wall ${configure.cflags}|" ${worksrcpath}/Makefile
94}
95
96pre-destroot {
97    reinplace "s|PREFIX=${prefix}|PREFIX=${destroot}${prefix}|" ${worksrcpath}/Makefile
98    reinplace "s|/man/man1|/share/man/man1|g" ${worksrcpath}/Makefile
99    set docdir ${destroot}${prefix}/share/doc/${name}-${version}
100    xinstall -d ${docdir}
101    xinstall -m 644 -W ${worksrcpath} \
102        CHANGES \
103        LICENSE \
104        LICENSE.OPENSSL \
105        README \
106        ${docdir}
107}
108
109variant xhydra description {Add xhydra GUI} {
110    patchfiles-append       patch-Makefile.am-fail-if-xhydra-fails.diff \
111                            patch-hydra-gtk__make_xhydra.sh-fial-if-xhydra-fails.diff
112    depends_build-append    port:pkgconfig
113    depends_lib-append      port:gtk2
114    configure.args-delete   --disable-xhydra
115    build.env-append        CC=${configure.cc}
116}
117
118variant postgresql80 \
119conflicts postgresql81 postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 \
120description {Add support for PostgreSQL 8.0} {
121    depends_lib-append    port:postgresql80
122    set incdir "${incdir} ${prefix}/include/postgresql80"
123    set libdir "${libdir} ${prefix}/lib/postgresql80"
124}
125
126variant postgresql81 \
127conflicts postgresql80 postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 \
128description {Add support for PostgreSQL 8.1} {
129    depends_lib-append    port:postgresql81
130    set incdir "${incdir} ${prefix}/include/postgresql81"
131    set libdir "${libdir} ${prefix}/lib/postgresql81"
132}
133
134variant postgresql82 \
135conflicts postgresql80 postgresql81 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 \
136description {Add support for PostgreSQL 8.2} {
137    depends_lib-append    port:postgresql82
138    set incdir "${incdir} ${prefix}/include/postgresql82"
139    set libdir "${libdir} ${prefix}/lib/postgresql82"
140}
141
142variant postgresql83 \
143conflicts postgresql80 postgresql81 postgresql82 postgresql84 postgresql90 postgresql91 postgresql92 \
144description {Add support for PostgreSQL 8.3} {
145    depends_lib-append    port:postgresql83
146    set incdir "${incdir} ${prefix}/include/postgresql83"
147    set libdir "${libdir} ${prefix}/lib/postgresql83"
148}
149
150variant postgresql84 \
151conflicts postgresql80 postgresql81 postgresql82 postgresql83 postgresql90 postgresql91 postgresql92 \
152description {Add support for PostgreSQL 8.4} {
153    depends_lib-append    port:postgresql84
154    set incdir "${incdir} ${prefix}/include/postgresql84"
155    set libdir "${libdir} ${prefix}/lib/postgresql84"
156}
157
158variant postgresql90 \
159conflicts postgresql80 postgresql81 postgresql82 postgresql83 postgresql84 postgresql91 postgresql92 \
160description {Add support for PostgreSQL 9.0} {
161    depends_lib-append    port:postgresql90
162    set incdir "${incdir} ${prefix}/include/postgresql90"
163    set libdir "${libdir} ${prefix}/lib/postgresql90"
164}
165
166variant postgresql91 \
167conflicts postgresql80 postgresql81 postgresql82 postgresql83 postgresql84 postgresql90 postgresql92 \
168description {Add support for PostgreSQL 9.1} {
169    depends_lib-append    port:postgresql91
170    set incdir "${incdir} ${prefix}/include/postgresql91"
171    set libdir "${libdir} ${prefix}/lib/postgresql91"
172}
173
174variant postgresql92 \
175conflicts postgresql80 postgresql81 postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 \
176description {Add support for PostgreSQL 9.2} {
177    depends_lib-append    port:postgresql92
178    set incdir "${incdir} ${prefix}/include/postgresql92"
179    set libdir "${libdir} ${prefix}/lib/postgresql92"
180}
181
182variant mysql5 conflicts mysql51 mysql55 mariadb percona description {Add support for MySQL5} {
183    depends_lib-append    port:mysql5
184    set incdir "${incdir} ${prefix}/include/mysql5"
185    set libdir "${incdir} ${prefix}/lib/mysql5/mysql"
186}
187
188variant mysql51 conflicts mysql5 mysql55 mariadb percona description {Add support for MySQL 5.1} {
189    depends_lib-append    port:mysql51
190    set incdir "${incdir} ${prefix}/include/mysql51"
191    set libdir "${libdir} ${prefix}/lib/mysql51/mysql"
192}
193
194variant mysql55 conflicts mysql5 mysql51 mariadb percona description {Add support for MySQL 5.5} {
195    depends_lib-append    port:mysql55
196    set incdir "${incdir} ${prefix}/include/mysql55"
197    set libdir "${libdir} ${prefix}/lib/mysql55/mysql"
198}
199
200variant mariadb conflicts mysql5 mysql51 mysql55 percona description {Add support for MariaDB} {
201    depends_lib-append    port:mariadb
202    set incdir "${incdir} ${prefix}/include/mariadb"
203    set libdir "${libdir} ${prefix}/lib/mariadb/mysql"
204}
205
206variant percona conflicts mysql5 mysql51 mysql55 mariadb description {Add support for Percona} {
207    depends_lib-append    port:percona
208    set incdir "${incdir} ${prefix}/include/percona"
209    set libdir "${libdir} ${prefix}/lib/percona/mysql"
210}
211
212variant oracle description {Add support for Oracle} {
213    depends_lib-append    port:oracle-instantclient
214    configure.args-append --with-oracle=${prefix}/lib/oracle/sdk/include \
215                          --with-oracle-lib=${prefix}/lib/oracle
216}
217
218variant subversion description {Add support for Subversion} {
219    depends_lib-append    port:subversion
220}
221
222# Add this variant once someone creates a port for FirebirdSQL.
223# See: http://www.firebirdsql.org/
224# variant firebird description {Add support for FirebirdSQL} {}
225
226# Add this variant once someone creates a port for AFP-fs, the FUSE filesystem for Apple Filing Protocol
227# See: https://sites.google.com/site/alexthepuffin/
228# variant afp description {Add support for Apple Filing Protocol} {}
229
230# Add this variant once someone creates a port for ncpfs, an implementation of the Netware Core Protocol
231# See: http://prope.insa-lyon.fr/~ppollet/ncpfs/
232# variant ncp description {Add support for Netware Core Protocol} {}
233
234livecheck.type          regex
235livecheck.url           ${homepage}
236livecheck.regex         "Current Version: (.*)"
Note: See TracBrowser for help on using the repository browser.