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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1516 - (show annotations) (download)
Mon Sep 18 16:45:25 2006 UTC (7 years, 10 months ago) by grobian
File size: 2707 byte(s)
auto sync with main tree, weed keywords


1 # Copyright 1999-2006 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-r6.ebuild,v 1.13 2006/07/01 17:33:09 kanaka 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="~amd64 ~ppc-macos ~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-bzgrep.patch
24 epatch "${FILESDIR}"/${PN}-1.0.2-NULL-ptr-check.patch
25 epatch "${FILESDIR}"/${P}-makefile-CFLAGS.patch
26 epatch "${FILESDIR}"/${P}-saneso.patch
27 epatch "${FILESDIR}"/${P}-shared-largefile-support.patch
28 epatch "${FILESDIR}"/${PN}-1.0.2-progress.patch
29 epatch "${FILESDIR}"/${PN}-1.0.2-chmod.patch
30 epatch "${FILESDIR}"/${P}-no-test.patch
31 epatch "${FILESDIR}"/${P}-dylib.patch
32 epatch "${FILESDIR}"/${P}-makefile-LDFLAGS.patch #126826
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 LDFLAGS="${LDFLAGS}" ${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 /bin and use the shared libbz2.so
69 mkdir -p "${D}"/bin
70 mv "${D}"/usr/bin/* "${D}"/bin/
71 into /
72
73 if use userland_Darwin ; then
74 make PREFIX="${D}"/usr LIBDIR="$(get_libdir)" install-dylib \
75 || die "install-dylib failed"
76 else
77 if ! use static ; then
78 newbin bzip2-shared bzip2 || die "dobin shared"
79 fi
80 dolib.so "${S}"/libbz2.so.${PV} || die "dolib shared"
81 for v in libbz2$(get_libname {${PV%%.*},${PV%.*}}); do
82 dosym libbz2$(get_libname ${PV}) /${get_libdir}/libbz2${v}
83 done
84 fi
85
86 use userland_Darwin || gen_usr_ldscript libbz2.so
87
88 dodoc README* CHANGES Y2K_INFO bzip2.txt manual.*
89 else
90 into /
91 dobin bzip2 || die "dobin bzip2"
92 fi
93
94 dosym bzip2 /bin/bzcat
95 dosym bzip2 /bin/bunzip2
96 }

  ViewVC Help
Powered by ViewVC 1.1.20