From patchwork Sat Mar 2 17:02:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Schonken X-Patchwork-Id: 224518 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 9D7B82C02F6 for ; Sun, 3 Mar 2013 04:03:33 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9FF6810BA69; Sat, 2 Mar 2013 17:03:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HXCnPScBmwLC; Sat, 2 Mar 2013 17:03:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1AE2F10B979; Sat, 2 Mar 2013 17:03:14 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 7838D8F79A for ; Sat, 2 Mar 2013 17:03:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7EB0C8CEC0 for ; Sat, 2 Mar 2013 17:03:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YB3KyRR2Xrnp for ; Sat, 2 Mar 2013 17:03:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8CA7F8CED2 for ; Sat, 2 Mar 2013 17:03:24 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id hm14so561328wib.15 for ; Sat, 02 Mar 2013 09:03:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=LTqU3eJvcqu/Gpg9hwa+OLUKGTH84ATMjSunYFyoADo=; b=NmI8pUGAIeDWZ0j6FucMKM4nbaapWXskuEbjKhSICsLemQnRdbJKIWX8i9gj06/UVz CUFsA+vN8qqDXJ7IGjqdKT+qE4qa8E7MCweL6Dp/AI4BMx2ENgy9df3LtiaGycaC3FFX 89+dwDldbYzgYipvvv3yeTnVWZQOZBcgey5Gnhlmranx6dmrh5bUG9rTfaBI8TzDgIdy bRc4uoM9JIY3orE+AhOOdYmGCYeBq7bUtcF63KZxSdBuz1yU18844tHjdfSK3tnA+Yxh XhagzulWhCYJlk7hGj3nfDeIzQdnLG80+R9WggjE2Rsel4W5lZ+Mk0p0Pl1tFnl2vRgM WvMA== X-Received: by 10.194.63.240 with SMTP id j16mr23477062wjs.45.1362243803045; Sat, 02 Mar 2013 09:03:23 -0800 (PST) Received: from incognito-desktop.nomad.org (41-132-134-93.dsl.mweb.co.za. [41.132.134.93]) by mx.google.com with ESMTPS id fv2sm4647854wib.6.2013.03.02.09.03.20 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Mar 2013 09:03:22 -0800 (PST) From: Olivier Schonken To: buildroot@busybox.net Date: Sat, 2 Mar 2013 19:02:49 +0200 Message-Id: <1362243769-8714-1-git-send-email-olivier.schonken@gmail.com> X-Mailer: git-send-email 1.7.10.4 Cc: Olivier Schonken Subject: [Buildroot] [PATCH 1/1] Added package HPLIP for printing to HP printers X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net HPLIP (Hewlett-Packard Linux Imaging & Printing) is an HP-developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux. Signed-off-by: Olivier Schonken --- package/cups/Config.in | 1 + package/hplip/Config.in | 13 ++++++ package/hplip/hplip-fix-make.patch | 80 ++++++++++++++++++++++++++++++++++++ package/hplip/hplip.mk | 52 +++++++++++++++++++++++ 4 files changed, 146 insertions(+) create mode 100644 package/hplip/Config.in create mode 100644 package/hplip/hplip-fix-make.patch create mode 100644 package/hplip/hplip.mk diff --git a/package/cups/Config.in b/package/cups/Config.in index dc1c2ed..7b703ff 100644 --- a/package/cups/Config.in +++ b/package/cups/Config.in @@ -18,4 +18,5 @@ config BR2_PACKAGE_CUPS_PDFTOPS comment "pdftops support requires a toolchain with C++ support enabled" depends on !BR2_INSTALL_LIBSTDCPP +source "package/hplip/Config.in" endif diff --git a/package/hplip/Config.in b/package/hplip/Config.in new file mode 100644 index 0000000..b0d802a --- /dev/null +++ b/package/hplip/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_HPLIP + bool "hplip" + select BR2_PACKAGE_LIBUSB + help + HP Linux Imaging and Printing (HPLIP) + HPLIP is an HP-developed solution for printing, scanning, and faxing + with HP inkjet and laser based printers in Linux. The HPLIP project + provides printing support for 2,211 printer models, including + Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business + Inkjet, LaserJet, Edgeline MFP, and LaserJet MFP. + + http://hplipopensource.com/ + diff --git a/package/hplip/hplip-fix-make.patch b/package/hplip/hplip-fix-make.patch new file mode 100644 index 0000000..339e58e --- /dev/null +++ b/package/hplip/hplip-fix-make.patch @@ -0,0 +1,80 @@ +From 1e03ca316a3784290b489470b16c34b7f44a0c75 Mon Sep 17 00:00:00 2001 +From: Olivier Schonken +Date: Sat, 2 Mar 2013 18:01:03 +0200 +Subject: [PATCH] Changed Makefile.am and Makefile.in to allow + cross-compilation of HPLIP + +Signed-off-by: Olivier Schonken +--- + Makefile.am | 4 ++-- + Makefile.in | 16 ++-------------- + 2 files changed, 4 insertions(+), 16 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 16ea902..00ec8da 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -72,7 +72,7 @@ libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/ + io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ + io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb_libusb01.c + else +-libhpmud_la_CFLAGS = -I/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" ++libhpmud_la_CFLAGS = -I$(includedir)/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" + libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/pml.c \ + io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ + io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb.c +@@ -292,7 +292,7 @@ hpmudext_la_LIBADD = libhpmud.la + if LIBUSB01_BUILD + hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) + else +-hpmudext_la_CFLAGS =-I/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR) ++hpmudext_la_CFLAGS =-I$(includedir)/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR) + endif + + # ui (qt3) +diff --git a/Makefile.in b/Makefile.in +index e8e6142..5d9c331 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -4314,7 +4314,7 @@ cups_drv = prnt/drv/hpcups.drv + + # hpmud library + @HPLIP_BUILD_TRUE@MUDNAME = hpmud +-@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@libhpmud_la_CFLAGS = -I/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" ++@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@libhpmud_la_CFLAGS = -I$(includedir)/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" + @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_TRUE@libhpmud_la_CFLAGS = -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" + @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/pml.c \ + @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@ io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ +@@ -4504,7 +4504,7 @@ cups_drv = prnt/drv/hpcups.drv + @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hpmudext_la_LDFLAGS = -module -avoid-version + @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hpmudext_la_SOURCES = io/mudext/hpmudext.c + @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hpmudext_la_LIBADD = libhpmud.la +-@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@hpmudext_la_CFLAGS = -I/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR) ++@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@hpmudext_la_CFLAGS = -I$(includedir)/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR) + @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_TRUE@hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) + + # ui (qt3) +@@ -8865,20 +8865,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-cupsdrv2DATA \ + + + install-dist_hplip_LogDATA: +-@FULL_BUILD_TRUE@ test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir) +-@FULL_BUILD_TRUE@ chgrp "lp" -R $(DESTDIR)$(hplip_Logdir) +-@FULL_BUILD_TRUE@ chmod 777 $(DESTDIR)$(hplip_Logdir) +-@HPLIP_BUILD_TRUE@ test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir) +-@HPLIP_BUILD_TRUE@ chgrp "lp" -R $(DESTDIR)$(hplip_Logdir) +-@HPLIP_BUILD_TRUE@ chmod 777 $(DESTDIR)$(hplip_Logdir) + + install-dist_hplip_tmpDATA: +-@FULL_BUILD_TRUE@ test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir) +-@FULL_BUILD_TRUE@ chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir) +-@FULL_BUILD_TRUE@ chmod 1777 $(DESTDIR)$(hplip_tmpdir) +-@HPLIP_BUILD_TRUE@ test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir) +-@HPLIP_BUILD_TRUE@ chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir) +-@HPLIP_BUILD_TRUE@ chmod 1777 $(DESTDIR)$(hplip_tmpdir) + + install-dist_cronDATA:$(dist_cron_DATA) + test -z "$(DESTDIR)$(crondir)" || $(MKDIR_P) "$(DESTDIR)$(crondir)"; \ +-- +1.7.10.4 + diff --git a/package/hplip/hplip.mk b/package/hplip/hplip.mk new file mode 100644 index 0000000..03fb514 --- /dev/null +++ b/package/hplip/hplip.mk @@ -0,0 +1,52 @@ +############################################################# +# +# hplip +# +############################################################# +HPLIP_VERSION = 3.12.11 +HPLIP_SITE = http://prdownloads.sourceforge.net/hplip/hplip/ +HPLIP_SOURCE = hplip-$(HPLIP_VERSION).tar.gz +HPLIP_INSTALL_STAGING = NO +HPLIP_LIBTOOL_PATCH = YES +HPLIP_AUTORECONF = NO + +#HPLIP_CONF_ENV += \ +# ac_cv_prog_ac_ct_STRIP=arm-none-linux-gnueabi-strip + +HPLIP_CONF_OPT = --disable-qt4 \ + --disable-scan-build \ + --disable-gui-build \ + --disable-doc-build \ + --disable-network-build \ + --enable-hpcups-install \ + --disable-hpijs-install \ + --enable-cups-ppd-install \ + --enable-cups-drv-install \ + --disable-foomatic-ppd-install \ + --disable-foomatic-drv-install \ + --disable-foomatic-rip-hplip-install \ + --enable-new-hpcups \ + --enable-lite-build \ + --with-sysroot=$(STAGING_DIR) \ + --includedir=$(STAGING_DIR) + +ifeq ($(BR2_PACKAGE_DBUS),y) + HPLIP_CONF_OPT += --enable-dbus-build +endif + +ifeq ($(BR2_PREFER_STATIC_LIB),y) + HPLIP_CONF_OPT += --disable-shared +else + HPLIP_CONF_OPT += --enable-shared +endif + +HPLIP_DEPENDENCIES = cups libusb + + +define HPLIP_POST_INSTALL_TARGET_FIXUP + mkdir -p $(TARGET_DIR)/usr/share/hplip/data/models + cp $(@D)/data/models/* $(TARGET_DIR)/usr/share/hplip/data/models +endef +HPLIP_POST_INSTALL_TARGET_HOOKS += HPLIP_POST_INSTALL_TARGET_FIXUP + +$(eval $(autotools-package))