Fix this to not compile in the pkgsrc dummy $HOME. (Patching lisp code, whee.) PKGREVISION++.diff -r1.2 -r1.3 pkgsrc/lang/lush/Makefile
(dholland)
@@ -1,27 +1,29 @@ | @@ -1,27 +1,29 @@ | |||
1 | # $NetBSD: Makefile,v 1.2 2007/02/19 18:20:48 joerg Exp $ | 1 | # $NetBSD: Makefile,v 1.3 2008/08/17 06:45:48 dholland Exp $ | |
2 | 2 | |||
3 | DISTNAME= lush-1.1 | 3 | DISTNAME= lush-1.1 | |
4 | PKGREVISION= 1 | |||
4 | CATEGORIES= lang | 5 | CATEGORIES= lang | |
5 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=lush/} | 6 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=lush/} | |
6 | 7 | |||
7 | MAINTAINER= dauphin@enst.fr | 8 | MAINTAINER= dauphin@enst.fr | |
8 | HOMEPAGE= http://lush.sourceforge.net/ | 9 | HOMEPAGE= http://lush.sourceforge.net/ | |
9 | COMMENT= Lisp interpreter/compiler with a seamless interface to C | 10 | COMMENT= Lisp interpreter/compiler with a seamless interface to C | |
10 | 11 | |||
11 | GNU_CONFIGURE= yes | 12 | GNU_CONFIGURE= yes | |
12 | USE_TOOLS+= gmake | 13 | USE_TOOLS+= gmake | |
13 | USE_LIBTOOL= yes | 14 | USE_LIBTOOL= yes | |
14 | 15 | |||
15 | CONFIGURE_ARGS+= --without-bfd | 16 | CONFIGURE_ARGS+= --without-bfd | |
16 | 17 | |||
17 | post-install: | 18 | post-install: | |
18 | ${RM} ${PREFIX}/share/lush/src/*c.orig | 19 | ${RM} ${PREFIX}/share/lush/src/*c.orig | |
20 | ${RM} ${PREFIX}/share/lush/lsh/libc/*.lsh.orig | |||
19 | 21 | |||
20 | .include "../../math/gsl/buildlink3.mk" | 22 | .include "../../math/gsl/buildlink3.mk" | |
21 | .include "../../math/lapack/buildlink3.mk" | 23 | .include "../../math/lapack/buildlink3.mk" | |
22 | .include "../../math/blas/buildlink3.mk" | 24 | .include "../../math/blas/buildlink3.mk" | |
23 | .include "../../devel/SDL/buildlink3.mk" | 25 | .include "../../devel/SDL/buildlink3.mk" | |
24 | .include "../../graphics/MesaLib/buildlink3.mk" | 26 | .include "../../graphics/MesaLib/buildlink3.mk" | |
25 | .include "../../audio/libaudiofile/buildlink3.mk" | 27 | .include "../../audio/libaudiofile/buildlink3.mk" | |
26 | .include "../../mk/pthread.buildlink3.mk" | 28 | .include "../../mk/pthread.buildlink3.mk" | |
27 | .include "../../mk/bsd.pkg.mk" | 29 | .include "../../mk/bsd.pkg.mk" |
@@ -1,7 +1,8 @@ | @@ -1,7 +1,8 @@ | |||
1 | $NetBSD: distinfo,v 1.1.1.1 2006/08/23 22:01:00 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.2 2008/08/17 06:45:48 dholland Exp $ | |
2 | 2 | |||
3 | SHA1 (lush-1.1.tar.gz) = 89d83c88d968f5216c59ce0d7a249e992f6aea41 | 3 | SHA1 (lush-1.1.tar.gz) = 89d83c88d968f5216c59ce0d7a249e992f6aea41 | |
4 | RMD160 (lush-1.1.tar.gz) = 3e32242a8a9391e4077144bbda10a013f4791d48 | 4 | RMD160 (lush-1.1.tar.gz) = 3e32242a8a9391e4077144bbda10a013f4791d48 | |
5 | Size (lush-1.1.tar.gz) = 4385751 bytes | 5 | Size (lush-1.1.tar.gz) = 4385751 bytes | |
6 | SHA1 (patch-aa) = 8e8f3bcbc1afd516931b0d14fce4560ad41bc1d3 | 6 | SHA1 (patch-aa) = 8e8f3bcbc1afd516931b0d14fce4560ad41bc1d3 | |
7 | SHA1 (patch-ab) = b5f0161cceaadd532f2d246e4da34b424a61d829 | 7 | SHA1 (patch-ab) = b5f0161cceaadd532f2d246e4da34b424a61d829 | |
8 | SHA1 (patch-ac) = 1b702c7728b2d7de1b20544fc757a6e0f9f52b8e |
$NetBSD: patch-ac,v 1.1 2008/08/17 06:45:48 dholland Exp $
--- lsh/libc/shell.lsh~ 2005-03-08 15:14:44.000000000 -0500
+++ lsh/libc/shell.lsh 2008-08-17 02:40:12.000000000 -0400
@@ -241,7 +241,18 @@
#? shell-home
;; user home directory
-(defvar shell-home (getenv "HOME"))
+(defvar shell-home nil)
+
+;; get-shell-home
+;; fetch user home directory
+;; (merely initializing shell-home gets the compile-time $HOME, which is wrong)
+;; If shell-home isn't set, set it from $HOME; otherwise return it.
+;; This is suboptimal because shell-home will be nil until (cd) is run,
+;; but it's better than having shell-home contain the pkgsrc dummy homedir.
+(de shell.get-shell-home ()
+ (if (not shell-home)
+ (setq shell-home (getenv "HOME"))
+ shell-home))
#? shell-dirstack
;; directory stack manipulated by pushd and popd
@@ -262,7 +273,7 @@
#? (cd [<d>])
;; change current directory to <d>, or to
;; user home if <p> is not present.
-(de cd (&optional p) (if p (chdir p) (chdir shell-home)))
+(de cd (&optional p) (if p (chdir p) (chdir (get-shell-home))))
#? (pushd <d>)
;; Temporarily change current directory to <d>.