1SUMMARY = "gnu-configize"
2DESCRIPTION = "Tool that installs the GNU config.guess / config.sub into a directory tree"
3HOMEPAGE = "https://git.savannah.gnu.org/cgit/config.git"
4SECTION = "devel"
5LICENSE = "GPL-3.0-with-autoconf-exception"
6LIC_FILES_CHKSUM = "file://config.guess;beginline=9;endline=29;md5=10922f9231863a06f6efb67691fa46e0"
7
8DEPENDS:class-native = "hostperl-runtime-native"
9
10INHIBIT_DEFAULT_DEPS = "1"
11
12SRCREV = "63acb96f92473ceb5e21d873d7c0aee266b3d6d3"
13PV = "20230216+git${SRCPV}"
14
15SRC_URI = "git://git.savannah.gnu.org/git/config.git;protocol=https;branch=master \
16           file://gnu-configize.in"
17S = "${WORKDIR}/git"
18UPSTREAM_CHECK_COMMITS = "1"
19
20CLEANBROKEN = "1"
21
22do_compile[noexec] = "1"
23
24do_install () {
25	install -d ${D}${datadir}/gnu-config \
26		   ${D}${bindir}
27	cat ${WORKDIR}/gnu-configize.in | \
28		sed -e 's,@gnu-configdir@,${datadir}/gnu-config,g' \
29		    -e 's,@autom4te_perllibdir@,${datadir}/autoconf,g' > ${D}${bindir}/gnu-configize
30	# In the native case we want the system perl as perl-native can't have built yet
31	if [ "${PN}" != "gnu-config-native" -a "${PN}" != "nativesdk-gnu-config" ]; then
32		sed -i -e 's,/usr/bin/env,${bindir}/env,g' ${D}${bindir}/gnu-configize
33	fi
34	chmod 755 ${D}${bindir}/gnu-configize
35	install -m 0644 config.guess config.sub ${D}${datadir}/gnu-config/
36}
37
38PACKAGES = "${PN}"
39FILES:${PN} = "${bindir} ${datadir}/gnu-config"
40
41BBCLASSEXTEND = "native nativesdk"
42