Bug 146623 - [PATCH]lang/sbcl: update to 1.0.38
Summary: [PATCH]lang/sbcl: update to 1.0.38
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Stanislav Sedov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-15 21:20 UTC by bf
Modified: 2010-10-16 00:10 UTC (History)
0 users

See Also:


Attachments
file.diff (6.73 KB, patch)
2010-05-15 21:20 UTC, bf
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bf 2010-05-15 21:20:07 UTC
-update to 1.0.38
-allow memory upper bound on amd64, too
-respect CC, *FLAGS, and toolchain-related variables

n.b. WITH_THREADS hangs during the sb-concurrency tests on my machine.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2010-05-15 21:20:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->stas

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 swell.k 2010-06-09 13:26:36 UTC
- bump distfile
- swap `echo' with ECHO_CMD, cf. ECHO_CMD vs. ECHO_MSG in Porter's Handbook
- prevent local SBCL_HOME from interfering with installation, see instal.sh
  ex. user may have SBCL_HOME in environment from running stumpwm

tested only on x11-wm/stumpwm

--- a.diff begins here ---
diff --git a/lang/sbcl/Makefile b/lang/sbcl/Makefile
index d70d9dc..a25452b 100644
--- a/lang/sbcl/Makefile
+++ b/lang/sbcl/Makefile
@@ -9,7 +9,7 @@
 #
 
 PORTNAME=	sbcl
-PORTVERSION=	1.0.38.0
+PORTVERSION=	1.0.39.0
 CATEGORIES=	lang lisp
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:R} \
 		ftp://ftp.SpringDaemons.com/soft/sbcl-binary/:binaries
@@ -106,14 +106,14 @@ pre-everything::
 	@${ECHO_MSG}
 
 post-patch:
-	@echo "CC=${CC}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
-	@echo "CFLAGS=${CFLAGS} -fno-omit-frame-pointer" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
-	@echo "CPPFLAGS=${CPPFLAGS}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
-	@echo "GREP=${GREP}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
-	@echo "LD=${LD}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
-	@echo "LINKFLAGS=${LDFLAGS}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+	@${ECHO_CMD} "CC=${CC}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+	@${ECHO_CMD} "CFLAGS=${CFLAGS} -fno-omit-frame-pointer" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+	@${ECHO_CMD} "CPPFLAGS=${CPPFLAGS}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+	@${ECHO_CMD} "GREP=${GREP}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+	@${ECHO_CMD} "LD=${LD}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+	@${ECHO_CMD} "LINKFLAGS=${LDFLAGS}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
 .ifdef(NM)
-	@echo "NM=${NM} -gp" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+	@${ECHO_CMD} "NM=${NM} -gp" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
 .endif
 	@${REINPLACE_CMD} -e '\|CC=|s|gcc|${CC}|'  ${WRKSRC}/contrib/asdf-module.mk
 	@${REINPLACE_CMD} -e 's|"cc"|"${CC}"|' \
@@ -136,7 +136,7 @@ do-build:
 
 do-install:
 	(cd ${WRKSRC} && ${SETENV} CC="${CC}" INSTALL_ROOT=${PREFIX} \
-		MAN_DIR=${PREFIX}/man DOC_DIR=${DOCSDIR} \
+		MAN_DIR=${PREFIX}/man DOC_DIR=${DOCSDIR} SBCL_HOME= \
 		INFO_DIR=${INFODIR} ${SH} install.sh)
 	@${RMDIR} ${DOCSDIR}/html
 
diff --git a/lang/sbcl/distinfo b/lang/sbcl/distinfo
index d0bc77b..09ea436 100644
--- a/lang/sbcl/distinfo
+++ b/lang/sbcl/distinfo
@@ -1,6 +1,6 @@
-MD5 (sbcl-1.0.38-source.tar.bz2) = a275b47c2f18cf2d20594d7b5463835f
-SHA256 (sbcl-1.0.38-source.tar.bz2) = 9c34c93616a485573f119265cc5cafb0ebf23b1a97bc5f066f82e9f2d99b393a
-SIZE (sbcl-1.0.38-source.tar.bz2) = 3415742
+MD5 (sbcl-1.0.39-source.tar.bz2) = 8dcc98ba36bb0197b7bf12f001ff2bb2
+SHA256 (sbcl-1.0.39-source.tar.bz2) = a9f7d6b5726e2d1953ed3ff1ae598d9e5592634718bc8fad66afad3e8a2b82b0
+SIZE (sbcl-1.0.39-source.tar.bz2) = 3419835
 MD5 (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = eb21c4c454d0ef9784d679d9c913f789
 SHA256 (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = 06a1e4e3a5f5f8e012ff6037a51624d7d1f34bff0979ce45e70418a293412b4e
 SIZE (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = 8397764
--- a.diff ends here ---
Comment 3 swell.k 2010-07-05 13:32:27 UTC
Bump distfile. Tested only on amd64 and x11-wm/stumpwm.
--- b.diff begins here ---
diff --git lang/sbcl/Makefile lang/sbcl/Makefile
index 20d3808..3f39614 100644
--- lang/sbcl/Makefile
+++ lang/sbcl/Makefile
@@ -9,7 +9,7 @@
 #
 
 PORTNAME=	sbcl
-PORTVERSION=	1.0.39.0
+PORTVERSION=	1.0.40.0
 CATEGORIES=	lang lisp
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:R} \
 		ftp://ftp.SpringDaemons.com/soft/sbcl-binary/:binaries
diff --git lang/sbcl/distinfo lang/sbcl/distinfo
index 09ea436..03d627b 100644
--- lang/sbcl/distinfo
+++ lang/sbcl/distinfo
@@ -1,6 +1,6 @@
-MD5 (sbcl-1.0.39-source.tar.bz2) = 8dcc98ba36bb0197b7bf12f001ff2bb2
-SHA256 (sbcl-1.0.39-source.tar.bz2) = a9f7d6b5726e2d1953ed3ff1ae598d9e5592634718bc8fad66afad3e8a2b82b0
-SIZE (sbcl-1.0.39-source.tar.bz2) = 3419835
+MD5 (sbcl-1.0.40-source.tar.bz2) = 36adc46abbd3038c82ac3e2ff572a0d9
+SHA256 (sbcl-1.0.40-source.tar.bz2) = f800825363fced70b8bf70f9ab55a1b341685c5efa6e6d70b69a5fc37d635650
+SIZE (sbcl-1.0.40-source.tar.bz2) = 3428830
 MD5 (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = eb21c4c454d0ef9784d679d9c913f789
 SHA256 (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = 06a1e4e3a5f5f8e012ff6037a51624d7d1f34bff0979ce45e70418a293412b4e
 SIZE (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = 8397764
--- b.diff ends here ---
Comment 4 Stanislav Sedov freebsd_committer 2010-07-09 00:48:50 UTC
Hi!

Thanks for the update, but it still hangs in the concurrency test.
We need to figure out why it happens and fix it before the update.
Do you have any ideas?

-- 
Stanislav Sedov
ST4096-RIPE
Comment 5 swell.k 2010-07-18 11:59:09 UTC
Only mailbox.interrupts-safety.1 fails here. Lowering number of
kill-thread in :interruptor reduces chance of the test hanging
indefinitely. Since I can't debug further here is some random info

  load: 0.83  cmd: sbcl 8018 [umtxn] 142.88r 1.24u 1.35s 0% 90992k

  $ procstat -k $(pgrep sbcl) | awk 'NR > 1 { for(i=5; i<=NF; i++) printf $i" "; printf "\n" }'| sed 's/^thread *//' | sort -u
  mi_switch sleepq_catch_signals sleepq_timedwait_sig _sleep kern_nanosleep nanosleep syscallenter syscall Xfast_syscall
  mi_switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock_umutex __umtx_op_wait_umutex syscallenter syscall Xfast_syscall
  mi_switch sleepq_catch_signals sleepq_wait_sig _sleep do_wait __umtx_op_wait syscallenter syscall Xfast_syscall

  0x000000080762ff2c in _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37
  37      RSYSCALL_ERR(_umtx_op)
  (gdb) bt
  #0  0x000000080762ff2c in _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37
  #1  0x000000080762cc6a in join_common (pthread=0x80bc40fc0, thread_return=0x0, abstime=0x0) at /usr/src/lib/libthr/thread/thr_join.c:120
  #2  0x000000000041aeab in perform_thread_post_mortem (th=<value optimized out>) at thread.c:205
  #3  schedule_thread_post_mortem (th=<value optimized out>) at thread.c:251
  #4  new_thread_trampoline (th=<value optimized out>) at thread.c:326
  #5  0x00000008076260c1 in thread_start (curthread=0x80a7fa6c0) at /usr/src/lib/libthr/thread/thr_create.c:288
  #6  0x0000000000000000 in ?? ()

--- a.diff begins here ---

  workaround

diff --git lang/sbcl/Makefile lang/sbcl/Makefile
index 3f39614..ba0e7b9 100644
--- lang/sbcl/Makefile
+++ lang/sbcl/Makefile
@@ -124,7 +124,7 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|cc -c|${CC} -c|' \
 		-e 's|ld \$$SO_FLAGS|${LD} \$$SO_FLAGS|' \
 			 ${WRKSRC}/tests/foreign.test.sh
-	@${FIND} ${WRKSRC} -name '*.orig' -o -name '*.bak' -delete
+	@${FIND} ${WRKSRC} \( -name '*.orig' -o -name '*.bak' \) -delete
 .if defined(WITH_THREADS)
 	@${CP} ${FILESDIR}/customize-target-features.lisp ${WRKSRC}
 .endif
diff --git lang/sbcl/files/patch-disable-failing-tests lang/sbcl/files/patch-disable-failing-tests
new file mode 100644
index 0000000..58d9f16
--- /dev/null
+++ lang/sbcl/files/patch-disable-failing-tests
@@ -0,0 +1,10 @@
+--- contrib/sb-concurrency/tests/test-mailbox.lisp~
++++ contrib/sb-concurrency/tests/test-mailbox.lisp
+@@ -181,6 +185,7 @@
+   (:errors   . 0)
+   (:timeouts . 0))
+ 
++#-freebsd
+ (deftest mailbox.interrupts-safety.1
+     (multiple-value-bind (received garbage errors timeouts)
+         (test-mailbox-producers-consumers
--- a.diff ends here ---
Comment 6 swell.k 2010-08-23 13:21:50 UTC
- bump version

--- a.diff begins here ---
diff --git lang/sbcl/Makefile lang/sbcl/Makefile
index ba0e7b9..3a6077d 100644
--- lang/sbcl/Makefile
+++ lang/sbcl/Makefile
@@ -9,7 +9,7 @@
 #
 
 PORTNAME=	sbcl
-PORTVERSION=	1.0.40.0
+PORTVERSION=	1.0.41.0
 CATEGORIES=	lang lisp
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:R} \
 		ftp://ftp.SpringDaemons.com/soft/sbcl-binary/:binaries
diff --git lang/sbcl/distinfo lang/sbcl/distinfo
index 03d627b..6ed2224 100644
--- lang/sbcl/distinfo
+++ lang/sbcl/distinfo
@@ -1,6 +1,6 @@
-MD5 (sbcl-1.0.40-source.tar.bz2) = 36adc46abbd3038c82ac3e2ff572a0d9
-SHA256 (sbcl-1.0.40-source.tar.bz2) = f800825363fced70b8bf70f9ab55a1b341685c5efa6e6d70b69a5fc37d635650
-SIZE (sbcl-1.0.40-source.tar.bz2) = 3428830
+MD5 (sbcl-1.0.41-source.tar.bz2) = cdf17acb991fbdc9d3c13263f5c2bb04
+SHA256 (sbcl-1.0.41-source.tar.bz2) = 33db27552eb1b670dfd9a3cd3279cc0c07842f39693cee16700193b632053005
+SIZE (sbcl-1.0.41-source.tar.bz2) = 3428046
 MD5 (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = eb21c4c454d0ef9784d679d9c913f789
 SHA256 (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = 06a1e4e3a5f5f8e012ff6037a51624d7d1f34bff0979ce45e70418a293412b4e
 SIZE (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = 8397764
--- a.diff ends here ---
Comment 7 b. f. 2010-08-23 18:36:49 UTC
On 8/23/10, Anonymous <swell.k@gmail.com> wrote:
> - bump version
>
> --- a.diff begins here ---
> diff --git lang/sbcl/Makefile lang/sbcl/Makefile
> index ba0e7b9..3a6077d 100644
> --- lang/sbcl/Makefile
> +++ lang/sbcl/Makefile
> @@ -9,7 +9,7 @@
>  #
>
>  PORTNAME=	sbcl
> -PORTVERSION=	1.0.40.0
> +PORTVERSION=	1.0.41.0


Yes, which also suffers from the same test failure, on 9-CURRENT amd64
after the recent threading-related FreeBSD changes by David Xu.
1.0.42.0 would normally be coming out soon, but the sbcl developer who
is now responsible for the sbcl releases said last month that he may
not release one this month if there are not more changes than there
were last time.  Since then, there have been some changes that affect
threading, and some relevant to FreeBSD, so stay tuned.  By the way,
Stas, I'm sorry about not responding earlier to your request for more
information  -- I've been busy, and didn't have more to offer than
swell.k.

b.
Comment 8 swell.k 2010-09-01 06:14:30 UTC
- bump version to 1.0.42
- use PREFIX in manpage and info doc (idea from pkgsrc),
  `-' (minus) lines are from ports/146773

Tested on /head@r212078 on amd64, still hangs on mailbox.interrupts-safety.1
I guess recent changes to libthr were unrelated.

I'm not sure why we're so concerned about that particular sb-concurrency test.
THREADS are *disabled* by default. As it won't affect package why delaying
update when there is no fix in prospect? And it's not like THREADS are
completely broken.

NetBSD for example disables[1] some posix tests because they fail.

[1] http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/~checkout~/pkgsrc/lang/sbcl/patches/patch-ae
    history - http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/wip/sbcl/patches/patch-ak

--- a.diff begins here ---
diff --git lang/sbcl/Makefile lang/sbcl/Makefile
index 3a6077d..79bcd30 100644
--- lang/sbcl/Makefile
+++ lang/sbcl/Makefile
@@ -9,7 +9,7 @@
 #
 
 PORTNAME=	sbcl
-PORTVERSION=	1.0.41.0
+PORTVERSION=	1.0.42.0
 CATEGORIES=	lang lisp
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:R} \
 		ftp://ftp.SpringDaemons.com/soft/sbcl-binary/:binaries
@@ -115,8 +115,12 @@ post-patch:
 .ifdef(NM)
 	@${ECHO_CMD} "NM=${NM} -gp" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
 .endif
-	@${FIND} ${WRKSRC} -type f -exec ${REINPLACE_CMD} -E -e \
-		's|/etc/sbclrc|${PREFIX}&|g' {} +
+	@${REINPLACE_CMD} \
+		-e 's|/etc/sbclrc|${PREFIX}&|g' \
+		-e 's|/usr/local|${PREFIX}|g' \
+		${WRKSRC}/doc/sbcl.1 \
+		${WRKSRC}/doc/manual/*.texinfo \
+		${WRKSRC}/src/code/toplevel.lisp
 	@${REINPLACE_CMD} -e '\|CC=|s|gcc|${CC}|'  ${WRKSRC}/contrib/asdf-module.mk
 	@${REINPLACE_CMD} -e 's|"cc"|"${CC}"|' \
 		-e 's|"-O3"|"${CFLAGS}"|' \
diff --git lang/sbcl/distinfo lang/sbcl/distinfo
index 6ed2224..f01747f 100644
--- lang/sbcl/distinfo
+++ lang/sbcl/distinfo
@@ -1,6 +1,6 @@
-MD5 (sbcl-1.0.41-source.tar.bz2) = cdf17acb991fbdc9d3c13263f5c2bb04
-SHA256 (sbcl-1.0.41-source.tar.bz2) = 33db27552eb1b670dfd9a3cd3279cc0c07842f39693cee16700193b632053005
-SIZE (sbcl-1.0.41-source.tar.bz2) = 3428046
+MD5 (sbcl-1.0.42-source.tar.bz2) = 09cc54b3afc84fe2ce1d5c2af98ea2a2
+SHA256 (sbcl-1.0.42-source.tar.bz2) = a55e4227a901a7c02d747f25678d9ce679c0b2e69f4a7c2b9bea703b564ec948
+SIZE (sbcl-1.0.42-source.tar.bz2) = 3431872
 MD5 (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = eb21c4c454d0ef9784d679d9c913f789
 SHA256 (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = 06a1e4e3a5f5f8e012ff6037a51624d7d1f34bff0979ce45e70418a293412b4e
 SIZE (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = 8397764
--- a.diff ends here ---
Comment 9 b. f. 2010-09-23 16:06:03 UTC
On 9/23/10, Jimmy Olgeni <olgeni@freebsd.org> wrote:
> olgeni      2010-09-23 14:15:52 UTC
>
>   FreeBSD ports repository
>
>   Modified files:
>     lang/sbcl            Makefile distinfo pkg-plist
>   Added files:
>     lang/sbcl/files      patch-doc_manual_make-tempfiles.sh
>                          patch-install.sh patch-make-target-2.sh
>                          patch-make-target-contrib.sh
>                          patch-tests_subr.sh
>   Log:
>   - Update to 1.0.40.0
>
>   - Patch a few files to use the exported LISP_EXTRA_ARG variable,
>   thus respecting --dynamic-space-size on every sbcl invocation.
>   Without this, the port fails to build even if DYNAMIC_SPACE_SIZE
>   is set to a proper value.
>
>   PR:             ports/149281
>   Submitted by:   olgeni
>   Approved by:    maintainer timeout (50 days)

What about ports/146623? Did you see the rationale stas@ offered there
for not updating?  If you thought it wasn't a good reason, then why
not update to 1.0.42, rather than this old version?

b.
Comment 10 Jimmy Olgeni freebsd_committer 2010-09-23 17:17:17 UTC
On Thu, 23 Sep 2010, b. f. wrote:

> On 9/23/10, Jimmy Olgeni <olgeni@freebsd.org> wrote:
>> olgeni      2010-09-23 14:15:52 UTC
>>
>>   FreeBSD ports repository
>>
>>   Modified files:
>>     lang/sbcl            Makefile distinfo pkg-plist
>>   Added files:
>>     lang/sbcl/files      patch-doc_manual_make-tempfiles.sh
>>                          patch-install.sh patch-make-target-2.sh
>>                          patch-make-target-contrib.sh
>>                          patch-tests_subr.sh
>>   Log:
>>   - Update to 1.0.40.0
>>
>>   - Patch a few files to use the exported LISP_EXTRA_ARG variable,
>>   thus respecting --dynamic-space-size on every sbcl invocation.
>>   Without this, the port fails to build even if DYNAMIC_SPACE_SIZE
>>   is set to a proper value.
>>
>>   PR:             ports/149281
>>   Submitted by:   olgeni
>>   Approved by:    maintainer timeout (50 days)
>
> What about ports/146623? Did you see the rationale stas@ offered there
> for not updating?  If you thought it wasn't a good reason, then why
> not update to 1.0.42, rather than this old version?

I entirely missed it. I'll revert to 1.0.34 immediately, keep the 
dynamic-space-size fix and stay well away from sbcl before disrupting 
something else. Apologies for the mess...

-- 
jimmy
Comment 11 b. f. 2010-09-23 18:03:57 UTC
On 9/23/10, Jimmy Olgeni <olgeni@freebsd.org> wrote:

>
> I entirely missed it. I'll revert to 1.0.34 immediately, keep the
> dynamic-space-size fix and stay well away from sbcl before disrupting
> something else. Apologies for the mess...

It may not be as bad as all that.  There isn't a consensus on whether
the test failure is a good reason to hold up the updates, since
threads are a non-default option, and it's not clear if the test
failure indicates a problem with something other than the test.  But
if you do update it, it would probably be better to use the later
version, 1.0.42.  That would be my vote, anyway.
Comment 12 swell.k 2010-09-30 11:54:50 UTC
I've merged recent LISP_EXTRA_ARGS changes made by olgeni@ to Makefile.
One more test is failing for THREADS since 1.0.43

  get-protocol-by-name/error (unexpected errno)

Tested on /head@r213275M on amd64. Below is a cumulative diff.

--- sbcl_1.0.43.diff begins here ---
- update to 1.0.43 [1]
- allow memory upper bound on amd64, too [1]
- respect CC, *FLAGS, and toolchain-related variables [1]
- disable failing tests on THREADS build [2]:
    mailbox.interrupts-safety.1 and get-protocol-by-name/error
- prevent local SBCL_HOME from interfering with installation [2]
- delete both .bak *and* .orig files in WRKSRC [2]

PR:		ports/146623
Submitted by:	bf <bf1783@gmail.com> [1], Anonymous [2]
---
 Makefile                          |   51 +++++++++++++++++++++++++++-----------
 distinfo                          |    6 ++--
 files/patch-disable-failing-tests |   20 ++++++++++++++
 pkg-plist                         |   30 +++++++++++++++++++---
 4 files changed, 86 insertions(+), 21 deletions(-)

Index: lang/sbcl/Makefile
===================================================================
RCS file: /a/.cvsup/ports/lang/sbcl/Makefile,v
retrieving revision 1.77
diff -u -p -r1.77 Makefile
--- lang/sbcl/Makefile	23 Sep 2010 16:31:02 -0000	1.77
+++ lang/sbcl/Makefile	30 Sep 2010 02:55:37 -0000
@@ -9,7 +9,7 @@
 #
 
 PORTNAME=	sbcl
-PORTVERSION=	1.0.34.0
+PORTVERSION=	1.0.43.0
 PORTREVISION=	0
 PORTEPOCH=	1
 CATEGORIES=	lang lisp
@@ -29,7 +29,9 @@ ONLY_FOR_ARCHS_REASON=	is a native code 
 
 USE_BZIP2=	yes
 USE_GMAKE=	yes
-CFLAGS+=	-DSBCL_HOME=\\"${PREFIX}/lib/sbcl/\\"
+CFLAGS+=	-DSBCL_HOME=\\\"${PREFIX}/lib/sbcl/\\\" -fno-omit-frame-pointer
+CPPFLAGS+=	-I.
+LDFLAGS+=	-dynamic -rdynamic
 
 OPTIONS=	SBCL "Use installed SBCL binary if available" off \
 		THREADS "Enable experimental threading support" off
@@ -53,14 +55,15 @@ WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVER
 EMPTY_DIRS=	sb-bsd-sockets/alien sb-posix/alien sb-posix/test-lab \
 		site-systems
 
-DYNAMIC_SPACE_SIZE?=	512
-
 .include <bsd.port.pre.mk>
 
 .if ${ARCH} == "i386"
-PLIST_SUB+=	I386_ONLY=""
+PLIST_SUB+=	I386_ONLY="" AMD64_ONLY="@comment "
+SBCLCONFIG=	 Config.x86-freebsd
+DYNAMIC_SPACE_SIZE?=	512
 .else
-PLIST_SUB+=	I386_ONLY="@comment "
+PLIST_SUB+=	I386_ONLY="@comment " AMD64_ONLY=""
+SBCLCONFIG=	Config.x86-64-freebsd
 .endif
 
 # If WITH_SBCL is defined, try to use existing "sbcl" first.
@@ -80,7 +83,7 @@ BOOT_ARCH_OS_LIST=	${ARCH}-freebsd${OSVE
 .  endif
 . endif
 
-. if ${ARCH} == "i386"
+. ifdef(DYNAMIC_SPACE_SIZE)
 LISP_EXTRA_ARG=	--dynamic-space-size ${DYNAMIC_SPACE_SIZE}
 . endif
 
@@ -105,15 +108,35 @@ pre-everything::
 	@${ECHO_MSG}
 
 post-patch:
-	@${REINPLACE_CMD} -E -e 's|(CFLAGS =) .*|\1 ${CFLAGS}|' \
-		${WRKSRC}/src/runtime/GNUmakefile
-	@${FIND} ${WRKSRC} -name '*.orig' -o -name '*.bak' -delete
+	@${ECHO_CMD} "CC=${CC}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+	@${ECHO_CMD} "CFLAGS=${CFLAGS} -fno-omit-frame-pointer" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+	@${ECHO_CMD} "CPPFLAGS=${CPPFLAGS}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+	@${ECHO_CMD} "GREP=${GREP}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+	@${ECHO_CMD} "LD=${LD}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+	@${ECHO_CMD} "LINKFLAGS=${LDFLAGS}" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+.ifdef(NM)
+	@${ECHO_CMD} "NM=${NM} -gp" >> ${WRKSRC}/src/runtime/${SBCLCONFIG}
+.endif
+	@${REINPLACE_CMD} \
+		-e 's|/etc/sbclrc|${PREFIX}&|g' \
+		-e 's|/usr/local|${PREFIX}|g' \
+		${WRKSRC}/doc/sbcl.1 \
+		${WRKSRC}/doc/manual/*.texinfo \
+		${WRKSRC}/src/code/toplevel.lisp
+	@${REINPLACE_CMD} -e '\|CC=|s|gcc|${CC}|'  ${WRKSRC}/contrib/asdf-module.mk
+	@${REINPLACE_CMD} -e 's|"cc"|"${CC}"|' \
+		-e 's|"-O3"|"${CFLAGS}"|' \
+			${WRKSRC}/tests/swap-lispobjs.impure.lisp
+	@${REINPLACE_CMD} -e 's|cc -c|${CC} -c|' \
+		-e 's|ld \$$SO_FLAGS|${LD} \$$SO_FLAGS|' \
+			 ${WRKSRC}/tests/foreign.test.sh
+	@${FIND} ${WRKSRC} \( -name '*.orig' -o -name '*.bak' \) -delete
 .if defined(WITH_THREADS)
 	@${CP} ${FILESDIR}/customize-target-features.lisp ${WRKSRC}
 .endif
 
 do-build:
-	@(cd ${WRKSRC} && ${SETENV} INSTALL_ROOT=${PREFIX} \
+	@(cd ${WRKSRC} && ${SETENV} CC="${CC}" INSTALL_ROOT=${PREFIX} \
 		LISP_EXTRA_ARG="${LISP_EXTRA_ARG}" \
 		${SH} make.sh ${LISP_CMD})
 	@${RM} -rf ${WRKSRC}/contrib/sb-cover/test-output
@@ -122,8 +145,8 @@ do-build:
 		${GMAKE} MAKEINFO='makeinfo --no-split' info)
 
 do-install:
-	(cd ${WRKSRC} && ${SETENV} INSTALL_ROOT=${PREFIX} \
-		MAN_DIR=${PREFIX}/man DOC_DIR=${DOCSDIR} \
+	(cd ${WRKSRC} && ${SETENV} CC="${CC}" INSTALL_ROOT=${PREFIX} \
+		MAN_DIR=${PREFIX}/man DOC_DIR=${DOCSDIR} SBCL_HOME= \
 		INFO_DIR=${INFODIR} ${SH} install.sh)
 	@${RMDIR} ${DOCSDIR}/html
 
@@ -134,7 +157,7 @@ post-install:
 .endfor
 
 test:	build
-	(cd ${WRKSRC}/tests && ${SH} run-tests.sh)
+	(cd ${WRKSRC}/tests && ${SETENV} CC="${CC}" ${SH} run-tests.sh)
 
 bootstrap:
 	${CP} -r ${WRKSRC} ${WRKDIR}/${NEWBOOTNAME}
Index: lang/sbcl/distinfo
===================================================================
RCS file: /a/.cvsup/ports/lang/sbcl/distinfo,v
retrieving revision 1.62
diff -u -p -r1.62 distinfo
--- lang/sbcl/distinfo	23 Sep 2010 16:31:02 -0000	1.62
+++ lang/sbcl/distinfo	30 Sep 2010 10:25:47 -0000
@@ -1,6 +1,6 @@
-MD5 (sbcl-1.0.34-source.tar.bz2) = 78c1a003281d11690f54609b4f5303f4
-SHA256 (sbcl-1.0.34-source.tar.bz2) = 59b90544acbfd0232a2e05154223e9cbf6b7bfc7f05ddc26ee850bd0bc220170
-SIZE (sbcl-1.0.34-source.tar.bz2) = 3384606
+MD5 (sbcl-1.0.43-source.tar.bz2) = 2b125844371881a99cfdf63c286e74cd
+SHA256 (sbcl-1.0.43-source.tar.bz2) = 98ad7abf7c3649890b52b40fedef07c1c0b3449be7ddd3fba6f2015f999c5e33
+SIZE (sbcl-1.0.43-source.tar.bz2) = 3504724
 MD5 (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = eb21c4c454d0ef9784d679d9c913f789
 SHA256 (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = 06a1e4e3a5f5f8e012ff6037a51624d7d1f34bff0979ce45e70418a293412b4e
 SIZE (sbcl-1.0.31-amd64-freebsd8-binary.tar.bz2) = 8397764
Index: lang/sbcl/pkg-plist
===================================================================
RCS file: /a/.cvsup/ports/lang/sbcl/pkg-plist,v
retrieving revision 1.43
diff -u -p -r1.43 pkg-plist
--- lang/sbcl/pkg-plist	23 Sep 2010 16:31:02 -0000	1.43
+++ lang/sbcl/pkg-plist	24 Sep 2010 04:27:29 -0000
@@ -82,6 +82,25 @@ lib/sbcl/sb-cltl2/sb-cltl2.fasl
 lib/sbcl/sb-cltl2/test-passed
 lib/sbcl/sb-cltl2/tests.fasl
 lib/sbcl/sb-cltl2/tests.lisp
+lib/sbcl/sb-concurrency/Makefile
+lib/sbcl/sb-concurrency/mailbox.fasl
+lib/sbcl/sb-concurrency/mailbox.lisp
+lib/sbcl/sb-concurrency/package.fasl
+lib/sbcl/sb-concurrency/package.lisp
+lib/sbcl/sb-concurrency/queue.fasl
+lib/sbcl/sb-concurrency/queue.lisp
+lib/sbcl/sb-concurrency/sb-concurrency.asd
+lib/sbcl/sb-concurrency/sb-concurrency.fasl
+lib/sbcl/sb-concurrency/sb-concurrency.texinfo
+lib/sbcl/sb-concurrency/test-passed
+lib/sbcl/sb-concurrency/tests/package.fasl
+lib/sbcl/sb-concurrency/tests/package.lisp
+lib/sbcl/sb-concurrency/tests/test-mailbox.fasl
+lib/sbcl/sb-concurrency/tests/test-mailbox.lisp
+lib/sbcl/sb-concurrency/tests/test-queue.fasl
+lib/sbcl/sb-concurrency/tests/test-queue.lisp
+lib/sbcl/sb-concurrency/tests/test-utils.fasl
+lib/sbcl/sb-concurrency/tests/test-utils.lisp
 lib/sbcl/sb-cover/.cvsignore
 lib/sbcl/sb-cover/Makefile
 lib/sbcl/sb-cover/cover.fasl
@@ -165,14 +184,12 @@ lib/sbcl/sb-posix/test-passed
 lib/sbcl/sb-posix/test-lab/.keep_me
 lib/sbcl/sb-queue/.cvsignore
 lib/sbcl/sb-queue/Makefile
-lib/sbcl/sb-queue/queue.fasl
-lib/sbcl/sb-queue/queue.lisp
+lib/sbcl/sb-queue/package.fasl
+lib/sbcl/sb-queue/package.lisp
 lib/sbcl/sb-queue/sb-queue.asd
 lib/sbcl/sb-queue/sb-queue.texinfo
 lib/sbcl/sb-queue/sb-queue.fasl
 lib/sbcl/sb-queue/test-passed
-lib/sbcl/sb-queue/test-queue.fasl
-lib/sbcl/sb-queue/test-queue.lisp
 lib/sbcl/sb-rotate-byte/.cvsignore
 lib/sbcl/sb-rotate-byte/Makefile
 lib/sbcl/sb-rotate-byte/README
@@ -189,6 +206,8 @@ lib/sbcl/sb-rotate-byte/sb-rotate-byte.a
 lib/sbcl/sb-rotate-byte/sb-rotate-byte.fasl
 lib/sbcl/sb-rotate-byte/sb-rotate-byte.texinfo
 lib/sbcl/sb-rotate-byte/test-passed
+%%AMD64_ONLY%%lib/sbcl/sb-rotate-byte/x86-64-vm.fasl
+%%AMD64_ONLY%%lib/sbcl/sb-rotate-byte/x86-64-vm.lisp
 %%I386_ONLY%%lib/sbcl/sb-rotate-byte/x86-vm.fasl
 lib/sbcl/sb-rotate-byte/x86-vm.lisp
 lib/sbcl/sb-rt/.cvsignore
@@ -216,6 +235,7 @@ lib/sbcl/sb-simple-streams/internal.fasl
 lib/sbcl/sb-simple-streams/internal.lisp
 lib/sbcl/sb-simple-streams/iodefs.fasl
 lib/sbcl/sb-simple-streams/iodefs.lisp
+lib/sbcl/sb-simple-streams/lp491087.txt
 lib/sbcl/sb-simple-streams/null.fasl
 lib/sbcl/sb-simple-streams/null.lisp
 lib/sbcl/sb-simple-streams/package.fasl
@@ -253,6 +273,8 @@ lib/sbcl/site-systems/.keep_me
 @dirrm lib/sbcl/sb-grovel
 @dirrm lib/sbcl/sb-executable
 @dirrm lib/sbcl/sb-cover
+@dirrm lib/sbcl/sb-concurrency/tests
+@dirrm lib/sbcl/sb-concurrency
 @dirrm lib/sbcl/sb-cltl2
 @dirrm lib/sbcl/sb-bsd-sockets/alien
 @dirrm lib/sbcl/sb-bsd-sockets
Index: lang/sbcl/files/patch-disable-failing-tests
===================================================================
RCS file: lang/sbcl/files/patch-disable-failing-tests
diff -N lang/sbcl/files/patch-disable-failing-tests
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ lang/sbcl/files/patch-disable-failing-tests	30 Sep 2010 10:28:22 -0000
@@ -0,0 +1,20 @@
+--- contrib/sb-bsd-sockets/tests.lisp~
++++ contrib/sb-bsd-sockets/tests.lisp
+@@ -20,6 +20,7 @@
+   (integerp (get-protocol-by-name "udp"))
+   t)
+ 
++#-(and sb-thread freebsd)
+ (deftest get-protocol-by-name/error
+   (handler-case (get-protocol-by-name "nonexistent-protocol")
+     (unknown-protocol ()
+--- contrib/sb-concurrency/tests/test-mailbox.lisp~
++++ contrib/sb-concurrency/tests/test-mailbox.lisp
+@@ -181,6 +185,7 @@
+   (:errors   . 0)
+   (:timeouts . 0))
+ 
++#-(and sb-thread freebsd)
+ (deftest mailbox.interrupts-safety.1
+     (multiple-value-bind (received garbage errors timeouts)
+         (test-mailbox-producers-consumers
--- sbcl_1.0.43.diff ends here ---
Comment 13 Stanislav Sedov freebsd_committer 2010-10-13 10:59:16 UTC
On Thu, 30 Sep 2010 11:10:05 GMT
Anonymous <swell.k@gmail.com> mentioned:

> The following reply was made to PR ports/146623; it has been noted by GNATS.
> 
> From: Anonymous <swell.k@gmail.com>
> To: bf <bf1783@gmail.com>
> Cc: bug-followup@FreeBSD.org
> Subject: Re: ports/146623: [PATCH]lang/sbcl: update to 1.0.38
> Date: Thu, 30 Sep 2010 14:54:50 +0400
> 
>  I've merged recent LISP_EXTRA_ARGS changes made by olgeni@ to Makefile.
>  One more test is failing for THREADS since 1.0.43
>  

Thanks for a great patch!
Can you, please, describe what -fno-omit-frame-pointer change are
for?  And -dynamic/-rdynamic options passed to the linker?
I can guess, but were there any real problems you were trying to
solve?  Just curious.

And sorry for the delay, it was too busy last months. :-(

-- 
Stanislav Sedov
ST4096-RIPE
Comment 14 dfilter service freebsd_committer 2010-10-16 00:04:12 UTC
stas        2010-10-15 23:04:07 UTC

  FreeBSD ports repository

  Modified files:
    lang/sbcl            Makefile distinfo pkg-plist 
  Added files:
    lang/sbcl/files      patch-disable-failing-tests 
  Removed files:
    lang/sbcl/files      patch-install.sh 
  Log:
  - Update to 1.0.43. [1]
  - Allow memory upper bound on amd64, too. [1]
  - Respect CC, *FLAGS, and toolchain-related variables. [1]
  - Disable failing tests on threaded build: mailbox.interrupts-safety.1
      and get-protocol-by-name/error. [2]
  - Prevent local SBCL_HOME from interfering with installation. [2]
  - Delete both .bak *and* .orig files in WRKSRC. [2]
  - Install supplied documentation, both for the SBCL itself and the modules.
  - Provide a way to install HTML, PDF and PS versions of manuals.  Install
    PDF and HTML by defaul.
  - Substitue the correct build date in sbcl.1 manual page before installing.
  - Don't install empty dirs and other temporary files.
  - Respect NOPORTDOCS.
  
  PR:             ports/146623
  Submitted by:   bf <bf1783@gmail.com> [1], Anonymous <swell.k@gmail.com> [2]
  
  Revision  Changes    Path
  1.78      +142 -27   ports/lang/sbcl/Makefile
  1.63      +3 -3      ports/lang/sbcl/distinfo
  1.1       +20 -0     ports/lang/sbcl/files/patch-disable-failing-tests (new)
  1.4       +0 -14     ports/lang/sbcl/files/patch-install.sh (dead)
  1.44      +50 -82    ports/lang/sbcl/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 15 Stanislav Sedov freebsd_committer 2010-10-16 00:05:48 UTC
State Changed
From-To: open->closed

Committed. Thanks!