GD package for MinGW64/32

Erik van Pienbroek erik at vanpienbroek.nl
Fri Dec 2 15:57:09 UTC 2011


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!

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?

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?
- 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
- 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
- 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 :)
- 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
- 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
- The %post and %postun sections can be dropped as running ldconfig is
only needed for native linux binaries
- 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
- 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?

Kind regards,

Erik van Pienbroek




More information about the mingw mailing list