blob: a6519d592119809f3d3e07ebad528709057c0093 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
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 db"
PV = "0.0-git${SRCPV}"
PR = "r5"
SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \
file://cmake.patch \
file://rpm5.patch \
file://rpm5-solvdb.patch \
file://db5.patch \
file://builtin-arch.patch;apply=no \
file://no-builtin-arch.patch;apply=no \
"
S = "${WORKDIR}/git"
EXTRA_OECMAKE += "-DLIB=lib"
inherit cmake pkgconfig
PACKAGE_ARCH = "${MACHINE_ARCH}"
do_archpatch () {
PKG_ARCH_TAIL=`sed -n ${S}/src/poolarch.c -e "s|^ \"\(${BASE_PACKAGE_ARCH}\)\",.*\"\(.*\)\",.*$|\2|p"`
if [ "x${PKG_ARCH_TAIL}" == x ]; then
PATCHFILE=${WORKDIR}/no-builtin-arch.patch
else
PATCHFILE=${WORKDIR}/builtin-arch.patch
fi
sed -i "${PATCHFILE}" \
-e "s|@MACHINE_ARCH@|${MACHINE_ARCH}|g" \
-e "s|@PKG_ARCH@|${BASE_PACKAGE_ARCH}|g" \
-e "s|@PKG_ARCH_TAIL@|${PKG_ARCH_TAIL}|g"
patch -p1 -i "${PATCHFILE}"
}
addtask archpatch before do_patch after do_unpack
|