# 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.
--- /dev/null
+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
# 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"
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 )
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