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 \ |
| 26 | " |
| 27 | |
| 28 | # file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch |
| 29 | # file://opensuse/guile-turn-off-gc-test.patch |
| 30 | |
| 31 | SRC_URI[md5sum] = "03f1bce1a4983076d955003472306a13" |
| 32 | SRC_URI[sha256sum] = "aed0a4a6db4e310cbdfeb3613fa6f86fddc91ef624c1e3f8937a6304c69103e2" |
| 33 | |
| 34 | |
| 35 | inherit autotools gettext pkgconfig texinfo |
| 36 | BBCLASSEXTEND = "native" |
| 37 | |
| 38 | DEPENDS = "libunistring bdwgc gmp libtool libffi ncurses readline" |
| 39 | # add guile-native only to the target recipe's DEPENDS |
| 40 | DEPENDS_append_class-target = " guile-native libatomic-ops" |
| 41 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame^] | 42 | # The comment of the script guile-config said it has been deprecated but we should |
| 43 | # at least add the required dependency to make it work since we still provide the script. |
| 44 | RDEPENDS_${PN} = "pkgconfig" |
| 45 | |
| 46 | RDEPENDS_${PN}_append_libc-glibc_class-target = " glibc-gconv-iso8859-1" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | |
| 48 | EXTRA_OECONF += "${@['--without-libltdl-prefix --without-libgmp-prefix --without-libreadline-prefix', ''][bb.data.inherits_class('native',d)]}" |
| 49 | |
| 50 | EXTRA_OECONF_append_class-target = " --with-libunistring-prefix=${STAGING_LIBDIR} \ |
| 51 | --with-libgmp-prefix=${STAGING_LIBDIR} \ |
| 52 | --with-libltdl-prefix=${STAGING_LIBDIR}" |
| 53 | |
| 54 | do_configure_prepend() { |
| 55 | mkdir -p po |
| 56 | } |
| 57 | |
| 58 | export GUILE_FOR_BUILD="${BUILD_SYS}-guile" |
| 59 | |
| 60 | do_compile_append() { |
| 61 | # just for target recipe |
| 62 | if [ "${PN}" = "guile" ] |
| 63 | then |
| 64 | sed -i -e s:${STAGING_DIR_TARGET}::g \ |
| 65 | -e s:/${TARGET_SYS}::g \ |
| 66 | -e s:-L/usr/lib::g \ |
| 67 | -e s:-isystem/usr/include::g \ |
| 68 | -e s:,/usr/lib:,\$\{libdir\}:g \ |
| 69 | meta/guile-2.0.pc |
| 70 | fi |
| 71 | } |
| 72 | |
| 73 | do_install_append_class-native() { |
| 74 | install -m 0755 ${D}${bindir}/guile ${D}${bindir}/${HOST_SYS}-guile |
| 75 | |
| 76 | create_wrapper ${D}/${bindir}/guile \ |
| 77 | GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \ |
| 78 | GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache |
| 79 | create_wrapper ${D}${bindir}/${HOST_SYS}-guile \ |
| 80 | GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \ |
| 81 | GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache |
| 82 | } |
| 83 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame^] | 84 | do_install_append_class-target() { |
| 85 | # cleanup buildpaths in scripts |
| 86 | sed -i -e 's:${STAGING_DIR_NATIVE}::' ${D}/usr/bin/guile-config |
| 87 | sed -i -e 's:${STAGING_DIR_HOST}::' ${D}/usr/bin/guile-snarf |
| 88 | } |
| 89 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 90 | SYSROOT_PREPROCESS_FUNCS = "guile_cross_config" |
| 91 | |
| 92 | guile_cross_config() { |
| 93 | # this is only for target recipe |
| 94 | if [ "${PN}" = "guile" ] |
| 95 | then |
| 96 | # Create guile-config returning target values instead of native values |
| 97 | install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS} |
| 98 | echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \ |
| 99 | > ${B}/guile-config.cross |
| 100 | sed -n -e 's:^[ \t]*{[ \t]*": (:' \ |
| 101 | -e 's:",[ \t]*": . ":' \ |
| 102 | -e 's:" *}, *\\:"):' \ |
| 103 | -e 's:^.*cachedir.*$::' \ |
| 104 | -e '/^ (/p' \ |
| 105 | < ${B}/libguile/libpath.h >> ${B}/guile-config.cross |
| 106 | echo '))' >> ${B}/guile-config.cross |
| 107 | cat ${B}/meta/guile-config >> ${B}/guile-config.cross |
| 108 | install ${B}/guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config |
| 109 | fi |
| 110 | } |
| 111 | |
| 112 | # Guile needs the compiled files to be newer than the source, and it won't |
| 113 | # auto-compile into the prefix even if it can write there, so touch them here as |
| 114 | # sysroot is managed. |
| 115 | SSTATEPOSTINSTFUNCS += "guile_sstate_postinst" |
| 116 | guile_sstate_postinst() { |
| 117 | if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] |
| 118 | then |
| 119 | find ${STAGING_DIR_TARGET}/${libdir}/guile/2.0/ccache -type f | xargs touch |
| 120 | fi |
| 121 | } |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame^] | 122 | |
| 123 | # http://errors.yoctoproject.org/Errors/Details/20491/ |
| 124 | ARM_INSTRUCTION_SET_armv4 = "arm" |
| 125 | ARM_INSTRUCTION_SET_armv5 = "arm" |