swig.inc 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. SUMMARY = "SWIG - Simplified Wrapper and Interface Generator"
  2. DESCRIPTION = "SWIG is a compiler that makes it easy to integrate C and C++ \
  3. code with other languages including Perl, Tcl, Ruby, Python, Java, Guile, \
  4. Mzscheme, Chicken, OCaml, Pike, and C#."
  5. HOMEPAGE = "http://swig.sourceforge.net/"
  6. LICENSE = "BSD & GPLv3"
  7. LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \
  8. file://LICENSE-GPL;md5=d32239bcb673463ab874e80d47fae504 \
  9. file://LICENSE-UNIVERSITIES;md5=8ce9dcc8f7c994de4a408b205c72ba08"
  10. SECTION = "devel"
  11. DEPENDS = "libpcre bison-native"
  12. SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
  13. inherit autotools python3native pkgconfig
  14. EXTRA_OECONF = " \
  15. --with-python3=${PYTHON} \
  16. --without-allegrocl \
  17. --without-android \
  18. --without-boost \
  19. --without-chicken \
  20. --without-clisp \
  21. --without-csharp \
  22. --without-d \
  23. --without-gcj \
  24. --without-go \
  25. --without-guile \
  26. --without-java \
  27. --without-lua \
  28. --without-mzscheme \
  29. --without-ocaml \
  30. --without-octave \
  31. --without-perl5 \
  32. --without-pike \
  33. --without-php \
  34. --without-r \
  35. --without-ruby \
  36. --without-tcl \
  37. "
  38. EXTRA_AUTORECONF += "-I Tools/config"
  39. BBCLASSEXTEND = "native nativesdk"
  40. # necessary together with bison dependency until a new upstream version after
  41. # 3.0.12 includes 0001-Fix-generated-code-for-constant-expressions-containi.patch
  42. do_configure_append() {
  43. mkdir -p ${B}/Source/CParse
  44. }
  45. do_install_append_class-nativesdk() {
  46. cd ${D}${bindir}
  47. ln -s swig swig2.0
  48. }
  49. def swiglib_relpath(d):
  50. swiglib = d.getVar('datadir') + "/" + d.getVar('BPN') + "/" + d.getVar('PV')
  51. return os.path.relpath(swiglib, d.getVar('bindir'))
  52. do_install_append_class-native() {
  53. create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)}
  54. }