git: b9d66f9108e3 - main - devel/godot35: new port for LTS godot
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 07 Mar 2023 15:43:13 UTC
The branch main has been updated by fernape:
URL: https://cgit.FreeBSD.org/ports/commit/?id=b9d66f9108e319cedae8573b7b79807e0fda0e69
commit b9d66f9108e319cedae8573b7b79807e0fda0e69
Author: Shane <FreeBSD@ShaneWare.Biz>
AuthorDate: 2023-03-07 09:26:30 +0000
Commit: Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-03-07 15:38:16 +0000
devel/godot35: new port for LTS godot
ChangeLog: https://godotengine.org/article/maintenance-release-godot-3-5-1/
PR: 269956
Reported by: FreeBSD@ShaneWare.Biz
---
devel/Makefile | 1 +
devel/godot35/Makefile | 113 +++++++++++++++++++++
devel/godot35/distinfo | 5 +
devel/godot35/files/patch-platform_x11_detect.py | 20 ++++
.../files/patch-platform_x11_libudev-so__wrap.c | 11 ++
.../files/patch-thirdparty_libvpx_vpx_vpx__codec.h | 20 ++++
.../patch-thirdparty_libvpx_vpx_vpx__decoder.h | 20 ++++
...atch-thirdparty_libvpx_vpx_vpx__frame__buffer.h | 19 ++++
.../files/patch-thirdparty_libvpx_vpx_vpx__image.h | 19 ++++
devel/godot35/pkg-descr | 6 ++
devel/godot35/pkg-message | 11 ++
11 files changed, 245 insertions(+)
diff --git a/devel/Makefile b/devel/Makefile
index f67634c62a0a..84f30ccb40ca 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -883,6 +883,7 @@
SUBDIR += godot-tools
SUBDIR += godot2
SUBDIR += godot2-tools
+ SUBDIR += godot35
SUBDIR += goffice
SUBDIR += gogs
SUBDIR += golangci-lint
diff --git a/devel/godot35/Makefile b/devel/godot35/Makefile
new file mode 100644
index 000000000000..361707b0d4e7
--- /dev/null
+++ b/devel/godot35/Makefile
@@ -0,0 +1,113 @@
+PORTNAME= godot
+DISTVERSION= 3.5.1
+DISTVERSIONSUFFIX= -stable
+PORTREVISION?= 0
+CATEGORIES= devel games
+PKGNAMESUFFIX?= 35
+
+MAINTAINER= FreeBSD@Shaneware.biz
+COMMENT?= Game runtime engine - LTS v3.5
+WWW= https://godotengine.org/
+
+LICENSE= MIT CC-BY-3.0
+LICENSE_COMB= multi
+LICENSE_FILE_CC-BY-3.0= ${WRKSRC}/LOGO_LICENSE.md
+LICENSE_FILE_MIT= ${WRKSRC}/LICENSE.txt
+
+BUILD_DEPENDS= yasm:devel/yasm
+LIB_DEPENDS= libfreetype.so:print/freetype2 \
+ libpcre2-8.so:devel/pcre2 \
+ libpng.so:graphics/png \
+ libvpx.so:multimedia/libvpx
+RUN_DEPENDS= xdg-user-dir:devel/xdg-user-dirs \
+ xdg-open:devel/xdg-utils \
+ xmessage:x11/xmessage
+
+USES= compiler:c++14-lang cpe gl pkgconfig scons xorg
+USE_XORG= x11 xcursor xext xi xinerama xrandr xrender
+USE_GL= gl glew glu
+
+CPE_VENDOR= godotengine
+
+USE_GITHUB= yes
+GH_ACCOUNT= godotengine
+
+MAKE_ARGS+= platform=x11 builtin_freetype=False \
+ builtin_libpng=False builtin_libvpx=False \
+ builtin_pcre2=False builtin_zlib=False verbose=True
+MAKE_ARGS+= ${MAKE_ARGS_${CHOSEN_COMPILER_TYPE}}
+MAKE_ARGS_clang= use_llvm=True linker=lld
+CXXFLAGS_i386= ${CXXFLAGS_i386_${CHOSEN_COMPILER_TYPE}}
+CXXFLAGS_i386_gcc= -march=i586
+
+OPTIONS_DEFINE= EXAMPLES TOOLS UDEV
+OPTIONS_DEFAULT= ALSA UDEV
+# Moved to devel/godot-tools
+OPTIONS_EXCLUDE?= EXAMPLES TOOLS
+OPTIONS_GROUP= AUDIO
+OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO
+
+AUDIO_DESC= Audio support
+ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
+ALSA_MAKE_ARGS= alsa=True
+ALSA_MAKE_ARGS_OFF= alsa=False
+# tagged 24/1 for 3.5.1
+EXAMPLES_GH_TUPLE= godotengine:godot-demo-projects:9e68af38d9f2:DEMOS
+EXAMPLES_PORTEXAMPLES= *
+PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
+PULSEAUDIO_MAKE_ARGS= pulseaudio=True
+PULSEAUDIO_MAKE_ARGS_OFF= pulseaudio=False
+TOOLS_DESC= Include development tools (IDE)
+TOOLS_MAKE_ARGS= target=release_debug tools=True
+TOOLS_MAKE_ARGS_OFF= target=release tools=False
+TOOLS_DESKTOP_ENTRIES= "Godot" "${COMMENT}" "${GODOTFILE}" \
+ "${GODOTFILE}" "Development;IDE;" ""
+TOOLS_PLIST_FILES= share/pixmaps/${GODOTFILE}.png \
+ share/pixmaps/${GODOTFILE}.svg
+UDEV_DESC= Libudev support (Joystick)
+UDEV_BUILD_DEPENDS= ${PREFIX}/include/linux/input.h:devel/evdev-proto
+UDEV_LIB_DEPENDS= libudev.so:devel/libudev-devd
+UDEV_MAKE_ARGS= udev=True
+UDEV_MAKE_ARGS_OFF= udev=False
+
+GODOTFILE= ${PORTNAME}${PKGNAMESUFFIX}
+PLIST_FILES= bin/${GODOTFILE}
+
+.ifmake makesum
+# Always include optional distfiles
+.MAKEFLAGS: WITH="${OPTIONS_DEFINE}" OPTIONS_EXCLUDE=
+.endif
+
+.include <bsd.port.options.mk>
+
+.if ${ARCH:Mpowerpc*} || ${ARCH:Mriscv64*}
+MAKE_ARGS+= module_embree_enabled=no \
+ module_raycast_enabled=no \
+ module_webm_enabled=no
+.endif
+
+post-patch:
+ @${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:
+ @${RM} ${WRKSRC}/bin/*.debugsymbols
+ cd ${WRKSRC}/bin && ${INSTALL_PROGRAM} godot.x11* \
+ ${STAGEDIR}/${PREFIX}/bin/${GODOTFILE}
+
+do-install-EXAMPLES-on:
+ (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.mk>
diff --git a/devel/godot35/distinfo b/devel/godot35/distinfo
new file mode 100644
index 000000000000..d7ad06b4faa5
--- /dev/null
+++ b/devel/godot35/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1677901671
+SHA256 (godotengine-godot-3.5.1-stable_GH0.tar.gz) = 164523c1c8aef0b69b135645794f5bece3f63788556a56aa293c118cde457023
+SIZE (godotengine-godot-3.5.1-stable_GH0.tar.gz) = 56610604
+SHA256 (godotengine-godot-demo-projects-9e68af38d9f2_GH0.tar.gz) = 0569a9862284c93cc45fd8305ed055322d4d337b1f593e639ec503ae844e2b72
+SIZE (godotengine-godot-demo-projects-9e68af38d9f2_GH0.tar.gz) = 181537053
diff --git a/devel/godot35/files/patch-platform_x11_detect.py b/devel/godot35/files/patch-platform_x11_detect.py
new file mode 100644
index 000000000000..3691baf4270f
--- /dev/null
+++ b/devel/godot35/files/patch-platform_x11_detect.py
@@ -0,0 +1,20 @@
+--- platform/x11/detect.py.orig 2021-12-21 22:27:28 UTC
++++ platform/x11/detect.py
+@@ -338,7 +338,7 @@ def configure(env):
+ else:
+ print("Warning: PulseAudio development libraries not found. Disabling the PulseAudio audio driver.")
+
+- if platform.system() == "Linux":
++ if platform.system() in ["Linux","FreeBSD"]:
+ env.Append(CPPDEFINES=["JOYDEV_ENABLED"])
+ if env["udev"]:
+ if os.system("pkg-config --exists libudev") == 0: # 0 means found
+@@ -365,7 +365,7 @@ def configure(env):
+ if env["execinfo"]:
+ env.Append(LIBS=["execinfo"])
+
+- if not env["tools"]:
++ if not env["tools"] and False: # not building templates, just runtime
+ import subprocess
+ import re
+
diff --git a/devel/godot35/files/patch-platform_x11_libudev-so__wrap.c b/devel/godot35/files/patch-platform_x11_libudev-so__wrap.c
new file mode 100644
index 000000000000..64daca324717
--- /dev/null
+++ b/devel/godot35/files/patch-platform_x11_libudev-so__wrap.c
@@ -0,0 +1,11 @@
+--- platform/x11/libudev-so_wrap.c.orig 2021-12-29 15:43:04 UTC
++++ platform/x11/libudev-so_wrap.c
+@@ -279,7 +279,7 @@ int (*udev_util_encode_string_dylibloader_wrapper_libu
+ int initialize_libudev() {
+ void *handle;
+ char *error;
+- handle = dlopen("libudev.so.1", RTLD_LAZY);
++ handle = dlopen("libudev.so.0", RTLD_LAZY);
+ if (!handle) {
+ fprintf(stderr, "%s\n", dlerror());
+ return(1);
diff --git a/devel/godot35/files/patch-thirdparty_libvpx_vpx_vpx__codec.h b/devel/godot35/files/patch-thirdparty_libvpx_vpx_vpx__codec.h
new file mode 100644
index 000000000000..cd4e7ef205d9
--- /dev/null
+++ b/devel/godot35/files/patch-thirdparty_libvpx_vpx_vpx__codec.h
@@ -0,0 +1,20 @@
+--- thirdparty/libvpx/vpx/vpx_codec.h.orig 2019-03-23 14:24:15 UTC
++++ thirdparty/libvpx/vpx/vpx_codec.h
+@@ -36,8 +36,8 @@
+ * Once initialized, the instance is manged using other functions from
+ * the vpx_codec_* family.
+ */
+-#ifndef VPX_VPX_CODEC_H_
+-#define VPX_VPX_CODEC_H_
++#ifndef VPX_VPX_VPX_CODEC_H_
++#define VPX_VPX_VPX_CODEC_H_
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -475,5 +475,5 @@ extern "C" {
+ #ifdef __cplusplus
+ }
+ #endif
+-#endif // VPX_VPX_CODEC_H_
++#endif // VPX_VPX_VPX_CODEC_H_
+
diff --git a/devel/godot35/files/patch-thirdparty_libvpx_vpx_vpx__decoder.h b/devel/godot35/files/patch-thirdparty_libvpx_vpx_vpx__decoder.h
new file mode 100644
index 000000000000..39b2cbdc97c0
--- /dev/null
+++ b/devel/godot35/files/patch-thirdparty_libvpx_vpx_vpx__decoder.h
@@ -0,0 +1,20 @@
+--- thirdparty/libvpx/vpx/vpx_decoder.h.orig 2019-03-23 14:46:15 UTC
++++ thirdparty/libvpx/vpx/vpx_decoder.h
+@@ -7,8 +7,8 @@
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+-#ifndef VPX_VPX_DECODER_H_
+-#define VPX_VPX_DECODER_H_
++#ifndef VPX_VPX_VPX_DECODER_H_
++#define VPX_VPX_VPX_DECODER_H_
+
+ /*!\defgroup decoder Decoder Algorithm Interface
+ * \ingroup codec
+@@ -374,5 +374,5 @@ extern "C" {
+ #ifdef __cplusplus
+ }
+ #endif
+-#endif // VPX_VPX_DECODER_H_
++#endif // VPX_VPX_VPX_DECODER_H_
+
diff --git a/devel/godot35/files/patch-thirdparty_libvpx_vpx_vpx__frame__buffer.h b/devel/godot35/files/patch-thirdparty_libvpx_vpx_vpx__frame__buffer.h
new file mode 100644
index 000000000000..5f1de2543fc9
--- /dev/null
+++ b/devel/godot35/files/patch-thirdparty_libvpx_vpx_vpx__frame__buffer.h
@@ -0,0 +1,19 @@
+--- thirdparty/libvpx/vpx/vpx_frame_buffer.h.orig 2019-03-23 14:31:21 UTC
++++ thirdparty/libvpx/vpx/vpx_frame_buffer.h
+@@ -8,8 +8,8 @@
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+-#ifndef VPX_VPX_FRAME_BUFFER_H_
+-#define VPX_VPX_FRAME_BUFFER_H_
++#ifndef VPX_VPX_VPX_FRAME_BUFFER_H_
++#define VPX_VPX_VPX_FRAME_BUFFER_H_
+
+ /*!\file
+ * \brief Describes the decoder external frame buffer interface.
+@@ -80,4 +80,4 @@ typedef int (*vpx_release_frame_buffer_cb_fn_t)(
+ } // extern "C"
+ #endif
+
+-#endif // VPX_VPX_FRAME_BUFFER_H_
++#endif // VPX_VPX_VPX_FRAME_BUFFER_H_
diff --git a/devel/godot35/files/patch-thirdparty_libvpx_vpx_vpx__image.h b/devel/godot35/files/patch-thirdparty_libvpx_vpx_vpx__image.h
new file mode 100644
index 000000000000..9b605fb36ea0
--- /dev/null
+++ b/devel/godot35/files/patch-thirdparty_libvpx_vpx_vpx__image.h
@@ -0,0 +1,19 @@
+--- thirdparty/libvpx/vpx/vpx_image.h.orig 2019-03-23 14:18:30 UTC
++++ thirdparty/libvpx/vpx/vpx_image.h
+@@ -13,8 +13,8 @@
+ * \brief Describes the vpx image descriptor and associated operations
+ *
+ */
+-#ifndef VPX_VPX_IMAGE_H_
+-#define VPX_VPX_IMAGE_H_
++#ifndef VPX_VPX_VPX_IMAGE_H_
++#define VPX_VPX_VPX_IMAGE_H_
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -232,4 +232,4 @@ extern "C" {
+ } // extern "C"
+ #endif
+
+-#endif // VPX_VPX_IMAGE_H_
++#endif // VPX_VPX_VPX_IMAGE_H_
diff --git a/devel/godot35/pkg-descr b/devel/godot35/pkg-descr
new file mode 100644
index 000000000000..566460401278
--- /dev/null
+++ b/devel/godot35/pkg-descr
@@ -0,0 +1,6 @@
+Godot is a multi-platform 2D and 3D game engine.
+
+Easily deploy your game on IOS, Android, OSX, Linux, Steam or Windows.
+
+This is a runtime only port of godot. For the IDE to create games
+use devel/godot-tools.
diff --git a/devel/godot35/pkg-message b/devel/godot35/pkg-message
new file mode 100644
index 000000000000..760c7f9c2f16
--- /dev/null
+++ b/devel/godot35/pkg-message
@@ -0,0 +1,11 @@
+[
+{ type: install
+ message: <<EOM
+
+NOTE: This port installs the godot runtime only.
+
+If you want to create a game you need to install the IDE from devel/godot-tools.
+
+EOM
+}
+]