blob: 05b8aff0f2320422ee7cd18ff3b84cf9577862ef [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001SUMMARY = "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 = "GPL-2.0-only"
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 \
22 file://array_test.patch \
23 file://run-ptest \
24 "
25
26SRC_URI[sha256sum] = "f9145054ae131973c61208ea82486d5dd10e3c5cdad23b7c4a0617743c8f5a18"
27
28UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/"
29PREMIRRORS:append = " http://www.jedsoft.org/releases/slang/.* http://www.jedsoft.org/releases/slang/old/"
30
31inherit autotools-brokensep ptest
32CLEANBROKEN = "1"
33
34EXTRA_OECONF = "--without-onig"
35# There's no way to turn off rpaths and slang will -rpath to the default search
36# path. Unset RPATH to stop this.
37EXTRA_OEMAKE = "RPATH=''"
38
39PACKAGECONFIG ??= "pcre"
40PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_DIR_HOST}${prefix},--without-pcre,pcre"
41PACKAGECONFIG[png] = "--with-png=${STAGING_DIR_HOST}${prefix},--without-png,libpng"
42PACKAGECONFIG[zlib] = "--with-z=${STAGING_DIR_HOST}${prefix},--without-z,zlib"
43
44do_configure:prepend() {
45 cd ${S}/autoconf
46 # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
47 # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
48 # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
49 gnu-configize --force && mv autoconf/config.* .
50 # For the same reason we also need to run autoconf manually.
51 autoconf && mv configure ..
52 cd ${B}
53}
54
55do_compile_ptest() {
56 oe_runmake -C src static
57 oe_runmake -C src/test sltest
58}
59
60do_install_ptest() {
61 mkdir ${D}${PTEST_PATH}/test
62 for f in Makefile sltest runtests.sh *.sl *.inc; do
63 cp ${S}/src/test/$f ${D}${PTEST_PATH}/test/
64 done
65 sed -e 's/\ \$(TEST_PGM)\.c\ assoc\.c\ list\.c\ \$(SLANGLIB)\/libslang\.a//' \
66 -e '/\$(CC).*(TEST_PGM)/d' \
67 -i ${D}${PTEST_PATH}/test/Makefile
68
69 cp ${S}/slsh/lib/require.sl ${D}${PTEST_PATH}/test/
70 sed -i 's/\.\.\/\.\.\/slsh\/lib\/require\.sl/require\.sl/' ${D}${PTEST_PATH}/test/req.sl
71
72 cp ${S}/doc/text/slangfun.txt ${D}${PTEST_PATH}/test/
73 sed -i 's/\.\.\/\.\.\/doc\/text\/slangfun\.txt/slangfun\.txt/' ${D}${PTEST_PATH}/test/docfun.sl
74}
75
76FILES:${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
77
78RDEPENDS:${PN}-ptest += "make"
79
80PARALLEL_MAKE = ""
81PARALLEL_MAKEINST = ""
82
83BBCLASSEXTEND = "native nativesdk"