mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-11 02:50:24 +00:00
Update to 2.10
Add patches to remove support for pulseaudio
This commit is contained in:
parent
77767d1b95
commit
ecf94441cc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=405867
@ -1,8 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= i3status
|
||||
PORTVERSION= 2.8
|
||||
PORTREVISION= 5
|
||||
PORTVERSION= 2.10
|
||||
CATEGORIES= x11
|
||||
MASTER_SITES= http://i3wm.org/i3status/
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (i3status-2.8.tar.bz2) = ab06c5dd454354e6fc64354082616115082b70dc3906361bce5a02beb0f807fe
|
||||
SIZE (i3status-2.8.tar.bz2) = 40422
|
||||
SHA256 (i3status-2.10.tar.bz2) = daf5d07611b054a43da1a3d28850b05e2dbdbd6d25fd5e25ede98bb1b66e2791
|
||||
SIZE (i3status-2.10.tar.bz2) = 53684
|
||||
|
14
x11/i3status/files/patch-Makefile
Normal file
14
x11/i3status/files/patch-Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
--- Makefile.orig 2016-01-12 12:26:06 UTC
|
||||
+++ Makefile
|
||||
@@ -75,6 +75,11 @@ OBJS:=$(filter-out src/pulse.o, $(OBJS))
|
||||
LIBS:=$(filter-out -lpulse, $(LIBS)) -lpthread
|
||||
endif
|
||||
|
||||
+ifeq ($(OS),FreeBSD)
|
||||
+OBJS:=$(filter-out src/pulse.o, $(OBJS))
|
||||
+LIBS:=$(filter-out -lpulse, $(LIBS)) -lpthread
|
||||
+endif
|
||||
+
|
||||
src/%.o: src/%.c include/i3status.h
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
||||
@echo " CC $<"
|
@ -1,28 +0,0 @@
|
||||
--- src/print_battery_info.c.orig 2014-01-05 03:34:07.000000000 -0800
|
||||
+++ src/print_battery_info.c 2015-10-08 13:33:45.452887000 -0700
|
||||
@@ -12,6 +12,7 @@
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
+#include <dev/acpica/acpiio.h>
|
||||
#endif
|
||||
|
||||
#if defined(__OpenBSD__)
|
||||
@@ -215,7 +216,7 @@ void print_battery_info(yajl_gen json_ge
|
||||
state = sysctl_rslt;
|
||||
if (state == 0 && present_rate == 100)
|
||||
status = CS_FULL;
|
||||
- else if (state == 0 && present_rate < 100)
|
||||
+ else if ((state & ACPI_BATT_STAT_CHARGING) && present_rate < 100)
|
||||
status = CS_CHARGING;
|
||||
else
|
||||
status = CS_DISCHARGING;
|
||||
@@ -227,7 +228,7 @@ void print_battery_info(yajl_gen json_ge
|
||||
(void)snprintf(percentagebuf, sizeof(percentagebuf), "%02d%%",
|
||||
present_rate);
|
||||
|
||||
- if (state == 1) {
|
||||
+ if (state == ACPI_BATT_STAT_DISCHARG) {
|
||||
int hours, minutes;
|
||||
minutes = remaining;
|
||||
hours = minutes / 60;
|
@ -1,45 +0,0 @@
|
||||
--- src/print_eth_info.c.orig 2015-08-11 09:37:31.470359000 -0700
|
||||
+++ src/print_eth_info.c 2015-08-11 10:12:38.744033000 -0700
|
||||
@@ -21,8 +21,6 @@
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||
#include <net/if_media.h>
|
||||
-#define IFM_TYPE_MATCH(dt, t) \
|
||||
- (IFM_TYPE((dt)) == 0 || IFM_TYPE((dt)) == IFM_TYPE((t)))
|
||||
|
||||
#define PART_ETHSPEED "E: %s (%s)"
|
||||
#endif
|
||||
@@ -52,19 +50,29 @@
|
||||
struct ifmediareq ifm;
|
||||
(void)memset(&ifm, 0, sizeof(ifm));
|
||||
(void)strncpy(ifm.ifm_name, interface, sizeof(ifm.ifm_name));
|
||||
- int ret = ioctl(general_socket, SIOCGIFMEDIA, (caddr_t)&ifm);
|
||||
+ int ret;
|
||||
+#ifdef SIOCGIFXMEDIA
|
||||
+ ret = ioctl(general_socket, SIOCGIFXMEDIA, (caddr_t)&ifm);
|
||||
+ if (ret < 0)
|
||||
+#endif
|
||||
+ ret = ioctl(general_socket, SIOCGIFMEDIA, (caddr_t)&ifm);
|
||||
+ if (ret < 0)
|
||||
+ return sprintf(outwalk, "?");
|
||||
|
||||
/* Get the description of the media type, partially taken from
|
||||
* FreeBSD's ifconfig */
|
||||
const struct ifmedia_description *desc;
|
||||
- struct ifmedia_description ifm_subtype_descriptions[] =
|
||||
+ static struct ifmedia_description ifm_subtype_descriptions[] =
|
||||
IFM_SUBTYPE_ETHERNET_DESCRIPTIONS;
|
||||
|
||||
+ if (IFM_TYPE(ifm.ifm_active) != IFM_ETHER)
|
||||
+ return sprintf(outwalk, "?");
|
||||
+ if (ifm.ifm_status & IFM_AVALID && !(ifm.ifm_status & IFM_ACTIVE))
|
||||
+ return sprintf(outwalk, "no carrier");
|
||||
for (desc = ifm_subtype_descriptions;
|
||||
desc->ifmt_string != NULL;
|
||||
desc++) {
|
||||
- if (IFM_TYPE_MATCH(desc->ifmt_word, ifm.ifm_active) &&
|
||||
- IFM_SUBTYPE(desc->ifmt_word) == IFM_SUBTYPE(ifm.ifm_active))
|
||||
+ if (desc->ifmt_word == IFM_SUBTYPE(ifm.ifm_active))
|
||||
break;
|
||||
}
|
||||
ethspeed = (desc->ifmt_string != NULL ? desc->ifmt_string : "?");
|
@ -1,75 +0,0 @@
|
||||
--- src/print_wireless_info.c.orig 2014-01-05 03:34:06.000000000 -0800
|
||||
+++ src/print_wireless_info.c 2015-08-13 20:12:29.854380000 -0700
|
||||
@@ -193,10 +193,14 @@ static int get_wireless_info(const char
|
||||
return 1;
|
||||
#endif
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
- int s, len, inwid;
|
||||
- uint8_t buf[24 * 1024], *cp;
|
||||
+ int s, inwid;
|
||||
+ union {
|
||||
+ struct ieee80211req_sta_req req;
|
||||
+ uint8_t buf[24 * 1024];
|
||||
+ } u;
|
||||
struct ieee80211req na;
|
||||
- char network_id[IEEE80211_NWID_LEN + 1];
|
||||
+ char bssid[IEEE80211_ADDR_LEN];
|
||||
+ size_t len;
|
||||
|
||||
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
|
||||
return (0);
|
||||
@@ -224,31 +228,38 @@ static int get_wireless_info(const char
|
||||
|
||||
memset(&na, 0, sizeof(na));
|
||||
strlcpy(na.i_name, interface, sizeof(na.i_name));
|
||||
- na.i_type = IEEE80211_IOC_SCAN_RESULTS;
|
||||
- na.i_data = buf;
|
||||
- na.i_len = sizeof(buf);
|
||||
+ na.i_type = IEEE80211_IOC_BSSID;
|
||||
+ na.i_data = bssid;
|
||||
+ na.i_len = sizeof(bssid);
|
||||
+
|
||||
+ if (ioctl(s, SIOCG80211, (caddr_t)&na) == -1) {
|
||||
+ close(s);
|
||||
+ return (0);
|
||||
+ }
|
||||
+
|
||||
+ memcpy(u.req.is_u.macaddr, bssid, sizeof(bssid));
|
||||
+ memset(&na, 0, sizeof(na));
|
||||
+ strlcpy(na.i_name, interface, sizeof(na.i_name));
|
||||
+ na.i_type = IEEE80211_IOC_STA_INFO;
|
||||
+ na.i_data = &u;
|
||||
+ na.i_len = sizeof(u);
|
||||
|
||||
if (ioctl(s, SIOCG80211, (caddr_t)&na) == -1) {
|
||||
- printf("fail\n");
|
||||
close(s);
|
||||
return (0);
|
||||
}
|
||||
|
||||
close(s);
|
||||
- len = na.i_len;
|
||||
- cp = buf;
|
||||
- struct ieee80211req_scan_result *sr;
|
||||
- uint8_t *vp;
|
||||
- sr = (struct ieee80211req_scan_result *)cp;
|
||||
- vp = (u_int8_t *)(sr + 1);
|
||||
- strlcpy(network_id, (const char *)vp, sr->isr_ssid_len + 1);
|
||||
- if (!strcmp(network_id, &info->essid[0])) {
|
||||
- info->signal_level = sr->isr_rssi;
|
||||
+ if (na.i_len >= sizeof(u.req)) {
|
||||
+ /*
|
||||
+ * Just use the first BSSID returned even if there are
|
||||
+ * multiple APs sharing the same BSSID.
|
||||
+ */
|
||||
+ info->signal_level = u.req.info[0].isi_rssi / 2 +
|
||||
+ u.req.info[0].isi_noise;
|
||||
info->flags |= WIRELESS_INFO_FLAG_HAS_SIGNAL;
|
||||
- info->noise_level = sr->isr_noise;
|
||||
+ info->noise_level = u.req.info[0].isi_noise;
|
||||
info->flags |= WIRELESS_INFO_FLAG_HAS_NOISE;
|
||||
- info->quality = sr->isr_intval;
|
||||
- info->flags |= WIRELESS_INFO_FLAG_HAS_QUALITY;
|
||||
}
|
||||
|
||||
return 1;
|
11
x11/i3status/files/patch-src_print__volume.c
Normal file
11
x11/i3status/files/patch-src_print__volume.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/print_volume.c.orig 2016-01-12 12:27:47 UTC
|
||||
+++ src/print_volume.c
|
||||
@@ -60,7 +60,7 @@ void print_volume(yajl_gen json_gen, cha
|
||||
free(instance);
|
||||
}
|
||||
|
||||
-#ifndef __OpenBSD__
|
||||
+#if !defined(__OPENBSD__) && !defined(__FreeBSD__)
|
||||
/* Try PulseAudio first */
|
||||
|
||||
/* If the device name has the format "pulse[:N]" where N is the
|
Loading…
Reference in New Issue
Block a user