summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Buchholz <rbu@gentoo.org>2008-08-18 19:15:57 +0000
committerRobert Buchholz <rbu@gentoo.org>2008-08-18 19:15:57 +0000
commit44ca51520f0204dc44095bd480ac4754b8b2858b (patch)
treee95bd758bb8f816f08414650c7f81484242a82b9
parentRemove old xen stuff (diff)
downloadoverlay-44ca51520f0204dc44095bd480ac4754b8b2858b.tar.gz
overlay-44ca51520f0204dc44095bd480ac4754b8b2858b.tar.bz2
overlay-44ca51520f0204dc44095bd480ac4754b8b2858b.zip
NetworkManager 0.7 SVN snapshot
svn path=/overlay/; revision=30
-rw-r--r--net-misc/networkmanager/Manifest35
-rw-r--r--net-misc/networkmanager/files/digest-networkmanager-0.7.0_pre200706273
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.6.5-confchanges.patch21
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.7.0-confchanges.patch13
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.7.0-resolvconf-perms.patch20
-rw-r--r--net-misc/networkmanager/files/networkmanager-resolvconf-perms.patch19
-rw-r--r--net-misc/networkmanager/files/networkmanager-updatedbackend.patch657
-rw-r--r--net-misc/networkmanager/files/networkmanager-use-kernel-headers.patch12
-rw-r--r--net-misc/networkmanager/networkmanager-0.7.0_pre20070627.ebuild85
-rw-r--r--net-misc/networkmanager/networkmanager-0.7.0_pre20080817.ebuild116
-rw-r--r--net-misc/networkmanager/networkmanager-9999.ebuild90
11 files changed, 244 insertions, 827 deletions
diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
index ba1be88..4b3a6b4 100644
--- a/net-misc/networkmanager/Manifest
+++ b/net-misc/networkmanager/Manifest
@@ -1,32 +1,7 @@
-AUX networkmanager-0.6.5-confchanges.patch 1053 RMD160 ae76d5c029090848a9264e7559aaab90e7f3c084 SHA1 4847532aa15316a1a45e8667cd7947b514a1833f SHA256 bf3418ccbf8643d14b0413cf7a9d25290003d4443a7a051bb54f953aebede84f
-MD5 2cfcac9ab61c3c267a91b32a05874c57 files/networkmanager-0.6.5-confchanges.patch 1053
-RMD160 ae76d5c029090848a9264e7559aaab90e7f3c084 files/networkmanager-0.6.5-confchanges.patch 1053
-SHA256 bf3418ccbf8643d14b0413cf7a9d25290003d4443a7a051bb54f953aebede84f files/networkmanager-0.6.5-confchanges.patch 1053
+AUX networkmanager-0.7.0-confchanges.patch 594 RMD160 c70c7d32722aa8f1ebf62b0382fad56c7d8e21d4 SHA1 35706e9807e923732e3ac1db9c1e7d7a9f0bcc8f SHA256 ffd4fdf452a5791d938406d33b432aff591ab7e475583a66343a5c98ee6091af
+AUX networkmanager-0.7.0-resolvconf-perms.patch 559 RMD160 b54ec431e9050176845dcb705a6a667b034a150f SHA1 a6e2f26d320aff3c284b7e5be1908d8b0b935a45 SHA256 92fd3e269e6e9f4b2060418e0fd898f248c620648e59b3d699f1c4733418a481
AUX networkmanager-0.7.0_pre20070627-updatedbackend.patch 17941 RMD160 343abd3b8a35b7373a5651e7ec8fb10342eb36d7 SHA1 63c7dccf7ed31fb465d57db84e33e08488031dfe SHA256 89ccb2dfc05cdb2ee9bca558f661f30b6923f81b9bd7e2999c61880461b14826
-MD5 9eecb4a9509ca6fcf8d9a5eb1fbf002f files/networkmanager-0.7.0_pre20070627-updatedbackend.patch 17941
-RMD160 343abd3b8a35b7373a5651e7ec8fb10342eb36d7 files/networkmanager-0.7.0_pre20070627-updatedbackend.patch 17941
-SHA256 89ccb2dfc05cdb2ee9bca558f661f30b6923f81b9bd7e2999c61880461b14826 files/networkmanager-0.7.0_pre20070627-updatedbackend.patch 17941
-AUX networkmanager-resolvconf-perms.patch 532 RMD160 453ce19560e1872d1da1fa48e0c9a365025e6b1b SHA1 a81be4e9c9bac854e092b82529c4ae2c12cdf91c SHA256 e1786f34a75d2e0a27ceccb960cf975176260886f70cc3e9b172180f8a1d2e6e
-MD5 785dfadfffc8dc7119ea16c1ba3aa6d9 files/networkmanager-resolvconf-perms.patch 532
-RMD160 453ce19560e1872d1da1fa48e0c9a365025e6b1b files/networkmanager-resolvconf-perms.patch 532
-SHA256 e1786f34a75d2e0a27ceccb960cf975176260886f70cc3e9b172180f8a1d2e6e files/networkmanager-resolvconf-perms.patch 532
-AUX networkmanager-updatedbackend.patch 17700 RMD160 685132b4a98843416264f06c480ff205fa87f789 SHA1 a83d2b0ea7e4a563af3d14567ba1da3605fbf654 SHA256 ee4a1583db867fd6a1851a9dd243401166f29ee9d00ad6e03e5b677915e5bf43
-MD5 30c025bce7a637f37cb74ef44d848164 files/networkmanager-updatedbackend.patch 17700
-RMD160 685132b4a98843416264f06c480ff205fa87f789 files/networkmanager-updatedbackend.patch 17700
-SHA256 ee4a1583db867fd6a1851a9dd243401166f29ee9d00ad6e03e5b677915e5bf43 files/networkmanager-updatedbackend.patch 17700
-AUX networkmanager-use-kernel-headers.patch 466 RMD160 cd16279966d4e3594a20aa0b89d08f3baa3c2e58 SHA1 a9e269c9021888ca058b9fb72f9a71dc25a7488b SHA256 952948f41676fafcf76210cbef46728cbb219d6c851d5417d892b984fd725402
-MD5 e9879921dd5b0669337e27ca2196cfd4 files/networkmanager-use-kernel-headers.patch 466
-RMD160 cd16279966d4e3594a20aa0b89d08f3baa3c2e58 files/networkmanager-use-kernel-headers.patch 466
-SHA256 952948f41676fafcf76210cbef46728cbb219d6c851d5417d892b984fd725402 files/networkmanager-use-kernel-headers.patch 466
-DIST NetworkManager-0.7.0_pre20070627.tar.gz 1056932 RMD160 088ecbf8ca416bfece76dd1e4d85afd9e389848b SHA1 bf7edf6070fc8036096006e82f0101add2deefdf SHA256 f831920a7b8c5e3c6ed9af63a66f22edf41c34eac0846773324e74544610f316
-EBUILD networkmanager-0.7.0_pre20070627.ebuild 2457 RMD160 db1d70a037764e40203277716d84203ff64044b9 SHA1 1b5ca55ec4dca1872601867c5b23a5d3d25ce53a SHA256 9ab745a07f23f30a4a3a8aec56637bfa7cc2bd3636a50122117542fe0cf9f380
-MD5 f57586de1a98af00dce2c600f00a6163 networkmanager-0.7.0_pre20070627.ebuild 2457
-RMD160 db1d70a037764e40203277716d84203ff64044b9 networkmanager-0.7.0_pre20070627.ebuild 2457
-SHA256 9ab745a07f23f30a4a3a8aec56637bfa7cc2bd3636a50122117542fe0cf9f380 networkmanager-0.7.0_pre20070627.ebuild 2457
+DIST NetworkManager-0.7.0_pre20080817.tar.bz2 987249 RMD160 72233760f9c3a92eed029e122dad996d0a07361e SHA1 c6278980c6c321645415720c6e85ea76eec46f78 SHA256 aebb0341a5843b1f129e38b3264052382f8dd314af478f8542bf81b29f33f80c
+EBUILD networkmanager-0.7.0_pre20080817.ebuild 3007 RMD160 27ddf05a2699f8532fd9349200b7c072ebb30eb0 SHA1 3ec219b65c0381d47914c9877b5049a3348cb367 SHA256 8af6a9f60ea6673eee4d72e19595bdca23ce146a3a77b40adb4738c3d6015e7a
+EBUILD networkmanager-9999.ebuild 2279 RMD160 68d729e9d16b793902f690ddcd6b8383fd01cceb SHA1 b04f932f8b8b55f47ac5850adaf3c7263ab828e1 SHA256 5cfddaa3a8f6a1c3fb0f89fa49d3eb12b0a367a906514542c98dcac5a79c027d
MISC metadata.xml 881 RMD160 8608a638e5bffd8305d41bf8d09334456cbbe38a SHA1 43e6a124de8058a738d8b2562e9dd8b36983dc13 SHA256 a59e53d5e665e795ce8da297eb0c63ab2a52b88025eb83d968b370b727d83967
-MD5 cde19aea2ad5bbd47a8660b625acbd60 metadata.xml 881
-RMD160 8608a638e5bffd8305d41bf8d09334456cbbe38a metadata.xml 881
-SHA256 a59e53d5e665e795ce8da297eb0c63ab2a52b88025eb83d968b370b727d83967 metadata.xml 881
-MD5 ca1329ea43ac13dfaff35a2ea2a28e76 files/digest-networkmanager-0.7.0_pre20070627 301
-RMD160 4be01818633f5fb780084696ecde6e4ca5c984b0 files/digest-networkmanager-0.7.0_pre20070627 301
-SHA256 fcf59a00a4ee405da77597895d7df804c29dc4384f5bd5765ce65fcf00eb4a13 files/digest-networkmanager-0.7.0_pre20070627 301
diff --git a/net-misc/networkmanager/files/digest-networkmanager-0.7.0_pre20070627 b/net-misc/networkmanager/files/digest-networkmanager-0.7.0_pre20070627
deleted file mode 100644
index 16d45b7..0000000
--- a/net-misc/networkmanager/files/digest-networkmanager-0.7.0_pre20070627
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 3670da6d1a3c4c4f11b0ce5c0fa4f0a9 NetworkManager-0.7.0_pre20070627.tar.gz 1056932
-RMD160 088ecbf8ca416bfece76dd1e4d85afd9e389848b NetworkManager-0.7.0_pre20070627.tar.gz 1056932
-SHA256 f831920a7b8c5e3c6ed9af63a66f22edf41c34eac0846773324e74544610f316 NetworkManager-0.7.0_pre20070627.tar.gz 1056932
diff --git a/net-misc/networkmanager/files/networkmanager-0.6.5-confchanges.patch b/net-misc/networkmanager/files/networkmanager-0.6.5-confchanges.patch
deleted file mode 100644
index 8969cda..0000000
--- a/net-misc/networkmanager/files/networkmanager-0.6.5-confchanges.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- src/NetworkManager.conf.orig 2006-10-28 04:43:50.426682976 +0100
-+++ src/NetworkManager.conf 2006-10-28 04:44:36.883620448 +0100
-@@ -8,14 +8,14 @@
- <allow send_destination="org.freedesktop.NetworkManager"/>
- <allow send_interface="org.freedesktop.NetworkManager"/>
- </policy>
-- <policy at_console="true">
-+ <policy group="plugdev">
- <allow send_destination="org.freedesktop.NetworkManager"/>
- <allow send_interface="org.freedesktop.NetworkManager"/>
- </policy>
- <policy context="default">
-- <deny own="org.freedesktop.NetworkManager"/>
-- <deny send_destination="org.freedesktop.NetworkManager"/>
-- <deny send_interface="org.freedesktop.NetworkManager"/>
-+ <allow own="org.freedesktop.NetworkManager"/>
-+ <allow send_destination="org.freedesktop.NetworkManager"/>
-+ <allow send_interface="org.freedesktop.NetworkManager"/>
- </policy>
- </busconfig>
-
diff --git a/net-misc/networkmanager/files/networkmanager-0.7.0-confchanges.patch b/net-misc/networkmanager/files/networkmanager-0.7.0-confchanges.patch
new file mode 100644
index 0000000..1372c12
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.7.0-confchanges.patch
@@ -0,0 +1,13 @@
+Index: src/NetworkManager.conf
+===================================================================
+--- src/NetworkManager.conf.orig
++++ src/NetworkManager.conf
+@@ -11,7 +11,7 @@
+ <allow send_destination="org.freedesktop.NetworkManager.PPP"/>
+ <allow send_interface="org.freedesktop.NetworkManager.PPP"/>
+ </policy>
+- <policy at_console="true">
++ <policy group="plugdev">
+ <allow send_destination="org.freedesktop.NetworkManager"/>
+ <allow send_interface="org.freedesktop.NetworkManager"/>
+ </policy>
diff --git a/net-misc/networkmanager/files/networkmanager-0.7.0-resolvconf-perms.patch b/net-misc/networkmanager/files/networkmanager-0.7.0-resolvconf-perms.patch
new file mode 100644
index 0000000..187d646
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.7.0-resolvconf-perms.patch
@@ -0,0 +1,20 @@
+Index: src/named-manager/nm-named-manager.c
+===================================================================
+--- src/named-manager/nm-named-manager.c.orig
++++ src/named-manager/nm-named-manager.c
+@@ -26,6 +26,7 @@
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <arpa/inet.h>
++#include <sys/stat.h>
+ #include <glib.h>
+
+ #include <glib/gi18n.h>
+@@ -304,6 +305,7 @@ rewrite_resolv_conf (NMNamedManager *mgr
+ g_strerror (errno));
+ } else {
+ nm_system_update_dns ();
++ chmod(RESOLV_CONF, S_IREAD | S_IWRITE | S_IRGRP | S_IROTH);
+ }
+ }
+
diff --git a/net-misc/networkmanager/files/networkmanager-resolvconf-perms.patch b/net-misc/networkmanager/files/networkmanager-resolvconf-perms.patch
deleted file mode 100644
index a76c419..0000000
--- a/net-misc/networkmanager/files/networkmanager-resolvconf-perms.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- src/named-manager/nm-named-manager.c.orig 2006-03-25 00:38:24.000000000 -0500
-+++ src/named-manager/nm-named-manager.c 2006-03-25 00:44:15.000000000 -0500
-@@ -31,6 +31,7 @@
- #include <resolv.h>
- #include <sys/socket.h>
- #include <sys/types.h>
-+#include <sys/stat.h>
- #include <arpa/inet.h>
- #include <syslog.h>
- #include <glib.h>
-@@ -396,6 +397,8 @@
- if (rename (tmp_resolv_conf, RESOLV_CONF) < 0)
- goto lose;
- nm_system_update_dns ();
-+
-+ chmod(RESOLV_CONF, S_IREAD | S_IWRITE | S_IRGRP | S_IROTH);
- return TRUE;
-
- lose:
diff --git a/net-misc/networkmanager/files/networkmanager-updatedbackend.patch b/net-misc/networkmanager/files/networkmanager-updatedbackend.patch
deleted file mode 100644
index 767284a..0000000
--- a/net-misc/networkmanager/files/networkmanager-updatedbackend.patch
+++ /dev/null
@@ -1,657 +0,0 @@
-Index: NetworkManager/trunk/src/backends/NetworkManagerGentoo.c
-===================================================================
---- NetworkManagerGentoo.c (revision 15)
-+++ NetworkManagerGentoo.c (revision 38)
-@@ -1,2 +1,3 @@
-+
- /* NetworkManager -- Network link manager
- *
-@@ -250,8 +251,20 @@
- */
- void nm_system_restart_mdns_responder (void)
--{
-- nm_spawn_process("/etc/init.d/mDNSResponder stop");
-- nm_spawn_process("/etc/init.d/mDNSResponder zap");
-- nm_spawn_process("/etc/init.d/mDNSResponder start");
-+{
-+ /* Check if the daemon was already running - do not start a new instance */
-+ /* Howl */
-+ if (g_file_test("/var/run/mDNSResponder.pid", G_FILE_TEST_EXISTS))
-+ {
-+ nm_info("Restarting mDNSResponder");
-+ nm_spawn_process("/etc/init.d/mDNSResponder stop");
-+ nm_spawn_process("/etc/init.d/mDNSResponder zap");
-+ nm_spawn_process("/etc/init.d/mDNSResponder start");
-+ }
-+ /* Apple's mDNSResponder */
-+ if (g_file_test("/var/run/mDNSResponderPosix.pid", G_FILE_TEST_EXISTS))
-+ {
-+ nm_info("Restarting mDNSResponderPosix");
-+ nm_spawn_process("/etc/init.d/mDNSResponderPosix restart");
-+ }
- }
-
-@@ -266,5 +279,4 @@
- {
- char *buf;
-- char *addr;
- struct ether_addr hw_addr;
- unsigned char eui[8];
-@@ -288,4 +300,258 @@
- g_free(buf);
- }
-+/* Get the array associated with the key, and leave the current pointer
-+ * pointing at the line containing the key. The char** returned MUST
-+ * be freed by the caller.
-+ */
-+gchar **
-+svGetArray(shvarFile *s, const char *key)
-+{
-+ gchar **values = NULL, **lines, *line, *value;
-+ GList *restore;
-+ int len, strvlen, i, j;
-+
-+ g_assert(s);
-+ g_assert(key);
-+
-+ /* Attempt to do things the easy way first */
-+ line = svGetValue(s, key);
-+ if (!line)
-+ return NULL;
-+
-+ restore = s->current;
-+
-+ g_strstrip(strtok(line, "#")); /* Remove comments and whitespace */
-+
-+ if (line[0] != '(')
-+ {
-+ /* This isn't an array, so pretend it's a one item array. */
-+ values = g_renew(char*, values, 2);
-+ values[0] = line;
-+ values[1] = NULL;
-+ return values;
-+ }
-+
-+ while(!strrchr(line, ')'))
-+ {
-+ s->current = s->current->next;
-+ value = g_strjoin(" ", line, g_strstrip(strtok(s->current->data, "#")), NULL);
-+ g_free(line);
-+ line = value;
-+ value = NULL;
-+ }
-+
-+ lines = g_strsplit(line, "\"", 0);
-+
-+ strvlen = g_strv_length(lines);
-+ if (strvlen == 0)
-+ {
-+ /* didn't split, something's wrong */
-+ g_free(line);
-+ return NULL;
-+ }
-+
-+ j = 0;
-+ for (i = 0; i <= strvlen - 1; i++)
-+ {
-+ value = lines[i];
-+ len = strlen(g_strstrip(value));
-+ if ((value[0] == '(') || (value[0] == ')') || (len == 0))
-+ continue;
-+
-+ values = g_renew(char*, values, j + 2);
-+ values[j+1] = NULL;
-+ values[j++] = g_strdup(value);
-+ }
-+
-+ g_free(line);
-+ g_strfreev(lines);
-+ s->current = restore;
-+
-+ return values;
-+}
-+
-+/*
-+* GentooReadConfig
-+*
-+* Most of this comes from the arch backend, no need to re-invent.
-+* Read platform dependant config file and fill hash with relevant info
-+*/
-+static GHashTable * GentooReadConfig(const char* dev)
-+{
-+ GHashTable *ifs;
-+ shvarFile *file;
-+ int len, hits, i = 0;
-+ guint32 maskval;
-+ gchar buf[16], *value, *cidrprefix, *gateway;
-+ gchar *config_str, *iface_str, *route_str, *mtu_str, *dnsserver_str, *dnssearch_str; /* Lookup keys */
-+ gchar **conf, **config = NULL, **routes = NULL;
-+ struct in_addr mask;
-+
-+ file = svNewFile(SYSCONFDIR"/conf.d/net");
-+ if (!file)
-+ return NULL;
-+
-+ ifs = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
-+ if (ifs == NULL)
-+ {
-+ nm_debug("Unable to create g_hash_table.");
-+ svCloseFile(file);
-+ return NULL;
-+ }
-+
-+ /* Keys we will use for lookups later */
-+ config_str = g_strdup_printf("config_%s", dev);
-+ iface_str = g_strdup_printf("iface_%s", dev);
-+ route_str = g_strdup_printf("routes_%s", dev);
-+ mtu_str = g_strdup_printf("mtu_%s", dev);
-+ dnsserver_str = g_strdup_printf("dns_servers_%s", dev);
-+ dnssearch_str = g_strdup_printf("dns_search_%s", dev);
-+
-+
-+ if ((config = svGetArray(file, iface_str)))
-+ {
-+ /* This isn't tested, (or supported, really) so hopefully it works */
-+ nm_info("You are using a deprecated configuration syntax for %s.", dev);
-+ nm_info("You are advised to read /etc/conf.d/net.example and upgrade it accordingly.");
-+ value = svGetValue(file, "gateway");
-+ if ((value) && (gateway = strstr(value, dev)) && strtok(gateway, "/"))
-+ {
-+ /* Is it possible to specify multiple gateways using this variable? */
-+ gateway = strtok(NULL, "/");
-+ routes = g_renew(char*, routes, 2);
-+ routes[0] = g_strdup_printf("default via %s", gateway);
-+ routes[1] = NULL;
-+ g_free(value);
-+ }
-+ }
-+ else
-+ {
-+ config = svGetArray(file, config_str);
-+ routes = svGetArray(file, route_str);
-+ }
-+
-+
-+ if ((config) && g_ascii_strcasecmp(config[0], "dhcp"))
-+ {
-+ nm_debug("Found %s in %s.", config_str, SYSCONFDIR"/conf.d/net");
-+
-+ if (!g_ascii_strcasecmp(config[0], "null"))
-+ {
-+ nm_debug("Config disables device %s.", dev);
-+ g_hash_table_insert(ifs, g_strdup("disabled"), g_strdup("true"));
-+ }
-+ else
-+ {
-+ /* TODO: Handle "noop". */
-+ conf = g_strsplit(config[0], " ", 0);
-+ hits = g_strv_length(conf);
-+
-+ strtok(conf[0], "/");
-+ if ((cidrprefix = strtok(NULL, "/")))
-+ {
-+ maskval = 0xffffffff;
-+ maskval <<= (32 - atoi(cidrprefix));
-+ mask.s_addr = htonl(maskval);
-+ g_hash_table_insert(ifs, g_strdup("netmask"), g_strdup(inet_ntoa(mask)));
-+ }
-+
-+
-+ if ((hits > 0) && inet_aton(conf[0], &mask))
-+ {
-+ g_hash_table_insert(ifs, g_strdup(dev), g_strdup(conf[i++]));
-+ while ((hits -= 2) > 0)
-+ {
-+ g_hash_table_insert(ifs, g_strdup(conf[i]), g_strdup(conf[i+1]));
-+ i += 2;
-+ }
-+ }
-+ else
-+ {
-+ nm_debug("Unhandled configuration. Switching to DHCP.");
-+ nm_debug("\t%s = %s", config_str, config[0]);
-+ g_hash_table_insert(ifs, g_strdup("dhcp"), g_strdup("true"));
-+ }
-+ g_strfreev(conf);
-+ }
-+ }
-+ else
-+ {
-+ nm_debug("Enabling DHCP for device %s.", dev);
-+ g_hash_table_insert(ifs, g_strdup("dhcp"), g_strdup("true"));
-+ }
-+
-+ g_strfreev(config);
-+
-+ if (routes)
-+ {
-+ nm_debug("Found %s in config.", route_str);
-+
-+ len = g_strv_length(routes);
-+ for (i = 0; i < len; i++)
-+ {
-+ if (!sscanf(routes[i], "default via %[0-9.:]", buf))
-+ continue;
-+
-+ g_hash_table_insert(ifs,g_strdup("gateway"),g_strdup( (char*) buf));
-+ }
-+ }
-+
-+ g_strfreev(routes);
-+
-+ if ((value = svGetValue(file, mtu_str)))
-+ {
-+ nm_debug("Found %s in config.", mtu_str);
-+ g_hash_table_insert(ifs, g_strdup("mtu"), g_strdup(value));
-+ }
-+
-+ g_free(value);
-+
-+ if (!(value = svGetValue(file, dnsserver_str)))
-+ {
-+ value = svGetValue(file, "dns_servers");
-+ }
-+ if (value)
-+ {
-+ nm_debug("Found DNS nameservers in config.");
-+ g_hash_table_insert(ifs, g_strdup("nameservers"), g_strdup(value));
-+ }
-+
-+ g_free(value);
-+
-+ if (!(value = svGetValue(file, dnssearch_str)))
-+ {
-+ value = svGetValue(file, "dns_search");
-+ }
-+ if (value)
-+ {
-+ nm_debug("Found DNS search in config.");
-+ g_hash_table_insert(ifs, g_strdup("dnssearch"), g_strdup(value));
-+ }
-+
-+ g_free(value);
-+ svCloseFile(file);
-+
-+ if ((file = svNewFile(SYSCONFDIR"/conf.d/hostname")))
-+ {
-+ if ((value = svGetValue(file, "HOSTNAME")) && (strlen(value) > 0))
-+ {
-+ nm_debug("Found hostname.");
-+ g_hash_table_insert(ifs, g_strdup("hostname"), g_strdup(value));
-+ }
-+
-+ g_free(value);
-+ svCloseFile(file);
-+ }
-+
-+
-+ g_free(config_str);
-+ g_free(iface_str);
-+ g_free(route_str);
-+ g_free(mtu_str);
-+ g_free(dnsserver_str);
-+ g_free(dnssearch_str);
-+
-+ return ifs;
-+}
-
- typedef struct GentooSystemConfigData
-@@ -293,6 +559,7 @@
- NMIP4Config * config;
- gboolean use_dhcp;
-+ gboolean system_disabled;
-+ guint32 mtu;
- } GentooSystemConfigData;
--
-
- /*
-@@ -304,133 +571,172 @@
- *
- */
--void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
--{
-- char *cfg_file_path = NULL;
-- FILE *file = NULL;
-- char buffer[100];
-- char confline[100], dhcpline[100], ipline[100];
-- int ipa, ipb, ipc, ipd;
-- int nNext = 0, bNext = 0, count = 0;
-- char *confToken;
-- gboolean data_good = FALSE;
-- gboolean use_dhcp = TRUE;
-- GentooSystemConfigData *sys_data = NULL;
-- guint32 ip4_address = 0;
-- guint32 ip4_netmask = 0;
-- guint32 ip4_gateway = 0;
-- guint32 ip4_broadcast = 0;
--
-- g_return_val_if_fail (dev != NULL, NULL);
--
-- sys_data = g_malloc0 (sizeof (GentooSystemConfigData));
-- sys_data->config = nm_device_get_ip4_config(dev);
-- /* We use DHCP on an interface unless told not to */
-+void* nm_system_device_get_system_config (NMDevice * dev, NMData *app_data)
-+{
-+ GHashTable* ifh;
-+ gpointer val;
-+ gchar **strarr;
-+ GentooSystemConfigData* sys_data = NULL;
-+ int len, i;
-+
-+ g_return_val_if_fail(dev != NULL, NULL);
-+
-+ sys_data = g_malloc0(sizeof (GentooSystemConfigData));
- sys_data->use_dhcp = TRUE;
-- nm_device_set_use_dhcp (dev, TRUE);
--// nm_ip4_config_set_address (sys_data->config, 0);
--// nm_ip4_config_set_gateway (sys_data->config, 0);
--// nm_ip4_config_set_netmask (sys_data->config, 0);
--
-- /* Gentoo systems store this information in
-- * /etc/conf.d/net, this is for all interfaces.
-- */
--
-- cfg_file_path = g_strdup_printf ("/etc/conf.d/net");
-- if (!cfg_file_path)
-+ sys_data->system_disabled = FALSE;
-+ sys_data->mtu = 0;
-+ sys_data->config=NULL;
-+
-+ ifh = GentooReadConfig(nm_device_get_iface(dev));
-+ if (ifh == NULL)
-+ {
-+ g_free(sys_data);
- return NULL;
--
-- if (!(file = fopen (cfg_file_path, "r")))
-- {
-- g_free (cfg_file_path);
-- return NULL;
-- }
-- sprintf(confline, "iface_%s", nm_device_get_iface (dev));
-- sprintf(dhcpline, "iface_%s=\"dhcp\"", nm_device_get_iface (dev));
-- while (fgets (buffer, 499, file) && !feof (file))
-- {
-- /* Kock off newline if any */
-- g_strstrip (buffer);
--
-- if (strncmp (buffer, confline, strlen(confline)) == 0)
-+ }
-+
-+ val = g_hash_table_lookup(ifh, "disabled");
-+ if (val)
-+ {
-+ if (!strcasecmp (val, "true"))
-+ {
-+ nm_info ("System configuration disables device %s", nm_device_get_iface (dev));
-+ sys_data->system_disabled = TRUE;
-+ }
-+ }
-+
-+ val = g_hash_table_lookup(ifh, "mtu");
-+ if (val)
-+ {
-+ guint32 mtu;
-+
-+ mtu = strtoul(val, NULL, 10);
-+ if (mtu > 500 && mtu < INT_MAX)
-+ {
-+ nm_debug("System configuration specifies a MTU of %i for device %s", mtu, nm_device_get_iface(dev));
-+ sys_data->mtu = mtu;
-+ }
-+ }
-+ val = g_hash_table_lookup(ifh, "hostname");
-+ if (val)
-+ {
-+ nm_ip4_config_set_hostname(sys_data->config, val);
-+ }
-+
-+ val = g_hash_table_lookup(ifh, nm_device_get_iface(dev));
-+ if (val && !g_hash_table_lookup(ifh, "dhcp"))
-+ {
-+ /* This device does not use DHCP */
-+
-+ sys_data->use_dhcp=FALSE;
-+ sys_data->config = nm_ip4_config_new();
-+
-+ nm_ip4_config_set_address (sys_data->config, inet_addr (val));
-+
-+ val = g_hash_table_lookup(ifh, "gateway");
-+ if (val)
-+ nm_ip4_config_set_gateway (sys_data->config, inet_addr (val));
-+ else
-+ {
-+ nm_info ("Network configuration for device '%s' does not specify a gateway but is "
-+ "statically configured (non-DHCP).", nm_device_get_iface (dev));
-+ }
-+
-+ val = g_hash_table_lookup(ifh, "netmask");
-+ if (val)
-+ nm_ip4_config_set_netmask (sys_data->config, inet_addr (val));
-+ else
-+ {
-+ guint32 addr = nm_ip4_config_get_address (sys_data->config);
-+
-+ /* Make a default netmask if we have an IP address */
-+ if (((ntohl (addr) & 0xFF000000) >> 24) <= 127)
-+ nm_ip4_config_set_netmask (sys_data->config, htonl (0xFF000000));
-+ else if (((ntohl (addr) & 0xFF000000) >> 24) <= 191)
-+ nm_ip4_config_set_netmask (sys_data->config, htonl (0xFFFF0000));
-+ else
-+ nm_ip4_config_set_netmask (sys_data->config, htonl (0xFFFFFF00));
-+ }
-+
-+ val = g_hash_table_lookup(ifh, "broadcast");
-+ if (val)
-+ nm_ip4_config_set_broadcast (sys_data->config, inet_addr (val));
-+ else if ((val = g_hash_table_lookup(ifh, "brd")))
-+ nm_ip4_config_set_broadcast (sys_data->config, inet_addr (val));
-+ else
-+ {
-+ guint32 broadcast = ((nm_ip4_config_get_address (sys_data->config) & nm_ip4_config_get_netmask (sys_data->config))
-+ | ~nm_ip4_config_get_netmask (sys_data->config));
-+ nm_ip4_config_set_broadcast (sys_data->config, broadcast);
-+ }
-+
-+ val = g_hash_table_lookup(ifh, "nameservers");
-+ if (val)
-+ {
-+ nm_debug("Using DNS nameservers \"%s\" from config for device %s.", val, nm_device_get_iface(dev));
-+ if ((strarr = g_strsplit(val, " ", 0)))
- {
-- /* Make sure this config file is for this device */
-- if (strncmp (&buffer[strlen(confline) - strlen(nm_device_get_iface (dev))],
-- nm_device_get_iface (dev), strlen(nm_device_get_iface (dev))) != 0)
-+ len = g_strv_length(strarr);
-+ for(i = 0; i < len; i++)
- {
-- nm_warning ("System config file '%s' does not define device '%s'\n",
-- cfg_file_path, nm_device_get_iface (dev));
-- break;
-- }
-- else
-- data_good = TRUE;
--
-- if (strncmp (buffer, dhcpline, strlen(dhcpline)) == 0)
-- {
-- use_dhcp = TRUE;
-+ guint32 addr = (guint32) (inet_addr (strarr[i]));
-+
-+ if (addr != (guint32) -1)
-+ nm_ip4_config_add_nameserver(sys_data->config, addr);
-+ }
-+
-+ g_strfreev(strarr);
- }
- else
- {
-- use_dhcp = FALSE;
-- confToken = strtok(&buffer[strlen(confline) + 2], " ");
-- while (count < 3)
-- {
-- if (nNext == 1 && bNext == 1)
-- {
-- ip4_address = inet_addr (confToken);
-- count++;
-- continue;
-- }
-- if (strcmp(confToken, "netmask") == 0)
-- {
-- confToken = strtok(NULL, " ");
-- ip4_netmask = inet_addr (confToken);
-- count++;
-- nNext = 1;
-- }
-- else if (strcmp(confToken, "broadcast") == 0)
-- {
-- confToken = strtok(NULL, " ");
-- count++;
-- bNext = 1;
-- }
-- else
-- {
-- ip4_address = inet_addr (confToken);
-- count++;
-- }
-- confToken = strtok(NULL, " ");
-- }
-+ guint32 addr = (guint32) (inet_addr (val));
-+
-+ if (addr != (guint32) -1)
-+ nm_ip4_config_add_nameserver(sys_data->config, addr);
-+ }
-+ }
-+
-+ val = g_hash_table_lookup(ifh, "dnssearch");
-+ if (val)
-+ {
-+ nm_debug("Using DNS search \"%s\" from config for device %s.", val, nm_device_get_iface(dev));
-+ if ((strarr = g_strsplit(val, " ", 0)))
-+ {
-+ len = g_strv_length(strarr);
-+ for(i = 0; i < len; i++)
-+ {
-+ if (strarr[i])
-+ nm_ip4_config_add_domain(sys_data->config, strarr[i]);
- }
-+
-+ g_strfreev(strarr);
- }
-- /* If we aren't using dhcp, then try to get the gateway */
-- if (!use_dhcp)
-+ else
- {
-- sprintf(ipline, "gateway=\"%s/", nm_device_get_iface (dev));
-- if (strncmp(buffer, ipline, strlen(ipline) - 1) == 0)
-+ nm_ip4_config_add_domain(sys_data->config, val);
-+ }
-+ }
-+
-+ nm_ip4_config_set_mtu (sys_data->config, sys_data->mtu);
-+
-+#if 0
-+ {
-+ int j;
-+ nm_debug ("------ Config (%s)", nm_device_get_iface (dev));
-+ nm_debug (" ADDR=%d", nm_ip4_config_get_address (sys_data->config));
-+ nm_debug (" GW =%d", nm_ip4_config_get_gateway (sys_data->config));
-+ nm_debug (" NM =%d", nm_ip4_config_get_netmask (sys_data->config));
-+ nm_debug (" NSs =%d",nm_ip4_config_get_num_nameservers(sys_data->config));
-+ for (j=0;j<nm_ip4_config_get_num_nameservers(sys_data->config);j++)
- {
-- sprintf(ipline, "gateway=\"%s/%%d.%%d.%%d.%%d\"", nm_device_get_iface (dev) );
-- sscanf(buffer, ipline, &ipa, &ipb, &ipc, &ipd);
-- sprintf(ipline, "%d.%d.%d.%d", ipa, ipb, ipc, ipd);
-- ip4_gateway = inet_addr (ipline);
-+ nm_debug (" NS =%d",nm_ip4_config_get_nameserver(sys_data->config,j));
- }
-- }
-- }
-- fclose (file);
-- g_free (cfg_file_path);
--
-- /* If successful, set values on the device */
-- if (data_good)
-- {
-- nm_warning("data good :-)");
-- nm_device_set_use_dhcp (dev, use_dhcp);
-- if (ip4_address)
-- nm_ip4_config_set_address (sys_data->config, ip4_address);
-- if (ip4_gateway)
-- nm_ip4_config_set_gateway (sys_data->config, ip4_gateway);
-- if (ip4_netmask)
-- nm_ip4_config_set_netmask (sys_data->config, ip4_netmask);
-- if (ip4_broadcast)
-- nm_ip4_config_set_broadcast (sys_data->config, ip4_broadcast);
-- }
-+ nm_debug ("---------------------\n");
-+ }
-+#endif
-+
-+ }
-+
-+ g_hash_table_destroy(ifh);
-+
-+
- return (void *)sys_data;
- }
-@@ -519,4 +825,11 @@
- gboolean nm_system_device_get_disabled (NMDevice *dev)
- {
-+ GentooSystemConfigData *sys_data;
-+
-+ g_return_val_if_fail (dev != NULL, FALSE);
-+
-+ if ((sys_data = nm_device_get_system_config_data (dev)))
-+ return sys_data->system_disabled;
-+
- return FALSE;
- }
-@@ -576,4 +889,35 @@
- void nm_system_set_hostname (NMIP4Config *config)
- {
-+ char *h_name = NULL;
-+ const char *hostname;
-+
-+ g_return_if_fail (config != NULL);
-+
-+ hostname = nm_ip4_config_get_hostname (config);
-+ if (!hostname)
-+ {
-+ struct in_addr temp_addr;
-+ struct hostent *host;
-+
-+ /* try to get hostname via dns */
-+ temp_addr.s_addr = nm_ip4_config_get_address (config);
-+ host = gethostbyaddr ((char *) &temp_addr, sizeof (temp_addr), AF_INET);
-+ if (host)
-+ {
-+ h_name = g_strdup (host->h_name);
-+ hostname = strtok (h_name, ".");
-+ }
-+ else
-+ nm_warning ("nm_system_set_hostname(): gethostbyaddr failed, h_errno = %d", h_errno);
-+ }
-+
-+ if (hostname)
-+ {
-+ nm_info ("Setting hostname to '%s'", hostname);
-+ if (sethostname (hostname, strlen (hostname)) < 0)
-+ nm_warning ("Could not set hostname.");
-+ }
-+
-+ g_free (h_name);
- }
-
-@@ -596,4 +940,11 @@
- guint32 nm_system_get_mtu (NMDevice *dev)
- {
-+ GentooSystemConfigData *sys_data;
-+
-+ g_return_val_if_fail (dev != NULL, 0);
-+
-+ if ((sys_data = nm_device_get_system_config_data (dev)))
-+ return sys_data->mtu;
-+
- return 0;
- }
diff --git a/net-misc/networkmanager/files/networkmanager-use-kernel-headers.patch b/net-misc/networkmanager/files/networkmanager-use-kernel-headers.patch
deleted file mode 100644
index e74c3c5..0000000
--- a/net-misc/networkmanager/files/networkmanager-use-kernel-headers.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN NetworkManager-0.5.2.orig/src/nm-device-802-3-ethernet.c NetworkManager-0.5.2/src/nm-device-802-3-ethernet.c
---- NetworkManager-0.5.2.orig/src/nm-device-802-3-ethernet.c 2006-02-04 05:20:00.000000000 -0600
-+++ NetworkManager-0.5.2/src/nm-device-802-3-ethernet.c 2006-02-04 05:20:26.000000000 -0600
-@@ -18,7 +18,7 @@
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
--
-+#define HEADERS_KERNEL
- #include <glib.h>
- #include <glib/gi18n.h>
- #include <dbus/dbus.h>
diff --git a/net-misc/networkmanager/networkmanager-0.7.0_pre20070627.ebuild b/net-misc/networkmanager/networkmanager-0.7.0_pre20070627.ebuild
deleted file mode 100644
index d2a9c9d..0000000
--- a/net-misc/networkmanager/networkmanager-0.7.0_pre20070627.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.6.5.ebuild,v 1.4 2007/05/14 16:33:39 steev Exp $
-
-inherit gnome2 eutils
-
-# NetworkManager likes itself with capital letters
-MY_P=${P/networkmanager/NetworkManager}
-
-DESCRIPTION="Network configuration and management in an easy way. Desktop environment independent."
-HOMEPAGE="http://www.gnome.org/projects/NetworkManager/"
-#http://ftp.gnome.org/pub/gnome/sources/NetworkManager/0.6/
-SRC_URI="http://dev.gentoo.org/~rbu/distfiles/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS=""
-IUSE="crypt doc gnome"
-
-RDEPEND=">=sys-apps/dbus-0.60
- >=sys-apps/hal-0.5
- sys-apps/iproute2
- >=dev-libs/libnl-1.0_pre6
- >=net-misc/dhcdbd-1.4
- >=net-wireless/wireless-tools-28_pre9
- >=net-wireless/wpa_supplicant-0.4.8
- >=dev-libs/glib-2.8
- >=x11-libs/libnotify-0.3.2
- gnome? ( >=x11-libs/gtk+-2.8
- >=gnome-base/libglade-2
- >=gnome-base/gnome-keyring-0.4
- >=gnome-base/gnome-panel-2
- >=gnome-base/gconf-2
- >=gnome-base/libgnomeui-2 )
- crypt? ( dev-libs/libgcrypt )"
-DEPEND="${RDEPEND}
- dev-util/pkgconfig
- dev-util/intltool"
-PDEPEND="gnome? ( >=gnome-extra/nm-applet-0.6.5 )"
-
-DOCS="AUTHORS ChangeLog NEWS README"
-USE_DESTDIR="1"
-
-G2CONF="${G2CONF} \
- `use_with crypt gcrypt` \
- `use_with gnome` \
- --disable-more-warnings \
- --localstatedir=/var \
- --with-distro=gentoo \
- --with-dbus-sys=/etc/dbus-1/system.d \
- --enable-notification-icon"
-
-S=${WORKDIR}/${MY_P}
-
-src_unpack () {
-
- unpack ${A}
- cd ${S}
- # Update to use our backend
- epatch ${FILESDIR}/${P}-updatedbackend.patch
- # Use the kernel headers
- epatch ${FILESDIR}/${PN}-use-kernel-headers.patch
- # Fix the resolv.conf permissions
- epatch ${FILESDIR}/${PN}-resolvconf-perms.patch
- # Fix up the dbus conf file to use plugdev group
- epatch ${FILESDIR}/${PN}-0.6.5-confchanges.patch
-}
-
-src_install() {
- gnome2_src_install
- # Need to keep the /var/run/NetworkManager directory
- keepdir /var/run/NetworkManager
-}
-pkg_postinst() {
- gnome2_icon_cache_update
- elog "You need to be in the plugdev group in order to use NetworkManager"
- elog "Problems with your hostname getting changed?"
- elog ""
- elog "Add the following to /etc/dhcp/dhclient.conf"
- elog 'send host-name "YOURHOSTNAME";'
- elog 'supersede host-name "YOURHOSTNAME";'
-
- elog "You will need to restart DBUS if this is your first time"
- elog "installing NetworkManager."
-}
diff --git a/net-misc/networkmanager/networkmanager-0.7.0_pre20080817.ebuild b/net-misc/networkmanager/networkmanager-0.7.0_pre20080817.ebuild
new file mode 100644
index 0000000..079f9b2
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-0.7.0_pre20080817.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit gnome2 eutils
+
+# NetworkManager likes itself with capital letters
+MY_P=${P/networkmanager/NetworkManager}
+
+DESCRIPTION="Network configuration and management in an easy way. Desktop environment independent."
+HOMEPAGE="http://www.gnome.org/projects/NetworkManager/"
+SRC_URI="http://dev.gentoo.org/~rbu/distfiles/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~x86"
+IUSE="crypt doc gnome nss gnutls dhclient dhcpcd"
+
+RDEPEND=">=sys-apps/dbus-1.1
+ >=dev-libs/dbus-glib-0.75
+ >=sys-apps/hal-0.5.10
+ >=net-wireless/wireless-tools-28_pre9
+ >=dev-libs/glib-2.10
+ >=sys-auth/policykit-0.8
+ >=dev-libs/libnl-1.1
+
+ nss? (
+ gnutls? ( dev-libs/libgcrypt
+ net-libs/gnutls )
+ !gnutls? ( >=dev-libs/nss-3.11 ) )
+ !nss? (
+ dev-libs/libgcrypt
+ net-libs/gnutls )
+
+ dhclient? (
+ dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+ !dhcpcd? ( >=net-misc/dhcp-3.0.0 ) )
+ !dhclient? ( >=net-misc/dhcpcd-4.0.0_rc3 )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ dev-util/intltool"
+PDEPEND="gnome? ( >=gnome-extra/nm-applet-0.7.0_pre0 )"
+
+DOCS="AUTHORS ChangeLog NEWS README"
+# USE_DESTDIR="1"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ if built_with_use sys-apps/iproute2 minimal ; then
+ eerror "Please rebuild sys-apps/iproute2 without the minimal useflag."
+ die "Fix iproute2 first."
+ fi
+
+ G2CONF="${G2CONF} \
+ $(use_with crypt gcrypt) \
+ $(use_with gnome) \
+ --disable-more-warnings \
+ --localstatedir=/var \
+ --with-distro=gentoo \
+ --with-dbus-sys=/etc/dbus-1/system.d"
+
+ # default is dhcpcd (if none or both are specified), ISC dchclient otherwise
+ if use dhclient ; then
+ if use dhcpcd ; then
+ G2CONF="${G2CONF} --with-dhcp-client=dhcpcd"
+ else
+ G2CONF="${G2CONF} --with-dhcp-client=dhclient"
+ fi
+ else
+ G2CONF="${G2CONF} --with-dhcp-client=dhcpcd"
+ fi
+
+ # default is GnuTLS (if none or both are specified), NSS otherwise
+ if use nss ; then
+ if use gnutls ; then
+ G2CONF="${G2CONF} --with-crypto=gnutls"
+ else
+ G2CONF="${G2CONF} --with-crypto=nss"
+ fi
+ else
+ G2CONF="${G2CONF} --with-crypto=gnutls"
+ fi
+}
+
+src_unpack () {
+ unpack ${A}
+ cd "${S}"
+
+ # Use the kernel headers
+# epatch "${FILESDIR}/${PN}-use-kernel-headers.patch"
+ # Fix the resolv.conf permissions
+# epatch "${FILESDIR}/${PN}-resolvconf-perms.patch"
+ # Fix up the dbus conf file to use plugdev group
+ epatch "${FILESDIR}/${PN}-0.7.0-confchanges.patch"
+}
+
+src_install() {
+ gnome2_src_install
+ # Need to keep the /var/run/NetworkManager directory
+ keepdir /var/run/NetworkManager
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ elog "You need to be in the plugdev group in order to use NetworkManager"
+ elog "Problems with your hostname getting changed?"
+ elog ""
+ elog "Add the following to /etc/dhcp/dhclient.conf"
+ elog 'send host-name "YOURHOSTNAME";'
+ elog 'supersede host-name "YOURHOSTNAME";'
+
+ elog "You will need to restart DBUS if this is your first time"
+ elog "installing NetworkManager."
+}
diff --git a/net-misc/networkmanager/networkmanager-9999.ebuild b/net-misc/networkmanager/networkmanager-9999.ebuild
new file mode 100644
index 0000000..133e32f
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-9999.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# Ebuild from http://forums.gentoo.org/viewtopic-t-629987.html
+
+
+inherit gnome2 subversion autotools eutils
+
+# NetworkManager likes itself with capital letters
+MY_P=${P/networkmanager/NetworkManager}
+
+DESCRIPTION="Network configuration and management in an easy way. Desktop environment independent."
+HOMEPAGE="http://www.gnome.org/projects/NetworkManager/"
+ESVN_REPO_URI="svn://svn.gnome.org/svn/NetworkManager/trunk"
+
+SRC_URI=""
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="dhclient dhcpcd gnutls nss doc"
+
+# Yes, I know that configure will accept libnl 1.0-pre8, however we only have
+# 1.1 in the tree, therefore dep on it.
+RDEPEND=">=sys-apps/dbus-1.2
+ >=dev-libs/dbus-glib-0.75
+ >=sys-apps/hal-0.5.9
+ >=dev-libs/libnl-1.1
+ >=net-wireless/wireless-tools-28_pre9
+ >=net-wireless/wpa_supplicant-0.5
+ >=dev-libs/glib-2.16
+ >=sys-auth/policykit-0.8
+
+ dhclient? (
+ dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+ !dhcpcd? ( >=net-misc/dhcp-3.0.0 ) )
+ !dhclient? ( >=net-misc/dhcpcd-4.0.0_rc3 )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ dev-util/intltool"
+PDEPEND="gnome? ( >=gnome-extra/nm-applet-9999 )"
+
+DOCS="AUTHORS ChangeLog NEWS README"
+#USE_DESTDIR="1"
+
+G2CONF="${G2CONF} \
+ --disable-more-warnings \
+ --localstatedir=/var \
+ --with-distro=gentoo"
+
+ # if both flags are used we default to dhcpcd
+ # if none flag is used we force dhcpcd
+ if use dhclient ; then
+ if use dhcpcd ; then
+ G2CONF="${G2CONF} --with-dhcp-client=dhcpcd"
+ else
+ G2CONF="${G2CONF} --with-dhcp-client=dhclient"
+ fi
+ else
+ G2CONF="${G2CONF} --with-dhcp-client=dhcpcd"
+ fi
+
+
+
+S=${WORKDIR}/${MY_P}
+
+
+src_unpack () {
+ unpack ${A}
+ cd "${S}"
+
+ # Fix up the dbus conf file to use plugdev group
+ epatch "${FILESDIR}"/${P}-confchanges.patch
+ gtkdocize
+ eautoreconf
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ elog "You need to be in the plugdev group in order to use NetworkManager"
+ elog "Problems with your hostname getting changed?"
+ elog ""
+ elog "Add the following to /etc/dhcp/dhclient.conf"
+ elog 'send host-name "YOURHOSTNAME";'
+ elog 'supersede host-name "YOURHOSTNAME";'
+
+ elog "You will need to restart DBUS if this is your first time"
+ elog "installing NetworkManager."
+}