xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-devtools/openocd/openocd_git.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1SUMMARY = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing"
2LICENSE = "GPL-2.0-only"
3LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
4DEPENDS = "libusb-compat libftdi"
5RDEPENDS:${PN} = "libusb1"
6
7SRC_URI = " \
8    git://repo.or.cz/openocd.git;protocol=http;name=openocd;branch=master \
9    git://repo.or.cz/r/git2cl.git;protocol=http;destsuffix=tools/git2cl;name=git2cl;branch=master \
10    git://repo.or.cz/r/jimtcl.git;protocol=http;destsuffix=git/jimtcl;name=jimtcl;branch=master \
11    git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink;branch=master \
12"
13
14SRCREV_FORMAT = "openocd"
15SRCREV_openocd = "f342aac0845a69d591ad39a025d74e9c765f6420"
16SRCREV_git2cl = "8373c9f74993e218a08819cbcdbab3f3564bbeba"
17SRCREV_jimtcl = "0aa0fb4e3a38d38a49de9eb585d93d63a370dcf6"
18SRCREV_libjaylink = "9aa7a5957c07bb6e862fc1a6d3153d109c7407e4"
19
20PV = "0.11+gitr${SRCPV}"
21S = "${WORKDIR}/git"
22
23inherit pkgconfig autotools-brokensep gettext
24
25BBCLASSEXTEND += "native nativesdk"
26
27EXTRA_OECONF = "--enable-ftdi --disable-doxygen-html --disable-werror"
28
29do_configure() {
30    ./bootstrap nosubmodule
31    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/jimtcl/autosetup
32    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/jimtcl/autosetup
33    oe_runconf ${EXTRA_OECONF}
34}
35
36do_install() {
37    oe_runmake DESTDIR=${D} install
38    if [ -e "${D}${infodir}" ]; then
39      rm -Rf ${D}${infodir}
40    fi
41    if [ -e "${D}${mandir}" ]; then
42      rm -Rf ${D}${mandir}
43    fi
44    if [ -e "${D}${bindir}/.debug" ]; then
45      rm -Rf ${D}${bindir}/.debug
46    fi
47}
48
49FILES:${PN} = " \
50  ${datadir}/openocd/* \
51  ${bindir}/openocd \
52  "
53
54PACKAGECONFIG[sysfsgpio] = "--enable-sysfsgpio,--disable-sysfsgpio"
55PACKAGECONFIG[remote-bitbang] = "--enable-remote-bitbang,--disable-remote-bitbang"
56PACKAGECONFIG ??= "sysfsgpio remote-bitbang"
57
58# Can't be built with ccache
59CCACHE_DISABLE = "1"
60