Files
BMLFS/build-scripts/libunistring.build
2025-06-17 10:16:18 -05:00

88 lines
2.9 KiB
Bash

#! /bin/bash
# LibUnistring
# Source: https://ftp.gnu.org/gnu/libunistring/libunistring-1.3.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: NONE
# Optional: texlive(or install-tl-unx) (to rebuild the documentation)
# LTO: tested with LLVM
# If optimizing, use these flags
export CFLAGS="-march=native -mtune=native -pipe "
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 "
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
export PVER="1.3"
./configure --prefix=/usr \
--disable-static \
--docdir=/usr/share/doc/libunistring-$PVER $BUILDTRUPLE &&
read -p "Compile?" && make -j2 &&
read -p "Install?" &&
# If not using any package manager:
#sudo -S make install
sudo -S make DESTDIR=$BUILD install &&
sudo -S mkdir -pv /BMAN/install
sudo -S mkdir -pv /BMAN/usr
sudo -S mv ${BUILD}/usr/share /BMAN/usr/
sudo -S mkdir -v $BUILD/install && cd $BUILD &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
libunistring: libunistring (GNU Unicode string library)
libunistring:
libunistring: This library provides functions for manipulating Unicode strings and
libunistring: for manipulating C strings according to the Unicode standard.
libunistring:
libunistring: Homepage: http://www.gnu.org/s/libunistring
libunistring:
libunistring:
libunistring:
libunistring:
libunistring:
EOF
sudo -S mv /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/libunistring-$PVER-$PSUFFIX &&
cd /BMAN
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
libunistring-doc: Manuals for libunistring (GNU Unicode string library)
libunistring-doc:
libunistring-doc: This library provides functions for manipulating Unicode strings and
libunistring-doc: for manipulating C strings according to the Unicode standard.
libunistring-doc:
libunistring-doc: Homepage: http://www.gnu.org/s/libunistring
libunistring-doc:
libunistring-doc:
EOF
sudo -S mv /tmp/slack-desc install/
sudo -S makepkg -l y -c n $PKGS/libunistring-doc-$PVER-$NOPSUFFIX
sudo -S rm -rf /BMAN/*
sudo -S rm -rf ${BUILD}/*