1 | #!/bin/bash |
---|
2 | # |
---|
3 | # Berkeley DB |
---|
4 | # (script needs to be checked) |
---|
5 | # |
---|
6 | cd ${SRC} |
---|
7 | LOG=bdb-blfs.log |
---|
8 | |
---|
9 | # Test if the 64 script has been called. |
---|
10 | # This should only really get called during bi-arch builds |
---|
11 | SELF=`basename ${0}` |
---|
12 | set_buildenv |
---|
13 | set_libdirname |
---|
14 | setup_multiarch |
---|
15 | if [ ! "${libdirname}" = "lib" ]; then |
---|
16 | extra_conf="--libdir=/usr/${libdirname}" |
---|
17 | fi |
---|
18 | |
---|
19 | unpack_tarball db-${BDB_VER} && |
---|
20 | |
---|
21 | # Patching goes here |
---|
22 | cd ${PKGDIR} |
---|
23 | |
---|
24 | case ${BDB_VER} in |
---|
25 | 4.2.52 ) |
---|
26 | #apply_patch patch.4.2.52.1 -Np0 |
---|
27 | #apply_patch patch.4.2.52.2 -Np0 |
---|
28 | patch -Np0 -i ${PATCHES}/patch.4.2.52.1 |
---|
29 | patch -Np0 -i ${PATCHES}/patch.4.2.52.2 -Np0 |
---|
30 | |
---|
31 | # Issue with older libtool stuff determining if ld used is GNU ld |
---|
32 | # Breaks when linking with g++ as non-gnu ld case for linking does not |
---|
33 | # pass -nostdlib . |
---|
34 | # see 'Re: libtool update - the "duplicate _init and _fini" problem' |
---|
35 | # http://lists.gnu.org/archive/html/libtool-patches/2003-06/msg00056.html |
---|
36 | apply_patch db-4.2.52-libtool_fixes |
---|
37 | ;; |
---|
38 | 4.3.27 ) |
---|
39 | patch -Np0 -i ${PATCHES}/patch.4.3.27.1 |
---|
40 | patch -Np0 -i ${PATCHES}/patch.4.3.27.2 |
---|
41 | patch -Np0 -i ${PATCHES}/patch.4.3.27.3 |
---|
42 | ;; |
---|
43 | esac |
---|
44 | |
---|
45 | cd ${SRC}/${PKGDIR}/build_unix |
---|
46 | |
---|
47 | max_log_init BDB ${BDB_VER} "native (shared)" ${CONFLOGS} ${LOG} |
---|
48 | CC="${CC-gcc} ${ARCH_CFLAGS}" \ |
---|
49 | CXX="${CXX-g++} ${ARCH_CFLAGS}" \ |
---|
50 | CFLAGS="${TGT_CFLAGS}" \ |
---|
51 | ../dist/configure --prefix=/usr ${extra_conf} \ |
---|
52 | --enable-compat185 --enable-cxx \ |
---|
53 | --with-tcl=/usr/${libdirname} --enable-tcl \ |
---|
54 | >> ${LOGFILE} 2>&1 && |
---|
55 | echo " o Configure OK" && |
---|
56 | |
---|
57 | min_log_init ${BUILDLOGS} && |
---|
58 | make LIBSO_LIBS="-lpthread" LIBXSO_LIBS="-lpthread" \ |
---|
59 | >> ${LOGFILE} 2>&1 && |
---|
60 | echo " o Build OK" && |
---|
61 | |
---|
62 | min_log_init ${INSTLOGS} && |
---|
63 | make docdir=/usr/share/doc/${PKGDIR} install \ |
---|
64 | >> ${LOGFILE} 2>&1 && |
---|
65 | echo " o ALL OK" || barf |
---|
66 | |
---|