commit:     b99c9e80ca9e93f9aadb62f2f4eaba84850104cb
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  7 13:43:52 2022 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Wed Sep  7 14:30:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b99c9e80

app-crypt/chntpw: install sampasswd and samusrgrp

Closes: https://bugs.gentoo.org/840212
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 app-crypt/chntpw/chntpw-140201-r1.ebuild | 58 ++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/app-crypt/chntpw/chntpw-140201-r1.ebuild 
b/app-crypt/chntpw/chntpw-140201-r1.ebuild
new file mode 100644
index 000000000000..eaba55788b42
--- /dev/null
+++ b/app-crypt/chntpw/chntpw-140201-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Offline Windows NT Password & Registry Editor"
+HOMEPAGE="https://pogostick.net/~pnh/ntpasswd/";
+SRC_URI="https://pogostick.net/~pnh/ntpasswd/${PN}-source-${PV}.zip";
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static"
+
+RDEPEND="dev-libs/openssl:0="
+DEPEND="${RDEPEND}
+       app-arch/unzip
+       static? ( dev-libs/openssl:0[static-libs] )"
+
+DOCS=(
+       HISTORY.txt
+       README.txt
+       WinReg.txt
+       regedit.txt
+)
+
+PATCHES=(
+       "${FILESDIR}"/${P}-missing-stdint.patch
+)
+
+src_prepare() {
+       default
+       sed -i -e '/-o/s:$(CC):$(CC) $(LDFLAGS):' Makefile || die
+
+       if ! use static ; then
+               sed -i -e "/^all:/s/ \(chntpw\|reged\).static//g" Makefile || 
die
+       fi
+
+       emake clean
+}
+
+src_compile() {
+       emake \
+               CC="$(tc-getCC)" \
+               CFLAGS="${CFLAGS} -DUSEOPENSSL -Wall" \
+               LIBS="-lcrypto"
+}
+
+src_install() {
+       einstalldocs
+       dobin chntpw cpnt reged sampasswd samusrgrp
+
+       if use static; then
+               dobin {chntpw,reged,sampasswd,samusrgrp}.static
+       fi
+}

Reply via email to