diff --git a/buildconfig/macdependencies/build_mac_deps.sh b/buildconfig/macdependencies/build_mac_deps.sh index f83fc940e8..4cfae19fb1 100644 --- a/buildconfig/macdependencies/build_mac_deps.sh +++ b/buildconfig/macdependencies/build_mac_deps.sh @@ -1,16 +1,16 @@ # This uses manylinux build scripts to build dependencies # on mac. # -# Warning: this should probably not be run on your own mac. -# Since it will install all these deps all over the place, -# and they may conflict with existing installs you have. +# Warning: this should not be run on your own mac as it cleans dependencies on the system set -e -x -export MACDEP_CACHE_PREFIX_PATH=${GITHUB_WORKSPACE}/pygame_mac_deps_${MAC_ARCH} +export PG_DEP_PREFIX=${GITHUB_WORKSPACE}/pygame_mac_deps_${MAC_ARCH} bash ./clean_usr_local.sh -mkdir $MACDEP_CACHE_PREFIX_PATH +mkdir $PG_DEP_PREFIX + +export PKG_CONFIG_PATH="$PG_DEP_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" # to use the gnu readlink, needs `brew install coreutils` export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" @@ -19,16 +19,20 @@ export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" export MAKEFLAGS="-j 4" # With this we -# 1) Force install prefix to /usr/local -# 2) use lib directory within /usr/local (and not lib64) +# 1) Force install prefix to $PG_DEP_PREFIX +# 2) use lib directory within $PG_DEP_PREFIX (and not lib64) # 3) make release binaries # 4) build shared libraries # 5) not have @rpath in the linked dylibs (needed on macs only) -export PG_BASE_CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=/usr/local/ \ +# 6) tell cmake to search in $PG_DEP_PREFIX for sub dependencies +export PG_BASE_CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$PG_DEP_PREFIX \ -DCMAKE_INSTALL_LIBDIR:PATH=lib \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=true \ - -DCMAKE_INSTALL_NAME_DIR=/usr/local/lib" + -DCMAKE_INSTALL_NAME_DIR=$PG_DEP_PREFIX/lib \ + -DCMAKE_PREFIX_PATH=$PG_DEP_PREFIX" + +export PG_BASE_CONFIGURE_FLAGS="--prefix=$PG_DEP_PREFIX" if [[ "$MAC_ARCH" == "arm64" ]]; then # for scripts using ./configure to make arm64 binaries @@ -36,8 +40,8 @@ if [[ "$MAC_ARCH" == "arm64" ]]; then export CXX="clang++ -target arm64-apple-macos11.0" # This does not do anything actually, but without this ./configure errors - export ARCHS_CONFIG_FLAG="--host=aarch64-apple-darwin20.0.0" - + export PG_BASE_CONFIGURE_FLAGS="$PG_BASE_CONFIGURE_FLAGS --host=aarch64-apple-darwin20.0.0" + # configure cmake to cross-compile export PG_BASE_CMAKE_FLAGS="$PG_BASE_CMAKE_FLAGS -DCMAKE_OSX_ARCHITECTURES=arm64" @@ -57,10 +61,6 @@ cd ../manylinux-build/docker_base # Now start installing dependencies # --------------------------------- -sudo mkdir -p /usr/local/man/man1 # the install tries to put something in here -sudo chmod 0777 /usr/local/man/man1 # so that install can put files here -mkdir -p ${MACDEP_CACHE_PREFIX_PATH}/usr/local/man/man1 - # sdl_image deps bash zlib-ng/build-zlib-ng.sh bash libpng/build-png.sh # depends on zlib diff --git a/buildconfig/macdependencies/install_mac_deps.py b/buildconfig/macdependencies/install_mac_deps.py index bf962f20be..e1a0fa07ad 100644 --- a/buildconfig/macdependencies/install_mac_deps.py +++ b/buildconfig/macdependencies/install_mac_deps.py @@ -58,4 +58,4 @@ def symtree(srcdir: Path, destdir: Path, verbose: bool = False): destpath.symlink_to(path) -symtree(Path(sys.argv[1]), Path("/"), verbose=True) +symtree(Path(sys.argv[1]), Path("/usr/local"), verbose=True) diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 index cce081a22e..9a708f4ea8 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 @@ -1,5 +1,6 @@ FROM quay.io/pypa/manylinux2014_aarch64 ENV MAKEFLAGS="-j 2" +ENV PG_DEP_PREFIX="/usr/local" # Set up repoforge COPY RPM-GPG-KEY.dag.txt /tmp/ @@ -18,15 +19,17 @@ RUN yum install -y zlib-devel dbus-devel fontconfig xz systemd-devel \ libXi-devel libXScrnSaver-devel # With this we -# 1) Force install prefix to /usr/local -# 2) use lib directory within /usr/local (and not lib64) +# 1) Force install prefix to $PG_DEP_PREFIX +# 2) use lib directory within $PG_DEP_PREFIX (and not lib64) # 3) make release binaries # 4) build shared libraries -ENV PG_BASE_CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=/usr/local/ \ +ENV PG_BASE_CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$PG_DEP_PREFIX \ -DCMAKE_INSTALL_LIBDIR:PATH=lib \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=true" +ENV PG_BASE_CONFIGURE_FLAGS="--prefix=$PG_DEP_PREFIX" + ADD pkg-config /pkg-config_build/ RUN ["bash", "/pkg-config_build/build-pkg-config.sh"] diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 index 84ad2b2180..7d91c449d1 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 @@ -1,5 +1,6 @@ FROM quay.io/pypa/manylinux2014_i686 ENV MAKEFLAGS="-j 2" +ENV PG_DEP_PREFIX="/usr/local" # Set up repoforge COPY RPM-GPG-KEY.dag.txt /tmp/ @@ -18,15 +19,17 @@ RUN linux32 yum install -y zlib-devel dbus-devel fontconfig xz systemd-devel \ libXi-devel libXScrnSaver-devel # With this we -# 1) Force install prefix to /usr/local -# 2) use lib directory within /usr/local (and not lib64) +# 1) Force install prefix to $PG_DEP_PREFIX +# 2) use lib directory within $PG_DEP_PREFIX (and not lib64) # 3) make release binaries # 4) build shared libraries -ENV PG_BASE_CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=/usr/local/ \ +ENV PG_BASE_CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$PG_DEP_PREFIX \ -DCMAKE_INSTALL_LIBDIR:PATH=lib \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=true" +ENV PG_BASE_CONFIGURE_FLAGS="--prefix=$PG_DEP_PREFIX" + ADD pkg-config /pkg-config_build/ RUN ["linux32", "bash", "/pkg-config_build/build-pkg-config.sh"] diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 index 21db6cba16..07e22e9ab0 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 @@ -1,5 +1,6 @@ FROM quay.io/pypa/manylinux2014_x86_64 ENV MAKEFLAGS="-j 2" +ENV PG_DEP_PREFIX="/usr/local" # Set up repoforge COPY RPM-GPG-KEY.dag.txt /tmp/ @@ -18,15 +19,17 @@ RUN yum install -y zlib-devel dbus-devel fontconfig xz systemd-devel \ libXi-devel libXScrnSaver-devel # With this we -# 1) Force install prefix to /usr/local -# 2) use lib directory within /usr/local (and not lib64) +# 1) Force install prefix to $PG_DEP_PREFIX +# 2) use lib directory within $PG_DEP_PREFIX (and not lib64) # 3) make release binaries # 4) build shared libraries -ENV PG_BASE_CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=/usr/local/ \ +ENV PG_BASE_CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$PG_DEP_PREFIX \ -DCMAKE_INSTALL_LIBDIR:PATH=lib \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=true" +ENV PG_BASE_CONFIGURE_FLAGS="--prefix=$PG_DEP_PREFIX" + ADD pkg-config /pkg-config_build/ RUN ["bash", "/pkg-config_build/build-pkg-config.sh"] diff --git a/buildconfig/manylinux-build/docker_base/alsa/build-alsa.sh b/buildconfig/manylinux-build/docker_base/alsa/build-alsa.sh index 90fea5edd6..9a9fdcb2b5 100644 --- a/buildconfig/manylinux-build/docker_base/alsa/build-alsa.sh +++ b/buildconfig/manylinux-build/docker_base/alsa/build-alsa.sh @@ -11,6 +11,6 @@ tar xjf ${ALSA}.tar.bz2 cd ${ALSA} # alsa prefers /usr prefix as a default, so we explicitly override it -./configure --prefix=/usr/local --with-configdir=/usr/local/share/alsa +./configure $PG_BASE_CONFIGURE_FLAGS --with-configdir=$PG_DEP_PREFIX/share/alsa make make install diff --git a/buildconfig/manylinux-build/docker_base/brotli/build-brotli.sh b/buildconfig/manylinux-build/docker_base/brotli/build-brotli.sh index 2bb83bb33b..476588601b 100644 --- a/buildconfig/manylinux-build/docker_base/brotli/build-brotli.sh +++ b/buildconfig/manylinux-build/docker_base/brotli/build-brotli.sh @@ -15,8 +15,3 @@ cd $BROTLI cmake . $PG_BASE_CMAKE_FLAGS make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/bzip2/build-bzip2.sh b/buildconfig/manylinux-build/docker_base/bzip2/build-bzip2.sh index b55b71b0b8..b9d5235328 100644 --- a/buildconfig/manylinux-build/docker_base/bzip2/build-bzip2.sh +++ b/buildconfig/manylinux-build/docker_base/bzip2/build-bzip2.sh @@ -13,20 +13,8 @@ tar xzf ${BZIP2}.tar.gz cd $BZIP2 if [[ -z "${CC}" ]]; then - make install + make install PREFIX=$PG_DEP_PREFIX else # pass CC explicitly because it's needed here - make install CC="${CC}" -fi - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install PREFIX=${MACDEP_CACHE_PREFIX_PATH}/usr/local -fi - -if [[ "$MAC_ARCH" == "arm64" ]]; then - # We don't need bzip2 arm64 binaries, remove them so that intel binaries - # are used correctly - sudo rm /usr/local/bin/bzip2 - rm ${MACDEP_CACHE_PREFIX_PATH}/usr/local/bin/bzip2 + make install CC="${CC}" PREFIX=$PG_DEP_PREFIX fi diff --git a/buildconfig/manylinux-build/docker_base/flac/build-flac.sh b/buildconfig/manylinux-build/docker_base/flac/build-flac.sh index 49ed52aefd..6609d3c702 100644 --- a/buildconfig/manylinux-build/docker_base/flac/build-flac.sh +++ b/buildconfig/manylinux-build/docker_base/flac/build-flac.sh @@ -13,11 +13,6 @@ unxz ${FLAC}.tar.xz tar xf ${FLAC}.tar cd $FLAC -./configure $ARCHS_CONFIG_FLAG +./configure $PG_BASE_CONFIGURE_FLAGS make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/fluidsynth/build-fluidsynth.sh b/buildconfig/manylinux-build/docker_base/fluidsynth/build-fluidsynth.sh index cff9df7d7a..03d1557b7e 100644 --- a/buildconfig/manylinux-build/docker_base/fluidsynth/build-fluidsynth.sh +++ b/buildconfig/manylinux-build/docker_base/fluidsynth/build-fluidsynth.sh @@ -27,8 +27,3 @@ cmake .. $PG_BASE_CMAKE_FLAGS -Denable-readline=OFF $FLUIDSYNTH_EXTRA_PLAT_FLAGS make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/freetype/build-freetype.sh b/buildconfig/manylinux-build/docker_base/freetype/build-freetype.sh index d74561f88d..2fdff82aab 100644 --- a/buildconfig/manylinux-build/docker_base/freetype/build-freetype.sh +++ b/buildconfig/manylinux-build/docker_base/freetype/build-freetype.sh @@ -22,7 +22,7 @@ tar xf ${HARFBUZZ_NAME}.tar # 1. First compile freetype without harfbuzz support cd $FREETYPE -./configure $ARCHS_CONFIG_FLAG --with-harfbuzz=no +./configure $PG_BASE_CONFIGURE_FLAGS --with-harfbuzz=no make make install # this freetype is not installed to mac cache dir @@ -36,18 +36,13 @@ cd ${HARFBUZZ_NAME} # Cairo and chafa are only needed for harfbuzz commandline utilities so we # don't use it. glib available is a bit old so we don't prefer it as of now. # we also don't compile-in icu so that harfbuzz uses built-in unicode handling -# LDFLAGS are passed explicitly so that harfbuzz picks the freetype we -# installed first -./configure $ARCHS_CONFIG_FLAG --with-freetype=yes \ +./configure $PG_BASE_CONFIGURE_FLAGS --with-freetype=yes \ --with-cairo=no --with-chafa=no --with-glib=no --with-icu=no \ - --disable-static LDFLAGS="-L/usr/local/lib" + --disable-static make make install if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} - # We do a little hack... # When freetype finds harfbuzz with pkg-config, we tell freetype a little # lie that harfbuzz doesn't depend on freetype (even though it does). @@ -55,8 +50,8 @@ if [[ "$OSTYPE" == "darwin"* ]]; then # This is a bit of a brittle hack: This command removes the entire line that # contains "freetype". This is fine for now when the harfbuzz we are # building has no other dependencies - sed -i '' '/freetype/d' /usr/local/lib/pkgconfig/harfbuzz.pc - sed -i '' 's/ \/usr\/local\/lib\/libfreetype.la//g' /usr/local/lib/libharfbuzz.la + sed -i '' '/freetype/d' $PG_DEP_PREFIX/lib/pkgconfig/harfbuzz.pc + sed -i '' 's/ [^ ]*libfreetype.la//g' $PG_DEP_PREFIX/lib/libharfbuzz.la fi cd .. @@ -70,11 +65,6 @@ if [[ "$OSTYPE" == "darwin"* ]]; then make uninstall fi -./configure $ARCHS_CONFIG_FLAG --with-harfbuzz=yes +./configure $PG_BASE_CONFIGURE_FLAGS --with-harfbuzz=yes make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/gettext/build-gettext.sh b/buildconfig/manylinux-build/docker_base/gettext/build-gettext.sh index c7a4dd80c7..7026dfc0b1 100644 --- a/buildconfig/manylinux-build/docker_base/gettext/build-gettext.sh +++ b/buildconfig/manylinux-build/docker_base/gettext/build-gettext.sh @@ -20,7 +20,7 @@ fi tar xzf ${GETTEXT}.tar.gz cd $GETTEXT -./configure $ARCHS_CONFIG_FLAG $GETTEXT_CONFIGURE \ +./configure $PG_BASE_CONFIGURE_FLAGS $GETTEXT_CONFIGURE \ --disable-dependency-tracking \ --disable-silent-rules \ --disable-debug \ @@ -38,7 +38,8 @@ cd $GETTEXT make make install +# For some reason, this is needed for glib to find gettext +# TODO: remove this, hopefully after glib is updated this won't be needed if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} + make install prefix=/usr/local fi diff --git a/buildconfig/manylinux-build/docker_base/glib/build-glib.sh b/buildconfig/manylinux-build/docker_base/glib/build-glib.sh index 1c1e838541..b7571bbea8 100644 --- a/buildconfig/manylinux-build/docker_base/glib/build-glib.sh +++ b/buildconfig/manylinux-build/docker_base/glib/build-glib.sh @@ -18,11 +18,6 @@ if [[ "$MAC_ARCH" == "arm64" ]]; then export GLIB_COMPILE_EXTRA_FLAGS="--cache-file=../macos_arm64.cache" fi -CFLAGS=-Wno-error ./configure $ARCHS_CONFIG_FLAG --with-pcre=internal $GLIB_COMPILE_EXTRA_FLAGS --disable-libmount --disable-dbus +CFLAGS=-Wno-error ./configure $PG_BASE_CONFIGURE_FLAGS --with-pcre=internal $GLIB_COMPILE_EXTRA_FLAGS --disable-libmount --disable-dbus make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/libffi/build-libffi.sh b/buildconfig/manylinux-build/docker_base/libffi/build-libffi.sh index 806af94ee3..fb482dabb6 100644 --- a/buildconfig/manylinux-build/docker_base/libffi/build-libffi.sh +++ b/buildconfig/manylinux-build/docker_base/libffi/build-libffi.sh @@ -13,11 +13,6 @@ sha512sum -c libffi.sha512 tar xzf ${LIBFFI}.tar.gz cd $LIBFFI -./configure $ARCHS_CONFIG_FLAG +./configure $PG_BASE_CONFIGURE_FLAGS make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/libjpegturbo/build-jpeg-turbo.sh b/buildconfig/manylinux-build/docker_base/libjpegturbo/build-jpeg-turbo.sh index 966bd6ded4..09713e43d9 100644 --- a/buildconfig/manylinux-build/docker_base/libjpegturbo/build-jpeg-turbo.sh +++ b/buildconfig/manylinux-build/docker_base/libjpegturbo/build-jpeg-turbo.sh @@ -16,8 +16,3 @@ cmake . $PG_BASE_CMAKE_FLAGS -DWITH_TURBOJPEG=0 make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/libmodplug/build-libmodplug.sh b/buildconfig/manylinux-build/docker_base/libmodplug/build-libmodplug.sh index 12f6f5631f..de3a1211ca 100644 --- a/buildconfig/manylinux-build/docker_base/libmodplug/build-libmodplug.sh +++ b/buildconfig/manylinux-build/docker_base/libmodplug/build-libmodplug.sh @@ -12,11 +12,7 @@ sha512sum -c libmodplug.sha512 tar -xf ${MODPLUG_NAME}.tar.gz cd ${MODPLUG_NAME} -./configure $ARCHS_CONFIG_FLAG +./configure $PG_BASE_CONFIGURE_FLAGS make make install -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/libpng/build-png.sh b/buildconfig/manylinux-build/docker_base/libpng/build-png.sh index 91fa9af661..92fdff9592 100644 --- a/buildconfig/manylinux-build/docker_base/libpng/build-png.sh +++ b/buildconfig/manylinux-build/docker_base/libpng/build-png.sh @@ -11,11 +11,7 @@ sha512sum -c png.sha512 tar xzf ${PNG}.tar.gz cd $PNG -./configure --with-zlib-prefix=/usr/local/ $ARCHS_CONFIG_FLAG +./configure --with-zlib-prefix=$PG_DEP_PREFIX $PG_BASE_CONFIGURE_FLAGS make make install -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/libtiff/build-tiff.sh b/buildconfig/manylinux-build/docker_base/libtiff/build-tiff.sh index 6c0afa2277..42f945f5d4 100644 --- a/buildconfig/manylinux-build/docker_base/libtiff/build-tiff.sh +++ b/buildconfig/manylinux-build/docker_base/libtiff/build-tiff.sh @@ -12,7 +12,7 @@ tar xzf ${TIFF}.tar.gz cd $TIFF if [[ "$OSTYPE" == "linux-gnu"* ]]; then - ./configure --disable-lzma --disable-webp --disable-zstd + ./configure $PG_BASE_CONFIGURE_FLAGS --disable-lzma --disable-webp --disable-zstd elif [[ "$OSTYPE" == "darwin"* ]]; then # Use CMake on macOS because arm64 builds fail with weird errors in ./configure cmake . $PG_BASE_CMAKE_FLAGS -Dlzma=OFF -Dwebp=OFF -Dzstd=OFF @@ -20,8 +20,3 @@ fi make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/libwebp/build-webp.sh b/buildconfig/manylinux-build/docker_base/libwebp/build-webp.sh index 900227c9a8..c2c62ef101 100644 --- a/buildconfig/manylinux-build/docker_base/libwebp/build-webp.sh +++ b/buildconfig/manylinux-build/docker_base/libwebp/build-webp.sh @@ -11,11 +11,6 @@ sha512sum -c webp.sha512 tar xzf ${WEBP}.tar.gz cd $WEBP -./configure $ARCHS_CONFIG_FLAG +./configure $PG_BASE_CONFIGURE_FLAGS make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/mpg123/build-mpg123.sh b/buildconfig/manylinux-build/docker_base/mpg123/build-mpg123.sh index 57b6062d91..591ea4d238 100644 --- a/buildconfig/manylinux-build/docker_base/mpg123/build-mpg123.sh +++ b/buildconfig/manylinux-build/docker_base/mpg123/build-mpg123.sh @@ -12,14 +12,8 @@ bzip2 -d ${MPG123}.tar.bz2 tar xf ${MPG123}.tar cd $MPG123 -./configure $ARCHS_CONFIG_FLAG --enable-int-quality --disable-debug \ +./configure $PG_BASE_CONFIGURE_FLAGS --enable-int-quality --disable-debug \ --disable-components --enable-libmpg123 --enable-libsyn123 + make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi - -cd .. diff --git a/buildconfig/manylinux-build/docker_base/ogg/build-ogg.sh b/buildconfig/manylinux-build/docker_base/ogg/build-ogg.sh index 84730eb824..4029ff4521 100644 --- a/buildconfig/manylinux-build/docker_base/ogg/build-ogg.sh +++ b/buildconfig/manylinux-build/docker_base/ogg/build-ogg.sh @@ -14,7 +14,7 @@ tar xzf ${OGG}.tar.gz cd $OGG if [[ "$OSTYPE" == "linux-gnu"* ]]; then - ./configure $ARCHS_CONFIG_FLAG + ./configure $PG_BASE_CONFIGURE_FLAGS elif [[ "$OSTYPE" == "darwin"* ]]; then # Use CMake on macOS because ./configure doesn't generate dylib cmake . $PG_BASE_CMAKE_FLAGS @@ -23,17 +23,13 @@ fi make make install -if [[ "$OSTYPE" == "darwin"* ]]; then - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi - cd .. tar xzf ${VORBIS}.tar.gz cd $VORBIS if [[ "$OSTYPE" == "linux-gnu"* ]]; then - ./configure $ARCHS_CONFIG_FLAG + ./configure $PG_BASE_CONFIGURE_FLAGS elif [[ "$OSTYPE" == "darwin"* ]]; then # Use CMake on macOS because ./configure doesn't generate dylib cmake . $PG_BASE_CMAKE_FLAGS @@ -41,9 +37,3 @@ fi make make install -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi - -cd .. diff --git a/buildconfig/manylinux-build/docker_base/opus/build-opus.sh b/buildconfig/manylinux-build/docker_base/opus/build-opus.sh index a07f65db83..2dc5fd85d3 100644 --- a/buildconfig/manylinux-build/docker_base/opus/build-opus.sh +++ b/buildconfig/manylinux-build/docker_base/opus/build-opus.sh @@ -13,25 +13,15 @@ sha512sum -c opus.sha512 tar xzf ${OPUS}.tar.gz cd $OPUS -./configure $ARCHS_CONFIG_FLAG +./configure $PG_BASE_CONFIGURE_FLAGS make make install -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi - cd .. tar xzf ${OPUS_FILE}.tar.gz cd $OPUS_FILE -./configure $ARCHS_CONFIG_FLAG --disable-http +./configure $PG_BASE_CONFIGURE_FLAGS --disable-http make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi \ No newline at end of file diff --git a/buildconfig/manylinux-build/docker_base/pkg-config/build-pkg-config.sh b/buildconfig/manylinux-build/docker_base/pkg-config/build-pkg-config.sh index 801951eb12..13691e6fa0 100644 --- a/buildconfig/manylinux-build/docker_base/pkg-config/build-pkg-config.sh +++ b/buildconfig/manylinux-build/docker_base/pkg-config/build-pkg-config.sh @@ -13,7 +13,7 @@ cd $(dirname `readlink -f "$0"`) COMPILED_PKGCONFIG_DIRS=$(pkg-config --variable pc_path pkg-config) # append path(s) where other installs put .pc files -COMPILED_PKGCONFIG_DIRS="${COMPILED_PKGCONFIG_DIRS}:/usr/local/lib/pkgconfig" +COMPILED_PKGCONFIG_DIRS="$PG_DEP_PREFIX/lib/pkgconfig:${COMPILED_PKGCONFIG_DIRS}" PKGCONFIG=pkg-config-0.29.2 @@ -25,11 +25,6 @@ cd $PKGCONFIG # Passing --with-internal-glib will make this pickup internally vendored glib # Use this flag if there are build issues with this step later on -./configure $ARCHS_CONFIG_FLAG --with-pc-path=$COMPILED_PKGCONFIG_DIRS +./configure $PG_BASE_CONFIGURE_FLAGS --with-pc-path=$COMPILED_PKGCONFIG_DIRS make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/portmidi/build-portmidi.sh b/buildconfig/manylinux-build/docker_base/portmidi/build-portmidi.sh index d8399d46ec..a44e131f8e 100644 --- a/buildconfig/manylinux-build/docker_base/portmidi/build-portmidi.sh +++ b/buildconfig/manylinux-build/docker_base/portmidi/build-portmidi.sh @@ -15,8 +15,3 @@ cd $PORTMIDI cmake . $PG_BASE_CMAKE_FLAGS make make install - -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/pulseaudio/build-pulseaudio.sh b/buildconfig/manylinux-build/docker_base/pulseaudio/build-pulseaudio.sh index 54e2a25cd4..1c4a914856 100644 --- a/buildconfig/manylinux-build/docker_base/pulseaudio/build-pulseaudio.sh +++ b/buildconfig/manylinux-build/docker_base/pulseaudio/build-pulseaudio.sh @@ -12,6 +12,6 @@ unxz ${PULSEFILE}.tar.xz tar xf ${PULSEFILE}.tar cd ${PULSEFILE} -./configure $ARCHS_CONFIG_FLAG --disable-manpages --disable-gsettings +./configure $PG_BASE_CONFIGURE_FLAGS --disable-manpages --disable-gsettings make make install diff --git a/buildconfig/manylinux-build/docker_base/sdl_libs/build-sdl2-libs.sh b/buildconfig/manylinux-build/docker_base/sdl_libs/build-sdl2-libs.sh index 94f538eabc..773f1a9337 100644 --- a/buildconfig/manylinux-build/docker_base/sdl_libs/build-sdl2-libs.sh +++ b/buildconfig/manylinux-build/docker_base/sdl_libs/build-sdl2-libs.sh @@ -33,15 +33,10 @@ if [[ "$MAC_ARCH" == "arm64" ]]; then fi cd $SDL2 -./configure --disable-video-vulkan $ARCHS_CONFIG_FLAG $M1_MAC_EXTRA_FLAGS +./configure --disable-video-vulkan $PG_BASE_CONFIGURE_FLAGS $M1_MAC_EXTRA_FLAGS make make install -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi - cd .. @@ -63,15 +58,10 @@ fi ./configure --enable-png --disable-png-shared --enable-jpg --disable-jpg-shared \ --enable-tif --disable-tif-shared --enable-webp --disable-webp-shared \ - $SDL_IMAGE_CONFIGURE $ARCHS_CONFIG_FLAG + $SDL_IMAGE_CONFIGURE $PG_BASE_CONFIGURE_FLAGS make make install -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi - cd .. # Build SDL_ttf @@ -80,15 +70,10 @@ cd $TTF2 # We already build freetype+harfbuzz for pygame.freetype # So we make SDL_ttf use that instead of SDL_ttf vendored copies -./configure $ARCHS_CONFIG_FLAG --disable-freetype-builtin --disable-harfbuzz-builtin +./configure $PG_BASE_CONFIGURE_FLAGS --disable-freetype-builtin --disable-harfbuzz-builtin make make install -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi - cd .. @@ -103,7 +88,7 @@ cd $MIX2 # at the moment. This can be changed later if need arises. # For now, libmodplug is preferred over libxmp (but this may need changing # in the future) -./configure $ARCHS_CONFIG_FLAG \ +./configure $PG_BASE_CONFIGURE_FLAGS \ --disable-dependency-tracking \ --disable-music-ogg-stb --enable-music-ogg-vorbis \ --disable-music-flac-drflac --enable-music-flac-libflac \ @@ -121,9 +106,3 @@ cd $MIX2 make make install -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi - -cd .. diff --git a/buildconfig/manylinux-build/docker_base/sndfile/build-sndfile.sh b/buildconfig/manylinux-build/docker_base/sndfile/build-sndfile.sh index 5609d1e035..265ea9af15 100644 --- a/buildconfig/manylinux-build/docker_base/sndfile/build-sndfile.sh +++ b/buildconfig/manylinux-build/docker_base/sndfile/build-sndfile.sh @@ -14,11 +14,7 @@ cd $SNDNAME # autoreconf -fvi # alsa is only needed for examples here -./configure $ARCHS_CONFIG_FLAG --disable-mpeg --disable-alsa +./configure $PG_BASE_CONFIGURE_FLAGS --disable-mpeg --disable-alsa make make install -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi diff --git a/buildconfig/manylinux-build/docker_base/strip-lib-so-files.sh b/buildconfig/manylinux-build/docker_base/strip-lib-so-files.sh index 5711890419..7288a84a0f 100644 --- a/buildconfig/manylinux-build/docker_base/strip-lib-so-files.sh +++ b/buildconfig/manylinux-build/docker_base/strip-lib-so-files.sh @@ -7,8 +7,8 @@ # This is a pretty scary looking command, let's break it down part-wise to # understand it -# > find /usr/local/lib -# searches everything recursively under /usr/local/lib (including the top dir) +# > find $PG_DEP_PREFIX/lib +# searches everything recursively under $PG_DEP_PREFIX/lib (including the top dir) # > \( -name "*.so*" -o -name "*.a" \) # matches names having a .so[suffix] OR .a extension @@ -28,5 +28,5 @@ # > strip --strip-unneeded # This is the actual command being run on all so files: this strips unneeded # info -find /usr/local/lib \( -name "*.so*" -o -name "*.a" \) -type f -xtype f -print0 | \ +find $PG_DEP_PREFIX/lib \( -name "*.so*" -o -name "*.a" \) -type f -xtype f -print0 | \ xargs -0 -t strip --strip-unneeded diff --git a/buildconfig/manylinux-build/docker_base/zlib-ng/build-zlib-ng.sh b/buildconfig/manylinux-build/docker_base/zlib-ng/build-zlib-ng.sh index 889d3c322e..d00587d5a5 100644 --- a/buildconfig/manylinux-build/docker_base/zlib-ng/build-zlib-ng.sh +++ b/buildconfig/manylinux-build/docker_base/zlib-ng/build-zlib-ng.sh @@ -15,8 +15,3 @@ cmake . $PG_BASE_CMAKE_FLAGS -DZLIB_COMPAT=1 make make install -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi - diff --git a/buildconfig/manylinux-build/docker_base/zlib/build-zlib.sh b/buildconfig/manylinux-build/docker_base/zlib/build-zlib.sh index 05b431bcc7..6cbaae0551 100644 --- a/buildconfig/manylinux-build/docker_base/zlib/build-zlib.sh +++ b/buildconfig/manylinux-build/docker_base/zlib/build-zlib.sh @@ -11,11 +11,7 @@ sha512sum -c zlib.sha512 tar -xf ${ZLIB_NAME}.tar.gz cd ${ZLIB_NAME} -./configure $ARCHS_CONFIG_FLAG +./configure $PG_BASE_CONFIGURE_FLAGS make make install -if [[ "$OSTYPE" == "darwin"* ]]; then - # Install to mac deps cache dir as well - make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH} -fi