[Dovecot] Patch: building dovecot-sieve against installed dovecot (Re: sieve discard)

Geert Hendrickx ghen at telenet.be
Thu Aug 2 11:11:38 EEST 2007


On Wed, Aug 01, 2007 at 10:17:32PM +0200, Geert Hendrickx wrote:
> On Wed, Aug 01, 2007 at 03:02:38PM +0300, Timo Sirainen wrote:
> > sievec and sieved binaries are built only if you use 2) method, because
> > they need to link with Dovecot's libraries. They can be used to compile and
> > decompile Sieve scripts. You probably don't need these.
> 
> According to the Makefile, they only need liblib.a to build.  Can't this
> file be installed as well with --enable-header-install (you may want to
> rename this flag then), so that dovecot-sieve can fully be built against
> an installed dovecot package?

If dovecot with --enable-header-install installs liblib.a in the same dir
as dovecot-config, the following patch for dovecot-sieve makes this work:

--- src/libsieve/Makefile.in.orig	2007-07-20 10:19:20.000000000 +0200
+++ src/libsieve/Makefile.in	2007-08-02 09:54:11.000000000 +0200
@@ -38,8 +38,8 @@
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
- at HAVE_DOVECOT_LIBS_TRUE@pkglibexec_PROGRAMS = sievec$(EXEEXT) \
- at HAVE_DOVECOT_LIBS_TRUE@	sieved$(EXEEXT)
+pkglibexec_PROGRAMS = sievec$(EXEEXT) \
+	sieved$(EXEEXT)
 subdir = src/libsieve
 DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in AUTHORS COPYING ChangeLog NEWS \
@@ -62,17 +62,21 @@
 pkglibexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(pkglibexec_PROGRAMS)
 am__sievec_SOURCES_DIST = sievec.c ../map.c ../imparse.c
- at HAVE_DOVECOT_LIBS_TRUE@am_sievec_OBJECTS = sievec.$(OBJEXT) \
- at HAVE_DOVECOT_LIBS_TRUE@	map.$(OBJEXT) imparse.$(OBJEXT)
+am_sievec_OBJECTS = sievec.$(OBJEXT) \
+	map.$(OBJEXT) imparse.$(OBJEXT)
 sievec_OBJECTS = $(am_sievec_OBJECTS)
 @HAVE_DOVECOT_LIBS_TRUE at sievec_DEPENDENCIES = libsieve.la \
 @HAVE_DOVECOT_LIBS_TRUE@	$(dovecotdir)/src/lib/liblib.a
+ at HAVE_DOVECOT_LIBS_FALSE@sievec_DEPENDENCIES = libsieve.la \
+ at HAVE_DOVECOT_LIBS_FALSE@	$(dovecotdir)/liblib.a
 am__sieved_SOURCES_DIST = sieved.c ../map.c
- at HAVE_DOVECOT_LIBS_TRUE@am_sieved_OBJECTS = sieved.$(OBJEXT) \
- at HAVE_DOVECOT_LIBS_TRUE@	map.$(OBJEXT)
+am_sieved_OBJECTS = sieved.$(OBJEXT) \
+	map.$(OBJEXT)
 sieved_OBJECTS = $(am_sieved_OBJECTS)
 @HAVE_DOVECOT_LIBS_TRUE at sieved_DEPENDENCIES = libsieve.la \
 @HAVE_DOVECOT_LIBS_TRUE@	$(dovecotdir)/src/lib/liblib.a
+ at HAVE_DOVECOT_LIBS_FALSE@sieved_DEPENDENCIES = libsieve.la \
+ at HAVE_DOVECOT_LIBS_FALSE@	$(dovecotdir)/liblib.a
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -266,10 +270,16 @@
 @HAVE_DOVECOT_LIBS_TRUE at sievec_LDADD = \
 @HAVE_DOVECOT_LIBS_TRUE@	libsieve.la \
 @HAVE_DOVECOT_LIBS_TRUE@	$(dovecotdir)/src/lib/liblib.a
+ at HAVE_DOVECOT_LIBS_FALSE@sievec_LDADD = \
+ at HAVE_DOVECOT_LIBS_FALSE@	libsieve.la \
+ at HAVE_DOVECOT_LIBS_FALSE@	$(dovecotdir)/liblib.a
 
 @HAVE_DOVECOT_LIBS_TRUE at sieved_LDADD = \
 @HAVE_DOVECOT_LIBS_TRUE@	libsieve.la \
 @HAVE_DOVECOT_LIBS_TRUE@	$(dovecotdir)/src/lib/liblib.a
+ at HAVE_DOVECOT_LIBS_FALSE@sieved_LDADD = \
+ at HAVE_DOVECOT_LIBS_FALSE@	libsieve.la \
+ at HAVE_DOVECOT_LIBS_FALSE@	$(dovecotdir)/liblib.a
 
 @HAVE_DOVECOT_LIBS_FALSE at notbuilt_sources = sievec.c sieved.c
 @HAVE_DOVECOT_LIBS_TRUE at notbuilt_sources = 

This means a complete dovecot-sieve package (including sievec and sieved)
can be compiled against either a built dovecot sourcetree or an installed
dovecot package with --enable-header-install.

I guess this will not be included in 1.0.x, but if it can be included in
1.1.x, I can add the patch to the pkgsrc package for now.

	Geert


More information about the dovecot mailing list