[Gpg4win-devel] gpgme in gpg4win?
Marcus Brinkmann
marcus.brinkmann at ruhr-uni-bochum.de
Fri Nov 13 00:53:47 CET 2009
Nikolay Sklabinsky wrote:
> I would really like to avoid compilation using MinGW32. I started from it
> trying to compile gpgme sources and failed completely. In addition, what
> would I gain from compiling it? As I understand both libgpgme and
> libgpg-error already exist as part of gpg4win, compiled and installed. My
> plan was to install gpg4win, then use gpgme (libgpgme-11.dll now), either
> from c# or, if it proves to be too tricky, through a c++ intermediate
> library. All I need (as I imagined it) is the header file. Does this make
> sense?
I think you also need an import library, which you can probably build from the
libgpgme.def file that is in SVN, but I can't help you with that.
The reason I recommended the procedure I did recommend is that it is known to
work and is already supported by us.
Also, not to be too picky about it, but the license requires you to provide
the complete source of libgpgme (not of your application, though) to your
downstream (if it is distributed at all). This includes build scripts, but
how can you know what the sources are if you can't build it.
The last reason is that if you need to debug or hot-fix something, you need to
build it yourself, too. Now, only you know if this is a valid concern, but it
is part of the reasons I made my recommendation.
I can not recommend this approach strongly enough. In fact, here is another
approach that is known to work and does avoid gpg4win altogether. It is
*very* lightweight.
Get: cvs.gnupg.org:/cvs/mb/speedo
apply this patch:
--- ../speedo/speedo.mk 2008-05-05 00:10:35.000000000 +0200
+++ speedo.mk 2009-06-23 16:07:49.000000000 +0200
@@ -96,6 +96,7 @@
eval "../$$$${pkg}/configure" \
--enable-maintainer-mode \
--prefix="$$$${pkgidir}" \
+ --host=i586-mingw32msvc \
$$$${pkgcfg})
touch stamps/stamp-$(1)-01-configure
Change speedo_spkgs to read:
speedo_spkgs = libgpg-error gpgme
However, as current SVN is under heavy development, you might need to switch
to particular revisions of SVN or regular releases. This is not hard to add
to the Makefile.
If done correctly, this is really a matter of minutes. Cross compilation does
have its quirks, but here in the case of gpg-error and gpgme it is as
straightforward as it ever can be. The only thing required is to set a
different --prefix and to set --host=i586-mingw32msvc. It couldn't possibly
be simpler.
Thanks,
Marcus
More information about the Gpg4win-devel
mailing list