summaryrefslogtreecommitdiffstats
path: root/devel/godot/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'devel/godot/Makefile')
-rw-r--r--devel/godot/Makefile120
1 files changed, 69 insertions, 51 deletions
diff --git a/devel/godot/Makefile b/devel/godot/Makefile
index c959348..eb4dc55 100644
--- a/devel/godot/Makefile
+++ b/devel/godot/Makefile
@@ -2,76 +2,94 @@
# $FreeBSD$
PORTNAME= godot
-PORTVERSION= 2.0.3
+PORTVERSION= 2.1
DISTVERSIONSUFFIX= -stable
CATEGORIES= devel games
MAINTAINER= FreeBSD@Shaneware.biz
-COMMENT= Game engine and development environment
+COMMENT?= Game runtime engine
-LICENSE= MIT
+LICENSE= MIT CCBYv3
+LICENSE_COMB= multi
+LICENSE_NAME_CCBYv3= Creative Commons Attribution 3.0 Unported license
+LICENSE_FILE_CCBYv3= ${WRKSRC}/LOGO_LICENSE.md
+LICENSE_FILE_MIT= ${WRKSRC}/LICENSE.md
+LICENSE_PERMS_CCBYv3= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
-LIB_DEPENDS= libfreetype.so:print/freetype2 \
- libasound.so:audio/alsa-lib
+LIB_DEPENDS= libfreetype.so:print/freetype2
+RUN_DEPENDS= xdg-user-dir:devel/xdg-user-dirs \
+ xdg-open:devel/xdg-utils \
+ xmessage:x11/xmessage
USE_GITHUB= yes
GH_ACCOUNT= godotengine
-USES= scons pkgconfig compiler
-USE_XORG= x11 xcursor xinerama
-USE_GL= glu
-USE_OPENSSL= yes
+USES= compiler:c++11-lib pkgconfig scons ssl
+USE_XORG= x11 xcursor xinerama xrandr
+USE_GL= gl
MAKE_ARGS+= platform=x11
-CXXFLAGS+= -DRTAUDIO_ENABLED
+MAKE_ARGS+= ${MAKE_ARGS_${CHOSEN_COMPILER_TYPE}}
+MAKE_ARGS_clang= use_llvm=yes
+CXXFLAGS+= -DGLEW_NO_GLU -DRTAUDIO_ENABLED
+CXXFLAGS_i386= ${CXXFLAGS_i386_${CHOSEN_COMPILER_TYPE}}
+CXXFLAGS_i386_gcc= -march=i586
OPTIONS_DEFINE= EXAMPLES TOOLS
-OPTIONS_DEFAULT= TOOLS
-OPTIONS_SUB= yes
-
+OPTIONS_DEFAULT= OSS
+# Moved to devel/godot-tools
+OPTIONS_EXCLUDE?= EXAMPLES TOOLS
+OPTIONS_GROUP= AUDIO
+OPTIONS_GROUP_AUDIO= ALSA OSS PULSEAUDIO
+
+EXAMPLES_GH_PROJECT= godot-demo-projects:DEMOS
+# Branch HEAD for PORTVERSION
+EXAMPLES_GH_TAGNAME= dfa1274:DEMOS
+EXAMPLES_PORTEXAMPLES= *
TOOLS_DESC= Include development tools (IDE)
-TOOLS_MAKE_ARGS_ON= tools=yes
-TOOLS_MAKE_ARGS_OFF= tools=no target=release
-
-.include <bsd.port.pre.mk>
-
-.if ${ARCH}==amd64 || ${ARCH}==powerpc64 || ${ARCH}==sparc64 || ${ARCH}==ia64
-BITSUF= .64
-.else
-BITSUF= .32
-.endif
-
-.if ${CHOSEN_COMPILER_TYPE} == clang
-LLSUF= .llvm
-MAKE_ARGS+= use_llvm=yes
-.else # clang
-USE_GCC= yes
-.if ${ARCH} == i386
-CXXFLAGS+= -march=i586
+TOOLS_MAKE_ARGS= target=release_debug tools=yes
+TOOLS_MAKE_ARGS_OFF= target=release tools=no
+TOOLS_DESKTOP_ENTRIES= "Godot" "${COMMENT}" "${GODOTFILE}" \
+ "${GODOTFILE}" "Development;IDE;" ""
+TOOLS_PLIST_FILES= share/pixmaps/${GODOTFILE}.png \
+ share/pixmaps/${GODOTFILE}.svg
+
+AUDIO_DESC= Audio support
+ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
+ALSA_MAKE_ARGS= alsa=yes
+OSS_MAKE_ARGS= oss=yes
+PULSEAUDIO_LIB_DEPENDS= libpulse-simple.so:audio/pulseaudio
+PULSEAUDIO_MAKE_ARGS= pulseaudio=yes
+
+GODOTFILE= ${PORTNAME}${PKGNAMESUFFIX}
+PLIST_FILES= bin/${GODOTFILE}
+
+.ifmake makesum
+# Always include optional distfiles
+.MAKEFLAGS: WITH="${OPTIONS_DEFINE}" OPTIONS_EXCLUDE=
.endif
-.endif # clang
-
-.if ${PORT_OPTIONS:MTOOLS}
-TOOLSUF= .tools
-.else
-TOOLSUF= .opt
-.endif
-
-BINSUFFIX= ${TOOLSUF}${BITSUF}${LLSUF}
-PLIST_SUB+= BINSUFF=${BINSUFFIX}
post-patch:
- @${REINPLACE_CMD} -e 's|custom_build|${OPSYS}_Ports_build|' ${WRKSRC}/methods.py
-
+ @${REINPLACE_CMD} -e 's|custom_build|${OPSYS}_Ports_build|' \
+ ${WRKSRC}/methods.py
+ @${REINPLACE_CMD} -e 's|/usr/bin|${PREFIX}/bin|' \
+ ${WRKSRC}/platform/x11/os_x11.cpp
+
+# The official godot binary name reflects options used to compile
+# We just want a simple name matching the portname
+# This gives us bin/godot for runtime and bin/godot-tools for the IDE
do-install:
- @cd ${WRKSRC}/bin && ${INSTALL_PROGRAM} godot.x11${BINSUFFIX} \
- ${STAGEDIR}/${PREFIX}/bin/godot.x11${BINSUFFIX}
- @${LN} ${STAGEDIR}/${PREFIX}/bin/godot.x11${BINSUFFIX} \
- ${STAGEDIR}/${PREFIX}/bin/godot
+ @cd ${WRKSRC}/bin && ${INSTALL_PROGRAM} godot.x11* \
+ ${STAGEDIR}/${PREFIX}/bin/${GODOTFILE}
do-install-EXAMPLES-on:
- ${MKDIR} ${STAGEDIR}${DATADIR}
- (cd ${WRKSRC} && ${COPYTREE_SHARE} demos ${STAGEDIR}${DATADIR})
- ${RM} ${STAGEDIR}${DATADIR}/demos/2d/hexamap/.fscache
+ (cd ${WRKSRC_DEMOS} && ${COPYTREE_SHARE} "${PORTEXAMPLES}" \
+ ${STAGEDIR}${EXAMPLESDIR})
+
+do-install-TOOLS-on:
+ ${INSTALL_DATA} ${WRKSRC}/icon.png \
+ ${STAGEDIR}${PREFIX}/share/pixmaps/${GODOTFILE}.png
+ ${INSTALL_DATA} ${WRKSRC}/icon.svg \
+ ${STAGEDIR}${PREFIX}/share/pixmaps/${GODOTFILE}.svg
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
OpenPOWER on IntegriCloud