]> git.pld-linux.org Git - packages/db4.2.git/blobdiff - db4.2.spec
- posixmutexes handling fix (now only private cap depends on build env)
[packages/db4.2.git] / db4.2.spec
index 7d83a316b7fcd57d8514403767234bf60f39db1d..7e4435610709cfd75053618ee7d6337d7ca864c0 100644 (file)
@@ -2,8 +2,10 @@
 # Conditional build:
 %bcond_with    java    # build db-java (required for openoffice)
 %bcond_without tcl     # don't build tcl bindings
-%bcond_with    nptl    # enable posix mutexes
+%bcond_with    pmutex  # use POSIX mutexes (only process-private with linuxthreads)
+%bcond_with    nptl    # synonym for pmutex (NPTL provides full interface)
 #
+%{?with_nptl:%define   pmutex  1}
 Summary:       Berkeley DB database library for C
 Summary(pl):   Biblioteka C do obsĀ³ugi baz Berkeley DB
 Name:          db
@@ -145,6 +147,7 @@ Statyczna wersja biblioteki db-cxx.
 Summary:       Berkeley database library for Java
 Summary(pl):   Biblioteka baz danych Berkeley dla Javy
 Group:         Libraries
+Requires:      jre
 
 %description java
 Berkeley database library for Java.
@@ -243,7 +246,7 @@ CC="%{__cc}"
 CXX="%{__cxx}"
 CFLAGS="%{rpmcflags}"
 CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
-LDFLAGS="%{rpmldflags} %{?with_nptl:-lpthread}"
+LDFLAGS="%{rpmldflags}"
 export CC CXX CFLAGS CXXFLAGS LDFLAGS
 
 ../dist/%configure \
@@ -251,7 +254,7 @@ export CC CXX CFLAGS CXXFLAGS LDFLAGS
        --disable-shared \
        --enable-static \
        --enable-rpc \
-       %{?with_nptl:--enable-posixmutexes} \
+       --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
        --enable-cxx
 
 # (temporarily?) disabled because of compilation errors:
@@ -266,7 +269,7 @@ cd ../build_unix
        --libdir=%{_libdir} \
        --enable-compat185 \
        --enable-rpc \
-       %{?with_nptl:--enable-posixmutexes} \
+       --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
        --enable-cxx \
        %{?with_tcl:--enable-tcl} \
        %{?with_tcl:--with-tcl=/usr/lib} \
@@ -275,11 +278,13 @@ cd ../build_unix
        --enable-shared 
 
 %{__make} library_build \
-       TCFLAGS='-I$(builddir) -I%{_includedir}'
+       TCFLAGS='-I$(builddir) -I%{_includedir}' \
+       LIBSO_LIBS="\$(LIBS)" \
+       LIBTSO_LIBS="\$(LIBS) -ltcl"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir},/lib}
+install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}
 %if %{with java}
 install -d $RPM_BUILD_ROOT%{_javadir}
 %endif
This page took 0.153115 seconds and 4 git commands to generate.