Files
BMLFS/build-scripts/gc.build
2022-05-14 21:19:35 -05:00

45 lines
1.4 KiB
Bash

#! /bin/bash
# gc
# Source: https://github.com/ivmai/bdwgc/releases/download/v8.2.0/gc-8.2.0.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: NONE
# Optional: NONE
cp -vf ../files/config.sub-musl config.sub && \
cp -vf ../files/config.guess-musl config.guess && \
export CFLAGS="$CFLAGS -D_GNU_SOURCE -DNO_GETCONTEXT -DUSE_MMAP -DHAVE_DL_ITERATE_PHDR" && \
./configure --prefix=/usr --datadir=/usr/share/doc/gc --enable-static --enable-cplusplus $BT
read -p "Compile?" && make -j2 &&
unset CFLAGS
sudo -S make DESTDIR=$BUILD install &&
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------------------------------------------------------|
gc: gc
gc:
gc: garbage collector for C and C++
gc:
gc: https://hboehm.info/gc/
gc:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/gc-8.2.0-$(uname -m)-mlfs.txz &&
sudo -S rm -rf ${BUILD}/*