diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-11-24 16:03:20 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-11-24 16:03:20 +0800 |
commit | 7343f6736acd15aa13bca5d6b504d47c82dc3c40 (patch) | |
tree | fcc4745b888fc07b6120013b96bf78ee65db39b2 | |
parent | 05c7eaf32a58c35c2e91261ae162faa25fa22de2 (diff) | |
download | marcuscom-ports-7343f6736acd15aa13bca5d6b504d47c82dc3c40.tar marcuscom-ports-7343f6736acd15aa13bca5d6b504d47c82dc3c40.tar.gz marcuscom-ports-7343f6736acd15aa13bca5d6b504d47c82dc3c40.tar.bz2 marcuscom-ports-7343f6736acd15aa13bca5d6b504d47c82dc3c40.tar.lz marcuscom-ports-7343f6736acd15aa13bca5d6b504d47c82dc3c40.tar.xz marcuscom-ports-7343f6736acd15aa13bca5d6b504d47c82dc3c40.tar.zst marcuscom-ports-7343f6736acd15aa13bca5d6b504d47c82dc3c40.zip |
Add support for the FreeBSD "distro". This makes the new overview tab
in g-s-m much more informative on FreeBSD.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@7947 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | sysutils/gnome-system-monitor/Makefile | 3 | ||||
-rw-r--r-- | sysutils/gnome-system-monitor/files/patch-src_sysinfo.cpp | 53 |
2 files changed, 55 insertions, 1 deletions
diff --git a/sysutils/gnome-system-monitor/Makefile b/sysutils/gnome-system-monitor/Makefile index bb067e44b..50986cc6b 100644 --- a/sysutils/gnome-system-monitor/Makefile +++ b/sysutils/gnome-system-monitor/Makefile @@ -3,11 +3,12 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/sysutils/gnome-system-monitor/Makefile,v 1.76 2006/10/02 23:31:11 ahze Exp $ +# $MCom: ports/sysutils/gnome-system-monitor/Makefile,v 1.78 2006/11/09 21:10:22 marcus Exp $ # PORTNAME= gnome-system-monitor PORTVERSION= 2.17.2.1 +PORTREVISION= 1 CATEGORIES= sysutils gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gnome-system-monitor/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} diff --git a/sysutils/gnome-system-monitor/files/patch-src_sysinfo.cpp b/sysutils/gnome-system-monitor/files/patch-src_sysinfo.cpp new file mode 100644 index 000000000..85d231bb2 --- /dev/null +++ b/sysutils/gnome-system-monitor/files/patch-src_sysinfo.cpp @@ -0,0 +1,53 @@ +--- sysinfo.cpp.orig Fri Nov 24 02:41:14 2006 ++++ sysinfo.cpp Fri Nov 24 02:54:59 2006 +@@ -11,6 +11,9 @@ + #include <unistd.h> + #include <netdb.h> + #include <sys/socket.h> ++#ifdef __FreeBSD__ ++#include <sys/utsname.h> ++#endif + + #include <string> + #include <vector> +@@ -140,16 +143,39 @@ namespace { + } + }; + ++ class FreeBSDSysInfo ++ : public SysInfo ++ { ++ public: ++ FreeBSDSysInfo() ++ : SysInfo("FreeBSD") ++ { ++ this->load_freebsd_info(); ++ } ++ ++ private: ++ void load_freebsd_info() ++ { ++ struct utsname name; ++ ++ uname(&name); ++ ++ this->distro_version = name.release; ++ } ++ }; + + SysInfo* get_sysinfo() + { + if (g_file_test("/etc/debian_version", G_FILE_TEST_EXISTS)) + return new DebianSysInfo; + else ++#ifdef __FreeBSD__ ++ return new FreeBSDSysInfo; ++#else + return new SysInfo(_("Unknown distro")); ++#endif + } + } +- + + GtkWidget * + procman_create_sysinfo_view(void) |