blob: 7304beff46e4091b426406794b07e6f543f9c3b4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
# New ports collection makefile for: celestia
# Date created: 2002-05-17
# Whom: trevor
#
# $FreeBSD$
#
PORTNAME= celestia
PORTVERSION= 1.4.1
PORTREVISION= 2
CATEGORIES= astro
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= celestia
PKGNAMESUFFIX= -${CELESTIA_UI}
MAINTAINER= jylefort@FreeBSD.org
COMMENT= Scriptable space flight simulator for X
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
png.5:${PORTSDIR}/graphics/png
USE_AUTOTOOLS= libtool:15
USE_GMAKE= yes
USE_GL= yes
USE_GETTEXT= yes
WANT_GNOME= yes
CONFIGURE_ARGS= --program-prefix=""
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CPPFLAGS= -I${X11BASE}/include -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
LDFLAGS= -L${X11BASE}/lib -L${LOCALBASE}/lib -lm ${PTHREAD_LIBS}
UI_LIST= glut gtk gnome
CELESTIA_UI?= glut
CONFLICTS= ${UI_LIST:S|${CELESTIA_UI}||:S|^|celestia-|:S|$|-[0-9]*|} # lol
.if ${CELESTIA_UI} == "glut"
CONFIGURE_ARGS+= --with-glut
LIB_DEPENDS+= glut:${PORTSDIR}/graphics/libglut
.elif ${CELESTIA_UI} == "gtk"
CONFIGURE_ARGS+= --with-gtk
USE_GNOME+= gtk20
.elif ${CELESTIA_UI} == "gnome"
CONFIGURE_ARGS+= --with-gnome
USE_GNOME+= libgnomeui
GCONF_SCHEMAS= celestia.schemas
.else
IGNORE= invalid CELESTIA_UI value "${CELESTIA_UI}" -- valid values are ${UI_LIST}
.endif
.if ${CELESTIA_UI} == "gtk" || ${CELESTIA_UI} == "gnome"
USE_GNOME+= gnomehack
LIB_DEPENDS+= gtkglext-x11-1.0:${PORTSDIR}/x11-toolkits/gtkglext
STARTUP_NOTIFY= true
PLIST_FILES+= share/celestia/celestia-logo.png share/celestia/celestiaui.xml
.else
STARTUP_NOTIFY= false
.endif
PORTDOCS= AUTHORS CelestiaKeyAssignments.txt ChangeLog \
KbdMouseJoyControls.txt README TODO TRANSLATORS \
coding-standards.html devguide.txt
DESKTOP_ENTRIES="Celestia" \
"Explore space" \
"celestia.png" \
"celestia" \
"Application;Astronomy;Science;Education;" \
${STARTUP_NOTIFY}
OPTIONS= LUA "Lua support" on
.include <bsd.port.pre.mk>
.if defined(WITH_LUA)
USE_LUA= 5.0
CONFIGURE_ARGS+= --with-lua
CPPFLAGS+= -I${LUA_INCDIR}
LDFLAGS+= -L${LUA_LIBDIR}
.endif
pre-patch:
.for o in -O2 -Wall -ffast-math -fexpensive-optimizations -fomit-frame-pointer
@${REINPLACE_CMD} -e 's|${o}||g' ${WRKSRC}/configure
.endfor
@${REINPLACE_CMD} -e 's|COPYING||g' ${WRKSRC}/Makefile.in
post-install:
${MKDIR} ${PREFIX}/share/pixmaps
${INSTALL_DATA} ${WRKSRC}/src/celestia/gtk/data/celestia.png \
${PREFIX}/share/pixmaps
.for m in apollo cassini galileo gemini hubble iss marsglobalsurvr \
marsodyssey mercury7 mir skylab
${INSTALL_DATA} ${WRKSRC}/models/${m}.3ds \
${PREFIX}/share/celestia/models
.endfor
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
.endif
.include <bsd.port.post.mk>
|