# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=2 inherit toolchain-funcs MY_P="${PN}_${PV}" DESCRIPTION="Interconverts between various bibliography formats using a common XML intermediate" HOMEPAGE="http://www.scripps.edu/~cdputnam/software/bibutils/" # SRC_URI="https://downloads.sourceforge.net/project/bibutils/${MY_P}_src.tgz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fbibutils%2Ffiles%2F&ts=1489869516&use_mirror=netcologne" SRC_URI="https://downloads.sourceforge.net/project/bibutils/bibutils_5.11_src.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" IUSE="" S=${WORKDIR}/${MY_P} src_prepare() { sed \ -e "s:CC='cc':CC='$(tc-getCC)':g" \ -e "s:CFLAGS='-Wall':CFLAGS='${CFLAGS}':g" \ -e "s:RANLIB='ranlib':RANLIB='$(tc-getRANLIB)':g" \ -e 's:^LIBTYPE=static:LIBTYPE=dynamic:' \ -e "s:^INSTALLDIR=/usr/local/bin:INSTALLDIR=\"${D}/usr/bin\":" \ -e "s:^LIBINSTALLDIR=/usr/local/lib:LIBINSTALLDIR=\"${D}/usr/lib\":" \ configure > configure.tmp \ || die 'Failed to set up configure' mv configure.tmp configure chmod u+x configure # Actually, I should patch lib/Makefile.dynamic here... # This is a quick'n dirty way to do it. # Just add 'generic.o nbibin.o nbibtypes.o' somewhere in the INPUT_OBJS list, # in this case after 'medin.o'. sed -e 's/medin\.o/medin.o generic.o nbibin.o nbibtypes.o/' \ lib/Makefile.dynamic > lib/Makefile.dynamic.tmp \ || die 'Failed to patch lib/Makefile.dynamic' mv lib/Makefile.dynamic.tmp lib/Makefile.dynamic } src_configure() { ./configure } src_install() { dodir /usr/bin emake install || die dodoc ChangeLog || die }