mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-20 14:31:47 +00:00
93 lines
3.3 KiB
Bash
93 lines
3.3 KiB
Bash
#! /bin/bash
|
|
|
|
# libidn2
|
|
# Source: https://ftp.gnu.org/gnu/libidn/libidn2-2.3.4.tar.gz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: libunistring
|
|
# Recommended: NONE
|
|
# Optional: git and GTK-Doc
|
|
# LTO: Tested with LLVM
|
|
|
|
|
|
# If optimizing, use these flags
|
|
export CFLAGS="-march=native -mtune=native -pipe "
|
|
export CFLAGS+="-O3 -ffat-lto-objects -flto=auto "
|
|
export CXXFLAGS=$CFLAGS
|
|
export LDFLAGS="-flto=auto -Wl,-O2 -Wl,--as-needed "
|
|
|
|
./configure --prefix=/usr --disable-static $BUILDTRUPLE &&
|
|
|
|
# If building with LLVM-17.x, fix a header
|
|
# https://gitlab.com/libidn/libidn2/-/issues/80
|
|
sed -i.bak 's/#define HAVE_SYMVER_ALIAS_SUPPORT 1//g' config.h
|
|
|
|
read -p "Compile?" && make -j2 &&
|
|
|
|
# Install
|
|
# if not using a package manager:
|
|
# make install
|
|
|
|
# if using pkgtools from Slackware, then:
|
|
sudo -S make DESTDIR=$BUILD install &&
|
|
|
|
sudo -S mkdir -pv /BMAN/install
|
|
sudo -S mkdir -pv /BMAN/usr/share
|
|
sudo -S mv $BUILD/usr/share/gtk-doc /BMAN/usr/share/
|
|
sudo -S mv $BUILD/usr/share/info /BMAN/usr/share/
|
|
sudo -S mv $BUILD/usr/share/man /BMAN/usr/share/
|
|
|
|
# Build package
|
|
cd $BUILD && sudo mkdir -v 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------------------------------------------------------|
|
|
libidn2: libidn (GNU Internationalized Domain Name library)
|
|
libidn2:
|
|
libidn2: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA
|
|
libidn2: specifications defined by the IETF Internationalized Domain Names
|
|
libidn2: (IDN) working group, used for internationalized domain names.
|
|
libidn2:
|
|
libidn2: This package designed for internationalized string handling
|
|
libidn2: based on standards from the Internet Engineering Task Force
|
|
libidn2: (IETF)'s IDN working group, designed for internationalized domain
|
|
libidn2: names
|
|
libidn2:
|
|
EOF
|
|
sudo mv /tmp/slack-desc install/ &&
|
|
|
|
read -p "Enter to build package" &&
|
|
sudo makepkg -l y -c n $PKGS/libidn2-2.3.4-$PSUFFIX &&
|
|
|
|
cd /BMAN
|
|
cat > /tmp/slack-desc << "EOF"
|
|
|-----handy-ruler------------------------------------------------------|
|
|
libidn2-doc: Manuals for libidn (GNU Internationalized Domain Name library)
|
|
libidn2-doc:
|
|
libidn2-doc: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA
|
|
libidn2-doc: specifications defined by the IETF Internationalized Domain Names
|
|
libidn2-doc: (IDN) working group, used for internationalized domain names.
|
|
libidn2-doc:
|
|
libidn2-doc: This package designed for internationalized string handling
|
|
libidn2-doc: based on standards from the Internet Engineering Task Force
|
|
libidn2-doc: (IETF)'s IDN working group, designed for internationalized domain
|
|
libidn2-doc: names
|
|
libidn2-doc:
|
|
EOF
|
|
sudo mv /tmp/slack-desc install/
|
|
|
|
sudo makepkg -l y -c n $PKGS/libidn2-doc-2.3.4-$NOPSUFFIX
|
|
|
|
sudo rm -rf /BMAN/*
|
|
sudo rm -rf $BUILD/*
|
|
|