From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Oct 13 23:20:14 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 657CF16A420 for ; Thu, 13 Oct 2005 23:20:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C557243D53 for ; Thu, 13 Oct 2005 23:20:12 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j9DNKCfT086068 for ; Thu, 13 Oct 2005 23:20:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j9DNKCDr086067; Thu, 13 Oct 2005 23:20:12 GMT (envelope-from gnats) Resent-Date: Thu, 13 Oct 2005 23:20:12 GMT Resent-Message-Id: <200510132320.j9DNKCDr086067@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, MOROHOSHI Akihiko Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7420716A41F for ; Thu, 13 Oct 2005 23:16:24 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F24143D48 for ; Thu, 13 Oct 2005 23:16:24 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j9DNGNYn043950 for ; Thu, 13 Oct 2005 23:16:23 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j9DNGNf9043948; Thu, 13 Oct 2005 23:16:23 GMT (envelope-from nobody) Message-Id: <200510132316.j9DNGNf9043948@www.freebsd.org> Date: Thu, 13 Oct 2005 23:16:23 GMT From: MOROHOSHI Akihiko To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ports/87416: [PATCH] adapt lang/sbcl to PREFIX other than /usr/local X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2005 23:20:14 -0000 >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 .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 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: + +
     ;;; The SBCL binary and command-line arguments
+-     (setq inferior-lisp-program "/usr/local/bin/sbcl --noinform")
++     (setq inferior-lisp-program "%%PREFIX%%/bin/sbcl --noinform")
+ 
+

For more information on using SBCL with Emacs, see Editor Integration. + +--- 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 @@ + +

Example file (hello.lisp): + +-

     #!/usr/local/bin/sbcl --noinform
++
     #!%%PREFIX%%/bin/sbcl --noinform
+      (write-line "Hello, World!")
+ 
+

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 @@ +

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 +-/usr/local/share/doc/sbcl/. ++%%PREFIX%%/share/doc/sbcl/. + +

+
BUGS
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: