mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-03 16:40:25 +00:00
72 lines
3.1 KiB
Bash
72 lines
3.1 KiB
Bash
#! /bin/bash
|
|
|
|
# SDL
|
|
# Source: http://www.libsdl.org/release/SDL-1.2.15.tar.gz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: NONE
|
|
# Recommended: NONE
|
|
# Optional: AAlib, ALSA, GLU, NASM, PulseAudio, Pth,
|
|
# Optional: X Window System, DirectFB, GGI, libcaca, PicoGUI, and SVGAlib
|
|
|
|
# If optimizing, use these flags with GCC
|
|
export CFLAGS="-march=native -pipe "
|
|
export CFLAGS+="-O3 -falign-functions=32 -ffat-lto-objects -flto=4 "
|
|
export CFLAGS+="-fno-math-errno -fno-semantic-interposition -fno-trapping-math "
|
|
export CFLAGS+="-fstack-protector-strong -fzero-call-used-regs=used "
|
|
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
|
|
|
|
patch -Np1 -i ../patches/sdl-alpine/SDL-1.2.10-GrabNotViewable.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/SDL-1.2.15-const_XData32.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0001-CVE-2019-7574.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0001-CVE-2019-7572.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0002-CVE-2019-7572.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0001-CVE-2019-7573.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0001-CVE-2019-7577.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0002-CVE-2019-7577.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0001-CVE-2019-7575.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0001-CVE-2019-7578.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0001-CVE-2019-7635.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0002-CVE-2019-7635.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0001-CVE-2019-7636.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0001-CVE-2019-7637.patch
|
|
patch -Np1 -i ../patches/sdl-alpine/0002-CVE-2019-7637.patch
|
|
|
|
cp -v ../files/config.sub-musl build-scripts/config.sub &&
|
|
cp -v ../files/config.guess-musl build-scripts/config.guess &&
|
|
|
|
./configure --prefix=/usr --disable-static \
|
|
--enable-alsa --disable-rpath $BUILDTRUPLE &&
|
|
read -p "Compile?" && make -j2 &&
|
|
|
|
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------------------------------------------------------|
|
|
SDL: SDL (Simple DirectMedia Layer library)
|
|
SDL:
|
|
SDL: This is the Simple DirectMedia Layer, a generic API that provides low
|
|
SDL: level access to audio, keyboard, mouse, joystick, 3D hardware via
|
|
SDL: OpenGL, and 2D framebuffer across multiple platforms.
|
|
SDL:
|
|
SDL: SDL links against alsa-lib, arts, audiofile, esound, and the X11
|
|
SDL: libraries. Make sure all of these are installed if you're planning to
|
|
SDL: use SDL (a full installation will cover all of the prerequisites).
|
|
SDL:
|
|
SDL:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/SDL-1.2.15-$(uname -m)-mlfs.txz &&
|
|
sudo -S rm -rf ${BUILD}/*
|