Makefile revision 3996
0N/A#
3909N/A#
0N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
0N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
2362N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
0N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
0N/A#
0N/Ainclude ../../make-rules/shared-macros.mk
0N/A
0N/ACOMPONENT_NAME= hplip
0N/ACOMPONENT_VERSION= 3.14.6
0N/ATPNO= 18296
0N/ACOMPONENT_PROJECT_URL= http://hplipopensource.com/hplip-web/index.html
0N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
0N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
4378N/ACOMPONENT_ARCHIVE_HASH= sha256:a57233cd0e2db1dcf1d34d8b90c6a9d3e027e522695aada6c3c411a839868b8e
4378N/ACOMPONENT_ARCHIVE_URL= http://sourceforge.net/projects/hplip/files/hplip/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
4378N/ACOMPONENT_BUGDB= utility/hplip
4378N/A
4378N/Ainclude $(WS_MAKE_RULES)/prep.mk
4378N/Ainclude $(WS_MAKE_RULES)/configure.mk
4378N/Ainclude $(WS_MAKE_RULES)/ips.mk
4378N/A
4378N/APKG_OPTIONS += -I $(COMPONENT_DIR)
0N/A
0N/A# Enable ASLR for this component
0N/AASLR_MODE = $(ASLR_ENABLE)
0N/A
0N/A# We need to be able to return from void functions
0N/ACC += $(studio_FEATURES_EXTENSIONS)
0N/ACXX += $(studio_FEATURES_EXTENSIONS) $(studio_NORUNPATH) $(studio_CXXLIB_CSTD)
0N/A
0N/AROOTPPDCACHE = $(PROTO_DIR)/usr/lib/lp/caches/SUNWhpijs.cache
0N/A
0N/A# version aligned with 12.0
0N/APYTHON_VERSION = 2.7
0N/A
0N/A# common configure options
0N/ACONFIGURE_OPTIONS += --localedir=$(CONFIGURE_LOCALEDIR)
0N/ACONFIGURE_OPTIONS += --disable-pp-build
0N/ACONFIGURE_OPTIONS += --disable-gui-build
0N/ACONFIGURE_OPTIONS += --disable-qt4
0N/ACONFIGURE_OPTIONS += am_cv_python_pythondir="$(PYTHON_VENDOR_PACKAGES)"
0N/ACONFIGURE_OPTIONS += am_cv_python_pyexecdir="$(PYTHON_VENDOR_PACKAGES)"
0N/A
0N/ACONFIGURE_ENV += LDFLAGS=" -lnsl"
0N/A
0N/AHPLIP_VARIANT = $(BUILD_DIR)/$(MACH32)-hplip
0N/AHPIJS_VARIANT = $(BUILD_DIR)/$(MACH32)-hpijs
0N/A
0N/AVARIANTS = $(HPLIP_VARIANT) $(HPIJS_VARIANT)
0N/A
0N/A# We build two variants: for the CUPS/SANE support
0N/A# and for the HPIJS only support
0N/A
0N/A# use these options for the CUPS/SANE support
0N/A$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/cups/model/SUNWhplip
0N/A$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-libusb01_build
0N/A$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-fax-build
0N/A$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpcups-install
0N/A$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-new-hpcups
0N/A$(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-cups-drv-install
0N/A
0N/A# use these options for the HPIJS only support
0N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-foomatic-ppd-install
0N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/ppd/SUNWhpijs/HP
0N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-cups-drv-install
0N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-hpcups-install
0N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-doc-build
0N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpijs-only-build
0N/A$(HPIJS_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpijs-install
0N/A
0N/Ainstall: COMPONENT_INSTALL_ENV += halpredir=/etc/hal/fdi/preprobe/10osvendor
0N/A
0N/ACOMPONENT_INSTALL_ARGS += -e
0N/A
0N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
0N/A ($(CLONEY) $(SOURCE_DIR) $(@D))
0N/A
0N/A# Generate configuration scripts
0N/A$(HPLIP_VARIANT)/.built: COMPONENT_PREP_ACTION = \
0N/A (cd $(@D) ; autoconf )
0N/A
0N/A
0N/A$(BUILD_DIR)/.allvariantsinstalled: $(VARIANTS:%=%/.installed)
0N/A $(RM) $(ROOTPPDCACHE)
0N/A $(MKDIR) $(PROTO_DIR)/usr/lib/lp/caches
0N/A ($(ENV) VER="$(BUILD_DIR)/$(MACH32)-hpijs" \
0N/A PPDSRC="$(PROTO_DIR)/usr/share/ppd/SUNWhpijs" \
0N/A DONOTINSTALL="/dev/null" \
0N/A CACHE="$(ROOTPPDCACHE)" \
0N/A IPATH="/usr/share/ppd/$(BUILD_DIR)/" \
0N/A $(KSH93) cache.ksh)
0N/A # set version of python interpreter to calm the pkglint
0N/A find $(PROTO_DIR) -name \*.py -print0 | \
0N/A while IFS= read -r -d $$'\0' file; do \
0N/A /usr/bin/sed -e '1,1s&^#!.*python[:blank:]\{0,\}$$&#!$(PYTHON.$(PYTHON_VERSION))&' \
0N/A $$file > $$file.pyverset ; \
0N/A done
0N/A find $(PROTO_DIR) -name \*.py.pyverset -print0 | \
0N/A while IFS= read -r -d $$'\0' file; do \
0N/A $(MV) $$file `echo $$file | sed -e 's/[.]pyverset$$//'` ; \
0N/A done
0N/A $(PYTHON.$(PYTHON_VERSION)) -m compileall $(PROTO_DIR)/usr/share/hplip/
0N/A $(TOUCH) $@
0N/A
0N/APKG_MACROS += PYVER=$(PYTHON_VERSION)
0N/A#
0N/A# Since it looks like you can't build HPLIP with both HPIJS and CUPS support
0N/A# and seperate the HPIJS and CUPS PPD data, we need to replicate the code and
0N/A# build it twice. Once for the HPIJS support used by LP and once for the rest
0N/A# of the support used for CUPS and SANE.
0N/A#
0N/Aconfigure: $(VARIANTS:%=%/.configured)
0N/A
0N/Abuild: $(VARIANTS:%=%/.built)
0N/A
0N/Ainstall: $(BUILD_DIR)/.allvariantsinstalled
0N/A
0N/A# empty test target
0N/Atest: $(NO_TESTS)
0N/A
0N/AREQUIRED_PACKAGES += image/library/libjpeg
0N/AREQUIRED_PACKAGES += image/scanner/xsane/sane-backends
0N/AREQUIRED_PACKAGES += library/print/cups-libs
0N/AREQUIRED_PACKAGES += runtime/python-27
0N/AREQUIRED_PACKAGES += system/library
0N/AREQUIRED_PACKAGES += system/library/c++-runtime
0N/AREQUIRED_PACKAGES += system/library/libdbus
0N/AREQUIRED_PACKAGES += system/library/math
0N/AREQUIRED_PACKAGES += system/library/usb/libusb
0N/AREQUIRED_PACKAGES += system/linker
0N/AREQUIRED_PACKAGES += system/management/snmp/net-snmp
0N/A