commit d6630fde63ecc552f9453b4aaf2a213a4ff90b5d Author: Stephen M. Cameron Date: Sun Jan 12 09:03:15 2025 -0500 Allow compiling opus without the Makefile downloading it If you want to stuff SNIS into a flatpak, you can't have it use wget from the Makefile. It uses wget to get the opus speech compression/ decompression library from mozilla.org by default. This patch allows you to pre-download this library then use it from the pre-downloaded location instead of using wget by, e.g.: make PREFETCHED_OPUS=../../opus-1.3.1.tar.gz Signed-off-by: Stephen M. Cameron diff --git a/Makefile b/Makefile index a1da0883..e558a01d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,16 @@ # To compile with voice chat, WITHVOICECHAT=yes, # for no voice chat, make WITHVOICECHAT=no WITHVOICECHAT=yes +OPUS_ARCHIVE=opus-1.3.1.tar.gz +OPUS_URL=https://archive.mozilla.org/pub/opus/${OPUS_ARCHIVE} +# if you do not want this makefile to use wget to fetch opus from mozilla.org +# but would prefer to prefetch it (for example, inside a flatpak) then set this +# variable to the location of the prefetched opus archive, e.g.: +# +# make PREFETCHED_OPUS=../../opus-1.3.1.tar.gz +# +PREFETCHED_OPUS?= + USE_SNIS_XWINDOWS_HACKS=1 PKG_CONFIG?=pkg-config SDL2_CONFIG?=sdl2-config @@ -1488,7 +1498,11 @@ scan-build: # opus stuff for voice chat opus-1.3.1.tar.gz: - wget https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz +ifdef PREFETCHED_OPUS + cp ${PREFETCHED_OPUS} . +else + wget ${OPUS_URL} +endif md5sum opus-1.3.1.tar.gz | grep d7c07db796d21c9cf1861e0c2b0c0617 opus-1.3.1: opus-1.3.1.tar.gz