diff options
author | Qing He <qing.he@intel.com> | 2010-08-20 11:08:52 +0800 |
---|---|---|
committer | Saul Wold <Saul.Wold@intel.com> | 2010-09-03 18:30:16 -0700 |
commit | 1fb94b77f833e612cbd75e71ac21e434c8cd9c56 (patch) | |
tree | 1a7ef24e5c06095081cdeff99a641b4eff869ea9 /meta | |
parent | 079b70a76ccd8a031b669cd211b17155796740a1 (diff) | |
download | poky-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')
-rw-r--r-- | meta/recipes-extended/sat-solver/sat-solver/cmake.patch | 44 | ||||
-rw-r--r-- | meta/recipes-extended/sat-solver/sat-solver/rpm5.patch | 48 | ||||
-rw-r--r-- | meta/recipes-extended/sat-solver/sat-solver_git.bb | 20 |
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 @@ | |||
1 | check rpm | ||
2 | not building docs (need oxygen) | ||
3 | |||
4 | 8/19/2010 - created by Qing He <qing.he@intel.com> | ||
5 | |||
6 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
7 | index 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 @@ | |||
1 | fix rpm5 build | ||
2 | |||
3 | 8/19/2010 - created by Qing He <qing.he@intel.com> | ||
4 | |||
5 | diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c | ||
6 | index 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 @@ | |||
1 | DESCRIPTION = "Sat Solver" | ||
2 | HOMEPAGE = "http://en.opensue.org/Portal:Libzypp" | ||
3 | |||
4 | LICENSE = "BSD" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8" | ||
6 | |||
7 | DEPENDS = "libcheck rpm zlib expat" | ||
8 | |||
9 | PV = "0.0-git${SRCPV}" | ||
10 | PR = "r0" | ||
11 | |||
12 | SRCREV = "aa799f7bae0ec055e0e527203635001bb7346dbc" | ||
13 | |||
14 | SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \ | ||
15 | file://cmake.patch \ | ||
16 | file://rpm5.patch" | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | inherit cmake pkgconfig | ||