[package] allow mutexes in db47 to work with uClibc (#6148)
[openwrt/svn-archive/archive.git] / libs / db47 / Makefile
1 #
2 # Copyright (C) 2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=db47
11 PKG_VERSION:=4.7.25.NC
12 PKG_RELEASE:=3
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/db-$(PKG_VERSION)
15 PKG_SOURCE:=db-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://download.oracle.com/berkeley-db/
17 PKG_MD5SUM:=073ab7f20d24b3872a51ca762f5090e7
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libdb47
22 SECTION:=libs
23 CATEGORY:=Libraries
24 DEPENDS:=+libxml2
25 TITLE:=Berkeley DB library (4.7)
26 URL:=http://www.sleepycat.com/products/db.shtml
27 endef
28
29 define Package/libdb47/description
30 Berkeley DB library (4.7).
31 endef
32
33 define Build/Configure
34 (cd $(PKG_BUILD_DIR)/build_unix; rm -f config.cache; \
35 $(TARGET_CONFIGURE_OPTS) \
36 CFLAGS="$(TARGET_CFLAGS)" \
37 CPPFLAGS="$(TARGET_CPPFLAGS)" \
38 LDFLAGS="$(TARGET_LDFLAGS)" \
39 ../dist/configure \
40 --target=$(GNU_TARGET_NAME) \
41 --host=$(GNU_TARGET_NAME) \
42 --build=$(GNU_HOST_NAME) \
43 --program-prefix="" \
44 --program-suffix="" \
45 --prefix=/usr \
46 --exec-prefix=/usr \
47 --bindir=/usr/bin \
48 --datadir=/usr/share \
49 --includedir=/usr/include \
50 --infodir=/usr/share/info \
51 --libdir=/usr/lib \
52 --libexecdir=/usr/lib \
53 --localstatedir=/var \
54 --mandir=/usr/share/man \
55 --sbindir=/usr/sbin \
56 --sysconfdir=/etc \
57 $(DISABLE_NLS) \
58 $(DISABLE_LARGEFILE) \
59 --enable-shared \
60 --enable-static \
61 --disable-java \
62 --enable-cxx \
63 --with-mutex=UNIX/fcntl \
64 --disable-tcl \
65 --disable-rpc \
66 --enable-compat185 \
67 --enable-debug \
68 --enable-statistics \
69 --enable-replication \
70 --enable-cryptography \
71 );
72 endef
73
74 TARGET_CFLAGS += $(FPIC)
75
76 define Build/Compile
77 rm -rf $(PKG_INSTALL_DIR)
78 mkdir -p $(PKG_INSTALL_DIR)
79 $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
80 DESTDIR="$(PKG_INSTALL_DIR)" install
81 endef
82
83 define Package/libdb47/install
84 $(INSTALL_DIR) $(1)/usr/lib
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
86 endef
87
88 define Build/InstallDev
89 mkdir -p $(1)/usr/lib/db47/usr/include
90 $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/lib/db47/usr/include/
91 mkdir -p $(1)/usr/lib/db47/usr/lib
92 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib/db47/usr/lib
93 endef
94
95 $(eval $(call BuildPackage,libdb47))