forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chntpw-140201.ebuild
52 lines (40 loc) · 1.02 KB
/
chntpw-140201.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit toolchain-funcs
DESCRIPTION="Offline Windows NT Password & Registry Editor"
HOMEPAGE="http://pogostick.net/~pnh/ntpasswd/"
SRC_URI="http://pogostick.net/~pnh/ntpasswd/${PN}-source-${PV}.zip"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="libressl static"
RDEPEND="!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )"
DEPEND="${RDEPEND}
app-arch/unzip
static? ( dev-libs/openssl:0[static-libs] )"
DOCS=(
HISTORY.txt README.txt regedit.txt WinReg.txt
)
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
if use static; then
dobin {chntpw,reged}.static
fi
}