aboutsummaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-03-08 04:58:13 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-03-09 17:20:43 +0700
commitd7b118b294f6eb27ba2e4689506cb26cc2230d7c (patch)
treeeb3195b57c555920b6fb772add6dd69fa2411474 /development
parentcc304f87e3dccbb5021d4fdb98c296f50d507d1b (diff)
development/ragel: Check for installed copy first.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/ragel/ragel.SlackBuild35
1 files changed, 22 insertions, 13 deletions
diff --git a/development/ragel/ragel.SlackBuild b/development/ragel/ragel.SlackBuild
index 4ee92d93e6a21..b3eb898ea1ec1 100644
--- a/development/ragel/ragel.SlackBuild
+++ b/development/ragel/ragel.SlackBuild
@@ -22,6 +22,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220308 bkw: Modified by SlackBuilds.org:
+# This build always fails if ragel is already installed. Add a check
+# to make it fail quickly, with a useful error message (instead of a
+# confusing link error, after compiling for several minutes).
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=ragel
@@ -38,9 +43,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -68,19 +70,31 @@ DOCS="AUTHORS COPYING README TODO"
set -e
+if [ -x /usr/bin/ragel ]; then
+ cat <<EOF
+****************************************************************
+This build would fail, because you already have ragel installed.
+Do this first:
+ removepkg ragel
+...then run this script again. Sorry.
+****************************************************************
+EOF
+ exit 1
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -95,13 +109,8 @@ CXXFLAGS="$SLKCFLAGS" \
--build=$ARCH-slackware-linux
make
-make install DESTDIR=$PKG
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+make install-strip DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man*/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION