ports/142812: [PATCH] math/mprime: Use SUB_FILES to update files
Sevan Janiyan
venture37 at geeklan.co.uk
Thu Jan 14 04:20:03 UTC 2010
>Number: 142812
>Category: ports
>Synopsis: [PATCH] math/mprime: Use SUB_FILES to update files
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 14 04:20:02 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Sevan Janiyan
>Release: FreeBSD 8.0-RELEASE-p2 amd64
>Organization:
>Environment:
System: FreeBSD newbie.thingamajig-systems.co.uk 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan 5 21:11:58 UTC
>Description:
No need to invoke sed manually.
Added file(s):
- files/pkg-message.in
- files/wrapper.sh.in
Removed file(s):
- pkg-message
- files/wrapper.sh
Port maintainer (nivit at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- mprime-0.0.24.14.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/math/mprime/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- Makefile 1 Apr 2007 07:33:25 -0000 1.11
+++ Makefile 14 Jan 2010 04:09:49 -0000
@@ -18,15 +18,11 @@
NO_BUILD= yes
NO_WRKSUBDIR= yes
+SUB_FILES= pkg-message wrapper.sh
+
# source code version
SOURCE_VERSION= 24.14
-post-patch:
-# prepare wrapper
- @${SED} \
- -e 's|%%PREFIX%%|${PREFIX}|' ${FILESDIR}/wrapper.sh > \
- ${WRKDIR}/wrapper.sh
-
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/mprime ${PREFIX}/bin/mprime-real
@${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/mprime
@@ -36,6 +32,8 @@
.endif
post-install:
- @${SED} -e 's|/usr/local/|${PREFIX}/|' ${PKGMESSAGE}
+.if !defined(NOPORTDOCS)
+ @${CAT} ${PKGMESSAGE}
+.endif
.include <bsd.port.mk>
Index: pkg-message
===================================================================
RCS file: pkg-message
diff -N pkg-message
--- pkg-message 29 Apr 2003 12:23:05 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
- ATTENTIONATTENTION:
-
-Please, make sure that you read
-/usr/local/share/doc/mprime/license.txt
-and agree to the licensing terms before running this application.
-
-Furthermore, read
-/usr/local/share/doc/mprime/readme.txt
-It contains important information about both configuring and running
-mprime. You will have problems running it if you do not read it.
Index: files/pkg-message.in
===================================================================
RCS file: files/pkg-message.in
diff -N files/pkg-message.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/pkg-message.in 14 Jan 2010 04:09:49 -0000
@@ -0,0 +1,10 @@
+ ATTENTIONATTENTION:
+
+Please, make sure that you read
+%%DOCSDIR%%/license.txt
+and agree to the licensing terms before running this application.
+
+Furthermore, read
+%%DOCSDIR%%/readme.txt
+It contains important information about both configuring and running
+mprime. You will have problems running it if you do not read it.
Index: files/wrapper.sh
===================================================================
RCS file: files/wrapper.sh
diff -N files/wrapper.sh
--- files/wrapper.sh 29 Apr 2003 12:23:05 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-PREFIX="%%PREFIX%%"
-PROGRAM="${0}"
-DIRNAME=${HOME}/.mprime
-
-if [ ! -d ${DIRNAME} ]
-then
- mkdir -p ${DIRNAME}
-fi
-
-if [ ! -h ${DIRNAME}/${PROGRAM##*/} ]
-then
- ln -sf ${PREFIX}/bin/${PROGRAM##*/}-real ${DIRNAME}/${PROGRAM##*/}
-fi
-
-echo " ${*} " | grep " \-createdironly " ||
-{
- cd ${DIRNAME} &&
- echo Running under ${DIRNAME} &&
- exec ./${PROGRAM##*/} "${@}" ||
- echo PROBLEM. Cannot create directory ${DIRNAME}, make sure you have the proper permissions to create it and try again
-}
Index: files/wrapper.sh.in
===================================================================
RCS file: files/wrapper.sh.in
diff -N files/wrapper.sh.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/wrapper.sh.in 14 Jan 2010 04:09:49 -0000
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+PREFIX="%%PREFIX%%"
+PROGRAM="${0}"
+DIRNAME=${HOME}/.mprime
+
+if [ ! -d ${DIRNAME} ]
+then
+ mkdir -p ${DIRNAME}
+fi
+
+if [ ! -h ${DIRNAME}/${PROGRAM##*/} ]
+then
+ ln -sf ${PREFIX}/bin/${PROGRAM##*/}-real ${DIRNAME}/${PROGRAM##*/}
+fi
+
+echo " ${*} " | grep " \-createdironly " ||
+{
+ cd ${DIRNAME} &&
+ echo Running under ${DIRNAME} &&
+ exec ./${PROGRAM##*/} "${@}" ||
+ echo PROBLEM. Cannot create directory ${DIRNAME}, make sure you have the proper permissions to create it and try again
+}
--- mprime-0.0.24.14.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list