app-metrics/prometheus: add 3.1.0
[gentoo/gentoo.git] / app-crypt / chntpw / chntpw-140201-r1.ebuild
blob8594fba742f8e3004962178585ed5642485c5756
1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit flag-o-matic toolchain-funcs
8 DESCRIPTION="Offline Windows NT Password & Registry Editor"
9 HOMEPAGE="https://pogostick.net/~pnh/ntpasswd/"
10 SRC_URI="https://pogostick.net/~pnh/ntpasswd/${PN}-source-${PV}.zip"
12 LICENSE="GPL-2 LGPL-2.1"
13 SLOT="0"
14 KEYWORDS="amd64 ppc x86"
15 IUSE="static"
17 RDEPEND="dev-libs/openssl:0="
18 DEPEND="${RDEPEND}
19         app-arch/unzip
20         static? ( dev-libs/openssl:0[static-libs] )"
22 DOCS=(
23         HISTORY.txt
24         README.txt
25         WinReg.txt
26         regedit.txt
29 PATCHES=(
30         "${FILESDIR}"/${P}-missing-stdint.patch
33 src_prepare() {
34         default
35         sed -i -e '/-o/s:$(CC):$(CC) $(LDFLAGS):' Makefile || die
37         # MANY changes would be required for this code to be c99-compliant
38         append-flags -std=gnu90
40         if ! use static ; then
41                 sed -i -e "/^all:/s/ \(chntpw\|reged\).static//g" Makefile || die
42         fi
44         emake clean
47 src_compile() {
48         emake \
49                 CC="$(tc-getCC)" \
50                 CFLAGS="${CFLAGS} -DUSEOPENSSL -Wall" \
51                 LIBS="-lcrypto"
54 src_install() {
55         einstalldocs
56         dobin chntpw cpnt reged sampasswd samusrgrp
58         if use static; then
59                 dobin {chntpw,reged,sampasswd,samusrgrp}.static
60         fi