- link against rpmdb, not db43
authorMichael Schroeder <mls@suse.de>
Wed, 20 Feb 2008 10:50:43 +0000 (10:50 +0000)
committerMichael Schroeder <mls@suse.de>
Wed, 20 Feb 2008 10:50:43 +0000 (10:50 +0000)
CMakeLists.txt
cmake/modules/FindDb43.cmake [deleted file]
package/libsatsolver.spec.in
tools/CMakeLists.txt
tools/repo_rpmdb.c

index 60b8bd2..49914c9 100644 (file)
@@ -21,9 +21,9 @@ SET( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
 
 INCLUDE( ${CMAKE_SOURCE_DIR}/VERSION.cmake )
 
-FIND_PACKAGE(Db43 REQUIRED)
 FIND_PACKAGE(EXPAT REQUIRED)
 #FIND_PACKAGE(Ruby REQUIRED)
+FIND_LIBRARY(RPMDB_LIBRARY NAMES rpmdb)
 
 SET( PACKAGE "satsolver" )
 SET( VERSION "${LIBSATSOLVER_MAJOR}.${LIBSATSOLVER_MINOR}.${LIBSATSOLVER_PATCH}" )
diff --git a/cmake/modules/FindDb43.cmake b/cmake/modules/FindDb43.cmake
deleted file mode 100644 (file)
index cc8d613..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-
-if(DB43_INCLUDE_DIR AND DB43_LIBRARY)
-  # Already in cache, be silent
-  set(DB43_FIND_QUIETLY TRUE) 
-endif(DB43_INCLUDE_DIR AND DB43_LIBRARY)
-
-set(DB43_LIBRARY)
-set(DB43_INCLUDE_DIR)
-
-FIND_PATH(DB43_INCLUDE_DIR db43/db.h
-  /usr/include
-  /usr/local/include
-)
-
-FIND_LIBRARY(DB43_LIBRARY NAMES db-4.3
-  PATHS
-  /usr/lib
-  /usr/local/lib
-)
-
-if(DB43_INCLUDE_DIR AND DB43_LIBRARY)
-   MESSAGE( STATUS "db-4.3 found: includes in ${DB43_INCLUDE_DIR}, library in ${DB43_LIBRARY}")
-   set(DB43_FOUND TRUE)
-else(DB43_INCLUDE_DIR AND DB43_LIBRARY)
-   MESSAGE( STATUS "db-4.3 not found")
-endif(DB43_INCLUDE_DIR AND DB43_LIBRARY)
-
-MARK_AS_ADVANCED(DB43_INCLUDE_DIR DB43_LIBRARY)
\ No newline at end of file
index fa24abc..031ea25 100644 (file)
@@ -7,7 +7,7 @@ Url:            http://svn.opensuse.org/svn/zypp/trunk/sat-solver
 Source:         satsolver-%{version}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Group:          Development/Libraries/C and C++
-BuildRequires:  cmake db43-devel gcc-c++ libexpat-devel ruby-devel swig
+BuildRequires:  cmake rpm-devel gcc-c++ libexpat-devel ruby-devel swig
 Summary:        A new approach to package dependency solving
 
 %description
index fc048a4..5dfdb82 100644 (file)
@@ -8,7 +8,7 @@ SET(rpmdb2solv_REPOS
 )
 
 ADD_EXECUTABLE( rpmdb2solv ${rpmdb2solv_REPOS} )
-TARGET_LINK_LIBRARIES( rpmdb2solv satsolver ${DB43_LIBRARY})
+TARGET_LINK_LIBRARIES( rpmdb2solv satsolver ${RPMDB_LIBRARY})
 
 SET(rpmmd2solv_REPOS rpmmd2solv.c repo_rpmmd.h repo_rpmmd.c repo_write.c common_write.c )
 ADD_EXECUTABLE( rpmmd2solv ${rpmmd2solv_REPOS} )
index c4a9bd4..662fcc4 100644 (file)
@@ -20,7 +20,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <db43/db.h>
+#include <rpm/db.h>
 
 #include "pool.h"
 #include "repo.h"