public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/hydra/, net-analyzer/hydra/files/
Date: Wed,  4 Oct 2023 16:50:21 +0000 (UTC)	[thread overview]
Message-ID: <1696438038.72fa57a7886b0b295dea643dd1dda2d7ee1ae77e.sam@gentoo> (raw)

commit:     72fa57a7886b0b295dea643dd1dda2d7ee1ae77e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  4 16:46:52 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct  4 16:47:18 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72fa57a7

net-analyzer/hydra: add 9.5

Closes: https://bugs.gentoo.org/895530
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-analyzer/hydra/Manifest                        |   1 +
 .../hydra-9.5-no-clobber-fortify-source.patch      |  14 +++
 net-analyzer/hydra/hydra-9.5.ebuild                | 128 +++++++++++++++++++++
 3 files changed, 143 insertions(+)

diff --git a/net-analyzer/hydra/Manifest b/net-analyzer/hydra/Manifest
index 64c4c34ffc82..df629c2399dc 100644
--- a/net-analyzer/hydra/Manifest
+++ b/net-analyzer/hydra/Manifest
@@ -1 +1,2 @@
 DIST hydra-9.4.tar.gz 833465 BLAKE2B 2ba7f7e4a70c4f6c9dc4ec94d652ab7534cb0fb17b88412dfcf1e651d9f31af573ab9acd2d9cb698da6462f4744f53dfb8f87a437c32bebfa4f9a04f2f9136c0 SHA512 de5a1e73673fdc2f193cfb1aeec337c9d8faad52b06524850f352a797a4a5ef08cba8fc51da96fed1db01d141127e58c2aa874027f51c40a94a474de778d5241
+DIST hydra-9.5.tar.gz 833798 BLAKE2B 848c5b34719c2db98b3a3bee1c47e0b2ebeea668f5c387f015c7079f800cf0607a8cb5accba25ef2e253deb44422d51cf6e012c313496942a47468e0503000e8 SHA512 a8fe42d175d184cdb82072f3a963b956d767fa908aaf1cbbc0746b6a67cfd37f8b5e3ecf9be82085a7f6c1ef57e91a8bf05bfeb41e96708899b6c8d7f05eee06

diff --git a/net-analyzer/hydra/files/hydra-9.5-no-clobber-fortify-source.patch b/net-analyzer/hydra/files/hydra-9.5-no-clobber-fortify-source.patch
new file mode 100644
index 000000000000..281e5b63c9ff
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-9.5-no-clobber-fortify-source.patch
@@ -0,0 +1,14 @@
+Don't clobber toolchain defaults.
+
+https://bugs.gentoo.org/895530
+--- a/configure
++++ b/configure
+@@ -1381,7 +1381,7 @@ fi
+ echo "Checking for secure compile option support in $CC ..."
+ GCCSEC="no"
+ LDSEC="no"
+-GCCSECOPT="-fstack-protector-all --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
++GCCSECOPT="-fstack-protector-all --param ssp-buffer-size=4"
+ echo '#include <stdio.h>' > $TMPC.c
+ echo 'int main() { printf(""); return 0; }' >> $TMPC.c
+ $CC -pie -fPIE $GCCSEPOPT -o $TMPC $TMPC.c > /dev/null 2> $TMPC.c.err

diff --git a/net-analyzer/hydra/hydra-9.5.ebuild b/net-analyzer/hydra/hydra-9.5.ebuild
new file mode 100644
index 000000000000..12201fa9828f
--- /dev/null
+++ b/net-analyzer/hydra/hydra-9.5.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo 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 memcached mongodb mysql ncurses oracle pcre postgres rdp libssh samba subversion zlib"
+
+RDEPEND="
+	dev-libs/openssl:=
+	gtk? (
+		>=app-accessibility/at-spi2-core-2.46.0
+		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:= )
+	memcached? ( dev-libs/libmemcached[sasl] )
+	mongodb? ( dev-libs/mongo-c-driver )
+	mysql? ( dev-db/mysql-connector-c:= )
+	ncurses? ( sys-libs/ncurses:= )
+	oracle? ( dev-db/oracle-instantclient[sdk] )
+	pcre? ( dev-libs/libpcre2 )
+	postgres? ( dev-db/postgresql:* )
+	rdp? ( net-misc/freerdp )
+	libssh? ( >=net-libs/libssh-0.4.0 )
+	samba? ( net-fs/samba )
+	subversion? ( dev-vcs/subversion )
+	zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-9.5-no-clobber-fortify-source.patch
+)
+
+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
+
+	# Needed to get GTK+ 3 change in configure.in (.in got updated, but
+	# configure not regen'd.)
+	#cd hydra-gtk || die
+	#sed -i -e 's:AC_INIT(configure.in):AC_INIT(configure.ac):' configure.in || die
+	#eautoreconf
+}
+
+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 ncurses '-lcurses' '$( "${PKG_CONFIG}" --libs ncurses )' '-DLIBNCURSES'
+	hydra_sed pcre '-lpcre2-8' '$( "${PKG_CONFIG}" --libs libpcre2-8 )' '-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 )' '-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 samba '-lsmbclient' '$( "${PKG_CONFIG}" --libs smbclient )' '-DLIBSMBCLIENT'
+	hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '' '-DLIBSVN'
+	hydra_sed zlib '-lz' '$( "${PKG_CONFIG}" --libs zlib )' '-DHAVE_ZLIB'
+
+	edo ./configure \
+		$(usev !gtk '--disable-xhydra') \
+		$(usev 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
+}


             reply	other threads:[~2023-10-04 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04 16:50 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-10-22  3:48 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/hydra/, net-analyzer/hydra/files/ Sam James
2021-03-19  2:08 Sam James
2020-07-29  9:45 Jeroen Roovers
2020-01-28  8:49 Jeroen Roovers
2020-01-26 16:43 Jeroen Roovers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1696438038.72fa57a7886b0b295dea643dd1dda2d7ee1ae77e.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox