Skip to content
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

Gif2apng #894

Merged
merged 1 commit into from Dec 1, 2016
Merged

Gif2apng #894

merged 1 commit into from Dec 1, 2016

Conversation

@R167
Copy link
Contributor

R167 commented Nov 30, 2016

Added in gif2apng recipe. Does not support gcc2.

@fbrosson
Copy link
Member

fbrosson commented Nov 30, 2016

There are a couple of things to change. I'm writing a review.

Copy link
Member

fbrosson left a comment

Changes to allow installation to bin/ instead of bin/x86/.

BTW, you added a patch but you did not reference it. I guess it was for x86_gcc2 only.
I'll try to see if we can make it build on x86_gcc2 primary arch with your patch.


PROVIDES="
gif2apng$secondaryArchSuffix = $portVersion
cmd:gif2apng$secondaryArchSuffix = $portVersion

This comment has been minimized.

Copy link
@fbrosson

fbrosson Nov 30, 2016

Member

Then we drop the $secondaryArchSuffix from cmd:gif2apng$secondaryArchSuffix to let haikuporter know that it should not expect anything in $prefix/bin/x86/, since we're installing to $prefix/bin/.
You should therefore have:

	cmd:gif2apng = $portVersion
INSTALL()
{
mkdir -p $binDir
mv gif2apng $binDir

This comment has been minimized.

Copy link
@fbrosson

fbrosson Nov 30, 2016

Member

Should be:

        mkdir -p $commandBinDir
        cp gif2apng $commandBinDir

The reason why we prefer using cp instead of mv is that mv would break haikuporter -F.


ARCHITECTURES="x86 x86_64"
SECONDARY_ARCHITECTURES="x86"

This comment has been minimized.

Copy link
@fbrosson

fbrosson Nov 30, 2016

Member

If a recipe does not build on x86_gcc2 primary arch then we usually install to $prefix/bin instead of $binDir (which is $prefix/bin/x86 on x86 secondary arch).
For that purpose we define commandBinDir with these lines between SECONDARY_ARCHITECTURES and PROVIDES:


if [ "$targetArchitecture" != x86_gcc2 ]; then
	commandBinDir=$binDir
else
	commandBinDir=$prefix/bin
fi

(You can copy that block from haikuports/media-video/dvdauthor/dvdauthor-0.7.1.recipe)

This comment has been minimized.

Copy link
@R167

R167 Dec 1, 2016

Author Contributor

forgot to add the patch to the recipe file. Fixing.

@mmuman
Copy link
Member

mmuman commented Dec 1, 2016

Doesn't it have a make install ?
I'll let @fbrosson list the rest.

@R167
Copy link
Contributor Author

R167 commented Dec 1, 2016

@mmuman no, just generates the binary in the main directory. no install task defined in the makefile

@mmuman
Copy link
Member

mmuman commented Dec 1, 2016

Ok then.

Copy link
Member

fbrosson left a comment

Cosmetic changes for DESCRIPTION and SOURCE_URI.

@@ -0,0 +1,44 @@
SUMMARY="Converts GIF animations into APNG format"
DESCRIPTION="This program converts GIF animations into animated PNG format. \
Usually it makes the files smaller. CLI version is OS-independent."

This comment has been minimized.

Copy link
@fbrosson

fbrosson Dec 1, 2016

Member

We can probably remove the "CLI version is OS-independent."

COPYRIGHT="2009-2013 Max Stepin"
LICENSE="Zlib"
REVISION="1"
SOURCE_URI="https://sourceforge.net/projects/gif2apng/files/$portVersion/gif2apng-$portVersion-src.zip"

This comment has been minimized.

Copy link
@fbrosson

fbrosson Dec 1, 2016

Member

I forgot to suggest a slightly better SOURCE_URI:

SOURCE_URI="https://downloads.sourceforge.net/gif2apng/gif2apng-$portVersion-src.zip"
@R167
Copy link
Contributor Author

R167 commented Dec 1, 2016

just pushed updates @fbrosson. Thoughts?

@R167 R167 force-pushed the R167:gif2apng branch from d8b86ed to 4400862 Dec 1, 2016
@fbrosson
Copy link
Member

fbrosson commented Dec 1, 2016

Sorry for the delay. I was trying to build on x86_gcc2 primary arch with a variant of your patch.
The idea was to replace -lstdc++ by $(LIB_STDCPP) in the Makefile with the patch, and then define LIB_STDCPP with:

if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
	PATCHES="gif2apng-$portVersion-lstdc++.patchset"
	LIB_STDCPP=-lstdc++.r4
else
	LIB_STDCPP=-lstdc++
fi

in order to be able to have this in BUILD:

	LIB_STDCPP=$LIB_STDCPP make

Unfortunately it does not work: I get undefined reference to __builtin_clz:

obj/zopfli/util.o: In function `ZopfliGetDistExtraBits':
util.c:(.text+0x21): undefined reference to `__builtin_clz'
obj/zopfli/util.o: In function `ZopfliGetDistExtraBitsValue':
util.c:(.text+0x5c): undefined reference to `__builtin_clz'
obj/zopfli/util.o: In function `ZopfliGetDistSymbol':
util.c:(.text+0xac): undefined reference to `__builtin_clz'

So I guess the best option is to drop x86_gcc2 as primary arch. (That's what you did ;-)
I don't know, however, if we should have:

ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"

or

ARCHITECTURES="x86 x86_64"
SECONDARY_ARCHITECTURES="x86"

(I think we should have the !x86_gcc2 but I'm not sure.)

@R167
Copy link
Contributor Author

R167 commented Dec 1, 2016

@fbrosson yeah, that was the error I kept running into with GCC2. the issue is that zopfli requires later than GCC4. might just not include the x86_gcc2 for that reason, but up to you.

else
commandBinDir=$prefix/bin
fi
echo $commandBinDir

This comment has been minimized.

Copy link
@fbrosson

fbrosson Dec 1, 2016

Member

It would be better without the echo $commandBinDir ;-)

Everything else looks OK. I'll build it on each of my architectures and then merge.

This comment has been minimized.

Copy link
@R167

R167 Dec 1, 2016

Author Contributor

WHOOPS! completely forgot about that. doh!

This comment has been minimized.

Copy link
@fbrosson

fbrosson Dec 1, 2016

Member

While at it, can you also change ARCHITECTURES to:

ARCHITECTURES="!x86_gcc2 x86 x86_64"

Thanks!

This comment has been minimized.

Copy link
@R167

R167 Dec 1, 2016

Author Contributor

okay, fixed that now.

@R167 R167 force-pushed the R167:gif2apng branch 2 times, most recently from 72f5e81 to 0b8d4ed Dec 1, 2016
@R167
Copy link
Contributor Author

R167 commented Dec 1, 2016

okay, now it's fixed.

commandBinDir=$prefix/bin
fi
mkdir -p $commandBinDir
cp gif2apng $commandBinDir

This comment has been minimized.

Copy link
@fbrosson

fbrosson Dec 1, 2016

Member

Maybe we should simplify INSTALL to have only:

INSTALL()
{
	mkdir -p $prefix/bin
	cp gif2apng $prefix/bin
}

I had suggested defining commandBinDir because we often do that, but since we don't even use it in BUILD (for this recipe) it does not really make sense to define commandBinDir just for INSTALL. Moreover, we just use it twice. (So sorry for the bad suggestion...)

This comment has been minimized.

Copy link
@R167

R167 Dec 1, 2016

Author Contributor

it's all good.

This comment has been minimized.

Copy link
@fbrosson

fbrosson Dec 1, 2016

Member

Great. Thanks! I'll validate your task asap.
Then I'll build the recipe on x86 and x86_64 before I merge.

@R167 R167 force-pushed the R167:gif2apng branch from 0b8d4ed to 556f815 Dec 1, 2016
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:automake

This comment has been minimized.

Copy link
@fbrosson

fbrosson Dec 1, 2016

Member

It builds fine without cmd:automake so it would be nice to remove that dependency. Thanks!

This comment has been minimized.

Copy link
@R167

R167 Dec 1, 2016

Author Contributor

good now?

This comment has been minimized.

Copy link
@fbrosson

fbrosson Dec 1, 2016

Member

Yes, it's perfect ;-)

To HaikuPorts members: If you merge, please don't forget to schrink the commit message.
But don't worry. I'll merge it myself as soon as I have built it on all architectures.

zopfli does not work with gcc2

added secondary arch

fixed bin dir not existing

Fixed by suggestions from fbrosson

removed debug echo line

arch

removed binDir

Removed automake dep
@R167 R167 force-pushed the R167:gif2apng branch from 556f815 to 4592163 Dec 1, 2016
@pulkomandy
Copy link
Member

pulkomandy commented Dec 1, 2016

@fbrosson
Copy link
Member

fbrosson commented Dec 1, 2016

OK, thanks.

@fbrosson fbrosson merged commit 6d279fa into haikuports:master Dec 1, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@fbrosson
Copy link
Member

fbrosson commented Dec 9, 2016

Now that this PR has been merged, the branch it is based on is no longer needed.
You should therefore click "Delete branch" for this PR to get rid of an unneeded branch in your repo. Thanks!
GitHub help: Deleting unused branches

@R167 R167 deleted the R167:gif2apng branch Dec 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.