Files
BMLFS/build-scripts/libxslt.build
2025-06-24 00:37:51 -05:00

78 lines
2.4 KiB
Bash

#! /bin/bash
# LibXSLT
# Source: https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.43.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: libxml2
# Recommended: docbook-xml and docbook-xsl
# Optional: libgcrypt and Python2 libxml2-2.9.10 module
# 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 CFLAGS+="-fstack-protector-strong -fzero-call-used-regs=used "
export LDFLAGS="-flto=auto -Wl,-O2 -Wl,--as-needed "
export PVER="1.1.43"
./configure --prefix=/usr --disable-static \
--docdir=/usr/share/doc/libxslt-$PVER \
PYTHON=/usr/bin/python3 $BUILDTRUPLE &&
read -p "Compile? " && make -j2 &&
read -p "Press Enter to install" &&
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/doc /BMAN/usr/share/
sudo -S mv $BUILD/usr/share/man /BMAN/usr/share/
read -p "Press Enter to create pakage description." &&
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------------------------------------------------------|
libxslt: libxslt (XSLT Libraries)
libxslt:
libxslt: The libxslt package contains XSLT libraries used for extending
libxslt: libxml2 libraries to support XSLT files.
libxslt:
libxslt: Homepage: http://xmlsoft.org
libxslt:
libxslt:
libxslt:
libxslt:
libxslt:
EOF
sudo mv /tmp/slack-desc install/ &&
read -p "Enter to build and install package" &&
sudo makepkg -l y -c n $PKGS/libxslt-$PVER-${PSUFFIX} &&
cd /BMAN
cat > /tmp/slack-desc << "EOF"
libxslt-doc: Manuals for libxslt (XSLT Libraries)
libxslt-doc:
libxslt-doc: The libxslt package contains XSLT libraries used for extending
libxslt-doc: libxml2 libraries to support XSLT files.
libxslt-doc:
libxslt-doc: Homepage: http://xmlsoft.org
libxslt-doc:
libxslt-doc:
EOF
sudo mv /tmp/slack-desc install/
sudo makepkg -l y -c n $PKGS/libxslt-doc-$PVER-${NOPSUFFIX}
sudo rm -rf /BMAN/*
sudo rm -rf $BUILD/*