Skip to content

Commit aaa38f2

Browse files
illwieckzslipher
authored andcommitted
external_deps: drop freetype, lua, and naclports
1 parent ed69a84 commit aaa38f2

File tree

1 file changed

+8
-85
lines changed

1 file changed

+8
-85
lines changed

external_deps/build.sh

Lines changed: 8 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@ PNG_BASEURL='https://sourceforge.net/projects/libpng/files/libpng16'
3131
JPEG_BASEURL='https://sourceforge.net/projects/libjpeg-turbo/files'
3232
# Index: https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html
3333
WEBP_BASEURL='https://storage.googleapis.com/downloads.webmproject.org/releases/webp'
34-
FREETYPE_BASEURL='https://download.savannah.gnu.org/releases/freetype'
3534
OPENAL_BASEURL='https://openal-soft.org/openal-releases'
3635
OGG_BASEURL='https://downloads.xiph.org/releases/ogg'
3736
VORBIS_BASEURL='https://downloads.xiph.org/releases/vorbis'
3837
OPUS_BASEURL='https://downloads.xiph.org/releases/opus'
3938
OPUSFILE_BASEURL='https://downloads.xiph.org/releases/opus'
40-
LUA_BASEURL='https://www.lua.org/ftp'
4139
# No index.
4240
NACLSDK_BASEURL='https://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk'
4341
NCURSES_BASEURL='https://ftpmirror.gnu.org/gnu/ncurses'
@@ -56,13 +54,11 @@ GLEW_VERSION=2.2.0
5654
PNG_VERSION=1.6.39
5755
JPEG_VERSION=2.1.5.1
5856
WEBP_VERSION=1.3.2
59-
FREETYPE_VERSION=2.13.0
6057
OPENAL_VERSION=1.23.1
6158
OGG_VERSION=1.3.5
6259
VORBIS_VERSION=1.3.7
6360
OPUS_VERSION=1.4
6461
OPUSFILE_VERSION=0.12
65-
LUA_VERSION=5.4.4
6662
NACLSDK_VERSION=44.0.2403.155
6763
NCURSES_VERSION=6.2
6864
WASISDK_VERSION=16.0
@@ -522,25 +518,6 @@ build_webp() {
522518
make install
523519
}
524520

525-
# Build FreeType
526-
build_freetype() {
527-
local dir_name="freetype-${FREETYPE_VERSION}"
528-
local archive_name="${dir_name}.tar.xz"
529-
530-
download_extract freetype "${archive_name}" \
531-
"${FREETYPE_BASEURL}/${archive_name}"
532-
533-
"${download_only}" && return
534-
535-
cd "${dir_name}"
536-
# The default -O2 is dropped when there's user-provided CFLAGS.
537-
CFLAGS="${CFLAGS} -O2" ./configure --host="${HOST}" --prefix="${PREFIX}" --libdir="${PREFIX}/lib" "${CONFIGURE_SHARED[@]}" --without-bzip2 --without-png --with-harfbuzz=no --with-brotli=no
538-
make
539-
make install
540-
cp -a "${PREFIX}/include/freetype2" "${PREFIX}/include/freetype"
541-
mv "${PREFIX}/include/freetype" "${PREFIX}/include/freetype2/freetype"
542-
}
543-
544521
# Build OpenAL
545522
build_openal() {
546523
case "${PLATFORM}" in
@@ -676,46 +653,6 @@ build_opusfile() {
676653
make install
677654
}
678655

679-
# Build Lua
680-
build_lua() {
681-
local dir_name="lua-${LUA_VERSION}"
682-
local archive_name="${dir_name}.tar.gz"
683-
684-
download_extract lua "${archive_name}" \
685-
"${LUA_BASEURL}/${archive_name}"
686-
687-
"${download_only}" && return
688-
689-
cd "${dir_name}"
690-
case "${PLATFORM}" in
691-
windows-*-*)
692-
local LUA_PLATFORM=mingw
693-
;;
694-
macos-*-*)
695-
local LUA_PLATFORM=macosx
696-
;;
697-
linux-*-*)
698-
local LUA_PLATFORM=linux
699-
;;
700-
*)
701-
log error 'Unsupported platform for Lua'
702-
;;
703-
esac
704-
make "${LUA_PLATFORM}" CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" MYCFLAGS="${CFLAGS}" MYLDFLAGS="${LDFLAGS}"
705-
case "${PLATFORM}" in
706-
windows-*-mingw)
707-
make install TO_BIN="lua.exe luac.exe" TO_LIB="liblua.a" INSTALL_TOP="${PREFIX}"
708-
;;
709-
windows-*-msvc)
710-
make install TO_BIN="lua.exe luac.exe lua54.dll" TO_LIB="liblua.a" INSTALL_TOP="${PREFIX}"
711-
touch "${PREFIX}/lib/lua54.dll.a"
712-
;;
713-
*)
714-
make install INSTALL_TOP="${PREFIX}"
715-
;;
716-
esac
717-
}
718-
719656
# Build ncurses
720657
build_ncurses() {
721658
local dir_name="ncurses-${NCURSES_VERSION}"
@@ -903,20 +840,6 @@ build_naclsdk() {
903840
esac
904841
}
905842

906-
build_naclports() {
907-
local archive_name="naclports-${NACLSDK_VERSION}.tar.bz2"
908-
909-
download_extract naclports "${archive_name}" \
910-
"https://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/${NACLSDK_VERSION}/naclports.tar.bz2"
911-
912-
"${download_only}" && return
913-
914-
mkdir -p "${PREFIX}/pnacl_deps/"{include,lib}
915-
cp pepper_*"/ports/include/"{lauxlib.h,lua.h,lua.hpp,luaconf.h,lualib.h} "${PREFIX}/pnacl_deps/include"
916-
cp -a pepper_*"/ports/include/freetype2" "${PREFIX}/pnacl_deps/include"
917-
cp pepper_*"/ports/lib/newlib_pnacl/Release/"{liblua.a,libfreetype.a,libpng16.a} "${PREFIX}/pnacl_deps/lib"
918-
}
919-
920843
# The import libraries generated by MinGW seem to have issues, so we use LLVM's version instead.
921844
# So LLVM must be installed, e.g. 'sudo apt install llvm'
922845
build_genlib() {
@@ -1086,7 +1009,7 @@ common_setup_arch() {
10861009
# point did not implement certain printf specifiers, in particular %lld (long long).
10871010
# Lua does use this one, which results in compiler warnings. But this is OK because
10881011
# the Windows build of Lua is only used in developer gamelogic builds, and Microsoft
1089-
# supports %lld since Visual Studio 2013.
1012+
# supports %lld since Visual Studio 2013. Also we don't build Lua anymore.
10901013
common_setup_msvc() {
10911014
CONFIGURE_SHARED=(--enable-shared --disable-static)
10921015
# Libtool bug prevents -static-libgcc from being set in LDFLAGS
@@ -1176,29 +1099,29 @@ setup_linux-arm64-default() {
11761099
common_setup linux aarch64-unknown-linux-gnu
11771100
}
11781101

1179-
base_windows_amd64_msvc_packages='pkgconfig zlib gmp nettle curl sdl2 glew png jpeg webp freetype openal ogg vorbis opus opusfile lua naclsdk naclports genlib'
1102+
base_windows_amd64_msvc_packages='pkgconfig zlib gmp nettle curl sdl2 glew png jpeg webp openal ogg vorbis opus opusfile naclsdk genlib'
11801103
all_windows_amd64_msvc_packages="${base_windows_amd64_msvc_packages}"
11811104

11821105
base_windows_i686_msvc_packages="${base_windows_amd64_msvc_packages}"
11831106
all_windows_i686_msvc_packages="${base_windows_amd64_msvc_packages}"
11841107

1185-
base_windows_amd64_mingw_packages='zlib gmp nettle curl sdl2 glew png jpeg webp freetype openal ogg vorbis opus opusfile lua naclsdk naclports'
1108+
base_windows_amd64_mingw_packages='zlib gmp nettle curl sdl2 glew png jpeg webp openal ogg vorbis opus opusfile naclsdk'
11861109
all_windows_amd64_mingw_packages="${base_windows_amd64_mingw_packages}"
11871110

11881111
base_windows_i686_mingw_packages="${base_windows_amd64_mingw_packages}"
11891112
all_windows_i686_mingw_packages="${base_windows_amd64_mingw_packages}"
11901113

1191-
base_macos_amd64_default_packages='pkgconfig nasm gmp nettle sdl2 glew png jpeg webp freetype openal ogg vorbis opus opusfile lua naclsdk naclports'
1114+
base_macos_amd64_default_packages='pkgconfig nasm gmp nettle sdl2 glew png jpeg webp openal ogg vorbis opus opusfile naclsdk'
11921115
all_macos_amd64_default_packages="${base_macos_amd64_default_packages}"
11931116

1194-
base_linux_amd64_default_packages='naclsdk naclports'
1195-
all_linux_amd64_default_packages='zlib gmp nettle curl sdl2 glew png jpeg webp freetype openal ogg vorbis opus opusfile lua naclsdk naclports'
1117+
base_linux_amd64_default_packages='naclsdk'
1118+
all_linux_amd64_default_packages='zlib gmp nettle curl sdl2 glew png jpeg webp openal ogg vorbis opus opusfile naclsdk'
11961119

11971120
base_linux_i686_default_packages="${base_linux_amd64_default_packages}"
11981121
all_linux_i686_default_packages="${all_linux_amd64_default_packages}"
11991122

12001123
base_linux_arm64_default_packages='naclsdk'
1201-
all_linux_arm64_default_packages='zlib gmp nettle curl sdl2 glew png jpeg webp freetype openal ogg vorbis opus opusfile lua naclsdk'
1124+
all_linux_arm64_default_packages='zlib gmp nettle curl sdl2 glew png jpeg webp openal ogg vorbis opus opusfile naclsdk'
12021125

12031126
base_linux_armhf_default_packages="${base_linux_arm64_default_packages}"
12041127
all_linux_armhf_default_packages="${all_linux_arm64_default_packages}"
@@ -1226,7 +1149,7 @@ errorHelp() {
12261149
\tbuild-macos — platforms buildable on macos: ${macos_build_platforms}
12271150
12281151
Packages:
1229-
\tpkgconfig nasm zlib gmp nettle curl sdl2 glew png jpeg webp freetype openal ogg vorbis opus opusfile lua naclsdk naclports wasisdk wasmtime
1152+
\tpkgconfig nasm zlib gmp nettle curl sdl2 glew png jpeg webp openal ogg vorbis opus opusfile naclsdk wasisdk wasmtime
12301153
12311154
Virtual packages:
12321155
\tbase — build packages for pre-built binaries to be downloaded when building the game

0 commit comments

Comments
 (0)