瀏覽代碼

Add SDL version of allegro5 build as well in separate package.

master
Ray Burgemeestre 4 年之前
父節點
當前提交
c617c7cfc5
共有 1 個文件被更改,包括 33 次插入3 次删除
  1. +33
    -3
      allegro5/Makefile

+ 33
- 3
allegro5/Makefile 查看文件

@@ -1,23 +1,28 @@
SHELL:=/bin/bash

allegro5:
allegro5_:
git clone https://github.com/liballeg/allegro5.git
pushd allegro5 && git checkout 5.2.5.0
bash ../ubuntu1804.sh make impl
make package
bash ../ubuntu1804.sh make impl_sdl
make package_sdl

impl:
prep:
apt-get update
apt-get install -y freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \
libxcursor-dev libavfilter-dev \
libpng-dev libjpeg-dev libfreetype6-dev \
libxrandr-dev libxinerama-dev libxi-dev \
libgtk2.0-dev
libgtk2.0-dev libsdl2-dev
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40

impl:
make prep
# static build
pushd allegro5 && \
cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_static -DSHARED=off -DSTATIC=on -DWANT_FFMPEG=off -DWANT_TTF=on . && \
@@ -31,6 +36,19 @@ impl:
#sudo make install && \
#sudo cp -prv lib/pkgconfig/allegro* /usr/share/pkgconfig/

prep_sdl:
make prep
apt-get install -y libsdl2-dev

impl_sdl:
make prep_sdl
# static build
pushd allegro5 && \
cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_static -DALLEGRO_SDL=on -DSHARED=off -DSTATIC=on -DWANT_FFMPEG=off -DWANT_TTF=on . && \
make -j $$(nproc) && \
make install && \
cp -prv lib/pkgconfig/allegro* /usr/share/pkgconfig/

package:
rm -rf out
mkdir -p out/opt/cppse/build/allegro5/
@@ -44,9 +62,21 @@ package:
rm -rf allegro5_*_amd64.deb
docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -v 1.1 -s dir -t deb -n allegro5 --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "allegro5 - build dependency" --url "https://github.com/liballeg/allegro5.git" --deb-generate-changes -C /src/out

package_sdl:
rm -rf out
mkdir -p out/opt/cppse/build/allegro5sdl/
cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5sdl/
cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5sdl/include/allegro5/internal/aintern_bitmap.h
cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5sdl/include/allegro5/internal/
cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5sdl/include/allegro5/platform/
rm -rf allegro5sdl_*_amd64.deb
docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -v 1.1 -s dir -t deb -n allegro5sdl --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "allegro5 - SDL version - build dependency" --url "https://github.com/liballeg/allegro5.git" --deb-generate-changes -C /src/out

clean:
rm -rf allegro5
rm -rf out
rm -rf allegro5*.deb
rm -rf allegro5*.changes

shell:
FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash

Loading…
取消
儲存