diff options
author | trevor <trevor@FreeBSD.org> | 2005-03-15 03:46:39 +0000 |
---|---|---|
committer | trevor <trevor@FreeBSD.org> | 2005-03-15 03:46:39 +0000 |
commit | 3b566d72e1065c149cad098aeab7a900cfbe84f9 (patch) | |
tree | 4ee52b96609dc43de1f2134398e5cde8dd6a8efb | |
parent | ab34043ae692a07e66956764baa25e57df30cd4d (diff) | |
download | FreeBSD-ports-3b566d72e1065c149cad098aeab7a900cfbe84f9.zip FreeBSD-ports-3b566d72e1065c149cad098aeab7a900cfbe84f9.tar.gz |
Update to 1.3.2
PR: 77573
Submitted by: Jean-Yves Lefort
-rw-r--r-- | astro/celestia/Makefile | 177 | ||||
-rw-r--r-- | astro/celestia/distinfo | 4 | ||||
-rw-r--r-- | astro/celestia/files/patch-src_celestia_gtkmain.cpp | 72 | ||||
-rw-r--r-- | astro/celestia/files/patch-src_celutil_resmanager.h | 24 |
4 files changed, 199 insertions, 78 deletions
diff --git a/astro/celestia/Makefile b/astro/celestia/Makefile index 33d1a41..620d750 100644 --- a/astro/celestia/Makefile +++ b/astro/celestia/Makefile @@ -6,123 +6,148 @@ # PORTNAME= celestia -PORTVERSION= 1.3.1 +PORTVERSION= 1.3.2 CATEGORIES= astro MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= celestia -MAINTAINER= trevor@FreeBSD.org -COMMENT= Scriptable space flight simulator for X +MAINTAINER= trevor@FreeBSD.org +COMMENT= Scriptable space flight simulator for X -BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash2 -LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ - png.5:${PORTSDIR}/graphics/png \ - glut.3:${PORTSDIR}/graphics/libglut +LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ + png.5:${PORTSDIR}/graphics/png -GNU_CONFIGURE= yes -CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -OPTIONS= KDE "KDE support" off -OPTIONS+= LUA "Lua support" off -PLIST= ${WRKDIR}/pkg-plist -USE_REINPLACE= yes -USE_GMAKE= yes -USE_GL= yes -USE_X_PREFIX= yes - -# GTK+ support is deprecated and broken -CONFIGURE_ARGS= --without-gtk +GNU_CONFIGURE= yes +PLIST= ${WRKDIR}/plist +PORTDOCS= AUTHORS CelestiaKeyAssignments.txt ChangeLog \ + coding-standards.html devguide.txt \ + KbdMouseJoyControls.txt README TODO TRANSLATORS +USE_GMAKE= yes +USE_GL= yes +USE_GNOME= +USE_REINPLACE= yes +USE_X_PREFIX= yes +CONFIGURE_ARGS= --program-prefix="" CONFIGURE_ENV= \ LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib -lm ${PTHREAD_LIBS}" \ CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include ${PTHREAD_CFLAGS}" -.if defined(WITH_KDE) -USE_KDELIBS_VER= 3 -CONFIGURE_ARGS+= --with-kde -.else -CONFIGURE_ARGS+= --without-kde -.endif +OPTIONS= LUA "Lua support" off \ + GLUT "Glut interface" off \ + GTK "Gtk+ interface" off \ + GNOME "GNOME interface" off \ + KDE "KDE interface" off + +.include <bsd.port.pre.mk> .if defined(WITH_LUA) LIB_DEPENDS+= lua.5:${PORTSDIR}/lang/lua CONFIGURE_ARGS+= --with-lua +.endif + +.if defined(WITH_GNOME) +PKGMESSAGE= ${WRKDIR}/message +WITH_GTK= yes # GNOME requires GTK+ +USE_GNOME+= libgnomeui +CONFIGURE_ARGS+= --with-gnome +GCONF_SCHEMAS= celestia.schemas +.endif + +.if defined(WITH_GTK) +USE_GNOME+= gnomehack gnomeprefix gtk20 +LIB_DEPENDS+= gtkglext-x11-1.0:${PORTSDIR}/x11-toolkits/gtkglext +CONFIGURE_ARGS+= --with-gtk +PLIST_SUB+= DATADIR="share/gnome/celestia" .else -CONFIGURE_ARGS+= --without-lua +PLIST_SUB+= DATADIR="share/celestia" .endif -.include <bsd.port.pre.mk> +.if defined(WITH_KDE) +USE_KDELIBS_VER= 3 +CONFIGURE_ARGS+= --with-kde +# KDE_LIBS_VER is defined after including bsd.port.pre.mk, so we need +# to include bsd.kde.mk manually. +.include "${PORTSDIR}/Mk/bsd.kde.mk" +.endif + +.if !defined(WITH_KDE) && !defined(WITH_GTK) && !defined(WITH_GNOME) +WITH_GLUT= yes # an UI is required, fallback to Glut +.endif -.if ${OSVERSION} >= 502126 -BROKEN= "Does not compile on FreeBSD >= 5.x" +.if defined(WITH_GLUT) +CONFIGURE_ARGS+= --with-glut .endif -.if ${ARCH} != "i386" && ${ARCH} != "amd64" -BROKEN= "Does not compile on !i386 and !amd64" +.if defined(WITH_GTK) || defined(WITH_GLUT) +# libglut is only required for Glut and GTK+ interfaces +LIB_DEPENDS+= glut:${PORTSDIR}/graphics/libglut .endif pre-patch: @${REINPLACE_CMD} -e \ -'s:-O2::g; s:-Wall::g; s:-ffast-math::g; s:-fexpensive-optimizations::g; s:! /bin/sh:! ${LOCALBASE}/bin/bash:g' \ - ${WRKSRC}/configure + 's|-O2||g; \ + s|-Wall||g; \ + s|-ffast-math||g; \ + s|-fexpensive-optimizations||g; \ + s|"x" = "y"|"x" = "x"|' \ + ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|COPYING||g' ${WRKSRC}/Makefile.in +.if !defined(WITH_GNOME) + @${REINPLACE_CMD} -e \ + 's|\(install-pkgdataDATA\) install-schemasDATA|\1|; \ + s|\$$(DESTDIR)\$$(schemasdir)||' \ + ${WRKSRC}/src/celestia/gtk/data/Makefile.in +.endif pre-install: - @${ECHO_CMD} bin/celestia > ${PLIST} + @${RM} -f ${PLIST} +.if defined(WITH_GNOME) + @${ECHO_CMD} "The GConf daemon must be restarted with the commands:" \ + >> ${PKGMESSAGE} + @${ECHO_CMD} "gconftool-2 --shutdown && gconftool-2 --spawn" \ + >> ${PKGMESSAGE} + @${ECHO_CMD} share/gnome/applications/celestia.desktop >> ${PLIST} + @${ECHO_CMD} share/gnome/pixmaps/celestia.png >> ${PLIST} +.endif +.for ii in bin/celestia %%DATADIR%%/celestia.png %%DATADIR%%/controls.txt + @${ECHO_CMD} ${ii} >> ${PLIST} +.endfor @${FIND} ${WRKSRC}/data/ -name '*.???' | \ - ${SED} -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} + ${SED} -e "s:^${WRKSRC}/:%%DATADIR%%/:g" >> ${PLIST} @${FIND} ${WRKSRC}/extras/ -name '*.ssc' | \ - ${SED} -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} + ${SED} -e "s:^${WRKSRC}/:%%DATADIR%%/:g" >> ${PLIST} @${FIND} ${WRKSRC}/fonts/ -name '*.txf' | \ - ${SED} -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} + ${SED} -e "s:^${WRKSRC}/:%%DATADIR%%/:g" >> ${PLIST} .for ii in celestia.cfg demo.cel guide.cel start.cel - @${ECHO_CMD} share/celestia/${ii} >> ${PLIST} + @${ECHO_CMD} %%DATADIR%%/${ii} >> ${PLIST} .endfor .if !defined(NOPORTDOCS) -.for ii in AUTHORS ChangeLog README TODO controls.txt - @${ECHO_CMD} share/doc/celestia/${ii} >> ${PLIST} -.endfor @${FIND} ${WRKSRC}/manual/ -name '*.???*' | \ - ${SED} -e "s:^${WRKSRC}/:share/doc/celestia/:g" >> ${PLIST} -.for ii in celestia/manual celestia - @${ECHO_CMD} @dirrm share/doc/${ii} >> ${PLIST} -.endfor + ${SED} -e "s:^${WRKSRC}/:%%DATADIR%%/:g" >> ${PLIST} .endif - @${FIND} ${WRKSRC}/models/ -name '*.???' | \ - ${SED} -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} + @${FIND} ${WRKSRC}/models/ -name '*.???*' | \ + ${SED} -e "s:^${WRKSRC}/:%%DATADIR%%/:g" >> ${PLIST} + @${FIND} ${WRKSRC}/shaders/ -name '*.fp' | \ + ${SED} -e "s:^${WRKSRC}/:%%DATADIR%%/:g" >> ${PLIST} @${FIND} ${WRKSRC}/shaders/ -name '*.vp' | \ - ${SED} -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} + ${SED} -e "s:^${WRKSRC}/:%%DATADIR%%/:g" >> ${PLIST} @${FIND} ${WRKSRC}/textures/ -name '*.jpg' -o -name '*.png'| \ - ${SED} -e "s:^${WRKSRC}/:share/celestia/:g" >> ${PLIST} -.for ii in /data /extras /textures/lores /textures/medres /textures /models \ - /shaders /fonts / - @${ECHO_CMD} @dirrm share/celestia${ii} >> ${PLIST} + ${SED} -e "s:^${WRKSRC}/:%%DATADIR%%/:g" >> ${PLIST} +.for ii in /data /extras /fonts /manual /models /shaders \ + /textures/hires /textures/lores /textures/medres /textures / + @${ECHO_CMD} @dirrm %%DATADIR%%${ii} >> ${PLIST} .endfor -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/src/celestia/celestia ${PREFIX}/bin/ -.for ii in /data /extras /textures/lores /textures/medres /models /shaders \ - /fonts - ${MKDIR} ${DATADIR}${ii} -.endfor - ${INSTALL_DATA} ${WRKSRC}/data/*.??? ${DATADIR}/data/ - ${INSTALL_DATA} ${WRKSRC}/extras/*.ssc ${DATADIR}/extras/ - ${INSTALL_DATA} ${WRKSRC}/fonts/*.txf ${DATADIR}/fonts/ -.for ii in celestia.cfg demo.cel guide.cel start.cel - ${INSTALL_DATA} ${WRKSRC}/${ii} ${DATADIR}/ -.endfor +post-install: .if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR}/manual -.for ii in AUTHORS ChangeLog README TODO controls.txt - ${INSTALL_DATA} ${WRKSRC}/${ii} ${DOCSDIR}/ + ${MKDIR} ${DOCSDIR} +.for ii in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/${ii} ${DOCSDIR} .endfor - ${INSTALL_DATA} ${WRKSRC}/manual/*.???* ${DOCSDIR}/manual/ .endif - ${INSTALL_DATA} ${WRKSRC}/models/*.??? ${DATADIR}/models/ - ${INSTALL_DATA} ${WRKSRC}/shaders/*.vp ${DATADIR}/shaders/ - ${INSTALL_DATA} ${WRKSRC}/textures/*.jpg \ - ${WRKSRC}/textures/*.png ${DATADIR}/textures/ - ${INSTALL_DATA} ${WRKSRC}/textures/lores/*.??? \ - ${DATADIR}/textures/lores/ - ${INSTALL_DATA} ${WRKSRC}/textures/medres/*.??? \ - ${DATADIR}/textures/medres/ +.if defined(WITH_GNOME) + @${CAT} ${PKGMESSAGE} +.endif .include <bsd.port.post.mk> diff --git a/astro/celestia/distinfo b/astro/celestia/distinfo index 4e537e3..61ccd9e 100644 --- a/astro/celestia/distinfo +++ b/astro/celestia/distinfo @@ -1,2 +1,2 @@ -MD5 (celestia-1.3.1.tar.gz) = fcb73c43f5899f8f7e6d0c619a818a8b -SIZE (celestia-1.3.1.tar.gz) = 13291363 +MD5 (celestia-1.3.2.tar.gz) = 0aaf86592a8989a0576e34c1f4cb3c2a +SIZE (celestia-1.3.2.tar.gz) = 18091458 diff --git a/astro/celestia/files/patch-src_celestia_gtkmain.cpp b/astro/celestia/files/patch-src_celestia_gtkmain.cpp new file mode 100644 index 0000000..5d66276 --- /dev/null +++ b/astro/celestia/files/patch-src_celestia_gtkmain.cpp @@ -0,0 +1,72 @@ +$FreeBSD$ + +author: Jean-Yves Lefort + +--- src/celestia/gtkmain.cpp.orig Tue Feb 15 19:00:43 2005 ++++ src/celestia/gtkmain.cpp Tue Feb 15 19:16:55 2005 +@@ -54,6 +54,10 @@ + + using namespace std; + ++// Linux compatibility ++static int daylight = 0; ++static long linux_timezone = 0; ++ + char AppName[] = "Celestia"; + + static CelestiaCore* appCore = NULL; +@@ -274,7 +278,7 @@ + { + if (appCore->getTimeZoneBias() == 0) + { +- appCore->setTimeZoneBias(-timezone + 3600 * daylight); ++ appCore->setTimeZoneBias(-linux_timezone + 3600 * daylight); + appCore->setTimeZoneName(tzname[daylight]); + prefs->showLocalTime = TRUE; + } +@@ -3391,7 +3395,7 @@ + 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->setTimeZoneBias(-linux_timezone + 3600 * daylight); + appCore->setTimeZoneName(tzname[daylight]); + timeOptions[1]=tzname[daylight]; + +@@ -3967,7 +3971,7 @@ + appCore->getRenderer()->setStarStyle(p->starStyle); + appCore->setHudDetail(p->hudDetail); + if (p->showLocalTime) { +- appCore->setTimeZoneBias(-timezone + 3600 * daylight); ++ appCore->setTimeZoneBias(-linux_timezone + 3600 * daylight); + appCore->setTimeZoneName(tzname[daylight]); + } + else { +@@ -4067,7 +4071,7 @@ + void confShowLocalTime(GConfClient* c, guint, GConfEntry* e, gpointer) { + prefs->showLocalTime = gconf_client_get_bool(c, gconf_entry_get_key(e), NULL); + if (prefs->showLocalTime) { +- appCore->setTimeZoneBias(-timezone + 3600 * daylight); ++ appCore->setTimeZoneBias(-linux_timezone + 3600 * daylight); + appCore->setTimeZoneName(tzname[daylight]); + } + else { +@@ -4126,6 +4130,18 @@ + // MAIN + int main(int argc, char* argv[]) + { ++ time_t now; ++ struct tm *tm; ++ ++ // provide Linux's daylight and timezone ++ now = time(NULL); ++ if (now >= 0) ++ { ++ tm = localtime(&now); ++ daylight = tm->tm_isdst; ++ linux_timezone = tm->tm_gmtoff; ++ } ++ + // Say we're not ready to render yet. + bReady = false; + diff --git a/astro/celestia/files/patch-src_celutil_resmanager.h b/astro/celestia/files/patch-src_celutil_resmanager.h new file mode 100644 index 0000000..968bfb7 --- /dev/null +++ b/astro/celestia/files/patch-src_celutil_resmanager.h @@ -0,0 +1,24 @@ +$FreeBSD$ + +author: Jean-Yves Lefort + +--- src/celutil/resmanager.h.orig Tue Feb 15 18:52:35 2005 ++++ src/celutil/resmanager.h Tue Feb 15 18:57:38 2005 +@@ -72,7 +72,7 @@ + { + ResourceHandle h = handles.size(); + resources.insert(resources.end(), info); +- handles.insert(ResourceHandleMap::value_type(info, h)); ++ handles.insert(typename ResourceHandleMap::value_type(info, h)); + return h; + } + } +@@ -105,7 +105,7 @@ + else + { + resources[h].state = ResourceLoaded; +- loadedResources.insert(NameMap::value_type(resources[h].resolvedName, resources[h].resource)); ++ loadedResources.insert(typename NameMap::value_type(resources[h].resolvedName, resources[h].resource)); + } + } + } |