Commit ee52a272 authored by totte's avatar totte

hplip: Remove old if clause to fix build

[testing] #129
parent 809c3f4a
Pipeline #2750 passed with stages
in 4 minutes and 32 seconds
......@@ -28,46 +28,36 @@ sha512sums=('b1d663a3538a19ab2c195bc627c765b9dded047b0431f6fc2096a8a31b4efb5cf52
validpgpkeys=('4ABA2F66DBD5A95894910E0673D770CDA59047B9') # HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>
prepare() {
cd $pkgname-$pkgver
export PYTHON=python3
find . -type f -exec sed -i 's~^#.*env python~#!/usr/bin/env python3~' {} +
sed -i '1s|#!/usr/bin/python|#!/usr/bin/python3|' doctor.py setup.py makeuri.py logcapture.py base/magic.py
sed -i '1s|#!/usr/bin/python|#!/usr/bin/python3|' ui/upgradeform.py uninstall.py upgrade.py config_usb_printer.py
sed -i 's|python ./print.py|python3 ./print.py|' scan.py
sed -i 's|python ./testpage.py|python3 ./testpage.py|' setup.py
sed -i 's|python ./setup.py|python3 ./setup.py|' ui4/devmgr5.py ui4/nodevicesdialog.py
sed -i 's|python %HOME%|python3 %HOME%|' base/utils.py
sed -i 's|python ./plugin.py|python3 ./plugin.py|' base/pkit.py
sed -i 's|/usr/bin/python|/usr/bin/python3|' data/rules/hplip-printer@.service
# disable insecure update - https://bugs.archlinux.org/task/38083
patch -Np0 -i ${srcdir}/disable_upgrade.patch
# add missing 'include <cups/ppd.h>' at various places
patch -Np1 -i ${srcdir}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
# fix some handling unicode file names FS#58412
patch -Np1 -i ${srcdir}/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch
# remove binary blob libImageProcessor and all linking - FS#59681
patch -Np1 -i ${srcdir}/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
# Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
# The hpcups driver does not use foomatic-rip
local i
for i in ppd/hpijs/*.ppd.gz ; do
rm -f ${i}.temp
gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \
gzip > ${i}.temp || return 1
mv ${i}.temp ${i}
done
export AUTOMAKE='automake --foreign'
autoreconf --force --install
cd $pkgname-$pkgver
export PYTHON=python3
find . -type f -exec sed -i 's~^#.*env python~#!/usr/bin/env python3~' {} +
sed -i '1s|#!/usr/bin/python|#!/usr/bin/python3|' doctor.py setup.py makeuri.py logcapture.py base/magic.py
sed -i '1s|#!/usr/bin/python|#!/usr/bin/python3|' ui/upgradeform.py uninstall.py upgrade.py config_usb_printer.py
sed -i 's|python ./print.py|python3 ./print.py|' scan.py
sed -i 's|python ./testpage.py|python3 ./testpage.py|' setup.py
sed -i 's|python ./setup.py|python3 ./setup.py|' ui4/devmgr5.py ui4/nodevicesdialog.py
sed -i 's|python %HOME%|python3 %HOME%|' base/utils.py
sed -i 's|python ./plugin.py|python3 ./plugin.py|' base/pkit.py
sed -i 's|/usr/bin/python|/usr/bin/python3|' data/rules/hplip-printer@.service
# disable insecure update - https://bugs.archlinux.org/task/38083
patch -Np0 -i ${srcdir}/disable_upgrade.patch
# add missing 'include <cups/ppd.h>' at various places
patch -Np1 -i ${srcdir}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
# fix some handling unicode file names FS#58412
patch -Np1 -i ${srcdir}/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch
# remove binary blob libImageProcessor and all linking - FS#59681
patch -Np1 -i ${srcdir}/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
export AUTOMAKE='automake --foreign'
autoreconf --force --install
}
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr \
cd $pkgname-$pkgver
./configure --prefix=/usr \
--enable-qt5 \
--disable-qt4 \
--disable-foomatic-rip-hplip-install \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment