commit:     db9eb2073d111923ce934993e60834061177eb7b
Author:     Hank Leininger <hlein <AT> korelogic <DOT> com>
AuthorDate: Thu Feb 26 20:44:48 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 28 00:10:07 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db9eb207

net-analyzer/sslscan: respect make -j if set; add as p-m

Signed-off-by: Hank Leininger <hlein <AT> korelogic.com>
Closes: https://bugs.gentoo.org/924381
Part-of: https://github.com/gentoo/gentoo/pull/45871
Closes: https://github.com/gentoo/gentoo/pull/45871
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/sslscan-2.2.1-respect-makej.patch        | 43 +++++++++++
 net-analyzer/sslscan/metadata.xml                  |  9 ++-
 net-analyzer/sslscan/sslscan-2.2.1-r1.ebuild       | 83 ++++++++++++++++++++++
 3 files changed, 134 insertions(+), 1 deletion(-)

diff --git a/net-analyzer/sslscan/files/sslscan-2.2.1-respect-makej.patch 
b/net-analyzer/sslscan/files/sslscan-2.2.1-respect-makej.patch
new file mode 100644
index 000000000000..bbe8140463ce
--- /dev/null
+++ b/net-analyzer/sslscan/files/sslscan-2.2.1-respect-makej.patch
@@ -0,0 +1,43 @@
+--- a/Makefile
++++ b/Makefile
+@@ -92,14 +92,16 @@
+ CFLAGS    += -I/usr/local/include -I/usr/local/ssl/include 
-I/usr/local/ssl/include/openssl -I/usr/local/opt/openssl/include 
-I/opt/local/include -I/opt/local/include/openssl
+ endif
+ 
+-# Find the number of processors on the system (used in -j option in building 
OpenSSL).
++# If -j wasn't passed to make, find the number of processors on the system.
+ # Uses /usr/bin/nproc if available, otherwise defaults to 1.
+-NUM_PROCS = 1
+-ifneq (,$(wildcard /usr/bin/nproc))
+-      NUM_PROCS = `/usr/bin/nproc --all`
+-endif
+-ifeq ($(OS), Darwin)
+-      NUM_PROCS = `sysctl -n hw.ncpu`
++ifeq (,$(findstring -j,$(MAKEFLAGS)))
++        JOBS_ARG = -j1
++        ifneq (,$(wildcard /usr/bin/nproc))
++                JOBS_ARG = -j`/usr/bin/nproc --all`
++        endif
++        ifeq ($(OS), Darwin)
++                JOBS_ARG = -j`sysctl -n hw.ncpu`
++        endif
+ endif
+ 
+ .PHONY: all sslscan clean realclean install uninstall static opensslpull
+@@ -147,12 +149,12 @@
+       cd ./openssl; ./Configure -v -fstack-protector-all -D_FORTIFY_SOURCE=2 
-fPIC no-shared enable-weak-ssl-ciphers zlib
+ 
+ openssl/libcrypto.a: openssl/Makefile
+-      $(MAKE) -j $(NUM_PROCS) -C openssl depend
+-      $(MAKE) -j $(NUM_PROCS) -C openssl build_libs
+-#     $(MAKE) -j $(NUM_PROCS) -C openssl test # Disabled because this takes 
45+ minutes for OpenSSL v1.1.1.
++      $(MAKE) $(JOBS_ARG) -C openssl depend
++      $(MAKE) $(JOBS_ARG) -C openssl build_libs
++#     $(MAKE) $(JOBS_ARG) -C openssl test # Disabled because this takes 45+ 
minutes for OpenSSL v1.1.1.
+ 
+ static: openssl/libcrypto.a
+-      $(MAKE) -j $(NUM_PROCS) sslscan STATIC_BUILD=TRUE
++      $(MAKE) $(JOBS_ARG) sslscan STATIC_BUILD=TRUE
+ 
+ docker:
+       docker build -t sslscan:sslscan .

diff --git a/net-analyzer/sslscan/metadata.xml 
b/net-analyzer/sslscan/metadata.xml
index 4a7163a86998..af33b155bcd3 100644
--- a/net-analyzer/sslscan/metadata.xml
+++ b/net-analyzer/sslscan/metadata.xml
@@ -1,7 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
-       <!-- maintainer-needed -->
+       <maintainer type="person" proxied="yes">
+               <email>[email protected]</email>
+               <name>Hank Leininger</name>
+       </maintainer>
+       <maintainer type="project" proxied="proxy">
+               <email>[email protected]</email>
+               <name>Proxy Maintainers</name>
+       </maintainer>
        <upstream>
                <remote-id type="github">rbsec/sslscan</remote-id>
        </upstream>

diff --git a/net-analyzer/sslscan/sslscan-2.2.1-r1.ebuild 
b/net-analyzer/sslscan/sslscan-2.2.1-r1.ebuild
new file mode 100644
index 000000000000..338fb943628c
--- /dev/null
+++ b/net-analyzer/sslscan/sslscan-2.2.1-r1.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+# sslscan builds against a static openssl library to allow weak ciphers
+# to be enabled so that they can be tested.
+OPENSSL_RELEASE_TAG="openssl-3.5.0"
+
+DESCRIPTION="Fast SSL configuration scanner"
+HOMEPAGE="https://github.com/rbsec/sslscan";
+SRC_URI="https://github.com/rbsec/sslscan/archive/${PV}.tar.gz -> ${P}.tar.gz
+                
https://github.com/openssl/openssl/archive/${OPENSSL_RELEASE_TAG}.tar.gz -> 
${PN}-${OPENSSL_RELEASE_TAG}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+
+# Requires a docker environment
+RESTRICT="test"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-2.2.0-use-distfile-openssl.patch"
+       "${FILESDIR}/${PN}-2.2.1-respect-makej.patch"
+)
+
+src_prepare() {
+       ln -s ../openssl-${OPENSSL_RELEASE_TAG} openssl || die
+       touch .openssl_is_fresh || die
+
+       # Copied from dev-libs/openssl
+       # allow openssl to be cross-compiled
+       cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die
+       chmod a+rx gentoo.config || die
+
+       default
+}
+
+src_configure() {
+       # Copied from dev-libs/openssl
+       unset APPS #197996
+       unset SCRIPTS #312551
+       unset CROSS_COMPILE #311473
+
+       tc-export CC AR RANLIB RC
+
+       local sslout=$(./gentoo.config)
+       einfo "Use configuration ${sslout:-(openssl knows best)}"
+       local config="Configure"
+       [[ -z ${sslout} ]] && config="config"
+
+       # Clean out hardcoded flags that openssl uses
+       local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \
+               -e 's:^CFLAGS=::' \
+               -e 's:\(^\| \)-fomit-frame-pointer::g' \
+               -e 's:\(^\| \)-O[^ ]*::g' \
+               -e 's:\(^\| \)-march=[^ ]*::g' \
+               -e 's:\(^\| \)-mcpu=[^ ]*::g' \
+               -e 's:\(^\| \)-m[^ ]*::g' \
+               -e 's:^ *::' \
+               -e 's: *$::' \
+               -e 's: \+: :g' \
+               -e 's:\\:\\\\:g'
+       )
+
+       # Now insert clean default flags with user flags
+       sed -i \
+               -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
+               -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
+               Makefile || die
+}
+
+src_compile() {
+       emake static
+}
+
+src_install() {
+       DESTDIR="${D}" emake install
+
+       dodoc Changelog README.md
+}

Reply via email to