aboutsummaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2015-05-09 02:10:09 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2015-05-09 02:10:09 +0000
commit48fc0d7bc6f08ac122d643372a6e8fab467e0255 (patch)
tree1370a571047cbcfe5d524ee1f9445ab60baa0c82 /shells
parent6a580cc34bfcb95ab817672a54a6527a0a8eca54 (diff)
downloadports-48fc0d7bc6f08ac122d643372a6e8fab467e0255.tar.gz
ports-48fc0d7bc6f08ac122d643372a6e8fab467e0255.zip
Notes
Diffstat (limited to 'shells')
-rw-r--r--shells/shell-include/Makefile13
-rw-r--r--shells/shell-include/files/patch-install105
2 files changed, 114 insertions, 4 deletions
diff --git a/shells/shell-include/Makefile b/shells/shell-include/Makefile
index b460c48bbed1..b6ac396df85a 100644
--- a/shells/shell-include/Makefile
+++ b/shells/shell-include/Makefile
@@ -3,6 +3,7 @@
PORTNAME= shell-include
PORTVERSION= 0.1.2
+PORTREVISION= 1
CATEGORIES= shells devel
MASTER_SITES= http://vvelox.net/src/shell-include/
@@ -11,12 +12,16 @@ COMMENT= Include system for shell scripts
USES= perl5
-WRKSRC= ${WRKDIR}/${DISTNAME}
-
-USES= tar:tgz
+USES= perl5 tar:tgz
+USE_PERL5= build
NO_BUILD= yes
+post-patch:
+ @${REINPLACE_CMD} -e 's|/usr/local/bin/pod2man|${LOCALBASE}/bin/pod2man|' \
+ ${WRKSRC}/install
+
do-install:
- cd ${WRKSRC}/ ; ${SH} ${WRKSRC}/install ${STAGEDIR}${PREFIX}
+ cd ${WRKSRC}/ ; ${SETENV} DESTDIR=${STAGEDIR} \
+ ${SH} ${WRKSRC}/install ${PREFIX}
.include <bsd.port.mk>
diff --git a/shells/shell-include/files/patch-install b/shells/shell-include/files/patch-install
new file mode 100644
index 000000000000..bece2ab9d0e7
--- /dev/null
+++ b/shells/shell-include/files/patch-install
@@ -0,0 +1,105 @@
+--- install.orig 2009-11-08 21:53:11 UTC
++++ install
+@@ -36,12 +36,12 @@ manInstall(){
+ #$3 = VERSION
+
+ #makes the man dir if it does not exist
+- if /bin/[ ! -d "$1/man" ]; then
+- /bin/mkdir "$1/man"
+- /bin/chmod 755 "$1/man"
++ if /bin/[ ! -d "${DESTDIR}$1/man" ]; then
++ /bin/mkdir "${DESTDIR}$1/man"
++ /bin/chmod 755 "${DESTDIR}$1/man"
+ fi
+
+- manInstallTMPfile=/tmp/`shortRandom``shortRandom``shortRandom`$$`shortRandom`
++ manInstallTMPfile=_tmpfile
+ /usr/bin/touch $manInstallTMPfile
+ /bin/chmod go-rwx $manInstallTMPfile
+
+@@ -72,9 +72,9 @@ manInstall(){
+
+
+ #makes the man section dir if it does not exist
+- if /bin/[ ! -d $1/man/man$manInstallMANsection ]; then
+- /bin/mkdir "$1/man/man$manInstallMANsection"
+- /bin/chmod 755 "$1/man/man$manInstallMANsection"
++ if /bin/[ ! -d ${DESTDIR}$1/man/man$manInstallMANsection ]; then
++ /bin/mkdir "${DESTDIR}$1/man/man$manInstallMANsection"
++ /bin/chmod 755 "${DESTDIR}$1/man/man$manInstallMANsection"
+ fi
+
+ #echo $line
+@@ -82,7 +82,7 @@ manInstall(){
+ #echo $MANsection
+ #echo $MANcenter
+
+- manInstallMANfile=`echo $1/man/man$manInstallMANsection/$manInstallMANname.$manInstallMANsection.gz | sed 's/\/\//\//g'`
++ manInstallMANfile=`echo ${DESTDIR}$1/man/man$manInstallMANsection/$manInstallMANname.$manInstallMANsection.gz | sed 's/\/\//\//g'`
+
+ /usr/local/bin/pod2man --section="$manInstallMANsection" --release="$3" --name="$manInstallMANname" --center="$manInstallMANcenter" "$manInstallLine" | /usr/bin/gzip > "$manInstallMANfile"
+
+@@ -97,17 +97,17 @@ manInstall(){
+ binInstall(){
+ #$1 = prefix
+
+- if /bin/[ ! -d "$1/bin" ]; then
+- /bin/mkdir "$1/bin"
+- if /bin/[ ! -d $1/bin ]; then
+- echo "$1/bin does not a dir or does not exist and could not be created"
++ if /bin/[ ! -d "${DESTDIR}$1/bin" ]; then
++ /bin/mkdir "${DESTDIR}$1/bin"
++ if /bin/[ ! -d ${DESTDIR}$1/bin ]; then
++ echo "${DESTDIR}$1/bin does not a dir or does not exist and could not be created"
+ exit 1;
+ fi
+- /bin/chmod u+rwx "$1/bin"
++ /bin/chmod u+rwx "${DESTDIR}$1/bin"
+
+ fi
+
+- binInstallTMPfile=/tmp/`shortRandom``shortRandom``shortRandom`$$`shortRandom`
++ binInstallTMPfile=_tmpfile
+ /usr/bin/touch $binInstallTMPfile
+ /bin/chmod go-rwx $binInstallTMPfile
+
+@@ -119,9 +119,9 @@ binInstall(){
+ while /bin/[ $binInstallCL -le $binInstallNOL ]; do
+ binInstallLine=`getline $binInstallTMPfile $binInstallCL`
+
+- /bin/cat "./bin/$binInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "$1/bin/$binInstallLine"
++ /bin/cat "./bin/$binInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "${DESTDIR}$1/bin/$binInstallLine"
+
+- /bin/chmod 755 "$1/bin/$binInstallLine"
++ /bin/chmod 755 "${DESTDIR}$1/bin/$binInstallLine"
+
+ binInstallCL=`/bin/expr $binInstallCL + 1`
+ done
+@@ -132,7 +132,7 @@ binInstall(){
+ includeInstall(){
+ #$1 = prefix
+
+- includeInstallTMPfile=/tmp/`shortRandom``shortRandom``shortRandom`$$`shortRandom`
++ includeInstallTMPfile=_tmpfile
+ /usr/bin/touch $includeInstallTMPfile
+ /bin/chmod go-rwx $includeInstallTMPfile
+
+@@ -145,13 +145,13 @@ includeInstall(){
+ includeInstallLine=`getline $includeInstallTMPfile $includeInstallCL`
+
+ if /bin/[ -d $includeInstallLine ]; then
+- if /bin/[ ! -d "$1/$includeInstallLine" ]; then
+- mkdir "$1/$includeInstallLine"
+- chmod 755 "$1/$includeInstallLine"
++ if /bin/[ ! -d "${DESTDIR}$1/$includeInstallLine" ]; then
++ mkdir "${DESTDIR}$1/$includeInstallLine"
++ chmod 755 "${DESTDIR}$1/$includeInstallLine"
+ fi
+ else
+- cat "$includeInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "$1/$includeInstallLine"
+- /bin/chmod 644 "$1/$includeInstallLine"
++ cat "$includeInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "${DESTDIR}$1/$includeInstallLine"
++ /bin/chmod 644 "${DESTDIR}$1/$includeInstallLine"
+ fi
+
+ includeInstallCL=`/bin/expr $includeInstallCL + 1`