Use tc-getCC() to determine CC, clean up sed statements and patch Makefile to use...
authorHenrik Brix Andersen <brix@gentoo.org>
Mon, 29 Nov 2004 17:43:04 +0000 (17:43 +0000)
committerHenrik Brix Andersen <brix@gentoo.org>
Mon, 29 Nov 2004 17:43:04 +0000 (17:43 +0000)
net-wireless/wpa-supplicant/ChangeLog
net-wireless/wpa-supplicant/files/wpa_supplicant-0.2.5-pkg-config.patch [new file with mode: 0644]
net-wireless/wpa-supplicant/wpa-supplicant-0.2.5.ebuild

index 1d640589a7de976eec9083e0aa8d6708bc79ac04..7faa557fd5d78388d57d5678a812bc51ce58521e 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for net-wireless/wpa-supplicant
 # Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa-supplicant/ChangeLog,v 1.3 2004/10/18 12:27:04 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa-supplicant/ChangeLog,v 1.4 2004/11/29 17:43:04 brix Exp $
+
+  29 Nov 2004; Henrik Brix Andersen <brix@gentoo.org>
+  +files/wpa_supplicant-0.2.5-pkg-config.patch, wpa-supplicant-0.2.5.ebuild:
+  Use tc-getCC() to determine CC, clean up sed statements and patch Makefile to
+  use pkg-config (fixes bug #72760).
 
   18 Oct 2004; David Holm <dholm@gentoo.org> wpa-supplicant-0.2.5.ebuild:
   Added to ~ppc.
diff --git a/net-wireless/wpa-supplicant/files/wpa_supplicant-0.2.5-pkg-config.patch b/net-wireless/wpa-supplicant/files/wpa_supplicant-0.2.5-pkg-config.patch
new file mode 100644 (file)
index 0000000..607e250
--- /dev/null
@@ -0,0 +1,50 @@
+diff -urp wpa_supplicant-0.2.5/Makefile wpa_supplicant-0.2.5-pkg-config/Makefile
+--- wpa_supplicant-0.2.5/Makefile      2004-10-04 01:36:26.000000000 +0200
++++ wpa_supplicant-0.2.5-pkg-config/Makefile   2004-11-29 16:13:24.052231960 +0100
+@@ -9,15 +9,10 @@ endif
+ # Include directories for CVS version
+ CFLAGS += -I../driver/modules -I../utils -I../hostapd
+ 
+-# Uncomment following two lines and fix the paths if you have installed openssl
+-# in non-default location
+-#CFLAGS += -I/usr/local/openssl/include
+-#LIBS += -L/usr/local/openssl/lib
+-
+ # Uncomment following two lines to use portable libdnet and libpcap instead of
+ # Linux-specific internal implementation for L2 packet handling
+-#CFLAGS += -DUSE_DNET_PCAP
+-#LIBS=-ldnet -lpcap
++#CFLAGS += -DUSE_DNET_PCAP $(shell dnet-config --cflags)
++#LIBS = $(shell dnet-config --libs) -lpcap
+ 
+ all: verify_config wpa_supplicant wpa_passphrase wpa_cli
+ 
+@@ -173,23 +168,22 @@ endif
+ 
+ ifdef CONFIG_PCSC
+ # PC/SC interface for smartcards (USIM, GSM SIM)
+-CFLAGS += -DPCSC_FUNCS
++CFLAGS += -DPCSC_FUNCS $(shell pkg-config --cflags libpcsclite)
+ OBJS += pcsc_funcs.o
+-# -lpthread may not be needed depending on how pcsc-lite was configured
+-LIBS += -lpcsclite -lpthread
++LIBS += $(shell pkg-config --libs libpcsclite)
+ endif
+ 
+ ifdef TLS_FUNCS
+ # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS)
+ CFLAGS += -DEAP_TLS_FUNCS
+ OBJS += eap_tls_common.o
+-LIBS += -lssl
+-LIBS_p += -lcrypto
++LIBS += $(shell pkg-config --libs openssl)
++LIBS_p += $(shell pkg-config --libs openssl)
+ endif
+ 
+ ifdef MS_FUNCS
+ ifndef TLS_FUNCS
+-LIBS += -lcrypto
++LIBS += $(shell pkg-config --libs openssl)
+ endif
+ OBJS += ms_funcs.o
+ endif
index 2e017546bf1214a608f90270ad3ccd57ba419ce3..0a4ddcfdea7509f55d7711332557c41cbbee918f 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa-supplicant/wpa-supplicant-0.2.5.ebuild,v 1.2 2004/10/18 12:27:04 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa-supplicant/wpa-supplicant-0.2.5.ebuild,v 1.3 2004/11/29 17:43:04 brix Exp $
 
-inherit eutils
+inherit toolchain-funcs eutils
 
 MADWIFI_VERSION="0.1_pre20040906"
 
@@ -20,7 +20,8 @@ SLOT="0"
 KEYWORDS="~x86 ~ppc"
 IUSE="gsm pcap ssl"
 
-DEPEND="sys-apps/sed"
+DEPEND="sys-apps/sed
+               dev-util/pkgconfig"
 RDEPEND="gsm? ( sys-apps/pcsc-lite )
                pcap? ( net-libs/libpcap
                                dev-libs/libdnet )
@@ -31,13 +32,16 @@ src_unpack() {
 
        cd ${S}
        epatch ${WORKDIR}/${MY_P}-ipw2100.diff
+       epatch ${FILESDIR}/${MY_P}-pkg-config.patch
 
        sed -i "s:madwifi/wpa::" ${S}/Makefile
 
+       sed -i "s:gcc:$(tc-getCC):g" ${S}/Makefile
+
        # Use pcap and libdnet if we have it.
        if use pcap; then
-               sed -i "s:^#CFLAGS\(.*\):CFLAGS\1:" ${S}/Makefile
-               sed -i "s:^#LIBS\(.*\):LIBS\1:" ${S}/Makefile
+               sed -i "s:^#\(CFLAGS\):\1:" ${S}/Makefile
+               sed -i "s:^#\(LIBS\):\1:" ${S}/Makefile
        fi
 
        cp ${FILESDIR}/${P}-config ${S}/.config || die