2005-10-23 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Sun, 23 Oct 2005 20:08:48 +0000 (20:08 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Sun, 23 Oct 2005 20:08:48 +0000 (20:08 +0000)
* src/gpg4win.mk.in (pdir): Call post_install with source dir as
current directory.
* configure.ac (VERSION): Check for dlltool.
* src/Makefile.am (gpg4win_pkg_libiconv_post_install,
gpg4win_pkg_gettext_post_install): New macros.
* src/libiconv.def, src/libintl.def: New files.
* src/inst-libgpg-error.nsi: Install mo files.
* src/uninst-libgpg-error.nsi: Uninstall mo files.

ChangeLog
configure.ac
src/Makefile.am
src/gpg4win.mk.in
src/inst-libgpg-error.nsi
src/libiconv.def [new file with mode: 0644]
src/libintl.def [new file with mode: 0644]
src/uninst-libgpg-error.nsi

index 00d42db..d1b765f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
+2005-10-23  Marcus Brinkmann  <marcus@g10code.de>
+
+       * src/gpg4win.mk.in (pdir): Call post_install with source dir as
+       current directory.
+       * configure.ac (VERSION): Check for dlltool.
+       * src/Makefile.am (gpg4win_pkg_libiconv_post_install,
+       gpg4win_pkg_gettext_post_install): New macros.
+       * src/libiconv.def, src/libintl.def: New files.
+       * src/inst-libgpg-error.nsi: Install mo files.
+       * src/uninst-libgpg-error.nsi: Uninstall mo files.
+
 2005-10-22  Marcus Brinkmann  <marcus@g10code.de>
 
+       * configure.ac: Add libiconv and gettext as dependencies for
+       libgpg-error and gpa.
+       * src/Makefile.am (gpg4win_pkg_libgpg_error_configure): New
+       variable.
+
        * src/Makefile.am (common_nsi): Add uninstaller files.
        * src/uninst-atk.nsi, src/uninst-gettext.nsi, src/uninst-glib.nsi,
        src/uninst-gnupg.nsi, src/uninst-gpa.nsi, src/uninst-gpgme.nsi,
index 275900f..e1f12bb 100644 (file)
@@ -39,6 +39,7 @@ AC_SUBST(VERSION)
 
 # Required tools.
 
+AC_CHECK_TOOLS(DLLTOOL, dlltool)
 AC_CHECK_PROGS(MAKE, make)
 AC_CHECK_PROGS(UNZIP, unzip)
 AC_CHECK_PROGS(TAR, tar)
@@ -69,11 +70,11 @@ GPG4WIN_BPKG_GTK_DEV([gtk+], [atk pango glib libiconv gettext pkgconfig])
 GPG4WIN_BPKG_GTK_DEV([atk], [glib pkgconfig])
 GPG4WIN_BPKG_GTK_DEV([pango], [glib pkgconfig])
 
-GPG4WIN_SPKG([libgpg-error])
+GPG4WIN_SPKG([libgpg-error], [libiconv gettext])
 GPG4WIN_SPKG([gpgme], [libgpg-error gnupg])
 GPG4WIN_SPKG([gnupg])
 GPG4WIN_SPKG([gpgol], [gpgme])
-GPG4WIN_SPKG([gpa], [zlib gtk+ libpng glib gpgme])
+GPG4WIN_SPKG([gpa], [libiconv gettext zlib gtk+ libpng glib gpgme])
 
 GPG4WIN_FINALIZE
 
index fef19ea..c0f4b61 100644 (file)
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
 
-EXTRA_DIST = pkg-config $(common_nsi) gpg4win.nsi gpg4win-src.nsi
+EXTRA_DIST = pkg-config $(common_nsi) gpg4win.nsi gpg4win-src.nsi \
+       libiconv.def libintl.def
 
 # Supported source packages.
 gpg4win_spkgs := gnupg libgpg-error gpgme gpgol gpa
 
 # Extra options to configure for individual packages.
 # We can use $(idir) here for the installation prefix.
+
+# We would like to use --with-libiconv-prefix and
+# --with-libintl-prefix, but these don't work with the cheesy
+# non-"libfoo.la" versions of iconv and gettext that we are using.
+#gpg4win_pkg_libgpg_error_configure = \
+#  --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir)
+gpg4win_pkg_libgpg_error_configure = \
+  CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib
+
 gpg4win_pkg_gpgme_configure = \
   --with-gpg-error-prefix=$(idir) --without-gpgsm --enable-static
 
@@ -38,6 +48,25 @@ gpg4win_pkg_gpgol_configure = \
 # Supported binary packages.
 gpg4win_bpkgs :=  libiconv gettext pkgconfig zlib glib libpng pango atk gtk+
 
+# libiconv needs some special magic to generate a usable import
+# library.
+define gpg4win_pkg_libiconv_post_install
+(cp $(srcdir)/libiconv.def $$$${pkgidir}/lib;          \
+cd $$$${pkgidir}/lib;                                  \
+$(DLLTOOL) --output-lib libiconv.dll.a --def libiconv.def)
+endef
+
+# libiconv needs some special magic to generate a usable import
+# library.  Note that we include some internal symbols that are not
+# actually part of the DLL.  They are needed by the AM_GNU_GETTEXT
+# configure test, but not used otherwise.
+define gpg4win_pkg_gettext_post_install
+(cp $(srcdir)/libintl.def $$$${pkgidir}/lib;           \
+cd $$$${pkgidir}/lib;                                  \
+$(DLLTOOL) --output-lib libintl.dll.a --def libintl.def)
+endef
+
+
 # Zlib needs some special magic to generate a libtool file.
 define gpg4win_pkg_zlib_post_install
 (cd $$$${pkgidir_dev};                                 \
index 1755f0c..ada7930 100644 (file)
@@ -162,9 +162,9 @@ stamps/stamp-$(1)-00-install: stamps/stamp-directories
 stamps/stamp-$(1)-01-install-dev: stamps/stamp-$(1)-00-install
        ($(call SETVARS,$(1));                          \
         $(MKDIR) "$$$${pkgidir_dev}";                  \
-        cd $$$${pkgidir_dev};                          \
-        $(call DEFLATE_macro,$$$${pkg_dev});           \
-        $(call STRIP_macro,"$$$${pkgidir_dev}");       \
+        (cd $$$${pkgidir_dev};                         \
+         $(call DEFLATE_macro,$$$${pkg_dev});          \
+         $(call STRIP_macro,"$$$${pkgidir_dev}"));     \
         $(call gpg4win_pkg_$(call FROB_macro,$(1))_post_install))
        touch stamps/stamp-$(1)-01-install-dev
 
index bb8fe2b..998c955 100644 (file)
@@ -34,7 +34,19 @@ Section "-libgpg-error" SEC_libgpg_error
   File "${gpg4win_pkg_libgpg_error}"
 !else
   File ${prefix}/bin/libgpg-error-0.dll
+
+  SetOutPath "$INSTDIR\share\locale\de\LC_MESSAGES"
+  File ${prefix}/share/locale/de/LC_MESSAGES/libgpg-error.mo
+  SetOutPath "$INSTDIR\share\locale\pl\LC_MESSAGES"
+  File ${prefix}/share/locale/pl/LC_MESSAGES/libgpg-error.mo
+  SetOutPath "$INSTDIR\share\locale\ro\LC_MESSAGES"
+  File ${prefix}/share/locale/ro/LC_MESSAGES/libgpg-error.mo
+  SetOutPath "$INSTDIR\share\locale\fr\LC_MESSAGES"
+  File ${prefix}/share/locale/fr/LC_MESSAGES/libgpg-error.mo
+
 !ifdef DEBUG
+  SetOutPath "$INSTDIR"
+
   # We install a couple of binaries that may be useful for testing.
   File ${prefix}/bin/gpg-error.exe
 !endif
diff --git a/src/libiconv.def b/src/libiconv.def
new file mode 100644 (file)
index 0000000..2a22318
--- /dev/null
@@ -0,0 +1,10 @@
+LIBRARY ICONV.DLL
+EXPORTS
+_libiconv_version
+libiconv
+libiconv_close
+libiconv_open
+libiconv_set_relocation_prefix
+libiconvctl
+libiconvlist
+locale_charset
diff --git a/src/libintl.def b/src/libintl.def
new file mode 100644 (file)
index 0000000..cb7f1fe
--- /dev/null
@@ -0,0 +1,29 @@
+LIBRARY INTL.DLL
+EXPORTS
+bind_textdomain_codeset
+bindtextdomain
+dcgettext
+dcngettext
+dgettext
+dngettext
+gettext
+libintl_bind_textdomain_codeset
+libintl_bindtextdomain
+libintl_dcgettext
+libintl_dcngettext
+libintl_dgettext
+libintl_dngettext
+libintl_fprintf
+libintl_gettext
+libintl_ngettext
+libintl_printf
+libintl_set_relocation_prefix
+libintl_sprintf
+libintl_textdomain
+libintl_vfprintf
+libintl_vprintf
+libintl_vsprintf
+ngettext
+textdomain
+_nl_msg_cat_cntr
+_nl_expand_alias
index 00afcc7..0d16092 100644 (file)
@@ -31,6 +31,21 @@ Section "-un.libgpg-error"
   Call un.SourceDelete
 !else
   Delete "$INSTDIR\libgpg-error-0.dll"
+
+  Delete "$INSTDIR\share\locale\de\LC_MESSAGES\libgpg-error.mo"
+  RMDir "$INSTDIR\share\locale\de\LC_MESSAGES"
+  RMDir "$INSTDIR\share\locale\de"
+  Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\libgpg-error.mo"
+  RMDir "$INSTDIR\share\locale\pl\LC_MESSAGES"
+  RMDir "$INSTDIR\share\locale\pl"
+  Delete "$INSTDIR\share\locale\ro\LC_MESSAGES\libgpg-error.mo"
+  RMDir "$INSTDIR\share\locale\ro\LC_MESSAGES"
+  RMDir "$INSTDIR\share\locale\ro"
+  Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\libgpg-error.mo"
+  RMDir "$INSTDIR\share\locale\fr\LC_MESSAGES"
+  RMDir "$INSTDIR\share\locale\fr"
+  RMDir "$INSTDIR\share\locale"
+  RMDir "$INSTDIR\share"
 !ifdef DEBUG
   Delete "$INSTDIR\gpg-error.exe"
 !endif