Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/hydra/
Date: Tue, 13 Aug 2019 06:22:07
Message-Id: 1565677320.4aad8e61e2f17e82736ab9992095abff83b69904.jer@gentoo
1 commit: 4aad8e61e2f17e82736ab9992095abff83b69904
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 13 06:21:39 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 13 06:22:00 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4aad8e61
7
8 net-analyzer/hydra: Add live ebuild
9
10 Package-Manager: Portage-2.3.71, Repoman-2.3.17
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 net-analyzer/hydra/hydra-9999999.ebuild | 122 ++++++++++++++++++++++++++++++++
14 1 file changed, 122 insertions(+)
15
16 diff --git a/net-analyzer/hydra/hydra-9999999.ebuild b/net-analyzer/hydra/hydra-9999999.ebuild
17 new file mode 100644
18 index 00000000000..419882a4735
19 --- /dev/null
20 +++ b/net-analyzer/hydra/hydra-9999999.ebuild
21 @@ -0,0 +1,122 @@
22 +# Copyright 1999-2019 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +inherit git-r3 toolchain-funcs
27 +
28 +DESCRIPTION="Parallelized network login hacker"
29 +HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra"
30 +EGIT_REPO_URI="${HOMEPAGE}"
31 +
32 +LICENSE="GPL-3"
33 +SLOT="0"
34 +KEYWORDS=""
35 +IUSE="
36 + debug firebird gcrypt gtk idn libressl memcached mongodb mysql ncp ncurses
37 + oracle pcre postgres rdp libssh subversion zlib
38 +"
39 +
40 +RDEPEND="
41 + gtk? (
42 + dev-libs/atk
43 + dev-libs/glib:2
44 + x11-libs/gdk-pixbuf:2
45 + x11-libs/gtk+:2
46 + )
47 + firebird? ( dev-db/firebird )
48 + gcrypt? ( dev-libs/libgcrypt )
49 + idn? ( net-dns/libidn:0= )
50 + !libressl? ( dev-libs/openssl:0= )
51 + libressl? ( dev-libs/libressl:0= )
52 + memcached? ( dev-libs/libmemcached[sasl] )
53 + mongodb? ( dev-libs/mongo-c-driver )
54 + mysql? ( dev-db/mysql-connector-c:0= )
55 + ncp? ( net-fs/ncpfs )
56 + ncurses? ( sys-libs/ncurses:= )
57 + oracle? ( dev-db/oracle-instantclient-basic )
58 + pcre? ( dev-libs/libpcre )
59 + postgres? ( dev-db/postgresql:* )
60 + rdp? ( net-misc/freerdp )
61 + libssh? ( >=net-libs/libssh-0.4.0 )
62 + subversion? ( dev-vcs/subversion )
63 + zlib? ( sys-libs/zlib )
64 +"
65 +DEPEND="
66 + ${RDEPEND}
67 + virtual/pkgconfig
68 +"
69 +
70 +src_prepare() {
71 + default
72 +
73 + # None of the settings in Makefile.unix are useful to us
74 + mv Makefile.unix{,.gentoo_unused} || die
75 + touch Makefile.unix || die
76 +
77 + sed -i \
78 + -e 's:|| echo.*$::' \
79 + -e '/\t-$(CC)/s:-::' \
80 + -e '/^OPTS/{s|=|+=|;s| -O3||}' \
81 + -e '/ -o /s:$(OPTS):& $(LDFLAGS):g' \
82 + Makefile.am || die
83 +}
84 +
85 +src_configure() {
86 + # Note: the top level configure script is not autoconf-based
87 + tc-export CC PKG_CONFIG
88 +
89 + export OPTS="${CFLAGS}"
90 +
91 + hydra_sed() {
92 + if use ${1}; then
93 + einfo "Enabling ${1}"
94 + if [[ -n "${3}" ]]; then
95 + sed -i 's#'"${2}"'#'"${3}"'#' configure || die
96 + fi
97 + else
98 + einfo "Disabling ${1}"
99 + sed -i 's#'"${2}"'##; s#'"${4}"'##' configure || die
100 + fi
101 + }
102 +
103 + hydra_sed firebird '-lfbclient' '' '-DLIBFIREBIRD'
104 + hydra_sed gcrypt '-lgcrypt' '$( ${CTARGET:-${CHOST}}-libgcrypt-config --libs )' '-DHAVE_GCRYPT'
105 + hydra_sed idn '-lidn' '$( "${PKG_CONFIG}" --libs libidn )' '-DLIBIDN -DHAVE_PR29_H'
106 + hydra_sed libssh '-lssh' '$( "${PKG_CONFIG}" --libs libssh )' '-DLIBSSH'
107 + hydra_sed memcached '-lmemcached' '$( "${PKG_CONFIG}" --libs libmemcached )' '-DLIBMCACHED'
108 + hydra_sed mongodb '-lmongoc-1.0' '$( "${PKG_CONFIG}" --libs libmongoc-1.0 )' '-DLIBMONGODB\|-DLIBBSON'
109 + hydra_sed mysql '-lmysqlclient' '$( ${CTARGET:-${CHOST}}-mysql_config --libs )' '-DLIBMYSQLCLIENT'
110 + hydra_sed ncp '-lncp' '' '-DLIBNCP'
111 + hydra_sed ncurses '-lcurses' '$( "${PKG_CONFIG}" --libs ncurses )' '-DLIBNCURSES'
112 + hydra_sed pcre '-lpcre' '$( "${PKG_CONFIG}" --libs libpcre )' '-DHAVE_PCRE'
113 + hydra_sed postgres '-lpq' '$( "${PKG_CONFIG}" --libs libpq )' '-DLIBPOSTGRES'
114 + hydra_sed oracle '-locci -lclntsh' '' '-DLIBORACLE'
115 + hydra_sed rdp '-lfreerdp2' '$( "${PKG_CONFIG}" --libs freerdp2 )' '-DLIBFREERDP2'
116 + # TODO: https://bugs.gentoo.org/686148
117 + #hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '$( "${PKG_CONFIG}" --libs libsvn_client )' '-DLIBSVN'
118 + hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '' '-DLIBSVN'
119 + hydra_sed zlib '-lz' '$( "${PKG_CONFIG}" --libs zlib )' '-DHAVE_ZLIB'
120 +
121 + sh configure \
122 + $(use gtk || echo --disable-xhydra) \
123 + $(usex debug '--debug' '') \
124 + --nostrip \
125 + --prefix=/usr \
126 + || die
127 +
128 + if use gtk ; then
129 + pushd hydra-gtk || die
130 + econf
131 + fi
132 +}
133 +
134 +src_compile() {
135 + emake XLIBPATHS=''
136 + use gtk && emake -C hydra-gtk
137 +}
138 +
139 +src_install() {
140 + dobin hydra pw-inspector
141 + use gtk && dobin hydra-gtk/src/xhydra
142 + dodoc CHANGES README.md
143 +}