1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

french/alphabet_sounds_fr: Fix and support stage

The PR was written because the port started to fail in jail where $HOME
is read-only.  It turns out that it is not the port's fault, but rather
that of the (former) build dependency, childsplay.

The only reason it was a build dependency was to check if it's version
is at least 0.71.  Childsplay is currently at version 2.5, so there's
no reason to check the version.  The fix was to remove the check and
childsplay as a build dependency.

Stage support was also added, so there's not much left of the original
install.sh.

PR:		ports/185202
Approved by:	maintainer timeout
This commit is contained in:
John Marino 2014-01-15 20:41:24 +00:00
parent c8ca559dfc
commit 27ff2ebec7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=339815
3 changed files with 52 additions and 17 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= alphabet_sounds_fr
PORTVERSION= 0.3
PORTREVISION= 11
PORTREVISION= 12
CATEGORIES= french games
MASTER_SITES= SF/childsplay/OldFiles
DISTNAME= alphabet_sounds_fr
@ -11,13 +11,8 @@ DISTNAME= alphabet_sounds_fr
MAINTAINER= bruno@tinkerbox.org
COMMENT= Educative games for children. Alphabet sounds package (french)
BUILD_DEPENDS= ${LOCALBASE}/bin/childsplay:${PORTSDIR}/games/childsplay
RUN_DEPENDS:= ${BUILD_DEPENDS}
RUN_DEPENDS= ${LOCALBASE}/bin/childsplay:${PORTSDIR}/games/childsplay
USE_PYTHON= yes
NO_STAGE= yes
post-patch:
@${REINPLACE_CMD} -e "s@PREFIX=/usr/local@PREFIX=${PREFIX}@g " ${WRKSRC}/install.sh
.include <bsd.port.mk>

View File

@ -1,16 +1,50 @@
--- install.sh.orig Sun Mar 20 06:29:18 2005
+++ install.sh Mon May 30 20:58:56 2005
@@ -1,5 +1,5 @@
--- install.sh.orig 2005-03-20 14:29:18.000000000 +0000
+++ install.sh
@@ -1,8 +1,7 @@
-#!/bin/bash
+#!/bin/sh
# install plugin in the standard childsplay path
PREFIX=/usr/local
DESTDIR=$PREFIX/share/childsplay
@@ -34,24 +34,8 @@
echo "exit"
exit 1
fi
-PREFIX=/usr/local
-DESTDIR=$PREFIX/share/childsplay
+INSTDIR=${DESTDIR}${PREFIX}/share/childsplay
###########################################################
# DO NOT EDIT BEHIND THIS POINT
@@ -13,47 +12,21 @@ DESTDIR=$PREFIX/share/childsplay
DEPEN=0.71
set -e
-CWD=`pwd`
-USERID=`id | sed -e 's/).*//; s/^.*(//;'`
-if [ "$USERID" != "root" ]; then
- echo " You must be root to install the plugins"
- echo " exit"
- exit 1
-fi
-
-echo -e "\n>>>>>>>>>>> Install childsplay plugins >>>>>>>>>>>>>>>>>>>>"
-echo -e "\n This release depends on childsplay version $DEPEN"
-echo -n " Cheking version = "
-VERSION=$(childsplay --version)
-echo $VERSION
-
-if [ `expr $VERSION \< $DEPEN` -eq 1 ];then
- echo " Childsplay version incorrect, please upgrade to at least"
- echo " version $DEPEN"
- echo "exit"
- exit 1
-fi
+# We can't run childsplay because it tries to write to $HOME/.schoolsplay.rc
+# Which is not permitted in strict build environements. It is not necessary
+# anyway beecause the version is much higher than 0.71 already!
+
+#echo -e "\n>>>>>>>>>>> Install childsplay plugins >>>>>>>>>>>>>>>>>>>>"
+#echo -e "\n This release depends on childsplay version $DEPEN"
+#echo -n " Cheking version = "
+#VERSION=$(childsplay --version)
+#echo $VERSION
-echo -e "\n The path to install the soundfiles in is "
-echo " $DESTDIR."
@ -31,4 +65,8 @@
echo " Installing in $DESTDIR/Data/AlphabetSounds"
echo " Copy sound files"
cp -rf $CWD/AlphabetSounds $DESTDIR/Data/
-cp -rf $CWD/AlphabetSounds $DESTDIR/Data/
+mkdir -p ${INSTDIR}/Data
+cp -rf AlphabetSounds ${INSTDIR}/Data/
echo -e "\n Everything installed, enjoy\n"

View File

@ -37,3 +37,5 @@ share/childsplay/Data/AlphabetSounds/fr/z.ogg
share/childsplay/Data/AlphabetSounds/fr/10.ogg
@dirrm share/childsplay/Data/AlphabetSounds/fr
@dirrmtry share/childsplay/Data/AlphabetSounds
@dirrmtry share/childsplay/Data
@dirrmtry share/childsplay