Re: games/godot: split the editor in a subpackage
Stuart Henderson wrote: > On 2022/04/25 22:11, Omar Polo wrote: > > PKGNAME = godot-${V} > > -REVISION = 0 > > +REVISION-main =1 > > right > > > Index: pkg/DESCR-editor > > === > > RCS file: pkg/DESCR-editor > > diff -N pkg/DESCR-editor > > --- /dev/null 1 Jan 1970 00:00:00 - > > +++ pkg/DESCR-editor19 Apr 2022 10:25:53 - > > @@ -0,0 +1,3 @@ > > +Godot is an advanced, feature-packed, multi-platform 2D and 3D open source > > +game engine. It provides a huge set of common tools, so you can just focus > > +on making your game without reinventing the wheel. > > Index: pkg/DESCR-main > > === > > RCS file: pkg/DESCR-main > > diff -N pkg/DESCR-main > > --- /dev/null 1 Jan 1970 00:00:00 - > > +++ pkg/DESCR-main 27 Apr 2018 07:32:53 - > > @@ -0,0 +1,3 @@ > > +Godot is an advanced, feature-packed, multi-platform 2D and 3D open source > > +game engine. It provides a huge set of common tools, so you can just focus > > +on making your game without reinventing the wheel. > > The two DESCRs are the same; better to distinguish them Agreed! (I thought I did that, but I just forgot) > > RCS file: pkg/PLIST-editor > > diff -N pkg/PLIST-editor > > --- /dev/null 1 Jan 1970 00:00:00 - > > +++ pkg/PLIST-editor19 Apr 2022 10:22:56 - > > @@ -0,0 +1,9 @@ > > needs an @conflict on the old version I haven't thought about this. I've added the @conflict and the @pkgpath, thanks for reminding me > > +@bin bin/godot-editor > > +@man man/man6/godot.6 > > manual should go in -main shouldn't it? good catch! yes, the manpage should go in -main > > +share/applications/org.godotengine.Godot.desktop > > +share/doc/pkg-readmes/${PKGSTEM} > > should the readme also go in -main? how about the other files? No, the README is only about the editor, same for the other files: only a build with the editor is meant to be run from a graphical menu. If you run godot compiled without tools (i.e. the -main package) without --main-pack or not in a directory with a project.godot file it just pops up an error window. > > +share/metainfo/ > > +share/metainfo/org.godotengine.Godot.appdata.xml > > +share/pixmaps/ > > +share/pixmaps/godot.svg > > +@tag update-desktop-database > > Index: pkg/PLIST-main > > === > > RCS file: pkg/PLIST-main > > diff -N pkg/PLIST-main > > --- /dev/null 1 Jan 1970 00:00:00 - > > +++ pkg/PLIST-main 19 Apr 2022 10:22:55 - > > @@ -0,0 +1 @@ > > +@bin bin/godot > > needs @pkgpath games/godot added, thanks! Here's an updated diff. I've also renamed the -editor subpackage to -tools: i still think that -editor sounds better, but -tools follows the upstream documentation, and freebsd has a similar package (devel/godot-tools). Index: Makefile === RCS file: /home/cvs/ports/games/godot/Makefile,v retrieving revision 1.34 diff -u -p -r1.34 Makefile --- Makefile15 Apr 2022 20:23:19 - 1.34 +++ Makefile26 Apr 2022 14:22:35 - @@ -1,25 +1,33 @@ BROKEN-powerpc = fails at runtime, the UI is totally blank -COMMENT = 2D and 3D game engine +COMMENT-main = 2D and 3D game engine +COMMENT-tools= 2D and 3D game engine (with tools) V =3.4.4 GODOTSTEAM_V = g34-s152-gs311 DISTNAME = godot-${V}-stable PKGNAME = godot-${V} -REVISION = 0 +REVISION-main =1 + CATEGORIES = games + HOMEPAGE = https://godotengine.org/ + MAINTAINER = Omar Polo # MIT PERMIT_PACKAGE = Yes +MULTI_PACKAGES = -main -tools + WANTLIB += ${COMPILER_LIBCXX} BulletCollision BulletDynamics BulletSoftBody WANTLIB += LinearMath GL X11 Xau Xcursor Xdmcp Xext Xfixes Xi Xinerama Xrandr WANTLIB += Xrender c enet execinfo freetype intl m mbedtls mbedcrypto WANTLIB += mbedx509 mpcdec ogg opus opusfile png sndio steam_api theora WANTLIB += theoradec usbhid vorbis vorbisfile webp xcb z pcre2-32 vpx zstd +WANTLIB-tools = ${WANTLIB} + # C++14 COMPILER = base-clang ports-gcc @@ -58,7 +66,6 @@ MODSCONS_FLAGS = CC="${CC}" \ custom_modules=${WRKDIR}/GodotSteam-${GODOTSTEAM_V}/godotsteam \ progress=no \ pulseaudio=no \ - target=release_debug \ verbose=yes \ warnings=extra \ werror=no @@ -83,7 +90,8 @@ LIB_DEPENDS = archivers/zstd \ multimedia/libvpx \ net/enet \ security/polarssl -RUN_DEPENDS = devel/desktop-file-utils + +RUN_DEPENDS-tools =devel/desktop-file-utils DEBUG_PACKAGES = ${BUILD_PACKAGES} NO_TEST = Yes @@ -103,15 +111,21 @@ post-extract: $
Re: games/godot: split the editor in a subpackage
On 2022/04/25 22:11, Omar Polo wrote: > PKGNAME =godot-${V} > -REVISION = 0 > +REVISION-main = 1 right > Index: pkg/DESCR-editor > === > RCS file: pkg/DESCR-editor > diff -N pkg/DESCR-editor > --- /dev/null 1 Jan 1970 00:00:00 - > +++ pkg/DESCR-editor 19 Apr 2022 10:25:53 - > @@ -0,0 +1,3 @@ > +Godot is an advanced, feature-packed, multi-platform 2D and 3D open source > +game engine. It provides a huge set of common tools, so you can just focus > +on making your game without reinventing the wheel. > Index: pkg/DESCR-main > === > RCS file: pkg/DESCR-main > diff -N pkg/DESCR-main > --- /dev/null 1 Jan 1970 00:00:00 - > +++ pkg/DESCR-main27 Apr 2018 07:32:53 - > @@ -0,0 +1,3 @@ > +Godot is an advanced, feature-packed, multi-platform 2D and 3D open source > +game engine. It provides a huge set of common tools, so you can just focus > +on making your game without reinventing the wheel. The two DESCRs are the same; better to distinguish them > RCS file: pkg/PLIST-editor > diff -N pkg/PLIST-editor > --- /dev/null 1 Jan 1970 00:00:00 - > +++ pkg/PLIST-editor 19 Apr 2022 10:22:56 - > @@ -0,0 +1,9 @@ needs an @conflict on the old version > +@bin bin/godot-editor > +@man man/man6/godot.6 manual should go in -main shouldn't it? > +share/applications/org.godotengine.Godot.desktop > +share/doc/pkg-readmes/${PKGSTEM} should the readme also go in -main? how about the other files? > +share/metainfo/ > +share/metainfo/org.godotengine.Godot.appdata.xml > +share/pixmaps/ > +share/pixmaps/godot.svg > +@tag update-desktop-database > Index: pkg/PLIST-main > === > RCS file: pkg/PLIST-main > diff -N pkg/PLIST-main > --- /dev/null 1 Jan 1970 00:00:00 - > +++ pkg/PLIST-main19 Apr 2022 10:22:55 - > @@ -0,0 +1 @@ > +@bin bin/godot needs @pkgpath games/godot
Re: games/godot: split the editor in a subpackage
Hey, i love the idea, it makes a lot of sence. As a godot user i would welcome such a change! Patch works fine for me on amd64. Thanks and greetings Leo On 25.04.22 20:45, Omar Polo wrote: I'd like to split the godot package into two: the engine alone and the editor. We're currently building the engine with the editor enabled, which is fine, but makes akward to run standalone PCK (i.e. godot' packaged games) from the command line. When the editor (tools=yes) is enabled godot does some checks that really make sense only when developing, even when running PCK.
Re: games/godot: split the editor in a subpackage
Omar Polo wrote: > Omar Polo wrote: > > Hello ports, > > > > I'd like to split the godot package into two: the engine alone and the > > editor. > > > > We're currently building the engine with the editor enabled, which is > > fine, but makes akward to run standalone PCK (i.e. godot' packaged > > games) from the command line. When the editor (tools=yes) is enabled > > godot does some checks that really make sense only when developing, even > > when running PCK. > > > > Since I'm expecting that most users install godot just to play some > > games, having these "errors" logged is misleading. (godot tries to do > > stuff like loading the assets from the disk even when they're in the > > PCK, and other stuff like this.) Thus having the editor enabled for > > them makes the experience only worse. > > > > On the other hand I'd like to be possible to "opt in" and have the IDE > > available. > > > > What I'm proposing is to build godot two times, one with tools=yes and > > one without, and split the thing into two subpackages. I'm explicitly > > using MULTI_PACKAGES and not flavor because: > > > > 1. scons does the right thing and rebuilds only what's needed when the > > flags changes, so we save a bit of build time. (not that much, but > > every bit helps?) > > > > 2. I'd like to have different PLIST for the packages, and this approach > > seemed simpler than rolling something like MODPY_COMMENT. The desktop > > file and icon only makes sense for the -editor build for example. > > > > 3. if one opts in and install the hypothetic "editor" flavor, than when > > trying run a standalone PCK they have the same issues as the current > > package. > > I forgot one thing: this also makes possible in the future to eventually > ship also a -server package (to host game servers) or a -headless one > (that would come in handy for building godot stuff from the port tree.) > > > Diff belows install the engine itself as `godot' and the editor as, > > unsurprisingly, `godot-editor'. patch-drivers_unix_os_unix_cpp > > hardcoded /usr/local/bin/godot inside the binary and needed some > > tweaking because that code is now used by *two* differently-named > > executable. Fortunately, the main() caches argv[0] and we can just > > reuse that. > > > > P.S.: is the REVISION handling correct? the old `godot' package keeps > > the name but its content differs (see the new plist) so I bumped the > > revision only for -main, right? `make show=PKGNAMES' looks correct: > > > > % make show=PKGNAMES > > godot-3.4.4p1 debug-godot-3.4.4p1 godot-editor-3.4.4 > > debug-godot-editor-3.4.4 As reminded by Solène on irc, we're still building godot with debug enabled, which is fine for the -editor build but not so much for playing standalone games. Updated diff sets target=release for the -main package so it should be faster. (i've also forgot a cvs add for the desktop patch) Since it takes a while to build godot from sources, I'm temporarly hosting (unsigned!) packages for testing: https://ftp.omarpolo.com/debug-godot-3.4.4p1.tgz https://ftp.omarpolo.com/debug-godot-editor-3.4.4.tgz https://ftp.omarpolo.com/godot-3.4.4p1.tgz https://ftp.omarpolo.com/godot-editor-3.4.4.tgz SHA256 (debug-godot-3.4.4p1.tgz) = 846de687271101586e8dff52b37ca40c42a59d0d1e7ac3b1308a7478f132e9ce SHA256 (debug-godot-editor-3.4.4.tgz) = 0be66dc303c31ba9b3d8bc109bcbd7ab5b27e31082008c50109a63d39184bde2 SHA256 (godot-3.4.4p1.tgz) = 8faf67e7c670da2b3e0219d1693934872698e46243d0e386ecdfcaa565cb8a15 SHA256 (godot-editor-3.4.4.tgz) = ecffbc28949deadd0669ea2a0d413ecc07bf453d4ac02923d79361f340fc7090 Index: Makefile === RCS file: /home/cvs/ports/games/godot/Makefile,v retrieving revision 1.34 diff -u -p -r1.34 Makefile --- Makefile15 Apr 2022 20:23:19 - 1.34 +++ Makefile25 Apr 2022 19:58:28 - @@ -1,25 +1,33 @@ BROKEN-powerpc = fails at runtime, the UI is totally blank -COMMENT = 2D and 3D game engine +COMMENT-main = 2D and 3D game engine +COMMENT-editor=2D and 3D game engine (with editor) V =3.4.4 GODOTSTEAM_V = g34-s152-gs311 DISTNAME = godot-${V}-stable PKGNAME = godot-${V} -REVISION = 0 +REVISION-main =1 + CATEGORIES = games + HOMEPAGE = https://godotengine.org/ + MAINTAINER = Omar Polo # MIT PERMIT_PACKAGE = Yes +MULTI_PACKAGES = -main -editor + WANTLIB += ${COMPILER_LIBCXX} BulletCollision BulletDynamics BulletSoftBody WANTLIB += LinearMath GL X11 Xau Xcursor Xdmcp Xext Xfixes Xi Xinerama Xrandr WANTLIB += Xrender c enet execinfo freetype intl m mbedtls mbedcrypto WANTLIB += mbedx509 mpcdec ogg opus opusfile png sndio steam_api theora WANTLIB += theoradec usbhid vorbis vorbisfile webp xcb z pcre2-32 vpx zstd +WANTLIB-editor = ${WANTLIB} + # C++14 COMPILER = base-clang ports-gcc @@ -58,7 +66,6 @@ MODSCONS_FLAGS = CC="${CC}" \
Re: games/godot: split the editor in a subpackage
Omar Polo wrote: > Hello ports, > > I'd like to split the godot package into two: the engine alone and the > editor. > > We're currently building the engine with the editor enabled, which is > fine, but makes akward to run standalone PCK (i.e. godot' packaged > games) from the command line. When the editor (tools=yes) is enabled > godot does some checks that really make sense only when developing, even > when running PCK. > > Since I'm expecting that most users install godot just to play some > games, having these "errors" logged is misleading. (godot tries to do > stuff like loading the assets from the disk even when they're in the > PCK, and other stuff like this.) Thus having the editor enabled for > them makes the experience only worse. > > On the other hand I'd like to be possible to "opt in" and have the IDE > available. > > What I'm proposing is to build godot two times, one with tools=yes and > one without, and split the thing into two subpackages. I'm explicitly > using MULTI_PACKAGES and not flavor because: > > 1. scons does the right thing and rebuilds only what's needed when the > flags changes, so we save a bit of build time. (not that much, but > every bit helps?) > > 2. I'd like to have different PLIST for the packages, and this approach > seemed simpler than rolling something like MODPY_COMMENT. The desktop > file and icon only makes sense for the -editor build for example. > > 3. if one opts in and install the hypothetic "editor" flavor, than when > trying run a standalone PCK they have the same issues as the current > package. I forgot one thing: this also makes possible in the future to eventually ship also a -server package (to host game servers) or a -headless one (that would come in handy for building godot stuff from the port tree.) > Diff belows install the engine itself as `godot' and the editor as, > unsurprisingly, `godot-editor'. patch-drivers_unix_os_unix_cpp > hardcoded /usr/local/bin/godot inside the binary and needed some > tweaking because that code is now used by *two* differently-named > executable. Fortunately, the main() caches argv[0] and we can just > reuse that. > > P.S.: is the REVISION handling correct? the old `godot' package keeps > the name but its content differs (see the new plist) so I bumped the > revision only for -main, right? `make show=PKGNAMES' looks correct: > > % make show=PKGNAMES > godot-3.4.4p1 debug-godot-3.4.4p1 godot-editor-3.4.4 debug-godot-editor-3.4.4 > > > Index: Makefile > === > RCS file: /home/cvs/ports/games/godot/Makefile,v > retrieving revision 1.34 > diff -u -p -r1.34 Makefile > --- Makefile 15 Apr 2022 20:23:19 - 1.34 > +++ Makefile 25 Apr 2022 17:38:31 - > @@ -1,25 +1,33 @@ > BROKEN-powerpc = fails at runtime, the UI is totally blank > > -COMMENT =2D and 3D game engine > +COMMENT-main = 2D and 3D game engine > +COMMENT-editor= 2D and 3D game engine (with editor) > > V = 3.4.4 > GODOTSTEAM_V = g34-s152-gs311 > DISTNAME = godot-${V}-stable > PKGNAME =godot-${V} > -REVISION = 0 > +REVISION-main = 1 > + > CATEGORIES = games > + > HOMEPAGE = https://godotengine.org/ > + > MAINTAINER = Omar Polo > > # MIT > PERMIT_PACKAGE = Yes > > +MULTI_PACKAGES = -main -editor > + > WANTLIB += ${COMPILER_LIBCXX} BulletCollision BulletDynamics BulletSoftBody > WANTLIB += LinearMath GL X11 Xau Xcursor Xdmcp Xext Xfixes Xi Xinerama Xrandr > WANTLIB += Xrender c enet execinfo freetype intl m mbedtls mbedcrypto > WANTLIB += mbedx509 mpcdec ogg opus opusfile png sndio steam_api theora > WANTLIB += theoradec usbhid vorbis vorbisfile webp xcb z pcre2-32 vpx zstd > > +WANTLIB-editor = ${WANTLIB} > + > # C++14 > COMPILER = base-clang ports-gcc > > @@ -83,7 +91,8 @@ LIB_DEPENDS = archivers/zstd \ > multimedia/libvpx \ > net/enet \ > security/polarssl > -RUN_DEPENDS =devel/desktop-file-utils > + > +RUN_DEPENDS-editor = devel/desktop-file-utils > > DEBUG_PACKAGES = ${BUILD_PACKAGES} > NO_TEST =Yes > @@ -103,15 +112,21 @@ post-extract: > ${WRKDIST}/platform/x11/ > > pre-configure: > - ${SUBST_CMD} ${WRKSRC}/drivers/unix/os_unix.cpp > + ${SUBST_CMD} ${WRKSRC}/misc/dist/linux/*.desktop > sed -E -i 's/ISteamHTMLSurface:://g' \ > ${WRKDIR}/GodotSteam-${GODOTSTEAM_V}/godotsteam/godotsteam.cpp > sed -E -i 's/Connection_DEPRECATED/Connection/g' \ > ${WRKDIR}/GodotSteam-${GODOTSTEAM_V}/godotsteam/godotsteam.cpp > > +do-build: > + @${MODSCONS_BUILD_TARGET} tools=no > + @${MODSCONS_BUILD_TARGET} tools=yes > + > do-install: > - ${INSTALL_PROGRAM} ${WRKBUILD}/bin/godot* \ > + ${INSTALL_PROGRAM} ${WRKBUILD}/bin/godot.x11.opt.debug.* \ > ${PREFIX}/bin/god
games/godot: split the editor in a subpackage
Hello ports, I'd like to split the godot package into two: the engine alone and the editor. We're currently building the engine with the editor enabled, which is fine, but makes akward to run standalone PCK (i.e. godot' packaged games) from the command line. When the editor (tools=yes) is enabled godot does some checks that really make sense only when developing, even when running PCK. Since I'm expecting that most users install godot just to play some games, having these "errors" logged is misleading. (godot tries to do stuff like loading the assets from the disk even when they're in the PCK, and other stuff like this.) Thus having the editor enabled for them makes the experience only worse. On the other hand I'd like to be possible to "opt in" and have the IDE available. What I'm proposing is to build godot two times, one with tools=yes and one without, and split the thing into two subpackages. I'm explicitly using MULTI_PACKAGES and not flavor because: 1. scons does the right thing and rebuilds only what's needed when the flags changes, so we save a bit of build time. (not that much, but every bit helps?) 2. I'd like to have different PLIST for the packages, and this approach seemed simpler than rolling something like MODPY_COMMENT. The desktop file and icon only makes sense for the -editor build for example. 3. if one opts in and install the hypothetic "editor" flavor, than when trying run a standalone PCK they have the same issues as the current package. Diff belows install the engine itself as `godot' and the editor as, unsurprisingly, `godot-editor'. patch-drivers_unix_os_unix_cpp hardcoded /usr/local/bin/godot inside the binary and needed some tweaking because that code is now used by *two* differently-named executable. Fortunately, the main() caches argv[0] and we can just reuse that. P.S.: is the REVISION handling correct? the old `godot' package keeps the name but its content differs (see the new plist) so I bumped the revision only for -main, right? `make show=PKGNAMES' looks correct: % make show=PKGNAMES godot-3.4.4p1 debug-godot-3.4.4p1 godot-editor-3.4.4 debug-godot-editor-3.4.4 Index: Makefile === RCS file: /home/cvs/ports/games/godot/Makefile,v retrieving revision 1.34 diff -u -p -r1.34 Makefile --- Makefile15 Apr 2022 20:23:19 - 1.34 +++ Makefile25 Apr 2022 17:38:31 - @@ -1,25 +1,33 @@ BROKEN-powerpc = fails at runtime, the UI is totally blank -COMMENT = 2D and 3D game engine +COMMENT-main = 2D and 3D game engine +COMMENT-editor=2D and 3D game engine (with editor) V =3.4.4 GODOTSTEAM_V = g34-s152-gs311 DISTNAME = godot-${V}-stable PKGNAME = godot-${V} -REVISION = 0 +REVISION-main =1 + CATEGORIES = games + HOMEPAGE = https://godotengine.org/ + MAINTAINER = Omar Polo # MIT PERMIT_PACKAGE = Yes +MULTI_PACKAGES = -main -editor + WANTLIB += ${COMPILER_LIBCXX} BulletCollision BulletDynamics BulletSoftBody WANTLIB += LinearMath GL X11 Xau Xcursor Xdmcp Xext Xfixes Xi Xinerama Xrandr WANTLIB += Xrender c enet execinfo freetype intl m mbedtls mbedcrypto WANTLIB += mbedx509 mpcdec ogg opus opusfile png sndio steam_api theora WANTLIB += theoradec usbhid vorbis vorbisfile webp xcb z pcre2-32 vpx zstd +WANTLIB-editor = ${WANTLIB} + # C++14 COMPILER = base-clang ports-gcc @@ -83,7 +91,8 @@ LIB_DEPENDS = archivers/zstd \ multimedia/libvpx \ net/enet \ security/polarssl -RUN_DEPENDS = devel/desktop-file-utils + +RUN_DEPENDS-editor = devel/desktop-file-utils DEBUG_PACKAGES = ${BUILD_PACKAGES} NO_TEST = Yes @@ -103,15 +112,21 @@ post-extract: ${WRKDIST}/platform/x11/ pre-configure: - ${SUBST_CMD} ${WRKSRC}/drivers/unix/os_unix.cpp + ${SUBST_CMD} ${WRKSRC}/misc/dist/linux/*.desktop sed -E -i 's/ISteamHTMLSurface:://g' \ ${WRKDIR}/GodotSteam-${GODOTSTEAM_V}/godotsteam/godotsteam.cpp sed -E -i 's/Connection_DEPRECATED/Connection/g' \ ${WRKDIR}/GodotSteam-${GODOTSTEAM_V}/godotsteam/godotsteam.cpp +do-build: + @${MODSCONS_BUILD_TARGET} tools=no + @${MODSCONS_BUILD_TARGET} tools=yes + do-install: - ${INSTALL_PROGRAM} ${WRKBUILD}/bin/godot* \ + ${INSTALL_PROGRAM} ${WRKBUILD}/bin/godot.x11.opt.debug.* \ ${PREFIX}/bin/godot + ${INSTALL_PROGRAM} ${WRKBUILD}/bin/godot.x11.opt.tools.* \ + ${PREFIX}/bin/godot-editor ${INSTALL_MAN_DIR} ${PREFIX}/man/man6 ${INSTALL_MAN} ${WRKSRC}/misc/dist/linux/godot.6 \ ${PREFIX}/man/man6 Index: patches/patch-drivers_unix_os_unix_cpp === RCS file: /home/cvs/ports/games/godot/patches/patch-drivers_unix_os