1*4882a593SmuzhiyunSUMMARY = "Term::ReadKey - A perl module for simple terminal control."
2*4882a593SmuzhiyunDESCRIPTION = "Term::ReadKey is a compiled perl module dedicated to providing simple \
3*4882a593Smuzhiyuncontrol over terminal driver modes (cbreak, raw, cooked, etc.,) support \
4*4882a593Smuzhiyunfor non-blocking reads, if the architecture allows, and some generalized \
5*4882a593Smuzhiyunhandy functions for working with terminals. One of the main goals is to \
6*4882a593Smuzhiyunhave the functions as portable as possible, so you can just plug in 'use \
7*4882a593SmuzhiyunTerm::ReadKey' on any architecture and have a good likelihood of it \
8*4882a593Smuzhiyunworking."
9*4882a593SmuzhiyunHOMEPAGE = "http://search.cpan.org/~jstowe/TermReadKey-${PV}"
10*4882a593SmuzhiyunSECTION = "libraries"
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunLICENSE = "Artistic-1.0 | GPL-1.0-or-later"
13*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://README;md5=c275db663c8489a5709ebb22b185add5"
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunSRC_URI = "${CPAN_MIRROR}/authors/id/J/JS/JSTOWE/TermReadKey-${PV}.tar.gz"
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunSRC_URI[md5sum] = "b2b4aab7a0e6bddb7ac3b21ba637482c"
18*4882a593SmuzhiyunSRC_URI[sha256sum] = "5a645878dc570ac33661581fbb090ff24ebce17d43ea53fd22e105a856a47290"
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunS = "${WORKDIR}/TermReadKey-${PV}"
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunUPSTREAM_CHECK_URI = "https://metacpan.org/release/TermReadKey"
23*4882a593SmuzhiyunUPSTREAM_CHECK_REGEX = "TermReadKey\-(?P<pver>(\d+\.\d+))(?!_\d+)\.tar.gz"
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun# It needs depend on native to let dynamic loader use native modules
26*4882a593Smuzhiyun# rather than target ones.
27*4882a593SmuzhiyunDEPENDS = "libterm-readkey-perl-native"
28*4882a593Smuzhiyun
29*4882a593Smuzhiyuninherit cpan ptest-perl
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunRDEPENDS:${PN}-ptest += " \
32*4882a593Smuzhiyun    perl-module-test-more \
33*4882a593Smuzhiyun"
34*4882a593Smuzhiyun
35*4882a593Smuzhiyundo_configure:append () {
36*4882a593Smuzhiyun    # Hack the dynamic module loader so that it use native modules since it can't load
37*4882a593Smuzhiyun    # the target ones.
38*4882a593Smuzhiyun    if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
39*4882a593Smuzhiyun        sed -i -e "s#-I\$(INST_ARCHLIB)#-I${STAGING_BINDIR_NATIVE}/perl-native/perl/vendor_perl/${@get_perl_version(d)}#g" Makefile
40*4882a593Smuzhiyun    fi
41*4882a593Smuzhiyun}
42*4882a593Smuzhiyun
43*4882a593SmuzhiyunBBCLASSEXTEND = "native"
44