From 7028d502265c5482235052ce6a8c8807dd31dd67 Mon Sep 17 00:00:00 2001 From: phoebos Date: Thu, 2 Mar 2023 14:40:00 +0000 Subject: [PATCH] *: explicit DESTDIR --- core/b3sum/build | 2 +- core/binutils/build | 2 +- core/bison/build | 2 +- core/curl/build | 2 +- core/flex/build | 2 +- core/gcc/build | 2 +- core/git/build | 2 +- core/grub/build | 4 +++- core/m4/build | 2 +- core/make/build | 2 +- core/musl/build | 2 +- core/pigz/build | 16 +++++++--------- core/xz/build | 6 +++--- core/zlib/build | 2 +- extra/adwaita-icon-theme/build | 2 +- extra/alsa-lib/build | 2 +- extra/alsa-utils/build | 2 +- extra/bkeymaps/build | 2 +- extra/cairo/build | 2 +- extra/ccache/build | 1 + extra/clang/build | 2 ++ extra/cmake/build | 4 +++- extra/dhcpcd/build | 2 +- extra/dosfstools/build | 2 +- extra/e2fsprogs/build | 1 + extra/efivar/build | 2 +- extra/eiwd/build | 2 +- extra/expat/build | 2 +- extra/ffmpeg/build | 2 +- extra/firefox/build | 2 +- extra/fontconfig/build | 2 +- extra/freetype-harfbuzz/build | 2 ++ extra/gdk-pixbuf/build | 2 ++ extra/glib/build | 2 ++ extra/gnugrep/build | 2 +- extra/gtk+3/build | 2 ++ extra/hicolor-icon-theme/build | 2 +- extra/hwdata/build | 2 +- extra/intel-vaapi-driver/build | 2 ++ extra/json-c/build | 2 ++ extra/kirc/build | 2 +- extra/lame/build | 2 +- extra/libass/build | 2 +- extra/libelf/build | 4 ++-- extra/libepoxy/build | 2 ++ extra/libffi/build | 2 +- extra/libjpeg-turbo/build | 2 ++ extra/libogg/build | 8 +++++--- extra/libpng/build | 2 +- extra/libretls/build | 2 +- extra/libtheora/build | 6 +++--- extra/libudev-zero/build | 2 +- extra/libva-utils/build | 2 ++ extra/libva/build | 2 ++ extra/libvorbis/build | 8 +++++--- extra/libvpx/build | 2 +- extra/libwebp/build | 2 +- extra/llvm/build | 2 ++ extra/mandoc/build | 2 +- extra/mdevd/build | 2 +- extra/mesa/build | 2 ++ extra/mold/build | 2 ++ extra/mpv/build | 2 ++ extra/mutt/build | 2 +- extra/nasm/build | 2 +- extra/ncurses/build | 2 +- extra/nspr/build | 2 +- extra/opendoas/build | 2 +- extra/openresolv/build | 2 +- extra/opus/build | 2 +- extra/pango/build | 2 ++ extra/pcre2/build | 2 +- extra/pkgconf/build | 2 +- extra/python/build | 2 +- extra/rust/build | 2 ++ extra/samurai/build | 2 +- extra/scdoc/build | 2 +- extra/sqlite/build | 2 +- extra/ssu/build | 1 + extra/strace/build | 2 +- extra/tzdata/build | 10 ++++++---- extra/util-linux/build | 2 +- extra/vim/build | 2 +- extra/wpa_supplicant/build | 2 +- extra/x264/build | 2 +- extra/x265/build | 2 ++ extra/zstd/build | 1 + testing/firefox/build | 2 +- wayland/compose-tables/build | 2 +- wayland/fcft/build | 2 ++ wayland/foot-pgo/build | 2 ++ wayland/foot/build | 2 ++ wayland/grim/build | 2 ++ wayland/libdrm/build | 2 ++ wayland/libinput/build | 1 + wayland/libpciaccess/build | 2 ++ wayland/libseat/build | 1 + wayland/libxkbcommon/build | 2 ++ wayland/pixman/build | 2 ++ wayland/slurp/build | 2 ++ wayland/sway/build | 2 ++ wayland/tllist/build | 2 ++ wayland/wayclip/build | 2 +- wayland/wayland-protocols/build | 2 ++ wayland/wayland/build | 2 ++ wayland/wbg/build | 2 ++ wayland/wlroots/build | 2 ++ wayland/wlsunset/build | 2 ++ wayland/xkeyboard-config/build | 2 ++ 109 files changed, 172 insertions(+), 88 deletions(-) diff --git a/core/b3sum/build b/core/b3sum/build index b08af1cb..fb79f372 100755 --- a/core/b3sum/build +++ b/core/b3sum/build @@ -1,4 +1,4 @@ #!/bin/sh -e make LDFLAGS="$LDFLAGS -static" -make PREFIX=/usr install +make PREFIX=/usr DESTDIR="$1" install diff --git a/core/binutils/build b/core/binutils/build index e46070d5..95e0e155 100755 --- a/core/binutils/build +++ b/core/binutils/build @@ -29,6 +29,6 @@ export PATH="$PATH:$PWD" make configure-host make tooldir=/usr -make tooldir=/usr install +make tooldir=/usr DESTDIR="$1" install ln -sf ld.bfd "$1/usr/bin/ld" diff --git a/core/bison/build b/core/bison/build index 681072ec..4e807e29 100755 --- a/core/bison/build +++ b/core/bison/build @@ -7,7 +7,7 @@ make -make \ +make DESTDIR="$1" \ install-libLIBRARIES \ install-binPROGRAMS \ install-nodist_binSCRIPTS \ diff --git a/core/curl/build b/core/curl/build index d13d7e2f..d6fcb71d 100755 --- a/core/curl/build +++ b/core/curl/build @@ -25,4 +25,4 @@ mv -f _ src/Makefile.in --without-zstd make -make install +make DESTDIR="$1" install diff --git a/core/flex/build b/core/flex/build index f88d01c7..549364be 100755 --- a/core/flex/build +++ b/core/flex/build @@ -6,7 +6,7 @@ ac_cv_func_realloc_0_nonnull=yes make -make install +make DESTDIR="$1" install ln -s flex "$1/usr/bin/lex" diff --git a/core/gcc/build b/core/gcc/build index 6fadcf91..98ff7ad0 100755 --- a/core/gcc/build +++ b/core/gcc/build @@ -50,7 +50,7 @@ esac "${bootstrap:---enable-bootstrap}" make -make install +make DESTDIR="$1" install # Save 35MB. find "$1" -name libgtkpeer.a -exec rm -f {} + diff --git a/core/git/build b/core/git/build index 9b90db02..7e948520 100755 --- a/core/git/build +++ b/core/git/build @@ -24,6 +24,6 @@ EOF ac_cv_fread_reads_directories=yes make LIBS="$(curl-config --static-libs) libgit.a reftable/libreftable.a xdiff/lib.a -lz" -make install +make DESTDIR="$1" install cp -Rf man "$1/usr/share/man" diff --git a/core/grub/build b/core/grub/build index f3360cf1..6a7c7501 100755 --- a/core/grub/build +++ b/core/grub/build @@ -18,6 +18,8 @@ done export CFLAGS CFLAGS=$(printf %s "$CFLAGS" | sed 's/-march=[^ ]*//g') +pkg_dir=$1 + # Force bfd linker to fix issues with alternative linkers. Mold does not yet # have full linker script support and I'm not certain that lld or gold have # ever worked to build Grub. @@ -48,7 +50,7 @@ build_grub() ( "$@" make - make install + make DESTDIR="$pkg_dir" install ) build_grub --with-platform=pc diff --git a/core/m4/build b/core/m4/build index db0f508c..206a476a 100755 --- a/core/m4/build +++ b/core/m4/build @@ -6,4 +6,4 @@ export CFLAGS="$CFLAGS -static" --prefix=/usr make -make install +make DESTDIR="$1" install diff --git a/core/make/build b/core/make/build index 9dd33661..dcb643b3 100755 --- a/core/make/build +++ b/core/make/build @@ -7,4 +7,4 @@ export LDFLAGS="$LDFLAGS -static" --disable-nls make -make install +make DESTDIR="$1" install diff --git a/core/musl/build b/core/musl/build index d410bf9b..2c0e089e 100755 --- a/core/musl/build +++ b/core/musl/build @@ -10,7 +10,7 @@ # --enable-debug make -make install +make DESTDIR="$1" install mkdir -p "$1/usr/bin" ln -s /usr/lib/ld-musl-x86_64.so.1 "$1/usr/bin/ldd" diff --git a/core/pigz/build b/core/pigz/build index 6f2e5864..770e4f08 100755 --- a/core/pigz/build +++ b/core/pigz/build @@ -3,18 +3,16 @@ # Intentional, globbing disabled. # shellcheck disable=2086 -set -- pigz.o yarn.o try.o - -for f do +for f in pigz.o yarn.o try.o; do "$CC" -c -o "$f" "${f%%.o}.c" $CPPFLAGS -DNOZOPFLI $CFLAGS done "$CC" -static -o pigz "$@" $CPPFLAGS $CFLAGS -lz $LDFLAGS mkdir -p \ - "$DESTDIR/usr/bin" \ - "$DESTDIR/usr/share/man/man1" + "$1/usr/bin" \ + "$1/usr/share/man/man1" -cp -f pigz "$DESTDIR/usr/bin" -ln -sf pigz "$DESTDIR/usr/bin/gzip" -cp -f pigz.1 "$DESTDIR/usr/share/man/man1" -ln -sf pigz.1 "$DESTDIR/usr/share/man/man1/gzip.1" +cp -f pigz "$1/usr/bin" +ln -sf pigz "$1/usr/bin/gzip" +cp -f pigz.1 "$1/usr/share/man/man1" +ln -sf pigz.1 "$1/usr/share/man/man1/gzip.1" diff --git a/core/xz/build b/core/xz/build index 3c4c03b1..e3e6de52 100755 --- a/core/xz/build +++ b/core/xz/build @@ -6,7 +6,7 @@ --disable-nls make -make install +make DESTDIR="$1" install # Link the binaries statically cd src @@ -17,6 +17,6 @@ make LDFLAGS="$LDFLAGS -all-static" -C lzmainfo make LDFLAGS="$LDFLAGS -all-static" -C xzdec for bin in xz/xz lzmainfo/lzmainfo xzdec/lzmadec xzdec/xzdec; do - cp "$bin" "$DESTDIR/usr/bin" - chmod 755 "$DESTDIR/usr/bin/${bin##*/}" + cp "$bin" "$1/usr/bin" + chmod 755 "$1/usr/bin/${bin##*/}" done diff --git a/core/zlib/build b/core/zlib/build index 39962de2..18eccdee 100755 --- a/core/zlib/build +++ b/core/zlib/build @@ -6,4 +6,4 @@ export CFLAGS="$CFLAGS -fPIC" --prefix=/usr make -make install +make DESTDIR="$1" install diff --git a/extra/adwaita-icon-theme/build b/extra/adwaita-icon-theme/build index 76301af8..6daf22f8 100755 --- a/extra/adwaita-icon-theme/build +++ b/extra/adwaita-icon-theme/build @@ -4,4 +4,4 @@ --prefix=/usr make -make install +make DESTDIR="$1" install diff --git a/extra/alsa-lib/build b/extra/alsa-lib/build index 24194801..d6f70b3d 100755 --- a/extra/alsa-lib/build +++ b/extra/alsa-lib/build @@ -5,4 +5,4 @@ --prefix=/usr make -make install +make DESTDIR="$1" install diff --git a/extra/alsa-utils/build b/extra/alsa-utils/build index 6a561fe4..22c739fe 100755 --- a/extra/alsa-utils/build +++ b/extra/alsa-utils/build @@ -10,4 +10,4 @@ --disable-nls make -make install +make DESTDIR="$1" install diff --git a/extra/bkeymaps/build b/extra/bkeymaps/build index e053b227..448588e5 100755 --- a/extra/bkeymaps/build +++ b/extra/bkeymaps/build @@ -1,6 +1,6 @@ #!/bin/sh -e -make install +make DESTDIR="$1" install cp -fr colemak "$1/usr/share/bkeymaps" diff --git a/extra/cairo/build b/extra/cairo/build index 17843ad7..bb542798 100755 --- a/extra/cairo/build +++ b/extra/cairo/build @@ -23,4 +23,4 @@ sh ./configure \ --disable-gtk-doc-html make -make install +make DESTDIR="$1" install diff --git a/extra/ccache/build b/extra/ccache/build index a6979cca..cb4bc4e1 100755 --- a/extra/ccache/build +++ b/extra/ccache/build @@ -1,5 +1,6 @@ #!/bin/sh -e +export DESTDIR="$1" export LDFLAGS="$LDFLAGS -static" cmake -B build \ diff --git a/extra/clang/build b/extra/clang/build index d12dc8d7..c5afd9f6 100755 --- a/extra/clang/build +++ b/extra/clang/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + cmake -B build \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/extra/cmake/build b/extra/cmake/build index ea314ac1..14105d9a 100755 --- a/extra/cmake/build +++ b/extra/cmake/build @@ -1,6 +1,8 @@ #!/bin/sh -e if command -v cmake >/dev/null; then + export DESTDIR="$1" + cmake -B build \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ @@ -25,7 +27,7 @@ else -DBUILD_CursesDialog=OFF make - make install + make DESTDIR="$1" install fi rm -rf \ diff --git a/extra/dhcpcd/build b/extra/dhcpcd/build index ffab03b4..64a4d95c 100755 --- a/extra/dhcpcd/build +++ b/extra/dhcpcd/build @@ -9,7 +9,7 @@ --without-udev make -make BINMODE=755 install +make DESTDIR="$1" BINMODE=755 install # Install runit service. mkdir -p "$1/etc/sv/dhcpcd" diff --git a/extra/dosfstools/build b/extra/dosfstools/build index 53a77c41..efcf47c7 100755 --- a/extra/dosfstools/build +++ b/extra/dosfstools/build @@ -11,4 +11,4 @@ mv -f _ Makefile.in --enable-compat-symlinks make -make install +make DESTDIR="$1" install diff --git a/extra/e2fsprogs/build b/extra/e2fsprogs/build index c5eb1c88..8439a1ec 100755 --- a/extra/e2fsprogs/build +++ b/extra/e2fsprogs/build @@ -17,6 +17,7 @@ export LDFLAGS="$LDFLAGS -static" make set -- \ + DESTDIR="$1" \ MKDIR_P="mkdir -p" \ BLKID_MAN="" \ BLKID_PROG="" \ diff --git a/extra/efivar/build b/extra/efivar/build index 5f7dcd5e..f35ec3b8 100755 --- a/extra/efivar/build +++ b/extra/efivar/build @@ -4,4 +4,4 @@ mv docs/efisecdb.1.mdoc docs/efisecdb.1 make COMPILER="$CC" -make libdir=/usr/lib/ install +make DESTDIR="$1" libdir=/usr/lib/ install diff --git a/extra/eiwd/build b/extra/eiwd/build index 35139ff3..9d28eb39 100755 --- a/extra/eiwd/build +++ b/extra/eiwd/build @@ -7,7 +7,7 @@ --disable-dbus make -make install +make DESTDIR="$1" install cp -f iwd_passphrase "$1/usr/bin" diff --git a/extra/expat/build b/extra/expat/build index e336fc14..60957ef5 100755 --- a/extra/expat/build +++ b/extra/expat/build @@ -8,7 +8,7 @@ --without-docbook make -make install +make DESTDIR="$1" install # Remove documentation (Changelogs, etc). rm -rf "${1:?}/usr/share" diff --git a/extra/ffmpeg/build b/extra/ffmpeg/build index e9b65e92..a0d26afa 100755 --- a/extra/ffmpeg/build +++ b/extra/ffmpeg/build @@ -32,6 +32,6 @@ patch -p1 < add-av_stream_get_first_dts-for-chromium.patch --x86asmexe=nasm \ make -make install +make DESTDIR="$1" install rm -rf "$1/usr/share/ffmpeg/examples" diff --git a/extra/firefox/build b/extra/firefox/build index 4bbe0e7a..2fb75580 100755 --- a/extra/firefox/build +++ b/extra/firefox/build @@ -72,7 +72,7 @@ ac_add_options --disable-system-extension-dirs EOF ./mach build -./mach install +DESTDIR="$1" ./mach install # Remove a lot of uneeded "stuff". rm -rf \ diff --git a/extra/fontconfig/build b/extra/fontconfig/build index 8131236f..c969c8c5 100755 --- a/extra/fontconfig/build +++ b/extra/fontconfig/build @@ -16,4 +16,4 @@ mv -f _ src/Makefile.in --disable-nls make -make install +make DESTDIR="$1" install diff --git a/extra/freetype-harfbuzz/build b/extra/freetype-harfbuzz/build index abcfd9f1..7ba9beb2 100755 --- a/extra/freetype-harfbuzz/build +++ b/extra/freetype-harfbuzz/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + build_freetype() ( cd freetype diff --git a/extra/gdk-pixbuf/build b/extra/gdk-pixbuf/build index b38d0f05..ba35fba9 100755 --- a/extra/gdk-pixbuf/build +++ b/extra/gdk-pixbuf/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ --sysconfdir=/etc \ diff --git a/extra/glib/build b/extra/glib/build index 51bf47e2..d9589909 100755 --- a/extra/glib/build +++ b/extra/glib/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + : > fuzzing/meson.build meson \ diff --git a/extra/gnugrep/build b/extra/gnugrep/build index 7225fde1..fbb8421d 100755 --- a/extra/gnugrep/build +++ b/extra/gnugrep/build @@ -6,6 +6,6 @@ export CFLAGS="$CFLAGS -Wno-error -static" --prefix=/usr make -make install +make DESTDIR="$1" install cp -f src/grep "$1/usr/bin/ggrep" diff --git a/extra/gtk+3/build b/extra/gtk+3/build index 254368fb..5b29f00c 100755 --- a/extra/gtk+3/build +++ b/extra/gtk+3/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + for p in *.patch; do patch -p1 < "$p" done diff --git a/extra/hicolor-icon-theme/build b/extra/hicolor-icon-theme/build index 0402819f..c647b8ef 100755 --- a/extra/hicolor-icon-theme/build +++ b/extra/hicolor-icon-theme/build @@ -3,4 +3,4 @@ ./configure \ --prefix=/usr -make install +make DESTDIR="$1" install diff --git a/extra/hwdata/build b/extra/hwdata/build index 70244812..f525957d 100755 --- a/extra/hwdata/build +++ b/extra/hwdata/build @@ -5,4 +5,4 @@ --disable-blacklist make -make install +make DESTDIR="$1" install diff --git a/extra/intel-vaapi-driver/build b/extra/intel-vaapi-driver/build index 5944de23..64ee0e20 100755 --- a/extra/intel-vaapi-driver/build +++ b/extra/intel-vaapi-driver/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ . output diff --git a/extra/json-c/build b/extra/json-c/build index 94e488d6..1eafe3c4 100755 --- a/extra/json-c/build +++ b/extra/json-c/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + cmake -B build \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ diff --git a/extra/kirc/build b/extra/kirc/build index e894bf26..c9e824d3 100755 --- a/extra/kirc/build +++ b/extra/kirc/build @@ -1,4 +1,4 @@ #!/bin/sh -e make -make -j1 PREFIX=/usr install +make -j1 DESTDIR="$1" PREFIX=/usr install diff --git a/extra/lame/build b/extra/lame/build index 5e5ea18c..50e8ce45 100755 --- a/extra/lame/build +++ b/extra/lame/build @@ -12,4 +12,4 @@ mv -f _ doc/Makefile.in --disable-gtktest make -make install +make DESTDIR="$1" install diff --git a/extra/libass/build b/extra/libass/build index a30536c2..ecec930a 100755 --- a/extra/libass/build +++ b/extra/libass/build @@ -14,4 +14,4 @@ sh ./configure \ --enable-fontconfig make -make install +make DESTDIR="$1" install diff --git a/extra/libelf/build b/extra/libelf/build index 9e48196c..65476650 100755 --- a/extra/libelf/build +++ b/extra/libelf/build @@ -16,8 +16,8 @@ sh ./configure \ # Skip the default make target and build only what we need. make -C lib make -C libelf -make -C libelf install -make -C doc install-man3 +make -C libelf DESTDIR="$1" install +make -C doc DESTDIR="$1" install-man3 mkdir -p "$1/usr/lib/pkgconfig" cp -f config/libelf.pc "$1/usr/lib/pkgconfig/libelf.pc" diff --git a/extra/libepoxy/build b/extra/libepoxy/build index ff3c5aca..998828f4 100755 --- a/extra/libepoxy/build +++ b/extra/libepoxy/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson setup \ -Dprefix=/usr \ -Degl=yes \ diff --git a/extra/libffi/build b/extra/libffi/build index b88bb10b..a91b1f4b 100755 --- a/extra/libffi/build +++ b/extra/libffi/build @@ -6,4 +6,4 @@ --with-pic make -make install +make DESTDIR="$1" install diff --git a/extra/libjpeg-turbo/build b/extra/libjpeg-turbo/build index cb77f394..9fabf405 100755 --- a/extra/libjpeg-turbo/build +++ b/extra/libjpeg-turbo/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + patch -p1 < no-docs.patch cmake -B build \ diff --git a/extra/libogg/build b/extra/libogg/build index 23f4c481..bcfd5e5a 100755 --- a/extra/libogg/build +++ b/extra/libogg/build @@ -4,7 +4,9 @@ --prefix=/usr make -C src -make -C include install -make -C src install +make -C include DESTDIR="$1" install +make -C src DESTDIR="$1" install -make install-m4dataDATA install-pkgconfigDATA +make DESTDIR="$1" \ + install-m4dataDATA \ + install-pkgconfigDATA diff --git a/extra/libpng/build b/extra/libpng/build index 7c2308d3..af08fd60 100755 --- a/extra/libpng/build +++ b/extra/libpng/build @@ -6,4 +6,4 @@ patch -p1 < apng.patch --prefix=/usr make -make install +make DESTDIR="$1" install diff --git a/extra/libretls/build b/extra/libretls/build index 76301af8..6daf22f8 100755 --- a/extra/libretls/build +++ b/extra/libretls/build @@ -4,4 +4,4 @@ --prefix=/usr make -make install +make DESTDIR="$1" install diff --git a/extra/libtheora/build b/extra/libtheora/build index 0c18c39f..ad7d2a35 100755 --- a/extra/libtheora/build +++ b/extra/libtheora/build @@ -7,6 +7,6 @@ patch -p1 < fix-theoraenc.patch --prefix=/usr make -make -C lib install -make -C include install -make install-pkgconfigDATA +make -C lib DESTDIR="$1" install +make -C include DESTDIR="$1" install +make DESTDIR="$1" install-pkgconfigDATA diff --git a/extra/libudev-zero/build b/extra/libudev-zero/build index 6e849ad0..c9885dcb 100755 --- a/extra/libudev-zero/build +++ b/extra/libudev-zero/build @@ -1,7 +1,7 @@ #!/bin/sh -ef make PREFIX=/usr -make PREFIX=/usr install +make PREFIX=/usr DESTDIR="$1" install mkdir -p "$1/usr/bin" diff --git a/extra/libva-utils/build b/extra/libva-utils/build index 42713b2a..fd5a0757 100755 --- a/extra/libva-utils/build +++ b/extra/libva-utils/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ --sysconfdir=/etc \ diff --git a/extra/libva/build b/extra/libva/build index 1073e074..61b326d5 100755 --- a/extra/libva/build +++ b/extra/libva/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ --sysconfdir=/etc \ diff --git a/extra/libvorbis/build b/extra/libvorbis/build index 5f88d413..764ac6f6 100755 --- a/extra/libvorbis/build +++ b/extra/libvorbis/build @@ -5,8 +5,10 @@ make -make -C lib install -make -C include install +make -C lib DESTDIR="$1" install +make -C include DESTDIR="$1" install -make install-m4dataDATA install-pkgconfigDATA +make DESTDIR="$1" \ + install-m4dataDATA \ + install-pkgconfigDATA diff --git a/extra/libvpx/build b/extra/libvpx/build index 6702dd56..04a9284a 100755 --- a/extra/libvpx/build +++ b/extra/libvpx/build @@ -25,4 +25,4 @@ sh ./configure \ --as=nasm make -make install +make DESTDIR="$1" install diff --git a/extra/libwebp/build b/extra/libwebp/build index ff9ad4f2..e03fe6a4 100755 --- a/extra/libwebp/build +++ b/extra/libwebp/build @@ -9,4 +9,4 @@ --enable-libwebpdecoder make -make install +make DESTDIR="$1" install diff --git a/extra/llvm/build b/extra/llvm/build index 198bfbc5..339e5172 100755 --- a/extra/llvm/build +++ b/extra/llvm/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + mv Modules/* cmake/modules/ cmake -B build \ diff --git a/extra/mandoc/build b/extra/mandoc/build index a2974ded..b023523e 100755 --- a/extra/mandoc/build +++ b/extra/mandoc/build @@ -21,6 +21,6 @@ EOF sh ./configure make -make -j1 base-install +make -j1 DESTDIR="$1" base-install chmod 755 "$1/usr/bin/"* diff --git a/extra/mdevd/build b/extra/mdevd/build index b8e300ed..8436f4d9 100755 --- a/extra/mdevd/build +++ b/extra/mdevd/build @@ -5,7 +5,7 @@ --enable-static-libc make -make install +make DESTDIR="$1" install mkdir -p "$1/etc/sv/mdevd" cp -f mdevd.conf "$1/etc" diff --git a/extra/mesa/build b/extra/mesa/build index d2dab394..2bc516f9 100755 --- a/extra/mesa/build +++ b/extra/mesa/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + # rust_std is not (yet?) supported by muon, and we should try # to avoid a hard rust dependency here if possible. sed "s/, 'rust_std=2021'//" meson.build > _ diff --git a/extra/mold/build b/extra/mold/build index f09e441d..2ecee125 100755 --- a/extra/mold/build +++ b/extra/mold/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + # Force a static build so shared library breakage does not also break the # linker (and therefore the ability to recover from the issue). # XXX: Static linking prevents mold from using dlopen() which is required diff --git a/extra/mpv/build b/extra/mpv/build index df511114..5e18cd9d 100755 --- a/extra/mpv/build +++ b/extra/mpv/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ -Dalsa=enabled \ diff --git a/extra/mutt/build b/extra/mutt/build index 3c927027..42ba7b90 100755 --- a/extra/mutt/build +++ b/extra/mutt/build @@ -16,7 +16,7 @@ mv -f _ Makefile.in --with-ssl make -make install-exec +make DESTDIR="$1" install-exec rm -f "$1/etc/mime.types" diff --git a/extra/nasm/build b/extra/nasm/build index 76301af8..6daf22f8 100755 --- a/extra/nasm/build +++ b/extra/nasm/build @@ -4,4 +4,4 @@ --prefix=/usr make -make install +make DESTDIR="$1" install diff --git a/extra/ncurses/build b/extra/ncurses/build index 74b21116..30d99b76 100755 --- a/extra/ncurses/build +++ b/extra/ncurses/build @@ -14,7 +14,7 @@ --without-cxx-binding make -make install +make DESTDIR="$1" install # Force ncurses to link against wide-character ncurses library. for lib in ncurses form panel menu; do diff --git a/extra/nspr/build b/extra/nspr/build index d5c7a0e5..a651eb59 100755 --- a/extra/nspr/build +++ b/extra/nspr/build @@ -15,7 +15,7 @@ CFLAGS="$CFLAGS -D_PR_POLL_AVAILABLE -D_PR_HAVE_OFF64_T -D_PR_INET6 \ --enable-64bit make -make install +make DESTDIR="$1" install # $1 is never unset # shellcheck disable=2115 diff --git a/extra/opendoas/build b/extra/opendoas/build index b633f7ae..4987b7cd 100755 --- a/extra/opendoas/build +++ b/extra/opendoas/build @@ -10,7 +10,7 @@ BINGRP="$(id -g)" \ --without-pam make -make install +make DESTDIR="$1" install mkdir -p "$1/etc" cp -f doas.conf "$1/etc" diff --git a/extra/openresolv/build b/extra/openresolv/build index d4257db8..9b9fa59d 100755 --- a/extra/openresolv/build +++ b/extra/openresolv/build @@ -6,4 +6,4 @@ --sysconfdir=/etc make -make install +make DESTDIR="$1" install diff --git a/extra/opus/build b/extra/opus/build index 9f5fc699..23f46765 100755 --- a/extra/opus/build +++ b/extra/opus/build @@ -6,4 +6,4 @@ --enable-float-approx make -make install +make DESTDIR="$1" install diff --git a/extra/pango/build b/extra/pango/build index 5ce154db..91f7d490 100755 --- a/extra/pango/build +++ b/extra/pango/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + patch -p1 < no-fribidi.patch # Disable download of missing (optional) dependencies diff --git a/extra/pcre2/build b/extra/pcre2/build index 98cfc826..f086ea76 100755 --- a/extra/pcre2/build +++ b/extra/pcre2/build @@ -9,4 +9,4 @@ --enable-jit make -make install +make DESTDIR="$1" install diff --git a/extra/pkgconf/build b/extra/pkgconf/build index 5c58a1e7..1dbf7ad3 100755 --- a/extra/pkgconf/build +++ b/extra/pkgconf/build @@ -5,7 +5,7 @@ --sysconfdir=/etc make -make install +make DESTDIR="$1" install ln -s pkgconf "$1/usr/bin/pkg-config" diff --git a/extra/python/build b/extra/python/build index 18e17610..09ceaf97 100755 --- a/extra/python/build +++ b/extra/python/build @@ -23,7 +23,7 @@ done --with-ensurepip=yes make EXTRA_CFLAGS="$CFLAGS -DTHREAD_STACK_SIZE=0x100000" -make install +make DESTDIR="$1" install ln -s python3 "$1/usr/bin/python" ln -s pip3 "$1/usr/bin/pip" diff --git a/extra/rust/build b/extra/rust/build index 542ff206..f4e5ae4a 100755 --- a/extra/rust/build +++ b/extra/rust/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + patch -p1 < fix-curl.patch # Instruct the compiler to trim absolute paths in resulting binaries and instead diff --git a/extra/samurai/build b/extra/samurai/build index ecfecf43..3fc3bb05 100755 --- a/extra/samurai/build +++ b/extra/samurai/build @@ -1,7 +1,7 @@ #!/bin/sh -e make PREFIX=/usr -make PREFIX=/usr install +make PREFIX=/usr DESTDIR="$1" install ln -sf samu "$1/usr/bin/ninja" ln -sf samu.1 "$1/usr/share/man/man1/ninja.1" diff --git a/extra/scdoc/build b/extra/scdoc/build index 21cd2e73..88032b7b 100755 --- a/extra/scdoc/build +++ b/extra/scdoc/build @@ -1,4 +1,4 @@ #!/bin/sh -e make PREFIX=/usr -make PREFIX=/usr install +make PREFIX=/usr DESTDIR="$1" install diff --git a/extra/sqlite/build b/extra/sqlite/build index b91ef34b..0392280e 100755 --- a/extra/sqlite/build +++ b/extra/sqlite/build @@ -11,4 +11,4 @@ export CPPFLAGS="$CPPFLAGS -DSQLITE_ENABLE_COLUMN_METADATA" ac_cv_search_readline=no \ make -make install +make DESTDIR="$1" install diff --git a/extra/ssu/build b/extra/ssu/build index 20f4f1e3..264eade0 100755 --- a/extra/ssu/build +++ b/extra/ssu/build @@ -2,6 +2,7 @@ make make \ + DESTDIR="$1" \ PREFIX=/usr \ BINOWN="$(id -u)" \ BINGRP="$(id -g)" \ diff --git a/extra/strace/build b/extra/strace/build index 1fb23d55..4012cb52 100755 --- a/extra/strace/build +++ b/extra/strace/build @@ -5,4 +5,4 @@ --disable-mpers make -make install +make DESTDIR="$1" install diff --git a/extra/tzdata/build b/extra/tzdata/build index 0685a003..16c13805 100755 --- a/extra/tzdata/build +++ b/extra/tzdata/build @@ -1,11 +1,13 @@ #!/bin/sh -e +pkg_dir=$1 + make make DESTDIR="$1" ZICDIR=/usr/bin install set -- africa asia australasia europe northamerica southamerica -./zic -d "$DESTDIR/usr/share/zoneinfo" "$@" -./zic -d "$DESTDIR/usr/share/zoneinfo/posix" "$@" -./zic -d "$DESTDIR/usr/share/zoneinfo/right" -L leapseconds "$@" -./zic -d "$DESTDIR/usr/share/zoneinfo" -p America/New_York +./zic -d "$pkg_dir/usr/share/zoneinfo" "$@" +./zic -d "$pkg_dir/usr/share/zoneinfo/posix" "$@" +./zic -d "$pkg_dir/usr/share/zoneinfo/right" -L leapseconds "$@" +./zic -d "$pkg_dir/usr/share/zoneinfo" -p America/New_York diff --git a/extra/util-linux/build b/extra/util-linux/build index 7434968e..e6fe58d0 100755 --- a/extra/util-linux/build +++ b/extra/util-linux/build @@ -18,7 +18,7 @@ --without-systemd make -make install +make DESTDIR="$1" install # Fix broken --sbindir. mv -f "$1/usr/sbin/"* "$1/usr/bin" diff --git a/extra/vim/build b/extra/vim/build index d7849f7c..cb9b2ce9 100755 --- a/extra/vim/build +++ b/extra/vim/build @@ -17,4 +17,4 @@ --without-x make -make install +make DESTDIR="$1" install diff --git a/extra/wpa_supplicant/build b/extra/wpa_supplicant/build index bbce8181..13c83779 100755 --- a/extra/wpa_supplicant/build +++ b/extra/wpa_supplicant/build @@ -6,7 +6,7 @@ export CFLAGS cd wpa_supplicant make LIBDIR=/usr/lib BINDIR=/usr/bin -make LIBDIR=/usr/lib BINDIR=/usr/bin install +make LIBDIR=/usr/lib BINDIR=/usr/bin DESTDIR="$1" install mkdir -p \ "$1/usr/share/man/man5" \ diff --git a/extra/x264/build b/extra/x264/build index 3472f21a..1a829438 100755 --- a/extra/x264/build +++ b/extra/x264/build @@ -10,4 +10,4 @@ patch -p1 < portability.patch --enable-shared make -make install +make DESTDIR="$1" install diff --git a/extra/x265/build b/extra/x265/build index be42f483..2bc1c919 100755 --- a/extra/x265/build +++ b/extra/x265/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + cmake source \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release diff --git a/extra/zstd/build b/extra/zstd/build index 58de5871..e1c778c3 100755 --- a/extra/zstd/build +++ b/extra/zstd/build @@ -4,6 +4,7 @@ sed 's/^FLAGS.*=/FLAGS = -static /' programs/Makefile > _ mv -f _ programs/Makefile make \ + DESTDIR="$1" \ PREFIX=/usr \ HAVE_LZMA=0 \ HAVE_ZLIB=0 \ diff --git a/testing/firefox/build b/testing/firefox/build index 4bbe0e7a..2fb75580 100755 --- a/testing/firefox/build +++ b/testing/firefox/build @@ -72,7 +72,7 @@ ac_add_options --disable-system-extension-dirs EOF ./mach build -./mach install +DESTDIR="$1" ./mach install # Remove a lot of uneeded "stuff". rm -rf \ diff --git a/wayland/compose-tables/build b/wayland/compose-tables/build index 17602cb6..67be492f 100755 --- a/wayland/compose-tables/build +++ b/wayland/compose-tables/build @@ -10,4 +10,4 @@ patch -p1 < compose-only.patch --without-xmlto make -C nls -make -C nls install +make -C nls DESTDIR="$1" install diff --git a/wayland/fcft/build b/wayland/fcft/build index 2bdcb12e..4e99b4bb 100755 --- a/wayland/fcft/build +++ b/wayland/fcft/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ -Dsvg-backend=none \ diff --git a/wayland/foot-pgo/build b/wayland/foot-pgo/build index 4f387fc4..332c6509 100755 --- a/wayland/foot-pgo/build +++ b/wayland/foot-pgo/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + [ "$WAYLAND_DISPLAY" ] || { printf 'error: foot-pgo requires a running wayland session\n' >&2 exit 1 diff --git a/wayland/foot/build b/wayland/foot/build index e8f8cc26..fb27672c 100755 --- a/wayland/foot/build +++ b/wayland/foot/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ --buildtype=release \ diff --git a/wayland/grim/build b/wayland/grim/build index 1cd0b8ca..612ca870 100755 --- a/wayland/grim/build +++ b/wayland/grim/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ -Djpeg=disabled \ diff --git a/wayland/libdrm/build b/wayland/libdrm/build index 8f09db30..50105c43 100755 --- a/wayland/libdrm/build +++ b/wayland/libdrm/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ -Dvalgrind=disabled \ diff --git a/wayland/libinput/build b/wayland/libinput/build index 75cd5d78..1e9eee4f 100755 --- a/wayland/libinput/build +++ b/wayland/libinput/build @@ -1,5 +1,6 @@ #!/bin/sh -e +export DESTDIR="$1" export CFLAGS="$CFLAGS -fPIC" # Build fails with clang due to -Werror (forced on) and diff --git a/wayland/libpciaccess/build b/wayland/libpciaccess/build index 9968f495..b5164b4f 100755 --- a/wayland/libpciaccess/build +++ b/wayland/libpciaccess/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson setup \ -Dprefix=/usr \ output diff --git a/wayland/libseat/build b/wayland/libseat/build index 25041710..72793b99 100755 --- a/wayland/libseat/build +++ b/wayland/libseat/build @@ -3,6 +3,7 @@ # Build fails in with clang due to # -Werror -> -Wsign-compare. export CFLAGS="-Wno-error $CFLAGS" +export DESTDIR="$1" meson \ --prefix=/usr \ diff --git a/wayland/libxkbcommon/build b/wayland/libxkbcommon/build index 2b2b084f..7079a15d 100755 --- a/wayland/libxkbcommon/build +++ b/wayland/libxkbcommon/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ --libexecdir=/usr/lib \ diff --git a/wayland/pixman/build b/wayland/pixman/build index b4c16e1f..b99a873e 100755 --- a/wayland/pixman/build +++ b/wayland/pixman/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson setup \ -Dprefix=/usr \ -Dgtk=disabled \ diff --git a/wayland/slurp/build b/wayland/slurp/build index e886a4e4..7649f1b1 100755 --- a/wayland/slurp/build +++ b/wayland/slurp/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ --buildtype=release \ diff --git a/wayland/sway/build b/wayland/sway/build index 6960a13c..891ecb55 100755 --- a/wayland/sway/build +++ b/wayland/sway/build @@ -5,6 +5,8 @@ sed 's/0.25f, 0.25f, 0.25f/0.929, 0.870, 0.678/' \ sway/desktop/render.c > _ mv -f _ sway/desktop/render.c +export DESTDIR="$1" + meson \ --prefix=/usr \ -Ddefault-wallpaper=false \ diff --git a/wayland/tllist/build b/wayland/tllist/build index ccd8c113..8030b49a 100755 --- a/wayland/tllist/build +++ b/wayland/tllist/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ . output diff --git a/wayland/wayclip/build b/wayland/wayclip/build index 21cd2e73..88032b7b 100755 --- a/wayland/wayclip/build +++ b/wayland/wayclip/build @@ -1,4 +1,4 @@ #!/bin/sh -e make PREFIX=/usr -make PREFIX=/usr install +make PREFIX=/usr DESTDIR="$1" install diff --git a/wayland/wayland-protocols/build b/wayland/wayland-protocols/build index 20bceb1c..7ca9d78a 100755 --- a/wayland/wayland-protocols/build +++ b/wayland/wayland-protocols/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ --buildtype=release \ diff --git a/wayland/wayland/build b/wayland/wayland/build index 43e5a7d0..e36717c9 100755 --- a/wayland/wayland/build +++ b/wayland/wayland/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ -Ddefault_library=both \ diff --git a/wayland/wbg/build b/wayland/wbg/build index 4e8fa915..c1e46315 100755 --- a/wayland/wbg/build +++ b/wayland/wbg/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ --buildtype=release \ diff --git a/wayland/wlroots/build b/wayland/wlroots/build index abac0a3d..c3b257c9 100755 --- a/wayland/wlroots/build +++ b/wayland/wlroots/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ -Ddefault_library=both \ diff --git a/wayland/wlsunset/build b/wayland/wlsunset/build index e886a4e4..7649f1b1 100755 --- a/wayland/wlsunset/build +++ b/wayland/wlsunset/build @@ -1,5 +1,7 @@ #!/bin/sh -e +export DESTDIR="$1" + meson \ --prefix=/usr \ --buildtype=release \ diff --git a/wayland/xkeyboard-config/build b/wayland/xkeyboard-config/build index c87d783e..53e69e9a 100755 --- a/wayland/xkeyboard-config/build +++ b/wayland/xkeyboard-config/build @@ -9,6 +9,8 @@ mv -f _ rules/meson.build sed "/subdir('po')/d" meson.build > _ mv -f _ meson.build +export DESTDIR="$1" + meson setup \ -Dprefix=/usr \ output