/[gentoo-alt]/trunk/prefix/app-arch/bzip2/bzip2-1.0.3-r5.ebuild
Gentoo

Contents of /trunk/prefix/app-arch/bzip2/bzip2-1.0.3-r5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1166 - (show annotations) (download)
Sat Mar 25 22:08:50 2006 UTC (8 years, 5 months ago) by kito
File size: 2648 byte(s)
PREFIX->EPREFIX DEST->EDEST
1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-arch/bzip2/bzip2-1.0.3-r5.ebuild,v 1.8 2005/09/09 15:07:17 agriffis Exp $
4
5 EAPI="prefix"
6
7 inherit eutils multilib toolchain-funcs flag-o-matic
8
9 DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
10 HOMEPAGE="http://www.bzip.org/"
11 SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz"
12
13 LICENSE="BZIP2"
14 SLOT="0"
15 KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ~ppc-macos ppc64 s390 sh sparc x86"
16 IUSE="build static"
17
18 DEPEND=""
19
20 src_unpack() {
21 unpack ${A}
22 cd "${S}"
23 epatch "${FILESDIR}"/${PN}-1.0.2-NULL-ptr-check.patch
24 epatch "${FILESDIR}"/${P}-makefile-CFLAGS.patch
25 epatch "${FILESDIR}"/${P}-saneso.patch
26 epatch "${FILESDIR}"/${P}-shared-largefile-support.patch
27 epatch "${FILESDIR}"/${PN}-1.0.2-progress.patch
28 epatch "${FILESDIR}"/${PN}-1.0.2-chmod.patch
29 epatch "${FILESDIR}"/${P}-no-test.patch
30 epatch "${FILESDIR}"/${P}-dylib.patch
31 #epatch "${FILESDIR}"/${P}-darwin-ea.patch
32
33 sed -i -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' Makefile || die "sed manpath"
34
35 # - Generate symlinks instead of hardlinks
36 # - pass custom variables to control libdir
37 sed -i \
38 -e 's:ln $(PREFIX)/bin/:ln -s :' \
39 -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
40 Makefile || die "sed links"
41 }
42
43 src_compile() {
44 local makeopts="
45 CC=$(tc-getCC)
46 AR=$(tc-getAR)
47 RANLIB=$(tc-getRANLIB)
48 "
49 if ! use build ; then
50 if [[ ${USERLAND} == "Darwin" ]] ; then
51 emake ${makeopts} PREFIX="${EPREFIX}"/usr/lib libbz2.dylib
52 else
53 emake ${makeopts} -f Makefile-libbz2_so all || die "Make failed libbz2"
54 fi
55 fi
56 use static && append-flags -static
57 emake ${makeopts} all || die "Make failed"
58
59 if ! tc-is-cross-compiler ; then
60 make check || die "test failed"
61 fi
62 }
63
64 src_install() {
65 if ! use build ; then
66 make PREFIX="${D}"/usr LIBDIR="$(get_libdir)" install || die
67
68 # move bzip2 binaries to / and use the shared libbz2.so
69 mv "${D}"/usr/bin "${D}"/
70 into /
71
72 if use userland_Darwin ; then
73 make PREFIX="${D}"/usr LIBDIR="$(get_libdir)" install-dylib \
74 || die "install-dylib failed"
75 else
76 if ! use static ; then
77 newbin bzip2-shared bzip2 || die "dobin shared"
78 fi
79 dolib.so "${S}"/libbz2.so.${PV} || die "dolib shared"
80 for v in libbz2$(get_libname {${PV%%.*},${PV%.*}}); do
81 dosym libbz2$(get_libname ${PV}) /${get_libdir}/libbz2${v}
82 done
83 fi
84
85 use userland_Darwin || gen_usr_ldscript libbz2.so
86
87 dodoc README* CHANGES Y2K_INFO bzip2.txt manual.*
88 else
89 into /
90 dobin bzip2 || die "dobin bzip2"
91 fi
92
93 dosym bzip2 /bin/bzcat
94 dosym bzip2 /bin/bunzip2
95 }

  ViewVC Help
Powered by ViewVC 1.1.20