diff options
author | Timo Teräs <timo.teras@iki.fi> | 2016-11-04 19:01:52 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-11-04 19:04:35 +0200 |
commit | 4931448865da576d2dd62ddb328b0a631361ef35 (patch) | |
tree | 7d41b059a986bac0092717b662d0683a7cc8bcbd /testing/hplip | |
parent | fbaa29e60dadca4224fa90384237d57eb101c376 (diff) | |
download | aports-4931448865da576d2dd62ddb328b0a631361ef35.tar.bz2 aports-4931448865da576d2dd62ddb328b0a631361ef35.tar.xz |
testing/hplip: revive from unmaintained, and upgrade to new version
fixes #6330
Diffstat (limited to 'testing/hplip')
-rw-r--r-- | testing/hplip/APKBUILD | 48 | ||||
-rw-r--r-- | testing/hplip/disable_upgrade.patch | 14 | ||||
-rw-r--r-- | testing/hplip/fix-includes.patch | 20 |
3 files changed, 82 insertions, 0 deletions
diff --git a/testing/hplip/APKBUILD b/testing/hplip/APKBUILD new file mode 100644 index 0000000000..fd18dd4c5f --- /dev/null +++ b/testing/hplip/APKBUILD @@ -0,0 +1,48 @@ +# Maintainer: +# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org> +# Contributor: Timo Teräs <timo.teras@iki.fi> + +pkgname=hplip +pkgver=3.16.10 +pkgrel=0 +pkgdesc="Drivers for HP printers" +arch=all +url="http://hplipopensource.com" +license="GPL" +depends="python py-dbus" +makedepends="libjpeg-turbo-dev net-snmp-dev cups-dev libusb-dev python-dev" +subpackages="$pkgname-doc" +source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz + fix-includes.patch + disable_upgrade.patch" + +builddir="$srcdir/$pkgname-$pkgver" +build() { + cd "$builddir" + ./configure --prefix=/usr \ + --disable-qt4 \ + --disable-scan-build \ + --disable-fax-build \ + --disable-dbus-build \ + --enable-cups-ppd-install \ + --enable-foomatic-ppd-install \ + --enable-foomatic-drv-install \ + || return 1 + make || return 1 +} + +package() { + make -j1 -C "$builddir" DESTDIR="$pkgdir" install || return 1 + cd "$pkgdir" + rm -rf etc/sane.d etc/xdg usr/share/hal etc/init.d etc/udev +} + +md5sums="dd3bf0ecd410e6961abd86407b7f802f hplip-3.16.10.tar.gz +a9cd9a64bc4e1ba14ef221efdcb0d940 fix-includes.patch +65bddd5951bd2d12a26bbf7b51bcab27 disable_upgrade.patch" +sha256sums="45b44e0334f76069511b0b2a40885a12d055013bc95a62250de5d1abc10dee84 hplip-3.16.10.tar.gz +9a1d8b509d7bcacb03895529e3c6c83704ea784444bf0deae75ac59feb9e32b2 fix-includes.patch +b3f8d91a07216e6aad4dbfdb79ae19496b03c29f56444059b9b93a32c86ceb8e disable_upgrade.patch" +sha512sums="2aa8cdd7ec0aa042f4c159f4db6bf80e0cc4ffd30f060814d44fcce2f2800dc0195c26ccc6f8d10dc9c62b3fcbc0befcf68f3ad6a5a81f63ab6a26a25686bbad hplip-3.16.10.tar.gz +173f0c2bbf0daefc717282bf125d3fd94b3914da0754078c45b58b09ab841672aae9238ca8fc0448486a871e40fc50f960da17c1e07ad3f04053d217ed634498 fix-includes.patch +57e14c581e82a0dd44344524dc4eb4d845843cf0775b60475541cabfb9d67a4fdab501be3977f8ca9888fbbee4d0392e6068c788e7a85cf4c1add5848be21ae7 disable_upgrade.patch" diff --git a/testing/hplip/disable_upgrade.patch b/testing/hplip/disable_upgrade.patch new file mode 100644 index 0000000000..f95b4dfe4b --- /dev/null +++ b/testing/hplip/disable_upgrade.patch @@ -0,0 +1,14 @@ +--- a/upgrade.py 2013-10-31 12:46:54.000000000 +0100 ++++ b/upgrade.py 2013-12-04 14:58:03.000000000 +0100 +@@ -134,6 +134,11 @@ except getopt.GetoptError, e: + if os.getenv("HPLIP_DEBUG"): + log.set_level('debug') + ++ ++log.error("HPLIP upgrade is disabled by Alpine Linux for security reasons, see https://bugs.archlinux.org/task/38083") ++clean_exit(1) ++ ++ + for o, a in opts: + if o in ('-h', '--help'): + usage() diff --git a/testing/hplip/fix-includes.patch b/testing/hplip/fix-includes.patch new file mode 100644 index 0000000000..4389125fda --- /dev/null +++ b/testing/hplip/fix-includes.patch @@ -0,0 +1,20 @@ +diff -ru hplip-3.16.10.orig/protocol/discovery/mdns.c hplip-3.16.10/protocol/discovery/mdns.c +--- hplip-3.16.10.orig/protocol/discovery/mdns.c 2016-10-21 13:48:34.000000000 +0300 ++++ hplip-3.16.10/protocol/discovery/mdns.c 2016-11-03 14:41:38.828298853 +0200 +@@ -24,10 +24,15 @@ + Author: Sanjay Kumar + \*****************************************************************************/ + +-//#include <stdio.h> ++#include <stdio.h> ++#include <ctype.h> ++#include <fcntl.h> ++#include <unistd.h> + #include <string.h> + #include <syslog.h> ++#include <malloc.h> + #include <sys/socket.h> ++#include <sys/select.h> + #include <netinet/in.h> + #include <netdb.h> + #include <arpa/inet.h> |