public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-lisp/clozurecl/, dev-lisp/clozurecl/files/
@ 2015-11-21  5:00 Andrey Grozin
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Grozin @ 2015-11-21  5:00 UTC (permalink / raw
  To: gentoo-commits

commit:     80832b5eb0eb27505045760cff5e04230d4f08e2
Author:     Andrey Grozin <grozin <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 21 04:52:27 2015 +0000
Commit:     Andrey Grozin <grozin <AT> gentoo <DOT> org>
CommitDate: Sat Nov 21 04:53:49 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80832b5e

dev-lisp/clozurecl: fix bug with the ~e format

Upstream patch http://trac.clozure.com/ccl/changeset/16639
Bug: http://trac.clozure.com/ccl/ticket/563, http://trac.clozure.com/ccl/ticket/1186

Package-Manager: portage-2.2.25

 dev-lisp/clozurecl/clozurecl-1.11-r1.ebuild |  94 ++++++++++++++++++++
 dev-lisp/clozurecl/files/ccl-format.patch   | 128 ++++++++++++++++++++++++++++
 2 files changed, 222 insertions(+)

diff --git a/dev-lisp/clozurecl/clozurecl-1.11-r1.ebuild b/dev-lisp/clozurecl/clozurecl-1.11-r1.ebuild
new file mode 100644
index 0000000..5a39a3a
--- /dev/null
+++ b/dev-lisp/clozurecl/clozurecl-1.11-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils multilib toolchain-funcs
+
+MY_PN=ccl
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Common Lisp implementation, derived from Digitool's MCL product"
+HOMEPAGE="http://ccl.clozure.com/"
+SRC_URI="
+	x86?   ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxx86.tar.gz )
+	amd64? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxx86.tar.gz )
+	doc? ( http://ccl.clozure.com/docs/ccl.html )"
+	# ppc?   ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxppc.tar.gz )
+	# ppc64? ( ftp://ftp.clozure.com/pub/release/${PV}/${MY_P}-linuxppc.tar.gz )"
+
+LICENSE="LLGPL-2.1"
+SLOT="0"
+# KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND=">=dev-lisp/asdf-2.33-r3:="
+DEPEND="${RDEPEND}
+		!dev-lisp/openmcl"
+
+S="${WORKDIR}"/${MY_PN}
+PATCHES=( "${FILESDIR}"/ccl-format.patch )
+ENVD="${T}"/50ccl
+
+src_configure() {
+	if use x86; then
+		CCL_RUNTIME=lx86cl; CCL_HEADERS=x86-headers; CCL_KERNEL=linuxx8632
+	elif use amd64; then
+		CCL_RUNTIME=lx86cl64; CCL_HEADERS=x86-headers64; CCL_KERNEL=linuxx8664
+	elif use ppc; then
+		CCL_RUNTIME=ppccl; CCL_HEADERS=headers; CCL_KERNEL=linuxppc
+	elif use ppc64; then
+		CCL_RUNTIME=ppccl64; CCL_HEADERS=headers64; CCL_KERNEL=linuxppc64
+	fi
+}
+
+src_prepare() {
+	default
+	cp /usr/share/common-lisp/source/asdf/build/asdf.lisp tools/ || die
+}
+
+src_compile() {
+	emake -C lisp-kernel/${CCL_KERNEL} clean
+	emake -C lisp-kernel/${CCL_KERNEL} all CC="$(tc-getCC)"
+
+	unset CCL_DEFAULT_DIRECTORY
+	./${CCL_RUNTIME} -n -b -Q -e '(ccl:rebuild-ccl :full t)' -e '(ccl:quit)' || die "Compilation failed"
+
+	# remove non-owner write permissions on the full-image
+	chmod go-w ${CCL_RUNTIME}{,.image} || die
+
+	esvn_clean
+}
+
+src_install() {
+	local install_dir=/usr/$(get_libdir)/${PN}
+
+	exeinto ${install_dir}
+	# install executable
+	doexe ${CCL_RUNTIME}
+	# install core image
+	cp ${CCL_RUNTIME}.image "${D}"/${install_dir} || die
+	# install optional libraries
+	dodir ${install_dir}/tools
+	cp tools/*fsl "${D}"/${install_dir}/tools || die
+
+	# until we figure out which source files are necessary for runtime
+	# optional features and which aren't, we install all sources
+	find . -type f -name '*fsl' -delete || die
+	rm -f lisp-kernel/${CCL_KERNEL}/*.o || die
+	cp -a compiler level-0 level-1 lib library \
+		lisp-kernel scripts tools xdump contrib \
+		"${D}"/${install_dir} || die
+	cp -a ${CCL_HEADERS} "${D}"/${install_dir} || die
+
+	make_wrapper ccl "${install_dir}/${CCL_RUNTIME}"
+
+	echo "CCL_DEFAULT_DIRECTORY=${install_dir}" > "${ENVD}"
+	doenvd "${ENVD}"
+
+	dodoc doc/release-notes.txt
+	use doc && dodoc "${DISTDIR}"/ccl.html
+	use doc && dodoc -r examples
+}

diff --git a/dev-lisp/clozurecl/files/ccl-format.patch b/dev-lisp/clozurecl/files/ccl-format.patch
new file mode 100644
index 0000000..c2df37c
--- /dev/null
+++ b/dev-lisp/clozurecl/files/ccl-format.patch
@@ -0,0 +1,128 @@
+diff -r -U1 ccl.orig/lib/format.lisp ccl/lib/format.lisp
+--- ccl.orig/lib/format.lisp	2015-11-07 02:10:10.000000000 +0600
++++ ccl/lib/format.lisp	2015-11-20 22:51:51.736191995 +0600
+@@ -1296,5 +1296,2 @@
+       
+-
+-
+-
+ ;;; Given a non-negative floating point number, SCALE-EXPONENT returns a
+@@ -1305,41 +1302,74 @@
+ 
+-
+-(defconstant long-log10-of-2 0.30103d0)
+-
+-#| 
+-(defun scale-exponent (x)
+-  (if (floatp x )
+-      (scale-expt-aux (abs x) 0.0d0 1.0d0 1.0d1 1.0d-1 long-log10-of-2)
+-      (report-bad-arg x 'float)))
+-
+-#|this is the slisp code that was in the place of the error call above.
+-  before floatp was put in place of shortfloatp.
+-      ;(scale-expt-aux x (%sp-l-float 0) (%sp-l-float 1) %long-float-ten
+-      ;                %long-float-one-tenth long-log10-of-2)))
+-|#
+-
+-; this dies with floating point overflow (?) if fed least-positive-double-float
+-
+-(defun scale-expt-aux (x zero one ten one-tenth log10-of-2)
+-  (let ((exponent (nth-value 1 (decode-float x))))
+-    (if (= x zero)
+-      (values zero 1)
+-      (let* ((e (round (* exponent log10-of-2)))
+-             (x (if (minusp e)		;For the end ranges.
+-                  (* x ten (expt ten (- -1 e)))
+-                  (/ x ten (expt ten (1- e))))))
+-        (do ((d ten (* d ten))
+-             (y x (/ x d))
+-             (e e (1+ e)))
+-            ((< y one)
+-             (do ((m ten (* m ten))
+-                  (z y (* z m))
+-                  (e e (1- e)))
+-                 ((>= z one-tenth) (values x e)))))))))
+-|#
+-
+-(defun scale-exponent (n)
+-  (let ((exp (nth-value 1 (decode-float n))))
+-    (values (round (* exp long-log10-of-2)))))
+-
++(defconstant single-float-min-e
++  (nth-value 1 (decode-float least-positive-single-float)))
++(defconstant double-float-min-e
++  (nth-value 1 (decode-float least-positive-double-float)))
++
++;;; Adapted from CMUCL.
++
++;; This is a modified version of the scale computation from Burger and
++;; Dybvig's paper "Printing floating-point quickly and accurately."
++;; We only want the exponent, so most things not needed for the
++;; computation of the exponent have been removed.  We also implemented
++;; the floating-point log approximation given in Burger and Dybvig.
++;; This is very noticeably faster for large and small numbers.  It is
++;; slower for intermediate sized numbers.
++(defun accurate-scale-exponent (v)
++  (declare (type float v))
++  (if (zerop v)
++      1
++      (let ((float-radix 2)		; b
++	    (float-digits (float-digits v)) ; p
++	    (min-e
++	     (etypecase v
++	       (single-float single-float-min-e)
++	       (double-float double-float-min-e))))
++	(multiple-value-bind (f e)
++	    (integer-decode-float v)
++	  (let ( ;; FIXME: these even tests assume normal IEEE rounding
++		;; mode.  I wonder if we should cater for non-normal?
++		(high-ok (evenp f)))
++	    ;; We only want the exponent here.
++	    (labels ((flog (x)
++		       (declare (type (float (0.0)) x))
++		       (let ((xd (etypecase x
++				   (single-float
++				    (float x 1d0))
++				   (double-float
++				    x))))
++			 (ceiling (- (the (double-float -400d0 400d0)
++					  (log xd 10d0))
++				     1d-10))))
++		     (fixup (r s m+ k)
++		       (if (if high-ok
++			       (>= (+ r m+) s)
++			       (> (+ r m+) s))
++			   (+ k 1)
++			   k))
++		     (scale (r s m+)
++		       (let* ((est (flog v))
++			      (scale (the integer (10-to-e (abs est)))))
++			 (if (>= est 0)
++			     (fixup r (* s scale) m+ est)
++			     (fixup (* r scale) s (* m+ scale) est)))))
++	      (let (r s m+)
++		(if (>= e 0)
++		    (let* ((be (expt float-radix e))
++			   (be1 (* be float-radix)))
++		      (if (/= f (expt float-radix (1- float-digits)))
++			  (setf r (* f be 2)
++				s 2
++				m+ be)
++			  (setf r (* f be1 2)
++				s (* float-radix 2)
++				m+ be1)))
++		    (if (or (= e min-e) 
++			    (/= f (expt float-radix (1- float-digits))))
++			(setf r (* f 2)
++			      s (* (expt float-radix (- e)) 2)
++			      m+ 1)
++			(setf r (* f float-radix 2)
++			      s (* (expt float-radix (- 1 e)) 2)
++			      m+ float-radix)))
++		(scale r s m+))))))))
+ 
+@@ -1922,3 +1952,3 @@
+           (format-error "incompatible values for k and d")))
+-      (when (not exp) (setq exp (scale-exponent  number)))
++      (when (not exp) (setq exp (accurate-scale-exponent (abs number))))
+       AGAIN


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lisp/clozurecl/, dev-lisp/clozurecl/files/
@ 2018-12-09 13:36 Andrey Grozin
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Grozin @ 2018-12-09 13:36 UTC (permalink / raw
  To: gentoo-commits

commit:     01277b43fb99ba50bf59849c19305ba94783cfe2
Author:     Andrey Grozin <grozin <AT> gentoo <DOT> org>
AuthorDate: Sun Dec  9 13:35:59 2018 +0000
Commit:     Andrey Grozin <grozin <AT> gentoo <DOT> org>
CommitDate: Sun Dec  9 13:35:59 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01277b43

dev-lisp/clozurecl: fix compilation on x86 with 17.0 profile

Suggested-by:  Sergei Trofimovich <slyfox <AT> gentoo.org>
Closes: https://bugs.gentoo.org/672454
Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org>
Package-Manager: Portage-2.3.41, Repoman-2.3.9

 dev-lisp/clozurecl/clozurecl-1.11.5.ebuild                | 2 ++
 dev-lisp/clozurecl/files/clozurecl-1.11.5-no-pie-32.patch | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/dev-lisp/clozurecl/clozurecl-1.11.5.ebuild b/dev-lisp/clozurecl/clozurecl-1.11.5.ebuild
index f67f277c60a..101770fa847 100644
--- a/dev-lisp/clozurecl/clozurecl-1.11.5.ebuild
+++ b/dev-lisp/clozurecl/clozurecl-1.11.5.ebuild
@@ -31,6 +31,8 @@ DEPEND="${RDEPEND}"
 S="${WORKDIR}"/${MY_PN}
 ENVD="${T}/50ccl"
 
+PATCHES=( "${FILESDIR}"/${P}-no-pie-32.patch )
+
 src_prepare() {
 	default
 	cp "${EPREFIX}/usr/share/common-lisp/source/asdf/build/asdf.lisp" tools/ || die

diff --git a/dev-lisp/clozurecl/files/clozurecl-1.11.5-no-pie-32.patch b/dev-lisp/clozurecl/files/clozurecl-1.11.5-no-pie-32.patch
new file mode 100644
index 00000000000..2396c7a316c
--- /dev/null
+++ b/dev-lisp/clozurecl/files/clozurecl-1.11.5-no-pie-32.patch
@@ -0,0 +1,7 @@
+--- a/lisp-kernel/linuxx8632/Makefile
++++ b/lisp-kernel/linuxx8632/Makefile
+@@ -76,3 +76,3 @@ USE_LINK_SCRIPT = # -T $(LINK_SCRIPT)
+ ../../lx86cl:	$(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile  $(LINK_SCRIPT)
+-	$(CC)  -m32 $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ $(USE_LINK_SCRIPT) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
++	$(CC)  -m32 $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -no-pie -o $@ $(USE_LINK_SCRIPT) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
+ 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lisp/clozurecl/, dev-lisp/clozurecl/files/
@ 2021-01-17 10:53 David Seifert
  0 siblings, 0 replies; 3+ messages in thread
From: David Seifert @ 2021-01-17 10:53 UTC (permalink / raw
  To: gentoo-commits

commit:     432128cdf7ed591a37def8308e3fcb2b4d5038b8
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Sun Jan 17 10:53:46 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jan 17 10:53:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=432128cd

dev-lisp/clozurecl: Fix build with gcc-10

Closes: https://github.com/gentoo/gentoo/pull/19087
Closes: https://bugs.gentoo.org/722618
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-lisp/clozurecl/clozurecl-1.11.5.ebuild         |   5 +-
 .../files/clozurecl-1.11.5-fno-common.patch        | 110 +++++++++++++++++++++
 2 files changed, 114 insertions(+), 1 deletion(-)

diff --git a/dev-lisp/clozurecl/clozurecl-1.11.5.ebuild b/dev-lisp/clozurecl/clozurecl-1.11.5.ebuild
index 79b4fa4e31f..5f7c8d3510a 100644
--- a/dev-lisp/clozurecl/clozurecl-1.11.5.ebuild
+++ b/dev-lisp/clozurecl/clozurecl-1.11.5.ebuild
@@ -30,7 +30,10 @@ DEPEND="${RDEPEND}"
 S="${WORKDIR}"/${MY_PN}
 ENVD="${T}/50ccl"
 
-PATCHES=( "${FILESDIR}"/${P}-no-pie-32.patch )
+PATCHES=(
+	"${FILESDIR}"/${P}-no-pie-32.patch
+	"${FILESDIR}"/${P}-fno-common.patch
+)
 
 src_prepare() {
 	default

diff --git a/dev-lisp/clozurecl/files/clozurecl-1.11.5-fno-common.patch b/dev-lisp/clozurecl/files/clozurecl-1.11.5-fno-common.patch
new file mode 100644
index 00000000000..3047a3c98b6
--- /dev/null
+++ b/dev-lisp/clozurecl/files/clozurecl-1.11.5-fno-common.patch
@@ -0,0 +1,110 @@
+https://bugs.gentoo.org/722618
+Submitted-by: inasprecali@disroot.org
+Author: smuglispweenie@gmail.com
+--- a/lisp-kernel/area.h
++++ b/lisp-kernel/area.h
+@@ -108,7 +108,7 @@ Boolean grow_dynamic_area(natural);
+ Boolean shrink_dynamic_area(natural);
+ 
+ /* serialize add_area/remove_area, and also the tcr queue */
+-void *tcr_area_lock;
++extern void *tcr_area_lock;
+ 
+ #define reserved_area ((area *)(all_areas))
+ #define active_dynamic_area ((area *)(reserved_area->succ))
+--- a/lisp-kernel/gc-common.c
++++ b/lisp-kernel/gc-common.c
+@@ -92,6 +92,7 @@ LispObj GCarealow = 0, GCareadynamiclow = 0;
+ natural GCndnodes_in_area = 0, GCndynamic_dnodes_in_area = 0;
+ LispObj GCweakvll = (LispObj)NULL;
+ LispObj GCdwsweakvll = (LispObj)NULL;
++LispObj GCfirstunmarked = (LispObj) NULL;
+ LispObj GCephemeral_low = 0;
+ natural GCn_ephemeral_dnodes = 0;
+ natural GCstack_limit = 0;
+--- a/lisp-kernel/gc.h
++++ b/lisp-kernel/gc.h
+@@ -62,8 +62,8 @@
+ extern LispObj GCarealow, GCareadynamiclow;
+ extern natural GCndnodes_in_area, GCndynamic_dnodes_in_area;
+ extern bitvector GCmarkbits, GCdynamic_markbits,managed_static_refbits,global_refidx,dynamic_refidx,managed_static_refidx;
+-LispObj *global_reloctab, *GCrelocptr;
+-LispObj GCfirstunmarked;
++extern LispObj *global_reloctab, *GCrelocptr;
++extern LispObj GCfirstunmarked;
+ 
+ extern natural lisp_heap_gc_threshold;
+ extern natural lisp_heap_notify_threshold;
+@@ -83,7 +83,6 @@ void gc(TCR *, signed_natural);
+ int change_hons_area_size(TCR *, signed_natural);
+ void delete_protected_area(protected_area_ptr);
+ Boolean egc_control(Boolean, BytePtr);
+-Boolean free_segments_zero_filled_by_OS;
+ Boolean new_heap_segment(ExceptionInformation *, natural, Boolean , TCR *, Boolean *);
+ void platform_new_heap_segment(ExceptionInformation *, TCR*, BytePtr, BytePtr);
+ /* an type representing 1/4 of a natural word */
+@@ -153,19 +152,19 @@ void report_paging_info_delta(FILE*, paging_info *, paging_info *);
+ #define GC_TRAP_FUNCTION_FREEZE 129
+ #define GC_TRAP_FUNCTION_THAW 130
+ 
+-Boolean GCDebug, GCverbose, just_purified_p;
+-bitvector GCmarkbits, GCdynamic_markbits;
+-LispObj GCarealow, GCareadynamiclow;
+-natural GCndnodes_in_area, GCndynamic_dnodes_in_area;
+-LispObj GCweakvll,GCdwsweakvll;
+-LispObj GCephemeral_low;
+-natural GCn_ephemeral_dnodes;
+-natural GCstack_limit;
++extern Boolean GCDebug, GCverbose, just_purified_p;
++extern bitvector GCmarkbits, GCdynamic_markbits;
++extern LispObj GCarealow, GCareadynamiclow;
++extern natural GCndnodes_in_area, GCndynamic_dnodes_in_area;
++extern LispObj GCweakvll, GCdwsweakvll;
++extern LispObj GCephemeral_low;
++extern natural GCn_ephemeral_dnodes;
++extern natural GCstack_limit;
+ 
+ #if WORD_SIZE == 64
+-unsigned short *_one_bits;
++extern unsigned short *_one_bits;
+ #else
+-const unsigned char _one_bits[256];
++extern const unsigned char _one_bits[256];
+ #endif
+ 
+ #define one_bits(x) _one_bits[x]
+@@ -195,11 +194,10 @@ void gc(TCR *, signed_natural);
+ /* backend-interface */
+ 
+ typedef void (*weak_mark_fun) (LispObj);
+-weak_mark_fun mark_weak_htabv, dws_mark_weak_htabv;
++extern weak_mark_fun mark_weak_htabv, dws_mark_weak_htabv;
+ 
+ typedef void (*weak_process_fun)(void);
+-
+-weak_process_fun markhtabvs;
++extern weak_process_fun markhtabvs;
+ 
+ 
+ #define hash_table_vector_header_count (sizeof(hash_table_vector_header)/sizeof(LispObj))
+--- a/lisp-kernel/pmcl-kernel.c
++++ b/lisp-kernel/pmcl-kernel.c
+@@ -151,6 +151,8 @@ wperror(char* message)
+ 
+ LispObj lisp_nil = (LispObj) 0;
+ bitvector global_mark_ref_bits = NULL, dynamic_mark_ref_bits = NULL, relocatable_mark_ref_bits = NULL, global_refidx = NULL, dynamic_refidx = NULL,managed_static_refidx = NULL;
++LispObj *global_reloctab = (LispObj*) 0, *GCrelocptr = (LispObj*) 0;
++void *tcr_area_lock = NULL;
+ 
+ 
+ /* These are all "persistent" : they're initialized when
+--- a/lisp-kernel/threads.h
++++ b/lisp-kernel/threads.h
+@@ -187,7 +187,6 @@ void tsd_set(LispObj, void *);
+ void *tsd_get(LispObj);
+ TCR *new_tcr(natural, natural);
+ void thread_init_tcr(TCR *tcr, void *stack_base, natural stack_size);
+-TCR *initial_thread_tcr;
+ 
+ #define DEFAULT_THREAD_STACK_SIZE ((size_t) -1)
+ #define MINIMAL_THREAD_STACK_SIZE ((size_t) 0)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-17 10:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-17 10:53 [gentoo-commits] repo/gentoo:master commit in: dev-lisp/clozurecl/, dev-lisp/clozurecl/files/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2018-12-09 13:36 Andrey Grozin
2015-11-21  5:00 Andrey Grozin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox