From d019f248b7b92fdfdeee01f10c6ed97e6d9ff50f Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 13 Feb 2007 03:54:03 +0000 Subject: [PATCH] Turn dmi on always for amd64, ia64, and x86. Fix ACPI support, prefering ACPI proc vs ACPId. bug #165822, bug #157220, bug #164652, & bug #152923 Package-Manager: portage-2.1.2-r9 --- sys-apps/hal/Manifest | 25 ++- sys-apps/hal/files/digest-hal-0.5.7.1-r5 | 3 + sys-apps/hal/files/hal-0.5.7.1-fix-dbus.patch | 184 +++++++++++++++ .../files/hal-0.5.7.1-indirection-fix.patch | 117 ++++++++++ .../files/hal-0.5.7.1-rescan-on-resume.patch | 16 ++ sys-apps/hal/hal-0.5.7.1-r5.ebuild | 211 ++++++++++++++++++ 6 files changed, 553 insertions(+), 3 deletions(-) create mode 100644 sys-apps/hal/files/digest-hal-0.5.7.1-r5 create mode 100644 sys-apps/hal/files/hal-0.5.7.1-fix-dbus.patch create mode 100644 sys-apps/hal/files/hal-0.5.7.1-indirection-fix.patch create mode 100644 sys-apps/hal/files/hal-0.5.7.1-rescan-on-resume.patch create mode 100644 sys-apps/hal/hal-0.5.7.1-r5.ebuild diff --git a/sys-apps/hal/Manifest b/sys-apps/hal/Manifest index 52993e187889..f865e017d0fc 100644 --- a/sys-apps/hal/Manifest +++ b/sys-apps/hal/Manifest @@ -61,6 +61,10 @@ AUX hal-0.5.7.1-dbus-close.patch 859 RMD160 942829e237154e6612d806d9f3af0d393582 MD5 1fa646b45e845031f09515731dba40c7 files/hal-0.5.7.1-dbus-close.patch 859 RMD160 942829e237154e6612d806d9f3af0d393582f418 files/hal-0.5.7.1-dbus-close.patch 859 SHA256 7739541fde66bcfcb6bbeb2d5e66976e856ea066aed34c847b38539a2c42b183 files/hal-0.5.7.1-dbus-close.patch 859 +AUX hal-0.5.7.1-fix-dbus.patch 5438 RMD160 dc725822a2959c7a2426215b015bf29a085fca69 SHA1 da415a38bbbecd1790037b505adee53344aae9f7 SHA256 37898de6afb3c383b8d52067a089ebbb87608c76e527d795f73ed58344920e0a +MD5 b5c272cfcc167bea3f9faf53322ca7fe files/hal-0.5.7.1-fix-dbus.patch 5438 +RMD160 dc725822a2959c7a2426215b015bf29a085fca69 files/hal-0.5.7.1-fix-dbus.patch 5438 +SHA256 37898de6afb3c383b8d52067a089ebbb87608c76e527d795f73ed58344920e0a files/hal-0.5.7.1-fix-dbus.patch 5438 AUX hal-0.5.7.1-floppies-fix.patch 581 RMD160 ebb1a1a3edfdfe1eb380226d4092422d8d9a26d0 SHA1 b12ef26f7d335343b85cad1d8ba8495b249c82e5 SHA256 7b780fd26a7de2354890b526737d995f63316fded04a4af061926c95a1cc90fc MD5 80832a688c51720cdd01981be6494f36 files/hal-0.5.7.1-floppies-fix.patch 581 RMD160 ebb1a1a3edfdfe1eb380226d4092422d8d9a26d0 files/hal-0.5.7.1-floppies-fix.patch 581 @@ -77,10 +81,18 @@ AUX hal-0.5.7.1-ignored-volumes.patch 2864 RMD160 2b4031e24b57c2b8685eb95e39f7b3 MD5 d7bd86d8837014d37208a3604c4fcb33 files/hal-0.5.7.1-ignored-volumes.patch 2864 RMD160 2b4031e24b57c2b8685eb95e39f7b3e6eb0c7576 files/hal-0.5.7.1-ignored-volumes.patch 2864 SHA256 054a2db0fd30d6ae9ef828fec930cf55df4e5cbbcc20f3cb86c8801714063790 files/hal-0.5.7.1-ignored-volumes.patch 2864 +AUX hal-0.5.7.1-indirection-fix.patch 4548 RMD160 aab83618c5859f616119df9af80d881957f1f88b SHA1 27758415910b47af73e39d0fc7086d3ef3ec068f SHA256 3612a5238817dedb8d4d31c131ec8fc6baaffcce8b237c5620d9437c1c8677fa +MD5 c9ec54ae222330c0daebb8c65f2dcaa5 files/hal-0.5.7.1-indirection-fix.patch 4548 +RMD160 aab83618c5859f616119df9af80d881957f1f88b files/hal-0.5.7.1-indirection-fix.patch 4548 +SHA256 3612a5238817dedb8d4d31c131ec8fc6baaffcce8b237c5620d9437c1c8677fa files/hal-0.5.7.1-indirection-fix.patch 4548 AUX hal-0.5.7.1-ipod-nano.patch 1411 RMD160 295b3d19d0f3a55343ca5ab95a256fac34e6439c SHA1 18bea5459a848789e22cd3458efaa9120274f342 SHA256 4df49efb2657cb21ca8d7597fc1e83e33d387d0bd07a403f0749bfe6a23bebb5 MD5 f9a92273f54f17c14db923a315ec1542 files/hal-0.5.7.1-ipod-nano.patch 1411 RMD160 295b3d19d0f3a55343ca5ab95a256fac34e6439c files/hal-0.5.7.1-ipod-nano.patch 1411 SHA256 4df49efb2657cb21ca8d7597fc1e83e33d387d0bd07a403f0749bfe6a23bebb5 files/hal-0.5.7.1-ipod-nano.patch 1411 +AUX hal-0.5.7.1-rescan-on-resume.patch 517 RMD160 7b16d9f68e32945951a1f5d6c27f6920404f66e5 SHA1 c46ee436146f91f60eaf16840a5a889fdd1127a8 SHA256 97524ef90ea5666885a604bdd40bb0e51495ffe0c123f939eaaa12642c9d3904 +MD5 8e922af6294647b5b3c24e70f97af8de files/hal-0.5.7.1-rescan-on-resume.patch 517 +RMD160 7b16d9f68e32945951a1f5d6c27f6920404f66e5 files/hal-0.5.7.1-rescan-on-resume.patch 517 +SHA256 97524ef90ea5666885a604bdd40bb0e51495ffe0c123f939eaaa12642c9d3904 files/hal-0.5.7.1-rescan-on-resume.patch 517 AUX hal-0.5.7.1-sr-driver.patch 654 RMD160 86a98b6ceb98f797badd3e1c653f181d498138b1 SHA1 8c1538eb5d1192e336627f1c59c365b2b73b0a6d SHA256 52191c2230af31f0bf18f39a5f0e6d24728da5c7e0de627be55046561318ca55 MD5 a6cfdd91f94b01684e1c3063dd07cbd8 files/hal-0.5.7.1-sr-driver.patch 654 RMD160 86a98b6ceb98f797badd3e1c653f181d498138b1 files/hal-0.5.7.1-sr-driver.patch 654 @@ -107,6 +119,10 @@ EBUILD hal-0.5.7.1-r4.ebuild 6214 RMD160 dbc2befe87613fde41bacd74f087ded5fea10ba MD5 848426833518e6fc7e093821e75f25a2 hal-0.5.7.1-r4.ebuild 6214 RMD160 dbc2befe87613fde41bacd74f087ded5fea10bab hal-0.5.7.1-r4.ebuild 6214 SHA256 159d5ef840125742c6b1f2880ee9ad50d77a77cb29b42a9b46a0094920835199 hal-0.5.7.1-r4.ebuild 6214 +EBUILD hal-0.5.7.1-r5.ebuild 6590 RMD160 9ae6c6edfb51dd4073d26c3215ff5a45a3c67881 SHA1 275e8077f32b84a394fcde143d9d9415ea2b915b SHA256 40914e703fdaa4ef88e8f1179837f88c6d2ee2f84ff39bc9484e623f40d14afc +MD5 d9cfa3fcfa0eb64c6690d0b3fdb52b43 hal-0.5.7.1-r5.ebuild 6590 +RMD160 9ae6c6edfb51dd4073d26c3215ff5a45a3c67881 hal-0.5.7.1-r5.ebuild 6590 +SHA256 40914e703fdaa4ef88e8f1179837f88c6d2ee2f84ff39bc9484e623f40d14afc hal-0.5.7.1-r5.ebuild 6590 MISC ChangeLog 19074 RMD160 5b228eeaa11dbd531401afcea866d8f51b253afa SHA1 069efda7b7682e2d9f5276d0b1187cfe91e98896 SHA256 0c6e8735ef4d596aa4458eefd49b0ee5ba2c2c6eb6a1f70735c8541b8c3f8417 MD5 94d25b75e2ce7469983a29053dca0b6c ChangeLog 19074 RMD160 5b228eeaa11dbd531401afcea866d8f51b253afa ChangeLog 19074 @@ -124,10 +140,13 @@ SHA256 6fede189bf70fa0a1009bcefea0a23a8941a051256e7fafc16793324db3c61c0 files/di MD5 f6986582ab2d32e615cb3dbce02614cd files/digest-hal-0.5.7.1-r4 238 RMD160 dafbac18b72d6d7d879ccb37200ce33a870bb8a1 files/digest-hal-0.5.7.1-r4 238 SHA256 6fede189bf70fa0a1009bcefea0a23a8941a051256e7fafc16793324db3c61c0 files/digest-hal-0.5.7.1-r4 238 +MD5 f6986582ab2d32e615cb3dbce02614cd files/digest-hal-0.5.7.1-r5 238 +RMD160 dafbac18b72d6d7d879ccb37200ce33a870bb8a1 files/digest-hal-0.5.7.1-r5 238 +SHA256 6fede189bf70fa0a1009bcefea0a23a8941a051256e7fafc16793324db3c61c0 files/digest-hal-0.5.7.1-r5 238 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.2 (GNU/Linux) -iD8DBQFFzvKJ8bi6rjpTunYRAhaHAJkBhra6C882HgxoeVyubwf8RISMsgCdHfsL -zzCQy03p5eV0SEjSVj2Y+IM= -=V0Te +iD8DBQFF0TZeoeSe8B0zEfwRAjOAAJ9nW7yZCgByFUFV0pMYCALlLgga2ACeNher +/ZBdieVv3jjauJD/K/KKWrI= +=hdNv -----END PGP SIGNATURE----- diff --git a/sys-apps/hal/files/digest-hal-0.5.7.1-r5 b/sys-apps/hal/files/digest-hal-0.5.7.1-r5 new file mode 100644 index 000000000000..3042516ecf0a --- /dev/null +++ b/sys-apps/hal/files/digest-hal-0.5.7.1-r5 @@ -0,0 +1,3 @@ +MD5 d7a7741808ba130f8aff3f5d3b5689e4 hal-0.5.7.1.tar.gz 1503156 +RMD160 2861818b29546bd3628b1bda3d41238cf644c644 hal-0.5.7.1.tar.gz 1503156 +SHA256 f15320c1ec3e5c89307fc0a6fbf75b6619de12c15ce8cc1a689e7bc3f2c0831b hal-0.5.7.1.tar.gz 1503156 diff --git a/sys-apps/hal/files/hal-0.5.7.1-fix-dbus.patch b/sys-apps/hal/files/hal-0.5.7.1-fix-dbus.patch new file mode 100644 index 000000000000..03fd76cb1bb8 --- /dev/null +++ b/sys-apps/hal/files/hal-0.5.7.1-fix-dbus.patch @@ -0,0 +1,184 @@ +--- hal-0.5.7.1/tools/hal-device.c.fixdbus 2006-11-21 15:30:47.000000000 +0100 ++++ hal-0.5.7.1/tools/hal-device.c 2006-11-21 15:30:48.000000000 +0100 +@@ -155,7 +155,6 @@ + + libhal_ctx_shutdown(hal_ctx, &error); + libhal_ctx_free(hal_ctx); +- dbus_connection_close(conn); + dbus_connection_unref(conn); + dbus_error_free(&error); + +--- hal-0.5.7.1/tools/lshal.c.fixdbus 2006-11-21 15:30:47.000000000 +0100 ++++ hal-0.5.7.1/tools/lshal.c 2006-11-21 15:30:48.000000000 +0100 +@@ -701,7 +701,6 @@ + libhal_ctx_shutdown (hal_ctx, &error); + libhal_ctx_free (hal_ctx); + +- dbus_connection_close (conn); + dbus_connection_unref (conn); + + if (show_device) +--- hal-0.5.7.1/libhal/libhal.c.fixdbus 2006-02-12 22:47:28.000000000 +0100 ++++ hal-0.5.7.1/libhal/libhal.c 2006-11-21 15:33:31.000000000 +0100 +@@ -1525,7 +1525,7 @@ + reply = dbus_connection_send_with_reply_and_block (ctx->connection, + message, -1, + error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } +@@ -1710,7 +1710,7 @@ + reply = dbus_connection_send_with_reply_and_block (ctx->connection, + message, -1, + error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } +@@ -1762,7 +1762,7 @@ + reply = dbus_connection_send_with_reply_and_block (ctx->connection, + message, -1, + error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } +@@ -1814,7 +1814,7 @@ + reply = dbus_connection_send_with_reply_and_block (ctx->connection, + message, -1, + error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } +@@ -1865,7 +1865,7 @@ + reply = dbus_connection_send_with_reply_and_block (ctx->connection, + message, -1, + error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } +@@ -1926,7 +1926,7 @@ + message, -1, + error); + +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + if (strcmp (error->name, + "org.freedesktop.Hal.DeviceAlreadyLocked") == 0) { + if (reason_why_locked != NULL) { +@@ -1985,7 +1985,7 @@ + message, -1, + error); + +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } +@@ -2040,7 +2040,7 @@ + reply = dbus_connection_send_with_reply_and_block (ctx->connection, + message, -1, + error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return NULL; + } +@@ -2125,7 +2125,7 @@ + reply = dbus_connection_send_with_reply_and_block (ctx->connection, + message, -1, + error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } +@@ -2179,7 +2179,7 @@ + reply = dbus_connection_send_with_reply_and_block (ctx->connection, + message, -1, + error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } +@@ -2365,7 +2365,7 @@ + reply = dbus_connection_send_with_reply_and_block (ctx->connection, + message, -1, + error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } +@@ -2652,7 +2652,7 @@ + reply = dbus_connection_send_with_reply_and_block (ctx->connection, + message, -1, + error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } +@@ -2788,7 +2788,7 @@ + "type='signal'," + "interface='org.freedesktop.Hal.Device'," + "sender='org.freedesktop.Hal'", error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + return FALSE; + } + return TRUE; +@@ -2820,7 +2820,7 @@ + "sender='org.freedesktop.Hal'," "path=%s", udi); + + dbus_bus_add_match (ctx->connection, buf, error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + return FALSE; + } + return TRUE; +@@ -2848,7 +2848,7 @@ + "sender='org.freedesktop.Hal'," "path=%s", udi); + + dbus_bus_remove_match (ctx->connection, buf, error); +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + return FALSE; + } + return TRUE; +@@ -3223,7 +3223,7 @@ + message, -1, + error); + +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } +@@ -3273,7 +3273,7 @@ + message, -1, + error); + +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } +@@ -3342,7 +3342,7 @@ + message, -1, + error); + +- if (dbus_error_is_set (error)) { ++ if (error != NULL && dbus_error_is_set (error)) { + dbus_message_unref (message); + return FALSE; + } diff --git a/sys-apps/hal/files/hal-0.5.7.1-indirection-fix.patch b/sys-apps/hal/files/hal-0.5.7.1-indirection-fix.patch new file mode 100644 index 000000000000..198297251f9e --- /dev/null +++ b/sys-apps/hal/files/hal-0.5.7.1-indirection-fix.patch @@ -0,0 +1,117 @@ +diff -uNr hal-0.5.7.orig/hald/device_info.c hal-0.5.7/hald/device_info.c +--- hal-0.5.7.orig/hald/device_info.c 2006-01-21 07:36:51.000000000 +0100 ++++ hal-0.5.7/hald/device_info.c 2006-10-26 23:00:26.000000000 +0200 +@@ -1114,56 +1114,22 @@ + pc->merge_type, pc->merge_type)); + break; + } +- } else if (pc->curelem == CURELEM_APPEND && pc->match_ok && ++ } else if ((pc->curelem == CURELEM_APPEND || pc->curelem == CURELEM_PREPEND) && pc->match_ok && + (hal_device_property_get_type (pc->device, pc->merge_key) == HAL_PROPERTY_TYPE_STRING || + hal_device_property_get_type (pc->device, pc->merge_key) == HAL_PROPERTY_TYPE_STRLIST || + hal_device_property_get_type (pc->device, pc->merge_key) == HAL_PROPERTY_TYPE_INVALID)) { + char buf[256]; + char buf2[256]; + +- /* As soon as we are appending, we have matched the device... */ ++ /* As soon as we are appending/prepending, we have matched the device... */ + pc->device_matched = TRUE; + + if (pc->merge_type == MERGE_TYPE_STRLIST) { +- hal_device_property_strlist_append (pc->device, pc->merge_key, pc->cdata_buf); +- } else { +- const char *existing_string; +- +- switch (pc->merge_type) { +- case MERGE_TYPE_STRING: +- strncpy (buf, pc->cdata_buf, sizeof (buf)); +- break; +- +- case MERGE_TYPE_COPY_PROPERTY: +- hal_device_property_get_as_string (pc->device, pc->cdata_buf, buf, sizeof (buf)); +- break; +- +- default: +- HAL_ERROR (("Unknown merge_type=%d='%c'", pc->merge_type, pc->merge_type)); +- break; +- } +- +- existing_string = hal_device_property_get_string (pc->device, pc->merge_key); +- if (existing_string != NULL) { +- strncpy (buf2, existing_string, sizeof (buf2)); +- strncat (buf2, buf, sizeof (buf2) - strlen(buf2)); ++ if (pc->curelem == CURELEM_APPEND){ ++ hal_device_property_strlist_append (pc->device, pc->merge_key, pc->cdata_buf); + } else { +- strncpy (buf2, buf, sizeof (buf2)); ++ hal_device_property_strlist_prepend (pc->device, pc->merge_key, pc->cdata_buf); + } +- hal_device_property_set_string (pc->device, pc->merge_key, buf2); +- } +- } else if (pc->curelem == CURELEM_PREPEND && pc->match_ok && +- (hal_device_property_get_type (pc->device, pc->merge_key) == HAL_PROPERTY_TYPE_STRING || +- hal_device_property_get_type (pc->device, pc->merge_key) == HAL_PROPERTY_TYPE_STRLIST || +- hal_device_property_get_type (pc->device, pc->merge_key) == HAL_PROPERTY_TYPE_INVALID)) { +- char buf[256]; +- char buf2[256]; +- +- /* As soon as we are prepending, we have matched the device... */ +- pc->device_matched = TRUE; +- +- if (pc->merge_type == MERGE_TYPE_STRLIST) { +- hal_device_property_strlist_prepend (pc->device, pc->merge_key, pc->cdata_buf); + } else { + const char *existing_string; + +@@ -1173,8 +1139,34 @@ + break; + + case MERGE_TYPE_COPY_PROPERTY: +- hal_device_property_get_as_string (pc->device, pc->cdata_buf, buf, sizeof (buf)); ++ { ++ char udi_to_merge_from[256]; ++ char prop_to_merge[256]; ++ ++ /* Resolve key paths like 'someudi/foo/bar/baz:prop.name' ++ * '@prop.here.is.an.udi:with.prop.name' ++ */ ++ if (!resolve_udiprop_path (pc->cdata_buf, ++ pc->device->udi, ++ udi_to_merge_from, sizeof (udi_to_merge_from), ++ prop_to_merge, sizeof (prop_to_merge))) { ++ HAL_ERROR (("Could not resolve keypath '%s' on udi '%s'", pc->cdata_buf, pc->device->udi)); ++ } else { ++ HalDevice *d; ++ ++ d = hal_device_store_find (hald_get_gdl (), udi_to_merge_from); ++ if (d == NULL) { ++ d = hal_device_store_find (hald_get_tdl (), udi_to_merge_from); ++ } ++ if (d == NULL) { ++ HAL_ERROR (("Could not find device with udi '%s'", udi_to_merge_from)); ++ } else { ++ hal_device_property_get_as_string (d, prop_to_merge, buf, sizeof (buf)); ++ } ++ } ++ + break; ++ } + + default: + HAL_ERROR (("Unknown merge_type=%d='%c'", pc->merge_type, pc->merge_type)); +@@ -1183,8 +1175,13 @@ + + existing_string = hal_device_property_get_string (pc->device, pc->merge_key); + if (existing_string != NULL) { +- strncpy (buf2, buf, sizeof (buf2)); +- strncat (buf2, existing_string, sizeof (buf2) - strlen(buf2)); ++ if (pc->curelem == CURELEM_APPEND){ ++ strncpy (buf2, existing_string, sizeof (buf2)); ++ strncat (buf2, buf, sizeof (buf2) - strlen(buf2)); ++ } else { ++ strncpy (buf2, buf, sizeof (buf2)); ++ strncat (buf2, existing_string, sizeof (buf2) - strlen(buf2)); ++ } + } else { + strncpy (buf2, buf, sizeof (buf2)); + } diff --git a/sys-apps/hal/files/hal-0.5.7.1-rescan-on-resume.patch b/sys-apps/hal/files/hal-0.5.7.1-rescan-on-resume.patch new file mode 100644 index 000000000000..e9eeb3142016 --- /dev/null +++ b/sys-apps/hal/files/hal-0.5.7.1-rescan-on-resume.patch @@ -0,0 +1,16 @@ +--- tools/hal-system-power-hibernate 2006-04-26 19:25:40.000000000 -0500 ++++ tools/hal-system-power-hibernate 2006-04-26 19:34:00.000000000 -0500 +@@ -53,4 +53,13 @@ + fi + fi + ++# Refresh devices when resuming from a hibernate ++for type in button battery ac_adapter ; do ++ devices=$(hal-find-by-capability --capability $type) ++ for device in $devices ; do ++ dbus-send --system --print-reply --dest=org.freedesktop.Hal $device \ ++ org.freedesktop.Hal.Device.Rescan ++ done ++done ++ + exit $RET diff --git a/sys-apps/hal/hal-0.5.7.1-r5.ebuild b/sys-apps/hal/hal-0.5.7.1-r5.ebuild new file mode 100644 index 000000000000..f0896fdd3014 --- /dev/null +++ b/sys-apps/hal/hal-0.5.7.1-r5.ebuild @@ -0,0 +1,211 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.7.1-r5.ebuild,v 1.1 2007/02/13 03:54:03 cardoe Exp $ + +inherit eutils linux-info + +DESCRIPTION="Hardware Abstraction Layer" +HOMEPAGE="http://www.freedesktop.org/Software/hal" +SRC_URI="http://freedesktop.org/~david/dist/${P}.tar.gz" + +LICENSE="|| ( GPL-2 AFL-2.0 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="acpi crypt debug doc pcmcia selinux" + +RDEPEND=">=dev-libs/glib-2.6 + >=dev-libs/dbus-glib-0.71 + >=sys-fs/udev-083 + >=sys-apps/util-linux-2.12r + || ( >=sys-kernel/linux-headers-2.6 >=sys-kernel/mips-headers-2.6 ) + dev-libs/expat + sys-apps/pciutils + dev-libs/libusb + virtual/eject + x86? ( >=sys-apps/dmidecode-2.7 ) + amd64? ( >=sys-apps/dmidecode-2.7 ) + ia64? ( >=sys-apps/dmidecode-2.7 ) + crypt? ( >=sys-fs/cryptsetup-luks-1.0.1 ) + selinux? ( sys-libs/libselinux )" + +DEPEND="${RDEPEND} + dev-util/pkgconfig + >=dev-util/intltool-0.29 + doc? ( app-doc/doxygen app-text/docbook-sgml-utils )" + +## HAL Daemon drops privledges so we need group access to read disks +HALDAEMON_GROUPS="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb" + +function notify_uevent() { + eerror + eerror "You must enable Kernel Userspace Events in your kernel." + eerror "This can be set under 'General Setup'. It is marked as" + eerror "CONFIG_KOBJECT_UEVENT in the config file." + eerror + ebeep 5 +} + +function notify_uevent_2_6_16() { + eerror + eerror "You must enable Kernel Userspace Events in your kernel." + eerror "For this you need to enable 'Hotplug' under 'General Setup' and" + eerror "basic networking. They are marked CONFIG_HOTPLUG and CONFIG_NET" + eerror "in the config file." + eerror + ebeep 5 +} + +function notify_procfs() { + eerror + eerror "You must enable the proc filesystem in your kernel." + eerror "For this you need to enable '/proc file system support' under" + eerror "'Pseudo filesystems' in 'File systems'. It is marked" + eerror "CONFIG_PROC_FS in the config file." + eerror + ebeep 5 +} + +pkg_setup() { + get_version || eerror "Unable to calculate Linux Kernel version" + + kernel_is ge 2 6 15 || eerror "HAL requires a kernel version 2.6.15 or newer" + + if kernel_is lt 2 6 16 ; then + linux_chkconfig_present KOBJECT_UEVENT || notify_uevent + else + (linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET) \ + || notify_uevent_2_6_16 + fi + + if use acpi ; then + linux_chkconfig_present PROC_FS || notify_procfs + fi + + if [ -d ${ROOT}/etc/hal/device.d ]; then + eerror "HAL 0.5.x will not run with the HAL 0.4.x series of" + eerror "/etc/hal/device.d/ so please remove this directory" + eerror "with rm -rf /etc/hal/device.d/ and then re-emerge." + eerror "This is due to configuration protection of /etc/" + die "remove /etc/hal/device.d/" + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # handle ignored volumes properly + epatch "${FILESDIR}"/${PN}-0.5.7.1-ignored-volumes.patch + + # Fix bash in hald scripts + epatch "${FILESDIR}"/${PN}-0.5.7.1-hald-scripts.patch + + # probe partition table + epatch "${FILESDIR}"/${PN}-0.5.7-part-table.patch + + # fix pmu support crash + epatch "${FILESDIR}"/${PN}-0.5.7-pmu-fix.patch + + # unclean unmount + epatch "${FILESDIR}"/${PN}-0.5.7-unclean-unmount-r1.patch + + # allow plugdev group people to mount + epatch "${FILESDIR}"/${PN}-0.5.7-plugdev-allow-send.patch + + # rescan devices on resume + epatch "${FILESDIR}"/${PN}-0.5.7.1-rescan-on-resume.patch + + # dbus deprecated dbus_connection_disconnect + epatch "${FILESDIR}"/${PN}-0.5.7.1-dbus-close.patch + + # sr driver fix + epatch "${FILESDIR}"/${PN}-0.5.7.1-sr-driver.patch + + # mounting autofs & subfs fixes + epatch "${FILESDIR}"/${PN}-0.5.7.1-autofs-subfs.patch + + # iPod Nano detected as RAID fix + epatch "${FILESDIR}"/${PN}-0.5.7.1-ipod-nano.patch + + # Floppies mounting fix + epatch "${FILESDIR}"/${PN}-0.5.7.1-floppies-fix.patch + + # fix undeclared ctype.h so everyone can stop getting their panties in a + # bundle + epatch "${FILESDIR}"/${PN}-0.5.7.1-ctype-fix.patch + + # fix for dbus close/unref so we stop having errors from lshal about D-Bus + epatch "${FILESDIR}"/${PN}-0.5.7.1-fix-dbus.patch + + # Fix for fdi issues with indirection problem in copy_property + # All work by Martin "Parmus" Parm