blob: a415ebc1e838d31a9383cfe4f80922206ef70d51 [file] [log] [blame]
Brad Bishop996bc452019-12-02 13:05:15 -05001SUMMARY = "The Mercurial distributed SCM"
2HOMEPAGE = "http://mercurial.selenic.com/"
3SECTION = "console/utils"
Andrew Geissler9aee5002022-03-30 16:27:02 +00004LICENSE = "GPL-2.0-only"
Brad Bishop996bc452019-12-02 13:05:15 -05005LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
6
7DEPENDS = "python3 python3-native"
Patrick Williams213cb262021-08-07 19:21:33 -05008RDEPENDS:${PN} = "python3 python3-modules"
Brad Bishop996bc452019-12-02 13:05:15 -05009
Patrick Williams864cc432023-02-09 14:54:44 -060010inherit python3native python3targetconfig
Brad Bishop996bc452019-12-02 13:05:15 -050011
12SRC_URI = "https://www.mercurial-scm.org/release/${BP}.tar.gz"
Patrick Williams03907ee2022-05-01 06:28:52 -050013SRC_URI[sha256sum] = "86f98645e4565a9256991dcde22b77b8e7d22ca6fbb60c1f4cdbd8469a38cc1f"
Brad Bishop996bc452019-12-02 13:05:15 -050014
15S = "${WORKDIR}/mercurial-${PV}"
16
17BBCLASSEXTEND = "native"
18
19export LDSHARED="${CCLD} -shared"
20
21EXTRA_OEMAKE = "STAGING_LIBDIR=${STAGING_LIBDIR} STAGING_INCDIR=${STAGING_INCDIR} \
22 PREFIX=${prefix}"
23
Patrick Williams213cb262021-08-07 19:21:33 -050024do_configure:append () {
Brad Bishop996bc452019-12-02 13:05:15 -050025 sed -i -e 's:PYTHON?=python:PYTHON=python3:g' ${S}/Makefile
26}
27
28do_install () {
29 oe_runmake -e install-bin DESTDIR=${D} PREFIX=${prefix}
30 sed -i -e 's:${STAGING_BINDIR_NATIVE}/python3-native/python3:${USRBINPATH}/env python3:g' ${D}${bindir}/hg
31}
Brad Bishope42b3e32020-01-15 22:08:42 -050032PACKAGES =+ "${PN}-python"
Brad Bishop996bc452019-12-02 13:05:15 -050033
Patrick Williams213cb262021-08-07 19:21:33 -050034FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}"
Brad Bishop996bc452019-12-02 13:05:15 -050035
Patrick Williams213cb262021-08-07 19:21:33 -050036FILES:${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}"
Brad Bishope42b3e32020-01-15 22:08:42 -050037