summaryrefslogtreecommitdiff
blob: eb593b186e686e20a1e2cd25674e1bd95916a588 (plain)
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
53
54
55
56
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="6"
inherit toolchain-funcs

DESCRIPTION="PkZip cipher breaker"
HOMEPAGE="http://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack.html"
SRC_URI="http://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack/${P}.tar.gz"

LICENSE="pkcrack"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="test"

DEPEND="test? ( app-arch/zip[crypt] )"
RDEPEND="!<app-text/html-xml-utils-5.3"

DOCS=(
	../doc/KNOWN_BUGS
	../doc/appnote.iz.txt
	../doc/README.W32
	../doc/pkzip.ps.gz
	../doc/CHANGES
	../doc/LIESMICH
	../doc/README.html
	../doc/README
)

S="${WORKDIR}/${P}/src"

src_prepare() {
	default
	sed -i -e "s/^CC=.*/CC=$(tc-getCC)/" \
		-e "/^CFLAGS=.*/d" \
		-e "s/CFLAGS/LDFLAGS/" \
		Makefile
	sed -i -e "s:void main:int main:" *.c
}

src_test() {
	cd "${S}/../test"
	make CC="$(tc-getCC)" all
}

src_install() {
	einstalldocs
	dobin pkcrack zipdecrypt findkey makekey
	newbin extract "$PN-extract"
}

pkg_postinst() {
	ewarn "Due to file collision, extract utility was renamed to $PN-extract,"
	ewarn "see bug#247394"
}