Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 445814 - dev-games/aseprite-0.9.5 - New package. - Animated sprite editor & pixel art tool
Summary: dev-games/aseprite-0.9.5 - New package. - Animated sprite editor & pixel art ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Tom Wijsman (TomWij) (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD
: 86673 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-03 16:44 UTC by Tom Wijsman (TomWij) (RETIRED)
Modified: 2013-02-07 00:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
aseprite-0.9.5.ebuild (aseprite-0.9.5.ebuild,947 bytes, text/plain)
2012-12-03 16:44 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
files/aseprite-0.9.5-as-needed.patch (aseprite-0.9.5-as-needed.patch,1.09 KB, patch)
2012-12-03 16:45 UTC, Tom Wijsman (TomWij) (RETIRED)
Details | Diff
aseprite-0.9.5.ebuild (aseprite-0.9.5.ebuild,935 bytes, text/plain)
2012-12-04 03:15 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
aseprite-0.9.5.ebuild (file_445814.txt,1.46 KB, text/plain)
2012-12-27 19:06 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
metadata.xml (file_445814.txt,511 bytes, text/plain)
2012-12-27 19:09 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
aseprite-0.9.5.ebuild (file_445814.txt,1.45 KB, text/plain)
2013-01-03 11:03 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
aseprite-0.9.5.ebuild (file_445814.txt,2.12 KB, text/plain)
2013-01-10 16:22 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
aseprite-0.9.5.ebuild (file_445814.txt,2.00 KB, text/plain)
2013-01-10 16:52 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
aseprite-9999.ebuild (file_445814.txt,1.92 KB, text/plain)
2013-01-15 21:05 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
metadata.xml (metadata.xml,504 bytes, text/plain)
2013-02-06 23:41 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
aseprite-0.9.5.ebuild (aseprite-0.9.5.ebuild,2.03 KB, text/plain)
2013-02-06 23:44 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
aseprite-9999.ebuild (aseprite-9999.ebuild,1.95 KB, text/plain)
2013-02-06 23:46 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
aseprite-0.9.5.ebuild (aseprite-0.9.5.ebuild,2.35 KB, text/plain)
2013-02-07 00:24 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
aseprite-9999.ebuild (aseprite-9999.ebuild,2.27 KB, text/plain)
2013-02-07 00:26 UTC, Tom Wijsman (TomWij) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-12-03 16:44:23 UTC
Created attachment 331316 [details]
aseprite-0.9.5.ebuild

Animated sprite editor & pixel art tool.

This is also available in the overlay "TomWij".

I'm up for becoming a proxy maintainer for this package if that's possible.

Feedback is welcome...
Comment 1 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-12-03 16:45:19 UTC
Created attachment 331318 [details, diff]
files/aseprite-0.9.5-as-needed.patch

Patch to make the default Gentoo LDFLAGS work.
Comment 2 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-12-03 16:47:00 UTC
*** Bug 86673 has been marked as a duplicate of this bug. ***
Comment 3 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-12-03 16:50:56 UTC
In the ebuild there still is a

> # LIBLOADPNG still missing.

present as further testing needs to show whether this is still needed, or already provided through some other dependency; although I have found aseprite to work quite well and have tested it extensively.
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2012-12-03 20:51:35 UTC
Hi

A few comments

I believe cmake-utils eclass can make use of the PATCHES=() array so instead of implementing your own src_prepare in order to apply the patch you can define

PATCHES=( ${FILESDIR}/aseprite-0.9.5-as-needed.patch ) in global scope and drop src_prepare all together. Also KEYWORDS must be sorted alphabetically
Comment 5 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-12-04 03:15:27 UTC
Created attachment 331368 [details]
aseprite-0.9.5.ebuild

Thanks for the PATCHES variable, haven't seen that documented anywhere yet, it's definitely handy.

As for the keywords, there doesn't seem to be a hard policy maintaining it (discovered that by asking on chat where I can add checks to repoman) but that I could use `ekeyword` to keep them in order, will do that for now and might add checks for things like these to my local repoman just for readability purposes.

Changes for all feedback have been applied.

TODO: It appears that the "default fullscreen" doesn't work properly and hence it starts extremely small (even without that define present), there is a --resolution WxH command-line parameter to set its resolution; it appears that resets as the package is emerged again. I need to see whether this is upstream behavior and figure out a fix for this, or perhaps print out instructions for now...
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2012-12-21 19:27:10 UTC
are we ok to commit it here? The ebuild looks ok ( i will give it another go before I commit it). 

Did you send the asneeded patch upstream?
Comment 7 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-12-21 19:42:49 UTC
(In reply to comment #6)
> are we ok to commit it here? The ebuild looks ok ( i will give it another go
> before I commit it). 

Yes, should be okay to commit; two notes:

Note 1: I haven't yet figured out whether the library "# LIBLOADPNG still missing" is actually needed, it compiled fine without it so it might be that it's no longer an actual dependency; perhaps grepping the entire source might reveal that.

Note 2: "-D FULLSCREEN_PLATFORM=ON" doesn't work reliable to me.

> Did you send the asneeded patch upstream?

No, I didn't do that yet, but I'll do that this weekend.
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2012-12-21 20:38:04 UTC
would it be possible to add more useflags to make all this configure switches optional?
Comment 9 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-12-27 14:01:02 UTC
> would it be possible to add more useflags to make all this configure switches optional?

Inspecting this, I don't think there is that much optional to this.

Let's see...

> option(USE_STATIC_LIBC "Use static version of C and C++ runtimes" off)

Would I need to add an USE flag "static-libs" for this?

> option(USE_SHARED_... "Use your installed copy of ..." off)

These just determine whether to use a library provided by the system or to build a copy of the library that is packed along, I don't think it would make sense to provide USE flags to individually turn the shared option on/off as the Portage libraries seem to suffice.

> option(ENABLE_MEMLEAK "Enable memory-leaks detector (only for developers)" off)

Shouldn't be necessary towards the user, but could be provided as an USE flag "memleak" to make it easier for developers.

> option(ENABLE_UPDATER "Enable automatic check for updates" on)

We certainly don't want automatic updates outside of Portage, this one is "on" by default so we need to explicitly disable this.

> option(FULLSCREEN_PLATFORM "Enable fullscreen by default" off)

I haven't seen this option result in a remarkable change of behaviour and don't think it should be an USE flag; we should have a proper default and point the user towards a configuration setting they can change, or parameter they can pass.

---------

I have sent the asneeded patch upstream.

As a summary, I still need to apply the following changes:

- Provide a "memleak" USE flag to toggle the memory-leak detector, disabled by default.
- Make sure the updater is disabled, provide no USE flag for this.
- Enable fullscreen behavior by default and warn the user through elog how to change it.
- Inspect LIBLOADPNG more closely, play around with PNG related features (save and load one).
- Act on your answer to below question.

So, what do you think regarding to the static-libs USE flag and the individual shared USE flags?
Comment 10 Sergey Popov gentoo-dev 2012-12-27 17:19:28 UTC
(In reply to comment #9)
> So, what do you think regarding to the static-libs USE flag and the
> individual shared USE flags?

USE="static-libs" is good. As for shared libs - generally you should always use them and not bundled copies, so use flag is probably unneeded, unless bundled libraries are heavily patched and not compatible with those, which is in main tree.
Comment 11 Julian Ospald 2012-12-27 17:38:27 UTC
- does virtual/jpeg not work?

- please order the dependencies alphabetically

- libpng is probably missing a slot (media-libs/libpng:0) unless it works a) with both and b) without headers (since media-libs/libpng:1.2 does not provide any headers and is only available for backwardscompatibility)

- afais USE_STATIC_LIBC does nothing
Comment 12 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-12-27 19:06:04 UTC
Created attachment 333518 [details]
aseprite-0.9.5.ebuild

Updated the ebuild with the various suggestions, works without the USE flags.

USE=memleak fails with:

> /var/tmp/portage/dev-games/aseprite-0.9.5/temp/ccE4cuuz.ltrans19.ltrans.o: In function `ui::LinkLabel::onProcessMessage(ui::Message*)':
> /var/tmp/portage/dev-games/aseprite-0.9.5/work/aseprite-0.9.5/src/ui/link_label.cpp:57: undefined reference to `Launcher::openUrl(std::string const&)'
> collect2: error: ld returned 1 exit status

Do I need to report this upstream?

USE=static-libs works.
Comment 13 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-12-27 19:09:30 UTC
Created attachment 333520 [details]
metadata.xml

Contains a description of the package and explanation of the USE flags (copied from CMakeLists.txt); depending on whether this will go through proxy maintenance or recruitment, the maintainer section will probably still need to be updated.
Comment 14 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-12-27 19:13:10 UTC
Can we add loadpng (http://tjaden.strangesoft.net/loadpng/) to the tree as well?

I don't have this library on my system and can successfully load and save PNG so I don't see what this library is used for, dropping it as a dependency doesn't feel like a clean approach though... 

I'll ask the upstream developer about this.
Comment 15 Julian Ospald 2012-12-27 20:33:15 UTC
afaiu "static-libs" is the wrong useflag here, see the description:

static - !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically
static-libs - Build static libraries
Comment 16 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-01-02 01:17:30 UTC
The as-needed patch has since been applied upstream, see

https://github.com/dacap/aseprite/commit/8fb637c8a1dc0091db54f0297940dc42a66ca498

I will apply the latest changes tomorrow and remove the patch in the ebuild by 0.9.6, and perhaps also look into creating a -9999 version.

The upstream developer David C. has also told me that

> PS: About 'loadpng', it's necessary to load/save palettes in png format.

so I'll look into adding that library to Portage as well.
Comment 17 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-01-03 11:03:00 UTC
Created attachment 334168 [details]
aseprite-0.9.5.ebuild

Changed static-libs into static as suggested, will do a -9999 version in a few hours from now.
Comment 18 Julian Ospald 2013-01-04 22:45:46 UTC
"-memleak" is pointless, just do "memleak"

order the PATCHES array after all dependencies

${FILESDIR} needs to be quoted

you don't install any docs, but there are several... in the root dir and in the "docs" subdir as well

add x11-libs/libX11 to dependencies

are you sure we don't need any useflags for media-libs/allegro? A few tests indicate no, but I haven't done many runtime tests

you should provide a debug useflag. The definitions are non-standard so in order to avoid using debug build type you can use flag-o-matic.eclass and do:
use debug && append-cppflags -DDEBUGMODE -D_DEBUG
it will still add -DNDEBUG if debug is enabled because of some build type checks that don't work nicely with our eclass. I propose a quick sed:
	sed -i -e '/DNDEBUG/d' CMakeLists.txt || die

this way we get "-DDEBUGMODE -D_DEBUG" on USE="debug" and "-DNDEBUG" on USE="-debug" which is the intended behavior from reading the build system

order IUSE alphabetically
Comment 19 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-01-10 16:22:47 UTC
Created attachment 335082 [details]
aseprite-0.9.5.ebuild

Added "flag-o-matic" inherit, added FTL license which appears to be used within the Aseprite and not in one of its dependencies (double checked the licenses), added "debug" and "doc" USE flags, adjusted Allegro dependency to need [X,png] as tested, added x11-libs/libX11 dependency, moved PATCHES to after (R)DEPEND, added src_prepare to respect the USE flags, added debug and docs.

Some of this is untested as Aseprite currently fails to compile whatever I try (even with the USE flags for which it worked, so I broke something in the process).

[31m[1mLinking CXX executable grid_ui_unittest
[0mcd /var/tmp/portage/dev-games/aseprite-0.9.5/work/aseprite-0.9.5_build/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/grid_ui_unittest.dir/link.txt --verbose=1
/usr/lib64/ccache/bin/x86_64-pc-linux-gnu-g++   -O2 -pipe -march=corei7 -ggdb -flto -w -fno-lto    -Wl,-O1 -Wl,--as-needed -flto -fno-lto -L/usr/lib64 -lalleg CMakeFiles/grid_ui_unittest.dir/ui/grid_ui_unittest.cpp.o  -o grid_ui_unittest -rdynamic -lgtest ../lib/libui-lib.a ../lib/libshe.a ../lib/libgfx-lib.a ../lib/libbase-lib.a -ljpeg -lz -lpng -lz -lgif -ltinyxml -lloadpng -lpthread -lpng -lgif -ltinyxml -lloadpng -lpthread 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: ../lib/libui-lib.a(theme.cpp.o): undefined reference to symbol 'getg'
/usr/lib/gcc/x86_64-pc-linux-gnu[0m/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'getg' is defined in DSO /usr/lib64/liballeg.so so try adding it to the linker command line
/usr/lib64/liballeg.so: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Comment 20 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-01-10 16:52:04 UTC
Created attachment 335084 [details]
aseprite-0.9.5.ebuild

Nevermind that compilation error, that was because the as-needed patch was no longer applied since I had introduced a src_prepare phase and didn't call the cmake specific installation functions. Upon closer inspection I have reworked the documentation installation to just use the DOCS array, which makes the ebuild more clean.
Comment 21 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-01-10 16:55:26 UTC
s/src_prepare/src_install/
Comment 22 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-01-15 21:05:06 UTC
Created attachment 335748 [details]
aseprite-9999.ebuild
Comment 23 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-06 23:41:40 UTC
Created attachment 338168 [details]
metadata.xml

Corrected static-libs to static and clarified its description.
Metadata reflects new e-mail.
Comment 24 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-06 23:44:54 UTC
Created attachment 338170 [details]
aseprite-0.9.5.ebuild

Changed year to 2013.
Removed -* from KEYWORDS.
Added support for FEATURES="test", remove tests for FEATURES="-test".
Corrected static-libs to static.
DOCS has been spread over multiple lines.
Removed "Full HD" from pkg_postinst example.
Comment 25 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-06 23:46:11 UTC
Created attachment 338172 [details]
aseprite-9999.ebuild

Same changes as above, removed SRC_URI and removed -* from KEYWORDS.
Comment 26 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-07 00:24:20 UTC
Created attachment 338174 [details]
aseprite-0.9.5.ebuild

Made gtest dependency depend on whether FEATURES="test" is set.
Made sure all sed commands use die when they fail.
Comment 27 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-07 00:26:01 UTC
Created attachment 338176 [details]
aseprite-9999.ebuild

See previous comment.
Comment 28 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-07 00:47:52 UTC
+*aseprite-0.9.5 (07 Feb 2013)
+*aseprite-9999 (07 Feb 2013)
+
+  07 Feb 2013; Tom Wijsman <TomWij@gentoo.org> +aseprite-0.9.5.ebuild,
+  +aseprite-9999.ebuild, +files/aseprite-0.9.5-as-needed.patch, +metadata.xml:
+  New ebuild for aseprite. Thanks to hwoarang, pinkbyte, hasufell, ssuominen and
+  mr-bones for proof-reading my first contribution. Fixes bug #445814.