[Gpg4win-commits] r28 - in trunk: . include m4 src
marcus at wald.intevation.org
marcus at wald.intevation.org
Thu Oct 20 22:15:56 CEST 2005
Author: marcus
Date: 2005-10-20 22:15:56 +0200 (Thu, 20 Oct 2005)
New Revision: 28
Modified:
trunk/ChangeLog
trunk/TODO
trunk/include/config.nsi.in
trunk/m4/gpg4win.m4
trunk/src/gpg4win.mk.in
trunk/src/gpg4win.nsi
trunk/src/inst-sections.nsi
Log:
2005-10-20 Marcus Brinkmann <marcus at g10code.de>
* m4/gpg4win.m4 (GPG4WIN_DEFINE): New function. Use it to define
feature symbols for NSI. Use m4_translit instead of m4_bpatsubst.
New option --enable-debug.
* include/config.nsi.in: Catch all this new information.
* src/gpg4win.nsi (DEBUG): Define if [GPG4WIN_DEBUG].
(HAVE_PKG_GPA): Don't define here.
* src/inst-sections.nsi: Guard all package specific commands with
feature macro checks. Calculate dependencies on .onInit, too.
* src/gpg4win.mk.in (STRIP_macro): Quote $(DEBUG) strictly.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2005-10-20 19:05:37 UTC (rev 27)
+++ trunk/ChangeLog 2005-10-20 20:15:56 UTC (rev 28)
@@ -1,5 +1,15 @@
2005-10-20 Marcus Brinkmann <marcus at g10code.de>
+ * m4/gpg4win.m4 (GPG4WIN_DEFINE): New function. Use it to define
+ feature symbols for NSI. Use m4_translit instead of m4_bpatsubst.
+ New option --enable-debug.
+ * include/config.nsi.in: Catch all this new information.
+ * src/gpg4win.nsi (DEBUG): Define if [GPG4WIN_DEBUG].
+ (HAVE_PKG_GPA): Don't define here.
+ * src/inst-sections.nsi: Guard all package specific commands with
+ feature macro checks. Calculate dependencies on .onInit, too.
+ * src/gpg4win.mk.in (STRIP_macro): Quote $(DEBUG) strictly.
+
* src/installer-finish.nsi: Add support for Add/Remove Programs.
2005-10-20 Werner Koch <wk at g10code.com>
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2005-10-20 19:05:37 UTC (rev 27)
+++ trunk/TODO 2005-10-20 20:15:56 UTC (rev 28)
@@ -1,35 +1,31 @@
-* Record the dependencies in the build list in the gpg4win.mk.in
- Makefile using make dependencies between the stamp-final-$(1)
- targets. This would hopefully ensure that parallel makes work. !
+* Component related issues:
+** Check out which locale files to install and where. !!!
+** Check which iconv to use !!
+** Finish integration of GnuPG.
+** Add the missing packages: gpgee, Sylpheed, WinPT, Eudore extensions.
+** gpgol needs to be registered. !!!
-* Invent something clever to cope with new versions of packages, which
+* The following items are related to package auto-detection and
+ configuration. They are not critical.
+** Verify the digital signatures. Include them in the source
+ installer.
+** BUG: If there is more than one version of a package, the script
+ breaks. The GPG4WIN_FIND function must filter and pick one of the
+ matches.
+** GLITCH: If unnecessary dependency packages are enabled, they are
+ included in the installer, although they never will be (and can't
+ be) installed (they can't be installed because they can't be
+ selected). To fix this, configure would need to know which
+ packages can be selected and which can't.
+** Invent something clever to cope with new versions of packages, which
may have a different file list. We can't use globs because Delete
must still work. Either have inst-PACKAGE-VERSION.nsi files, or
have globs plus some scripting to generate the .nis files. !
+** Record the dependencies in the build list in the gpg4win.mk.in
+ Makefile using make dependencies between the stamp-final-$(1)
+ targets. This would hopefully ensure that parallel makes work. !
-* Check out which locale files to install and where. !!!
-* Check which iconv to use !!
-
-* Finish modularization of installer. NSIS' macro language is not up
- to the task, so we need a bit of configure/make magic as well (a la
- autoheader). !!!
-
-* Allow to enable debug mode from configure line. !
-
-* Finish integration of GnuPG.
-
-* Add the missing packages: gpgee, Sylpheed, WinPT, Eudore extensions.
-
-* gpgol needs to be registered. !!!
-
-* Verify the digital signatures. Include them in the source
- installer.
-
-* BUG: If there is more than one version of a package, the script
- breaks. The GPG4WIN_FIND function must filter and pick one of the
- matches.
-
Copyright 2005 g10 Code GmbH
This file is free software; as a special exception the author gives
Modified: trunk/include/config.nsi.in
===================================================================
--- trunk/include/config.nsi.in 2005-10-20 19:05:37 UTC (rev 27)
+++ trunk/include/config.nsi.in 2005-10-20 20:15:56 UTC (rev 28)
@@ -34,6 +34,8 @@
!define INSTALL "@INSTALL@"
!define WGET @WGET@
+# If debugging is desired.
+ at GPG4WIN_DEBUG@
# The package build list, in order.
!define gpg4win_build_list "@gpg4win_build_list@"
@@ -45,59 +47,73 @@
# The path of each package.
+ at HAVE_PKG_LIBGPG_ERROR@
!define gpg4win_pkg_libgpg_error @gpg4win_pkg_libgpg_error@
!define gpg4win_pkg_libgpg_error_version @gpg4win_pkg_libgpg_error_version@
+ at HAVE_PKG_GPGME@
!define gpg4win_pkg_gpgme @gpg4win_pkg_gpgme@
!define gpg4win_pkg_gpgme_version @gpg4win_pkg_gpgme_version@
+ at HAVE_PKG_GNUPG@
!define gpg4win_pkg_gnupg @gpg4win_pkg_gnupg@
!define gpg4win_pkg_gnupg_version @gpg4win_pkg_gnupg_version@
+ at HAVE_PKG_GPGOL@
!define gpg4win_pkg_gpgol @gpg4win_pkg_gpgol@
!define gpg4win_pkg_gpgol_version @gpg4win_pkg_gpgol_version@
+ at HAVE_PKG_GPA@
!define gpg4win_pkg_gpa @gpg4win_pkg_gpa@
!define gpg4win_pkg_gpa_version @gpg4win_pkg_gpa_version@
+ at HAVE_PKG_ZLIB@
!define gpg4win_pkg_zlib @gpg4win_pkg_zlib@
!define gpg4win_pkg_zlib_version @gpg4win_pkg_zlib_version@
!define gpg4win_pkg_zlib_dev @gpg4win_pkg_zlib_dev@
!define gpg4win_pkg_zlib_src @gpg4win_pkg_zlib_src@
+ at HAVE_PKG_LIBPNG@
!define gpg4win_pkg_libpng @gpg4win_pkg_libpng@
!define gpg4win_pkg_libpng_version @gpg4win_pkg_libpng_version@
!define gpg4win_pkg_libpng_dev @gpg4win_pkg_libpng_dev@
!define gpg4win_pkg_libpng_src @gpg4win_pkg_libpng_src@
+ at HAVE_PKG_PKGCONFIG@
!define gpg4win_pkg_pkgconfig @gpg4win_pkg_pkgconfig@
!define gpg4win_pkg_pkgconfig_version @gpg4win_pkg_pkgconfig_version@
!define gpg4win_pkg_pkgconfig_src @gpg4win_pkg_pkgconfig_src@
+ at HAVE_PKG_GLIB@
!define gpg4win_pkg_glib @gpg4win_pkg_glib@
!define gpg4win_pkg_glib_version @gpg4win_pkg_glib_version@
!define gpg4win_pkg_glib_dev @gpg4win_pkg_glib_dev@
!define gpg4win_pkg_glib_src @gpg4win_pkg_glib_src@
+ at HAVE_PKG_ATK@
!define gpg4win_pkg_atk @gpg4win_pkg_atk@
!define gpg4win_pkg_atk_version @gpg4win_pkg_atk_version@
!define gpg4win_pkg_atk_dev @gpg4win_pkg_atk_dev@
!define gpg4win_pkg_atk_src @gpg4win_pkg_atk_src@
+ at HAVE_PKG_PANGO@
!define gpg4win_pkg_pango @gpg4win_pkg_pango@
!define gpg4win_pkg_pango_version @gpg4win_pkg_pango_version@
!define gpg4win_pkg_pango_dev @gpg4win_pkg_pango_dev@
!define gpg4win_pkg_pango_src @gpg4win_pkg_pango_src@
+ at HAVE_PKG_GTK_@
!define gpg4win_pkg_gtk_ @gpg4win_pkg_gtk_@
!define gpg4win_pkg_gtk__version @gpg4win_pkg_gtk__version@
!define gpg4win_pkg_gtk__dev @gpg4win_pkg_gtk__dev@
!define gpg4win_pkg_gtk__src @gpg4win_pkg_gtk__src@
+ at HAVE_PKG_LIBICONV@
!define gpg4win_pkg_libiconv @gpg4win_pkg_libiconv@
!define gpg4win_pkg_libiconv_version @gpg4win_pkg_libiconv_version@
!define gpg4win_pkg_libiconv_src @gpg4win_pkg_libiconv_src@
+ at HAVE_PKG_GETTEXT@
!define gpg4win_pkg_gettext @gpg4win_pkg_gettext@
!define gpg4win_pkg_gettext_version @gpg4win_pkg_gettext_version@
!define gpg4win_pkg_gettext_src @gpg4win_pkg_gettext_src@
Modified: trunk/m4/gpg4win.m4
===================================================================
--- trunk/m4/gpg4win.m4 2005-10-20 19:05:37 UTC (rev 27)
+++ trunk/m4/gpg4win.m4 2005-10-20 20:15:56 UTC (rev 28)
@@ -19,6 +19,15 @@
dnl MA 02110-1301, USA
+# GPG4WIN_DEFINE SYMBOL
+# A poor man's version of AC_DEFINE_UNQUOTED for NSIS.
+AC_DEFUN([GPG4WIN_DEFINE],
+[
+ eval $1=\"\!define $1 1\"
+ AC_SUBST($1)
+])
+
+
# GPG4WIN_BASH
# Gpg4Win needs bash. This macro checks for it.
AC_DEFUN([GPG4WIN_BASH],
@@ -182,6 +191,14 @@
AC_DEFUN([GPG4WIN_FINALIZE],
[
AC_REQUIRE([GPG4WIN_CHECK_DEPS])
+
+ _gpg4win_debug=no
+ AC_ARG_ENABLE([debug],
+ AS_HELP_STRING([--enable-debug], [enable debugging [[no]]]),
+ _gpg4win_debug=$enableval)
+
+ AS_IF([test "x${_gpg4win_debug}" != "xno"],
+ GPG4WIN_DEFINE(GPG4WIN_DEBUG))
])
@@ -206,15 +223,16 @@
# At this point, _gpg4win_spkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_SOURCE
- gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]=$_gpg4win_spkg
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_))
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_spkg
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
- gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_version=$_gpg4win_version
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_version)
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
AS_IF([test "$_gpg4win_spkg" != no],
_gpg4win_pkgs="$_gpg4win_pkgs $1"
+ GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps $1 $1"
AS_IF([test ! -z "$2"],
@@ -248,31 +266,33 @@
# At this point, _gpg4win_bpkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_BINARY
- gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]]-,_)[]=$_gpg4win_bpkg
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_))
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_bpkg
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
- gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_version=$_gpg4win_version
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_version)
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
AS_IF([test $_gpg4win_bpkg != no],
GPG4WIN_FIND($1-lib, [$1-\(.*\)-lib],,
$_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find development package for package $1))
# gpg4win_pkg_PKGNAME_dev=FILENAME_OF_BINARY_DEVEL
- gpg4win_pkg_[]m4_bpatsubst([$1],-,_)[]_dev=$_gpg4win_bpkg
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],-,_)[]_dev)
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_dev=$_gpg4win_bpkg
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_dev)
GPG4WIN_FIND($1-src, [$1-\(.*\)-src],,
$_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find sources for package $1))
# gpg4win_pkg_PKGNAME_src=FILENAME_OF_SOURCE
- gpg4win_pkg_[]m4_bpatsubst([$1],-,_)[]_src=$_gpg4win_bpkg
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],-,_)[]_src)
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src=$_gpg4win_bpkg
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src)
# FIXME: Add a version consistency check here. All three packages
# must match!
+ GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
+
_gpg4win_pkgs="$_gpg4win_pkgs $1"
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps $1 $1"
@@ -306,23 +326,25 @@
# At this point, _gpg4win_bpkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_BINARY
- gpg4win_pkg_[]m4_bpatsubst([$1],-,_)[]=$_gpg4win_bpkg
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],-,_))
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_bpkg
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
- gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_version=$_gpg4win_version
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_version)
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
AS_IF([test $_gpg4win_bpkg != no],
[GPG4WIN_FIND($1,,tar, $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find sources for package $1))]
# gpg4win_pkg_PKGNAME_src=FILENAME_OF_SOURCE
- gpg4win_pkg_[]m4_bpatsubst([$1],-,_)[]_src=$_gpg4win_bpkg
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],-,_)[]_src)
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src=$_gpg4win_bpkg
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src)
# FIXME: Add a version consistency check here. All three packages
# must match!
+ GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
+
_gpg4win_pkgs="$_gpg4win_pkgs $1"
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps $1 $1"
@@ -356,29 +378,31 @@
# At this point, _gpg4win_bpkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_BINARY
- gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]=$_gpg4win_bpkg
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_))
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_bpkg
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
- gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_version=$_gpg4win_version
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_version)
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
AS_IF([test $_gpg4win_bpkg != no],
[GPG4WIN_FIND($1-dev,,, $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find development package for package $1))]
# gpg4win_pkg_PKGNAME_dev=FILENAME_OF_BINARY_DEVEL
- gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_dev=$_gpg4win_bpkg
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_dev)
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_dev=$_gpg4win_bpkg
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_dev)
[GPG4WIN_FIND($1,,tar, $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find sources for package $1))]
# gpg4win_pkg_PKGNAME_src=FILENAME_OF_SOURCE
- gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_src=$_gpg4win_bpkg
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_src)
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src=$_gpg4win_bpkg
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src)
# FIXME: Add a version consistency check here. All three packages
# must match!
+ GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
+
_gpg4win_pkgs="$_gpg4win_pkgs $1"
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps $1 $1"
@@ -421,23 +445,25 @@
# At this point, _gpg4win_bpkg is no, or the actual package source file.
# gpg4win_pkg_PKGNAME=FILENAME_OF_BINARY
- gpg4win_pkg_[]m4_bpatsubst([$1],-,_)[]=$_gpg4win_bpkg
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],-,_))
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]=$_gpg4win_bpkg
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__]))
# gpg4win_pkg_PKGNAME_version=VERSION
- gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_version=$_gpg4win_version
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],[[-+]],_)[]_version)
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_gpg4win_version
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_version)
AS_IF([test $_gpg4win_bpkg != no],
[GPG4WIN_FIND($1,,tar, $_gpg4win_pkg, _gpg4win_bpkg=$gpg4win_val,
AC_MSG_ERROR(can not find sources for package $1))]
# gpg4win_pkg_PKGNAME_src=FILENAME_OF_SOURCE
- gpg4win_pkg_[]m4_bpatsubst([$1],-,_)[]_src=$_gpg4win_bpkg
- AC_SUBST(gpg4win_pkg_[]m4_bpatsubst([$1],-,_)[]_src)
+ gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src=$_gpg4win_bpkg
+ AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[-+],[__])[]_src)
# FIXME: Add a version consistency check here. All two packages
# must match!
+ GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
+
_gpg4win_pkgs="$_gpg4win_pkgs $1"
# Record dependencies. Also enter every package as node.
_gpg4win_deps="$_gpg4win_deps $1 $1"
@@ -448,5 +474,3 @@
[$3],
[$4])
])
-
-
Modified: trunk/src/gpg4win.mk.in
===================================================================
--- trunk/src/gpg4win.mk.in 2005-10-20 19:05:37 UTC (rev 27)
+++ trunk/src/gpg4win.mk.in 2005-10-20 20:15:56 UTC (rev 28)
@@ -81,7 +81,7 @@
# Support macro. Strip all dll and exe files below $(1).
define STRIP_macro
- if test -z "$(DEBUG)"; then \
+ if test -z '$(DEBUG)'; then \
(cd $(1); \
for f in `find . -name \*.dll \
-o -name \*.exe`; do \
Modified: trunk/src/gpg4win.nsi
===================================================================
--- trunk/src/gpg4win.nsi 2005-10-20 19:05:37 UTC (rev 27)
+++ trunk/src/gpg4win.nsi 2005-10-20 20:15:56 UTC (rev 28)
@@ -18,7 +18,6 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
!include "../include/config.nsi"
-!define HAVE_PKG_GPA 1
# The package name and version. PRETTY_PACKAGE is a user visible name
# only while PACKAGE is useful for filenames etc. PROD_VERSION is the
@@ -62,7 +61,9 @@
# Define if in debug mode.
-#!define DEBUG
+!ifdef GPG4WIN_DEBUG
+!define DEBUG
+!endif
# The installation directory.
Modified: trunk/src/inst-sections.nsi
===================================================================
--- trunk/src/inst-sections.nsi 2005-10-20 19:05:37 UTC (rev 27)
+++ trunk/src/inst-sections.nsi 2005-10-20 20:15:56 UTC (rev 28)
@@ -19,45 +19,96 @@
# Sections
+!ifdef HAVE_PKG_GNUPG
!include "inst-gnupg.nsi"
+!endif
+!ifdef HAVE_PKG_LIBGPG_ERROR
!include "inst-libgpg-error.nsi"
+!endif
+!ifdef HAVE_PKG_LIBICONV
!include "inst-libiconv.nsi"
+!endif
+!ifdef HAVE_PKG_PKGCONFIG
!include "inst-pkgconfig.nsi"
+!endif
+!ifdef HAVE_PKG_ZLIB
!include "inst-zlib.nsi"
+!endif
+!ifdef HAVE_PKG_GPGME
!include "inst-gpgme.nsi"
+!endif
+!ifdef HAVE_PKG_GETTEXT
!include "inst-gettext.nsi"
+!endif
+!ifdef HAVE_PKG_GLIB
!include "inst-glib.nsi"
+!endif
+!ifdef HAVE_PKG_LIBPNG
!include "inst-libpng.nsi"
+!endif
+!ifdef HAVE_PKG_GPGOL
!include "inst-gpgol.nsi"
+!endif
+!ifdef HAVE_PKG_PANGO
!include "inst-pango.nsi"
+!endif
+!ifdef HAVE_PKG_ATK
!include "inst-atk.nsi"
+!endif
+!ifdef HAVE_PKG_GTK_
!include "inst-gtk+.nsi"
+!endif
+!ifdef HAVE_PKG_GPA
!include "inst-gpa.nsi"
+!endif
# Dependency Management
!include "Sections.nsh"
-Function .onSelChange
+Function CalcDepends
# This section could very well be autogenerated from the
# information in configure.ac. Note that it doesn't hurt to have
# stuff here for packages that we don't include.
# First clear all indirect dependencies.
+!ifdef HAVE_PKG_LIBICONV
!insertmacro UnselectSection ${SEC_libiconv}
+!endif
+!ifdef HAVE_PKG_GETTEXT
!insertmacro UnselectSection ${SEC_gettext}
+!endif
+!ifdef HAVE_PKG_ZLIB
!insertmacro UnselectSection ${SEC_zlib}
+!endif
+!ifdef HAVE_PKG_LIBPNG
!insertmacro UnselectSection ${SEC_libpng}
+!endif
+!ifdef HAVE_PKG_PKGCONFIG
!insertmacro UnselectSection ${SEC_pkgconfig}
+!endif
+!ifdef HAVE_PKG_GLIB
!insertmacro UnselectSection ${SEC_glib}
+!endif
+!ifdef HAVE_PKG_ATK
!insertmacro UnselectSection ${SEC_atk}
+!endif
+!ifdef HAVE_PKG_PANGO
!insertmacro UnselectSection ${SEC_pango}
+!endif
+!ifdef HAVE_PKG_GTK_
!insertmacro UnselectSection ${SEC_gtk_}
+!endif
+!ifdef HAVE_PKG_LIBGPG_ERROR
!insertmacro UnselectSection ${SEC_libgpg_error}
+!endif
+!ifdef HAVE_PKG_GPGME
!insertmacro UnselectSection ${SEC_gpgme}
+!endif
# Then enable all dependencies in reverse build list order!
+!ifdef HAVE_PKG_GPA
!insertmacro SectionFlagIsSet ${SEC_gpa} ${SF_SELECTED} have_gpa skip_gpa
have_gpa:
!insertmacro SelectSection ${SEC_zlib}
@@ -67,7 +118,9 @@
!insertmacro SelectSection ${SEC_gpgme}
!insertmacro SelectSection ${SEC_gnupg}
skip_gpa:
+!endif
+!ifdef HAVE_PKG_GTK_
!insertmacro SectionFlagIsSet ${SEC_gtk_} \
${SF_SELECTED} have_gtk_ skip_gtk_
have_gtk_:
@@ -78,51 +131,66 @@
!insertmacro SelectSection ${SEC_gettext}
!insertmacro SelectSection ${SEC_pkgconfig}
skip_gtk_:
+!endif
+!ifdef HAVE_PKG_ATK
!insertmacro SectionFlagIsSet ${SEC_atk} \
${SF_SELECTED} have_atk skip_atk
have_atk:
!insertmacro SelectSection ${SEC_glib}
!insertmacro SelectSection ${SEC_pkgconfig}
skip_atk:
+!endif
+!ifdef HAVE_PKG_PANGO
!insertmacro SectionFlagIsSet ${SEC_pango} \
${SF_SELECTED} have_pango skip_pango
have_pango:
!insertmacro SelectSection ${SEC_glib}
!insertmacro SelectSection ${SEC_pkgconfig}
skip_pango:
+!endif
+!ifdef HAVE_PKG_GPGOL
!insertmacro SectionFlagIsSet ${SEC_gpgol} \
${SF_SELECTED} have_gpgol skip_gpgol
have_gpgol:
!insertmacro SelectSection ${SEC_gpgme}
!insertmacro SelectSection ${SEC_gnupg}
skip_gpgol:
+!endif
+!ifdef HAVE_PKG_LIBPNG
!insertmacro SectionFlagIsSet ${SEC_libpng} \
${SF_SELECTED} have_libpng skip_libpng
have_libpng:
!insertmacro SelectSection ${SEC_pkgconfig}
skip_libpng:
+!endif
+!ifdef HAVE_PKG_GLIB
!insertmacro SectionFlagIsSet ${SEC_glib} \
${SF_SELECTED} have_glib skip_glib
have_glib:
!insertmacro SelectSection ${SEC_pkgconfig}
skip_glib:
+!endif
+!ifdef HAVE_PKG_GETTEXT
!insertmacro SectionFlagIsSet ${SEC_gettext} \
${SF_SELECTED} have_gettext skip_gettext
have_gettext:
!insertmacro SelectSection ${SEC_libiconv}
skip_gettext:
+!endif
+!ifdef HAVE_PKG_GPGME
!insertmacro SectionFlagIsSet ${SEC_gpgme} \
${SF_SELECTED} have_gpgme skip_gpgme
have_gpgme:
!insertmacro SelectSection ${SEC_libgpg_error}
skip_gpgme:
+!endif
# Package "zlib" has no dependencies.
# Package "pkgconfig" has no dependencies.
@@ -132,13 +200,27 @@
FunctionEnd
+Function .onInit
+ Call CalcDepends
+FunctionEnd
+Function .onSelChange
+ Call CalcDepends
+FunctionEnd
+
+
# This must be in a central place. Urgs.
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+!ifdef HAVE_PKG_GPGOL
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpgol} $(DESC_SEC_gpgol)
+!endif
+!ifdef HAVE_PKG_GPA
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpa} $(DESC_SEC_gpa)
+!endif
+!ifdef HAVE_PKG_GNUPG
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_gnupg} $(DESC_SEC_gnupg)
+!endif
!insertmacro MUI_FUNCTION_DESCRIPTION_END
More information about the Gpg4win-commits
mailing list