chntpw-140201.ebuild 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit toolchain-funcs
  5. DESCRIPTION="Offline Windows NT Password & Registry Editor"
  6. HOMEPAGE="http://pogostick.net/~pnh/ntpasswd/"
  7. SRC_URI="http://pogostick.net/~pnh/ntpasswd/${PN}-source-${PV}.zip"
  8. LICENSE="GPL-2 LGPL-2.1"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~ppc ~x86"
  11. IUSE="libressl static"
  12. RDEPEND="!libressl? ( dev-libs/openssl:0= )
  13. libressl? ( dev-libs/libressl:0= )"
  14. DEPEND="${RDEPEND}
  15. app-arch/unzip
  16. static? ( dev-libs/openssl:0[static-libs] )"
  17. DOCS=(
  18. HISTORY.txt README.txt regedit.txt WinReg.txt
  19. )
  20. src_prepare() {
  21. default
  22. sed -i -e '/-o/s:$(CC):$(CC) $(LDFLAGS):' Makefile || die
  23. if ! use static ; then
  24. sed -i -e "/^all:/s/ \(chntpw\|reged\).static//g" Makefile || die
  25. fi
  26. emake clean
  27. }
  28. src_compile() {
  29. emake \
  30. CC="$(tc-getCC)" \
  31. CFLAGS="${CFLAGS} -DUSEOPENSSL -Wall" \
  32. LIBS="-lcrypto"
  33. }
  34. src_install() {
  35. einstalldocs
  36. dobin chntpw cpnt reged
  37. if use static; then
  38. dobin {chntpw,reged}.static
  39. fi
  40. }