summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-03-15 20:37:35 +0000
committerSam James <sam@gentoo.org>2021-03-15 20:58:41 +0000
commit2971152154f108650831c32a3f83023823ff7f6e (patch)
treea0a9d618676f51d6e2e564087fac622c25b1598a /net-analyzer/hydra
parentnet-analyzer/fwlogwatch: port to EAPI 7 (diff)
downloadgentoo-2971152154f108650831c32a3f83023823ff7f6e.tar.gz
gentoo-2971152154f108650831c32a3f83023823ff7f6e.tar.bz2
gentoo-2971152154f108650831c32a3f83023823ff7f6e.zip
net-analyzer/hydra: add 9.2
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer/hydra')
-rw-r--r--net-analyzer/hydra/Manifest1
-rw-r--r--net-analyzer/hydra/hydra-9.2.ebuild122
-rw-r--r--net-analyzer/hydra/hydra-9999999.ebuild16
3 files changed, 130 insertions, 9 deletions
diff --git a/net-analyzer/hydra/Manifest b/net-analyzer/hydra/Manifest
index fb6dd8eb4936..8d6ee303deb2 100644
--- a/net-analyzer/hydra/Manifest
+++ b/net-analyzer/hydra/Manifest
@@ -1,2 +1,3 @@
DIST hydra-9.0.tar.gz 1168498 BLAKE2B b4834c66fb1bebcd19151784b75d4c9220cbf7045b289a063a1cbc48a793abfa2edcb466d43234bd4c8e14074a2e2a39ccd697698392f24f39c84da54ee07165 SHA512 58067bd2696e82645bb959fe5537f2876e1d8c170a15fe6a9ac65bbdc33cfb75b47fd1a969c314a6c6d91b2b6c0ce4ba087680bbd67a5a38925a2a8b5c5ad338
DIST hydra-9.1.tar.gz 611846 BLAKE2B 9a5b6dc52b5f4069bf326e86728ebaf8c1fe018536f3943b83493de934703bff6770ae3f7a9a223ee00b5f52f7bd10ee4ddc272e1bbad00c399aa19cc0c083ba SHA512 863176375fe1aae4c0a2b74c11aba297682d66e522c98c926c539348309b0af4e407e460b4cb803d2c83c008787c73f7f1e56ac6aca9791351e1b596c2e4fbb2
+DIST hydra-9.2.tar.gz 614176 BLAKE2B 102c744fbdd3702c624b1c8339178883b689db093d9f1c66d8e04816327eb8095f3e3133f889b2a6ee6dcabb9e5af0c71ec8470731b4b174021fbd79741d05e7 SHA512 ee8ecd854b61ac9d708098c8a0d9a128d8b80b38db1a2ba8eb06de6fbbc6865135d994620ade8e3742fb993899274ed9d8fd0e95bed7a9fbeb1ca9e182540322
diff --git a/net-analyzer/hydra/hydra-9.2.ebuild b/net-analyzer/hydra/hydra-9.2.ebuild
new file mode 100644
index 000000000000..913d33739036
--- /dev/null
+++ b/net-analyzer/hydra/hydra-9.2.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="Parallelized network login hacker"
+HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra"
+SRC_URI="https://github.com/vanhauser-thc/thc-hydra/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/thc-${P}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="
+ debug firebird gcrypt gtk idn libressl memcached mongodb mysql ncp ncurses
+ oracle pcre postgres rdp libssh subversion zlib
+"
+
+RDEPEND="
+ gtk? (
+ dev-libs/atk
+ dev-libs/glib:2
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ )
+ firebird? ( dev-db/firebird )
+ gcrypt? ( dev-libs/libgcrypt )
+ idn? ( net-dns/libidn:0= )
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ memcached? ( dev-libs/libmemcached[sasl] )
+ mongodb? ( dev-libs/mongo-c-driver )
+ mysql? ( dev-db/mysql-connector-c:0= )
+ ncp? ( net-fs/ncpfs )
+ ncurses? ( sys-libs/ncurses:= )
+ oracle? ( dev-db/oracle-instantclient-basic )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql:* )
+ rdp? ( net-misc/freerdp )
+ libssh? ( >=net-libs/libssh-0.4.0 )
+ subversion? ( dev-vcs/subversion )
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+src_prepare() {
+ default
+
+ # None of the settings in Makefile.unix are useful to us
+ mv Makefile.unix{,.gentoo_unused} || die
+ touch Makefile.unix || die
+
+ sed -i \
+ -e 's:|| echo.*$::' \
+ -e '/\t-$(CC)/s:-::' \
+ -e '/^OPTS/{s|=|+=|;s| -O3||}' \
+ -e '/ -o /s:$(OPTS):& $(LDFLAGS):g' \
+ Makefile.am || die
+}
+
+src_configure() {
+ # Note: the top level configure script is not autoconf-based
+ tc-export CC PKG_CONFIG
+
+ export OPTS="${CFLAGS}"
+
+ hydra_sed() {
+ if use ${1}; then
+ einfo "Enabling ${1}"
+ if [[ -n "${3}" ]]; then
+ sed -i 's#'"${2}"'#'"${3}"'#' configure || die
+ fi
+ else
+ einfo "Disabling ${1}"
+ sed -i 's#'"${2}"'##; s#'"${4}"'##' configure || die
+ fi
+ }
+
+ hydra_sed firebird '-lfbclient' '' '-DLIBFIREBIRD'
+ hydra_sed gcrypt '-lgcrypt' '$( ${CTARGET:-${CHOST}}-libgcrypt-config --libs )' '-DHAVE_GCRYPT'
+ hydra_sed idn '-lidn' '$( "${PKG_CONFIG}" --libs libidn )' '-DLIBIDN -DHAVE_PR29_H'
+ hydra_sed libssh '-lssh' '$( "${PKG_CONFIG}" --libs libssh )' '-DLIBSSH'
+ hydra_sed memcached '-lmemcached' '$( "${PKG_CONFIG}" --libs libmemcached )' '-DLIBMCACHED'
+ hydra_sed mongodb '-lmongoc-1.0' '$( "${PKG_CONFIG}" --libs libmongoc-1.0 )' '-DLIBMONGODB\|-DLIBBSON'
+ hydra_sed mysql '-lmysqlclient' '$( ${CTARGET:-${CHOST}}-mysql_config --libs )' '-DLIBMYSQLCLIENT'
+ hydra_sed ncp '-lncp' '' '-DLIBNCP'
+ hydra_sed ncurses '-lcurses' '$( "${PKG_CONFIG}" --libs ncurses )' '-DLIBNCURSES'
+ hydra_sed pcre '-lpcre' '$( "${PKG_CONFIG}" --libs libpcre )' '-DHAVE_PCRE'
+ hydra_sed postgres '-lpq' '$( "${PKG_CONFIG}" --libs libpq )' '-DLIBPOSTGRES'
+ hydra_sed oracle '-locci -lclntsh' '' '-DLIBORACLE'
+ hydra_sed rdp '-lfreerdp2' '$( "${PKG_CONFIG}" --libs freerdp2 )' '-DLIBFREERDP2'
+ # TODO: https://bugs.gentoo.org/686148
+ #hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '$( "${PKG_CONFIG}" --libs libsvn_client )' '-DLIBSVN'
+ hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '' '-DLIBSVN'
+ hydra_sed zlib '-lz' '$( "${PKG_CONFIG}" --libs zlib )' '-DHAVE_ZLIB'
+
+ sh configure \
+ $(use gtk || echo --disable-xhydra) \
+ $(usex debug '--debug' '') \
+ --nostrip \
+ --prefix=/usr \
+ || die
+
+ if use gtk ; then
+ pushd hydra-gtk || die
+ econf
+ fi
+}
+
+src_compile() {
+ emake XLIBPATHS=''
+ use gtk && emake -C hydra-gtk
+}
+
+src_install() {
+ dobin hydra pw-inspector
+ use gtk && dobin hydra-gtk/src/xhydra
+ dodoc CHANGES README.md
+}
diff --git a/net-analyzer/hydra/hydra-9999999.ebuild b/net-analyzer/hydra/hydra-9999999.ebuild
index 3ff5496cc9b3..1cfceab9812c 100644
--- a/net-analyzer/hydra/hydra-9999999.ebuild
+++ b/net-analyzer/hydra/hydra-9999999.ebuild
@@ -1,16 +1,17 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit flag-o-matic git-r3 toolchain-funcs
+
+inherit git-r3 toolchain-funcs
DESCRIPTION="Parallelized network login hacker"
HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra"
EGIT_REPO_URI="https://github.com/vanhauser-thc/thc-hydra"
+S="${WORKDIR}/thc-${P}"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS=""
IUSE="
debug firebird gcrypt gtk idn libressl memcached mongodb mysql ncp ncurses
oracle pcre postgres rdp libssh subversion zlib
@@ -41,10 +42,8 @@ RDEPEND="
subversion? ( dev-vcs/subversion )
zlib? ( sys-libs/zlib )
"
-DEPEND="
- ${RDEPEND}
- virtual/pkgconfig
-"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
src_prepare() {
default
@@ -64,7 +63,6 @@ src_prepare() {
src_configure() {
# Note: the top level configure script is not autoconf-based
tc-export CC PKG_CONFIG
- append-cflags -fcommon
export OPTS="${CFLAGS}"
@@ -92,7 +90,7 @@ src_configure() {
hydra_sed pcre '-lpcre' '$( "${PKG_CONFIG}" --libs libpcre )' '-DHAVE_PCRE'
hydra_sed postgres '-lpq' '$( "${PKG_CONFIG}" --libs libpq )' '-DLIBPOSTGRES'
hydra_sed oracle '-locci -lclntsh' '' '-DLIBORACLE'
- hydra_sed rdp '-lfreerdp2' '$( "${PKG_CONFIG}" --libs freerdp2 )' '-DLIBFREERDP2'
+ hydra_sed rdp '-lfreerdp2' '$( "${PKG_CONFIG}" --libs freerdp2 )' '-DLIBFREERDP'
# TODO: https://bugs.gentoo.org/686148
#hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '$( "${PKG_CONFIG}" --libs libsvn_client )' '-DLIBSVN'
hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '' '-DLIBSVN'