Thomas Frohwein <tfrohw...@fastmail.com> writes:

> On Sat, Nov 13, 2021 at 09:44:15PM +0100, Omar Polo wrote:
>> Omar Polo <o...@omarpolo.com> writes:
>> 
>> > Hello,
>> >
>> > % pkg_info pixelorama
>> > Information for inst:pixelorama-0.9
>> >
>> > Comment:
>> > 2D sprite editor
>> >
>> > Description:
>> > Pixelorama is a 2D sprite editor made with the Godot Engine.  It
>> > features several tools to draw and also an animation timeline with onion
>> > skinning, cel linking, motion drawing adn frame grouping with tags.  Is
>> > able to import and export as PNG, GIF or spritesheets.
>> >
>> > Maintainer: Omar Polo <o...@omarpolo.com>
>> >
>> > WWW: https://orama-interactive.itch.io/pixelorama
>> >
>> >
>> >
>> > In theory we shouldn't need to fetch the precompiled pck file (think of
>> > it like a jar but for the Godot' gdscript vm) but our godot always opens
>> > an X11 window on startup so it isn't viable for building.  (We could add
>> > a godot-tools flavor without GUI but would be overkill for now IMHO.)
>> 
>> now with 100% less typos and better handling of the distfiles (thanks
>> sthen@!)
>> 
>
> Hi,
>
> Thanks for sharing this one. I've used it for a small pixelart project,
> and it works really well! A couple of points:
>
> Is ${PREFIX}/libdata/pixelorama really the right place? I have used
> ${PREFIX}/share/pixelorama in the past for similar ports. My own
> ${PREFIX}/libdata/ is very empty despite many installed ports... only
> 'perl5' and 'pkgconfig' are in there. Looks to me like the wrong place
> ...

I agree that my choice wasn't the best one, let's use share/pixelorama
instead of libdata.

> If I see this correctly, the whole source package is downloaded just for
> the .desktop file, icon, and *.appdata.xml. Seems a little wasteful,
> especially to me who doesn't do much with those files... Is there maybe
> a way to download those directly?

I guess I could play with DISTFILES and fetch only those three files but
fetching the whole sources seems easier.  Furthermore, if we'll add a
headless godot in the future we could then trivially adjust pixelorama
to build from sources.

> In do-install, I would s,${WRKDIR}/Pixelorama-${V},${WRKSRC}, - is the
> same, just easier to read.

Agreed, it's a leftover from the previous approach before sthen'
improvements.

> If libdata vs. share location can be clarified, I'm ok thfr@ with
> importing this.

Here's an improved tarball with the above points addressed.  I've also
rearranged the variables to follow Makefile.template more closely, added
ONLY_FOR_ARCHS=amd64 and dropped PKG_ARCH=*: I was a bit too optimistic
to think that pck files are cross-platform.

> I would also like to raise the issue of the future of the godot
> infrastructure. The ecosystem has been developing rapidly, especially
> in 2021. There are many other opensource projects similar to Pixelorama
> that use Godot. It may be worth building them from source where
> possible, but that would depend on a server/headless version of godot,
> as well as an export template to use for those projects. The other
> issue with such ports is that using the current approach with
> `godot --main-pack Pixelorama.pck` uses the build for the editor that
> is required to have verbose error checking.

I never realised that tools=no disabled the verbose error checking.
When using a build of godot without the editor, pixelorama doesn't error
for every sprite.  (even if the sprites are bundled in the pck files, it
still try to open them relatively to the current directory.)

> A possible future for this might be splitting godot into 3 different
> binaries for editor, headless builds, and pure runtime (without the
> excessive error checking overhead), but from all I've seen, the project
> would need 3 different complete builds to provide that. Updating the
> port to do that wouldn't be very difficult (I already have a draft for
> this), but I'm not sure if the cost on build time and size would be
> okay to have better fit for the use cases. Outline of the build system
> is at [1].

it's doesn't need a complete rebuild as scons can re-use some of the
outputs from the previous builds, but it takes around twice the time
nevertheless.  The current godot port takes 19 minutes to build on my
machine with MAKE_JOBS=5 and a build with

do-build:
        ${MODSCONS_BUILD_TARGET} tools=yes                # "normal"
        ${MODSCONS_BUILD_TARGET} tools=no                 # no editor
        ${MODSCONS_BUILD_TARGET} tools=no platform=server # headless

takes 40 minutes under the same circumstances.  WKRDIR is 2.7G after a
build with the three different binaries, which isn't too much different
from before IIRC (I forgot to record the size before recompiling.)

FWIW i'd be fine with such a change (but I'd like to commit the diff to
add the manpage and desktop file first ;-)

> Thanks!
>
> [1] 
> https://docs.godotengine.org/en/stable/development/compiling/introduction_to_the_buildsystem.html

Thanks,

Omar Polo

Attachment: pixelorama.tar.gz
Description: Binary data

Reply via email to