Files
BMLFS/build-scripts/libxcb.build
2024-06-01 13:37:13 -05:00

74 lines
2.7 KiB
Bash

#! /bin/bash
# libxcb
# Source: https://xorg.freedesktop.org/archive/individual/lib/libxcb-1.17.0.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: libXau and xcb-proto
# Recommended: libXdmcp
# Optional: Doxygen(to generate API documentation) and libxslt
# If optimizing, use these flags with GCC
export CFLAGS="-march=native -pipe "
export CFLAGS+="-O3 -Os -fdata-sections -ffat-lto-objects -ffunction-sections "
export CFLAGS+="-flto=4 -fno-semantic-interposition "
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
PYTHON=python3 \
./configure $XORG_CONFIG $BUILDTRUPLE \
--without-doxygen \
--enable-xinput --enable-xkb \
--docdir='${datadir}'/doc/libxcb-1.17 &&
read -p "Compile?" && make -j2 &&
sudo -S make DESTDIR=$BUILD install &&
# if primarily using X11:
sudo -S mkdir -pv /BMAN/install /BMAN/usr && \
sudo -S mv $BUILD/usr/share /BMAN/usr/ && \
# if X11 as auxillary:
sudo -S mkdir -pv /BMAN/install /BMAN/${XORG_PREFIX} && \
sudo -S mv $BUILD/${XORG_PREFIX}/share /BMAN/${XORG_PREFIX}/ && \
cd $BUILD && sudo -S mkdir -v ${BUILD}/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 ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
libxcb: libxcb (XCB Libraries)
libxcb:
libxcb: The libxcb package provides an interface to the X Window System
libxcb: protocol, which replaces the current Xlib interface. Xlib can also
libxcb: use XCB as a transport layer, allowing software to make requests
libxcb: and receive responses with both.
libxcb:
libxcb: Homepage: https://xcb.freedesktop.org
libxcb:
libxcb:
libxcb:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/libxcb-1.17-$PSUFFIX && \
cd /BMAN && \
cat > /tmp/slack-desc << "EOF"
libxcb-doc: Manuals for libxcb (XCB Libraries)
libxcb-doc:
libxcb-doc: An interface to the X Window System protocol, which replaces the
libxcb-doc: Xlib interface. Xlib can also use XCB as a transport layer,
libxcb-doc: allowing software to make requests and receive responses with
libxcb-doc: both.
libxcb-doc:
libxcb-doc: https://xcb.freedesktop.org
libxcb-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ && \
sudo -S makepkg -l y -c n $PKGS/libxcb-doc-1.17-$NOPSUFFIX && \
sudo -S rm -rf ${BUILD}/* /BMAN/*