Message ID | 1363372025-10592-1-git-send-email-olivier.schonken@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
>>>>> "O" == Olivier Schonken <olivier.schonken@gmail.com> writes:
O> HPLIP (Hewlett-Packard Linux Imaging & Printing) is an HP-developed
O> solution for printing, scanning, and faxing with HP inkjet and laser
O> based printers in Linux.
O> Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
O> ---
O> Changelog:
O> The --includedir=$(STAGING_DIR)/usr/include is unfortunately necessary even
O> with the modified Makefile.am for a succesful build.
O> Created a menu for cups related components to be kept close together.
O> Fixed a jpeg and dbus dependencies, Thanks for pointing out the dbus
O> dependency Baruch.
O> Added Licensing information
O> package/Config.in | 3 ++
O> package/hplip/Config.in | 15 ++++++++
O> package/hplip/hplip-fix-make.patch | 74 ++++++++++++++++++++++++++++++++++++
O> package/hplip/hplip.mk | 54 ++++++++++++++++++++++++++
O> 4 files changed, 146 insertions(+)
O> create mode 100644 package/hplip/Config.in
O> create mode 100644 package/hplip/hplip-fix-make.patch
O> create mode 100644 package/hplip/hplip.mk
O> diff --git a/package/Config.in b/package/Config.in
O> index a65054c..21c3ec9 100644
O> --- a/package/Config.in
O> +++ b/package/Config.in
O> @@ -631,7 +631,10 @@ source "package/can-utils/Config.in"
O> source "package/connman/Config.in"
O> source "package/ctorrent/Config.in"
O> source "package/conntrack-tools/Config.in"
O> +menu "cups (common unix printing system)"
O> source "package/cups/Config.in"
O> +source "package/hplip/Config.in"
O> +endmenu #cups
With only a single sub package I don't think the menu makes sense (but
keep hplip right after cups).
O> if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
O> source "package/dhcp/Config.in"
O> endif
O> diff --git a/package/hplip/Config.in b/package/hplip/Config.in
O> new file mode 100644
O> index 0000000..4c673e6
O> --- /dev/null
O> +++ b/package/hplip/Config.in
O> @@ -0,0 +1,15 @@
O> +config BR2_PACKAGE_HPLIP
O> + bool "hplip"
O> + depends on BR2_PACKAGE_CUPS
O> + select BR2_PACKAGE_LIBUSB
O> + select BR2_PACKAGE_JPEG
It needs atleast C++ support as well:
checking whether the C++ compiler works... no
configure: error: in `/home/peko/source/buildroot/output/build/hplip-3.12.11':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
Please check with a minimal build to ensure you have all dependencies.
O> + help
O> + HP Linux Imaging and Printing (HPLIP)
O> + HPLIP is an HP-developed solution for printing, scanning, and faxing
O> + with HP inkjet and laser based printers in Linux. The HPLIP project
O> + provides printing support for 2,211 printer models, including
O> + Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business
O> + Inkjet, LaserJet, Edgeline MFP, and LaserJet MFP.
O> +
O> + http://hplipopensource.com/
O> +
You have a number of trailing spaces and an extra empty line at the
bottom here.
O> diff --git a/package/hplip/hplip.mk b/package/hplip/hplip.mk
O> new file mode 100644
O> index 0000000..2d62392
O> --- /dev/null
O> +++ b/package/hplip/hplip.mk
O> @@ -0,0 +1,54 @@
O> +#############################################################
O> +#
O> +# hplip
O> +#
O> +#############################################################
O> +
O> +HPLIP_VERSION = 3.12.11
Latest version is 3.13.3. Any reason why you are not using that?
O> +HPLIP_SITE = http://downloads.sourceforge.net/hplip/hplip/
That URL doesn't work. It seems like it should be:
http://prdownloads.sourceforge.net/hplip/
O> +HPLIP_AUTORECONF = YES
O> +HPLIP_DEPENDENCIES = cups libusb jpeg
O> +HPLIP_LICENSE = GPLv2 BSD-3c MIT
O> +HPLIP_LICENSE_FILES = COPYING
O> +
O> +HPLIP_CONF_OPT = \
O> + --disable-qt4 \
O> + --disable-scan-build \
O> + --disable-gui-build \
O> + --disable-doc-build \
O> + --disable-network-build \
O> + --enable-hpcups-install \
O> + --disable-hpijs-install \
O> + --enable-cups-ppd-install \
O> + --enable-cups-drv-install \
O> + --disable-foomatic-ppd-install \
O> + --disable-foomatic-drv-install \
O> + --disable-foomatic-rip-hplip-install \
O> + --enable-new-hpcups \
O> + --enable-lite-build \
O> + --with-sysroot=$(STAGING_DIR) \
O> + --includedir=$(STAGING_DIR)/usr/include
We do have qt4, sane, polkit and python in buildroot, so optional
support for these would be nice (but isn't essential).
O> +
O> +ifeq ($(BR2_PACKAGE_DBUS),y)
O> + HPLIP_CONF_OPT += --enable-dbus-build
O> + HPLIP_DEPENDENCIES += dbus
O> +else
O> + HPLIP_CONF_OPT += --disable-dbus-build
O> +endif
Again trailing spaces for both.
O> +
O> +define HPLIP_POST_INSTALL_TARGET_FIXUP
O> + mkdir -p $(TARGET_DIR)/usr/share/hplip/data/models
O> + cp $(@D)/data/models/* $(TARGET_DIR)/usr/share/hplip/data/models
O> +endef
O> +HPLIP_POST_INSTALL_TARGET_HOOKS += HPLIP_POST_INSTALL_TARGET_FIXUP
O> +
O> +define HPLIP_PRE_CONFIGURE_FIXUP
O> + touch $(@D)/AUTHORS
O> + touch $(@D)/ChangeLog
O> + touch $(@D)/CHANGES
O> + touch $(@D)/NEWS
O> + touch $(@D)/README
O> +endef
O> +HPLIP_PRE_CONFIGURE_HOOKS += HPLIP_PRE_CONFIGURE_FIXUP
As far as I can see CHANGES isn't needed. It would be good with a
comment explaining why it is needed (missing from tarball but needed to
autoreconf).
Care to fix these issues and resend?
diff --git a/package/Config.in b/package/Config.in index a65054c..21c3ec9 100644 --- a/package/Config.in +++ b/package/Config.in @@ -631,7 +631,10 @@ source "package/can-utils/Config.in" source "package/connman/Config.in" source "package/ctorrent/Config.in" source "package/conntrack-tools/Config.in" +menu "cups (common unix printing system)" source "package/cups/Config.in" +source "package/hplip/Config.in" +endmenu #cups if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/dhcp/Config.in" endif diff --git a/package/hplip/Config.in b/package/hplip/Config.in new file mode 100644 index 0000000..4c673e6 --- /dev/null +++ b/package/hplip/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_HPLIP + bool "hplip" + depends on BR2_PACKAGE_CUPS + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_JPEG + 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..8f4aab5 --- /dev/null +++ b/package/hplip/hplip-fix-make.patch @@ -0,0 +1,74 @@ +From 6019d012246578ae1a191d3510284e7b894fb528 Mon Sep 17 00:00:00 2001 +From: Olivier Schonken <olivier.schonken@gmail.com> +Date: Sat, 2 Mar 2013 18:01:03 +0200 +Subject: [PATCH] Changed Makefile.am to allow cross-compilation of HPLIP + +Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com> +--- + Makefile.am | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 16ea902..b22f46a 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)/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)/libusb-1.0 -I$(PYTHONINCLUDEDIR) + endif + + # ui (qt3) +@@ -551,26 +551,26 @@ endif + + install-dist_hplip_LogDATA: + if FULL_BUILD +- test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir) +- chgrp "lp" -R $(DESTDIR)$(hplip_Logdir) +- chmod 777 $(DESTDIR)$(hplip_Logdir) ++# test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir) ++# chgrp "lp" -R $(DESTDIR)$(hplip_Logdir) ++# chmod 777 $(DESTDIR)$(hplip_Logdir) + endif #FULL_BUILD + if HPLIP_BUILD +- test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir) +- chgrp "lp" -R $(DESTDIR)$(hplip_Logdir) +- chmod 777 $(DESTDIR)$(hplip_Logdir) ++# test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir) ++# chgrp "lp" -R $(DESTDIR)$(hplip_Logdir) ++# chmod 777 $(DESTDIR)$(hplip_Logdir) + endif #FULL_BUILD + + install-dist_hplip_tmpDATA: + if FULL_BUILD +- test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir) +- chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir) +- chmod 1777 $(DESTDIR)$(hplip_tmpdir) ++# test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir) ++# chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir) ++# chmod 1777 $(DESTDIR)$(hplip_tmpdir) + endif #FULL_BUILD + if HPLIP_BUILD +- test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir) +- chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir) +- chmod 1777 $(DESTDIR)$(hplip_tmpdir) ++# test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir) ++# chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir) ++# chmod 1777 $(DESTDIR)$(hplip_tmpdir) + endif #FULL_BUILD + + install-dist_cronDATA:$(dist_cron_DATA) +-- +1.7.10.4 + diff --git a/package/hplip/hplip.mk b/package/hplip/hplip.mk new file mode 100644 index 0000000..2d62392 --- /dev/null +++ b/package/hplip/hplip.mk @@ -0,0 +1,54 @@ +############################################################# +# +# hplip +# +############################################################# + +HPLIP_VERSION = 3.12.11 +HPLIP_SITE = http://downloads.sourceforge.net/hplip/hplip/ +HPLIP_AUTORECONF = YES +HPLIP_DEPENDENCIES = cups libusb jpeg +HPLIP_LICENSE = GPLv2 BSD-3c MIT +HPLIP_LICENSE_FILES = COPYING + +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)/usr/include + +ifeq ($(BR2_PACKAGE_DBUS),y) + HPLIP_CONF_OPT += --enable-dbus-build + HPLIP_DEPENDENCIES += dbus +else + HPLIP_CONF_OPT += --disable-dbus-build +endif + +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 + +define HPLIP_PRE_CONFIGURE_FIXUP + touch $(@D)/AUTHORS + touch $(@D)/ChangeLog + touch $(@D)/CHANGES + touch $(@D)/NEWS + touch $(@D)/README +endef +HPLIP_PRE_CONFIGURE_HOOKS += HPLIP_PRE_CONFIGURE_FIXUP + +$(eval $(autotools-package))
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 <olivier.schonken@gmail.com> --- Changelog: The --includedir=$(STAGING_DIR)/usr/include is unfortunately necessary even with the modified Makefile.am for a succesful build. Created a menu for cups related components to be kept close together. Fixed a jpeg and dbus dependencies, Thanks for pointing out the dbus dependency Baruch. Added Licensing information package/Config.in | 3 ++ package/hplip/Config.in | 15 ++++++++ package/hplip/hplip-fix-make.patch | 74 ++++++++++++++++++++++++++++++++++++ package/hplip/hplip.mk | 54 ++++++++++++++++++++++++++ 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