From e08ac1d4d82bdfd713e21a73372614b7ae760f4a Mon Sep 17 00:00:00 2001 From: ook37 Date: Fri, 3 May 2024 03:01:27 -0400 Subject: [PATCH] fix(emac{-git}): use `depends` pipes --- packages/emacs-git/emacs-git.pacscript | 26 ++------------------------ packages/emacs/emacs.pacscript | 26 ++------------------------ 2 files changed, 4 insertions(+), 48 deletions(-) diff --git a/packages/emacs-git/emacs-git.pacscript b/packages/emacs-git/emacs-git.pacscript index 031cc9da69..29920e72da 100644 --- a/packages/emacs-git/emacs-git.pacscript +++ b/packages/emacs-git/emacs-git.pacscript @@ -82,28 +82,6 @@ replaces=("${pkgname}" "${pkgname}-nox") source=("https://github.com/emacs-mirror/emacs.git") pkgver="29.1" -################################################################################# -# Weird dependency shenanigans -################################################################################# -if apt-cache search libwebp7 | grep -q "libwebp7"; then - libwebp="libwebp7" -else - libwebp="libwebp6" -fi - -if apt-cache search libgtk-4-dev | grep -q "libgtk-4-dev"; then - libgtk_dev="libgtk-4-dev" -else - libgtk_dev="libgtk-3-dev" -fi - -if apt-cache search libjpeg-turbo8 | grep -q "libjpeg-turbo8"; then - libjpeg_turbo="libjpeg-turbo8" -else - libjpeg_turbo="libjpeg62-turbo" -fi -################################################################################# - if [[ ${GOLD} == "YES" && ${CLANG} != "YES" ]]; then export LD=/usr/bin/ld.gold export CFLAGS+=" -fuse-ld=gold" @@ -150,12 +128,12 @@ elif [[ ${LUCID} == "YES" ]]; then depends+=("dbus" "hicolor-icon-theme" "libxinerama1" "libxfixes3" "liblcms2-2" "librsvg2-2" "xaw3dg" "libxrandr2" "libxi6" "libsm6" "libxcb-util1" "libxcb1") makedepends+=("x11proto-dev") elif [[ ${GTK3} == "YES" ]]; then - depends+=("${libgtk_dev}" "libsm6" "libxcb-util1" "libxcb1") + depends+=("libgtk-4-dev | libgtk-3-dev" "libsm6" "libxcb-util1" "libxcb1") makedepends+=("x11proto-dev" "libxi-dev") fi if [[ ${CLI} != "YES" ]]; then - depends+=("${libjpeg_turbo}" "libpng16-16" "libgif-dev" "${libwebp}" "libtiff5") + depends+=("libjpeg-turbo8 | libjpeg62-turbo" "libpng16-16" "libgif-dev" "libwebp7 | libweb6" "libtiff5") elif [[ ${CLI} == "YES" ]]; then depends+=("") fi diff --git a/packages/emacs/emacs.pacscript b/packages/emacs/emacs.pacscript index 9cf958ba25..3e00a1c4cf 100644 --- a/packages/emacs/emacs.pacscript +++ b/packages/emacs/emacs.pacscript @@ -84,28 +84,6 @@ replaces=("${pkgname}-git" "${pkgname}-nox") sha256sums=("ee21182233ef3232dc97b486af2d86e14042dbb65bbc535df562c3a858232488") repology=("project: emacs") -################################################################################# -# Weird dependency shenanigans -################################################################################# -if apt-cache search libwebp7 | grep -q "libwebp7"; then - libwebp="libwebp7" -else - libwebp="libwebp6" -fi - -if apt-cache search libgtk-4-dev | grep -q "libgtk-4-dev"; then - libgtk_dev="libgtk-4-dev" -else - libgtk_dev="libgtk-3-dev" -fi - -if apt-cache search libjpeg-turbo8 | grep -q "libjpeg-turbo8"; then - libjpeg_turbo="libjpeg-turbo8" -else - libjpeg_turbo="libjpeg62-turbo" -fi -################################################################################# - if [[ ${GOLD} == "YES" && ${CLANG} != "YES" ]]; then export LD=/usr/bin/ld.gold export CFLAGS+=" -fuse-ld=gold" @@ -152,12 +130,12 @@ elif [[ ${LUCID} == "YES" ]]; then depends+=("dbus" "hicolor-icon-theme" "libxinerama1" "libxfixes3" "liblcms2-2" "librsvg2-2" "xaw3dg" "libxrandr2" "libxi6" "libsm6" "libxcb-util1" "libxcb1") makedepends+=("x11proto-dev") elif [[ ${GTK3} == "YES" ]]; then - depends+=("${libgtk_dev}" "libsm6" "libxcb-util1" "libxcb1") + depends+=("libgtk-4-dev | libgtk-3-dev" "libsm6" "libxcb-util1" "libxcb1") makedepends+=("x11proto-dev" "libxi-dev") fi if [[ ${CLI} != "YES" ]]; then - depends+=("${libjpeg_turbo}" "libpng16-16" "libgif-dev" "${libwebp}" "libtiff5") + depends+=("libjpeg-turbo8 | libjpeg62-turbo" "libpng16-16" "libgif-dev" "libwebp7 | libweb6" "libtiff5") elif [[ ${CLI} == "YES" ]]; then depends+=("") fi