Makefile revision 5680
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# CDDL HEADER START
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# The contents of this file are subject to the terms of the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# Common Development and Distribution License (the "License").
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# You may not use this file except in compliance with the License.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# or http://www.opensolaris.org/os/licensing.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# See the License for the specific language governing permissions
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# and limitations under the License.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# When distributing Covered Code, include this CDDL HEADER in each
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# If applicable, add the following below this CDDL HEADER, with the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# CDDL HEADER END
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncBUILD_BITS= 32
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncinclude ../../make-rules/shared-macros.mk
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCOMPONENT_NAME= hplip
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCOMPONENT_VERSION= 3.15.7
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncTPNO= 24589
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCOMPONENT_ARCHIVE_HASH= sha256:d310903048f3600f93422e5a8c39ddd682511e0849cd9abc5e943f9a10bdd49d
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCOMPONENT_ARCHIVE_URL= http://prdownloads.sourceforge.net/hplip/$(COMPONENT_ARCHIVE)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCOMPONENT_PROJECT_URL= http://hplipopensource.com/hplip-web/index.html
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCOMMON_TARGETS= no
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncinclude $(WS_MAKE_RULES)/common.mk
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncPKG_OPTIONS += -I $(COMPONENT_DIR)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# We need to be able to return from void functions
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCFLAGS.studio += $(studio_FEATURES_EXTENSIONS)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCXXFLAGS.studio += $(studio_FEATURES_EXTENSIONS)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCXXFLAGS.studio += $(studio_CXXLIB_CSTD)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncROOTPPDCACHE = $(PROTOUSRLIBDIR)/lp/caches/SUNWhpijs.cache
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# common configure options
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCONFIGURE_OPTIONS += --localedir=$(CONFIGURE_LOCALEDIR)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCONFIGURE_OPTIONS += --disable-pp-build
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCONFIGURE_OPTIONS += --disable-gui-build
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCONFIGURE_OPTIONS += --disable-qt4
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCONFIGURE_OPTIONS += am_cv_python_pythondir="$(PYTHON_VENDOR_PACKAGES)"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCONFIGURE_OPTIONS += am_cv_python_pyexecdir="$(PYTHON_VENDOR_PACKAGES)"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncifeq ($(OS_VERSION),5.11)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncLDFLAGS += -lnsl
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncendif
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncHPLIP_VARIANT = $(BUILD_DIR)/$(MACH32)-hplip
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncHPIJS_VARIANT = $(BUILD_DIR)/$(MACH32)-hpijs
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncVARIANTS = $(HPLIP_VARIANT) $(HPIJS_VARIANT)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# We build two variants: for the CUPS/SANE support
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# and for the HPIJS only support
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# use these options for the CUPS/SANE support
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-hpppddir=$(USRSHAREDIR)/cups/model/SUNWhplip
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-libusb01_build
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-fax-build
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpcups-install
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-new-hpcups
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-cups-drv-install
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# use these options for the HPIJS only support
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-foomatic-ppd-install
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-hpppddir=$(USRSHAREDIR)/ppd/SUNWhpijs/HP
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-cups-drv-install
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-hpcups-install
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-doc-build
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpijs-only-build
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpijs-install
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCOMPONENT_INSTALL_ARGS += -e
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCOMPONENT_PRE_CONFIGURE_ACTION = \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync ($(CLONEY) $(SOURCE_DIR) $(@D))
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# Generate configuration scripts
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(HPLIP_VARIANT)/.built: COMPONENT_PREP_ACTION = \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync (cd $(@D) ; autoconf )
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync$(BUILD_DIR)/.allvariantsinstalled: $(VARIANTS:%=%/.installed)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync $(RM) $(ROOTPPDCACHE)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync $(MKDIR) $(PROTO_DIR)/usr/lib/lp/caches
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync ($(ENV) VER="$(BUILD_DIR)/$(MACH32)-hpijs" \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync PPDSRC="$(PROTO_DIR)/usr/share/ppd/SUNWhpijs" \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync DONOTINSTALL="/dev/null" \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync CACHE="$(ROOTPPDCACHE)" \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync IPATH="/usr/share/ppd/$(BUILD_DIR)/" \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync $(KSH93) cache.ksh)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync # set version of python interpreter to calm the pkglint
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync find $(PROTO_DIR) -name \*.py -print0 | \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync while IFS= read -r -d $$'\0' file; do \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync /usr/bin/sed -e '1,1s&^#!.*python[:blank:]\{0,\}$$&#!$(PYTHON.$(PYTHON_VERSION))&' \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync $$file > $$file.pyverset ; \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync done
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync find $(PROTO_DIR) -name \*.py.pyverset -print0 | \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync while IFS= read -r -d $$'\0' file; do \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync $(MV) $$file `echo $$file | sed -e 's/[.]pyverset$$//'` ; \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync done
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync $(PYTHON.$(PYTHON_VERSION)) -m compileall $(PROTO_DIR)/usr/share/hplip/
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync $(TOUCH) $@
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncPKG_MACROS += PYVER=$(PYTHON_VERSION)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# Since it looks like you can't build HPLIP with both HPIJS and CUPS support
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# and seperate the HPIJS and CUPS PPD data, we need to replicate the code and
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# build it twice. Once for the HPIJS support used by LP and once for the rest
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# of the support used for CUPS and SANE.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncconfigure: $(VARIANTS:%=%/.configured)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncbuild: $(VARIANTS:%=%/.built)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncinstall: $(BUILD_DIR)/.allvariantsinstalled
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# empty test target
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsynctest: $(NO_TESTS)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncsystem-test: $(NO_TESTS)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncREQUIRED_PACKAGES += image/library/libjpeg
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncREQUIRED_PACKAGES += library/print/cups-libs
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncREQUIRED_PACKAGES += library/security/openssl
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncREQUIRED_PACKAGES += print/cups
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncREQUIRED_PACKAGES += image/scanner/xsane/sane-backends
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncREQUIRED_PACKAGES += runtime/perl-512
8a5e0b7c43d7ee861689984edc2abd86b9ed4456vboxsyncREQUIRED_PACKAGES += runtime/python-27
8a5e0b7c43d7ee861689984edc2abd86b9ed4456vboxsyncREQUIRED_PACKAGES += system/library/c++-runtime
8a5e0b7c43d7ee861689984edc2abd86b9ed4456vboxsyncREQUIRED_PACKAGES += system/library/libdbus
8a5e0b7c43d7ee861689984edc2abd86b9ed4456vboxsyncREQUIRED_PACKAGES += system/library/math
8a5e0b7c43d7ee861689984edc2abd86b9ed4456vboxsyncREQUIRED_PACKAGES += system/library/usb/libusb
8a5e0b7c43d7ee861689984edc2abd86b9ed4456vboxsyncREQUIRED_PACKAGES += system/management/snmp/net-snmp
8a5e0b7c43d7ee861689984edc2abd86b9ed4456vboxsync