]> git.pld-linux.org Git - packages/couchdb.git/commitdiff
- use pkg-config patch from fc master
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 26 Feb 2012 12:21:14 +0000 (12:21 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    couchdb.spec -> 1.12
    pkg-config.patch -> 1.1

couchdb.spec
pkg-config.patch [new file with mode: 0644]

index 6f05fb4bb57bd880dce97bb3035e41bc3a3f75a1..16656887d1b188e2eae007c91923530641494bf4 100644 (file)
@@ -23,6 +23,7 @@ Source0:      http://www.apache.org/dist/couchdb/%{version}/apache-%{name}-%{version}
 Source1:       %{name}.init
 Source2:       %{name}.tmpfiles
 Patch0:                js185.patch
+Patch1:                pkg-config.patch
 URL:           http://couchdb.apache.org/
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake >= 1.6.3
@@ -67,6 +68,7 @@ widoku.
 %prep
 %setup -q -n apache-%{name}-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
@@ -74,9 +76,7 @@ widoku.
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%configure \
-       --with-erlang=%{_libdir}/erlang%{_includedir} \
-
+%configure
 %{__make}
 
 %install
diff --git a/pkg-config.patch b/pkg-config.patch
new file mode 100644 (file)
index 0000000..03665c9
--- /dev/null
@@ -0,0 +1,107 @@
+From e93f577e0c33d6fa6c5464dfa423fb66746ad5e4 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Tue, 31 May 2011 18:08:15 +0400
+Subject: [PATCH 13/13] Use pkg-config
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+---
+ configure.ac                 |   32 ++++++++++++++------------------
+ src/couchdb/priv/Makefile.am |    4 ++--
+ 2 files changed, 16 insertions(+), 20 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 79fa8dd..0d81805 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,39 +51,36 @@ AC_ARG_WITH([erlang], [AC_HELP_STRING([--with-erlang=PATH],
+     ERLANG_FLAGS="-I$withval"
+ ], [
+     ERLANG_FLAGS="-I${libdir}/erlang/usr/include"
+-    ERLANG_FLAGS="$ERLANG_FLAGS -I/usr/lib/erlang/usr/include"
+-    ERLANG_FLAGS="$ERLANG_FLAGS -I/usr/local/lib/erlang/usr/include"
+-    ERLANG_FLAGS="$ERLANG_FLAGS -I/opt/local/lib/erlang/usr/include"
+ ])
++AC_PATH_PROG([PKG_CONFIG], [pkg-config])
++
++if test "x${PKG_CONFIG}" = "x"; then
++      AC_MSG_ERROR([You have to install pkg-config to compile CouchDB.])
++fi
++
+ AC_ARG_WITH([js-include], [AC_HELP_STRING([--with-js-include=PATH],
+     [set PATH to the SpiderMonkey include directory])], [
+     JS_INCLUDE="$withval"
+-    JS_FLAGS="-I$JS_INCLUDE"
++    JS_FLAGS="-I$JS_INCLUDE `pkg-config mozjs185 --cflags`"
+ ], [
+-    JS_FLAGS="-I/usr/include"
+-    JS_FLAGS="$JS_FLAGS -I/usr/include/js"
+-    JS_FLAGS="$JS_FLAGS -I/usr/include/mozjs"
+-    JS_FLAGS="$JS_FLAGS -I/usr/local/include"
+-    JS_FLAGS="$JS_FLAGS -I/opt/local/include"
+-    JS_FLAGS="$JS_FLAGS -I/usr/local/include/js"
+-    JS_FLAGS="$JS_FLAGS -I/opt/local/include/js"
++    JS_FLAGS=`pkg-config mozjs185 --cflags`
+ ])
+ AC_ARG_WITH([js-lib], [AC_HELP_STRING([--with-js-lib=PATH],
+     [set PATH to the SpiderMonkey library directory])],
+     [
+     JS_LIB_DIR=$withval
+-    JS_LIB_FLAGS="-L$withval"
++    JS_LIB_FLAGS="-L$withval `pkg-config mozjs185 --libs`"
+ ], [
+     JS_LIB_DIR=
++    JS_LIB_FLAGS=`pkg-config mozjs185 --libs`
+ ])
+ AC_SUBST(JS_LIB_DIR)
+ AC_ARG_VAR([ERLC_FLAGS], [general flags to prepend to ERLC_FLAGS])
+ AC_ARG_VAR([FLAGS], [general flags to prepend to LDFLAGS and CPPFLAGS])
+-LIB_FLAGS="$JS_LIB_FLAGS -L/usr/local/lib -L/opt/local/lib"
+ LIBS="$LIB_FLAGS $LIBS"
+ case "$(uname -s)" in
+@@ -98,11 +95,9 @@ case "$(uname -s)" in
+     LTCFLAGS="$CFLAGS"
+     ;;
+   *)
+-    # XP_UNIX required for jsapi.h and has been tested to work on Linux and Darwin.
+-    FLAGS="$LIB_FLAGS $ERLANG_FLAGS $JS_FLAGS -DXP_UNIX $FLAGS"
+-    CPPFLAGS="$FLAGS $CPPFLAGS"
++    CPPFLAGS="$FLAGS $ERLANG_FLAGS $JS_FLAGS $CPPFLAGS"
+     # manually linking libm is requred for FreeBSD 7.0
+-    LDFLAGS="$FLAGS -lm $LDFLAGS"
++    LDFLAGS="$FLAGS $JS_LIB_FLAGS -lm $LDFLAGS"
+     ;;
+ esac
+@@ -215,7 +210,8 @@ AC_ARG_WITH([win32-curl], [AC_HELP_STRING([--with-win32-curl=PATH],
+     CURL_LDFLAGS="-l$CURL_LIBS -lWs2_32 -lkernel32 -luser32 -ladvapi32 -lWldap32"
+ ], [
+     AC_CHECK_CURL([7.18.0])
+-    CURL_LDFLAGS=-lcurl
++    CURL_CFLAGS=`pkg-config libcurl --cflags`
++    CURL_LDFLAGS=`pkg-config libcurl --libs`
+ ])
+ AC_SUBST(CURL_CFLAGS)
+diff --git a/src/couchdb/priv/Makefile.am b/src/couchdb/priv/Makefile.am
+index 0a99cbf..5d0477e 100644
+--- a/src/couchdb/priv/Makefile.am
++++ b/src/couchdb/priv/Makefile.am
+@@ -46,8 +46,8 @@ COUCHJS_SRCS = \
+ locallibbin_PROGRAMS = couchjs
+ couchjs_SOURCES = $(COUCHJS_SRCS)
+-couchjs_LDFLAGS = $(CURL_LDFLAGS)
+-couchjs_CFLAGS = -D_BSD_SOURCE $(CURL_CFLAGS)
++couchjs_LDFLAGS = $(CURL_LDFLAGS) $(JS_LIB_FLAGS)
++couchjs_CFLAGS = -D_BSD_SOURCE $(CURL_CFLAGS) $(JS_FLAGS)
+ couchjs_LDADD = $(CURL_LDFLAGS) @JSLIB@
+ couchpriv_DATA = stat_descriptions.cfg
+-- 
+1.7.6
+
This page took 0.100713 seconds and 4 git commands to generate.