Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Guile is the GNU Ubiquitous Intelligent Language for Extensions" |
| 2 | DESCRIPTION = "Guile is the GNU Ubiquitous Intelligent Language for Extensions,\ |
| 3 | the official extension language for the GNU operating system.\ |
| 4 | Guile is a library designed to help programmers create flexible applications.\ |
| 5 | Using Guile in an application allows the application's functionality to be\ |
| 6 | extended by users or other programmers with plug-ins, modules, or scripts.\ |
| 7 | Guile provides what might be described as 'practical software freedom,'\ |
| 8 | making it possible for users to customize an application to meet their\ |
| 9 | needs without digging into the application's internals." |
| 10 | |
| 11 | HOMEPAGE = "http://www.gnu.org/software/guile/" |
| 12 | SECTION = "devel" |
| 13 | LICENSE = "GPLv3" |
| 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 15 | |
| 16 | SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \ |
| 17 | file://debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch \ |
| 18 | file://debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch \ |
| 19 | file://opensuse/guile-64bit.patch \ |
| 20 | file://guile_2.0.6_fix_sed_error.patch \ |
| 21 | file://arm_endianness.patch \ |
| 22 | file://arm_aarch64.patch \ |
| 23 | file://workaround-ice-ssa-corruption.patch \ |
| 24 | file://libguile-Makefile.am-hook.patch \ |
| 25 | file://libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 26 | file://remove_strcase_l_funcs.patch \ |
| 27 | file://0001-libguile-Check-for-strtol_l-during-configure.patch \ |
| 28 | file://0002-Recognize-nios2-as-compilation-target.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | " |
| 30 | |
| 31 | # file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch |
| 32 | # file://opensuse/guile-turn-off-gc-test.patch |
| 33 | |
| 34 | SRC_URI[md5sum] = "03f1bce1a4983076d955003472306a13" |
| 35 | SRC_URI[sha256sum] = "aed0a4a6db4e310cbdfeb3613fa6f86fddc91ef624c1e3f8937a6304c69103e2" |
| 36 | |
| 37 | |
| 38 | inherit autotools gettext pkgconfig texinfo |
| 39 | BBCLASSEXTEND = "native" |
| 40 | |
| 41 | DEPENDS = "libunistring bdwgc gmp libtool libffi ncurses readline" |
| 42 | # add guile-native only to the target recipe's DEPENDS |
| 43 | DEPENDS_append_class-target = " guile-native libatomic-ops" |
| 44 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 45 | # The comment of the script guile-config said it has been deprecated but we should |
| 46 | # at least add the required dependency to make it work since we still provide the script. |
| 47 | RDEPENDS_${PN} = "pkgconfig" |
| 48 | |
| 49 | RDEPENDS_${PN}_append_libc-glibc_class-target = " glibc-gconv-iso8859-1" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | |
| 51 | EXTRA_OECONF += "${@['--without-libltdl-prefix --without-libgmp-prefix --without-libreadline-prefix', ''][bb.data.inherits_class('native',d)]}" |
| 52 | |
| 53 | EXTRA_OECONF_append_class-target = " --with-libunistring-prefix=${STAGING_LIBDIR} \ |
| 54 | --with-libgmp-prefix=${STAGING_LIBDIR} \ |
| 55 | --with-libltdl-prefix=${STAGING_LIBDIR}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 56 | EXTRA_OECONF_append_libc-uclibc = " guile_cv_use_csqrt=no " |
| 57 | |
| 58 | CFLAGS_append_libc-musl = " -DHAVE_GC_SET_FINALIZER_NOTIFIER \ |
| 59 | -DHAVE_GC_GET_HEAP_USAGE_SAFE \ |
| 60 | -DHAVE_GC_GET_FREE_SPACE_DIVISOR \ |
| 61 | -DHAVE_GC_SET_FINALIZE_ON_DEMAND \ |
| 62 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 63 | |
| 64 | do_configure_prepend() { |
| 65 | mkdir -p po |
| 66 | } |
| 67 | |
| 68 | export GUILE_FOR_BUILD="${BUILD_SYS}-guile" |
| 69 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 70 | do_install_append_class-native() { |
| 71 | install -m 0755 ${D}${bindir}/guile ${D}${bindir}/${HOST_SYS}-guile |
| 72 | |
| 73 | create_wrapper ${D}/${bindir}/guile \ |
| 74 | GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \ |
| 75 | GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache |
| 76 | create_wrapper ${D}${bindir}/${HOST_SYS}-guile \ |
| 77 | GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \ |
| 78 | GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache |
| 79 | } |
| 80 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 81 | do_install_append_class-target() { |
| 82 | # cleanup buildpaths in scripts |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 83 | sed -i -e 's:${STAGING_DIR_NATIVE}::' ${D}${bindir}/guile-config |
| 84 | sed -i -e 's:${STAGING_DIR_HOST}::' ${D}${bindir}/guile-snarf |
| 85 | |
| 86 | sed -i -e 's:${STAGING_DIR_TARGET}::g' ${D}${libdir}/pkgconfig/guile-2.0.pc |
| 87 | } |
| 88 | |
| 89 | do_install_append_libc-musl() { |
| 90 | rm -f ${D}${libdir}/charset.alias |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 91 | } |
| 92 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 93 | SYSROOT_PREPROCESS_FUNCS = "guile_cross_config" |
| 94 | |
| 95 | guile_cross_config() { |
| 96 | # this is only for target recipe |
| 97 | if [ "${PN}" = "guile" ] |
| 98 | then |
| 99 | # Create guile-config returning target values instead of native values |
| 100 | install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS} |
| 101 | echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \ |
| 102 | > ${B}/guile-config.cross |
| 103 | sed -n -e 's:^[ \t]*{[ \t]*": (:' \ |
| 104 | -e 's:",[ \t]*": . ":' \ |
| 105 | -e 's:" *}, *\\:"):' \ |
| 106 | -e 's:^.*cachedir.*$::' \ |
| 107 | -e '/^ (/p' \ |
| 108 | < ${B}/libguile/libpath.h >> ${B}/guile-config.cross |
| 109 | echo '))' >> ${B}/guile-config.cross |
| 110 | cat ${B}/meta/guile-config >> ${B}/guile-config.cross |
| 111 | install ${B}/guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config |
| 112 | fi |
| 113 | } |
| 114 | |
| 115 | # Guile needs the compiled files to be newer than the source, and it won't |
| 116 | # auto-compile into the prefix even if it can write there, so touch them here as |
| 117 | # sysroot is managed. |
| 118 | SSTATEPOSTINSTFUNCS += "guile_sstate_postinst" |
| 119 | guile_sstate_postinst() { |
| 120 | if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] |
| 121 | then |
| 122 | find ${STAGING_DIR_TARGET}/${libdir}/guile/2.0/ccache -type f | xargs touch |
| 123 | fi |
| 124 | } |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 125 | |
| 126 | # http://errors.yoctoproject.org/Errors/Details/20491/ |
| 127 | ARM_INSTRUCTION_SET_armv4 = "arm" |
| 128 | ARM_INSTRUCTION_SET_armv5 = "arm" |