diff mbox

[2/2] netatalk: Make BerkeleyDB optional for Netatalk

Message ID 1352410452-10680-1-git-send-email-maxime.hadjinlian@gmail.com
State Changes Requested
Headers show

Commit Message

Maxime Hadjinlian Nov. 8, 2012, 9:34 p.m. UTC
As the documentation of netatalk states :
"dbd is the default backend since version 2.1"
So cdb (which is the CNID provided by BerkeleyDB) should not be the default.

Also, this patches fixes a trouble when compiling with berkeleydb in 64bits
where netatalk would look the berkeleylib in [...]/lib64 instead of [...]/lib

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
 package/netatalk/Config.in   |    1 -
 package/netatalk/netatalk.mk |   16 ++++++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

--
1.7.10.4

Comments

Peter Korsgaard Dec. 5, 2012, 9:05 a.m. UTC | #1
>>>>> "Maxime" == Maxime Hadjinlian <maxime.hadjinlian@gmail.com> writes:

 Maxime> As the documentation of netatalk states :
 Maxime> "dbd is the default backend since version 2.1"
 Maxime> So cdb (which is the CNID provided by BerkeleyDB) should not be the default.

 Maxime> Also, this patches fixes a trouble when compiling with
 Maxime> berkeleydb in 64bits where netatalk would look the berkeleylib
 Maxime> in [...]/lib64 instead of [...]/lib

Thanks, but:

- It doesn't apply because of host-pkg-config -> host-pkgconf.
- It doesn't work:

checking for Berkeley DB headers in /usr/include/db48... no
checking for Berkeley DB headers in /usr/include/db4.7... no
checking for Berkeley DB headers in /usr/include/db47... no
checking for Berkeley DB headers in /usr/include/db4.6... no
checking for Berkeley DB headers in /usr/include/db46... no
checking for Berkeley DB headers in /usr/include/db4... no
configure: error: Berkeley DB library required but not found!
make[1]: *** [/home/peko/source/buildroot/testnetatalk/build/netatalk-3.0/.stamp_configured] Error 1

With an empty default BR config (only netatalk enabled).
Maxime Hadjinlian Dec. 5, 2012, 9:38 a.m. UTC | #2
On Wed, Dec 5, 2012 at 10:05 AM, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>> "Maxime" == Maxime Hadjinlian <maxime.hadjinlian@gmail.com> writes:
>
>  Maxime> As the documentation of netatalk states :
>  Maxime> "dbd is the default backend since version 2.1"
>  Maxime> So cdb (which is the CNID provided by BerkeleyDB) should not be the default.
>
>  Maxime> Also, this patches fixes a trouble when compiling with
>  Maxime> berkeleydb in 64bits where netatalk would look the berkeleylib
>  Maxime> in [...]/lib64 instead of [...]/lib
>
> Thanks, but:
>
> - It doesn't apply because of host-pkg-config -> host-pkgconf.
> - It doesn't work:
>
> checking for Berkeley DB headers in /usr/include/db48... no
> checking for Berkeley DB headers in /usr/include/db4.7... no
> checking for Berkeley DB headers in /usr/include/db47... no
> checking for Berkeley DB headers in /usr/include/db4.6... no
> checking for Berkeley DB headers in /usr/include/db46... no
> checking for Berkeley DB headers in /usr/include/db4... no
> configure: error: Berkeley DB library required but not found!
> make[1]: *** [/home/peko/source/buildroot/testnetatalk/build/netatalk-3.0/.stamp_configured] Error 1
>
> With an empty default BR config (only netatalk enabled).
I'll look into it, it should not error because of this since BerkeleDB
is not longer needed for building netatalk...
Thanks for your feedback.
>
> --
> Bye, Peter Korsgaard
diff mbox

Patch

diff --git a/package/netatalk/Config.in b/package/netatalk/Config.in
index 26f14c3..e602acd 100644
--- a/package/netatalk/Config.in
+++ b/package/netatalk/Config.in
@@ -1,6 +1,5 @@ 
 config BR2_PACKAGE_NETATALK
 	bool "netatalk"
-	select BR2_PACKAGE_BERKELEYDB
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_LIBGPG_ERROR
diff --git a/package/netatalk/netatalk.mk b/package/netatalk/netatalk.mk
index 4aa179e..70c8a13 100644
--- a/package/netatalk/netatalk.mk
+++ b/package/netatalk/netatalk.mk
@@ -7,11 +7,10 @@  NETATALK_VERSION = 3.0
 NETATALK_SITE = http://downloads.sourceforge.net/project/netatalk/netatalk/$(NETATALK_VERSION)
 NETATALK_SOURCE = netatalk-$(NETATALK_VERSION).tar.bz2

-NETATALK_DEPENDENCIES = host-pkg-config openssl berkeleydb libgcrypt libgpg-error
+NETATALK_DEPENDENCIES = host-pkg-config openssl libgcrypt libgpg-error
 NETATALK_CONF_ENV += CC="$(TARGET_CC) -std=gnu99"
-NETATALK_CONF_OPT += --with-cnid-cdb-backend \
-	--with-bdb=$(STAGING_DIR)/usr \
-	--disable-zeroconf \
+
+NETATALK_CONF_OPT += --disable-zeroconf \
 	--with-ssl-dir=$(STAGING_DIR)/usr \
 	--with-libgcrypt-dir=$(STAGING_DIR)/usr \
 	--with-shadow \
@@ -19,6 +18,15 @@  NETATALK_CONF_OPT += --with-cnid-cdb-backend \
 	--without-kerberos \
 	--without-pam

+ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
+	NETATALK_DEPENDENCIES += berkeleydb
+	NETATALK_CONF_ENV += BDB_LIB=$(STAGING_LIB)/usr/lib
+	NETATALK_CONF_OPT += --with-cnid-cdb-backend \
+		--with-bdb=$(STAGING_DIR)/usr
+else
+	NETATALK_CONF_OPT += --without-cnid-cdb-backend
+endif
+
 ifeq ($(BR2_PACKAGE_CUPS),y)
 	NETATALK_DEPENDENCIES += cups
 	NETATALK_CONF_ENV += ac_cv_path_CUPS_CONFIG=$(STAGING_DIR)/usr/bin/cups-config