summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/sat-solver
diff options
context:
space:
mode:
authorQing He <qing.he@intel.com>2010-08-20 11:08:52 +0800
committerSaul Wold <Saul.Wold@intel.com>2010-09-03 18:30:16 -0700
commit1fb94b77f833e612cbd75e71ac21e434c8cd9c56 (patch)
tree1a7ef24e5c06095081cdeff99a641b4eff869ea9 /meta/recipes-extended/sat-solver
parent079b70a76ccd8a031b669cd211b17155796740a1 (diff)
downloadpoky-1fb94b77f833e612cbd75e71ac21e434c8cd9c56.tar.gz
sat-solver: added new package
Signed-off-by: Saul Wold <saul.wold@intel.com> Signed-off-by: Qing He <qing.he@intel.com>
Diffstat (limited to 'meta/recipes-extended/sat-solver')
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/cmake.patch44
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/rpm5.patch48
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver_git.bb20
3 files changed, 112 insertions, 0 deletions
diff --git a/meta/recipes-extended/sat-solver/sat-solver/cmake.patch b/meta/recipes-extended/sat-solver/sat-solver/cmake.patch
new file mode 100644
index 0000000000..a69d82590e
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/cmake.patch
@@ -0,0 +1,44 @@
1check rpm
2not building docs (need oxygen)
3
48/19/2010 - created by Qing He <qing.he@intel.com>
5
6diff --git a/CMakeLists.txt b/CMakeLists.txt
7index 24234db..69413e4 100644
8--- a/CMakeLists.txt
9+++ b/CMakeLists.txt
10@@ -50,6 +50,10 @@ MESSAGE(STATUS "Enabling multi dist support")
11 ADD_DEFINITIONS( -DMULTI_SEMANTICS)
12 ENDIF ( MULTI_SEMANTICS )
13
14+FIND_PACKAGE(PkgConfig REQUIRED)
15+PKG_CHECK_MODULES(RPM REQUIRED rpm)
16+INCLUDE_DIRECTORIES( ${RPM_INCLUDE_DIRS} )
17+
18 IF ( NOT DEBIAN )
19 FIND_LIBRARY(RPMDB_LIBRARY NAMES rpmdb)
20 IF ( NOT RPMDB_LIBRARY )
21@@ -159,22 +163,7 @@ ADD_SUBDIRECTORY(tools)
22 ADD_SUBDIRECTORY(applayer)
23 ADD_SUBDIRECTORY(tests)
24 ADD_SUBDIRECTORY(examples)
25-ADD_SUBDIRECTORY(doc)
26-
27-FIND_PACKAGE(SWIG)
28-
29-IF ( SWIG_FOUND )
30- ADD_SUBDIRECTORY(bindings)
31-ELSE ( SWIG_FOUND )
32- # for older version of swig/cmake
33- FIND_PROGRAM(SWIG_EXECUTABLE
34- NAMES swig-1.3 swig
35- PATHS ${SWIG_DIR} ${SWIG_DIR}/.. ${SWIG_DIR}/../../bin /usr/bin /usr/local/bin ${CMAKE_INSTALL_PREFIX}/bin
36- )
37- IF ( SWIG_EXECUTABLE )
38- ADD_SUBDIRECTORY(bindings)
39- ENDIF ( SWIG_EXECUTABLE )
40-ENDIF ( SWIG_FOUND )
41+#ADD_SUBDIRECTORY(doc)
42
43 MESSAGE(STATUS "version: ${VERSION}")
44
diff --git a/meta/recipes-extended/sat-solver/sat-solver/rpm5.patch b/meta/recipes-extended/sat-solver/sat-solver/rpm5.patch
new file mode 100644
index 0000000000..a44a07deef
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/rpm5.patch
@@ -0,0 +1,48 @@
1fix rpm5 build
2
38/19/2010 - created by Qing He <qing.he@intel.com>
4
5diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
6index 34f2b65..3c6ab9a 100644
7--- a/ext/repo_rpmdb.c
8+++ b/ext/repo_rpmdb.c
9@@ -21,10 +21,11 @@
10 #include <string.h>
11 #include <unistd.h>
12 #include <assert.h>
13+#include <stdint.h>
14
15 #include <rpm/rpmio.h>
16 #include <rpm/rpmpgp.h>
17-#include <rpm/header.h>
18+//#include <rpm/header.h>
19 #include <rpm/rpmdb.h>
20
21 #ifndef DB_CREATE
22@@ -2466,7 +2467,7 @@ rpm_byrpmh(Header h, void **statep)
23 int sigdsize, sigcnt, l;
24 RpmHead *rpmhead;
25
26- uh = headerUnload(h);
27+ uh = headerUnload(h, NULL);
28 if (!uh)
29 return 0;
30 sigcnt = getu32(uh);
31@@ -2982,7 +2983,7 @@ pubkey2solvable(Solvable *s, Repodata *data, char *pubkey)
32 parsekeydata(s, data, pkts, pktsl);
33 /* only rpm knows how to do the release calculation, we don't dare
34 * to recreate all the bugs */
35- dig = pgpNewDig();
36+ dig = pgpDigNew(0);
37 (void) pgpPrtPkts(pkts, pktsl, dig, 0);
38 btime = dig->pubkey.time[0] << 24 | dig->pubkey.time[1] << 16 | dig->pubkey.time[2] << 8 | dig->pubkey.signid[3];
39 sprintf(evrbuf, "%02x%02x%02x%02x-%02x%02x%02x%02x", dig->pubkey.signid[4], dig->pubkey.signid[5], dig->pubkey.signid[6], dig->pubkey.signid[7], dig->pubkey.time[0], dig->pubkey.time[1], dig->pubkey.time[2], dig->pubkey.time[3]);
40@@ -2996,7 +2997,7 @@ pubkey2solvable(Solvable *s, Repodata *data, char *pubkey)
41 repodata_set_str(data, s - s->repo->pool->solvables, PUBKEY_KEYID, keyid);
42 if (dig->pubkey.userid)
43 setutf8string(data, s - s->repo->pool->solvables, SOLVABLE_SUMMARY, dig->pubkey.userid);
44- pgpFreeDig(dig);
45+ (void) pgpDigFree(dig, "");
46 sat_free((void *)pkts);
47 return 1;
48 }
diff --git a/meta/recipes-extended/sat-solver/sat-solver_git.bb b/meta/recipes-extended/sat-solver/sat-solver_git.bb
new file mode 100644
index 0000000000..b14325ae44
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb
@@ -0,0 +1,20 @@
1DESCRIPTION = "Sat Solver"
2HOMEPAGE = "http://en.opensue.org/Portal:Libzypp"
3
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
6
7DEPENDS = "libcheck rpm zlib expat"
8
9PV = "0.0-git${SRCPV}"
10PR = "r0"
11
12SRCREV = "aa799f7bae0ec055e0e527203635001bb7346dbc"
13
14SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \
15 file://cmake.patch \
16 file://rpm5.patch"
17
18S = "${WORKDIR}/git"
19
20inherit cmake pkgconfig