GD package for MinGW64/32

Erik van Pienbroek erik at vanpienbroek.nl
Sat Dec 3 15:04:27 UTC 2011


Boszormenyi Zoltan schreef op vr 02-12-2011 om 21:15 [+0100]:
> 2011-12-02 16:57 keltezéssel, Erik van Pienbroek írta:
> > 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?

Basically it means that you'll have to update the package once upstream
releases new versions and that you'll take care of any bugreports which
might get filed against this package. Of course we (the Fedora MinGW
SIG) will help you with this, but being package owner will mean that
you'll become the primary point of contact.

For a package like GD (which doesn't have that much upstream releases
these days) I think it doesn't require that much maintenance.

> 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.

Ah I see. The .src.rpm you mentioned is a bit outdated right now. The
most recent version of the .spec files in the mingw-w64 testing repo can
be found at http://svn.openftd.org/svn/fedora_cross/ (which will also be
the location where I'll add your package for the time being). The reason
why I didn't upload all the recent .src.rpm's is a lack of disk space on
the webhost. All .src.rpm's can easily be regenerated by checking out
the svn repo I just mentioned.

> > - 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.

You can see all the available RPM macros in the
files /etc/rpm/macros.mingw, /etc/rpm/macros.mingw32
and /etc/rpm/macros.mingw64. Additionally almost all these RPM macros
are also documented in the new Fedora MinGW Packaging Guidelines:
https://fedoraproject.org/wiki/Packaging:MinGW_Future

> > Could you update the .spec file?
> 
> Here it is. I even suppressed the empty mingw-gd package now.
> Thanks for the review again.

Very good!

I just tried to build your package in mock, but it failed to build:

+ libtoolize -c -f -i
/var/tmp/rpm-tmp.LdzcCW: line 72: libtoolize: command not found
fout: Bad exit status from /var/tmp/rpm-tmp.LdzcCW (%prep)
    Bad exit status from /var/tmp/rpm-tmp.LdzcCW (%prep)
RPM build errors:
Child returncode was: 1

Looks like you need to add a 'BuildRequires: libtool' to the .spec file.
In your .spec file there's also an 'autoreconf' call, so that means that
an additional 'BuildRequires: autoconf automake' also needs to be added.

I just tried building with these additional changes, but that still
gives me the following error:

+ autoreconf -f -i
configure.ac:69: warning: macro `AM_ICONV' not found in library
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `config'.
libtoolize: copying file `config/libtool.m4'
libtoolize: copying file `config/ltoptions.m4'
libtoolize: copying file `config/ltsugar.m4'
libtoolize: copying file `config/ltversion.m4'
libtoolize: copying file `config/lt~obsolete.m4'
configure.ac:69: warning: macro `AM_ICONV' not found in library
configure.ac:69: error: possibly undefined macro: AM_ICONV
      If this token and others are legitimate, please use
m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
fout: Bad exit status from /var/tmp/rpm-tmp.fwW3FS (%prep)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.fwW3FS (%prep)
Child returncode was: 1

To fix this, a 'BuildRequires: gettext-devel' also needs to be added.

With all these additional BuildRequires the package builds fine in mock.

After you've made these changes I'll add the package to the mingw-w64
testing repo.

Kind regards,

Erik van Pienbroek




More information about the mingw mailing list