On Tue, Nov 06, 2007, Ralf S. Engelschall wrote:

> On Tue, Nov 06, 2007, Gunnar Wrobel wrote:
> 
> > Currently I fail to build the "imapd" package on rm0. It fails with
> >
> > checking for db.h... yes
> > configure: error: Berkeley DB 3.x or later was not found.  You may need to
> >     supply the --with-bdb-libdir or --with-bdb-incdir configure options.
> > error: Bad exit status from /ltmp/kk/openpkg/rpm-tmp.18065 (%build)
> >
> > I tried installing "db45" but that didn't seem to help. What could I
> > do to fix that?
> 
> The problem is that the installed "db" package was built by me with
> "with_pthreads=yes" a few days ago for testing purposes together with
> OpenLDAP. I just forgot to reinstall a "regular" "db" package. Now
> fixed.

Ah, nice hint. In the case we should add a conflict to the list of
dependencies. OTOH, if don't want to clutter all packages using db, why
not change the db package by building one version of db without thread
support and build a second version of db with thread support under a
different path. So we can handle it nicely in the db package itself.

Furhtermore I just had a look at the imapd configure script. From my
point of view we can clean up several things in the imapd.spec file. The
shtool subst operations are obsolete. The '-L' and '-I' lines are not
longer existent and the rest seems to be handled correctly when invoking
configure with the '--with-bdb' option. Furthermore, '--with-bdb-incdir=
und '--with-bdb-libdir' don't make any sense as long the '--with-bdb'
option is given.

diff -u -d -u -d -u -d -r1.182 imapd.spec
--- imapd.spec  27 Oct 2007 11:59:30 -0000      1.182
+++ imapd.spec  6 Nov 2007 18:47:53 -0000
@@ -162,14 +162,6 @@
     #   make sure config2header rebuilds imapopts based on imapoptions
     rm -f lib/imapopts.h lib/imapopts.c >/dev/null 2>&1 || true
 
-    #   fix Berkeley-DB detection
-    %{l_shtool} subst\
-        -e 's;-L/usr/local/lib;;g' \
-        -e 's;-I/usr/local/include;;g' \
-        -e 's;db-4\.[0-9];db;g' \
-        -e 's;-l\$dbname;%{l_prefix}/lib/lib$dbname.a;g' \
-        configure
-
     #   ensure correct linking of Berkeley-DB in perl bindings
     loclibs=""
     case "%{l_platform -t}" in
@@ -257,8 +249,6 @@
         --with-lib-subdir=%{l_prefix}/lib \
         --with-openssl=%{l_prefix} \
         --with-bdb=%{l_prefix} \
-        --with-bdb-incdir=%{l_prefix}/include \
-        --with-bdb-libdir=%{l_prefix}/lib \
         --with-sasl=%{l_prefix} \
         --with-staticsasl=%{l_prefix} \
         --with-com_err \

But maybe someone should test it under runtime before commiting it.

-cs
______________________________________________________________________
OpenPKG                                             http://openpkg.org
Developer Communication List                   openpkg-dev@openpkg.org

Reply via email to