diff options
author | B. Watson <yalhcru@gmail.com> | 2022-04-04 16:45:09 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2022-04-04 16:48:41 -0400 |
commit | 91a4f1126998691b82b9e37ba1ed21ff49f1e807 (patch) | |
tree | 976660b7ad49b4f5668c3dc8eb699bcd9619014d /system/blake2 | |
parent | eaa3ab3832cf03b3023bca75ee229c822b8e3d06 (diff) |
system/blake2: Strip binary, use SLKCFLAGS.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'system/blake2')
-rw-r--r-- | system/blake2/README | 4 | ||||
-rw-r--r-- | system/blake2/blake2.SlackBuild | 18 |
2 files changed, 15 insertions, 7 deletions
diff --git a/system/blake2/README b/system/blake2/README index 92db1e0cd4338..389d3c60bab6b 100644 --- a/system/blake2/README +++ b/system/blake2/README @@ -3,3 +3,7 @@ the SHA-3 finalist BLAKE. BLAKE2 offers the highest security, yet is fast as MD5 on 64-bit platforms and requires less RAM. This script builds the b2sum binary. + +Note: if you get 'illegal instruction' errors from b2sum at runtime, +this is due to upstream's use of -march=native optimization. Rebuild +the package with FORCE_SLACK_CFLAGS=yes to avoid this. diff --git a/system/blake2/blake2.SlackBuild b/system/blake2/blake2.SlackBuild index 21ae9b39cabd7..a586a1ed2a6b8 100644 --- a/system/blake2/blake2.SlackBuild +++ b/system/blake2/blake2.SlackBuild @@ -22,12 +22,16 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220301 bkw: Modified by SlackBuilds.org, BUILD=2: +# - use SLKCFLAGS. +# - install binary stripped. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=blake2 VERSION=${VERSION:-20160619} SRCNAM=BLAKE2 -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -39,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 @@ -51,6 +52,7 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +# 20220404 bkw: nothing here uses LIBDIRSUFFIX. if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" @@ -76,15 +78,17 @@ cd $SRCNAM-$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 {} \+ +[ "${FORCE_SLACK_CFLAGS:-no}" = "yes" ] && export CFLAGS="$SLKCFLAGS" cd b2sum make + mkdir -p $PKG/usr/bin -install -m 0755 b2sum $PKG/usr/bin/b2sum +install -s -m 0755 b2sum $PKG/usr/bin/b2sum cd .. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION |