guile_2.0.3.bb 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. HOMEPAGE = "http://www.gnu.org/software/guile/"
  11. SECTION = "devel"
  12. LICENSE = "GPLv3"
  13. LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
  14. SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.gz \
  15. file://debian/0001-Fix-the-SRFI-60-copy-bit-documentation.patch \
  16. file://debian/0002-Define-_GNU_SOURCE-to-fix-the-GNU-kFreeBSD-build.patch \
  17. file://debian/0003-Include-gc.h-rather-than-gc-gc_version.h-in-pthread-.patch \
  18. file://opensuse/guile-64bit.patch \
  19. file://opensuse/guile-turn-off-gc-test.patch \
  20. file://remove-gets.patch \
  21. "
  22. SRC_URI[md5sum] = "3b8b4e1083037f29d2c4704a6d55f2a8"
  23. SRC_URI[sha256sum] = "a53b21159befe3e89bbaca71e9e62cf00af0f49fcca297c407944b988d59eb08"
  24. PR = "r6"
  25. inherit autotools gettext
  26. BBCLASSEXTEND = "native"
  27. DEPENDS = "libunistring bdwgc gmp libtool libffi"
  28. # add guile-native only to the target recipe's DEPENDS
  29. DEPENDS += "${@['guile-native', ''][d.getVar('PN', True) != 'guile']}"
  30. EXTRA_OECONF += "${@['--without-libltdl-prefix --without-libgmp-prefix', ''][bb.data.inherits_class('native',d)]}"
  31. do_configure_prepend() {
  32. mkdir -p po
  33. }
  34. export GUILE_FOR_BUILD="${BUILD_SYS}-guile"
  35. do_compile_append() {
  36. # just for target recipe
  37. if [ "${PN}" == "guile" ]
  38. then
  39. sed -i -e s:${STAGING_DIR_TARGET}::g \
  40. -e s:/${TARGET_SYS}::g \
  41. -e s:-L/usr/lib::g \
  42. -e s:-isystem/usr/include::g \
  43. -e s:,/usr/lib:,\$\{libdir\}:g \
  44. meta/guile-2.0.pc
  45. fi
  46. }
  47. do_install_append_virtclass-native() {
  48. install -m 0755 ${D}${bindir}/guile ${D}${bindir}/${HOST_SYS}-guile
  49. create_wrapper ${D}/${bindir}/guile \
  50. GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
  51. GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
  52. create_wrapper ${D}${bindir}/${HOST_SYS}-guile
  53. GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
  54. GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
  55. }
  56. SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
  57. guile_cross_config() {
  58. # this is only for target recipe
  59. if [ "${PN}" == "guile" ]
  60. then
  61. # Create guile-config returning target values instead of native values
  62. install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
  63. echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
  64. > guile-config.cross
  65. sed -n -e 's:^[ \t]*{[ \t]*": (:' \
  66. -e 's:",[ \t]*": . ":' \
  67. -e 's:" *}, *\\:"):' \
  68. -e 's:^.*cachedir.*$::' \
  69. -e '/^ (/p' \
  70. < libguile/libpath.h >> guile-config.cross
  71. echo '))' >> guile-config.cross
  72. cat meta/guile-config >> guile-config.cross
  73. install guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
  74. fi
  75. }