Skip to content

Commit

Permalink
fix(*): add pyhack to packages that use pip (pacstall#4954)
Browse files Browse the repository at this point in the history
  • Loading branch information
oklopfer authored Nov 25, 2023
1 parent 5d2aaf4 commit d3d4d9e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 16 deletions.
3 changes: 1 addition & 2 deletions packages/bpytop-git/bpytop-git.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ pkgver="1.0.68"
makedepends=("make" "python3" "python3-pip" "python3-distutils")
depends=("python3" "python3-pip" "python3-distutils")
pkgdesc="Linux/OSX/FreeBSD resource monitor."
hash="9ee4aff7dd84b5475401793b925530c3cfad15c9bb3b4b73c9e875daf919d66c"
release="$(lsb_release -cs)"
modern=("devel" "sid" "lunar" "bookworm" "mantic")
modern=("devel" "sid" "lunar" "bookworm" "mantic" "noble" "trixie" "testing" "unstable")
pkgver() {
git ls-remote "${url}" master | cut -f1 | cut -c1-8
}
Expand Down
15 changes: 12 additions & 3 deletions packages/qtile-git/qtile-git.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,24 @@ pkgver() {
git ls-remote "${url}" master | cut -f1 | cut -c1-8
}

release="$(lsb_release -cs)"
modern=("devel" "sid" "lunar" "bookworm" "mantic" "noble" "trixie" "testing" "unstable")
# shellcheck disable=SC2076
if [[ " ${modern[*]} " =~ " ${release} " ]]; then
pyhack=("--break-system-packages")
else
pyhack=()
fi

package() {
sudo pip3 install --upgrade --no-cache --force-reinstall cairocffi cffi xcffib
sudo pip3 install dbus-next setuptools-scm setuptools
sudo pip3 install --upgrade --no-cache --force-reinstall cairocffi cffi xcffib "${pyhack[@]}"
sudo pip3 install dbus-next setuptools-scm setuptools "${pyhack[@]}"
sudo mkdir -p "${pkgdir}"/usr/share/xsessions
sudo chown root:root ./
sudo python3 setup.py install --root="${pkgdir}"
sudo cp ./resources/qtile.desktop "${pkgdir}"/usr/share/xsessions/qtile.desktop
}

post_remove() {
sudo pip3 uninstall dbus-next setuptools-scm setuptools
sudo pip3 uninstall dbus-next setuptools-scm setuptools "${pyhack[@]}"
}
25 changes: 15 additions & 10 deletions packages/tenacity-git/tenacity-git.pacscript
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name="tenacity-git"
url="https://codeberg.org/tenacityteam/tenacity.git"
pkgver="1.3.1"
makedepends=("python3-pip" "build-essential" "libavcodec-dev" "libavformat-dev" "libavutil-dev" "libavdevice-dev" "libavfilter-dev" "libpostproc-dev" "libportsmf-dev" "libflac++-dev" "libglib2.0-dev" "libgtk-3-dev" "libid3tag0-dev" "libjack-jackd2-dev" "liblilv-dev" "libmad0-dev" "libmp3lame-dev" "libogg-dev" "libpng-dev" "portaudio19-dev" "libportmidi-dev" "libserd-dev" "libsndfile1-dev" "libsord-dev" "libsoundtouch-dev" "libsoxr-dev" "libsuil-dev" "libtwolame-dev" "vamp-plugin-sdk" "libvorbis-dev" "lv2-dev" "zlib1g-dev" "cmake" "ninja-build" "libjpeg-dev" "libtiff-dev" "liblzma-dev" "libsqlite3-dev" "libwxgtk3.2-dev")
makedepends=("python3-pip" "build-essential" "ninja-build" "libavcodec-dev" "libavformat-dev" "libavutil-dev" "libavdevice-dev" "libavfilter-dev" "libpostproc-dev" "libportsmf-dev" "libflac++-dev" "libglib2.0-dev" "libgtk-3-dev" "libid3tag0-dev" "libjack-jackd2-dev" "liblilv-dev" "libmad0-dev" "libmp3lame-dev" "libogg-dev" "libpng-dev" "portaudio19-dev" "libportmidi-dev" "libserd-dev" "libsndfile1-dev" "libsord-dev" "libsoundtouch-dev" "libsoxr-dev" "libsuil-dev" "libtwolame-dev" "vamp-plugin-sdk" "libvorbis-dev" "lv2-dev" "zlib1g-dev" "cmake" "ninja-build" "libjpeg-dev" "libtiff-dev" "liblzma-dev" "libsqlite3-dev" "libwxgtk3.2-dev" "libjsoncpp-dev" "libzip-dev" "zipcmp" "zipmerge" "ziptool" "libzip4")
depends=("libc6" "libexpat1" "libgcc-s1" "libgdk-pixbuf-2.0-0" "libglib2.0-0" "libgtk-3-0" "libid3tag0" "liblilv-0-0" "libmad0" "libogg0" "libportaudio2" "libsndfile1" "libsoundtouch1" "libsoxr0" "libstdc++6" "libsuil-0-0" "libtwolame0" "libvamp-hostsdk3v5" "libvorbis0a" "libvorbisenc2" "libvorbisfile3")
codename="$(lsb_release -cs)"
case "${codename}" in
Expand All @@ -25,20 +25,25 @@ pkgver() {
}
incompatible=("ubuntu:bionic" "ubuntu:focal" "ubuntu:jammy" "debian:stretch" "debian:buster" "debian:bullseye")

modern=("devel" "sid" "lunar" "bookworm" "mantic" "noble" "trixie" "testing" "unstable")
# shellcheck disable=SC2076
if [[ " ${modern[*]} " =~ " ${codename} " ]]; then
pyhack=("--break-system-packages")
else
pyhack=()
fi

prepare() {
sudo pip3 install conan
sudo pip3 install conan "${pyhack[@]}"
}

build() {
mkdir build
cd build || exit
cmake -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DFFMPEG=ON ..
sudo make -j"${NCPU}"
cmake -G Ninja -S . -B build \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX="${pkgdir}/usr/local"
sudo cmake --build build
}

package() {
cd build || exit
sudo make install DESTDIR="${pkgdir}"
sudo cmake --install build
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@ pkgver() {
git ls-remote "${url}" main | cut -f1 | cut -c1-8
}

release="$(lsb_release -cs)"
modern=("devel" "sid" "lunar" "bookworm" "mantic" "noble" "trixie" "testing" "unstable")
# shellcheck disable=SC2076
if [[ " ${modern[*]} " =~ " ${release} " ]]; then
pyhack=("--break-system-packages")
else
pyhack=()
fi

prepare() {
sudo pip3 install distro
sudo pip3 install distro "${pyhack[@]}"
}

build() {
Expand Down

0 comments on commit d3d4d9e

Please sign in to comment.