Advertisement
_SH

iproute2 ebuild patch

_SH
May 19th, 2015
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.43 KB | None | 0 0
  1. --- iproute2-4.0.0-r1.ebuild    2015-04-20 23:51:18.000000000 +0300
  2. +++ iproute2-4.0.0-r1.edit.ebuild       2015-05-19 12:03:42.859907095 +0300
  3. @@ -1,6 +1,7 @@
  4.  # Copyright 1999-2015 Gentoo Foundation
  5.  # Distributed under the terms of the GNU General Public License v2
  6. -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-4.0.0-r1.ebuild,v 1.1 2015/04/20 20:51:18 vapier Exp $
  7. +# $
  8. +
  9.  
  10.  EAPI="5"
  11.  
  12. @@ -65,25 +66,29 @@
  13.  }
  14.  
  15.  src_configure() {
  16. -       tc-export AR CC PKG_CONFIG
  17. -
  18. -       # This sure is ugly.  Should probably move into toolchain-funcs at some point.
  19. -       local setns
  20. -       pushd "${T}" >/dev/null
  21. -       echo 'main(){return setns();};' > test.c
  22. -       ${CC} ${CFLAGS} ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
  23. -       echo 'main(){};' > test.c
  24. -       ${CC} ${CFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
  25. -       popd >/dev/null
  26. -
  27. -       cat <<-EOF > Config
  28. -       TC_CONFIG_ATM := $(usex atm y n)
  29. -       TC_CONFIG_XT  := $(usex iptables y n)
  30. -       HAVE_SELINUX  := $(usex selinux y n)
  31. -       IP_CONFIG_SETNS := ${setns}
  32. -       # Use correct iptables dir, #144265 #293709
  33. -       IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
  34. -       EOF
  35. +        if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then
  36. +            econf
  37. +        else
  38. +           tc-export AR CC PKG_CONFIG
  39. +
  40. +           # This sure is ugly.  Should probably move into toolchain-funcs at some point./
  41. +           local setns
  42. +           pushd "${T}" >/dev/null
  43. +           echo 'main(){return setns();};' > test.c
  44. +           ${CC} ${CFLAGS} ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
  45. +           echo 'main(){};' > test.c
  46. +           ${CC} ${CFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
  47. +           popd >/dev/null
  48. +
  49. +           cat <<-EOF > Config
  50. +           TC_CONFIG_ATM := $(usex atm y n)
  51. +           TC_CONFIG_XT  := $(usex iptables y n)
  52. +           HAVE_SELINUX  := $(usex selinux y n)
  53. +           IP_CONFIG_SETNS := ${setns}
  54. +           # Use correct iptables dir, #144265 #293709
  55. +           IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
  56. +EOF
  57. +        fi
  58.  }
  59.  
  60.  src_install() {
  61. @@ -122,4 +127,4 @@
  62.                 dodir /usr/bin
  63.                 mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
  64.         fi
  65. -}
  66. +}
  67. \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement