Makefile revision 6192
165N/A#
165N/A#
165N/A# CDDL HEADER START
165N/A#
165N/A# The contents of this file are subject to the terms of the
165N/A# Common Development and Distribution License (the "License").
165N/A# You may not use this file except in compliance with the License.
165N/A#
165N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
165N/A# or http://www.opensolaris.org/os/licensing.
165N/A# See the License for the specific language governing permissions
165N/A# and limitations under the License.
165N/A#
165N/A# When distributing Covered Code, include this CDDL HEADER in each
165N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
165N/A# If applicable, add the following below this CDDL HEADER, with the
165N/A# fields enclosed by brackets "[]" replaced with your own identifying
165N/A# information: Portions Copyright [yyyy] [name of copyright owner]
165N/A#
165N/A# CDDL HEADER END
165N/A#
5680N/A
165N/A#
5680N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
5680N/A#
5680N/ABUILD_BITS= 32
165N/Ainclude ../../make-rules/shared-macros.mk
165N/A
165N/ACOMPONENT_NAME= hplip
4921N/ACOMPONENT_VERSION= 3.15.7
4921N/ATPNO= 24589
4921N/ACOMPONENT_ARCHIVE_HASH= sha256:d310903048f3600f93422e5a8c39ddd682511e0849cd9abc5e943f9a10bdd49d
4921N/ACOMPONENT_ARCHIVE_URL= http://prdownloads.sourceforge.net/hplip/$(COMPONENT_ARCHIVE)
4921N/ACOMPONENT_PROJECT_URL= http://hplipopensource.com/hplip-web/index.html
165N/A
5680N/ACOMMON_TARGETS= no
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
165N/A
3831N/APKG_OPTIONS += -I $(COMPONENT_DIR)
3831N/A
5680N/A# We need to be able to return from void functions
5680N/ACFLAGS.studio += $(studio_FEATURES_EXTENSIONS)
5680N/ACXXFLAGS.studio += $(studio_FEATURES_EXTENSIONS)
5680N/ACXXFLAGS.studio += $(studio_CXXLIB_CSTD)
2456N/A
5680N/AROOTPPDCACHE = $(PROTOUSRLIBDIR)/lp/caches/SUNWhpijs.cache
165N/A
3831N/A# common configure options
165N/ACONFIGURE_OPTIONS += --localedir=$(CONFIGURE_LOCALEDIR)
165N/ACONFIGURE_OPTIONS += --disable-pp-build
165N/ACONFIGURE_OPTIONS += --disable-gui-build
3831N/ACONFIGURE_OPTIONS += --disable-qt4
6192N/A# bye, bye SANE backends
6192N/ACONFIGURE_OPTIONS += --disable-scan-build
3831N/ACONFIGURE_OPTIONS += am_cv_python_pythondir="$(PYTHON_VENDOR_PACKAGES)"
3831N/ACONFIGURE_OPTIONS += am_cv_python_pyexecdir="$(PYTHON_VENDOR_PACKAGES)"
165N/A
5680N/Aifeq ($(OS_VERSION),5.11)
5680N/ALDFLAGS += -lnsl
5680N/Aendif
165N/A
165N/AHPLIP_VARIANT = $(BUILD_DIR)/$(MACH32)-hplip
165N/AHPIJS_VARIANT = $(BUILD_DIR)/$(MACH32)-hpijs
165N/A
165N/AVARIANTS = $(HPLIP_VARIANT) $(HPIJS_VARIANT)
165N/A
6192N/A# We build two variants: for the CUPS support
165N/A# and for the HPIJS only support
165N/A
6192N/A# use these options for the CUPS support
5680N/A$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-hpppddir=$(USRSHAREDIR)/cups/model/SUNWhplip
4269N/A$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-libusb01_build
4269N/A$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-fax-build
4269N/A$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpcups-install
4269N/A$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-new-hpcups
4269N/A$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-cups-drv-install
165N/A
165N/A# use these options for the HPIJS only support
4269N/A$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-foomatic-ppd-install
5680N/A$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-hpppddir=$(USRSHAREDIR)/ppd/SUNWhpijs/HP
4269N/A$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-cups-drv-install
4269N/A$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-hpcups-install
4269N/A$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-doc-build
4269N/A$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpijs-only-build
4269N/A$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpijs-install
165N/A
165N/ACOMPONENT_INSTALL_ARGS += -e
165N/A
165N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
165N/A ($(CLONEY) $(SOURCE_DIR) $(@D))
165N/A
165N/A# Generate configuration scripts
165N/A$(HPLIP_VARIANT)/.built: COMPONENT_PREP_ACTION = \
165N/A (cd $(@D) ; autoconf )
165N/A
3831N/A$(BUILD_DIR)/.allvariantsinstalled: $(VARIANTS:%=%/.installed)
3831N/A $(RM) $(ROOTPPDCACHE)
3831N/A $(MKDIR) $(PROTO_DIR)/usr/lib/lp/caches
3831N/A ($(ENV) VER="$(BUILD_DIR)/$(MACH32)-hpijs" \
3831N/A PPDSRC="$(PROTO_DIR)/usr/share/ppd/SUNWhpijs" \
3831N/A DONOTINSTALL="/dev/null" \
3831N/A CACHE="$(ROOTPPDCACHE)" \
3831N/A IPATH="/usr/share/ppd/$(BUILD_DIR)/" \
3831N/A $(KSH93) cache.ksh)
3831N/A # set version of python interpreter to calm the pkglint
3831N/A find $(PROTO_DIR) -name \*.py -print0 | \
3831N/A while IFS= read -r -d $$'\0' file; do \
3912N/A /usr/bin/sed -e '1,1s&^#!.*python[:blank:]\{0,\}$$&#!$(PYTHON.$(PYTHON_VERSION))&' \
3831N/A $$file > $$file.pyverset ; \
3831N/A done
3831N/A find $(PROTO_DIR) -name \*.py.pyverset -print0 | \
3831N/A while IFS= read -r -d $$'\0' file; do \
3831N/A $(MV) $$file `echo $$file | sed -e 's/[.]pyverset$$//'` ; \
3831N/A done
3912N/A $(PYTHON.$(PYTHON_VERSION)) -m compileall $(PROTO_DIR)/usr/share/hplip/
3831N/A $(TOUCH) $@
3831N/A
165N/A# Since it looks like you can't build HPLIP with both HPIJS and CUPS support
165N/A# and seperate the HPIJS and CUPS PPD data, we need to replicate the code and
165N/A# build it twice. Once for the HPIJS support used by LP and once for the rest
6192N/A# of the support used for CUPS
165N/A#
3477N/Aconfigure: $(VARIANTS:%=%/.configured)
3477N/A
165N/Abuild: $(VARIANTS:%=%/.built)
165N/A
3831N/Ainstall: $(BUILD_DIR)/.allvariantsinstalled
165N/A
165N/A# empty test target
181N/Atest: $(NO_TESTS)
165N/A
4337N/Asystem-test: $(NO_TESTS)
4337N/A
3817N/AREQUIRED_PACKAGES += image/library/libjpeg
3817N/AREQUIRED_PACKAGES += library/print/cups-libs
3912N/AREQUIRED_PACKAGES += runtime/python-27
3817N/AREQUIRED_PACKAGES += system/library/c++-runtime
3817N/AREQUIRED_PACKAGES += system/library/libdbus
3817N/AREQUIRED_PACKAGES += system/library/math
3817N/AREQUIRED_PACKAGES += system/library/usb/libusb
5910N/AREQUIRED_PACKAGES += system/management/snmp/net-snmp-57