2013-01-27 00:55:20 -05:00
|
|
|
# Created by: trevor
|
2002-05-17 23:24:20 -04:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2006-05-04 08:38:37 -04:00
|
|
|
PORTNAME= celestia
|
2011-07-25 01:15:36 -04:00
|
|
|
PORTVERSION= 1.6.1
|
Bump PORTREVISION for ports depending on the canonical version of GCC
as defined in Mk/bsd.default-versions.mk which has moved from GCC 8.3
to GCC 9.1 under most circumstances now after revision 507371.
This includes ports
- with USE_GCC=yes or USE_GCC=any,
- with USES=fortran,
- using Mk/bsd.octave.mk which in turn features USES=fortran, and
- with USES=compiler specifying openmp, nestedfct, c11, c++0x, c++11-lang,
c++11-lib, c++14-lang, c++17-lang, or gcc-c++11-lib
plus, everything INDEX-11 shows with a dependency on lang/gcc9 now.
PR: 238330
2019-07-26 16:46:53 -04:00
|
|
|
PORTREVISION= 11
|
2006-05-04 08:38:37 -04:00
|
|
|
CATEGORIES= astro
|
2009-08-21 20:13:26 -04:00
|
|
|
MASTER_SITES= SF/${PORTNAME}/Celestia-source/${PORTVERSION}
|
2006-05-04 08:38:37 -04:00
|
|
|
PKGNAMESUFFIX= -${CELESTIA_UI}
|
2002-05-17 23:24:20 -04:00
|
|
|
|
2008-04-29 03:55:23 -04:00
|
|
|
MAINTAINER= danfe@FreeBSD.org
|
2013-07-05 10:30:00 -04:00
|
|
|
COMMENT= Scriptable space flight simulator for X11
|
2002-05-17 23:24:20 -04:00
|
|
|
|
2011-03-18 05:28:59 -04:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2016-04-01 09:29:15 -04:00
|
|
|
LIB_DEPENDS= libpng.so:graphics/png
|
2002-05-17 23:24:20 -04:00
|
|
|
|
2020-04-14 11:49:36 -04:00
|
|
|
USES= compiler:c++11-lang gettext gl gmake jpeg libtool lua:52 pkgconfig
|
2011-07-25 01:15:36 -04:00
|
|
|
USE_GL= gl
|
2014-04-28 11:55:51 -04:00
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
EXTRA_PATCHES= ${FILESDIR}/celestia-1.6.1-lua-5.2.patch:-p1 \
|
2014-12-14 08:23:35 -05:00
|
|
|
${FILESDIR}/celestia-lua-52-fix.patch:-p1 \
|
2014-04-28 11:55:51 -04:00
|
|
|
${FILESDIR}/celestia-1.6.1-gcc47.patch:-p1 \
|
|
|
|
${FILESDIR}/celestia-1.6.1-gcc48.patch:-p1
|
2004-03-17 18:08:20 -05:00
|
|
|
|
2011-07-25 01:15:36 -04:00
|
|
|
CXXFLAGS+= -fsigned-char # fix text rendering (see Gentoo bug 316573)
|
2013-02-07 10:37:15 -05:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib -pthread
|
2004-03-17 18:08:20 -05:00
|
|
|
|
2013-07-05 10:30:00 -04:00
|
|
|
UI_LIST= glut gtk gnome
|
2006-05-04 08:38:37 -04:00
|
|
|
CELESTIA_UI?= glut
|
2009-08-16 02:17:25 -04:00
|
|
|
CONFLICTS= ${UI_LIST:S|${CELESTIA_UI}||:S|^|celestia-|:S|$|-[0-9]*|}
|
2005-03-14 22:46:39 -05:00
|
|
|
|
2009-08-17 16:37:54 -04:00
|
|
|
# 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;
|
2013-07-05 10:30:00 -04:00
|
|
|
# gnome Full GTK interface plus a few GNOME integration goodies, such as
|
2009-08-17 16:37:54 -04:00
|
|
|
# preference saving in GConf (this looks and works very much like
|
2013-07-05 10:30:00 -04:00
|
|
|
# the Windows interface).
|
2009-08-17 16:37:54 -04:00
|
|
|
#
|
2006-05-04 08:38:37 -04:00
|
|
|
.if ${CELESTIA_UI} == "glut"
|
|
|
|
CONFIGURE_ARGS+= --with-glut
|
2009-01-23 11:28:36 -05:00
|
|
|
USE_GL+= glut
|
2014-04-28 11:55:51 -04:00
|
|
|
LDFLAGS+= -lGL
|
2006-05-04 08:38:37 -04:00
|
|
|
.elif ${CELESTIA_UI} == "gtk"
|
|
|
|
CONFIGURE_ARGS+= --with-gtk
|
2018-10-28 07:16:35 -04:00
|
|
|
USES+= gnome
|
2006-05-04 08:38:37 -04:00
|
|
|
USE_GNOME+= gtk20
|
2014-04-29 03:24:54 -04:00
|
|
|
PLIST_FILES= share/applications/celestia.desktop
|
2006-05-04 08:38:37 -04:00
|
|
|
.elif ${CELESTIA_UI} == "gnome"
|
2010-05-21 23:22:55 -04:00
|
|
|
CATEGORIES+= gnome
|
2005-03-14 22:46:39 -05:00
|
|
|
CONFIGURE_ARGS+= --with-gnome
|
2006-05-04 08:38:37 -04:00
|
|
|
USE_GNOME+= libgnomeui
|
|
|
|
GCONF_SCHEMAS= celestia.schemas
|
2014-04-28 11:55:51 -04:00
|
|
|
PLIST_FILES= share/applications/celestia.desktop
|
2006-05-04 08:38:37 -04:00
|
|
|
.else
|
2009-08-16 02:17:25 -04:00
|
|
|
IGNORE= requires one of the <${UI_LIST}> values for CELESTIA_UI
|
2005-03-14 22:46:39 -05:00
|
|
|
.endif
|
|
|
|
|
2006-05-04 08:38:37 -04:00
|
|
|
.if ${CELESTIA_UI} == "gtk" || ${CELESTIA_UI} == "gnome"
|
2014-04-28 11:55:51 -04:00
|
|
|
USES+= pathfix
|
2016-04-01 09:29:15 -04:00
|
|
|
LIB_DEPENDS+= libgtkglext-x11-1.0.so:x11-toolkits/gtkglext \
|
|
|
|
libtheora.so:multimedia/libtheora
|
2006-05-04 08:38:37 -04:00
|
|
|
STARTUP_NOTIFY= true
|
|
|
|
PLIST_FILES+= share/celestia/celestia-logo.png share/celestia/celestiaui.xml
|
2004-03-17 18:08:20 -05:00
|
|
|
.else
|
2006-05-04 08:38:37 -04:00
|
|
|
STARTUP_NOTIFY= false
|
2003-08-30 23:58:53 -04:00
|
|
|
.endif
|
2002-05-17 23:24:20 -04:00
|
|
|
|
2009-08-16 02:17:25 -04:00
|
|
|
PORTDOCS= AUTHORS ChangeLog README
|
2005-03-14 22:46:39 -05:00
|
|
|
|
2013-07-05 10:30:00 -04:00
|
|
|
OPTIONS_DEFINE= DOCS
|
|
|
|
|
2011-07-25 01:15:36 -04:00
|
|
|
post-patch:
|
2018-01-16 09:31:17 -05:00
|
|
|
@${REINPLACE_CMD} -E '/fav(->|\.)fov/s|NULL|0.0|' \
|
|
|
|
${WRKSRC}/src/celestia/celestiacore.cpp \
|
|
|
|
${WRKSRC}/src/celestia/favorites.cpp
|
2020-08-27 04:11:18 -04:00
|
|
|
@${REINPLACE_CMD} -e '280s,NULL,false,' \
|
|
|
|
${WRKSRC}/src/celengine/parseobject.cpp
|
2011-07-25 01:15:36 -04:00
|
|
|
# Fix Lua discovery pkg-config(1) calls
|
|
|
|
@${REINPLACE_CMD} -E 's|lua5\.?|lua-5.|' ${WRKSRC}/configure
|
|
|
|
# Remove controversial compiler options (respect our C[XX]FLAGS)
|
2009-08-16 02:17:25 -04:00
|
|
|
.for o in O2 ffast-math fexpensive-optimizations fomit-frame-pointer
|
|
|
|
@${REINPLACE_CMD} -e 's|-${o}||g' ${WRKSRC}/configure
|
2002-05-17 23:24:20 -04:00
|
|
|
.endfor
|
2011-07-25 01:15:36 -04:00
|
|
|
# Allow add-ons to be placed inside user's home directory
|
|
|
|
@${REINPLACE_CMD} -e '/^#/!s|"extras"|& "~/.celestia"|' \
|
|
|
|
${WRKSRC}/celestia.cfg
|
2011-03-18 05:28:59 -04:00
|
|
|
# Inhibit installation of copies of GPL (lots of them; use LICENSE framework
|
|
|
|
# instead) and remove bogus argument from mv(1)
|
2009-08-17 16:37:54 -04:00
|
|
|
@${REINPLACE_CMD} -e 's|COPYING||g ; s| -b|| ' ${WRKSRC}/Makefile.in
|
2009-08-16 02:17:25 -04:00
|
|
|
@${REINPLACE_CMD} -e 's|=.*COPYING_\*)|=| ; \
|
|
|
|
/KDE_DIST/s|COPYING_[^ ]* ||g' ${WRKSRC}/locale/Makefile.in
|
2009-08-17 16:37:54 -04:00
|
|
|
@${REINPLACE_CMD} -e 's|kde_libs_htmldir|kde_htmldir|' \
|
|
|
|
${WRKSRC}/src/celestia/kde/doc/celestia/Makefile.in
|
2002-05-17 23:24:20 -04:00
|
|
|
|
2005-03-14 22:46:39 -05:00
|
|
|
post-install:
|
2009-08-17 16:37:54 -04:00
|
|
|
# Technically, we should only install icon explicitly for GLUT UI, since
|
|
|
|
# correct icons are properly installed for other cases, but doing it here
|
2011-07-25 01:15:36 -04:00
|
|
|
# does not hurt and simplifies PLIST handling
|
2006-05-04 08:38:37 -04:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/src/celestia/gtk/data/celestia.png \
|
2014-04-28 11:55:51 -04:00
|
|
|
${STAGEDIR}${PREFIX}/share/pixmaps
|
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
|
2002-05-17 23:24:20 -04:00
|
|
|
|
2009-08-16 02:17:25 -04:00
|
|
|
.include <bsd.port.mk>
|