Date: Thu, 13 Oct 2005 23:16:23 GMT From: MOROHOSHI Akihiko <moro@remus.dti.ne.jp> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/87416: [PATCH] adapt lang/sbcl to PREFIX other than /usr/local Message-ID: <200510132316.j9DNGNf9043948@www.freebsd.org> Resent-Message-ID: <200510132320.j9DNKCDr086067@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 87416 >Category: ports >Synopsis: [PATCH] adapt lang/sbcl to PREFIX other than /usr/local >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 13 23:20:12 GMT 2005 >Closed-Date: >Last-Modified: >Originator: MOROHOSHI Akihiko >Release: 6.0 BETA5 >Organization: >Environment: FreeBSD foo.example.com 6.0-BETA5 FreeBSD 6.0-BETA5 #3: Sat Oct 1 14:46:05 JST 2005 moro@foo.example.com:/home/tmp/obj/home/releng6/src/sys/FOO i386 >Description: Installed sbcl command can not find its default core file if PREFIX != /usr/local. Documents should be fixed, too. >How-To-Repeat: # cd /usr/ports/lang/sbcl # make install PREFIX=/var/tmp/foo # /var/tmp/foo/bin/sbcl fatal error encountered in SBCL pid 26304: can't find core file >Fix: diff -urN sbcl.old/Makefile sbcl/Makefile --- sbcl.old/Makefile Sun Oct 9 03:21:18 2005 +++ sbcl/Makefile Thu Oct 13 13:52:01 2005 @@ -36,6 +36,17 @@ MAN1= sbcl.1 +USE_REINPLACE= yes +SRC2FIX= doc/manual/sbcl/Running-from-Emacs.html \ + doc/manual/sbcl/Unix_002dstyle-Command-Line-Protocol.html \ + doc/manual/sbcl/Additional-Distributed-Documentation.html \ + doc/manual/intro.texinfo \ + doc/manual/start-stop.texinfo \ + doc/sbcl.1 \ + src/runtime/runtime.c \ + src/runtime/ld-script.alpha-linux \ + install.sh + .include <bsd.port.pre.mk> .if ${OSVERSION} >= 502124 @@ -70,5 +81,12 @@ post-patch: ${FIND} ${WRKSRC} -name '*.orig' -delete + +pre-configure: +.for f in ${SRC2FIX} + ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ + -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/${f} + ${RM} ${WRKSRC}/${f}.bak +.endfor .include <bsd.port.post.mk> diff -urN sbcl.old/files/patch-prefix sbcl/files/patch-prefix --- sbcl.old/files/patch-prefix Thu Jan 1 09:00:00 1970 +++ sbcl/files/patch-prefix Thu Oct 13 13:51:50 2005 @@ -0,0 +1,117 @@ +--- doc/manual/sbcl/Running-from-Emacs.html.bak Tue Sep 27 15:57:22 2005 ++++ doc/manual/sbcl/Running-from-Emacs.html Thu Oct 13 05:12:46 2005 +@@ -48,7 +48,7 @@ + something like: + + <pre class="lisp"> ;;; The SBCL binary and command-line arguments +- (setq inferior-lisp-program "/usr/local/bin/sbcl --noinform") ++ (setq inferior-lisp-program "%%PREFIX%%/bin/sbcl --noinform") + </pre> + <p>For more information on using SBCL with Emacs, see <a href="Editor-Integration.html#Editor-Integration">Editor Integration</a>. + +--- doc/manual/sbcl/Unix_002dstyle-Command-Line-Protocol.html.bak Tue Sep 27 15:57:22 2005 ++++ doc/manual/sbcl/Unix_002dstyle-Command-Line-Protocol.html Thu Oct 13 05:12:46 2005 +@@ -70,7 +70,7 @@ + </pre> + <p>Example file (<span class="file">hello.lisp</span>): + +-<pre class="lisp"> #!/usr/local/bin/sbcl --noinform ++<pre class="lisp"> #!%%PREFIX%%/bin/sbcl --noinform + (write-line "Hello, World!") + </pre> + <p>Usage examples: +--- doc/manual/sbcl/Additional-Distributed-Documentation.html.bak Tue Sep 27 15:57:22 2005 ++++ doc/manual/sbcl/Additional-Distributed-Documentation.html Thu Oct 13 05:12:46 2005 +@@ -47,7 +47,7 @@ + <p>Besides this user manual both SBCL source and binary distributions + include some other SBCL-specific documentation files, which should be + installed along with this manual in on your system, eg. in +-<span class="file">/usr/local/share/doc/sbcl/</span>. ++<span class="file">%%PREFIX%%/share/doc/sbcl/</span>. + + <dl> + <dt><span class="file">BUGS</span><dd>Lists known bugs in the distribution. +--- doc/manual/intro.texinfo.bak Fri Aug 27 01:17:07 2004 ++++ doc/manual/intro.texinfo Thu Oct 13 05:12:46 2005 +@@ -328,7 +328,7 @@ + Besides this user manual both SBCL source and binary distributions + include some other SBCL-specific documentation files, which should be + installed along with this manual in on your system, eg. in +-@file{/usr/local/share/doc/sbcl/}. ++@file{%%PREFIX%%/share/doc/sbcl/}. + + @table @file + +--- doc/manual/start-stop.texinfo.bak Thu Mar 10 15:01:13 2005 ++++ doc/manual/start-stop.texinfo Thu Oct 13 05:12:46 2005 +@@ -55,7 +55,7 @@ + + @lisp + ;;; The SBCL binary and command-line arguments +-(setq inferior-lisp-program "/usr/local/bin/sbcl --noinform") ++(setq inferior-lisp-program "%%PREFIX%%/bin/sbcl --noinform") + @end lisp + + For more information on using SBCL with Emacs, see @ref{Editor +@@ -328,7 +328,7 @@ + Example file (@file{hello.lisp}): + + @lisp +-#!/usr/local/bin/sbcl --noinform ++#!%%PREFIX%%/bin/sbcl --noinform + (write-line "Hello, World!") + @end lisp + +--- doc/sbcl.1.bak Thu Sep 22 00:00:35 2005 ++++ doc/sbcl.1 Thu Oct 13 05:12:46 2005 +@@ -450,7 +450,7 @@ + This variable controls where files like "sbclrc", "sbcl.core", and the + add-on "contrib" systems are searched for. If it is not set, then + sbcl sets it from a compile-time default location which is usually +-/usr/local/lib/sbcl/ but may have been changed \fIe.g.\fR by a third-party ++%%PREFIX%%/lib/sbcl/ but may have been changed \fIe.g.\fR by a third-party + packager. + + .SH FILES +@@ -490,7 +490,7 @@ + should give you access to the complete manual. Depending on your + installation it may also be available in HTML and PDF formats in eg. + .IP +-.B /usr/local/share/doc/sbcl/ ++.B %%PREFIX%%/share/doc/sbcl/ + .PP + See the SBCL homepage + .IP +--- src/runtime/runtime.c.bak Thu Sep 22 00:01:15 2005 ++++ src/runtime/runtime.c Thu Oct 13 05:12:46 2005 +@@ -62,7 +62,7 @@ + #endif + + #ifndef SBCL_HOME +-#define SBCL_HOME "/usr/local/lib/sbcl/" ++#define SBCL_HOME "%%PREFIX%%/lib/sbcl/" + #endif + + +--- src/runtime/ld-script.alpha-linux.bak Wed May 9 09:02:01 2001 ++++ src/runtime/ld-script.alpha-linux Thu Oct 13 05:12:46 2005 +@@ -17,7 +17,7 @@ + "elf64-alpha") + OUTPUT_ARCH(alpha) + ENTRY(__start) +-SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/alpha-linux/lib); ++SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(%%LOCALBASE%%/lib); SEARCH_DIR(/usr/alpha-linux/lib); + /* Do we need any of these for elf? + __DYNAMIC = 0; */ + SECTIONS +--- install.sh.bak Thu Sep 22 00:00:33 2005 ++++ install.sh Thu Oct 13 05:12:46 2005 +@@ -10,7 +10,7 @@ + done; + } + +-INSTALL_ROOT=${INSTALL_ROOT-/usr/local} ++INSTALL_ROOT=${INSTALL_ROOT-%%PREFIX%%} + MAN_DIR=${MAN_DIR-$INSTALL_ROOT/share/man} + INFO_DIR=${INFO_DIR-$INSTALL_ROOT/share/info} + DOC_DIR=${DOC_DIR-$INSTALL_ROOT/share/doc/sbcl} >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510132316.j9DNGNf9043948>