Browse Source

resolve file conflict by using external Expat; fix DB 4.1 building

master
parent
commit
3936a95d73
  1. 49
      apache2/apache2.patch
  2. 7
      apache2/apache2.spec

49
apache2/apache2.patch

@ -0,0 +1,49 @@
--- srclib/apr-util/dbm/apr_dbm_berkeleydb.c.orig Wed Mar 13 21:40:47 2002
+++ srclib/apr-util/dbm/apr_dbm_berkeleydb.c Sat Jan 11 09:42:45 2003
@@ -73,9 +73,14 @@
*/
#if defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 4)
-/* At this time, there are no differences from our perspective between
- * DB3 and DB4. */
+/* We will treat anything greater than 4.1 as DB4.
+ * We can treat 4.0 as DB3.
+ */
+#if defined(DB_VERSION_MINOR) && (DB_VERSION_MINOR >= 1)
+#define DB_VER 4
+#else
#define DB_VER 3
+#endif
#elif defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 3)
#define DB_VER 3
#elif defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 2)
@@ -193,9 +198,13 @@
{
int dberr;
-#if DB_VER == 3
+#if DB_VER >= 3
if ((dberr = db_create(&file.bdb, NULL, 0)) == 0) {
- if ((dberr = (*file.bdb->open)(file.bdb, pathname, NULL,
+ if ((dberr = (*file.bdb->open)(file.bdb,
+#if DB_VER == 4
+ NULL,
+#endif
+ pathname, NULL,
DB_HASH, dbmode,
apr_posix_perms2mode(perm))) != 0) {
/* close the DB handler */
@@ -339,11 +348,8 @@
dberr = (*f->bdb->seq)(f->bdb, &first, &data, R_FIRST);
#else
if ((dberr = (*f->bdb->cursor)(f->bdb, NULL, &f->curs
-#if DB_VER == 3
- , 0
-#elif (DB_VERSION_MAJOR == 2) && (DB_VERSION_MINOR > 5)
- , 0
-
+#if DB_VER >= 3 || ((DB_VERSION_MAJOR == 2) && (DB_VERSION_MINOR > 5))
+ , 0
#endif
)) == 0) {
dberr = (*f->curs->c_get)(f->curs, &first, &data, DB_FIRST);

7
apache2/apache2.spec

@ -33,15 +33,16 @@ Distribution: OpenPKG [EVAL]
Group: Web
License: ASF
Version: 2.0.43
Release: 20021004
Release: 20030111
# list of sources
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
Patch0: apache2.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20020206, perl, make
BuildPreReq: OpenPKG, openpkg >= 20020206, perl, make, expat
PreReq: OpenPKG, openpkg >= 20020206, perl
AutoReq: no
AutoReqProv: no
@ -64,6 +65,7 @@ AutoReqProv: no
%prep
%setup -q -n httpd-%{version}
%patch -p0
%build
CC="%{l_cc}" \
@ -72,6 +74,7 @@ AutoReqProv: no
--enable-layout=GNU \
--prefix=%{l_prefix} \
--sysconfdir=%{l_prefix}/etc/apache2 \
--with-expat=%{l_prefix} \
--with-mpm=prefork \
--disable-shared
%{l_make} %{l_mflags}

Loading…
Cancel
Save