Makefile revision 4921
5cd4555ad444fd391002ae32450572054369fd42Rob Austein#
5cd4555ad444fd391002ae32450572054369fd42Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# CDDL HEADER START
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson#
4d42b714be10e6f163d23507e4e3a396a8ac0364Automatic Updater# The contents of this file are subject to the terms of the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# Common Development and Distribution License (the "License").
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# You may not use this file except in compliance with the License.
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater#
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# or http://www.opensolaris.org/os/licensing.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# See the License for the specific language governing permissions
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson#
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews# CDDL HEADER END
9a859983d7059a6eb9c877c1d2ac6a3a5b7170f7Evan Hunt#
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark Andrews# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude ../../make-rules/shared-macros.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_NAME= hplip
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_VERSION= 3.15.7
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinTPNO= 24589
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_ARCHIVE_HASH= sha256:d310903048f3600f93422e5a8c39ddd682511e0849cd9abc5e943f9a10bdd49d
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_ARCHIVE_URL= http://prdownloads.sourceforge.net/hplip/$(COMPONENT_ARCHIVE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_PROJECT_URL= http://hplipopensource.com/hplip-web/index.html
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_BUGDB= utility/hplip
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(WS_MAKE_RULES)/prep.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(WS_MAKE_RULES)/configure.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(WS_MAKE_RULES)/ips.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinPKG_OPTIONS += -I $(COMPONENT_DIR)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews# Enable ASLR for this component
26e2a07a0b6a3b1eccef82ba31270d0c54ad4f06Mark AndrewsASLR_MODE = $(ASLR_ENABLE)
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark Andrews
7b8b5e34b6daf793373580dfb095f56af5e918ceAutomatic Updater# We need to be able to return from void functions
d60212e03fbef1d3dd7f7eb05c0545cc373cb9fcAutomatic UpdaterCC += $(studio_FEATURES_EXTENSIONS)
4d42b714be10e6f163d23507e4e3a396a8ac0364Automatic UpdaterCXX += $(studio_FEATURES_EXTENSIONS) $(studio_NORUNPATH) $(studio_CXXLIB_CSTD)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinROOTPPDCACHE = $(PROTO_DIR)/usr/lib/lp/caches/SUNWhpijs.cache
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinPYTHON_VERSION = 2.7
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# common configure options
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --localedir=$(CONFIGURE_LOCALEDIR)
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark AndrewsCONFIGURE_OPTIONS += --disable-pp-build
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --disable-gui-build
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --disable-qt4
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += am_cv_python_pythondir="$(PYTHON_VENDOR_PACKAGES)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += am_cv_python_pyexecdir="$(PYTHON_VENDOR_PACKAGES)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV += LDFLAGS=" -lnsl"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinHPLIP_VARIANT = $(BUILD_DIR)/$(MACH32)-hplip
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinHPIJS_VARIANT = $(BUILD_DIR)/$(MACH32)-hpijs
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinVARIANTS = $(HPLIP_VARIANT) $(HPIJS_VARIANT)
0db6bf459f7afa1f9dc0690a521df19955c89dbfJeremy Reed
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# We build two variants: for the CUPS/SANE support
a268fec7f54a89a0772a91da0511c8eae09e6157Mark Andrews# and for the HPIJS only support
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# use these options for the CUPS/SANE support
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/cups/model/SUNWhplip
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-libusb01_build
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-fax-build
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpcups-install
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-new-hpcups
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-cups-drv-install
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# use these options for the HPIJS only support
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-foomatic-ppd-install
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/ppd/SUNWhpijs/HP
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-cups-drv-install
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-hpcups-install
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-doc-build
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpijs-only-build
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpijs-install
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininstall: COMPONENT_INSTALL_ENV += halpredir=/etc/hal/fdi/preprobe/10osvendor
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_INSTALL_ARGS += -e
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_PRE_CONFIGURE_ACTION = \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein ($(CLONEY) $(SOURCE_DIR) $(@D))
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Generate configuration scripts
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(HPLIP_VARIANT)/.built: COMPONENT_PREP_ACTION = \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein (cd $(@D) ; autoconf )
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(BUILD_DIR)/.allvariantsinstalled: $(VARIANTS:%=%/.installed)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(RM) $(ROOTPPDCACHE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(MKDIR) $(PROTO_DIR)/usr/lib/lp/caches
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein ($(ENV) VER="$(BUILD_DIR)/$(MACH32)-hpijs" \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein PPDSRC="$(PROTO_DIR)/usr/share/ppd/SUNWhpijs" \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein DONOTINSTALL="/dev/null" \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein CACHE="$(ROOTPPDCACHE)" \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein IPATH="/usr/share/ppd/$(BUILD_DIR)/" \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(KSH93) cache.ksh)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein # set version of python interpreter to calm the pkglint
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews find $(PROTO_DIR) -name \*.py -print0 | \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein while IFS= read -r -d $$'\0' file; do \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein /usr/bin/sed -e '1,1s&^#!.*python[:blank:]\{0,\}$$&#!$(PYTHON.$(PYTHON_VERSION))&' \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $$file > $$file.pyverset ; \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein done
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein find $(PROTO_DIR) -name \*.py.pyverset -print0 | \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein while IFS= read -r -d $$'\0' file; do \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(MV) $$file `echo $$file | sed -e 's/[.]pyverset$$//'` ; \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein done
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(PYTHON.$(PYTHON_VERSION)) -m compileall $(PROTO_DIR)/usr/share/hplip/
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(TOUCH) $@
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinPKG_MACROS += PYVER=$(PYTHON_VERSION)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
d4f032db535ad5194d442fec535123f269422055Jeremy Reed# Since it looks like you can't build HPLIP with both HPIJS and CUPS support
d4f032db535ad5194d442fec535123f269422055Jeremy Reed# and seperate the HPIJS and CUPS PPD data, we need to replicate the code and
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# build it twice. Once for the HPIJS support used by LP and once for the rest
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# of the support used for CUPS and SANE.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinconfigure: $(VARIANTS:%=%/.configured)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinbuild: $(VARIANTS:%=%/.built)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininstall: $(BUILD_DIR)/.allvariantsinstalled
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
065c66d9bf1c349600027bb50e3759a3736f73abMark Andrews# empty test target
065c66d9bf1c349600027bb50e3759a3736f73abMark Andrewstest: $(NO_TESTS)
065c66d9bf1c349600027bb50e3759a3736f73abMark Andrews
d4f032db535ad5194d442fec535123f269422055Jeremy Reedsystem-test: $(NO_TESTS)
d4f032db535ad5194d442fec535123f269422055Jeremy Reed
065c66d9bf1c349600027bb50e3759a3736f73abMark Andrews
065c66d9bf1c349600027bb50e3759a3736f73abMark AndrewsREQUIRED_PACKAGES += image/library/libjpeg
065c66d9bf1c349600027bb50e3759a3736f73abMark AndrewsREQUIRED_PACKAGES += library/print/cups-libs
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += library/security/openssl
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += print/cups
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += image/scanner/xsane/sane-backends
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += runtime/perl-512
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += runtime/python-27
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/library
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/library/c++-runtime
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/library/libdbus
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/library/math
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/library/usb/libusb
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/linker
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/management/snmp/net-snmp
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein