New package: ccl-1.11

This commit is contained in:
Ankur Kothari 2016-12-18 11:12:31 +11:00 committed by Christian Neukirchen
parent 53b4cd39af
commit 3b30413e7b
2 changed files with 123 additions and 0 deletions

View file

@ -0,0 +1,60 @@
--- lisp-kernel/lisp-debug.c 2015-11-07 07:10:11.000000000 +1100
+++ lisp-kernel/lisp-debug.c 2016-12-18 10:35:29.070710875 +1100
@@ -36,6 +36,11 @@
#include <dlfcn.h>
#endif
+#ifndef __GLIBC__
+struct _libc_xmmreg {
+ unsigned int element[4];
+};
+#endif
FILE *dbgout = NULL, *dbgin=NULL;
--- lisp-kernel/pmcl-kernel.c 2015-11-07 07:10:11.000000000 +1100
+++ lisp-kernel/pmcl-kernel.c 2016-12-18 10:34:36.854708181 +1100
@@ -36,7 +36,7 @@
#endif
#ifdef LINUX
-#ifndef ANDROID
+#ifdef __GLIBC__
#include <mcheck.h>
#endif
#include <dirent.h>
@@ -1702,7 +1702,11 @@
ensure_gs_available(char *progname)
{
LispObj fs_addr = 0L, gs_addr = 0L, cur_thread = (LispObj)pthread_self();
+ #ifdef __GLIBC__
char *gnu_get_libc_version(void);
+ #else
+ #define gnu_get_libc_version() ""
+ #endif
arch_prctl(ARCH_GET_GS, &gs_addr);
arch_prctl(ARCH_GET_FS, &fs_addr);
--- lisp-kernel/thread_manager.c 2015-11-07 07:10:11.000000000 +1100
+++ lisp-kernel/thread_manager.c 2016-12-18 10:32:35.095701899 +1100
@@ -185,7 +185,7 @@
void
set_thread_affinity(TCR *target, unsigned cpuno)
{
-#ifdef LINUX
+#ifdef __GLIBC__
#ifndef ANDROID /* too useful to be in Android ... */
pthread_t thread = (pthread_t)(target->osid);
cpu_set_t mask;
--- lisp-kernel/x86-exceptions.c 2015-11-07 07:10:11.000000000 +1100
+++ lisp-kernel/x86-exceptions.c 2016-12-18 10:30:47.952696372 +1100
@@ -29,7 +29,9 @@
#ifdef LINUX
#include <strings.h>
#include <sys/mman.h>
+#ifdef __GLIBC__
#include <fpu_control.h>
+#endif
#include <linux/prctl.h>
#endif
#ifdef DARWIN

63
srcpkgs/ccl/template Normal file
View file

@ -0,0 +1,63 @@
pkgname=ccl
version=1.11
revision=1
wrksrc="ccl"
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
build_style=gnu-makefile
hostmakedepends="m4"
short_desc="Clozure Common Lisp interpreter and compiler"
maintainer="Ankur Kothari <ankz.kothari@gmail.com>"
license="Apache-2.0"
homepage="http://ccl.clozure.com/"
distfiles="ftp://ftp.clozure.com/pub/release/${version}/${pkgname}-${version}-linuxx86.tar.gz"
checksum="08e885e8c2bb6e4abd42b8e8e2b60f257c6929eb34b8ec87ca1ecf848fac6d70"
nopie=1
nostrip=1
disable_parallel_build=1
case $XBPS_MACHINE in
x86_64*) _arch=64 ;;
*) _arch='' ;;
esac
do_build() {
# recompile kernel, mandatory for musl
cd "lisp-kernel/linuxx86${_arch:-32}"
make
cd ../..
./lx86cl$_arch -n -Q -b -e '(ccl:rebuild-ccl :full t)' -e '(ccl:quit)'
}
do_install() {
find . -type d -name .svn -exec rm -rf '{}' +
find . -name '*.o' -delete
find . -name '*.*fsl' -delete
vmkdir usr/lib/$pkgname
vcopy lx86cl$_arch usr/lib/$pkgname
vcopy lx86cl$_arch.image usr/lib/$pkgname
cat > exe.sh <<EOF
#!/bin/sh
exec /usr/lib/$pkgname/"lx86cl$_arch" "\$@"
EOF
vbin exe.sh ccl
# vcopy compiler usr/lib/$pkgname
# vcopy level-0 usr/lib/$pkgname
# vcopy level-1 usr/lib/$pkgname
vcopy lib usr/lib/$pkgname
vcopy library usr/lib/$pkgname
vcopy scripts usr/lib/$pkgname
vcopy tools usr/lib/$pkgname
vcopy xdump usr/lib/$pkgname
vcopy contrib usr/lib/$pkgname
vmkdir usr/share/examples/$pkgname
vcopy "examples/*" usr/share/examples/$pkgname
}