diff -ru a/mess822-0.58-r1.ebuild b/mess822-0.58-r1.ebuild --- a/mess822-0.58-r1.ebuild 2009-09-23 19:36:25.000000000 +0000 +++ b/mess822-0.58-r1.ebuild 2010-08-29 00:03:43.904371760 +0000 @@ -2,7 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-mail/mess822/mess822-0.58-r1.ebuild,v 1.11 2009/09/23 19:08:27 patrick Exp $ -inherit multilib +EAPI="2" + +inherit multilib toolchain-funcs DESCRIPTION="Collection of utilities for parsing Internet mail messages." SRC_URI="http://cr.yp.to/software/${P}.tar.gz" @@ -15,19 +17,44 @@ DEPEND=">=sys-apps/sed-4" -src_unpack() { - unpack ${A} - cd ${S} - echo "gcc ${CFLAGS}" > conf-cc - echo "gcc" > conf-ld +src_prepare() { echo "/usr/" > conf-home # fix errno.h problem; bug #26165 sed -i 's/^extern int errno;/#include /' error.h + # Avoid the need for automatic discovery. + (echo '#include '; echo '#include ') > fork.h + (echo '#include '; echo 'typedef uint32_t uint32;') > uint32.h + (echo '#include '; echo 'typedef uint64_t uint64;') > uint64.h + echo '#include ' >select.h + echo '#include ' >readwrite.h + echo '#define HASSIGACTION 1' >hassgact.h + echo '#define HASWAITPID 1' >haswaitp.h + # Rewrite compilation rules to use Make variables + # Drop dependency on removed compile helper + # Do the same two operations for load (an ld wrapper) and makelib (an ar + # wrapper) + # Delete definitions that build files rendered obsolete by the steps in this + # function. + sed -i \ + -e 's:^ \./compile : $(COMPILE.c) $(OUTPUT_OPTION) :' \ + -e '/^compile .*\.c/s:compile ::' \ + -e 's:^ \./load \([^ ]\+\): $(LINK.o) $(OUTPUT_OPTION) \1.o:' \ + -e '/^load .*\.o/s:load ::' \ + -e 's:^ \./makelib : $(AR) cs$(ARFLAGS) :' \ + -e '/^makelib .*\.o/s:makelib ::' \ + -e '/^\(auto-ccld\.sh\|compile\|load\|makelib\|hassgact\.h\|haswaitp\.h\|fork\.h\|select\\.h\|uint32\.h\|uint64\.h\): /,/^$/d' \ + Makefile || die + # Upstream puts() is a wrapper around their own code, not a + # reimplementation of the stdio puts. + sed -i \ + -e 's/\/avoid_system_&/g' \ + auto-str.c ofmipd.c new-inject.c || die } src_compile() { - emake || die + tc-export CC + default_src_compile } src_install() {