OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 08-Jul-2008 19:02:32
Branch: HEAD Handle: 2008070818023200
Modified files:
openpkg-src/perl-db perl-db.spec
Log:
add optional BDB module
Summary:
Revision Changes Path
1.76 +29 -4 openpkg-src/perl-db/perl-db.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/perl-db/perl-db.spec
============================================================================
$ cvs diff -u -r1.75 -r1.76 perl-db.spec
--- openpkg-src/perl-db/perl-db.spec 31 Mar 2008 17:55:11 -0000 1.75
+++ openpkg-src/perl-db/perl-db.spec 8 Jul 2008 17:02:32 -0000 1.76
@@ -24,6 +24,7 @@
# versions of individual parts
%define V_perl 5.10.0
%define V_berkeleydb 0.34
+%define V_bdb 1.6
%define V_db_file 1.817
%define V_db_file_lock 0.05
@@ -38,12 +39,16 @@
Group: Perl
License: GPL/Artistic
Version: %{V_perl}
-Release: 20080331
+Release: 20080708
+
+# package options
+%option with_pthreads no
# list of sources
Source0:
http://www.cpan.org/modules/by-module/BerkeleyDB/BerkeleyDB-%{V_berkeleydb}.tar.gz
-Source1:
http://www.cpan.org/modules/by-module/DB_File/DB_File-%{V_db_file}.tar.gz
-Source2:
http://www.cpan.org/modules/by-module/DB_File/DB_File-Lock-%{V_db_file_lock}.tar.gz
+Source1:
http://www.cpan.org/authors/id/M/ML/MLEHMANN/BDB-%{V_bdb}.tar.gz
+Source2:
http://www.cpan.org/modules/by-module/DB_File/DB_File-%{V_db_file}.tar.gz
+Source3:
http://www.cpan.org/modules/by-module/DB_File/DB_File-Lock-%{V_db_file_lock}.tar.gz
Patch0: perl-db.patch
# build information
@@ -53,12 +58,17 @@
PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
BuildPreReq: db >= 4.1.24
PreReq: db >= 4.1.24
+%if "%{with_pthreads}" == "yes"
+BuildPreReq: db::with_pthreads = yes
+PreReq: db::with_pthreads = yes
+%endif
AutoReq: no
AutoReqProv: no
%description
Various modules for using the Berkeley-DB library from within Perl:
- BerkeleyDB (%{V_berkeleydb})
+ - BDB (%{V_bdb})
- DB_File (%{V_db_file})
- DB_File::Lock (%{V_db_file_lock})
@@ -68,6 +78,11 @@
url = http://www.cpan.org/modules/by-module/BerkeleyDB/
regex = BerkeleyDB-(__VER__)\.tar\.gz
}
+ prog perl-db:BDB = {
+ version = %{V_bdb}
+ url = http://www.cpan.org/authors/id/M/ML/MLEHMANN/
+ regex = BDB-(__VER__)\.tar\.gz
+ }
prog perl-db:DB_File = {
version = %{V_db_file}
url = http://www.cpan.org/modules/by-module/DB_File/
@@ -83,6 +98,7 @@
%setup -q -c
%setup -q -T -D -a 1
%setup -q -T -D -a 2
+ %setup -q -T -D -a 3
%patch -p0
%build
@@ -99,6 +115,15 @@
) || exit $?
%{l_prefix}/bin/perl-openpkg -d BerkeleyDB-%{V_berkeleydb} configure
build install
+ # build BDB
+%if "%{with_pthreads}" == "yes"
+ %{l_shtool} subst \
+ -e 's;$INC = "";$INC = "%{l_cppflags} -pthread";' \
+ -e 's;-lpthread -ldb;%{l_ldflags} -pthread -ldb;' \
+ BDB-%{V_bdb}/Makefile.PL
+ %{l_prefix}/bin/perl-openpkg -d BDB-%{V_bdb} configure build install
+%endif
+
# build DB_File
( cd DB_File-%{V_db_file}
( echo "PREFIX = size_t"
@@ -110,7 +135,7 @@
) || exit $?
%{l_prefix}/bin/perl-openpkg -d DB_File-%{V_db_file} configure build
install
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
+ %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
%{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat
perl-openpkg-files`
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]