Files
BMLFS/build-scripts/icu4c.build
2025-06-17 16:29:18 -05:00

91 lines
2.8 KiB
Bash

#! /bin/bash
# ICU
# Source: https://github.com/unicode-org/icu/releases/download/release-77-1/icu4c-77_1-src.tgz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: NONE
# Optional: LLVM, Doxygen(for documentation)
# LTO: Tested with LLVM
# If optimizing, optimize with GCC
export CFLAGS="-march=native -mtune=native -pipe "
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 "
export CFLAGS+="-fstack-protector-strong -fzero-call-used-regs=used "
export CXXFLAGS=$CFLAGS
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
export CC=gcc CXX=g++
export PVER="77.1"
cd source &&
./configure --prefix=/usr $BUILDTRUPLE &&
read -p "Compile?" && make -j2 &&
read -p "Install?" &&
# If using pkgtools:
sudo -S make DESTDIR=$BUILD install &&
cd $BUILD && sudo -S mkdir install &&
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------------------------------------------------------|
icu: icu (International Components for Unicode)
icu:
icu: The International Components for Unicode (ICU) libraries provide
icu: robust and full-featured Unicode services on a wide variety of
icu: platforms.
icu:
icu: Homepage: http://www.icu-project.org/
icu:
icu:
icu:
icu:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo mkdir -pv /BMAN/install
sudo mkdir -pv /BMAN/usr/share
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------------------------------------------------------|
icu-doc: Manuals for icu (International Components for Unicode)
icu-doc:
icu-doc: The International Components for Unicode (ICU) libraries provide
icu-doc: robust and full-featured Unicode services on a wide variety of
icu-doc: platforms.
icu-doc:
icu-doc: Homepage: http://www.icu-project.org/
icu-doc:
EOF
sudo -S mv -v /tmp/slack-desc /BMAN/install/
sudo mv usr/share/man /BMAN/usr/share/
sudo -S makepkg -l y -c n $PKGS/icu-$PVER-${PSUFFIX} &&
cd /BMAN
sudo -S makepkg -l y -c n $PKGS/icu-doc-$PVER-${NOPSUFFIX}
sudo -S rm -rf $BUILD/*
sudo -S rm -rf /BMAN
unset PVER
# If not using nay package manager:
#sudo -S make install