diff options
author | 2011-04-04 06:14:38 +0000 | |
---|---|---|
committer | 2011-04-04 06:14:38 +0000 | |
commit | 38a8489ece998277c7b668e497c3ff9994d7e7d9 (patch) | |
tree | 8a56e1c0c3c3248b324ac13dd19fe4baa06441b4 /net-wireless | |
parent | Version bump. (diff) | |
download | gentoo-2-38a8489ece998277c7b668e497c3ff9994d7e7d9.tar.gz gentoo-2-38a8489ece998277c7b668e497c3ff9994d7e7d9.tar.bz2 gentoo-2-38a8489ece998277c7b668e497c3ff9994d7e7d9.zip |
Added fix for bug #289580.
(Portage version: 2.1.9.45/cvs/Linux x86_64)
Diffstat (limited to 'net-wireless')
-rw-r--r-- | net-wireless/wireless-tools/ChangeLog | 8 | ||||
-rw-r--r-- | net-wireless/wireless-tools/files/wireless-tools-29-inline-fix.patch | 119 | ||||
-rw-r--r-- | net-wireless/wireless-tools/wireless-tools-29-r1.ebuild | 73 |
3 files changed, 199 insertions, 1 deletions
diff --git a/net-wireless/wireless-tools/ChangeLog b/net-wireless/wireless-tools/ChangeLog index c0affd31de2f..63f615c879df 100644 --- a/net-wireless/wireless-tools/ChangeLog +++ b/net-wireless/wireless-tools/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-wireless/wireless-tools # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/wireless-tools/ChangeLog,v 1.140 2011/01/10 16:45:23 anarchy Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/wireless-tools/ChangeLog,v 1.141 2011/04/04 06:14:38 josejx Exp $ + +*wireless-tools-29-r1 (04 Apr 2011) + + 04 Apr 2011; Joseph Jezak <josejx@gentoo.org> + +wireless-tools-29-r1.ebuild, +files/wireless-tools-29-inline-fix.patch: + Added fix for bug #289580. 10 Jan 2011; Jory A. Pratt <anarchy@gentoo.org> -wireless-tools-30_pre6.ebuild, -wireless-tools-30_pre7.ebuild, diff --git a/net-wireless/wireless-tools/files/wireless-tools-29-inline-fix.patch b/net-wireless/wireless-tools/files/wireless-tools-29-inline-fix.patch new file mode 100644 index 000000000000..9e00280086d4 --- /dev/null +++ b/net-wireless/wireless-tools/files/wireless-tools-29-inline-fix.patch @@ -0,0 +1,119 @@ +--- wireless_tools.29.orig/iwlib.h 2011-03-05 16:36:55.000000000 -0500 ++++ wireless_tools.29/iwlib.h 2011-03-05 16:41:32.000000000 -0500 +@@ -60,36 +60,6 @@ + /* Private copy of Wireless extensions (in this directoty) */ + #include "wireless.h" + +-/* Make gcc understant that when we say inline, we mean it. +- * I really hate when the compiler is trying to be more clever than me, +- * because in this case gcc is not able to figure out functions with a +- * single call site, so not only I have to tag those functions inline +- * by hand, but then it refuse to inline them properly. +- * Total saving for iwevent : 150B = 0.7%. +- * Fortunately, in gcc 3.4, they now automatically inline static functions +- * with a single call site. Hurrah ! +- * Jean II */ +-#undef IW_GCC_HAS_BROKEN_INLINE +-#if __GNUC__ == 3 +-#if __GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 4 +-#define IW_GCC_HAS_BROKEN_INLINE 1 +-#endif /* __GNUC_MINOR__ */ +-#endif /* __GNUC__ */ +-/* However, gcc 4.0 has introduce a new "feature", when compiling with +- * '-Os', it does not want to inline iw_ether_cmp() and friends. +- * So, we need to fix inline again ! +- * Jean II */ +-#if __GNUC__ == 4 +-#define IW_GCC_HAS_BROKEN_INLINE 1 +-#endif /* __GNUC__ */ +-/* Now, really fix the inline */ +-#ifdef IW_GCC_HAS_BROKEN_INLINE +-#ifdef inline +-#undef inline +-#endif /* inline */ +-#define inline inline __attribute__((always_inline)) +-#endif /* IW_GCC_HAS_BROKEN_INLINE */ +- + #ifdef __cplusplus + extern "C" { + #endif +@@ -491,6 +461,7 @@ + /************************* INLINE FUNTIONS *************************/ + /* + * Functions that are so simple that it's more efficient inlining them ++ * Most inline are private because gcc is fussy about inline... + */ + + /* +@@ -502,7 +473,7 @@ + /* + * Wrapper to push some Wireless Parameter in the driver + */ +-static inline int ++static inline __attribute__((always_inline)) int + iw_set_ext(int skfd, /* Socket to the kernel */ + const char * ifname, /* Device name */ + int request, /* WE ID */ +@@ -518,7 +489,7 @@ + /* + * Wrapper to extract some Wireless Parameter out of the driver + */ +-static inline int ++static inline __attribute__((always_inline)) int + iw_get_ext(int skfd, /* Socket to the kernel */ + const char * ifname, /* Device name */ + int request, /* WE ID */ +@@ -534,7 +505,7 @@ + /* + * Close the socket used for ioctl. + */ +-static inline void ++static inline __attribute__((always_inline)) void + iw_sockets_close(int skfd) + { + close(skfd); +@@ -544,7 +515,7 @@ + /* + * Display an Ethernet Socket Address in readable format. + */ +-static inline char * ++static inline __attribute__((always_inline)) char * + iw_saether_ntop(const struct sockaddr *sap, char* bufp) + { + iw_ether_ntop((const struct ether_addr *) sap->sa_data, bufp); +@@ -554,7 +525,7 @@ + /* + * Input an Ethernet Socket Address and convert to binary. + */ +-static inline int ++static inline __attribute__((always_inline)) int + iw_saether_aton(const char *bufp, struct sockaddr *sap) + { + sap->sa_family = ARPHRD_ETHER; +@@ -565,7 +536,7 @@ + /* + * Create an Ethernet broadcast address + */ +-static inline void ++static inline __attribute__((always_inline)) void + iw_broad_ether(struct sockaddr *sap) + { + sap->sa_family = ARPHRD_ETHER; +@@ -576,7 +547,7 @@ + /* + * Create an Ethernet NULL address + */ +-static inline void ++static inline __attribute__((always_inline)) void + iw_null_ether(struct sockaddr *sap) + { + sap->sa_family = ARPHRD_ETHER; +@@ -587,7 +558,7 @@ + /* + * Compare two ethernet addresses + */ +-static inline int ++static inline __attribute__((always_inline)) int + iw_ether_cmp(const struct ether_addr* eth1, const struct ether_addr* eth2) + { + return memcmp(eth1, eth2, sizeof(*eth1)); diff --git a/net-wireless/wireless-tools/wireless-tools-29-r1.ebuild b/net-wireless/wireless-tools/wireless-tools-29-r1.ebuild new file mode 100644 index 000000000000..f879cffa2904 --- /dev/null +++ b/net-wireless/wireless-tools/wireless-tools-29-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/wireless-tools/wireless-tools-29-r1.ebuild,v 1.1 2011/04/04 06:14:38 josejx Exp $ + +inherit toolchain-funcs multilib eutils + +# The following works with both pre-releases and releases +MY_P=${PN/-/_}.${PV/_/.} +S=${WORKDIR}/${MY_P/\.pre*/} + +DESCRIPTION="A collection of tools to configure IEEE 802.11 wireless LAN cards" +HOMEPAGE="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html" +SRC_URI="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="multicall nls" + +DEPEND="sys-apps/sed" +RDEPEND="" + +src_unpack() { + unpack ${A} + + epatch "${FILESDIR}/${P}-asneeded.patch" + + sed -i \ + -e "s:^\(CC\) = gcc:\1 = $(tc-getCC):" \ + -e "s:^\(AR\) = ar:\1 = $(tc-getAR):" \ + -e "s:^\(RANLIB\) = ranlib:\1 = $(tc-getRANLIB):" \ + -e "s:^\(CFLAGS=-Os\):#\1:" \ + -e "s:\(@\$(LDCONFIG).*\):#\1:" \ + -e "s:^\(INSTALL_MAN= \$(PREFIX)\)/man/:\1/share/man:" \ + -e "s:^\(INSTALL_LIB= \$(PREFIX)\)/lib/:\1/$(get_libdir)/:" \ + -e '/\$(CC)/s:-Wl,-s\>::' \ + "${S}"/Makefile || die + + epatch "${FILESDIR}/${P}-inline-fix.patch" +} + +src_compile() { + emake || die "emake failed" + + if use multicall; then + emake iwmulticall || die "emake iwmulticall failed" + fi +} + +src_install() { + make PREFIX="${D}" INSTALL_INC="${D}"/usr/include INSTALL_MAN="${D}"/usr/share/man install \ + || die "make install failed" + + if use multicall; then + # 'make install-iwmulticall' will overwrite some of the tools + # with symlinks - this is intentional (brix) + make PREFIX="${D}" INSTALL_INC="${D}"/usr/include INSTALL_MAN="${D}"/usr/share/man install-iwmulticall \ + || die "make install-iwmulticall failed" + fi + + if use nls; then + for lang in fr cs; do + for man in 5 7 8; do + insinto /usr/share/man/${lang}/man${man} + doins ${lang}/*.${man} + done + + [[ -f README.${lang} ]] && dodoc README.${lang} + done + fi + + dodoc CHANGELOG.h DISTRIBUTIONS.txt HOTPLUG.txt IFRENAME-VS-XXX.txt PCMCIA.txt README +} |