# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils versionator toolchain-funcs #hard-coded as I don't know how to extract the version from an installed package IRSSI_PV="0.8.12-rc1" DESCRIPTION="FiSH blowfish encryption irssi module" # Homepage, not used by Portage directly but handy for developer reference HOMEPAGE="http://fish.sekure.us/" # Point to any required sources; these will be automatically downloaded by # Portage. SRC_URI="http://irssi.org/files/irssi-${IRSSI_PV}.tar.gz http://fish.sekure.us/irssi/FiSH-irssi.v${PV}-source.zip" LICENSE="as-is" SLOT="0" KEYWORDS="~amd64" RESTRICT="mirror" IUSE="amd64" DEPEND=" >=dev-libs/glib-2.2.1 dev-libs/miracl " RDEPEND=" >=net-irc/irssi-0.8.9 ${DEPEND}" # Source directory; the dir where the sources can be found (automatically # unpacked) inside ${WORKDIR}. The default value for S is ${WORKDIR}/${P} # If you don't need to change it, leave the S= line out of the ebuild # to keep it tidy. S="${WORKDIR}/FiSH-irssi.v${PV}-source" S_IRSSI="${S}/../irssi-${IRSSI_PV}" src_unpack() { unpack ${A} cd ${S} #lame .zip unpacking forces dos2unix find ${S} -type f -exec sed -i 's/\r$//' {} \; || die "Failed to dos2unix files" epatch "${FILESDIR}"/${P}-include.patch if use amd64; then epatch "${FILESDIR}"/${P}-fPIC.patch fi sed -i \ -e "1d" \ -e "s:\$(HOME)/irssi-0\.8\.9:${S_IRSSI}:" \ -e "s:\$(HOME)/glib-1\.2\.10:/usr/$(get_libdir)/glib-2.0:" \ -e "s:miracl\.a:/usr/$(get_libdir)/miracl.a:" \ -e 's:\@echo "Press ENTER to continue or CTRL+C to abort\.\.\."\; read junk::' \ -e "118d" \ -e "119d" \ Makefile || die "Failed to update Makefile" sed -i \ -e 's:#include "miracl\.h":#include :' \ DH1080.h || die "Failed to update DH1080.h" } src_compile() { cd ${S_IRSSI} econf || die "Irssi configure failed" cd ${S} if use amd64; then emake amd64 || die "emake failed" else emake || die "emake failed" fi } src_install() { insopts -m 644 insinto /usr/$(get_libdir)/irssi/modules doins libfish.so dodoc FiSH-irssi.txt FiSH-irssi_History.txt blow.ini-EXAMPLE }