New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created apng2gif recipe #910
Conversation
Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK, but a little polishing would be nice ;-)
REQUIRES=" | ||
haiku$secondaryArchSuffix | ||
lib:libz$secondaryArchSuffix | ||
lib:libpng$secondaryArchSuffix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not required, by we like to sort alphabetically the lib:*
lines in REQUIRES.
BUILD_REQUIRES=" | ||
haiku${secondaryArchSuffix}_devel | ||
devel:libz$secondaryArchSuffix | ||
devel:libpng$secondaryArchSuffix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not required, by we like to sort alphabetically the devel:*
lines in BUILD_REQUIRES.
INSTALL() | ||
{ | ||
mkdir -p $prefix/bin | ||
cp apng2gif $prefix/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please use the install command, instead of mkdir and cp?
We have a recipe which you can get inspiration from:
app-misc/hexcompare/hexcompare-1.0.4.recipe
Sorry about that, just tacked the deps onto the end of the list cause I was rushing. Also, updated where I had previously done the cp in gif2apng. Would that change require a bump to revision? |
LGTM. Regarding the revision bump for cosmetic changes in other recipes, there is no need to bump if the resulting package is identical. If you wish, however, you might claim this task: |
BUILD_PREREQUIRES=" | ||
cmd:gcc$secondaryArchSuffix | ||
cmd:make | ||
cmd:ld$secondaryArchSuffix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I missed this one ;-)
That's not required, by we like to sort alphabetically the cmd:*
lines in BUILD_PREREQUIRES.
Sure thing. Only made that change because I had just copied the majority of that recipe over and thought it best to use a more standardized process than the mkdir && cp workflow. Will fix that latest one too. :-) |
Hmm, that's a very good idea to fix apng2gif with gif2apng! Well done! |
May I suggest an alternate commit message? What about this:
Hmm, you may need to add |
just checked and everything went fine without |
else | ||
commandSuffix= | ||
commandBinDir=$prefix/bin | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, let's drop this block (in both apng2gif and gif2apng).
There are several reasons for this:
- We are not using commandSuffix.
- We are only using commandBinDir in one place, INSTALL, and we can replace
$commandBinDir
by$prefix/bin
for this recipe on all architectures, both primary and secondary. - This recipe does not provide any lib, so after we drop x86_gcc2 (some time in the future) we will be able to completely drop support for secondary architectures for this recipe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. Was initially going that route, but wasn't sure if you were going to end up having me add it.
OK, since you have successfully tested without cmd:install, I guess we don't need it in BUILD_PREREQUIRES. |
Looks OK. May I ask you a final touch? |
Cool! Thanks for the update of the commit message. This recipe was really easy, wasn't it? |
Sure thing. I just did this one cause I just worked on gif2apng recipe and knew about its weird quirks (Source_dir needs to be an empty string and all the fun oddities for make), so I just figured I would do it. Definitely want to look more into the library ones if only to better understand how they work for linking, etc. Will do! :) |
Oops, it would be better, after all, to bump REVISION (for gif2apng only, of course) because now the package includes the readme.txt file in $docDir. |
done. |
Thanks! I did workaround this issue myself on another package (not yet in the repo) which has the same dependency, but did never submit it because it still needs some polishing. Would you mind if I ask @korli or @pulkomandy if it would be desirable to try to make apng2gif build on x86_gcc2 primary arch? |
I don't mind. We could set it up so that it uses the correct one depending on target architecture, but that sounds like excessive complexity if the intention is to EOL gcc2 soon (not like it was already EOL everywhere else :)). I remember when I found that before, but ended up not using it because of a C99 requirement or something like that. IDK: I am tired and rambly right now. Judgement call is up to you. Also, where can I find docs for adding libs in haikuports? Didn't see anything specific in the wiki, and I am looking at tackling the libp11 task next. If not any docs, any particular recipe/example to look at? (Biggest thing I really don't know how to do is going to be how to test if I did everything right). Thanks again, @fbrosson! |
This is what we might try:
And in the patch we would replace -lstdc++ by $(LIB_STDCPP).
Reminder: I don't know if this would desirable, so you might wish to wait for @korli's or @pulkomandy's or @mmuman's opinion about this. |
Hmm, I wonder if this would work, without any patch:
|
The proper way would be to use g++ as a linker, instead of calling ld or gcc directly. g++ knows which compiler flags to add so there is no need for an explicit -lstdc++. |
Since the Makefile defines CC=gcc, I thought it would be possible, with
I tried, however, to use this (on x86_gcc2 primary arch):
and it works perfectly! |
BTW, I forgot to thank you for your reply!!! |
SOURCE_DIR="" | ||
|
||
ARCHITECTURES="!x86_gcc2 x86 x86_64" | ||
SECONDARY_ARCHITECTURES="x86" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall use the LIBS= workaround?
If I'm not mistaken, this is what we need to do:
- replace:
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
by
ARCHITECTURES="x86_gcc2 x86 x86_64"
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
LIBS="-lstdc++.r4 -lpng -lz"
else
LIBS="-lstdc++ -lpng -lz"
fi
-
drop all occurences off
$secondaryArchSuffix
; -
replace
$prefix/bin
by$binDir
(in INSTALL)
(But let's see what our other contibutors thing about this.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I forgot to mention we also need to change BUILD to:
make LIBS="$LIBS"
@korli, @pulkomandy, @mmuman, do we have green lights for this tiny workaround that allows to build apng2gif (and also gif2apng) on x86_gcc2 primary arch? I guess we have, but I'd like to be sure ;-) Thanks!
(I'm asking because I think @R167 is waiting for out green lights to do the change, as I suggested we should wait for your thoughts about it.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, looks fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks @pulkomandy!
@R167, can you please update this PR with the changes (for both recipes)?
EDIT: Although apng2gif builds fine on x86_gcc2 primary arch, gif2apng, on the other side, still does not (due to the zopfli stuff). So for gif2apng the only thing we can do is the polishing.
For the commit title I suggest keeping chaging it to:
apng2gif: new recipe. gif2apng: polishing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it. will do so tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. fine.
Let me update the GCI task with a "Request More Work", otherwise we might forget and Google will think Haiku is not responding quickly enough ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, the commit title I suggested earlier is not very nice, after all.
So when you update this PR could you please replace
apng2gif: new recipe. gif2apng: a bit of polishing.
by
apng2gif: new recipe. gif2apng: polishing."
(My "a bit of" was a bit silly, wasn't it ;-)
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LIBS works great with apng2gif, but gif2apng errors out on undefined references (i did make sure that it was using the right version). See error below. (added in patches for that, but it did NOT have the PATCHES var set. changes didn't succeed in fixing it anyways)
these changes work for apng2gif, but the libs override doesn't work with gif2apng, erroring out on:
Latest commit rollsback changes to gif2apng (since they were previously bundled). |
Everything is OK. |
Sure thing. Will squash for you now. Was just waiting for your signal in case I needed to revert anything. :) |
That's perfect! Thanks! |
@R167, I wrote this 2 weeks ago because you were by far the most active student at that time.
But it was not fair (from my side) to suggest that you took harder tasks, even only from time to time. |
Related to gif2apng recipe.