Skip to content

Commit

Permalink
lib build script: use lowercase for non-environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Aug 30, 2019
1 parent 3f4fb10 commit 4fd6ebb
Show file tree
Hide file tree
Showing 69 changed files with 837 additions and 825 deletions.
14 changes: 7 additions & 7 deletions libraries/CONFIG/SDL2
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Optional depends:
# pkg-config, jack, pulseaudio, libsamplerate, libudev, pthreads, alsa, esd, fusionsound, rpi directfb, libdrm, libusb, IBUS, FCITX

DEPENDS=(pkg-config)
depends=(pkg-config)

VER="2.0.10"
DNAME="${NAME}-${VER}"
FNAME="${DNAME}.tar.gz"
SOURCE="https://libsdl.org/release/${FNAME}"
ver="2.0.10"
dname="${name}-${ver}"
fname="${dname}.tar.gz"
src="https://libsdl.org/release/${fname}"

if ${OS_WIN}; then
LIBTYPE_OPTS=(
if ${os_win}; then
libtype_opts=(
--enable-shared=yes
--enable-static=no
)
Expand Down
28 changes: 14 additions & 14 deletions libraries/CONFIG/SDL2_mixer
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@
# Optional depends:
# libogg, libvorbis, libflac, mpg123, fluidsynth, modplug, mikmod, timidity, mp3mad, libopusfile (libopus)

DEPENDS=(SDL2 libvorbis libflac libmpg123)
depends=(SDL2 libvorbis libflac libmpg123)

VER="2.0.4"
DNAME="${NAME}-${VER}"
if ${OS_WIN}; then
FNAME="${DNAME}.zip"
ver="2.0.4"
dname="${name}-${ver}"
if ${os_win}; then
fname="${dname}.zip"
else
FNAME="${DNAME}.tar.gz"
fname="${dname}.tar.gz"
fi
SOURCE="https://www.libsdl.org/projects/SDL_mixer/release/${FNAME}"
src="https://www.libsdl.org/projects/SDL_mixer/release/${fname}"

CONFIG_OPTS=(
config_opts=(
--disable-music-mod
--disable-music-midi
--disable-music-opus
--disable-music-ogg-shared
--disable-music-flac-shared
--disable-music-mp3-mpg123-shared
--with-sdl-prefix="${INSTALL_PREFIX}"
--with-sdl-exec-prefix="${INSTALL_PREFIX}"
--with-sdl-prefix="${install_prefix}"
--with-sdl-exec-prefix="${install_prefix}"
)

if ${OS_WIN}; then
if ${os_win}; then
# mpg123 needs to link to libshlwapi on Windows
#CONFIG_OPTS+=(
# LIBS="-lshlwapi"
#config_opts+=(
# libs="-lshlwapi"
# EXTRA_LDFLAGS="-lshlwapi"
#)

LIBTYPE_OPTS=(
libtype_opts=(
--enable-shared=yes
--enable-static=no
)
Expand Down
17 changes: 9 additions & 8 deletions libraries/CONFIG/bzip2
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
VER="1.0.8"
DNAME="${NAME}-${VER}"
FNAME="${DNAME}.tar.gz"
SOURCE="https://sourceware.org/pub/bzip2/${FNAME}"

if ${STATIC}; then
LIBTYPE_OPTS=(--enable-shared=no)
ver="1.0.8"
dname="${name}-${ver}"
fname="${dname}.tar.gz"
src="https://sourceware.org/pub/bzip2/${fname}"

if ${static}; then
libtype_opts=(--enable-shared=no)
else
LIBTYPE_OPTS=(--enable-shared=yes)
libtype_opts=(--enable-shared=yes)

post_install() {
rm -vf "${INSTALL_PREFIX}/lib/libbz2.a"
rm -vf "${install_prefix}/lib/libbz2.a"
}
fi

Expand Down
17 changes: 8 additions & 9 deletions libraries/CONFIG/cairo
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@

# Depends on:
# libpng, freetype, librsvg, pixman, glib, gcc-libs (libgcc), zlib
# Optional depends:
# xcb, xlib (X11), CoreGraphics, ghostscript, fontconfig, poppler, libspectre, pthreads-w32 | winpthreads
# gtk-doc, valgrind, qt, gobject

DEPENDS=(freetype pixman)
if ${OS_WIN}; then
DEPENDS+=(winpthreads)
depends=(freetype pixman)
if ${os_win}; then
depends+=(winpthreads)
fi

VER="1.16.0"
DNAME="${NAME}-${VER}"
FNAME="${DNAME}.tar.xz"
SOURCE="https://www.cairographics.org/releases/${FNAME}"
ver="1.16.0"
dname="${name}-${ver}"
fname="${dname}.tar.xz"
src="https://www.cairographics.org/releases/${fname}"

CONFIG_OPTS=(
config_opts=(
--disable-full-testing
--disable-valgrind
--disable-gobject
Expand Down
8 changes: 4 additions & 4 deletions libraries/CONFIG/cairo-reb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# FIXME: not recognizing librsvg

NAME="cairo"
. "CONFIG/${NAME}"
name="cairo"
. "CONFIG/${name}"

DEPENDS=(librsvg)
depends=(librsvg)

CONFIG_OPTS=($(echo "${CONFIG_OPTS[@]}" | sed -e 's|enable-svg=no|enable-svg=yes|'))
config_opts=($(echo "${config_opts[@]}" | sed -e 's|enable-svg=no|enable-svg=yes|'))
18 changes: 9 additions & 9 deletions libraries/CONFIG/cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
# Notes:
# - system dependencies: gcc-libs (libgcc, libstdc++)

DEPENDS=(zlib bzip2)
depends=(zlib bzip2)

VER="3.15.2"
DNAME="${NAME}-${VER}"
if ${OS_WIN}; then
FNAME="${DNAME}.zip"
ver="3.15.2"
dname="${name}-${ver}"
if ${os_win}; then
fname="${dname}.zip"
else
FNAME="${DNAME}.tar.gz"
fname="${dname}.tar.gz"
fi
SOURCE="https://cmake.org/files/v${VER%.*}/${FNAME}"
src="https://cmake.org/files/v${ver%.*}/${fname}"

CONFIG_OPTS=(
config_opts=(
--system-zlib
--system-bzip2
)

LIBTYPE_OPTS="N/A"
libtype_opts="N/A"
8 changes: 4 additions & 4 deletions libraries/CONFIG/diffutils
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Depends:
# libsigsegv, libiconv, libintl (gettext)

VER="3.7"
DNAME="${NAME}-${VER}"
FNAME="${DNAME}.tar.xz"
SOURCE="https://ftp.gnu.org/gnu/diffutils/${FNAME}"
ver="3.7"
dname="${name}-${ver}"
fname="${dname}.tar.xz"
src="https://ftp.gnu.org/gnu/diffutils/${fname}"
11 changes: 6 additions & 5 deletions libraries/CONFIG/expat
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
VER="2.2.7"
DNAME="${NAME}-${VER}"
FNAME="${DNAME}.tar.bz2"
SOURCE="https://github.com/libexpat/libexpat/releases/download/R_$(echo ${VER} | sed -e 's|\.|_|g')/${FNAME}"

CONFIG_OPTS=(
ver="2.2.7"
dname="${name}-${ver}"
fname="${dname}.tar.bz2"
src="https://github.com/libexpat/libexpat/releases/download/R_$(echo ${ver} | sed -e 's|\.|_|g')/${fname}"

config_opts=(
--without-examples
--without-tests
--without-docbook
Expand Down
16 changes: 8 additions & 8 deletions libraries/CONFIG/fontconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
# Optional depends
# libiconv, jsonc/json-c?

DEPENDS=(freetype gperf expat)
depends=(freetype gperf expat)

VER="2.13.91"
DNAME="${NAME}-${VER}"
FNAME="${DNAME}.tar.xz"
SOURCE="https://www.freedesktop.org/software/fontconfig/release/${FNAME}"
ver="2.13.91"
dname="${name}-${ver}"
fname="${dname}.tar.xz"
src="https://www.freedesktop.org/software/fontconfig/release/${fname}"

CONFIG_OPTS=(
config_opts=(
--disable-iconv
--disable-docs
)

if ${OS_WIN}; then
if ${os_win}; then
# FIXME: not sure why I have to explicitly link to static harfbuzz
LIBS="-l:libharfbuzz.a"
libs="-l:libharfbuzz.a"
fi
12 changes: 6 additions & 6 deletions libraries/CONFIG/freetype
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
# Optional depends
# zlib, libpng, bzip2, harfbuzz

DEPENDS=(pkg-config libpng bzip2)
depends=(pkg-config libpng bzip2)

VER="2.10.1"
DNAME="${NAME}-${VER}"
FNAME="${DNAME}.tar.xz"
SOURCE="https://download.savannah.gnu.org/releases/freetype/${FNAME}"
ver="2.10.1"
dname="${name}-${ver}"
fname="${dname}.tar.xz"
src="https://download.savannah.gnu.org/releases/freetype/${fname}"

CONFIG_OPTS=(
config_opts=(
--enable-freetype-config
--with-zlib=yes
--with-bzip2=yes
Expand Down
8 changes: 4 additions & 4 deletions libraries/CONFIG/freetype-reb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# this simply re-builds freetype with harfbuzz support

NAME="freetype"
name="freetype"
# use the same configuration
. "CONFIG/${NAME}"
. "CONFIG/${name}"

DEPENDS=(harfbuzz)
depends=(harfbuzz)

# add harfbuzz support
CONFIG_OPTS=($(echo ${CONFIG_OPTS[@]} | sed -e 's|with-harfbuzz=no|with-harfbuzz=yes|'))
config_opts=($(echo ${config_opts[@]} | sed -e 's|with-harfbuzz=no|with-harfbuzz=yes|'))
18 changes: 9 additions & 9 deletions libraries/CONFIG/fribidi
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Notes:
# - includes build configs for GNU Autotools & Meson

DEPENDS=(pkg-config)
depends=(pkg-config)

VER="1.0.5"
DNAME="${NAME}-${VER}"
FNAME="${DNAME}.tar.bz2"
SOURCE="https://github.com/${NAME}/${NAME}/releases/download/v${VER}/${FNAME}"
ver="1.0.5"
dname="${name}-${ver}"
fname="${dname}.tar.bz2"
src="https://github.com/${name}/${name}/releases/download/v${ver}/${fname}"

CMD_CONFIG=(meson)
CMD_BUILD=(ninja)
CMD_INSTALL=(ninja install)
cmd_config=(meson)
cmd_build=(ninja)
cmd_install=(ninja install)

CONFIG_OPTS=(-Ddocs=false)
config_opts=(-Ddocs=false)
30 changes: 15 additions & 15 deletions libraries/CONFIG/gdk-pixbuf
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@
# FIXME: jpeg loader not working (missing dependency?)
# FIXME: linking to libintl (required?)

DEPENDS=(glib libpng)
depends=(glib libpng)

VER="2.38.1"
DNAME="${NAME}-${VER}"
FNAME="${DNAME}.tar.xz"
SOURCE="https://ftp.acc.umu.se/pub/GNOME/sources/gdk-pixbuf/${VER%.*}/${FNAME}"
EXCLUDE_EXTRACT="tests/test-images/reftests/tga"
CMD_CONFIG=(meson)
CMD_BUILD=(ninja)
CMD_INSTALL=(ninja install)
ver="2.38.1"
dname="${name}-${ver}"
fname="${dname}.tar.xz"
src="https://ftp.acc.umu.se/pub/GNOME/sources/gdk-pixbuf/${ver%.*}/${fname}"
exclude_extract="tests/test-images/reftests/tga"
cmd_config=(meson)
cmd_build=(ninja)
cmd_install=(ninja install)

CONFIG_OPTS=(
config_opts=(
-Dgir=false
-Dman=false
-Dinstalled_tests=false
-Dtiff=false
-Djpeg=false
)

LIBS="`pkg-config glib-2.0 libtiff-4 --libs --static` -liconv"
if ${OS_WIN}; then
CONFIG_OPTS+=(-Dx11=false)
LIBS+=" -lws2_32"
libs="`pkg-config glib-2.0 libtiff-4 --libs --static` -liconv"
if ${os_win}; then
config_opts+=(-Dx11=false)
libs+=" -lws2_32"
fi
LDFLAGS="${LIBS}"
ldflags="${libs}"
21 changes: 11 additions & 10 deletions libraries/CONFIG/gettext
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
# Depends on:
# gcc-libs (libgcc, libstdc++?), libiconv
# Optional depends:
# pthreads | pth, ncurses, termcap, bzip2, xz, expat | libxml2, libacl, libunistring, libcroco
# pthreads|pth, ncurses, termcap, bzip2, xz, expat|libxml2, libacl, libunistring, libcroco

# FIXME: needs built twice in order to link to internal libintl
# FIXME: enable xz support
# FIXME: static linking produces corrupted executables

# Update available: 0.20.1 (produces segfaulting executables)
# Update available: 0.20.1

DEPENDS=(glib bzip2 libcroco)

VER="0.19.8.1"
DNAME="${NAME}-${VER}"
FNAME="${DNAME}.tar.xz"
SOURCE="https://ftp.gnu.org/pub/gnu/gettext/${FNAME}"
CPPFLAGS="-DLIBXML_STATIC"
ver="0.19.8.1"
dname="${name}-${ver}"
fname="${dname}.tar.xz"
src="https://ftp.gnu.org/pub/gnu/gettext/${fname}"
#cppflags="-DLIBXML_STATIC"

export WANT_AUTOMAKE=latest
post_extract() {
libtoolize --automake --copy --force
./autogen.sh --skip-gnulib
}

CONFIG_OPTS=(
config_opts=(
--enable-relocatable
--disable-curses
--disable-java
Expand All @@ -38,8 +39,8 @@ CONFIG_OPTS=(
)

# linking to static libs on Win32 creates corrupted executables
if ${OS_WIN}; then
LIBTYPE_OPTS=(
if ${os_win}; then
libtype_opts=(
--enable-static=no
--enable-shared=yes
)
Expand Down
10 changes: 5 additions & 5 deletions libraries/CONFIG/ghostscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Unsure optional depends:
# jbig2

VER="9.27"
DNAME="${NAME}-${VER}"
FNAME="${DNAME}.tar.xz"
SOURCE="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs$(echo ${VER} | sed -e 's|\.||g')/${FNAME}"
CONFIG_OPTS=(--with-system-libtiff)
ver="9.27"
dname="${name}-${ver}"
fname="${dname}.tar.xz"
src="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs$(echo ${ver} | sed -e 's|\.||g')/${fname}"
config_opts=(--with-system-libtiff)
Loading

0 comments on commit 4fd6ebb

Please sign in to comment.