Lines 2-8
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-mail/mess822/mess822-0.58-r1.ebuild,v 1.11 2009/09/23 19:08:27 patrick Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-mail/mess822/mess822-0.58-r1.ebuild,v 1.11 2009/09/23 19:08:27 patrick Exp $ |
4 |
|
4 |
|
5 |
inherit multilib |
5 |
EAPI="2" |
|
|
6 |
|
7 |
inherit multilib toolchain-funcs |
6 |
|
8 |
|
7 |
DESCRIPTION="Collection of utilities for parsing Internet mail messages." |
9 |
DESCRIPTION="Collection of utilities for parsing Internet mail messages." |
8 |
SRC_URI="http://cr.yp.to/software/${P}.tar.gz" |
10 |
SRC_URI="http://cr.yp.to/software/${P}.tar.gz" |
Lines 15-33
Link Here
|
15 |
|
17 |
|
16 |
DEPEND=">=sys-apps/sed-4" |
18 |
DEPEND=">=sys-apps/sed-4" |
17 |
|
19 |
|
18 |
src_unpack() { |
20 |
src_prepare() { |
19 |
unpack ${A} |
|
|
20 |
cd ${S} |
21 |
echo "gcc ${CFLAGS}" > conf-cc |
22 |
echo "gcc" > conf-ld |
23 |
echo "/usr/" > conf-home |
21 |
echo "/usr/" > conf-home |
24 |
|
22 |
|
25 |
# fix errno.h problem; bug #26165 |
23 |
# fix errno.h problem; bug #26165 |
26 |
sed -i 's/^extern int errno;/#include <errno.h>/' error.h |
24 |
sed -i 's/^extern int errno;/#include <errno.h>/' error.h |
|
|
25 |
# Avoid the need for automatic discovery. |
26 |
(echo '#include <sys/types.h>'; echo '#include <unistd.h>') > fork.h |
27 |
(echo '#include <stdint.h>'; echo 'typedef uint32_t uint32;') > uint32.h |
28 |
(echo '#include <stdint.h>'; echo 'typedef uint64_t uint64;') > uint64.h |
29 |
echo '#include <sys/select.h>' >select.h |
30 |
echo '#include <unistd.h>' >readwrite.h |
31 |
echo '#define HASSIGACTION 1' >hassgact.h |
32 |
echo '#define HASWAITPID 1' >haswaitp.h |
33 |
# Rewrite compilation rules to use Make variables |
34 |
# Drop dependency on removed compile helper |
35 |
# Do the same two operations for load (an ld wrapper) and makelib (an ar |
36 |
# wrapper) |
37 |
# Delete definitions that build files rendered obsolete by the steps in this |
38 |
# function. |
39 |
sed -i \ |
40 |
-e 's:^ \./compile : $(COMPILE.c) $(OUTPUT_OPTION) :' \ |
41 |
-e '/^compile .*\.c/s:compile ::' \ |
42 |
-e 's:^ \./load \([^ ]\+\): $(LINK.o) $(OUTPUT_OPTION) \1.o:' \ |
43 |
-e '/^load .*\.o/s:load ::' \ |
44 |
-e 's:^ \./makelib : $(AR) cs$(ARFLAGS) :' \ |
45 |
-e '/^makelib .*\.o/s:makelib ::' \ |
46 |
-e '/^\(auto-ccld\.sh\|compile\|load\|makelib\|hassgact\.h\|haswaitp\.h\|fork\.h\|select\\.h\|uint32\.h\|uint64\.h\): /,/^$/d' \ |
47 |
Makefile || die |
48 |
# Upstream puts() is a wrapper around their own code, not a |
49 |
# reimplementation of the stdio puts. |
50 |
sed -i \ |
51 |
-e 's/\<puts\>/avoid_system_&/g' \ |
52 |
auto-str.c ofmipd.c new-inject.c || die |
27 |
} |
53 |
} |
28 |
|
54 |
|
29 |
src_compile() { |
55 |
src_compile() { |
30 |
emake || die |
56 |
tc-export CC |
|
|
57 |
default_src_compile |
31 |
} |
58 |
} |
32 |
|
59 |
|
33 |
src_install() { |
60 |
src_install() { |