Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | SUMMARY = "The shared library for the S-Lang extension language" |
| 2 | |
| 3 | DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \ |
| 4 | S-Lang language was designed so that it can be easily embedded into \ |
| 5 | a program to provide the program with a powerful extension language. \ |
| 6 | The S-Lang library, provided in this package, provides the S-Lang \ |
| 7 | extension language. S-Lang's syntax resembles C, which makes it easy \ |
| 8 | to recode S-Lang procedures in C if you need to." |
| 9 | |
| 10 | HOMEPAGE = "http://www.jedsoft.org/slang/" |
| 11 | SECTION = "libs" |
| 12 | DEPENDS = "ncurses virtual/libiconv" |
| 13 | |
| 14 | LICENSE = "GPLv2" |
| 15 | LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02" |
| 16 | |
| 17 | SRC_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 Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 22 | file://array_test.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 23 | file://run-ptest \ |
| 24 | " |
| 25 | |
| 26 | SRC_URI[md5sum] = "c2d5a7aa0246627da490be4e399c87cb" |
| 27 | SRC_URI[sha256sum] = "fc9e3b0fc4f67c3c1f6d43c90c16a5c42d117b8e28457c5b46831b8b5d3ae31a" |
| 28 | |
| 29 | UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 30 | PREMIRRORS:append = " http://www.jedsoft.org/releases/slang/.* http://www.jedsoft.org/releases/slang/old/" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 31 | |
| 32 | inherit autotools-brokensep ptest |
| 33 | CLEANBROKEN = "1" |
| 34 | |
| 35 | EXTRA_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. |
| 38 | EXTRA_OEMAKE = "RPATH=''" |
| 39 | |
| 40 | PACKAGECONFIG ??= "pcre" |
| 41 | PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_DIR_HOST}${prefix},--without-pcre,pcre" |
| 42 | PACKAGECONFIG[png] = "--with-png=${STAGING_DIR_HOST}${prefix},--without-png,libpng" |
| 43 | PACKAGECONFIG[zlib] = "--with-z=${STAGING_DIR_HOST}${prefix},--without-z,zlib" |
| 44 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 45 | do_configure:prepend() { |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 46 | 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 | |
| 56 | do_compile_ptest() { |
| 57 | oe_runmake -C src static |
| 58 | oe_runmake -C src/test sltest |
| 59 | } |
| 60 | |
| 61 | do_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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 77 | FILES:${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 78 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 79 | RDEPENDS:${PN}-ptest += "make" |
Brad Bishop | 393846f | 2019-05-20 12:24:11 -0400 | [diff] [blame] | 80 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 81 | PARALLEL_MAKE = "" |
| 82 | PARALLEL_MAKEINST = "" |
| 83 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 84 | BBCLASSEXTEND = "native nativesdk" |