A number of fixes, patch to make it work on gentoo/freebsd
authorPeter Weller <welp@gentoo.org>
Mon, 29 Jan 2007 19:50:49 +0000 (19:50 +0000)
committerPeter Weller <welp@gentoo.org>
Mon, 29 Jan 2007 19:50:49 +0000 (19:50 +0000)
Package-Manager: portage-2.1.2-r5

xfce-extra/xfce4-battery/ChangeLog
xfce-extra/xfce4-battery/Manifest
xfce-extra/xfce4-battery/files/xfce4-battery-0.5.0-freebsd.patch [new file with mode: 0644]
xfce-extra/xfce4-battery/xfce4-battery-0.5.0.ebuild

index 54b774b4f40ac9ed7f1d6af0693b1b3004c389f8..8a464bb1c85e593fdbd0910804fbb7d4db6c18f8 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for xfce-extra/xfce4-battery
 # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-battery/ChangeLog,v 1.37 2007/01/23 21:24:24 welp Exp $
+# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-battery/ChangeLog,v 1.38 2007/01/29 19:50:49 welp Exp $
+
+  29 Jan 2007; Peter Weller <welp@gentoo.org>
+  +files/xfce4-battery-0.5.0-freebsd.patch, xfce4-battery-0.5.0.ebuild:
+  A number of fixes, patch to make it work on gentoo/freebsd
 
   23 Jan 2007; Peter Weller <welp@gentoo.org> xfce4-battery-0.5.0.ebuild:
   Fix depends for bug 163244. Fix meta builds.
index eb976b0dee2c0289b7a11ca5eb729385dbf35237..5a6700698cbf03d9279cd6022dbb55cf8ca944b5 100644 (file)
@@ -1,10 +1,11 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
 AUX ac_adapter.patch 844 RMD160 f45412afe6fd641f6ca0ed2c4ea8e16e19a62652 SHA1 0868dd50e9738f4a0ca906de7c86f4795a20c1c5 SHA256 c95c971fdef386dd71efad82963a2dab74fb9295d6bc323565488c16c5301b9d
 MD5 7e83c3e57eb87b819dec88cdfeb289df files/ac_adapter.patch 844
 RMD160 f45412afe6fd641f6ca0ed2c4ea8e16e19a62652 files/ac_adapter.patch 844
 SHA256 c95c971fdef386dd71efad82963a2dab74fb9295d6bc323565488c16c5301b9d files/ac_adapter.patch 844
+AUX xfce4-battery-0.5.0-freebsd.patch 675 RMD160 f670161edade82ecf78aee3ef9da0e230a667cd6 SHA1 a5bd15629095e7cd922c3550ff01d6332d7b463d SHA256 7dee4e6556334cd985e69e70992719f7fca21dce3bed75b8780153fddda1a175
+MD5 09af8d61b1894f6799ddcb1dbe30afb9 files/xfce4-battery-0.5.0-freebsd.patch 675
+RMD160 f670161edade82ecf78aee3ef9da0e230a667cd6 files/xfce4-battery-0.5.0-freebsd.patch 675
+SHA256 7dee4e6556334cd985e69e70992719f7fca21dce3bed75b8780153fddda1a175 files/xfce4-battery-0.5.0-freebsd.patch 675
 DIST xfce4-battery-plugin-0.3.0.tar.gz 322286 RMD160 3fbf0f1cf8851b59967105a95b43c8d1adf5417e SHA1 3a6ca86d29050707eb579f215475cc3689c5f24f SHA256 8044995f61f12fcd8ec2a44739293ed0adbe7adf04587aee3a31630fb5bb93b4
 DIST xfce4-battery-plugin-0.4.90.3.tar.bz2 299228 RMD160 1157d46ae610a7067ddcc8128e5d6de1f021ccf8 SHA1 293a48eed1c251083d53da78bc985689c9e8e3d5 SHA256 7aed4b45bb6ddcc8b9ba181f1252b58e72f39a45fd9704509e2a315ed654b552
 DIST xfce4-battery-plugin-0.5.0.tar.bz2 222269 RMD160 bbf64994c7686b11b6a51bd7728569cd2a5d9777 SHA1 63439d32bfe8411458d41c38824cb393bc31d6e0 SHA256 4428f2fe1f5f28e6cc711278fd9c5c90f325cf0c5298f98a5d60940116cbcef8
@@ -24,14 +25,14 @@ EBUILD xfce4-battery-0.4.90.3.ebuild 419 RMD160 0799eff9a4cf771c2cd46584f0a02cb0
 MD5 1479e9c86ccf86ba027bca5596304fbc xfce4-battery-0.4.90.3.ebuild 419
 RMD160 0799eff9a4cf771c2cd46584f0a02cb0c6a8da8f xfce4-battery-0.4.90.3.ebuild 419
 SHA256 aaa862055c1eaf2ac45029ceefa6065015b78e552d55da2f58d44a16f25826ba xfce4-battery-0.4.90.3.ebuild 419
-EBUILD xfce4-battery-0.5.0.ebuild 451 RMD160 e8aa629d1f42f40082965bdd86cbde951d7717a7 SHA1 592fe8b0068d144bc3d27ed95c90136d0c1e59ef SHA256 7074c451ae3681f947e4729c13ed0c6df7118b6989494a8344d16502e290ee8c
-MD5 6ee2d86b26085f46550080b49cee8811 xfce4-battery-0.5.0.ebuild 451
-RMD160 e8aa629d1f42f40082965bdd86cbde951d7717a7 xfce4-battery-0.5.0.ebuild 451
-SHA256 7074c451ae3681f947e4729c13ed0c6df7118b6989494a8344d16502e290ee8c xfce4-battery-0.5.0.ebuild 451
-MISC ChangeLog 5176 RMD160 72b5bdc02cf61934ff37ef4d515d0d14e01ab1d6 SHA1 e6fcdfa34129c608bfe8340afb8f230849691be2 SHA256 0b28822709ec92b0b611d0c22d6a8c1ee7a8039424d435743db15dfc1190bfce
-MD5 49b2f55dff643d6a448182b396acefd0 ChangeLog 5176
-RMD160 72b5bdc02cf61934ff37ef4d515d0d14e01ab1d6 ChangeLog 5176
-SHA256 0b28822709ec92b0b611d0c22d6a8c1ee7a8039424d435743db15dfc1190bfce ChangeLog 5176
+EBUILD xfce4-battery-0.5.0.ebuild 535 RMD160 353dd5e2fa0061ff8e62a832602caa377a306476 SHA1 6d84ed10c8004050075202201067498ba4e3dd4d SHA256 fe381b0c58d386114e9997f8e7499b3845fb53fa28406617ddcc330d893784e1
+MD5 387cf4d6c41864e679e9f7d330c2151c xfce4-battery-0.5.0.ebuild 535
+RMD160 353dd5e2fa0061ff8e62a832602caa377a306476 xfce4-battery-0.5.0.ebuild 535
+SHA256 fe381b0c58d386114e9997f8e7499b3845fb53fa28406617ddcc330d893784e1 xfce4-battery-0.5.0.ebuild 535
+MISC ChangeLog 5356 RMD160 feeffee6004f9d2212e98835d15f1e0298e4721a SHA1 50ec46545b94336e97a9fc727fc184ccf1999152 SHA256 7339e5633877638f603da844de5819a4b35d452a64383c563f3cac20e706fa37
+MD5 7f3edfcc42bb3f44de26ec46baf82586 ChangeLog 5356
+RMD160 feeffee6004f9d2212e98835d15f1e0298e4721a ChangeLog 5356
+SHA256 7339e5633877638f603da844de5819a4b35d452a64383c563f3cac20e706fa37 ChangeLog 5356
 MISC metadata.xml 157 RMD160 d7470fe88d1b96f3a7f1ef26fb7dc646b4a1b907 SHA1 7eae91f2588bdae8667d37a98fb3090d539eeca1 SHA256 44350daa7594842894d676413708d8ea77ccb0017bed24711af5b256281f5e61
 MD5 c390804e060ffd11a5bbb143434b2b2d metadata.xml 157
 RMD160 d7470fe88d1b96f3a7f1ef26fb7dc646b4a1b907 metadata.xml 157
@@ -51,10 +52,3 @@ SHA256 cc0730ded4b2ca328ef177affdc1f8919822e28b5a19854b3d383138a107a8a3 files/di
 MD5 e2eec6e047896be338d150e33d940ace files/digest-xfce4-battery-0.5.0 283
 RMD160 9e29a0847e5a193a1ac5d9808f367b45d39f9817 files/digest-xfce4-battery-0.5.0 283
 SHA256 45a858bae490c0a8e69b0891d7d8c1ccf7274476e0b27d34e33130d1a3720272 files/digest-xfce4-battery-0.5.0 283
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.1 (GNU/Linux)
-
-iD8DBQFFucub8bi6rjpTunYRAs2WAKDG29mgDTvLR23Rd+pNdo7tx45JbQCeLikH
-oLBohHSozzFT20M8z0TT7zo=
-=wnNV
------END PGP SIGNATURE-----
diff --git a/xfce-extra/xfce4-battery/files/xfce4-battery-0.5.0-freebsd.patch b/xfce-extra/xfce4-battery/files/xfce4-battery-0.5.0-freebsd.patch
new file mode 100644 (file)
index 0000000..b4644fe
--- /dev/null
@@ -0,0 +1,32 @@
+--- panel-plugin/battery.c.orig        Wed Jan 24 20:42:09 2007
++++ panel-plugin/battery.c     Wed Jan 24 20:46:51 2007
+@@ -378,6 +378,7 @@
+           rate = last_rate;
+         }
+         
++#ifdef __linux__      
+         charge = (((float)ccapacity)/((float)lcapacity))*100;
+         if ( last_acline )
+@@ -389,6 +390,20 @@
+             time_remaining = 0;
+         
+         last_acline = acline;
++
++#elif __FreeBSD__
++      charge = acpistate->percentage;
++
++      if ( last_acline )
++          time_remaining = acpistate->rtime;
++      else
++          time_remaining = acpistate->rtime;
++
++      if ( time_remaining < 0 )
++          time_remaining = 0;
++
++      last_acline = acline;
++#endif
+     }    
+ #ifdef __linux__
+
index a0ac094fb34ebe86364cf4d443907e53a5cae08b..98306ebcb7d003978218dbe52f69b51716d436e0 100644 (file)
@@ -1,15 +1,21 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-battery/xfce4-battery-0.5.0.ebuild,v 1.2 2007/01/23 21:24:24 welp Exp $
+# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-battery/xfce4-battery-0.5.0.ebuild,v 1.3 2007/01/29 19:50:49 welp Exp $
 
-inherit xfce44
+inherit eutils xfce44
 
 xfce44_beta
 xfce44_goodies_panel_plugin
 
-DESCRIPTION="Xfce4 battery status panel plugin"
+DESCRIPTION="Battery status panel plugin"
 
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
 IUSE="debug"
 
 DEPEND="dev-util/intltool"
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+       epatch "${FILESDIR}/${P}-freebsd.patch"
+}