RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [PATCH] Compile popt under Windows using gnulib

From: Jeff Johnson <n3npq@mac.com>
Date: Sat 25 Oct 2008 - 17:31:49 CEST
Message-id: <6DB1FC30-2E35-4F77-A2C6-5A36438C6A03@mac.com>
FYI: patches to <popt-devel@rpm5.org>, please. I'll take
patches however they are sent however. *shrug*

I can't tie builds of popt to gnulib, even for cross-compiles, there's  
way too many
projects that depend on popt.

What could be done is disable the usage of glob(3)
if glob is not available through configure tests.

73 de Jeff

On Oct 25, 2008, at 10:52 AM, Richard W.M. Jones wrote:

> This patch allows popt from CVS to be cross-compiled for Windows using
> MinGW and Win32 API (not Cygwin).
> It uses Gnulib to supply the missing functionality -- mainly glob(3)
> and globfree(3).
> Note that the patch isn't "complete".  As you can see from the
> modification to autogen.sh you are expected to have a checkout of
> gnulib itself in a directory adjacent to popt (../gnulib/).  That will
> pull in the additional files from Gnulib.  A better explanation is
> probably to read the Gnulib manual:
> http://www.gnu.org/software/gnulib/manual/gnulib.html#Initial-import
> All the Gnulib modules imported are LGPLv2+ (except for one which is
> public domain).
> If you have the MinGW cross-compiler installed, eg. from [1], then you
> can compile popt for Windows by doing:
>  PKG_CONFIG_PATH=/usr/i686-pc-mingw32/sys-root/mingw/lib/ 
> pkgconfig   ./autogen.sh     --host=i686-pc-mingw32 --prefix=/usr/ 
> i686-pc-mingw32/sys-root/mingw
>  make -C lib fnmatch.h                   # BUG IN GNULIB?
>  make
> You'll get a DLL, and test{1,2,3}.exe which can be run under Wine (or
> even on Windows :-).
> For reference you can find our mingw32-popt RPM sources here:
> http://hg.et.redhat.com/misc/fedora-mingw--devel/?cmd=manifest;manifest=6651a3a433544afe0cc67b0fcb5668d71d3ecfbf;path=/popt/
> Rich.
> [1] http://www.annexia.org/tmp/mingw/fedora-9/i386/
> -- 
> Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
> virt-p2v converts physical machines to virtual machines.  Boot with a
> live CD or over the network (PXE) and turn machines into Xen guests.
> http://et.redhat.com/~rjones/virt-p2v
> <popt-win.patch>
Received on Sat Oct 25 17:31:54 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.