Page 1 of 1

Celestia v1.2.5 under FreeBSD, compiling patches

Posted: 31.03.2003, 15:58
by gef
Not that the respective people can't do it on their own,
but maybe someone is still asking for this...

cheers,
Fotis

In distfile, change this line:
MD5 (celestia-1.2.5.tar.gz) = 23b525a431cf9be66f4f943c131a47bb

In Makefile, change this line:
PORTVERSION= 1.2.5

And fix the following 2 files

# replacement for file "patch-src_celestia_glutmain.cpp"
--- src/celestia/glutmain.cpp.orig Tue Jan 7 17:36:57 2003
+++ src/celestia/glutmain.cpp Fri Feb 7 22:29:05 2003
@@ -511,7 +511,7 @@
// Set the simulation starting time to the current system time
time_t curtime=time(NULL);
appCore->start((double) curtime / 86400.0 + (double) astro::Date(1970, 1, 1));
- #ifdef MACOSX
+ #if defined(MACOSX) || defined(__FreeBSD__)
/* localtime in Darwin is is reentrant only
equiv to Linux localtime_r()
should probably port !MACOSX code to use this too, available since

# replacement for file "patch-src_celestia_gtkmain.cpp"
--- src/celestia/gtkmain.cpp.orig Tue Jan 7 17:36:57 2003
+++ src/celestia/gtkmain.cpp Fri Feb 7 22:47:04 2003
@@ -302,17 +302,8 @@

static gint menuShowLocTime(GtkWidget* w, gpointer data)
{
- bool on = (appCore->getTimeZoneBias()==0);
- if (on)
- {
- appCore->setTimeZoneBias(-timezone + 3600 * daylight);
- appCore->setTimeZoneName(tzname[daylight]);
- }
- else
- {
appCore->setTimeZoneBias(0);
appCore->setTimeZoneName("UTC");
- }
return TRUE;
}

@@ -2110,9 +2101,11 @@
appCore->start((double) curtime / 86400.0 + (double) astro::Date(1970, 1, 1));
localtime(&curtime); /* Only doing this to set timezone as a side
effect*/
- appCore->setTimeZoneBias(-timezone + 3600 * daylight);
- appCore->setTimeZoneName(tzname[daylight]);
- timeOptions[1]=tzname[daylight];
+ /* appCore->setTimeZoneBias(-timezone + 3600 * daylight);
+ * appCore->setTimeZoneName(tzname[daylight]);
+ * timeOptions[1]=tzname[daylight]; */
+ appCore->setTimeZoneBias(localtime(&curtime)->tm_gmtoff);
+ appCore->setTimeZoneName(localtime(&curtime)->tm_zone);
}

return TRUE;