summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/sat-solver
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/sat-solver')
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch (renamed from meta/recipes-extended/sat-solver/sat-solver/sat-solver_poky.patch)27
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver_git.bb16
2 files changed, 32 insertions, 11 deletions
diff --git a/meta/recipes-extended/sat-solver/sat-solver/sat-solver_poky.patch b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch
index b762bac854..11bf5b0182 100644
--- a/meta/recipes-extended/sat-solver/sat-solver/sat-solver_poky.patch
+++ b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch
@@ -1,3 +1,5 @@
1Upstream-Status: Inappropriate [distribution]
2
1Fix "arch" integration with Poky. 3Fix "arch" integration with Poky.
2 4
3Add a missing "any" architecture type and update the semantics to use it. 5Add a missing "any" architecture type and update the semantics to use it.
@@ -5,8 +7,27 @@ Add a missing "any" architecture type and update the semantics to use it.
5Disable the built-in archpolicies structure, and replace it with one 7Disable the built-in archpolicies structure, and replace it with one
6we generate in the recipe. 8we generate in the recipe.
7 9
10Also add poky semantics option in CMake.
11
8Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 12Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
13Signed-off-by: Qing He <qing.he@intel.com>
9 14
15diff --git a/CMakeLists.txt b/CMakeLists.txt
16index 443281e..4456a87 100644
17--- a/CMakeLists.txt
18+++ b/CMakeLists.txt
19@@ -45,6 +45,11 @@ MESSAGE(STATUS "Building for Debian")
20 ADD_DEFINITIONS( -DDEBIAN -DDEBIAN_SEMANTICS)
21 ENDIF ( DEBIAN )
22
23+IF ( OE_CORE )
24+MESSAGE(STATUS "Building for OE core")
25+ADD_DEFINITIONS( -DOE_CORE -DOE_CORE_SEMANTICS)
26+ENDIF ( OE_CORE )
27+
28 IF ( MULTI_SEMANTICS )
29 MESSAGE(STATUS "Enabling multi dist support")
30 ADD_DEFINITIONS( -DMULTI_SEMANTICS)
10diff --git a/src/knownid.h b/src/knownid.h 31diff --git a/src/knownid.h b/src/knownid.h
11index 7757ae0..4b8bee7 100644 32index 7757ae0..4b8bee7 100644
12--- a/src/knownid.h 33--- a/src/knownid.h
@@ -27,7 +48,7 @@ index 55c8677..3356ff8 100644
27 } 48 }
28 49
29 /* we allow changes to/from noarch */ 50 /* we allow changes to/from noarch */
30+#ifdef POKY_SEMANTICS 51+#ifdef OE_CORE_SEMANTICS
31+ if (a1 == a2 || 52+ if (a1 == a2 ||
32+ a1 == ARCH_NOARCH || a2 == ARCH_NOARCH || 53+ a1 == ARCH_NOARCH || a2 == ARCH_NOARCH ||
33+ a1 == ARCH_ANY || a2 == ARCH_ANY || 54+ a1 == ARCH_ANY || a2 == ARCH_ANY ||
@@ -86,7 +107,7 @@ index 34a14a3..2d7cd70 100644
86- 0 107- 0
87-}; 108-};
88+/* Provide the const char *archpolicies structure */ 109+/* Provide the const char *archpolicies structure */
89+#include "poky-arch.h" 110+#include "core-arch.h"
90 111
91 void 112 void
92 pool_setarch(Pool *pool, const char *arch) 113 pool_setarch(Pool *pool, const char *arch)
@@ -97,7 +118,7 @@ index 34a14a3..2d7cd70 100644
97-#ifndef DEBIAN_SEMANTICS 118-#ifndef DEBIAN_SEMANTICS
98- id = ARCH_NOARCH; 119- id = ARCH_NOARCH;
99-#else 120-#else
100+#if defined(DEBIAN_SEMANTICS) || defined(POKY_SEMANTICS) 121+#if defined(DEBIAN_SEMANTICS) || defined(OE_CORE_SEMANTICS)
101 id = ARCH_ALL; 122 id = ARCH_ALL;
102+#else 123+#else
103+ id = ARCH_NOARCH; 124+ id = ARCH_NOARCH;
diff --git a/meta/recipes-extended/sat-solver/sat-solver_git.bb b/meta/recipes-extended/sat-solver/sat-solver_git.bb
index a6937763cb..2d4d29932a 100644
--- a/meta/recipes-extended/sat-solver/sat-solver_git.bb
+++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb
@@ -7,19 +7,19 @@ LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
7DEPENDS = "libcheck rpm zlib expat db" 7DEPENDS = "libcheck rpm zlib expat db"
8 8
9PV = "0.0-git${SRCPV}" 9PV = "0.0-git${SRCPV}"
10PR = "r8" 10PR = "r9"
11 11
12SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \ 12SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \
13 file://sat-solver_rpm5.patch \ 13 file://sat-solver_rpm5.patch \
14 file://sat-solver_obsolete.patch \ 14 file://sat-solver_obsolete.patch \
15 file://cmake.patch \ 15 file://cmake.patch \
16 file://db5.patch \ 16 file://db5.patch \
17 file://sat-solver_poky.patch \ 17 file://sat-solver_core.patch \
18 " 18 "
19 19
20S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
21 21
22EXTRA_OECMAKE += "-DLIB=lib -DRPM5=RPM5" 22EXTRA_OECMAKE += "-DLIB=lib -DRPM5=RPM5 -DOE_CORE=OE_CORE"
23 23
24inherit cmake pkgconfig 24inherit cmake pkgconfig
25 25
@@ -38,18 +38,18 @@ do_archgen () {
38 INSTALL_PLATFORM_ARCHS="$each_arch $INSTALL_PLATFORM_ARCHS" 38 INSTALL_PLATFORM_ARCHS="$each_arch $INSTALL_PLATFORM_ARCHS"
39 done 39 done
40 40
41 echo "/* Automatically generated by the sat-solver recipe */" > src/poky-arch.h 41 echo "/* Automatically generated by the sat-solver recipe */" > src/core-arch.h
42 echo "const char *archpolicies[] = {" >> src/poky-arch.h 42 echo "const char *archpolicies[] = {" >> src/core-arch.h
43 43
44 set -- $INSTALL_PLATFORM_ARCHS 44 set -- $INSTALL_PLATFORM_ARCHS
45 45
46 save_IFS=$IFS 46 save_IFS=$IFS
47 IFS=: 47 IFS=:
48 while [ $# -gt 0 ]; do echo " \"$1\", "\""$*"\", >> src/poky-arch.h ; shift; done 48 while [ $# -gt 0 ]; do echo " \"$1\", "\""$*"\", >> src/core-arch.h ; shift; done
49 IFS=$save_IFS 49 IFS=$save_IFS
50 50
51 echo " 0" >> src/poky-arch.h 51 echo " 0" >> src/core-arch.h
52 echo "};" >> src/poky-arch.h 52 echo "};" >> src/core-arch.h
53} 53}
54 54
55addtask archgen before do_configure after do_patch 55addtask archgen before do_configure after do_patch