GD package for MinGW64/32

Boszormenyi Zoltan zboszor at pr.hu
Fri Dec 2 20:15:20 UTC 2011


2011-12-02 16:57 keltezéssel, Erik van Pienbroek írta:
> Boszormenyi Zoltan schreef op vr 02-12-2011 om 15:13 [+0100]:
>> Hi,
>>
>> I was trying to cross-compile the RLIB reporting library:
>>
>> http://rlib.sicompos.com/
>> http://newrlib.sicom.com/~rlib/index.php/Main_Page
>>
>> and it prefers GD to be present. So, I tried to compile GD (version
>> 2.0.35-13 SRPM as in Fedora 16) using the fedora-cross repos
>> for MinGW32-w64. There were some problems with it as the
>> configure.ac in GD only expected Cygwin, not MinGW without Cygwin.
>>
>> The patch against configure.ac and the RPM specfile to package
>> for fedora-cross are attached.
> Thank you for the .spec file!

You're welcome :-)

>
> Normally these kind of new packages have to go through the Fedora
> package review process before they can be allowed in Fedora. However, as
> the mingw-w64 toolchain currently isn't available yet in Fedora (pending
> legal approval) I'm willing to do a review of the package through this
> mailing list. Once the package is approved I'll add it to the testing
> repo.
>
> Would you also be interested in becoming package maintainer for this
> package in Fedora once the mingw-w64 toolchain is available in Fedora?

How much work is it?

>
> On with the review.
> - The patch contains fixes which will also benefit non-fedora users who
> want to cross-compile GD from a linux host for the mingw32 target. Did
> you already consider sending the patch upstream?

I went to www.libgd.org but it's down. I will look for libgd developer
contact info though and send the patch for configure.ac.

> - For mingw-w64 packages, the first 6 lines of the .spec file (%global/%
> define) can be replaced by a single '%?mingw_package_header'
> - The mingw_package_header macro got introduced in mingw-filesystem 82,
> so please bump the BuildRequires: mingw32-filesystem and
> mingw64-filesystem to >= 82

OK.

> - The BuildRoot tag, the 'rm -rf $RPM_BUILD_ROOT' from the %install
> section, the entire %clean section and the various %defattr lines can
> all be removed as they're unneeded with modern RPM

I used this SRPM from your repo as template
http://build1.openftd.org/fedora-cross/src/mingw-glib2-2.29.2-3.fc15_cross.src.rpm
so any bugs are copy&paste from mingw-glib2.spec and leftovers
from the original Fedora gd.spec.

> - In the %build section there's a comment which says 'GD can't build..so
> we build GLib twice'. That looks like a copy/paste typo to me :)

... and I was caught :-)

> - Is building static and shared libraries at the same time really not
> possible with GD? Most packages support running the configure script
> with both '--enable-shared' and '--enable-static' set

No idea, I didn't try building both at the same time. I tried and
indeed it can build both shared and static in one go.

> - In the %install section there are some places where just used
> 'i686-w64-mingw32' and 'x86_64-w64-mingw32' literally. Please use the
> macros %{mingw32_target} and %{mingw64_target} there

You mean in the loops to rename %{whatever_target_prefix}-binaries?
OK, I will change these. I wasn't sure about the macro names for
targets, thanks for telling them.

> - The %post and %postun sections can be dropped as running ldconfig is
> only needed for native linux binaries

OK.

> - Please don't use wildcards in the %files section. Right now unexpected
> changes in file names won't be caught when using wildcards, so it's
> better to use a list containing all individual file names

I was lazy and didn't want to spell out 20+ exe names. I will change it.

> - The -static packages only needs to contain the .a files. The .dll.a
> and .la files need to be part of the main package as they're required
> when other packages want to link against GD
>
> Could you update the .spec file?

Here it is. I even suppressed the empty mingw-gd package now.
Thanks for the review again.

Best regards,
Zoltán Böszörményi


>
> Kind regards,
>
> Erik van Pienbroek
>
>
> _______________________________________________
> mingw mailing list
> mingw at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/mingw

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mingw-gd.spec
Url: http://lists.fedoraproject.org/pipermail/mingw/attachments/20111202/a736b296/attachment-0001.pl 


More information about the mingw mailing list