diff options
Diffstat (limited to 'development/c_count/c_count.SlackBuild')
-rw-r--r-- | development/c_count/c_count.SlackBuild | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/development/c_count/c_count.SlackBuild b/development/c_count/c_count.SlackBuild index ac74c461bc..bf30d2ca83 100644 --- a/development/c_count/c_count.SlackBuild +++ b/development/c_count/c_count.SlackBuild @@ -6,22 +6,19 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20250206 bkw: update for v7.24, rename binary to c-count. # 20240807 bkw: update for v7.23. # sloccount conflict is because both packages install /usr/bin/c_count. # Upstream for c_count is aware of this but refuses to change (because # his package is older). No idea if sloccount upstream knows or cares # (it's been decades, so the problem isn't going to get solved). So -# install as C_count by default. Annnoyingly enough, there's no man -# page for sloccount's c_count, and our man command is case-insensitive -# by default, so "man c_count" will show the man page for C_count since -# there isn't one for sloccount c_count. Confusing. Hopefully whoever -# this happens to, figures it out pretty quick. +# install as c-count by default. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=c_count -VERSION=${VERSION:-7.23} +VERSION=${VERSION:-7.24} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -66,16 +63,16 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tgz cd $PRGNAM-$VERSION chown -R root:root . -find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ - \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + # Avoid sloccount conflict. --program-transform-name fixes the # filenames but not the file contents, hence the sed stuff. -if [ "${LOWERCASE:-no}" = "no" ]; then - PTN="--program-transform-name='s/^c/C/'" - sed -i '/"[^"]*c_count/s,c_count,C_count,g' $PRGNAM.c - sed -i 's,c_count,C_count,g' $PRGNAM.1 - BIN="C_count" +if [ "${COMPAT:-yes}" = "yes" ]; then + PTN="--program-transform-name='s/_/-/'" + sed -i '/"[^"]*c_count/s,c_count,c-count,g' $PRGNAM.c + sed -i 's,\([cC]\)_count,\1-count,g' $PRGNAM.1 + BIN="c-count" else BIN="c_count" fi |