aboutsummaryrefslogtreecommitdiff
path: root/astro/celestia
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2009-08-17 20:37:54 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2009-08-17 20:37:54 +0000
commit8ab154477490b5f4be3ea83d51bcbc3354c08068 (patch)
tree02c873d517a3592ebe26f301c137d6fbf160153f /astro/celestia
parent9dacec7d4b1173fa3e576f89f8d8da89fee3dcd6 (diff)
downloadports-8ab154477490b5f4be3ea83d51bcbc3354c08068.tar.gz
ports-8ab154477490b5f4be3ea83d51bcbc3354c08068.zip
- Allow to build with KDE3 frontend
- Add some commentary to Makefile
Notes
Notes: svn path=/head/; revision=239809
Diffstat (limited to 'astro/celestia')
-rw-r--r--astro/celestia/Makefile37
-rw-r--r--astro/celestia/files/patch-src_celestia_kde_kdeapp.cpp19
-rw-r--r--astro/celestia/files/patch-src_celestia_kde_kdeglwidget.cpp19
-rw-r--r--astro/celestia/pkg-plist56
4 files changed, 128 insertions, 3 deletions
diff --git a/astro/celestia/Makefile b/astro/celestia/Makefile
index f0cd9a29983d..58f6e55a6c63 100644
--- a/astro/celestia/Makefile
+++ b/astro/celestia/Makefile
@@ -27,10 +27,23 @@ WANT_GNOME= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
-UI_LIST= glut gtk gnome
+UI_LIST= glut gtk gnome kde
CELESTIA_UI?= glut
CONFLICTS= ${UI_LIST:S|${CELESTIA_UI}||:S|^|celestia-|:S|$|-[0-9]*|}
+# Celestia provides different UI frontends; you should pick one that suits
+# you best by setting CELESTIA_UI variable. Possible values are:
+#
+# glut Bare-boned minimal GLUT-based core with no toolbar or menu (this is
+# the default one);
+# gtk Full interface with minimal dependencies: adds menu, configuration
+# dialog, some other utilities;
+# gnome Full GTK interface plus a few Gnome integration goodies, such as
+# preference saving in GConf (this looks and works very much like
+# the Windows interface);
+# kde Probably the richest of all: brings contextual menus, toolbars,
+# KDE integration, internationalization, bookmarks, etc.
+#
.if ${CELESTIA_UI} == "glut"
CONFIGURE_ARGS+= --with-glut
USE_GL+= glut
@@ -41,6 +54,11 @@ USE_GNOME+= gtk20
CONFIGURE_ARGS+= --with-gnome
USE_GNOME+= libgnomeui
GCONF_SCHEMAS= celestia.schemas
+.elif ${CELESTIA_UI} == "kde"
+CONFIGURE_ARGS+= --with-kde
+USE_QT_VER= 3
+USE_KDELIBS_VER= 3
+INSTALLS_ICONS= yes
.else
IGNORE= requires one of the <${UI_LIST}> values for CELESTIA_UI
.endif
@@ -54,6 +72,12 @@ PLIST_FILES+= share/celestia/celestia-logo.png share/celestia/celestiaui.xml
.else
STARTUP_NOTIFY= false
.endif
+.if ${CELESTIA_UI} == "kde"
+LIB_DEPENDS+= theora.0:${PORTSDIR}/multimedia/libtheora
+PLIST_SUB+= KDE=""
+.else
+PLIST_SUB+= KDE="@comment "
+.endif
PORTDOCS= AUTHORS ChangeLog README
@@ -64,6 +88,7 @@ DESKTOP_ENTRIES="Celestia" \
"Application;Astronomy;Education;Science;" \
${STARTUP_NOTIFY}
+# Lua support should be optional, but the build fails without it
USE_LUA= 5.0+
CONFIGURE_ARGS+= --with-lua LUA_CFLAGS=-I${LUA_INCDIR} \
LUA_LIBS=-L${LUA_LIBDIR} LUALIB_LIBS=-llua
@@ -72,12 +97,18 @@ pre-patch:
.for o in O2 ffast-math fexpensive-optimizations fomit-frame-pointer
@${REINPLACE_CMD} -e 's|-${o}||g' ${WRKSRC}/configure
.endfor
-# Inhibit installation of copies of GPL (lots of them!)
- @${REINPLACE_CMD} -e 's|COPYING||g' ${WRKSRC}/Makefile.in
+# Inhibit installation of copies of GPL (lots of them!) and remove bogus
+# argument from mv(1)
+ @${REINPLACE_CMD} -e 's|COPYING||g ; s| -b|| ' ${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's|=.*COPYING_\*)|=| ; \
/KDE_DIST/s|COPYING_[^ ]* ||g' ${WRKSRC}/locale/Makefile.in
+ @${REINPLACE_CMD} -e 's|kde_libs_htmldir|kde_htmldir|' \
+ ${WRKSRC}/src/celestia/kde/doc/celestia/Makefile.in
post-install:
+# Technically, we should only install icon explicitly for GLUT UI, since
+# correct icons are properly installed for other cases, but doing it here
+# does not hurt and simplifies PLIST issues
${INSTALL_DATA} ${WRKSRC}/src/celestia/gtk/data/celestia.png \
${PREFIX}/share/pixmaps
.if !defined(NOPORTDOCS)
diff --git a/astro/celestia/files/patch-src_celestia_kde_kdeapp.cpp b/astro/celestia/files/patch-src_celestia_kde_kdeapp.cpp
new file mode 100644
index 000000000000..919c693d7808
--- /dev/null
+++ b/astro/celestia/files/patch-src_celestia_kde_kdeapp.cpp
@@ -0,0 +1,19 @@
+--- src/celestia/kde/kdeapp.cpp.orig 2009-06-22 22:44:21
++++ src/celestia/kde/kdeapp.cpp 2009-08-17 22:04:54
+@@ -1367,8 +1367,16 @@
+ appCore->setTimeZoneBias(0);
+ appCore->setTimeZoneName(i18n("UTC").latin1());
+ } else {
++#if defined(__FreeBSD__)
++ /* FreeBSD does not export raw `timezone' and `daylight' values */
++ time_t curtime = time(NULL);
++ struct tm *temptime = localtime(&curtime);
++ appCore->setTimeZoneBias(temptime->tm_gmtoff);
++ appCore->setTimeZoneName(temptime->tm_zone);
++#else
+ appCore->setTimeZoneBias(-timezone+3600*daylight);
+ appCore->setTimeZoneName(tzname[daylight?0:1]);
++#endif
+ }
+ }
+
diff --git a/astro/celestia/files/patch-src_celestia_kde_kdeglwidget.cpp b/astro/celestia/files/patch-src_celestia_kde_kdeglwidget.cpp
new file mode 100644
index 000000000000..eb0fb8c1ec9c
--- /dev/null
+++ b/astro/celestia/files/patch-src_celestia_kde_kdeglwidget.cpp
@@ -0,0 +1,19 @@
+--- src/celestia/kde/kdeglwidget.cpp.orig 2009-06-22 22:44:21
++++ src/celestia/kde/kdeglwidget.cpp 2009-08-17 13:30:31
+@@ -106,9 +106,16 @@
+
+ time_t curtime=time(NULL);
+ appCore->start(astro::UTCtoTDB((double) curtime / 86400.0 + (double) astro::Date(1970, 1, 1)));
++#if defined(__FreeBSD__)
++ /* FreeBSD does not export raw `timezone' and `daylight' values */
++ struct tm *temptime = localtime(&curtime);
++ appCore->setTimeZoneBias(temptime->tm_gmtoff);
++ appCore->setTimeZoneName(temptime->tm_zone);
++#else
+ localtime(&curtime); /* Only doing this to set timezone as a side effect*/
+ appCore->setTimeZoneBias(-timezone+3600*daylight);
+ appCore->setTimeZoneName(tzname[daylight?0:1]);
++#endif
+ appCore->tick();
+
+ KGlobal::config()->setGroup("Preferences");
diff --git a/astro/celestia/pkg-plist b/astro/celestia/pkg-plist
index e33005d7e9c4..b1fe9c51ef7a 100644
--- a/astro/celestia/pkg-plist
+++ b/astro/celestia/pkg-plist
@@ -515,6 +515,62 @@ share/locale/uk/LC_MESSAGES/celestia_constellations.mo
share/locale/zh_CN/LC_MESSAGES/celestia.mo
share/locale/zh_CN/LC_MESSAGES/celestia_constellations.mo
share/pixmaps/celestia.png
+%%KDE%%share/applnk/Edutainment/Science/celestia.desktop
+%%KDE%%share/apps/celestia
+%%KDE%%share/celestia/bookmarks.xml
+%%KDE%%share/celestia/celestiaui.rc
+%%KDE%%share/celestia/favicons/celestia_20020830192652097.png
+%%KDE%%share/celestia/favicons/celestia_20020830192655186.png
+%%KDE%%share/celestia/favicons/celestia_20021210223316001.png
+%%KDE%%share/celestia/favicons/celestia_20021212191412299.png
+%%KDE%%share/celestia/favicons/celestia_20021215164511359.png
+%%KDE%%share/celestia/favicons/celestia_20021215164726547.png
+%%KDE%%share/celestia/favicons/celestia_20021215170159036.png
+%%KDE%%share/celestia/favicons/celestia_20030106235954721.png
+%%KDE%%share/config/celestiarc
+%%KDE%%share/doc/HTML/en/celestia/fig1.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig10.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig11.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig12.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig13.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig14.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig15.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig16.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig17.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig18.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig19.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig2.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig20.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig21.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig22.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig221.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig23.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig24.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig25.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig26.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig27.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig28.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig29.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig3.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig30.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig4.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig5.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig6.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig7.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig8.jpg
+%%KDE%%share/doc/HTML/en/celestia/fig9.jpg
+%%KDE%%share/doc/HTML/en/celestia/index.cache.bz2
+%%KDE%%share/doc/HTML/en/celestia/index.docbook
+%%KDE%%share/doc/HTML/en/celestia/common
+%%KDE%%share/icons/hicolor/16x16/apps/celestia.png
+%%KDE%%share/icons/hicolor/22x22/apps/celestia.png
+%%KDE%%share/icons/hicolor/32x32/apps/celestia.png
+%%KDE%%share/icons/hicolor/48x48/apps/celestia.png
+%%KDE%%share/mimelnk/application/x-celestia-script.desktop
+%%KDE%%share/services/celestia.protocol
+%%KDE%%@dirrm share/doc/HTML/en/celestia
+%%KDE%%@dirrm share/celestia/favicons
+%%KDE%%@dirrm share/applnk/Edutainment/Science
@dirrm share/celestia/textures/medres
@dirrm share/celestia/textures/lores
@dirrm share/celestia/textures/hires