/[gentoo-alt]/trunk/sys-devel/patch/patch-2.5.9-r1.ebuild
Gentoo

Diff of /trunk/sys-devel/patch/patch-2.5.9-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 330 Revision 331
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
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$ 3# $Header$
4 4
5inherit flag-o-matic 5inherit flag-o-matic eutils
6 6
7DESCRIPTION="Utility to apply diffs to files" 7DESCRIPTION="Utility to apply diffs to files"
8HOMEPAGE="http://www.gnu.org/software/patch/patch.html" 8HOMEPAGE="http://www.gnu.org/software/patch/patch.html"
9#SRC_URI="mirror://gnu/patch/${P}.tar.gz" 9#SRC_URI="mirror://gnu/patch/${P}.tar.gz"
10#Using own mirrors until gnu has md5sum and all packages up2date 10#Using own mirrors until gnu has md5sum and all packages up2date
11SRC_URI="mirror://gentoo/${P}.tar.gz" 11SRC_URI="mirror://gentoo/${P}.tar.gz"
12 12
13LICENSE="GPL-2" 13LICENSE="GPL-2"
14SLOT="2.5" 14SLOT="0"
15KEYWORDS="x86 ppc ppc64 sparc mips alpha arm hppa amd64 ia64 s390 ~x86-fbsd" 15KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
16IUSE="build static" 16IUSE="build static"
17 17
18DEPEND="virtual/libc" 18DEPEND=""
19
20src_unpack() {
21 unpack ${A}
22 cd ${S}
23 epatch ${FILESDIR}/${PV}-deb-cr.patch
24}
19 25
20src_compile() { 26src_compile() {
21 strip-flags 27 strip-flags
22 CFLAGS="$CFLAGS -DLINUX -D_XOPEN_SOURCE=500" 28 append-flags -DLINUX -D_XOPEN_SOURCE=500
23 # workaround for hardened on amd64, 1st part
24 if use amd64 && is-ldflags -pie; then
25 einfo Stripping "-pie" from LDFLAGS, adding it to Makefile manually
26 filter-ldflags -pie
27 append-flags -fPIC
28 LDFLAGS_PIE="1"
29 fi
30 ac_cv_sys_long_file_names=yes \
31 ./configure --host=${CHOST} --prefix=/usr --mandir=/usr/share/man
32 # workaround for hardened on amd64, 2nd part
33 if [ "${LDFLAGS_PIE}" = "1" ]; then
34 einfo "Patching Makefile..."
35 sed -i -e 's/^LDFLAGS =/& -pie/' Makefile || die "Patching Makefile failed!"
36 fi
37 use static && append-ldflags -static 29 use static && append-ldflags -static
38 emake LDFLAGS="${LDFLAGS}" || die "emake failed" 30
31 ac_cv_sys_long_file_names=yes econf \
32 --program-prefix=g \
33 || die
34
35 emake || die "emake failed"
39} 36}
40 37
41src_install() { 38src_install() {
42 einstall 39 einstall || die
43 if ! use build ; then
44 dodoc AUTHORS ChangeLog NEWS README 40 dodoc AUTHORS ChangeLog NEWS README
45 else 41 use build && rm -r "${D}"/usr/share
46 rm -rf ${D}/usr/share/man 42
47 fi 43 [[ ${USERLAND} == "GNU" ]] && dosym gpatch /usr/bin/patch
48 if use x86-fbsd ; then
49 ewarn "Please note that in Gentoo/FBSD this version of"
50 ewarn "patch is installed as gpatch"
51 mv ${D}/usr/bin/patch ${D}/usr/bin/gpatch
52 fi
53} 44}

Legend:
Removed from v.330  
changed lines
  Added in v.331

  ViewVC Help
Powered by ViewVC 1.1.20