Files
BMLFS/build-scripts/pcre.build
2022-03-29 11:23:42 -05:00

87 lines
2.8 KiB
Bash

#! /bin/bash
# PCRE 8.45
# Source: https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.bz2
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: NONE
# Optional: valgrind
# If optimizing with GCC
export CFLAGS="-march=native -pipe "
export CFLAGS+="-O3 -Ofast -falign-functions=32 -ffat-lto-objects "
export CFLAGS+="-flto=4 -fno-semantic-interposition -mprefer-vector-width=256 "
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed"
./configure --prefix=/usr \
--docdir=/usr/share/doc/pcre-8.45 \
--enable-unicode-properties \
--enable-pcre16 \
--enable-pcre32 \
--enable-pcregrep-libz \
--enable-pcregrep-libbz2 \
--enable-pcretest-libreadline \
--disable-static --enable-jit $BUILDTRUPLE &&
read -p "compile?" && make -j2 &&
read -p "Press Enter to 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
sudo -S mv $BUILD/usr/share /BMAN/usr/
read -p "Press Enter to create pakage description." &&
cd $BUILD && sudo -S 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------------------------------------------------------|
pcre: pcre (Perl Compatible Regular Expression Libraries)
pcre:
pcre: The PCRE library is a set of functions that implement regular
pcre: expression pattern matching using the same syntax and semantics as
pcre: Perl 5, with just a few differences (documented in the man page).
pcre:
pcre:
pcre:
pcre:
pcre:
pcre:
EOF
sudo -S mv /tmp/slack-desc install/ &&
read -p "Enter to build and install package" &&
sudo makepkg -l y -c n $PKGS/pcre-8.45-$(uname -m)-mlfs.txz &&
cd /BMAN
cat > /tmp/slack-desc << "EOF"
pcre-doc: Manuals for pcre (Perl Compatible Regular Expression Libraries)
pcre-doc:
pcre-doc: The PCRE library is a set of functions that implement regular
pcre-doc: expression pattern matching using the same syntax and semantics as
pcre-doc: Perl 5, with just a few differences (documented in the man page).
pcre-doc:
pcre-doc:
pcre-doc:
pcre-doc:
pcre-doc:
EOF
sudo -S mv /tmp/slack-desc install/
sudo makepkg -l y -c n $PKGS/pcre-doc-8.45-noarch-mlfs.txz
sudo rm -rf /BMAN/*
sudo rm -rf $BUILD/*