diff options
author | Lars Engels <lme@FreeBSD.org> | 2008-03-13 20:56:14 +0000 |
---|---|---|
committer | Lars Engels <lme@FreeBSD.org> | 2008-03-13 20:56:14 +0000 |
commit | bfc2a244f51d1d69cf1779d58b73d9a7d0958451 (patch) | |
tree | df71873e6c360ebc923b030b2168c2d51610d625 /sysutils | |
parent | 841f09528a381b485c13431868cd5bf07eccf498 (diff) | |
download | ports-bfc2a244f51d1d69cf1779d58b73d9a7d0958451.tar.gz ports-bfc2a244f51d1d69cf1779d58b73d9a7d0958451.zip |
- Update to 1.6
Notes
Notes:
svn path=/head/; revision=208994
Diffstat (limited to 'sysutils')
12 files changed, 32 insertions, 802 deletions
diff --git a/sysutils/desktopbsd-tools/Makefile b/sysutils/desktopbsd-tools/Makefile index 0c41314474c5..57d1a2c524a1 100644 --- a/sysutils/desktopbsd-tools/Makefile +++ b/sysutils/desktopbsd-tools/Makefile @@ -5,17 +5,15 @@ # $FreeBSD$ PORTNAME= desktopbsd-tools -PORTVERSION= 1.1 -PORTREVISION= 2 +PORTVERSION= 1.6 CATEGORIES= sysutils -MASTER_SITES= ftp://ftp.desktopbsd.net/ +MASTER_SITES= ftp://ftp.desktopbsd.net/pub/DesktopBSD/Tools/ MAINTAINER= ph@desktopbsd.net COMMENT= DesktopBSD tools for easy system configuration BUILD_DEPENDS= qmake:${PORTSDIR}/devel/qmake -RUN_DEPENDS= xterm:${PORTSDIR}/x11/xterm \ - bash:${PORTSDIR}/shells/bash \ +RUN_DEPENDS= bash:${PORTSDIR}/shells/bash \ fastest_cvsup:${PORTSDIR}/sysutils/fastest_cvsup \ portupgrade:${PORTSDIR}/ports-mgmt/portupgrade \ portaudit:${PORTSDIR}/ports-mgmt/portaudit @@ -35,23 +33,23 @@ DATADIR= ${PREFIX}/share/desktopbsd .include <bsd.port.pre.mk> +.if ${OSVERSION} < 600007 +IGNORE= requires FreeBSD 6 or newer +.endif + .if ${OSVERSION} < 601101 || ( ${OSVERSION} >= 700000 && ${OSVERSION} < 700015 ) RUN_DEPENDS+= csup:${PORTSDIR}/net/csup .endif -.if ${OSVERSION} < 504103 || ( ${OSVERSION} >= 600000 && ${OSVERSION} < 600033 ) +.if ${OSVERSION} >= 600000 && ${OSVERSION} < 600033 RUN_DEPENDS+= portsnap:${PORTSDIR}/ports-mgmt/portsnap .endif -.if ${OSVERSION} > 600007 -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libdesktopbsd_accesspoint.h ${FILESDIR}/extra-patch-libdesktopbsd_accesspoint.cpp ${FILESDIR}/extra-patch-libdesktopbsd_wirelessinterface.h ${FILESDIR}/extra-patch-libdesktopbsd_wirelessinterface.cpp -.endif - post-patch: @${REINPLACE_CMD} -e \ "/Installation/d; /Documentation/d; /InitialConf/d" \ ${WRKSRC}/desktopbsd.pro - @${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|g" ${WRKSRC}/*/*.pro + @${REINPLACE_CMD} -e "s|^PREFIX = .*|PREFIX = ${PREFIX}|g" ${WRKSRC}/desktopbsd.pro.inc do-configure: @cd ${WRKSRC} \ diff --git a/sysutils/desktopbsd-tools/distinfo b/sysutils/desktopbsd-tools/distinfo index 5ad1a65b44c9..ae2624960702 100644 --- a/sysutils/desktopbsd-tools/distinfo +++ b/sysutils/desktopbsd-tools/distinfo @@ -1,3 +1,3 @@ -MD5 (desktopbsd-tools-1.1.tar.bz2) = 95adb399fac27bb8a66977d1636cd05b -SHA256 (desktopbsd-tools-1.1.tar.bz2) = 5b187a92fe91789d61793da81498a41f1be037133849b13ed85ea68f15d32817 -SIZE (desktopbsd-tools-1.1.tar.bz2) = 664483 +MD5 (desktopbsd-tools-1.6.tar.bz2) = fbd9d0ba09691f1c5595d61bedd255da +SHA256 (desktopbsd-tools-1.6.tar.bz2) = 576111749a50a51438db867d4cb7e1728460515be938c87cd2aee7bb33e70310 +SIZE (desktopbsd-tools-1.6.tar.bz2) = 1026601 diff --git a/sysutils/desktopbsd-tools/files/extra-patch-libdesktopbsd_accesspoint.cpp b/sysutils/desktopbsd-tools/files/extra-patch-libdesktopbsd_accesspoint.cpp deleted file mode 100644 index 1f5192632cd4..000000000000 --- a/sysutils/desktopbsd-tools/files/extra-patch-libdesktopbsd_accesspoint.cpp +++ /dev/null @@ -1,181 +0,0 @@ -Index: libdesktopbsd/accesspoint.cpp -=================================================================== ---- libdesktopbsd/accesspoint.cpp (Revision 454) -+++ libdesktopbsd/accesspoint.cpp (Revision 920) -@@ -1,47 +1,108 @@ - /* - * This file is part of DesktopBSD, see the README file. - * -- * Author: Peter Hofer <hofer.p@gmail.com> -- * (C) 2004, 2005 -+ * Author: Peter Hofer <ph@desktopbsd.net> -+ * (C) 2004-2007 - * - * Copyright: BSD, see the COPYING file included in this distribution - * - */ -+ -+ /* -+ * Copyright 2001 The Aerospace Corporation. All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. The name of The Aerospace Corporation may not be used to endorse or -+ * promote products derived from this software. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION ``AS IS'' AND -+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AEROSPACE CORPORATION BE LIABLE -+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ * SUCH DAMAGE. -+ * -+ * $FreeBSD: /tmp/pcvs/ports/sysutils/desktopbsd-tools/files/Attic/extra-patch-libdesktopbsd_accesspoint.cpp,v 1.1 2007-10-29 21:03:57 lme Exp $ -+ */ - -+/*- -+ * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. -+ * All rights reserved. -+ * -+ * This code is derived from software contributed to The NetBSD Foundation -+ * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, -+ * NASA Ames Research Center. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. All advertising materials mentioning features or use of this software -+ * must display the following acknowledgement: -+ * This product includes software developed by the NetBSD -+ * Foundation, Inc. and its contributors. -+ * 4. Neither the name of The NetBSD Foundation nor the names of its -+ * contributors may be used to endorse or promote products derived -+ * from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -+ * POSSIBILITY OF SUCH DAMAGE. -+ */ -+ - #include "accesspoint.h" - --#include <qstring.h> - - /** Initializes the access point with a wi_apinfo struct. - * This creates a deep copy of the given struct so you - * can safely delete it's wi_req struct afterwards. - */ --AccessPoint::AccessPoint(const struct wi_apinfo& apinfo) { -+AccessPoint::AccessPoint(const struct ieee80211req_scan_result& apinfo, const QString & ssid) { - this->apinfo = apinfo; -+ this->ssid = ssid; - } - - - - /** @return The station's SSID. */ - QString AccessPoint::getSSID() const { -- return QString::fromAscii(apinfo.name, apinfo.namelen); -+ return ssid; - } - - - - /** @returns The station's MAC address. */ - QString AccessPoint::getBSSID() const { -- char bssid[18]; -- -- snprintf(bssid, sizeof(bssid), "%02X:%02X:%02X:%02X:%02X:%02X", -- apinfo.bssid[0] & 0xFF, -- apinfo.bssid[1] & 0xFF, -- apinfo.bssid[2] & 0xFF, -- apinfo.bssid[3] & 0xFF, -- apinfo.bssid[4] & 0xFF, -- apinfo.bssid[5] & 0xFF); -- -- return bssid; -+ char *str = ether_ntoa((const struct ether_addr *) apinfo.isr_bssid); -+ -+ if(str == NULL) -+ return "INVALID"; -+ -+ return QString(str).upper(); - } - - -@@ -50,10 +111,10 @@ - int AccessPoint::getCapInfo() const { - int capinfo = None; - -- if(apinfo.capinfo & IEEE80211_CAPINFO_ESS) -+ if(apinfo.isr_capinfo & IEEE80211_CAPINFO_ESS) - capinfo |= ESS; - -- if(apinfo.capinfo & IEEE80211_CAPINFO_PRIVACY) -+ if(apinfo.isr_capinfo & IEEE80211_CAPINFO_PRIVACY) - capinfo |= WEP; - - return capinfo; -@@ -65,29 +126,14 @@ - * is not 1, 2, 5.5 or 11 Mbps. - */ - double AccessPoint::getRate() const { -- double rate; -- -- switch(apinfo.rate) { -- case WI_APRATE_1: -- rate = 1; -- break; -- -- case WI_APRATE_2: -- rate = 2; -- break; -- -- case WI_APRATE_5: -- rate = 5.5; -- break; -- -- case WI_APRATE_11: -- rate = 11; -- break; -- -- default: -- rate = 0; -- break; -+ int maxrate = -1; -+ -+ for (int i = 0; i < apinfo.isr_nrates; i++) -+ { -+ int rate = apinfo.isr_rates[i] & IEEE80211_RATE_VAL; -+ if (rate > maxrate) -+ maxrate = rate; - } -- -- return rate; -+ -+ return (double) maxrate / 2; - } diff --git a/sysutils/desktopbsd-tools/files/extra-patch-libdesktopbsd_accesspoint.h b/sysutils/desktopbsd-tools/files/extra-patch-libdesktopbsd_accesspoint.h deleted file mode 100644 index 97f5a84e58f4..000000000000 --- a/sysutils/desktopbsd-tools/files/extra-patch-libdesktopbsd_accesspoint.h +++ /dev/null @@ -1,52 +0,0 @@ -Index: libdesktopbsd/accesspoint.h -=================================================================== ---- libdesktopbsd/accesspoint.h (Revision 454) -+++ libdesktopbsd/accesspoint.h (Revision 920) -@@ -1,7 +1,7 @@ - /* - * This file is part of DesktopBSD, see the README file. - * -- * Author: Peter Hofer <hofer.p@gmail.com> -+ * Author: Peter Hofer <ph@desktopbsd.net> - * (C) 2004, 2005 - * - * Copyright: BSD, see the COPYING file included in this distribution -@@ -27,7 +27,7 @@ - #include <dev/wi/if_wavelan_ieee.h> - #include <dev/wi/if_wireg.h> - --class QString; -+#include <qstring.h> - - /** @brief Wireless Access-Point class. - * -@@ -45,23 +45,24 @@ - }; - - -- AccessPoint(const struct wi_apinfo&); -+ AccessPoint(const struct ieee80211req_scan_result &, const QString &); - - QString getSSID() const; - - /** @return Signal quality [dBm] */ -- int getQuality() const { return apinfo.quality; } -+ int getQuality() const { return apinfo.isr_rssi / apinfo.isr_noise; } - /** @return Signal. */ -- int getSignal() const { return apinfo.signal; } -+ int getSignal() const { return apinfo.isr_rssi; } - /** @return Signal noise */ -- int getNoise() const { return apinfo.noise; } -+ int getNoise() const { return apinfo.isr_noise; } - - QString getBSSID() const; - int getCapInfo() const; - double getRate() const; - - private: -- struct wi_apinfo apinfo; -+ QString ssid; -+ struct ieee80211req_scan_result apinfo; - }; - - #endif /* __ACCESSPOINT_H */ diff --git a/sysutils/desktopbsd-tools/files/extra-patch-libdesktopbsd_wirelessinterface.cpp b/sysutils/desktopbsd-tools/files/extra-patch-libdesktopbsd_wirelessinterface.cpp deleted file mode 100644 index 51d5e6fb13a3..000000000000 --- a/sysutils/desktopbsd-tools/files/extra-patch-libdesktopbsd_wirelessinterface.cpp +++ /dev/null @@ -1,262 +0,0 @@ -Index: libdesktopbsd/wirelessinterface.cpp -=================================================================== ---- libdesktopbsd/wirelessinterface.cpp (Revision 454) -+++ libdesktopbsd/wirelessinterface.cpp (Revision 920) -@@ -1,13 +1,79 @@ - /* - * This file is part of DesktopBSD, see the README file. - * -- * Author: Peter Hofer <hofer.p@gmail.com> -- * (C) 2004, 2005 -+ * Author: Peter Hofer <ph@desktopbsd.net> -+ * (C) 2004-2007 - * - * Copyright: BSD, see the COPYING file included in this distribution - * - */ - -+/* -+ * Copyright 2001 The Aerospace Corporation. All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. The name of The Aerospace Corporation may not be used to endorse or -+ * promote products derived from this software. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION ``AS IS'' AND -+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AEROSPACE CORPORATION BE LIABLE -+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ * SUCH DAMAGE. -+ * -+ * $FreeBSD: /tmp/pcvs/ports/sysutils/desktopbsd-tools/files/Attic/extra-patch-libdesktopbsd_wirelessinterface.cpp,v 1.1 2007-10-29 21:03:57 lme Exp $ -+ */ -+ -+/*- -+ * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. -+ * All rights reserved. -+ * -+ * This code is derived from software contributed to The NetBSD Foundation -+ * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, -+ * NASA Ames Research Center. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. All advertising materials mentioning features or use of this software -+ * must display the following acknowledgement: -+ * This product includes software developed by the NetBSD -+ * Foundation, Inc. and its contributors. -+ * 4. Neither the name of The NetBSD Foundation nor the names of its -+ * contributors may be used to endorse or promote products derived -+ * from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -+ * POSSIBILITY OF SUCH DAMAGE. -+ */ -+ - #include "wirelessinterface.h" - - #include <net/ethernet.h> -@@ -182,66 +248,40 @@ - * - * @return QPtrList with the found access points. - */ --QPtrList<AccessPoint> WirelessInterface::getAPs() { -- /* Status must be UP to be able to scan for ap's. */ -+QPtrList<AccessPoint> WirelessInterface::getAPs() -+{ -+ QPtrList<AccessPoint> list; -+ -+ /* Some WiFi NICs need to be in link state UP to scan for networks */ -+ up(); - -- if(up() < 0 && !isUp()) -- /* up() failed and interface seems to be down, -- * so a scan would return nothing anyway. -- */ -- return QPtrList<AccessPoint>(); -+ uint8_t buffer[24 * 1024]; -+ struct ieee80211req *ireq = getIReq(IEEE80211_IOC_SCAN_RESULTS, (uint8_t **) buffer, sizeof buffer, 0); -+ if(ireq == NULL) -+ return list; - -- QPtrList<AccessPoint> list; -+ int length = ireq->i_len; -+ if (length < sizeof(struct ieee80211req_scan_result)) -+ { -+ delete ireq; -+ return list; -+ } - -- struct wi_req wreq; -- bzero(&wreq, sizeof(wreq)); -- wreq.wi_len = WI_MAX_DATALEN; -- wreq.wi_type = WI_RID_READ_APS; -+ uint8_t *current = buffer; -+ do -+ { -+ struct ieee80211req_scan_result *sr = (struct ieee80211req_scan_result *) current; -+ list.append(new AccessPoint(*sr, copySSID((u_int8_t *) (sr + 1), (size_t) sr->isr_ssid_len))); - -- if(wiGetVal(&wreq) < 0) -- return list; -- -- struct wi_apinfo *apinfos; -- apinfos = (struct wi_apinfo *) (((char *) &wreq.wi_val) + sizeof(int)); -- -- int cnt = * (int *) wreq.wi_val; -- for(int i = cnt - 1; i >= 0; --i) { -- bool exists = false; -- for(int n = cnt - 1; n > i && !exists ; --n) { -- exists |= (bcmp(apinfos[n].bssid, -- apinfos[i].bssid, -- sizeof(apinfos[0].bssid)) == 0); -- } -- -- if(!exists) -- list.append(new AccessPoint(apinfos[i])); -+ current += sr->isr_len; -+ length -= sr->isr_len; - } -- -- return list; -+ while (length >= sizeof(struct ieee80211req_scan_result)); -+ -+ delete ireq; -+ return list; - } - --int WirelessInterface::wiGetVal(struct wi_req *wreq) const { -- if(wreq == NULL) -- return -1; -- -- struct ifreq ifr; -- int s, ret; -- -- bzero(&ifr, sizeof(ifr)); -- -- strlcpy(ifr.ifr_name, getName(), sizeof(ifr.ifr_name)); -- ifr.ifr_data = (caddr_t) wreq; -- -- s = socket(AF_INET, SOCK_DGRAM, 0); -- if(s == -1) -- return -1; -- -- ret = ioctl(s, SIOCGWAVELAN, &ifr); -- close(s); -- -- return ret; --} -- - /** Returns a list with all wireless network interfaces. */ - QPtrList<WirelessInterface> WirelessInterface::getWirelessIfs() { - QPtrList<WirelessInterface> lst; -@@ -285,9 +325,16 @@ - } - - -+/** @param data pointer to a pointer to a uint8_t array with minimum size 32 */ -+struct ieee80211req *WirelessInterface::getIReq(int type, uint8_t **data) const -+{ -+ return getIReq(type, data, 0, -1); -+} - -+ - /** @param data pointer to a pointer to a uint8_t array with minimum size 32 */ --struct ieee80211req *WirelessInterface::getIReq(int type, uint8_t **data) const { -+struct ieee80211req *WirelessInterface::getIReq(int type, uint8_t **data, size_t len, int16_t val) const -+{ - int s = newSocket(); - if(s < 0) - return NULL; -@@ -297,7 +344,8 @@ - strlcpy(ireq->i_name, getName(), sizeof ireq->i_name); - ireq->i_data = data; - ireq->i_type = type; -- ireq->i_val = -1; -+ ireq->i_len = len; -+ ireq->i_val = val; - - if(ioctl(s, SIOCG80211, ireq) < 0) { - close(s); -@@ -309,3 +357,53 @@ - return ireq; - } - -+ -+QString WirelessInterface::copySSID(const u_int8_t *essid, const size_t essid_len) const -+{ -+ char buf[IEEE80211_NWID_LEN + 1]; -+ int bufsize = sizeof(buf) - 1; -+ bzero(buf, sizeof(buf)); -+ -+ const u_int8_t *p; -+ size_t maxlen; -+ int i; -+ -+ if (essid_len > bufsize) -+ maxlen = bufsize; -+ else -+ maxlen = essid_len; -+ /* determine printable or not */ -+ for (i = 0, p = essid; i < maxlen; i++, p++) { -+ if (*p < ' ' || *p > 0x7e) -+ break; -+ } -+ if (i != maxlen) { /* not printable, print as hex */ -+ -+ /* Check for hidden SSIDs (filled with zeroes) */ -+ for(i = 0; i < maxlen; ++i) -+ { -+ if(*p != 0) -+ break; -+ } -+ if(i == maxlen) -+ return QString(); -+ -+ if (bufsize < 3) -+ return "INVALID"; -+ strlcpy(buf, "0x", bufsize); -+ bufsize -= 2; -+ p = essid; -+ for (i = 0; i < maxlen && bufsize >= 2; i++) { -+ sprintf(&buf[2+2*i], "%02x", p[i]); -+ bufsize -= 2; -+ } -+ if (i != essid_len) -+ memcpy(&buf[2+2*i-3], "...", 3); -+ } else { /* printable, truncate as needed */ -+ memcpy(buf, essid, maxlen); -+ if (maxlen != essid_len) -+ memcpy(&buf[maxlen-3], "...", 3); -+ } -+ -+ return QString(buf); -+} diff --git a/sysutils/desktopbsd-tools/files/extra-patch-libdesktopbsd_wirelessinterface.h b/sysutils/desktopbsd-tools/files/extra-patch-libdesktopbsd_wirelessinterface.h deleted file mode 100644 index 3ef4a9ffe73f..000000000000 --- a/sysutils/desktopbsd-tools/files/extra-patch-libdesktopbsd_wirelessinterface.h +++ /dev/null @@ -1,25 +0,0 @@ -Index: libdesktopbsd/wirelessinterface.h -=================================================================== ---- libdesktopbsd/wirelessinterface.h (Revision 454) -+++ libdesktopbsd/wirelessinterface.h (Revision 920) -@@ -1,7 +1,7 @@ - /* - * This file is part of DesktopBSD, see the README file. - * -- * Author: Peter Hofer <hofer.p@gmail.com> -+ * Author: Peter Hofer <ph@desktopbsd.net> - * (C) 2004, 2005 - * - * Copyright: BSD, see the COPYING file included in this distribution -@@ -47,9 +47,10 @@ - static QPtrList<WirelessInterface> getWirelessIfs(); - - private: -- int wiGetVal(struct wi_req *) const; - int set80211(int, int, int, uint8_t *) const; - struct ieee80211req *getIReq(int, uint8_t **) const; -+ struct ieee80211req *getIReq(int, uint8_t **, size_t, int16_t) const; -+ QString copySSID(const uint8_t *, const size_t) const; - - int hexToNumber(char) const; - }; diff --git a/sysutils/desktopbsd-tools/files/patch-Tray-BattInfo_batterytray.cpp b/sysutils/desktopbsd-tools/files/patch-Tray-BattInfo_batterytray.cpp deleted file mode 100644 index de8824493eeb..000000000000 --- a/sysutils/desktopbsd-tools/files/patch-Tray-BattInfo_batterytray.cpp +++ /dev/null @@ -1,144 +0,0 @@ -Index: Tray-BattInfo/batterytray.cpp -=================================================================== ---- Tray-BattInfo/batterytray.cpp (Revision 454) -+++ Tray-BattInfo/batterytray.cpp (Revision 920) -@@ -1,7 +1,7 @@ - /* - * This file is part of DesktopBSD, see the README file. - * -- * Author: Peter Hofer <hofer.p@gmail.com> -+ * Author: Peter Hofer <ph@desktopbsd.net> - * (C) 2004, 2005 - * - * Copyright: BSD, see the COPYING file included in this distribution -@@ -26,14 +26,29 @@ - #define _UPDATE_MAX 30 - - BatteryTray::BatteryTray() { -- contextMenu()->insertItem(DBSDGlobal::getIconLoader()->loadIcon("configure", DBSDIconLoader::Size16x16), -+ DBSDIconLoader *iloader = DBSDGlobal::getIconLoader(); -+ -+ contextMenu()->insertItem(iloader->loadIcon("configure", DBSDIconLoader::Size16x16), - tr("Configure..."), this, SLOT(openConfigDialog())); -+ -+ imgBattery = iloader->loadIcon("dbsd-battinfo-battery", DBSDIconLoader::Size22x22) -+ .convertToImage(); -+ -+ imgRecharge = iloader->loadIcon("dbsd-battinfo-recharge", DBSDIconLoader::Size22x22) -+ .convertToImage(); -+ -+ pixPower = iloader->loadIcon("dbsd-battinfo-power", DBSDIconLoader::Size22x22); -+ -+ previousRechargeLife = -1; -+ previousPowerSource = -1; - } - - BatteryTray::~BatteryTray() { - } - --void BatteryTray::polish() { -+void BatteryTray::showEvent(QShowEvent *e) { -+ KSystemTray::showEvent(e); -+ - uint updateTime = Battery::infoExpires(); - - /* Check for bad values and replace -@@ -44,7 +59,7 @@ - else if(updateTime > _UPDATE_MAX) - updateTime = _UPDATE_MAX; - -- updateTime = 2; -+ updateStatus(); - - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), SLOT(updateStatus())); -@@ -53,33 +68,30 @@ - - - void BatteryTray::updateStatus() { -- DBSDIconLoader *iloader = DBSDGlobal::getIconLoader(); - QImage image; - - static bool lifeCriticalShown = false, - lifeLowShown = false; - -- int acline = Battery::powerSource(); -+ int powersrc = Battery::powerSource(); - int time = Battery::getTime(); - int life = Battery::getLife(); - - QString tipText = tr("Power Source: %1\n", "The power source of a mobile device"); - -- if(acline == Battery::PS_ACLine) { -+ if(powersrc == Battery::PS_ACLine) { - tipText = tipText.arg(tr("AC Line")); - - if(life >= 0 && life <= 100) -- image = DBSDGlobal::getIconLoader()->loadIcon("dbsd-battinfo-recharge", -- DBSDIconLoader::Size22x22).convertToImage(); -+ image = imgRecharge; - else -- setPixmap(iloader->loadIcon("dbsd-battinfo-power", DBSDIconLoader::Size22x22)); -+ setPixmap(pixPower); - - lifeCriticalShown = false; - lifeLowShown = false; - } else { - tipText = tipText.arg(tr("Battery")); -- image = DBSDGlobal::getIconLoader()->loadIcon("dbsd-battinfo-battery", -- DBSDIconLoader::Size22x22).convertToImage(); -+ image = imgBattery; - - if(!lifeCriticalShown) { - BatterySettings bs; -@@ -96,23 +108,36 @@ - } - - if(life >= 0 && life <= 100) { -- for(uint y = 0; y < (float) (image.height() - 9) / 100 * (100 - life) + 4; ++y) -- for(uint x = 0; x < image.width(); ++x) { -- uint rgba = image.pixel(x, y); -+ int rlife = (float) (image.height() - 9) / 100 * (101 - life) + 4; -+ -+ if(rlife != previousRechargeLife || powersrc != previousPowerSource) -+ { -+ image.detach(); - -- /* Don't change transparent pixels */ -- if(qAlpha(rgba) < 190) -- continue; -- -- QColor c; -- int h, s ,v; -- c.setRgb(rgba); -- c.getHsv(&h, &s, &v); -- c.setHsv(h, 0, ((v *= 1.1) > 255) ? 255 : v); -- image.setPixel(x, y, c.rgb()); -+ for(uint y = 0; y < rlife; ++y) -+ { -+ for(uint x = 0; x < image.width(); ++x) -+ { -+ uint rgba = image.pixel(x, y); -+ -+ /* Don't change transparent pixels */ -+ if(qAlpha(rgba) < 190) -+ continue; -+ -+ QColor c; -+ int h, s ,v; -+ c.setRgb(rgba); -+ c.getHsv(&h, &s, &v); -+ c.setHsv(h, 0, ((v *= 1.1) > 255) ? 255 : v); -+ image.setPixel(x, y, c.rgb()); -+ } - } - -- setPixmap(QPixmap(image)); -+ previousPowerSource = powersrc; -+ previousRechargeLife = rlife; -+ pixPreviousRecharge = image; -+ setPixmap(pixPreviousRecharge); -+ } - - tipText += tr("Battery Status: %1 %\n").arg(life); - } diff --git a/sysutils/desktopbsd-tools/files/patch-Tray-BattInfo_batterytray.h b/sysutils/desktopbsd-tools/files/patch-Tray-BattInfo_batterytray.h deleted file mode 100644 index cdd675a34ea9..000000000000 --- a/sysutils/desktopbsd-tools/files/patch-Tray-BattInfo_batterytray.h +++ /dev/null @@ -1,51 +0,0 @@ -Index: Tray-BattInfo/batterytray.h -=================================================================== ---- Tray-BattInfo/batterytray.h (Revision 454) -+++ Tray-BattInfo/batterytray.h (Revision 920) -@@ -1,7 +1,7 @@ - /* - * This file is part of DesktopBSD, see the README file. - * -- * Author: Peter Hofer <hofer.p@gmail.com> -+ * Author: Peter Hofer <ph@desktopbsd.net> - * (C) 2004, 2005 - * - * Copyright: BSD, see the COPYING file included in this distribution -@@ -11,10 +11,13 @@ - #ifndef __BATTERYTRAY_H - #define __BATTERYTRAY_H - --#include <qtimer.h> - #include <ksystemtray.h> -+ -+#include <qpixmap.h> - #include <qimage.h> - -+class QTimer; -+ - class BatteryTray : public KSystemTray { - Q_OBJECT - -@@ -23,11 +26,10 @@ - virtual ~BatteryTray(); - - public slots: -- virtual void polish(); -- - void updateStatus(); - - protected: -+ virtual void showEvent(QShowEvent *e); - virtual void mouseDoubleClickEvent(QMouseEvent *e); - - protected slots: -@@ -35,6 +37,9 @@ - - private: - QTimer *timer; -+ QImage imgBattery, imgRecharge; -+ QPixmap pixPower, pixPreviousRecharge; -+ int previousRechargeLife, previousPowerSource; - }; - - #endif /* __BATTERYTRAY_H */ diff --git a/sysutils/desktopbsd-tools/files/patch-libdbsddisk_libdbsddisk.pro b/sysutils/desktopbsd-tools/files/patch-libdbsddisk_libdbsddisk.pro deleted file mode 100644 index 77a99ae2eead..000000000000 --- a/sysutils/desktopbsd-tools/files/patch-libdbsddisk_libdbsddisk.pro +++ /dev/null @@ -1,44 +0,0 @@ ---- libdbsddisk/libdbsddisk.orig Sat Nov 18 16:46:03 2006 -+++ libdbsddisk/libdbsddisk.pro Sat Nov 18 16:44:21 2006 -@@ -23,38 +23,12 @@ - chunk.c \ - create_chunk.c \ - disk.c \ -- open_disk.c \ - rules.c \ -+ write_$${ARCH}_disk.c \ - write_disk.c - - equals(ARCH, ia64) { -- SOURCES += open_ia64_disk.c \ -- write_ia64_disk.c -+ SOURCES += open_ia64_disk.c - } else { -- SOURCES += change.c --} -- --equals(ARCH, alpha) { -- SOURCES += write_alpha_disk.c --} -- --equals(ARCH, amd64) { -- SOURCES += write_amd64_disk.c --} -- --equals(ARCH, sparc64) { -- SOURCES += write_sparc64_disk.c --} -- --equals(ARCH, i386) { -- SOURCES += write_i386_disk.c --} -- --equals(ARCH, pc98) { -- SOURCES += write_pc98_disk.c -- DEFINES += PC98 --} -- --equals(ARCH, powerpc) { -- SOURCES += write_powerpc_disk.c -+ SOURCES += open_disk.c change.c - } diff --git a/sysutils/desktopbsd-tools/files/patch-libdesktopbsd-ui_moddevinfo.ui.h b/sysutils/desktopbsd-tools/files/patch-libdesktopbsd-ui_moddevinfo.ui.h deleted file mode 100644 index 9d3263b02c5f..000000000000 --- a/sysutils/desktopbsd-tools/files/patch-libdesktopbsd-ui_moddevinfo.ui.h +++ /dev/null @@ -1,11 +0,0 @@ ---- libdesktopbsd-ui/moddevinfo.ui.h.orgi 2007-10-29 19:53:33.000000000 +0100 -+++ libdesktopbsd-ui/moddevinfo.ui.h 2007-10-29 19:54:09.000000000 +0100 -@@ -32,7 +32,7 @@ - - if(dev->dd_name[0] != '\0' && dev->dd_state >= DIS_ATTACHED) { - Device device(dev->dd_name); -- uint level = (uint) arg; -+ uint64_t level = (uint64_t) arg; - - /* Check the index in parents[], even if it is - * highly unlikely that it is > 32. diff --git a/sysutils/desktopbsd-tools/files/patch-prepare-build.sh b/sysutils/desktopbsd-tools/files/patch-prepare-build.sh deleted file mode 100644 index 204cd2b3f5d7..000000000000 --- a/sysutils/desktopbsd-tools/files/patch-prepare-build.sh +++ /dev/null @@ -1,11 +0,0 @@ ---- prepare_build.sh.orig Sat Aug 5 02:17:22 2006 -+++ prepare_build.sh Sun Apr 22 18:10:44 2007 -@@ -2,7 +2,7 @@ - # Run scripts that prepare for the build - - printf "Compiling translation files..." --(cd Translation ; ./pro-generate.sh && lrelease Translation.pro) || (echo "Error compiling translation files" ; exit 1) -+(cd Translation ; ./pro-generate.sh && ${QTDIR}/bin/lrelease Translation.pro) || (echo "Error compiling translation files" ; exit 1) - echo "Done." - - printf "Generating IDL for hardware notification..." diff --git a/sysutils/desktopbsd-tools/pkg-plist b/sysutils/desktopbsd-tools/pkg-plist index 844946fa679d..fba7dfc6270a 100644 --- a/sysutils/desktopbsd-tools/pkg-plist +++ b/sysutils/desktopbsd-tools/pkg-plist @@ -5,34 +5,36 @@ bin/dbsd-pkgmgr bin/dbsd-traymounter bin/dbsd-userstart bin/kdialog-ports-wrapper -bin/pgrpmgr lib/kde3/libkcm_desktopbsd.la lib/kde3/libkcm_desktopbsd.prl lib/kde3/libkcm_desktopbsd.so -lib/kde3/libkcm_desktopbsd.so.1.0 lib/kde3/libkcm_desktopbsd.so.1 +lib/kde3/libkcm_desktopbsd.so.1.0 lib/kde3/libkcm_desktopbsd.so.1.0.0 lib/libdbsddisk.so -lib/libdbsddisk.so.1.0 lib/libdbsddisk.so.1 +lib/libdbsddisk.so.1.0 lib/libdbsddisk.so.1.0.0 lib/libdesktopbsd-ui.so -lib/libdesktopbsd-ui.so.1.0 lib/libdesktopbsd-ui.so.1 +lib/libdesktopbsd-ui.so.1.0 lib/libdesktopbsd-ui.so.1.0.0 lib/libdesktopbsd.so -lib/libdesktopbsd.so.1.0 lib/libdesktopbsd.so.1 +lib/libdesktopbsd.so.1.0 lib/libdesktopbsd.so.1.0.0 +sbin/dbsd-grubgen sbin/dbsd-portsnap -sbin/pkgdb_check share/applnk/Settings/Network/dbsdnetworking.desktop share/applnk/Settings/Peripherals/dbsddevinfo.desktop share/applnk/Settings/Peripherals/dbsddiskpart.desktop share/applnk/Settings/Peripherals/dbsdmount.desktop share/applnk/Settings/Security/dbsdusers.desktop +share/applnk/Settings/System/dbsdgrubconf.desktop share/applnk/Settings/System/dbsdpackages.desktop share/applnk/System/dbsd-pkgmgr.desktop +share/autostart/desktopbsd-tools.desktop +share/icons/hicolor/128x128/apps/dbsd-pppconf.png share/icons/hicolor/16x16/actions/ledgreen.png share/icons/hicolor/16x16/actions/ledorange.png share/icons/hicolor/16x16/actions/warning.png @@ -42,7 +44,14 @@ share/icons/hicolor/22x22/apps/dbsd-battinfo-power.png share/icons/hicolor/22x22/apps/dbsd-battinfo-recharge.png share/icons/hicolor/22x22/apps/dbsd-hwnotify.png share/icons/hicolor/22x22/apps/dbsd-nettray.png +share/icons/hicolor/22x22/apps/dbsd-pkg-notify.png +share/icons/hicolor/22x22/apps/dbsd-pkg-working.png +share/icons/hicolor/22x22/apps/dbsd-pkg.png share/icons/hicolor/32x32/apps/desktopbsd.png +share/icons/hicolor/64x64/apps/desktopbsd.png +%%DATADIR%%/images/pkgmgr-splash.png +%%DATADIR%%/mpd-templates/mpd.conf.tmpl +%%DATADIR%%/mpd-templates/mpd.links.tmpl %%DATADIR%%/translations/desktopbsd.blank.qm %%DATADIR%%/translations/desktopbsd.cs.qm %%DATADIR%%/translations/desktopbsd.da.qm @@ -52,16 +61,20 @@ share/icons/hicolor/32x32/apps/desktopbsd.png %%DATADIR%%/translations/desktopbsd.hr.qm %%DATADIR%%/translations/desktopbsd.hu.qm %%DATADIR%%/translations/desktopbsd.it.qm +%%DATADIR%%/translations/desktopbsd.ko.qm %%DATADIR%%/translations/desktopbsd.nb.qm %%DATADIR%%/translations/desktopbsd.nl.qm %%DATADIR%%/translations/desktopbsd.pl.qm %%DATADIR%%/translations/desktopbsd.pt.qm %%DATADIR%%/translations/desktopbsd.pt_BR.qm %%DATADIR%%/translations/desktopbsd.ru.qm +%%DATADIR%%/translations/desktopbsd.sk.qm %%DATADIR%%/translations/desktopbsd.sv.qm +%%DATADIR%%/translations/desktopbsd.tr.qm +%%DATADIR%%/translations/desktopbsd.vi.qm %%DATADIR%%/translations/desktopbsd.zh_CN.qm %%DATADIR%%/translations/locale-map -%%DATADIR%%/images/pkgmgr-splash.png @dirrm %%DATADIR%%/images +@dirrm %%DATADIR%%/mpd-templates @dirrm %%DATADIR%%/translations @dirrm %%DATADIR%% |