diff options
-rw-r--r-- | gnome-base/gnome-panel/Manifest | 16 | ||||
-rw-r--r-- | gnome-base/gnome-panel/files/gnome-panel-intlclock.patch | 103 | ||||
-rw-r--r-- | gnome-base/gnome-panel/files/intlclock-applet.tar.bz2 | bin | 165860 -> 0 bytes | |||
-rw-r--r-- | gnome-base/gnome-panel/gnome-panel-2.20.0.1.ebuild | 7 | ||||
-rw-r--r-- | gnome-extra/intlclock-applet/Manifest | 12 | ||||
-rw-r--r-- | gnome-extra/intlclock-applet/files/intlclock-sunpos-gpl.patch | 508 | ||||
-rw-r--r-- | gnome-extra/intlclock-applet/intlclock-applet-1.0.ebuild | 42 |
7 files changed, 567 insertions, 121 deletions
diff --git a/gnome-base/gnome-panel/Manifest b/gnome-base/gnome-panel/Manifest index 47159dd..f1376b6 100644 --- a/gnome-base/gnome-panel/Manifest +++ b/gnome-base/gnome-panel/Manifest @@ -6,28 +6,20 @@ AUX gnome-panel-alt-f1-slab.patch 1458 RMD160 090bee7ad7933426509fde2a7305a410eb MD5 e95eee2dcbafa8894cde94564967414a files/gnome-panel-alt-f1-slab.patch 1458 RMD160 090bee7ad7933426509fde2a7305a410ebe92af8 files/gnome-panel-alt-f1-slab.patch 1458 SHA256 d085431812451f471fa78aacd37f0fde85bc5e6588a7e525d3187002aa7f91e4 files/gnome-panel-alt-f1-slab.patch 1458 -AUX gnome-panel-intlclock.patch 3619 RMD160 b6d3a3fddbce8077531730c4457a96c7dc9802a0 SHA1 1a5e375b6a8df55f70d08c23556b80707d08709f SHA256 8b4174988709141ef4f31f54fd2b1c1ccc4f9c8dd9f9003bde7720ec8950da1b -MD5 061203b71a098b0cbf26bb03127dfe97 files/gnome-panel-intlclock.patch 3619 -RMD160 b6d3a3fddbce8077531730c4457a96c7dc9802a0 files/gnome-panel-intlclock.patch 3619 -SHA256 8b4174988709141ef4f31f54fd2b1c1ccc4f9c8dd9f9003bde7720ec8950da1b files/gnome-panel-intlclock.patch 3619 AUX gnome-panel-recently-used-apps.patch 5005 RMD160 0d6a63ab97749a48d6ce4e2e00c6e78b999ca45c SHA1 caa02d33e97bae915b38607cdf48fa870d576d99 SHA256 2d5aa1ec0b9fa55744b22de3137d3305454e45786a5a150002199054a0462bcc MD5 fe126619c09ba90f3306879d0fff1620 files/gnome-panel-recently-used-apps.patch 5005 RMD160 0d6a63ab97749a48d6ce4e2e00c6e78b999ca45c files/gnome-panel-recently-used-apps.patch 5005 SHA256 2d5aa1ec0b9fa55744b22de3137d3305454e45786a5a150002199054a0462bcc files/gnome-panel-recently-used-apps.patch 5005 -AUX intlclock-applet.tar.bz2 165860 RMD160 b908ee17c5c221ec1552edaf41ac1fa3e70617cd SHA1 a3970993f5930ac1fe8e024d1b20f9140b8cf84f SHA256 42e31d4c63aae5128755e4e52f73aa11cfbd34f823149c3cbb303a0ac666acb3 -MD5 d7516d8c7367b0df7f10da2701bb4aab files/intlclock-applet.tar.bz2 165860 -RMD160 b908ee17c5c221ec1552edaf41ac1fa3e70617cd files/intlclock-applet.tar.bz2 165860 -SHA256 42e31d4c63aae5128755e4e52f73aa11cfbd34f823149c3cbb303a0ac666acb3 files/intlclock-applet.tar.bz2 165860 DIST gnome-panel-2.18.3.tar.bz2 2722555 RMD160 346c3e981de3af98632d43511545b1877cf9cb5e SHA1 a521b722a1cc753ea0fa3ed7dcf5262750235f9a SHA256 efb12148ace94612b47add4060dd9ae088b47e09e5c4c223f8ab7e1c7dcc9410 DIST gnome-panel-2.20.0.1.tar.bz2 2804616 RMD160 c48fd450c62e129344a3c33568ec018fbefc5572 SHA1 7743a9653f36a80161b5c63f5a7e2ee51b7b3387 SHA256 70214f2242f1fae76c42a0ed498ccadf776691204181f61fcb95da5e16539dfa EBUILD gnome-panel-2.18.3.ebuild 1965 RMD160 4b7f8b5dd5d6a7585d3f6c5b69c5a0bde1aa0a12 SHA1 bc71f42491ec91b1dba0a00bd53d9e8d903930e1 SHA256 24f3beb91f3bab3729e6877ded7918774389c5b0fbce5d4fd938bdabdc871ede MD5 8dcdbead5215d001f863ebc21a455a62 gnome-panel-2.18.3.ebuild 1965 RMD160 4b7f8b5dd5d6a7585d3f6c5b69c5a0bde1aa0a12 gnome-panel-2.18.3.ebuild 1965 SHA256 24f3beb91f3bab3729e6877ded7918774389c5b0fbce5d4fd938bdabdc871ede gnome-panel-2.18.3.ebuild 1965 -EBUILD gnome-panel-2.20.0.1.ebuild 2153 RMD160 b43900c13a722f76076e7696909e8db908b06942 SHA1 edd9eb44ec739dcd7a82cc54d428c698c7932900 SHA256 d1dab4ed83d878484db5077089f8d13493af7029f3cb84dd7076c4cc01234833 -MD5 5e489b34dcfd934bffff0dbf8a64cd73 gnome-panel-2.20.0.1.ebuild 2153 -RMD160 b43900c13a722f76076e7696909e8db908b06942 gnome-panel-2.20.0.1.ebuild 2153 -SHA256 d1dab4ed83d878484db5077089f8d13493af7029f3cb84dd7076c4cc01234833 gnome-panel-2.20.0.1.ebuild 2153 +EBUILD gnome-panel-2.20.0.1.ebuild 2007 RMD160 3e331d4c451a784b72584313802b8e17db2ca66a SHA1 f4b60d5d6077ea9817a4584761dc4a11b99dd377 SHA256 aa99a52baef7e7986561c2af2d76d3fbb7b18b32830594c86f8ad2410aa2506f +MD5 d8617adac341cc539d84e2d289213a2d gnome-panel-2.20.0.1.ebuild 2007 +RMD160 3e331d4c451a784b72584313802b8e17db2ca66a gnome-panel-2.20.0.1.ebuild 2007 +SHA256 aa99a52baef7e7986561c2af2d76d3fbb7b18b32830594c86f8ad2410aa2506f gnome-panel-2.20.0.1.ebuild 2007 MD5 aa46df5e0e8e45c0c453c9fa12278e16 files/digest-gnome-panel-2.18.3 262 RMD160 c0b2f0078afa1ac56f14c157eaac53621e05ec86 files/digest-gnome-panel-2.18.3 262 SHA256 b28787b9d0b03fa57aca169d793815e2dcc7abcd3a6581d9196213346cf420e3 files/digest-gnome-panel-2.18.3 262 diff --git a/gnome-base/gnome-panel/files/gnome-panel-intlclock.patch b/gnome-base/gnome-panel/files/gnome-panel-intlclock.patch deleted file mode 100644 index 2a89177..0000000 --- a/gnome-base/gnome-panel/files/gnome-panel-intlclock.patch +++ /dev/null @@ -1,103 +0,0 @@ -Index: configure.in -=================================================================== ---- configure.in (revision 10212) -+++ configure.in (working copy) -@@ -64,6 +64,7 @@ - LIBEDATASERVERUI_REQUIRED=1.2.0 - CAIRO_REQUIRED=1.0.0 - DBUS_GLIB_REQUIRED=0.60 -+LIBRSVG_REQUIRED=2.12.0 - - dnl pkg-config dependency checks - -@@ -108,6 +108,8 @@ - fi - AM_CONDITIONAL(HAVE_LIBECAL, test -n "$LIBECAL_REQUIREMENT") - AC_SUBST(CLOCK_EDS_ICONDIR) -+ -+AC_SUBST(LIBRSVG_REQUIRED) - - PKG_CHECK_MODULES(CLOCK, pango >= $PANGO_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED $LIBECAL_REQUIREMENT libglade-2.0 >= $LIBGLADE_REQUIRED) - AC_SUBST(CLOCK_CFLAGS) -@@ -124,6 +126,20 @@ PKG_CHECK_MODULES(FISH, gtk+-2.0 >= $GTK - AC_SUBST(FISH_CFLAGS) - AC_SUBST(FISH_LIBS) - -+PKG_CHECK_MODULES(INTLCLOCK, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED librsvg-2.0 >= $LIBRSVG_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED $LIBECAL_REQUIREMENT) -+AC_SUBST(INTLCLOCK_CFLAGS) -+AC_SUBST(INTLCLOCK_LIBS) -+ -+# Check for system zone.tab file for intlclock -+AC_ARG_WITH([system-zonetab], -+ AC_HELP_STRING([--with-system-zoneinfo=DIR], -+ [Path to system zoneinfo directory]), -+ [SYSTEM_ZONEINFODIR=$withval], -+ [AC_PATH_PROG(SYSTEM_ZONEINFODIR, zone.tab, [/usr/share/zoneinfo/zone.tab], [/usr/share/zoneinfo/zone.tab:/usr/local/share/zoneinfo/zone.tab])]) -+if echo $SYSTEM_ZONEINFODIR |grep "/zone.tab$" >/dev/null 2>&1; then -+ SYSTEM_ZONEINFODIR=`dirname $SYSTEM_ZONEINFODIR` -+fi -+ - # For the run dialog - gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE - -@@ -228,6 +244,7 @@ po/Makefile.in - applets/Makefile - applets/clock/Makefile - applets/fish/Makefile -+applets/intlclock/Makefile - applets/notification_area/Makefile - applets/wncklet/Makefile - doc/Makefile -Index: applets/Makefile.am -=================================================================== ---- applets/Makefile.am (revision 10212) -+++ applets/Makefile.am (working copy) -@@ -1,6 +1,7 @@ - SUBDIRS = \ - clock \ - fish \ -+ intlclock \ - notification_area \ - wncklet - -Index: applets/clock/GNOME_ClockApplet_Factory.server.in.in -=================================================================== ---- applets/clock/GNOME_ClockApplet_Factory.server.in.in (revision 10212) -+++ applets/clock/GNOME_ClockApplet_Factory.server.in.in (working copy) -@@ -13,7 +13,7 @@ - - </oaf_server> - --<oaf_server iid="OAFIID:GNOME_ClockApplet" -+<oaf_server iid="OAFIID:GNOME_ClassicClockApplet" - type="factory" - location="OAFIID:GNOME_ClockApplet_Factory"> - -Index: applets/clock/clock.c -=================================================================== ---- applets/clock/clock.c (revision 10212) -+++ applets/clock/clock.c (working copy) -@@ -2756,7 +2756,7 @@ clock_factory (PanelApplet *applet, - { - gboolean retval = FALSE; - -- if (!strcmp (iid, "OAFIID:GNOME_ClockApplet")) -+ if (!strcmp (iid, "OAFIID:GNOME_ClassicClockApplet")) - retval = fill_clock_applet (applet); - - return retval; -Index: po/POTFILES.in -=================================================================== ---- po/POTFILES.in (revision 10212) -+++ po/POTFILES.in (working copy) -@@ -11,6 +11,10 @@ applets/fish/GNOME_FishApplet_Factory.se - applets/fish/fish.c - applets/fish/fish.glade - applets/fish/fish.schemas.in -+applets/intlclock/intlclock.c -+applets/intlclock/intlclock.glade -+applets/intlclock/intlclock-location-tile.c -+applets/intlclock/intlclock-ui.c - applets/notification_area/GNOME_NotificationAreaApplet.server.in.in - applets/notification_area/GNOME_NotificationAreaApplet.xml - applets/notification_area/eggtraymanager.c diff --git a/gnome-base/gnome-panel/files/intlclock-applet.tar.bz2 b/gnome-base/gnome-panel/files/intlclock-applet.tar.bz2 Binary files differdeleted file mode 100644 index a704895..0000000 --- a/gnome-base/gnome-panel/files/intlclock-applet.tar.bz2 +++ /dev/null diff --git a/gnome-base/gnome-panel/gnome-panel-2.20.0.1.ebuild b/gnome-base/gnome-panel/gnome-panel-2.20.0.1.ebuild index 368221a..4b3b771 100644 --- a/gnome-base/gnome-panel/gnome-panel-2.20.0.1.ebuild +++ b/gnome-base/gnome-panel/gnome-panel-2.20.0.1.ebuild @@ -10,7 +10,7 @@ HOMEPAGE="http://www.gnome.org/" LICENSE="GPL-2 FDL-1.1 LGPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="doc eds intlclock slab" +IUSE="doc eds slab" RDEPEND=">=gnome-base/gnome-desktop-2.12 >=x11-libs/pango-1.15.4 @@ -56,11 +56,6 @@ src_unpack() { epatch ${FILESDIR}/${PN}-recently-used-apps.patch fi - if use intlclock; then - cd ${S} - tar -xjf ${FILESDIR}/intlclock-applet.tar.bz2 || die - epatch ${FILESDIR}/${PN}-intlclock.patch - fi eautomake } diff --git a/gnome-extra/intlclock-applet/Manifest b/gnome-extra/intlclock-applet/Manifest new file mode 100644 index 0000000..d4b47d4 --- /dev/null +++ b/gnome-extra/intlclock-applet/Manifest @@ -0,0 +1,12 @@ +AUX intlclock-sunpos-gpl.patch 16071 RMD160 76a00b20a18a7b0d4dacf28bbfdf4f8ca00ffe7c SHA1 e69cd3cfc03a1d2d291e10f16450e7a466a0b892 SHA256 680a55ecd34ad2021c085d45f8255c514ef80a22d77bda2e6075141678c1d419 +MD5 2066ccd2e7bffad1203f2abbe7648888 files/intlclock-sunpos-gpl.patch 16071 +RMD160 76a00b20a18a7b0d4dacf28bbfdf4f8ca00ffe7c files/intlclock-sunpos-gpl.patch 16071 +SHA256 680a55ecd34ad2021c085d45f8255c514ef80a22d77bda2e6075141678c1d419 files/intlclock-sunpos-gpl.patch 16071 +DIST intlclock-1.0.tar.gz 605354 RMD160 d463895c794c2dc19f1bd6169903984063369f4b SHA1 29b61d0108a49b2e415aaeb2b71b58ef7804a47f SHA256 8848af9c052c45c5b6304143a22b9ef01d1249db66b30bf0cfdea499a13c7f3a +EBUILD intlclock-applet-1.0.ebuild 993 RMD160 673891b1366c84c4a18d2cca0114a0c6144dfe44 SHA1 ef6b0fa8df7effdae5b95b710d349ec8d5770805 SHA256 42c4061d1f062d3339e1910e7443b79585de24eeb7e75b79c7aa9057a6d6990f +MD5 8bc352f3075ac9fc64ac1dcabda384d2 intlclock-applet-1.0.ebuild 993 +RMD160 673891b1366c84c4a18d2cca0114a0c6144dfe44 intlclock-applet-1.0.ebuild 993 +SHA256 42c4061d1f062d3339e1910e7443b79585de24eeb7e75b79c7aa9057a6d6990f intlclock-applet-1.0.ebuild 993 +MD5 023771a1f08e7b1cfe6320a7496d9cb6 files/digest-intlclock-applet-1.0 241 +RMD160 3e6ac668649d3ee94e2a9b2e302c255b8590815e files/digest-intlclock-applet-1.0 241 +SHA256 9cffc1a24561f00c8181459d53b0153f76790d84fdc811a5f383354c7fc8f62d files/digest-intlclock-applet-1.0 241 diff --git a/gnome-extra/intlclock-applet/files/intlclock-sunpos-gpl.patch b/gnome-extra/intlclock-applet/files/intlclock-sunpos-gpl.patch new file mode 100644 index 0000000..7e8178b --- /dev/null +++ b/gnome-extra/intlclock-applet/files/intlclock-sunpos-gpl.patch @@ -0,0 +1,508 @@ +--- src/intlclock-map.c ++++ src/intlclock-map.c +@@ -516,7 +516,7 @@ + width = gdk_pixbuf_get_width (pixbuf); + height = gdk_pixbuf_get_height (pixbuf); + +- sun_position (now, &sun_lat, &sun_lon); ++ get_sun_position (now, &sun_lat, &sun_lon); + + for (y = 0; y < height; y++) { + gdouble lat = (height / 2.0 - y) / (height / 2.0) * 90.0; +--- src/intlclock-sunpos.c ++++ src/intlclock-sunpos.c +@@ -1,348 +1,189 @@ + /* +- * sunpos.c +- * kirk johnson +- * july 1993 ++ * Copyright (C) 2007 Red Hat, Inc. + * +- * includes revisions from Frank T. Solensky, february 1999 ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * +- * code for calculating the position on the earth's surface for which +- * the sun is directly overhead (adapted from _practical astronomy +- * with your calculator, third edition_, peter duffett-smith, +- * cambridge university press, 1988.) +- * +- * Copyright (C) 1989, 1990, 1993-1995, 1999 Kirk Lauritz Johnson +- * +- * Parts of the source code (as marked) are: +- * Copyright (C) 1989, 1990, 1991 by Jim Frost +- * Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com> +- * +- * Permission to use, copy, modify and freely distribute xearth for +- * non-commercial and not-for-profit purposes is hereby granted +- * without fee, provided that both the above copyright notice and this +- * permission notice appear in all copies and in supporting +- * documentation. +- * +- * Unisys Corporation holds worldwide patent rights on the Lempel Zev +- * Welch (LZW) compression technique employed in the CompuServe GIF +- * image file format as well as in other formats. Unisys has made it +- * clear, however, that it does not require licensing or fees to be +- * paid for freely distributed, non-commercial applications (such as +- * xearth) that employ LZW/GIF technology. Those wishing further +- * information about licensing the LZW patent should contact Unisys +- * directly at (lzw_info@unisys.com) or by writing to +- * +- * Unisys Corporation +- * Welch Licensing Department +- * M/S-C1SW19 +- * P.O. Box 500 +- * Blue Bell, PA 19424 +- * +- * The author makes no representations about the suitability of this +- * software for any purpose. It is provided "as is" without express or +- * implied warranty. +- * +- * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, +- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT +- * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +- */ +- +-#include <assert.h> +-#include <math.h> +-#include <time.h> +- +-#include "intlclock-sunpos.h" +- +-#define TWOPI (2*M_PI) +-#define DegsToRads(x) ((x)*(TWOPI/360)) +- +-/* +- * the epoch upon which these astronomical calculations are based is +- * 1990 january 0.0, 631065600 seconds since the beginning of the +- * "unix epoch" (00:00:00 GMT, Jan. 1, 1970) +- * +- * given a number of seconds since the start of the unix epoch, +- * DaysSinceEpoch() computes the number of days since the start of the +- * astronomical epoch (1990 january 0.0) ++ * AUTHORS: Jonathan Blandford <jrb@redhat.com>, Matthias Clasen <mclasen@redhat.com> + */ + +-#define EpochStart (631065600) +-#define DaysSinceEpoch(secs) (((secs)-EpochStart)*(1.0/(24*3600))) + +-/* +- * assuming the apparent orbit of the sun about the earth is circular, +- * the rate at which the orbit progresses is given by RadsPerDay -- +- * TWOPI radians per orbit divided by 365.242191 days per year: +- */ +- +-#define RadsPerDay (TWOPI/365.242191) ++#include <time.h> ++#include <gtk/gtk.h> ++#include <math.h> + +-/* +- * details of sun's apparent orbit at epoch 1990.0 (after +- * duffett-smith, table 6, section 46) +- * +- * Epsilon_g (ecliptic longitude at epoch 1990.0) 279.403303 degrees +- * OmegaBar_g (ecliptic longitude of perigee) 282.768422 degrees +- * Eccentricity (eccentricity of orbit) 0.016713 ++/* Calculated with the methods and figures from "Practical Astronomy With Your ++ * Calculator, version 3" by Peter Duffet-Smith. + */ ++/* Table 6. Details of the Sun's apparent orbit at epoch 1990.0 */ + +-#define Epsilon_g (DegsToRads(279.403303)) +-#define OmegaBar_g (DegsToRads(282.768422)) +-#define Eccentricity (0.016713) ++#define EPOCH 2447891.5 /* days */ /* epoch 1990 */ ++#define UNIX_EPOCH 2440586.5 /* days */ /* epoch 1970 */ ++#define EPSILON_G 279.403303 /* degrees */ /* ecliptic longitude at epoch 1990.0 */ ++#define PI_G 282.768422 /* degrees */ /* ecliptic longitude at perigree */ ++#define ECCENTRICITY 0.016713 /* eccentricity of orbit */ ++#define R_0 149598500 /* km */ /* semi-major access */ ++#define THETA_0 0.533128 /* degrees */ /* angular diameter at r = r_0 */ ++#define MEAN_OBLIQUITY 23.440592 /* degrees */ /* mean obliquity of earths axis at epoch 1990.0 */ + +-/* +- * MeanObliquity gives the mean obliquity of the earth's axis at epoch +- * 1990.0 (computed as 23.440592 degrees according to the method given +- * in duffett-smith, section 27) +- */ +-#define MeanObliquity (23.440592*(TWOPI/360)) ++/* Constrain x to 0-360 degrees */ ++#define NORMALIZE(x) \ ++ while (x>360) x-=360; while (x<0) x+= 360; + +-/* +- * Lunar parameters, epoch January 0, 1990.0 +- */ +-#define MoonMeanLongitude DegsToRads(318.351648) +-#define MoonMeanLongitudePerigee DegsToRads( 36.340410) +-#define MoonMeanLongitudeNode DegsToRads(318.510107) +-#define MoonInclination DegsToRads( 5.145396) ++#define DEG_TO_RADS(x) \ ++ (x * G_PI/180.0) + +-#define SideralMonth (27.3217) ++#define RADS_TO_DEG(x) \ ++ (x * 180.0/G_PI) + +-/* +- * Force an angular value into the range [-PI, +PI] +- */ +-#define Normalize(x) \ +- do { \ +- if ((x) < -M_PI) \ +- do (x) += TWOPI; while ((x) < -M_PI); \ +- else if ((x) > M_PI) \ +- do (x) -= TWOPI; while ((x) > M_PI); \ +- } while (0) +- +-static double solve_keplers_equation (double); +-static double mean_sun (double); +-static double sun_ecliptic_longitude (time_t); +-static void ecliptic_to_equatorial (double, double, double *, double *); +-static double julian_date (int, int, int); +-static double GST (time_t); +- +-/* +- * solve Kepler's equation via Newton's method +- * (after duffett-smith, section 47) ++/* Calculate number of days since 4713BC. + */ +-static double solve_keplers_equation(M) +- double M; ++static gdouble ++unix_time_to_julian_date (gint unix_time) + { +- double E; +- double delta; +- +- E = M; +- while (1) +- { +- delta = E - Eccentricity*sin(E) - M; +- if (fabs(delta) <= 1e-10) break; +- E -= delta / (1 - Eccentricity*cos(E)); +- } +- +- return E; ++ return UNIX_EPOCH + (double) unix_time / (60 * 60 * 24); + } + ++/* Finds an iterative solution for [ E - e sin (E) = M ] for values of e less ++ than 0.1. Page 90 */ + +-/* +- * Calculate the position of the mean sun: where the sun would +- * be if the earth's orbit were circular instead of ellipictal. +- */ ++#define ERROR_ACCURACY 1e-6 /* radians */ + +-static double mean_sun (D) +- double D; /* days since ephemeris epoch */ ++static gdouble ++solve_keplers_equation (gdouble e, ++ gdouble M) + { +- double N, M; ++ gdouble d, E; + +- N = RadsPerDay * D; +- N = fmod(N, TWOPI); +- if (N < 0) N += TWOPI; +- +- M = N + Epsilon_g - OmegaBar_g; +- if (M < 0) M += TWOPI; +- return M; +-} +- +-/* +- * compute ecliptic longitude of sun (in radians) +- * (after duffett-smith, section 47) +- */ +-static double sun_ecliptic_longitude(ssue) +- time_t ssue; /* seconds since unix epoch */ +-{ +- double D; +- double M_sun, E; +- double v; +- +- D = DaysSinceEpoch(ssue); +- M_sun = mean_sun(D); ++ /* start with an initial estimate */ ++ E = M; ++ ++ d = E - e * sin (E) - M; + +- E = solve_keplers_equation(M_sun); +- v = 2 * atan(sqrt((1+Eccentricity)/(1-Eccentricity)) * tan(E/2)); ++ while (ABS (d) > ERROR_ACCURACY) ++ { ++ E = E - (d / (1 - e * cos (E))); ++ d = E - e * sin (E) - M; ++ } + +- return (v + OmegaBar_g); ++ return E; + } + ++ /* convert the ecliptic longitude to right ascension and declination. Section 27. */ ++static void ++ecliptic_to_equatorial (gdouble lambda, ++ gdouble beta, ++ gdouble *ra, ++ gdouble *dec) ++{ ++ gdouble cos_mo; ++ gdouble sin_mo; ++ ++ g_assert (ra != NULL); ++ g_assert (dec != NULL); ++ ++ sin_mo = sin (DEG_TO_RADS (MEAN_OBLIQUITY)); ++ cos_mo = cos (DEG_TO_RADS (MEAN_OBLIQUITY)); ++ ++ *ra = atan2 (sin (lambda) * cos_mo - tan (beta) * sin_mo, cos (lambda)); ++ *dec = asin (sin (beta) * cos_mo + cos (beta) * sin_mo * sin (lambda)); ++} ++ ++/* calculate GST. Section 12 */ ++static gdouble ++greenwich_sidereal_time (gdouble unix_time) ++{ ++ gdouble u, JD, T, T0, UT; ++ ++ u = fmod (unix_time, 24 * 60 * 60); ++ JD = unix_time_to_julian_date (unix_time - u); ++ T = (JD - 2451545) / 36525; ++ T0 = 6.697374558 + (2400.051336 * T) + (0.000025862 * T * T); ++ T0 = fmod (T0, 24); ++ UT = u / (60 * 60); ++ T0 = T0 + UT * 1.002737909; ++ T0 = fmod (T0, 24); + +-/* +- * convert from ecliptic to equatorial coordinates +- * (after duffett-smith, section 27) +- */ +-static void ecliptic_to_equatorial(lambda, beta, alpha, delta) +- double lambda; /* ecliptic longitude */ +- double beta; /* ecliptic latitude */ +- double *alpha; /* (return) right ascension */ +- double *delta; /* (return) declination */ +-{ +- double sin_e, cos_e; +- +- sin_e = sin(MeanObliquity); +- cos_e = cos(MeanObliquity); +- +- *alpha = atan2(sin(lambda)*cos_e - tan(beta)*sin_e, cos(lambda)); +- *delta = asin(sin(beta)*cos_e + cos(beta)*sin_e*sin(lambda)); ++ return T0; + } + +- +-/* +- * computing julian dates (assuming gregorian calendar, thus this is +- * only valid for dates of 1582 oct 15 or later) +- * (after duffett-smith, section 4) +- */ +-static double julian_date(y, m, d) +- int y; /* year (e.g. 19xx) */ +- int m; /* month (jan=1, feb=2, ...) */ +- int d; /* day of month */ ++/* Calulate the position of the sun at a given time. pages 89-91 */ ++void ++get_sun_position (gint unix_time, gdouble *latitude, gdouble *longitude) + { +- int A, B, C, D; +- double JD; ++ gdouble jd, D, N, M, E, x, v, lambda; ++ gdouble ra, dec, lat, lon; ++ jd = unix_time_to_julian_date (unix_time); + +- /* lazy test to ensure gregorian calendar */ +- assert(y >= 1583); ++ /* Calculate number of days since the epoch */ ++ D = jd - EPOCH; + +- if ((m == 1) || (m == 2)) +- { +- y -= 1; +- m += 12; +- } +- +- A = y / 100; +- B = 2 - A + (A / 4); +- C = 365.25 * y; +- D = 30.6001 * (m + 1); ++ N = D*360/365.242191; + +- JD = B + C + D + d + 1720994.5; ++ /* noramlize to 0 - 360 degrees */ ++ NORMALIZE (N); + +- return JD; +-} ++ /* Step 4: */ ++ M = N + EPSILON_G - PI_G; ++ NORMALIZE (M); + ++ /* Step 5: convert to radians */ ++ M = DEG_TO_RADS (M); + +-/* +- * compute greenwich mean sidereal time (GST) corresponding to a given +- * number of seconds since the unix epoch +- * (after duffett-smith, section 12) +- */ +-static double GST(ssue) +- time_t ssue; /* seconds since unix epoch */ +-{ +- double JD; +- double T, T0; +- double UT; +- struct tm *tm; +- +- tm = gmtime(&ssue); ++ /* Step 6: */ ++ E = solve_keplers_equation (ECCENTRICITY, M); + +- JD = julian_date(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday); +- T = (JD - 2451545) / 36525; ++ /* Step 7: */ ++ x = sqrt ((1 + ECCENTRICITY)/(1 - ECCENTRICITY)) * tan (E/2); + +- T0 = ((T + 2.5862e-5) * T + 2400.051336) * T + 6.697374558; ++ /* Step 8, 9 */ ++ v = 2 * RADS_TO_DEG (atan (x)); ++ NORMALIZE (v); + +- T0 = fmod(T0, 24.0); +- if (T0 < 0) T0 += 24; ++ /* Step 10 */ ++ lambda = v + PI_G; ++ NORMALIZE (lambda); + +- UT = tm->tm_hour + (tm->tm_min + tm->tm_sec / 60.0) / 60.0; ++ /* convert the ecliptic longitude to right ascension and declination */ ++ ecliptic_to_equatorial (DEG_TO_RADS (lambda), 0.0, &ra, &dec); + +- T0 += UT * 1.002737909; +- T0 = fmod(T0, 24.0); +- if (T0 < 0) T0 += 24; ++ ra = ra - (G_PI/12) * greenwich_sidereal_time (unix_time); + +- return T0; ++ *longitude = RADS_TO_DEG (ra); ++ *latitude = RADS_TO_DEG (dec); ++/* ++ NORMALIZE (ra); ++ NORMALIZE (dec); ++*/ + } + +- + /* +- * given a particular time (expressed in seconds since the unix +- * epoch), compute position on the earth (lat, lon) such that sun is +- * directly overhead. +- */ +-void sun_position(ssue, lat, lon) +- time_t ssue; /* seconds since unix epoch */ +- double *lat; /* (return) latitude */ +- double *lon; /* (return) longitude */ ++int ++main (int argc, char *argv[]) + { +- double lambda; +- double alpha, delta; +- double tmp; +- +- lambda = sun_ecliptic_longitude(ssue); +- ecliptic_to_equatorial(lambda, 0.0, &alpha, &delta); +- +- tmp = alpha - (TWOPI/24)*GST(ssue); +- Normalize(tmp); +- *lon = tmp * (360/TWOPI); +- *lat = delta * (360/TWOPI); +-} ++ gint i; ++ gint now; ++ GTimeVal timeval; + ++ gtk_init (&argc, &argv); + +-/* +- * given a particular time (expressed in seconds since the unix +- * epoch), compute position on the earth (lat, lon) such that the +- * moon is directly overhead. +- * +- * Based on duffett-smith **2nd ed** section 61; combines some steps +- * into single expressions to reduce the number of extra variables. +- */ +-void moon_position(ssue, lat, lon) +- time_t ssue; /* seconds since unix epoch */ +- double *lat; /* (return) latitude */ +- double *lon; /* (return) longitude */ +-{ +- double lambda, beta; +- double D, L, Ms, Mm, N, Ev, Ae, Ec, alpha, delta; ++ g_get_current_time (&timeval); ++ now = timeval.tv_sec; ++ ++ for (i = 0; i < now; i += 15 * 60) ++ get_sun_position (i); + +- D = DaysSinceEpoch(ssue); +- lambda = sun_ecliptic_longitude(ssue); +- Ms = mean_sun(D); +- +- L = fmod(D/SideralMonth, 1.0)*TWOPI + MoonMeanLongitude; +- Normalize(L); +- Mm = L - DegsToRads(0.1114041*D) - MoonMeanLongitudePerigee; +- Normalize(Mm); +- N = MoonMeanLongitudeNode - DegsToRads(0.0529539*D); +- Normalize(N); +- Ev = DegsToRads(1.2739) * sin(2.0*(L-lambda)-Mm); +- Ae = DegsToRads(0.1858) * sin(Ms); +- Mm += Ev - Ae - DegsToRads(0.37)*sin(Ms); +- Ec = DegsToRads(6.2886) * sin(Mm); +- L += Ev + Ec - Ae + DegsToRads(0.214) * sin(2.0*Mm); +- L += DegsToRads(0.6583) * sin(2.0*(L-lambda)); +- N -= DegsToRads(0.16) * sin(Ms); +- +- L -= N; +- lambda =(fabs(cos(L)) < 1e-12) ? +- (N + sin(L) * cos(MoonInclination) * M_PI/2) : +- (N + atan2(sin(L) * cos(MoonInclination), cos(L))); +- Normalize(lambda); +- beta = asin(sin(L) * sin(MoonInclination)); +- ecliptic_to_equatorial(lambda, beta, &alpha, &delta); +- alpha -= (TWOPI/24)*GST(ssue); +- Normalize(alpha); +- *lon = alpha * (360/TWOPI); +- *lat = delta * (360/TWOPI); ++ return 0; + } ++*/ +--- src/intlclock-sunpos.h ++++ src/intlclock-sunpos.h +@@ -1 +1,2 @@ +-void sun_position(time_t ssue, double *lat, double *lon); ++void ++get_sun_position (gint unix_time, gdouble *latitude, gdouble *longitude); diff --git a/gnome-extra/intlclock-applet/intlclock-applet-1.0.ebuild b/gnome-extra/intlclock-applet/intlclock-applet-1.0.ebuild new file mode 100644 index 0000000..123bf4c --- /dev/null +++ b/gnome-extra/intlclock-applet/intlclock-applet-1.0.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/fast-user-switch-applet/fast-user-switch-applet-2.18.0.ebuild,v 1.8 2007/08/28 19:34:07 jer Exp $ + +inherit eutils gnome2 + +DESCRIPTION="Enhanced international Clock for the GNOME Panel" +HOMEPAGE="http://www.gnome.org/" +MY_PN="intlclock" +MY_P="${MY_PN}-${PV}" +SRC_URI="http://dev.gentoo.org/~suka/files/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="eds" + +RDEPEND=">=dev-libs/glib-2 + >=x11-libs/gtk+-2 + >=gnome-base/librsvg-2 + >=gnome-base/gconf-2 + >=gnome-base/gnome-panel-2.0 + >=gnome-base/libgnome-2 + eds? ( >=gnome-extra/evolution-data-server-1.6 )" + +DEPEND="${RDEPEND}" + +DOCS="AUTHORS ChangeLog NEWS README" +USE_DESTDIR="1" + +pkg_setup() { + GG2CONF="--disable-scrollkeeper $(use_enable eds)" +} + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${MY_PN}-sunpos-gpl.patch + + gnome2_omf_fix +} |