Skip to content

Commit

Permalink
build: dump in bad scripts for building.
Browse files Browse the repository at this point in the history
These are garbage, it's true. Written for building on macOS and not
particularly robust.
  • Loading branch information
torque committed Mar 29, 2018
1 parent 7b2a10e commit 32437ae
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ AR := ar
WARNINGS := -Wall -Wunreachable-code -Wfloat-equal -Wredundant-decls -Winit-self -Wpedantic
OPTIMIZATION := -O3
ADDITIONAL := -std=c99
LIBS := -lass
CFLAGS := $(WARNINGS) $(OPTIMIZATION) $(DEFINES) $(ADDITIONAL)
DEPSDIR := deps/build/lib
LIBS := $(DEPSDIR)/libass.a $(DEPSDIR)/libharfbuzz.a $(DEPSDIR)/libfribidi.a $(DEPSDIR)/libfreetype.a -lz -lbz2 -liconv /usr/local/lib/libpng.a -framework CoreText -framework CoreFoundation
CFLAGS := $(WARNINGS) $(OPTIMIZATION) $(DEFINES) $(ADDITIONAL) -Ideps/build/include
LFLAGS := $(LIBS)
LIB_NAME := libSubInspector

Expand Down
37 changes: 37 additions & 0 deletions builddeps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env sh

cd "`git rev-parse --show-toplevel`"

PREFIX=`pwd`/deps/build
export CC=clang
export CXX=clang++
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig"

pushd deps/fribidi && \
./autogen.sh --enable-static --disable-shared --with-glib=no --prefix=$PREFIX && \
make && make install
popd

pushd deps/harfbuzz && \
./autogen.sh && \
LDFLAGS='-L/usr/local/opt/icu4c/lib' CFLAGS='-I/usr/local/opt/icu4c/include' PKG_CONFIG_PATH='/usr/local/opt/icu4c/lib/pkgconfig' ./configure --enable-static --disable-shared --without-glib --without-fontconfig --without-cairo --with-icu --without-graphite2 --without-uniscribe --prefix=$PREFIX && \
make && make install
popd

pushd deps/freetype2 && \
./autogen.sh && \
./configure --enable-static --disable-shared --prefix=$PREFIX && \
make && make install
popd

pushd deps/fontconfig && \
LIBTOOLIZE=glibtoolize ./autogen.sh --enable-static --disable-shared --prefix=$PREFIX && \
make && make install
popd

pushd deps/libass && \
git apply ../patches/0001-Don-t-use-approximation-in-rasterizer.patch && \
./autogen.sh && \
./configure --enable-static --disable-shared --disable-enca --disable-fontconfig --prefix=$PREFIX && \
make && make install
popd
18 changes: 18 additions & 0 deletions cleandeps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
cd `git rev-parse --show-toplevel`

pushd deps/fribidi
git clean -fdx
popd
pushd deps/harfbuzz
git clean -fdx
popd
pushd deps/freetype2
git clean -fdx
popd
pushd deps/fontconfig
git clean -fdx
popd
pushd deps/libass
git clean -fdx
popd

0 comments on commit 32437ae

Please sign in to comment.