fix up autoconf CFLAG detection. Fix for info.category for laptop panels
authorDoug Goldstein <cardoe@gentoo.org>
Wed, 25 Apr 2007 14:17:57 +0000 (14:17 +0000)
committerDoug Goldstein <cardoe@gentoo.org>
Wed, 25 Apr 2007 14:17:57 +0000 (14:17 +0000)
Package-Manager: portage-2.1.2.4

sys-apps/hal/ChangeLog
sys-apps/hal/Manifest
sys-apps/hal/files/0.5.9/17_autoconf_cflag_cleanup.patch [new file with mode: 0644]
sys-apps/hal/files/0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch [new file with mode: 0644]
sys-apps/hal/files/0.5.9/series

index 40dcbf60cad77d0fa9defdb24d2fccd8b70ed0eb..ffa9efdbe8803a18736f5d1195381b5b2d32a6c4 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for sys-apps/hal
 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.176 2007/04/24 15:47:09 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.177 2007/04/25 14:17:56 cardoe Exp $
+
+  25 Apr 2007; Doug Goldstein <cardoe@gentoo.org>
+  +files/0.5.9/17_autoconf_cflag_cleanup.patch,
+  +files/0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch,
+  files/0.5.9/series:
+  fix up autoconf CFLAG detection. Fix for info.category for laptop panels
 
   24 Apr 2007; Doug Goldstein <cardoe@gentoo.org>
   files/0.5.9/97_ignore_fixed_drives.patch:
index f0fe2e1de2e442751030c1fb8209717c068474f5..ef5dc18779a7322c26d9d11d397427daf4803bb1 100644 (file)
@@ -77,6 +77,14 @@ AUX 0.5.9/16_dev_root_is_mounted.patch 5417 RMD160 d66edb0a43cb579b548be40f0cdee
 MD5 df7cad356333b0dcefc619df107c7cdb files/0.5.9/16_dev_root_is_mounted.patch 5417
 RMD160 d66edb0a43cb579b548be40f0cdeea0bb305a90e files/0.5.9/16_dev_root_is_mounted.patch 5417
 SHA256 cd2c580d264e6d22635db3d55249ad5ef733ff0f3e4c0c45d59de643f9196dec files/0.5.9/16_dev_root_is_mounted.patch 5417
+AUX 0.5.9/17_autoconf_cflag_cleanup.patch 4001 RMD160 157766a207c9afb0d659e119bd3c9334292c41bd SHA1 21c756c7bd7fe3334c0378b70ac6a26ea46b4e2e SHA256 e30480b18f30f97562781b1879d4d02e963704d5c774ee60cf204903f247ab45
+MD5 1db8be4fb0558c130e8fd12061ce5d0a files/0.5.9/17_autoconf_cflag_cleanup.patch 4001
+RMD160 157766a207c9afb0d659e119bd3c9334292c41bd files/0.5.9/17_autoconf_cflag_cleanup.patch 4001
+SHA256 e30480b18f30f97562781b1879d4d02e963704d5c774ee60cf204903f247ab45 files/0.5.9/17_autoconf_cflag_cleanup.patch 4001
+AUX 0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch 4755 RMD160 049686ba8a8766287587edf826cf128d3c473a0d SHA1 6e152dd055e9c370800203c5d02a6445a21ac9be SHA256 07e9740985bea0baa8b472f0731507c64ec7784547f548789c0efcf6e92862ef
+MD5 9954802d28a6d47499e0a48928b9593b files/0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch 4755
+RMD160 049686ba8a8766287587edf826cf128d3c473a0d files/0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch 4755
+SHA256 07e9740985bea0baa8b472f0731507c64ec7784547f548789c0efcf6e92862ef files/0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch 4755
 AUX 0.5.9/95_gentoo_man_page.patch 18159 RMD160 cd4bf6c16e84464b11de755323ef2d0f5c1a54f9 SHA1 f9de30d705eada8e2f631e51b715b9923f732fb4 SHA256 59d81dcb273f3cdc9c7fc9f195331529642fef2c2150b3eeb3fd98ea555b1893
 MD5 f6d115e0eb501aba476f4df965bfeb6c files/0.5.9/95_gentoo_man_page.patch 18159
 RMD160 cd4bf6c16e84464b11de755323ef2d0f5c1a54f9 files/0.5.9/95_gentoo_man_page.patch 18159
@@ -89,10 +97,10 @@ AUX 0.5.9/97_ignore_fixed_drives.patch 1529 RMD160 ca9c907351003a9924d1e7a472d8d
 MD5 148972bf6d73b10fe75f1a3fef21f346 files/0.5.9/97_ignore_fixed_drives.patch 1529
 RMD160 ca9c907351003a9924d1e7a472d8dfec21533e79 files/0.5.9/97_ignore_fixed_drives.patch 1529
 SHA256 b71fdb49a1ad0376f305caf1d11c75dfe8370b970d29adbfe8bd3320757a5259 files/0.5.9/97_ignore_fixed_drives.patch 1529
-AUX 0.5.9/series 618 RMD160 6803ff8c3012afd630b2818b346e62f13d1185bc SHA1 04e6d4e538427556a8ddc5e30de19bb5759531c8 SHA256 49ac6c2082a4434e4c40ff4a1002c056216d354274c9b92fcd3810d59d92cc99
-MD5 4b1f23c7daa863998b891f6a299107af files/0.5.9/series 618
-RMD160 6803ff8c3012afd630b2818b346e62f13d1185bc files/0.5.9/series 618
-SHA256 49ac6c2082a4434e4c40ff4a1002c056216d354274c9b92fcd3810d59d92cc99 files/0.5.9/series 618
+AUX 0.5.9/series 701 RMD160 3e178b4e5c04d2306e99cbdc3562b024d100330f SHA1 4778e271f52140ea3c06f015c533d34231cd8048 SHA256 73d88b5787146ce41dca4369ab019b99989fd63c2b2edfdc86d64bccdfe67455
+MD5 f5f14a8da20ef716a7d3014d145fd284 files/0.5.9/series 701
+RMD160 3e178b4e5c04d2306e99cbdc3562b024d100330f files/0.5.9/series 701
+SHA256 73d88b5787146ce41dca4369ab019b99989fd63c2b2edfdc86d64bccdfe67455 files/0.5.9/series 701
 AUX hal-0.5.7-hald-scripts.patch 8636 RMD160 339765377e3573b382df987903f301860601668f SHA1 c2ffb779f423e07b38f12a852d942928394abc63 SHA256 d0b713f84c7bc782ba7b13f439630a995588097db2141f4a97c110036f64001a
 MD5 521a06ba0845bd3246d6ed4b589f110f files/hal-0.5.7-hald-scripts.patch 8636
 RMD160 339765377e3573b382df987903f301860601668f files/hal-0.5.7-hald-scripts.patch 8636
@@ -195,10 +203,10 @@ EBUILD hal-0.5.9.ebuild 7177 RMD160 cf9131b3eb91be3e90efe501d125a02b18398062 SHA
 MD5 5bf97425f9c1ebe14d09e69b12078a8e hal-0.5.9.ebuild 7177
 RMD160 cf9131b3eb91be3e90efe501d125a02b18398062 hal-0.5.9.ebuild 7177
 SHA256 dd9f4b2e4aba2a1dc43bb83f060cc5d13d09291ae861b412b51a75f81534b59c hal-0.5.9.ebuild 7177
-MISC ChangeLog 29061 RMD160 eec2fc8dfefa899f9e3a6f94cb9e28b33d3310ee SHA1 df5783898be70a5e4c9f5ac1363a7c3b9a8654e8 SHA256 a35a83cba776a99e88bf1ea157a5a713b3c9b508677ae30bc6a21f4ff96ccabf
-MD5 9899579f5f2035822209d7b4a311cf83 ChangeLog 29061
-RMD160 eec2fc8dfefa899f9e3a6f94cb9e28b33d3310ee ChangeLog 29061
-SHA256 a35a83cba776a99e88bf1ea157a5a713b3c9b508677ae30bc6a21f4ff96ccabf ChangeLog 29061
+MISC ChangeLog 29324 RMD160 1a9aa73df7a8dab9405e6b08dd01a77e139ffa4f SHA1 0969925ef23053e50c9fcc371a92d94ebb193b3a SHA256 0c6d52fc6b3ac5f5e3ea9e8f0988c1f8b50b32581121435f3f271ba12b8f85fb
+MD5 e0aaf8e8b584d9fc48737861ca63e63d ChangeLog 29324
+RMD160 1a9aa73df7a8dab9405e6b08dd01a77e139ffa4f ChangeLog 29324
+SHA256 0c6d52fc6b3ac5f5e3ea9e8f0988c1f8b50b32581121435f3f271ba12b8f85fb ChangeLog 29324
 MISC metadata.xml 345 RMD160 aa6e810e9546542453ebe5d6ca46804e99f447f2 SHA1 fef829210e8555807f9b69ba5afedffb8af8d02c SHA256 0c9aeabf473a6836c25a5db2ca86b880dec1efa9e52310725e08d1e0df93447d
 MD5 3317c4000387b670183d305ef9937b75 metadata.xml 345
 RMD160 aa6e810e9546542453ebe5d6ca46804e99f447f2 metadata.xml 345
@@ -215,7 +223,7 @@ SHA256 d862b002c9a5547954874b2a0cbadd614381d085e850539e6aef2dd9e9d52dfe files/di
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.3 (GNU/Linux)
 
-iD8DBQFGLiZdoeSe8B0zEfwRAsBdAJ9PqxVOKjJZGk1tJlvRLko7SNWZ+wCfWWko
-6JSxqEQLWsP0H6ogeE2kUw4=
-=yJyT
+iD8DBQFGL2LwoeSe8B0zEfwRAj9QAJ9sBsh6X67MO2P/yENrlZpUDcRI5gCfT5VB
+JAjgawKHH+aYqyIh5NytL9Y=
+=GyC+
 -----END PGP SIGNATURE-----
diff --git a/sys-apps/hal/files/0.5.9/17_autoconf_cflag_cleanup.patch b/sys-apps/hal/files/0.5.9/17_autoconf_cflag_cleanup.patch
new file mode 100644 (file)
index 0000000..34d5642
--- /dev/null
@@ -0,0 +1,132 @@
+Index: b/configure.in
+===================================================================
+--- a/configure.in     2007-04-03 00:36:44.000000000 -0400
++++ b/configure.in     2007-04-24 16:57:54.000000000 -0400
+@@ -234,79 +234,66 @@
+ fi
+ #### gcc warning flags
++dnl checks compiler support for CFLAG
++AC_DEFUN([HAL_CC_TRY_FLAG], [
++        AC_MSG_CHECKING([whether $CC supports $1])
++
++  hal_save_CFLAGS="$CFLAGS"
++  CFLAGS="$CFLAGS $1"
++
++  AC_COMPILE_IFELSE([ ], [hal_cc_flag=yes], [hal_cc_flag=no])
++  CFLAGS="$hal_save_CFLAGS"
++
++  if test "x$hal_cc_flag" = "xyes"; then
++    ifelse([$2], , :, [$2])
++  else
++    ifelse([$3], , :, [$3])
++  fi
++  AC_MSG_RESULT([$hal_cc_flag])
++])
+-if test "x$GCC" = "xyes"; then
+-  changequote(,)dnl
+-  case " $CFLAGS " in
+-  *[\ \       ]-Wall[\ \      ]*) ;;
+-  *) CFLAGS="$CFLAGS -Wall" ;;
+-  esac
+-
+-  case " $CFLAGS " in
+-  *[\ \       ]-Wchar-subscripts[\ \  ]*) ;;
+-  *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
+-  esac
+-
+-  case " $CFLAGS " in
+-  *[\ \       ]-Wmissing-declarations[\ \     ]*) ;;
+-  *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
+-  esac
++dnl Use as many warning flags as possible with gcc and compatible compilers
+-  case " $CFLAGS " in
+-  *[\ \       ]-Wnested-externs[\ \   ]*) ;;
+-  *) CFLAGS="$CFLAGS -Wnested-externs" ;;
+-  esac
++dnl If you change anything below in the variable, the cache is automatically
++dnl ignored and everything is rechecked. So just add a flag and that's it.
++dnl if you need to force a recheck, add a whitespace somewhere
++dnl Also take note of order of flags, you should have the big inclusive flags
++dnl first, and the negating flags last
+-  case " $CFLAGS " in
+-  *[\ \       ]-Wpointer-arith[\ \    ]*) ;;
+-  *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
+-  esac
++MAYBE_WARN="-Wall -Wextra \
++-Wchar-subscripts -Wmissing-declarations -Wnested-externs \
++-Wpointer-arith -Wcast-align -Wsign-compare -Wbad-function-cast \
++-Waggregate-return -Wcast-align -Wcast-qual -Wshadow -Wredundant-decls"
+-  case " $CFLAGS " in
+-  *[\ \       ]-Wcast-align[\ \       ]*) ;;
+-  *) CFLAGS="$CFLAGS -Wcast-align" ;;
+-  esac
++dnl invalidate cache if MAYBE_WARN has changed
++if test "x$hal_cv_warn_maybe" != "x$MAYBE_WARN"; then
++  unset hal_cv_warn_cflags
++fi
+-  case " $CFLAGS " in
+-  *[\ \       ]-Wsign-compare[\ \     ]*) ;;
+-  *) CFLAGS="$CFLAGS -Wsign-compare" ;;
+-  esac
++AC_CACHE_CHECK([for supported warning flags], hal_cv_warn_cflags, [
++              echo
+-  if test "x$enable_ansi" = "xyes"; then
+-    case " $CFLAGS " in
+-    *[\ \     ]-ansi[\ \      ]*) ;;
+-    *) CFLAGS="$CFLAGS -ansi" ;;
+-    esac
++  for W in $MAYBE_WARN; do
++    HAL_CC_TRY_FLAG([$W], [CFLAGS="$CFLAGS $W"])
++  done
+-    case " $CFLAGS " in
+-    *[\ \     ]-D_POSIX_C_SOURCE*) ;;
+-    *) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;;
+-    esac
++  hal_cv_warn_cflags=$CFLAGS
++  hal_cv_warn_maybe=$MAYBE_WARN
+-    case " $CFLAGS " in
+-    *[\ \     ]-D_BSD_SOURCE[\ \      ]*) ;;
+-    *) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;;
+-    esac
++  AC_MSG_CHECKING([which warning flags were supported])
++])
+-    case " $CFLAGS " in
+-    *[\ \     ]-pedantic[\ \  ]*) ;;
+-    *) CFLAGS="$CFLAGS -pedantic" ;;
+-    esac
++if test "x$GCC" = "xyes"; then
++  if test "x$enable_ansi" = "xyes"; then
++    HAL_CC_TRY_FLAG([-ansi], [CFLAGS="$CFLAGS -ansi"])
++    HAL_CC_TRY_FLAG([-pedanitc], [CFLAGS="$CFLAGS -pedantic"])
++    CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE"
+   fi
+-  if test x$enable_gcov = xyes; then
+-    case " $CFLAGS " in
+-    *[\ \     ]-fprofile-arcs[\ \     ]*) ;;
+-    *) CFLAGS="$CFLAGS -fprofile-arcs" ;;
+-    esac
+-    case " $CFLAGS " in
+-    *[\ \     ]-ftest-coverage[\ \    ]*) ;;
+-    *) CFLAGS="$CFLAGS -ftest-coverage" ;;
+-    esac
+-    ## remove optimization
+-    CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
++  if test "x$enable_gcov" = "xyes"; then
++    HAL_CC_TRY_FLAG([-fprofile-arcs], [CFLAGS="$CFLAGS -fprofile-arcs"])
++    HAL_CC_TRY_FLAG([-ftest-coverage], [CFLAGS="$CFLAGS -ftest-coverage"])
+   fi
+-  changequote([,])dnl
+ else
+   if test x$enable_gcov = xyes; then
+     AC_MSG_ERROR([--enable-gcov can only be used with gcc])
diff --git a/sys-apps/hal/files/0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch b/sys-apps/hal/files/0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch
new file mode 100644 (file)
index 0000000..720999f
--- /dev/null
@@ -0,0 +1,71 @@
+diff --git a/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi b/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi
+index c982099..6368ad8 100644
+--- a/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi
++++ b/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi
+@@ -4,17 +4,20 @@
+   <device>
+     <match key="info.category" string="laptop_panel">
+-      <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.LaptopPanel</append>
++      <!-- only set if the laptop_panel.access_method is not custom -->
++      <match key="laptop_panel.access_method" compare_ne="custom">
++        <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.LaptopPanel</append>
+-      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" type="strlist">SetBrightness</append>
+-      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" type="strlist">i</append>
+-      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" type="strlist">brightness_value</append>
+-      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" type="strlist">hal-system-lcd-set-brightness</append>
+-
+-      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" type="strlist">GetBrightness</append>
+-      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" type="strlist"></append>
+-      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" type="strlist"></append>
+-      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" type="strlist">hal-system-lcd-get-brightness</append>
++        <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" type="strlist">SetBrightness</append>
++        <append key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" type="strlist">i</append>
++        <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" type="strlist">brightness_value</append>
++              <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" type="strlist">hal-system-lcd-set-brightness</append>
++      
++        <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" type="strlist">GetBrightness</append>
++        <append key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" type="strlist"></append>
++        <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" type="strlist"></append>
++      <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" type="strlist">hal-system-lcd-get-brightness</append>
++      
+     </match>
+   </device>
+diff --git a/fdi/policy/10osvendor/10-macbook-backlight.fdi b/fdi/policy/10osvendor/10-macbook-backlight.fdi
+index 227bbb5..a22fb20 100644
+--- a/fdi/policy/10osvendor/10-macbook-backlight.fdi
++++ b/fdi/policy/10osvendor/10-macbook-backlight.fdi
+@@ -13,6 +13,7 @@
+   <device>
+     <match key="info.udi" string="/org/freedesktop/Hal/devices/macbook_backlight">
+       <append key="info.capabilities" type="strlist">laptop_panel</append>
++      <merge key="info.category" type="string">laptop_panel</merge>
+       <merge key="info.product" type="string">MacBook Backlight Control</merge>
+       <merge key="laptop_panel.access_method" type="string">custom</merge>
+       <merge key="laptop_panel.num_levels" type="int">118</merge>
+diff --git a/fdi/policy/10osvendor/10-macbookpro-utils.fdi b/fdi/policy/10osvendor/10-macbookpro-utils.fdi
+index 8aed6c0..f02c614 100644
+--- a/fdi/policy/10osvendor/10-macbookpro-utils.fdi
++++ b/fdi/policy/10osvendor/10-macbookpro-utils.fdi
+@@ -32,6 +32,7 @@
+   <device>
+     <match key="info.udi" string="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel">
+       <append key="info.capabilities" type="strlist">laptop_panel</append>
++      <merge key="info.category" type="string">laptop_panel</merge>
+       <merge key="info.product" type="string">MacBook Pro Laptop Panel</merge>
+       <merge key="laptop_panel.access_method" type="string">custom</merge>
+       <merge key="laptop_panel.num_levels" type="int">229</merge>
+diff --git a/fdi/policy/10osvendor/10-omap-backlight.fdi b/fdi/policy/10osvendor/10-omap-backlight.fdi
+index 5d3f1ce..2f041a1 100644
+--- a/fdi/policy/10osvendor/10-omap-backlight.fdi
++++ b/fdi/policy/10osvendor/10-omap-backlight.fdi
+@@ -10,6 +10,7 @@
+    <device>
+     <match key="info.udi" string="/org/freedesktop/Hal/devices/omapfb_bl">
+         <merge key="info.product" type="string">OMAP LCD controller and panel</merge>
++        <merge key="info.category" type="string">laptop_panel</merge>
+         <append key="info.capabilities" type="strlist">laptop_panel</append>
+         <merge key="laptop_panel.access_method" type="string">custom</merge>
+         <merge key="laptop_panel.num_levels" type="int">15</merge>
index 520c267a9ee200bf4ccba91334c9b995ee5da3a8..22db6ec14d158390fccdc8493c4737788c2df088 100644 (file)
@@ -14,6 +14,8 @@
 14_ntfs_allows_utf8.patch
 15_spec_fdi_matching.patch
 16_dev_root_is_mounted.patch
+17_autoconf_cflag_cleanup.patch
+18_hal_fix_info.category_for_laptop_panel_v2.patch
 95_gentoo_man_page.patch
 96_plugdev_allow_send.patch
 97_ignore_fixed_drives.patch