Wed, 01 Apr 2009 16:24:45 +0200
Import package vendor original specs for necessary manipulations.
db/db.patch | file | annotate | diff | comparison | revisions | |
db/db.pc | file | annotate | diff | comparison | revisions | |
db/db.spec | file | annotate | diff | comparison | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/db/db.patch Wed Apr 01 16:24:45 2009 +0200 1.3 @@ -0,0 +1,33 @@ 1.4 +Index: mutex/mut_fcntl.c 1.5 +--- mutex/mut_fcntl.c.orig 2008-01-08 21:58:43 +0100 1.6 ++++ mutex/mut_fcntl.c 2008-05-26 22:36:45 +0200 1.7 +@@ -84,7 +84,7 @@ 1.8 + 1.9 + /* Acquire an exclusive kernel lock. */ 1.10 + k_lock.l_type = F_WRLCK; 1.11 +- if (fcntl(env->lockfhp->fd, F_SETLKW, &k_lock)) 1.12 ++ if (fcntl(env->lockfhp->fd, F_SETLKW, &k_lock) == -1) 1.13 + goto err; 1.14 + 1.15 + /* If the resource is still available, it's ours. */ 1.16 +@@ -97,7 +97,7 @@ 1.17 + 1.18 + /* Release the kernel lock. */ 1.19 + k_lock.l_type = F_UNLCK; 1.20 +- if (fcntl(env->lockfhp->fd, F_SETLK, &k_lock)) 1.21 ++ if (fcntl(env->lockfhp->fd, F_SETLK, &k_lock) == -1) 1.22 + goto err; 1.23 + 1.24 + /* 1.25 +Index: os/os_open.c 1.26 +--- os/os_open.c.orig 2008-03-26 05:11:35 +0100 1.27 ++++ os/os_open.c 2008-05-26 22:36:05 +0200 1.28 +@@ -67,7 +67,7 @@ 1.29 + if (LF_ISSET(DB_OSO_EXCL)) 1.30 + oflags |= O_EXCL; 1.31 + 1.32 +-#ifdef HAVE_O_DIRECT 1.33 ++#if defined(HAVE_O_DIRECT) && defined(__FreeBSD__) 1.34 + if (LF_ISSET(DB_OSO_DIRECT)) 1.35 + oflags |= O_DIRECT; 1.36 + #endif
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/db/db.pc Wed Apr 01 16:24:45 2009 +0200 2.3 @@ -0,0 +1,10 @@ 2.4 +prefix=@l_prefix@ 2.5 +exec_prefix=${prefix} 2.6 +libdir=${exec_prefix}/lib 2.7 +includedir=${prefix}/include 2.8 + 2.9 +Name: db 2.10 +Description: Berkeley-DB Library 2.11 +Version: @version@ 2.12 +Libs: -L${libdir} @libs@ 2.13 +Cflags: -I${includedir}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/db/db.spec Wed Apr 01 16:24:45 2009 +0200 3.3 @@ -0,0 +1,184 @@ 3.4 +## 3.5 +## db.spec -- OpenPKG RPM Package Specification 3.6 +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> 3.7 +## 3.8 +## Permission to use, copy, modify, and distribute this software for 3.9 +## any purpose with or without fee is hereby granted, provided that 3.10 +## the above copyright notice and this permission notice appear in all 3.11 +## copies. 3.12 +## 3.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 3.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 3.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 3.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 3.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 3.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 3.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 3.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 3.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3.24 +## SUCH DAMAGE. 3.25 +## 3.26 + 3.27 +# package version 3.28 +%define V_version 4.7.25 3.29 +%define V_revision 3 3.30 + 3.31 +# package information 3.32 +Name: db 3.33 +Summary: Berkeley-DB Library 3.34 +URL: http://www.oracle.com/database/berkeley-db.html 3.35 +Vendor: Keith Bostic 3.36 +Packager: OpenPKG Foundation e.V. 3.37 +Distribution: OpenPKG Community 3.38 +Class: BASE 3.39 +Group: Database 3.40 +License: BSD 3.41 +Version: %{V_version}.%{V_revision} 3.42 +Release: 20081221 3.43 + 3.44 +# package options 3.45 +%option with_pthreads no 3.46 +%option with_compat no 3.47 +%option with_cxx no 3.48 + 3.49 +# package options sanity check 3.50 +%if "%{with_pthreads}" == "yes" 3.51 + %{warn: WARNING: enabling Pthreads will potentially let other packages fail to build! } 3.52 +%endif 3.53 + 3.54 +# list of sources 3.55 +Source0: http://download-uk.oracle.com/berkeley-db/db-%{V_version}.tar.gz 3.56 +Source1: db.pc 3.57 +Patch0: db.patch 3.58 +Patch1: http://www.oracle.com/technology/products/berkeley-db/db/update/%{V_version}/patch.%{V_version}.1 3.59 +Patch2: http://www.oracle.com/technology/products/berkeley-db/db/update/%{V_version}/patch.%{V_version}.2 3.60 +Patch3: http://www.oracle.com/technology/products/berkeley-db/db/update/%{V_version}/patch.%{V_version}.3 3.61 + 3.62 +# build information 3.63 +Prefix: %{l_prefix} 3.64 +BuildRoot: %{l_buildroot} 3.65 +BuildPreReq: OpenPKG, openpkg >= 20040130, gcc 3.66 +PreReq: OpenPKG, openpkg >= 20040130 3.67 +%if "%{with_cxx}" == "yes" 3.68 +BuildPreReq: gcc::with_cxx = yes 3.69 +%endif 3.70 +AutoReq: no 3.71 +AutoReqProv: no 3.72 + 3.73 +%description 3.74 + Berkeley DB is a programmatic toolkit that provides high-performance 3.75 + built-in database support for desktop and server applications and 3.76 + for information appliances. The Berkeley DB access methods include 3.77 + B+tree, Extended Linear Hashing, Fixed and Variable-length records, 3.78 + and Queues. Berkeley DB provides full transactional support, 3.79 + database recovery, online backups, and separate access to locking, 3.80 + logging and shared memory caching subsystems. 3.81 + 3.82 +%track 3.83 + prog db = { 3.84 + version = %{V_version} 3.85 + url = http://www.oracle.com/technology/software/products/berkeley-db/index.html 3.86 + regex = Berkeley\s+DB\s+(__VER__)\s+\.tar\.gz 3.87 + } 3.88 + 3.89 +%prep 3.90 + %setup -q -n db-%{V_version} 3.91 + %patch -p0 -P 0 3.92 + %patch -p0 -P 1 3.93 + %patch -p0 -P 2 3.94 + %patch -p0 -P 3 3.95 + 3.96 + %{l_shtool} subst \ 3.97 + -e 's;\($(ar) cr .*\);\1 _udivdi3.o _muldi3.o _clz.o;' \ 3.98 + -e 's;install_utilities install_docs;install_utilities;' \ 3.99 + dist/Makefile.in 3.100 + 3.101 +%build 3.102 + # configure library 3.103 +%if "%{with_pthreads}" == "yes" 3.104 + mutex="POSIX/pthreads" 3.105 +%else 3.106 + mutex="no" 3.107 + case "%{l_platform -p}" in 3.108 + amd64-* ) mutex="x86_64/gcc-assembly";; 3.109 + ix86-* ) mutex="x86/gcc-assembly" ;; 3.110 + ia64-* ) mutex="ia64/gcc-assembly" ;; 3.111 + sparc*-* ) mutex="Sparc/gcc-assembly" ;; 3.112 + ppc*-* ) mutex="PPC/gcc-assembly" ;; 3.113 + alpha*-* ) mutex="ALPHA/gcc-assembly" ;; 3.114 + * ) mutex="UNIX/fcntl" ;; 3.115 + esac 3.116 +%endif 3.117 + cd build_unix 3.118 + CC="%{l_cc}" \ 3.119 + CFLAGS="%{l_cflags -O}" \ 3.120 +%if "%{with_cxx}" == "yes" 3.121 + CXX="%{l_cxx}" \ 3.122 + CXXFLAGS="%{l_cxxflags -O}" \ 3.123 +%endif 3.124 + GREP="grep" \ 3.125 + ../dist/configure \ 3.126 + --prefix=%{l_prefix} \ 3.127 +%if "%{with_compat}" == "yes" 3.128 + --enable-compat185 \ 3.129 +%else 3.130 + --disable-compat185 \ 3.131 +%endif 3.132 +%if "%{with_cxx}" == "yes" 3.133 + --enable-cxx \ 3.134 +%else 3.135 + --disable-cxx \ 3.136 +%endif 3.137 + --disable-java \ 3.138 + --with-mutex="$mutex" \ 3.139 +%if "%{with_pthreads}" == "yes" 3.140 + --enable-pthread_api \ 3.141 +%endif 3.142 + --disable-shared 3.143 + 3.144 + # build library 3.145 + ar -vx `%{l_cc} -print-libgcc-file-name` _udivdi3.o _muldi3.o _clz.o 3.146 + %{l_make} %{l_mflags -O} 3.147 + 3.148 +%install 3.149 + # install library 3.150 + rm -rf $RPM_BUILD_ROOT 3.151 + ( cd build_unix 3.152 + %{l_make} %{l_mflags} install \ 3.153 + prefix=$RPM_BUILD_ROOT%{l_prefix} 3.154 + ) || exit $? 3.155 + 3.156 + # strip down installation 3.157 + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libdb-[0-9]*.a 3.158 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true 3.159 +%if "%{with_compat}" == "no" 3.160 + rm -f $RPM_BUILD_ROOT%{l_prefix}/include/db_185.h 3.161 +%endif 3.162 +%if "%{with_cxx}" == "no" 3.163 + rm -f $RPM_BUILD_ROOT%{l_prefix}/include/db_cxx.h 3.164 + rm -f $RPM_BUILD_ROOT%{l_prefix}/include/cxx_*.h 3.165 +%endif 3.166 + 3.167 + # install pkg-config configuration 3.168 + libs="-ldb" 3.169 + case "%{l_platform -t}" in 3.170 + *-sunos* ) libs="$libs -lrt -lsocket -lnsl" ;; 3.171 + esac 3.172 + %{l_shtool} mkdir -f -p -m 755 \ 3.173 + $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig 3.174 + %{l_shtool} install -c -m 644 %{l_value -s -a} \ 3.175 + -e "s;@version@;%{version};" \ 3.176 + -e "s;@libs@;$libs;" \ 3.177 + %{SOURCE db.pc} \ 3.178 + $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/ 3.179 + 3.180 + # determine installation files 3.181 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} 3.182 + 3.183 +%files -f files 3.184 + 3.185 +%clean 3.186 + rm -rf $RPM_BUILD_ROOT 3.187 +