From 109750c1ebe77d9d4c4c8f05b5db52f0f9050513 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Mon, 29 Nov 2004 17:43:04 +0000 Subject: [PATCH] Use tc-getCC() to determine CC, clean up sed statements and patch Makefile to use pkg-config (fixes bug #72760). --- net-wireless/wpa-supplicant/ChangeLog | 7 ++- .../wpa_supplicant-0.2.5-pkg-config.patch | 50 +++++++++++++++++++ .../wpa-supplicant-0.2.5.ebuild | 14 ++++-- 3 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 net-wireless/wpa-supplicant/files/wpa_supplicant-0.2.5-pkg-config.patch diff --git a/net-wireless/wpa-supplicant/ChangeLog b/net-wireless/wpa-supplicant/ChangeLog index 1d640589a7de..7faa557fd5d7 100644 --- a/net-wireless/wpa-supplicant/ChangeLog +++ b/net-wireless/wpa-supplicant/ChangeLog @@ -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 + +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 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 index 000000000000..607e25054a9a --- /dev/null +++ b/net-wireless/wpa-supplicant/files/wpa_supplicant-0.2.5-pkg-config.patch @@ -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 diff --git a/net-wireless/wpa-supplicant/wpa-supplicant-0.2.5.ebuild b/net-wireless/wpa-supplicant/wpa-supplicant-0.2.5.ebuild index 2e017546bf12..0a4ddcfdea75 100644 --- a/net-wireless/wpa-supplicant/wpa-supplicant-0.2.5.ebuild +++ b/net-wireless/wpa-supplicant/wpa-supplicant-0.2.5.ebuild @@ -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 -- 2.26.2