# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/hashcash/hashcash-1.02.ebuild,v 1.2 2004/08/30 12:59:02 dholm Exp $ IUSE="" DESCRIPTION="Utility to generate hashcash tokens" HOMEPAGE="http://www.hashcash.org" SRC_URI="http://www.hashcash.org/source/${P}.tgz" LICENSE="CPL-1.0" SLOT="0" KEYWORDS="~x86 ~ppc ~macos ~alpha ~mips ~arm ~amd64" IUSE="mmx altivec" DEPEND="virtual/libc" RDEPEND="" src_compile() { sed -i \ -e "s|^CHANGEME1.*\$|PACKAGER = EBUILD|" \ -e "s|^INSTALL_PATH.*\$|INSTALL_PATH = \$(PREFIX)/bin|" \ -e "s|^MAN_INSTALL_PATH.*\$|MAN_INSTALL_PATH = \$(PREFIX)/share/man/man1|" \ Makefile || die if use mmx && use x86; then einfo "Optimising for x86 MMX" emake $MAKEOPTS x86 || die elif use macos; then einfo "Optimising for G3, G4 and G5 under MacOS X" emake $MAKEOPTS g3-osx || die elif use altivec; then einfo "Optimising for G4 and G5 Altivec under Linux" emake $MAKEOPTS ppc-linux || die elif use ppc; then einfo "Ensuring correct compilation under PowerPC" emake $MAKEOPTS "CFLAGS=-DREGEXP_POSIX $CFLAGS -fno-inline" build || die else einfo "Using normal optimisation flags" emake $MAKEOPTS "CFLAGS=-DREGEXP_POSIX $CFLAGS" build || die fi } src_install() { dobin hashcash doman hashcash.1 }