mirror of
https://git.yoctoproject.org/poky
synced 2026-09-20 03:49:32 +02:00
sat-solver: added new package
Signed-off-by: Saul Wold <saul.wold@intel.com> Signed-off-by: Qing He <qing.he@intel.com>
This commit is contained in:
44
meta/recipes-extended/sat-solver/sat-solver/cmake.patch
Normal file
44
meta/recipes-extended/sat-solver/sat-solver/cmake.patch
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
check rpm
|
||||||
|
not building docs (need oxygen)
|
||||||
|
|
||||||
|
8/19/2010 - created by Qing He <qing.he@intel.com>
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 24234db..69413e4 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -50,6 +50,10 @@ MESSAGE(STATUS "Enabling multi dist support")
|
||||||
|
ADD_DEFINITIONS( -DMULTI_SEMANTICS)
|
||||||
|
ENDIF ( MULTI_SEMANTICS )
|
||||||
|
|
||||||
|
+FIND_PACKAGE(PkgConfig REQUIRED)
|
||||||
|
+PKG_CHECK_MODULES(RPM REQUIRED rpm)
|
||||||
|
+INCLUDE_DIRECTORIES( ${RPM_INCLUDE_DIRS} )
|
||||||
|
+
|
||||||
|
IF ( NOT DEBIAN )
|
||||||
|
FIND_LIBRARY(RPMDB_LIBRARY NAMES rpmdb)
|
||||||
|
IF ( NOT RPMDB_LIBRARY )
|
||||||
|
@@ -159,22 +163,7 @@ ADD_SUBDIRECTORY(tools)
|
||||||
|
ADD_SUBDIRECTORY(applayer)
|
||||||
|
ADD_SUBDIRECTORY(tests)
|
||||||
|
ADD_SUBDIRECTORY(examples)
|
||||||
|
-ADD_SUBDIRECTORY(doc)
|
||||||
|
-
|
||||||
|
-FIND_PACKAGE(SWIG)
|
||||||
|
-
|
||||||
|
-IF ( SWIG_FOUND )
|
||||||
|
- ADD_SUBDIRECTORY(bindings)
|
||||||
|
-ELSE ( SWIG_FOUND )
|
||||||
|
- # for older version of swig/cmake
|
||||||
|
- FIND_PROGRAM(SWIG_EXECUTABLE
|
||||||
|
- NAMES swig-1.3 swig
|
||||||
|
- PATHS ${SWIG_DIR} ${SWIG_DIR}/.. ${SWIG_DIR}/../../bin /usr/bin /usr/local/bin ${CMAKE_INSTALL_PREFIX}/bin
|
||||||
|
- )
|
||||||
|
- IF ( SWIG_EXECUTABLE )
|
||||||
|
- ADD_SUBDIRECTORY(bindings)
|
||||||
|
- ENDIF ( SWIG_EXECUTABLE )
|
||||||
|
-ENDIF ( SWIG_FOUND )
|
||||||
|
+#ADD_SUBDIRECTORY(doc)
|
||||||
|
|
||||||
|
MESSAGE(STATUS "version: ${VERSION}")
|
||||||
|
|
||||||
48
meta/recipes-extended/sat-solver/sat-solver/rpm5.patch
Normal file
48
meta/recipes-extended/sat-solver/sat-solver/rpm5.patch
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
fix rpm5 build
|
||||||
|
|
||||||
|
8/19/2010 - created by Qing He <qing.he@intel.com>
|
||||||
|
|
||||||
|
diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
|
||||||
|
index 34f2b65..3c6ab9a 100644
|
||||||
|
--- a/ext/repo_rpmdb.c
|
||||||
|
+++ b/ext/repo_rpmdb.c
|
||||||
|
@@ -21,10 +21,11 @@
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <assert.h>
|
||||||
|
+#include <stdint.h>
|
||||||
|
|
||||||
|
#include <rpm/rpmio.h>
|
||||||
|
#include <rpm/rpmpgp.h>
|
||||||
|
-#include <rpm/header.h>
|
||||||
|
+//#include <rpm/header.h>
|
||||||
|
#include <rpm/rpmdb.h>
|
||||||
|
|
||||||
|
#ifndef DB_CREATE
|
||||||
|
@@ -2466,7 +2467,7 @@ rpm_byrpmh(Header h, void **statep)
|
||||||
|
int sigdsize, sigcnt, l;
|
||||||
|
RpmHead *rpmhead;
|
||||||
|
|
||||||
|
- uh = headerUnload(h);
|
||||||
|
+ uh = headerUnload(h, NULL);
|
||||||
|
if (!uh)
|
||||||
|
return 0;
|
||||||
|
sigcnt = getu32(uh);
|
||||||
|
@@ -2982,7 +2983,7 @@ pubkey2solvable(Solvable *s, Repodata *data, char *pubkey)
|
||||||
|
parsekeydata(s, data, pkts, pktsl);
|
||||||
|
/* only rpm knows how to do the release calculation, we don't dare
|
||||||
|
* to recreate all the bugs */
|
||||||
|
- dig = pgpNewDig();
|
||||||
|
+ dig = pgpDigNew(0);
|
||||||
|
(void) pgpPrtPkts(pkts, pktsl, dig, 0);
|
||||||
|
btime = dig->pubkey.time[0] << 24 | dig->pubkey.time[1] << 16 | dig->pubkey.time[2] << 8 | dig->pubkey.signid[3];
|
||||||
|
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]);
|
||||||
|
@@ -2996,7 +2997,7 @@ pubkey2solvable(Solvable *s, Repodata *data, char *pubkey)
|
||||||
|
repodata_set_str(data, s - s->repo->pool->solvables, PUBKEY_KEYID, keyid);
|
||||||
|
if (dig->pubkey.userid)
|
||||||
|
setutf8string(data, s - s->repo->pool->solvables, SOLVABLE_SUMMARY, dig->pubkey.userid);
|
||||||
|
- pgpFreeDig(dig);
|
||||||
|
+ (void) pgpDigFree(dig, "");
|
||||||
|
sat_free((void *)pkts);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
20
meta/recipes-extended/sat-solver/sat-solver_git.bb
Normal file
20
meta/recipes-extended/sat-solver/sat-solver_git.bb
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
DESCRIPTION = "Sat Solver"
|
||||||
|
HOMEPAGE = "http://en.opensue.org/Portal:Libzypp"
|
||||||
|
|
||||||
|
LICENSE = "BSD"
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
|
||||||
|
|
||||||
|
DEPENDS = "libcheck rpm zlib expat"
|
||||||
|
|
||||||
|
PV = "0.0-git${SRCPV}"
|
||||||
|
PR = "r0"
|
||||||
|
|
||||||
|
SRCREV = "aa799f7bae0ec055e0e527203635001bb7346dbc"
|
||||||
|
|
||||||
|
SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \
|
||||||
|
file://cmake.patch \
|
||||||
|
file://rpm5.patch"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
inherit cmake pkgconfig
|
||||||
Reference in New Issue
Block a user