* Starting with SWI-Prolog 5.10.1 * SWI-Prolog is a fast and powerful ISO/Edinburgh-style Prolog compiler with a * rich set of built-in predicates. It offers a fast, robust and small * environment which enables substantial applications to be developed with it.
Signed-off-by: Jayen Ashar <[email protected]> --- recipes/swi-prolog/swi-prolog.inc | 76 +++++++++++++++++++++++++ recipes/swi-prolog/swi-prolog/configure.patch | 11 ++++ recipes/swi-prolog/swi-prolog_5.10.1.bb | 3 + 3 files changed, 90 insertions(+), 0 deletions(-) create mode 100644 recipes/swi-prolog/swi-prolog.inc create mode 100644 recipes/swi-prolog/swi-prolog/configure.patch create mode 100644 recipes/swi-prolog/swi-prolog_5.10.1.bb diff --git a/recipes/swi-prolog/swi-prolog.inc b/recipes/swi-prolog/swi-prolog.inc new file mode 100644 index 0000000..772873e --- /dev/null +++ b/recipes/swi-prolog/swi-prolog.inc @@ -0,0 +1,76 @@ +DESCRIPTION = "SWI-Prolog is a fast and powerful ISO/Edinburgh-style Prolog compiler with a rich set of built-in predicates. It offers a fast, robust and small environment which enables substantial applications to be developed with it." +HOMEPAGE = "http://www.swi-prolog.org/" +SECTION = "interpreters" +PRIORITY = "optional" +LICENSE = "LGPL" +DEPENDS = "ncurses readline gmp chrpath" + +INC_PR = "r1" + +SRC_URI = "http://mirror.cse.unsw.edu.au/pub/debian/pool/main/s/${PN}/${PN}_${PV}.orig.tar.gz \ + file://configure.patch;patch=1" + +S = "${WORKDIR}/pl-${PV}" + +inherit autotools + +#overriden because we don't want to run autoconf on releases +do_configure() { + if [ -e ${S}/configure ]; then + oe_runconf $@ + else + oenote "nothing to configure ${S}" + fi +} + +#appended so we can run configure and make on the packages directory after +#compiling the main enging +do_compile_append() { + if [ -e ${S}/packages/configure ]; then + if [ -x ${S}/packages/configure ] ; then + cd ${S}/packages + export DISABLE_PKGS="xpce http pldoc jpl" + cfgcmd="${S}/packages/configure \ + --build=${BUILD_SYS} \ + --host=${HOST_SYS} \ + --target=${TARGET_SYS} \ + --prefix=${prefix} \ + --exec_prefix=${exec_prefix} \ + --bindir=${bindir} \ + --sbindir=${sbindir} \ + --libexecdir=${libexecdir} \ + --datadir=${datadir} \ + --sysconfdir=${sysconfdir} \ + --sharedstatedir=${sharedstatedir} \ + --localstatedir=${localstatedir} \ + --libdir=${libdir} \ + --includedir=${includedir} \ + --oldincludedir=${oldincludedir} \ + --infodir=${infodir} \ + --mandir=${mandir} \ + ${EXTRA_OECONF} \ + $@" + oenote "Running $cfgcmd..." + $cfgcmd || oefatal "oe_runconf failed" + else + oefatal "no configure script found" + fi + else + oenote "nothing to configure ${S}/packages" + fi + if [ -e packages/Makefile -o -e packages/makefile ]; then + oe_runmake -C packages || die "make failed" + else + oenote "nothing to compile" + fi +} + +#to install the packages +do_install_append() { + oe_runmake -C packages 'DESTDIR=${D}' install +} + +#so debug files aren't included in the main package +FILES_${PN}-dbg += " ${libdir}/swipl-${PV}/bin/*/.debug ${libdir}/swipl-${PV}/lib/*/.debug" +#so the main package includes dependent libraries and packages +FILES_${PN} += " ${libdir}/swipl-${PV}" diff --git a/recipes/swi-prolog/swi-prolog/configure.patch b/recipes/swi-prolog/swi-prolog/configure.patch new file mode 100644 index 0000000..58ecd58 --- /dev/null +++ b/recipes/swi-prolog/swi-prolog/configure.patch @@ -0,0 +1,11 @@ +--- a/src/configure~ 2010-07-21 23:04:23.000000000 +1000 ++++ b/src/configure 2010-10-01 14:02:15.000000000 +1000 +@@ -7470,7 +7470,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread support for cpu clocks" >&5 + $as_echo_n "checking for pthread support for cpu clocks... " >&6; } +-if test "$cross_compiling" = yes; then : ++if test x"$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error "cannot run test program while cross compiling diff --git a/recipes/swi-prolog/swi-prolog_5.10.1.bb b/recipes/swi-prolog/swi-prolog_5.10.1.bb new file mode 100644 index 0000000..bb7e95b --- /dev/null +++ b/recipes/swi-prolog/swi-prolog_5.10.1.bb @@ -0,0 +1,3 @@ +require swi-prolog.inc + +PR = "${INC_PR}.1" -- 1.7.0.4 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
