blob: 443ca0b5e6616c3edd21bd197fe1dcb11ec20475 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "The shared library for the S-Lang extension language"
2
3DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \
4S-Lang language was designed so that it can be easily embedded into \
5a program to provide the program with a powerful extension language. \
6The S-Lang library, provided in this package, provides the S-Lang \
7extension language. S-Lang's syntax resembles C, which makes it easy \
8to recode S-Lang procedures in C if you need to."
9
10HOMEPAGE = "http://www.jedsoft.org/slang/"
11SECTION = "libs"
12DEPENDS = "ncurses virtual/libiconv"
13
14LICENSE = "GPLv2"
15LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
16
17SRC_URI = "http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \
18 file://no-x.patch \
19 file://dont-link-to-host.patch \
20 file://test-add-output-in-the-format-result-testname.patch \
21 file://terminfo_fixes.patch \
Brad Bishop15ae2502019-06-18 21:44:24 -040022 file://array_test.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040023 file://run-ptest \
24 "
25
26SRC_URI[md5sum] = "c2d5a7aa0246627da490be4e399c87cb"
27SRC_URI[sha256sum] = "fc9e3b0fc4f67c3c1f6d43c90c16a5c42d117b8e28457c5b46831b8b5d3ae31a"
28
29UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/"
Andrew Geissler595f6302022-01-24 19:11:47 +000030PREMIRRORS:append = " http://www.jedsoft.org/releases/slang/.* http://www.jedsoft.org/releases/slang/old/"
Brad Bishop316dfdd2018-06-25 12:45:53 -040031
32inherit autotools-brokensep ptest
33CLEANBROKEN = "1"
34
35EXTRA_OECONF = "--without-onig"
36# There's no way to turn off rpaths and slang will -rpath to the default search
37# path. Unset RPATH to stop this.
38EXTRA_OEMAKE = "RPATH=''"
39
40PACKAGECONFIG ??= "pcre"
41PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_DIR_HOST}${prefix},--without-pcre,pcre"
42PACKAGECONFIG[png] = "--with-png=${STAGING_DIR_HOST}${prefix},--without-png,libpng"
43PACKAGECONFIG[zlib] = "--with-z=${STAGING_DIR_HOST}${prefix},--without-z,zlib"
44
Patrick Williams213cb262021-08-07 19:21:33 -050045do_configure:prepend() {
Brad Bishop316dfdd2018-06-25 12:45:53 -040046 cd ${S}/autoconf
47 # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
48 # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
49 # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
50 gnu-configize --force && mv autoconf/config.* .
51 # For the same reason we also need to run autoconf manually.
52 autoconf && mv configure ..
53 cd ${B}
54}
55
56do_compile_ptest() {
57 oe_runmake -C src static
58 oe_runmake -C src/test sltest
59}
60
61do_install_ptest() {
62 mkdir ${D}${PTEST_PATH}/test
63 for f in Makefile sltest runtests.sh *.sl *.inc; do
64 cp ${S}/src/test/$f ${D}${PTEST_PATH}/test/
65 done
66 sed -e 's/\ \$(TEST_PGM)\.c\ assoc\.c\ list\.c\ \$(SLANGLIB)\/libslang\.a//' \
67 -e '/\$(CC).*(TEST_PGM)/d' \
68 -i ${D}${PTEST_PATH}/test/Makefile
69
70 cp ${S}/slsh/lib/require.sl ${D}${PTEST_PATH}/test/
71 sed -i 's/\.\.\/\.\.\/slsh\/lib\/require\.sl/require\.sl/' ${D}${PTEST_PATH}/test/req.sl
72
73 cp ${S}/doc/text/slangfun.txt ${D}${PTEST_PATH}/test/
74 sed -i 's/\.\.\/\.\.\/doc\/text\/slangfun\.txt/slangfun\.txt/' ${D}${PTEST_PATH}/test/docfun.sl
75}
76
Patrick Williams213cb262021-08-07 19:21:33 -050077FILES:${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
Brad Bishop316dfdd2018-06-25 12:45:53 -040078
Patrick Williams213cb262021-08-07 19:21:33 -050079RDEPENDS:${PN}-ptest += "make"
Brad Bishop393846f2019-05-20 12:24:11 -040080
Brad Bishop316dfdd2018-06-25 12:45:53 -040081PARALLEL_MAKE = ""
82PARALLEL_MAKEINST = ""
83
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080084BBCLASSEXTEND = "native nativesdk"