summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/sat-solver/sat-solver_git.bb
blob: a6937763cb12df2b1e8d40227317779178ad17ec (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
46
47
48
49
50
51
52
53
54
55
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 = "r8"

SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \
           file://sat-solver_rpm5.patch \
           file://sat-solver_obsolete.patch \
           file://cmake.patch \
           file://db5.patch \
           file://sat-solver_poky.patch \
          "

S = "${WORKDIR}/git"

EXTRA_OECMAKE += "-DLIB=lib -DRPM5=RPM5"

inherit cmake pkgconfig

PACKAGE_ARCH = "${MACHINE_ARCH}"

do_archgen () {
	# We need to dynamically generate our arch file based on the machine
	# configuration

	INSTALL_PLATFORM_ARCHS=""
	for each_arch in ${PACKAGE_ARCHS} ; do
		case "$each_arch" in
			all | any | noarch)
				continue;;
		esac
		INSTALL_PLATFORM_ARCHS="$each_arch $INSTALL_PLATFORM_ARCHS"
	done

	echo "/* Automatically generated by the sat-solver recipe */" > src/poky-arch.h
	echo "const char *archpolicies[] = {" >> src/poky-arch.h

        set -- $INSTALL_PLATFORM_ARCHS

        save_IFS=$IFS
        IFS=:
        while [ $# -gt 0 ]; do echo "  \"$1\",	"\""$*"\", >> src/poky-arch.h ; shift; done
        IFS=$save_IFS

	echo "  0" >> src/poky-arch.h
	echo "};" >> src/poky-arch.h
}

addtask archgen before do_configure after do_patch