Makefile revision 4346
96fc773162e93e5b85686ab152f11baf4498d868rbb#
6f06d481dafc90f1b553f1d2828bcea50a039854fielding#
a1e0709c89175c34a3f72eb4a83d7ee1621a0884rbb# CDDL HEADER START
a1e0709c89175c34a3f72eb4a83d7ee1621a0884rbb#
a1e0709c89175c34a3f72eb4a83d7ee1621a0884rbb# The contents of this file are subject to the terms of the
a1e0709c89175c34a3f72eb4a83d7ee1621a0884rbb# Common Development and Distribution License (the "License").
4b13b6bcdcfae61d3c58cc2569757651f28f2bbfrbb# You may not use this file except in compliance with the License.
4b13b6bcdcfae61d3c58cc2569757651f28f2bbfrbb#
4b13b6bcdcfae61d3c58cc2569757651f28f2bbfrbb# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34ea1d36f4e1c8d66338e691793017d105cc9c32rbb# or http://www.opensolaris.org/os/licensing.
34ea1d36f4e1c8d66338e691793017d105cc9c32rbb# See the License for the specific language governing permissions
34ea1d36f4e1c8d66338e691793017d105cc9c32rbb# and limitations under the License.
34ea1d36f4e1c8d66338e691793017d105cc9c32rbb#
2c8f06bf370a44a3d0544ed5319355463c417132gregames# When distributing Covered Code, include this CDDL HEADER in each
2c8f06bf370a44a3d0544ed5319355463c417132gregames# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2c8f06bf370a44a3d0544ed5319355463c417132gregames# If applicable, add the following below this CDDL HEADER, with the
db06e09891b001667974483058923b88c3258324rbb# fields enclosed by brackets "[]" replaced with your own identifying
db06e09891b001667974483058923b88c3258324rbb# information: Portions Copyright [yyyy] [name of copyright owner]
db06e09891b001667974483058923b88c3258324rbb#
db06e09891b001667974483058923b88c3258324rbb# CDDL HEADER END
db06e09891b001667974483058923b88c3258324rbb#
8ba9d5e9aaaa79dba0de13f5c1b6e725d98f1dc2fanf# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
8ba9d5e9aaaa79dba0de13f5c1b6e725d98f1dc2fanf#
8ba9d5e9aaaa79dba0de13f5c1b6e725d98f1dc2fanfinclude ../../make-rules/shared-macros.mk
8ba9d5e9aaaa79dba0de13f5c1b6e725d98f1dc2fanf
26cf4d32b4ff8807a64b0cfa6865a7d6d171c68efanfCOMPONENT_NAME= hplip
26cf4d32b4ff8807a64b0cfa6865a7d6d171c68efanfCOMPONENT_VERSION= 3.14.6
26cf4d32b4ff8807a64b0cfa6865a7d6d171c68efanfTPNO= 18296
06c107289de0a0888386e0bc08ef9fc60aacd8bctrawickCOMPONENT_PROJECT_URL= http://hplipopensource.com/hplip-web/index.html
06c107289de0a0888386e0bc08ef9fc60aacd8bctrawickCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
06c107289de0a0888386e0bc08ef9fc60aacd8bctrawickCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
06c107289de0a0888386e0bc08ef9fc60aacd8bctrawickCOMPONENT_ARCHIVE_HASH= sha256:a57233cd0e2db1dcf1d34d8b90c6a9d3e027e522695aada6c3c411a839868b8e
f4ab6acec7b02518869ca649ce2d3ceeb92d282etrawickCOMPONENT_ARCHIVE_URL= http://sourceforge.net/projects/hplip/files/hplip/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
f4ab6acec7b02518869ca649ce2d3ceeb92d282etrawickCOMPONENT_BUGDB= utility/hplip
f4ab6acec7b02518869ca649ce2d3ceeb92d282etrawick
b0bd38b2226e5cfb86cce6ed1991723f4c9e4f68trawickinclude $(WS_MAKE_RULES)/prep.mk
bf9902ea6090f94c9ee0aaddd80b419a184ffe55jiminclude $(WS_MAKE_RULES)/configure.mk
bf9902ea6090f94c9ee0aaddd80b419a184ffe55jiminclude $(WS_MAKE_RULES)/ips.mk
bf9902ea6090f94c9ee0aaddd80b419a184ffe55jim
bf9902ea6090f94c9ee0aaddd80b419a184ffe55jimPKG_OPTIONS += -I $(COMPONENT_DIR)
bf9902ea6090f94c9ee0aaddd80b419a184ffe55jim
bf9902ea6090f94c9ee0aaddd80b419a184ffe55jim# Enable ASLR for this component
bf9902ea6090f94c9ee0aaddd80b419a184ffe55jimASLR_MODE = $(ASLR_ENABLE)
0b34df54ff22d0ca05eb8e9d7c9610138a878c83rbb
0b34df54ff22d0ca05eb8e9d7c9610138a878c83rbb# We need to be able to return from void functions
0b34df54ff22d0ca05eb8e9d7c9610138a878c83rbbCC += $(studio_FEATURES_EXTENSIONS)
83047afdc49c183cdca6373dba6a0c6afa638f12gsteinCXX += $(studio_FEATURES_EXTENSIONS) $(studio_NORUNPATH) $(studio_CXXLIB_CSTD)
0b34df54ff22d0ca05eb8e9d7c9610138a878c83rbb
c8cc46d12794845f39fa154224075a3bbe57a4c8benROOTPPDCACHE = $(PROTO_DIR)/usr/lib/lp/caches/SUNWhpijs.cache
c8cc46d12794845f39fa154224075a3bbe57a4c8ben
5dea9095cbfab622c65e5f2f806007aaa7d7761arbb# version aligned with 12.0
5dea9095cbfab622c65e5f2f806007aaa7d7761arbbPYTHON_VERSION = 2.7
5dea9095cbfab622c65e5f2f806007aaa7d7761arbb
5dea9095cbfab622c65e5f2f806007aaa7d7761arbb# common configure options
5dea9095cbfab622c65e5f2f806007aaa7d7761arbbCONFIGURE_OPTIONS += --localedir=$(CONFIGURE_LOCALEDIR)
365c33fd9c0fc3ac27c0bd1d360a5a94980c576atrawickCONFIGURE_OPTIONS += --disable-pp-build
365c33fd9c0fc3ac27c0bd1d360a5a94980c576atrawickCONFIGURE_OPTIONS += --disable-gui-build
365c33fd9c0fc3ac27c0bd1d360a5a94980c576atrawickCONFIGURE_OPTIONS += --disable-qt4
0ea568e49752d337d2b513cce07f2a6f4699d6eatrawickCONFIGURE_OPTIONS += am_cv_python_pythondir="$(PYTHON_VENDOR_PACKAGES)"
0ea568e49752d337d2b513cce07f2a6f4699d6eatrawickCONFIGURE_OPTIONS += am_cv_python_pyexecdir="$(PYTHON_VENDOR_PACKAGES)"
0ea568e49752d337d2b513cce07f2a6f4699d6eatrawick
b7a0ad483b54711addc5f43f679189619a23c749benCONFIGURE_ENV += LDFLAGS=" -lnsl"
b7a0ad483b54711addc5f43f679189619a23c749ben
328d02603f471fad56cc5588fc9e93f589593ad0rbbHPLIP_VARIANT = $(BUILD_DIR)/$(MACH32)-hplip
328d02603f471fad56cc5588fc9e93f589593ad0rbbHPIJS_VARIANT = $(BUILD_DIR)/$(MACH32)-hpijs
1c850e9f96375578e43e5f69ba7499a543b2a7bdtrawick
1c850e9f96375578e43e5f69ba7499a543b2a7bdtrawickVARIANTS = $(HPLIP_VARIANT) $(HPIJS_VARIANT)
1c850e9f96375578e43e5f69ba7499a543b2a7bdtrawick
48a2f5e2c189669b025d462f44fda5d4b45e8d78trawick# We build two variants: for the CUPS/SANE support
48a2f5e2c189669b025d462f44fda5d4b45e8d78trawick# and for the HPIJS only support
48a2f5e2c189669b025d462f44fda5d4b45e8d78trawick
48a2f5e2c189669b025d462f44fda5d4b45e8d78trawick# use these options for the CUPS/SANE support
48a2f5e2c189669b025d462f44fda5d4b45e8d78trawick$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/cups/model/SUNWhplip
48a2f5e2c189669b025d462f44fda5d4b45e8d78trawick$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-libusb01_build
48a2f5e2c189669b025d462f44fda5d4b45e8d78trawick$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-fax-build
b22fb75c37b70fbe176afdb8081c3ce2dba86db4rbb$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpcups-install
b22fb75c37b70fbe176afdb8081c3ce2dba86db4rbb$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-new-hpcups
b22fb75c37b70fbe176afdb8081c3ce2dba86db4rbb$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-cups-drv-install
b22fb75c37b70fbe176afdb8081c3ce2dba86db4rbb
b22fb75c37b70fbe176afdb8081c3ce2dba86db4rbb# use these options for the HPIJS only support
8fccb89ed59d5c80c76a818f7ca02bb0d068d4d3rbb$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-foomatic-ppd-install
8fccb89ed59d5c80c76a818f7ca02bb0d068d4d3rbb$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/ppd/SUNWhpijs/HP
8fccb89ed59d5c80c76a818f7ca02bb0d068d4d3rbb$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-cups-drv-install
8fccb89ed59d5c80c76a818f7ca02bb0d068d4d3rbb$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-hpcups-install
8fccb89ed59d5c80c76a818f7ca02bb0d068d4d3rbb$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-doc-build
da07a882b90b44243c9cd88ac09a789999dccc4drbb$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpijs-only-build
da07a882b90b44243c9cd88ac09a789999dccc4drbb$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpijs-install
da07a882b90b44243c9cd88ac09a789999dccc4drbb
da07a882b90b44243c9cd88ac09a789999dccc4drbbinstall: COMPONENT_INSTALL_ENV += halpredir=/etc/hal/fdi/preprobe/10osvendor
da07a882b90b44243c9cd88ac09a789999dccc4drbb
4a5c8a77f48f0cf10bfe70479d0a2e8e7d6cd917rbbCOMPONENT_INSTALL_ARGS += -e
4a5c8a77f48f0cf10bfe70479d0a2e8e7d6cd917rbb
4a5c8a77f48f0cf10bfe70479d0a2e8e7d6cd917rbbCOMPONENT_PRE_CONFIGURE_ACTION = \
4a5c8a77f48f0cf10bfe70479d0a2e8e7d6cd917rbb ($(CLONEY) $(SOURCE_DIR) $(@D))
4a5c8a77f48f0cf10bfe70479d0a2e8e7d6cd917rbb
4a5c8a77f48f0cf10bfe70479d0a2e8e7d6cd917rbb# Generate configuration scripts
5bf029f8452b6aa105cf3d9d9b19221920725428rbb$(HPLIP_VARIANT)/.built: COMPONENT_PREP_ACTION = \
5bf029f8452b6aa105cf3d9d9b19221920725428rbb (cd $(@D) ; autoconf )
5bf029f8452b6aa105cf3d9d9b19221920725428rbb
60ed053fe71b1e3cfab8c4ed37afde30a6db4841rbb
60ed053fe71b1e3cfab8c4ed37afde30a6db4841rbb$(BUILD_DIR)/.allvariantsinstalled: $(VARIANTS:%=%/.installed)
60ed053fe71b1e3cfab8c4ed37afde30a6db4841rbb $(RM) $(ROOTPPDCACHE)
e03878add0099ba9741efc46d545955a60ea8bdcrbb $(MKDIR) $(PROTO_DIR)/usr/lib/lp/caches
e03878add0099ba9741efc46d545955a60ea8bdcrbb ($(ENV) VER="$(BUILD_DIR)/$(MACH32)-hpijs" \
e03878add0099ba9741efc46d545955a60ea8bdcrbb PPDSRC="$(PROTO_DIR)/usr/share/ppd/SUNWhpijs" \
e03878add0099ba9741efc46d545955a60ea8bdcrbb DONOTINSTALL="/dev/null" \
1860b2b5f1de31f8cf9d95f1b394fe98c8dbfab7rbb CACHE="$(ROOTPPDCACHE)" \
1860b2b5f1de31f8cf9d95f1b394fe98c8dbfab7rbb IPATH="/usr/share/ppd/$(BUILD_DIR)/" \
1860b2b5f1de31f8cf9d95f1b394fe98c8dbfab7rbb $(KSH93) cache.ksh)
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe # set version of python interpreter to calm the pkglint
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe find $(PROTO_DIR) -name \*.py -print0 | \
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe while IFS= read -r -d $$'\0' file; do \
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe /usr/bin/sed -e '1,1s&^#!.*python[:blank:]\{0,\}$$&#!$(PYTHON.$(PYTHON_VERSION))&' \
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe $$file > $$file.pyverset ; \
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe done
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe find $(PROTO_DIR) -name \*.py.pyverset -print0 | \
9ec65cbae2f760e485a1c54df5b19853688d5c91wrowe while IFS= read -r -d $$'\0' file; do \
a8c0c0b8d7dada680bd3f3d70f78ce0656ba5aa6trawick $(MV) $$file `echo $$file | sed -e 's/[.]pyverset$$//'` ; \
a8c0c0b8d7dada680bd3f3d70f78ce0656ba5aa6trawick done
a8c0c0b8d7dada680bd3f3d70f78ce0656ba5aa6trawick $(PYTHON.$(PYTHON_VERSION)) -m compileall $(PROTO_DIR)/usr/share/hplip/
a8c0c0b8d7dada680bd3f3d70f78ce0656ba5aa6trawick $(TOUCH) $@
a8c0c0b8d7dada680bd3f3d70f78ce0656ba5aa6trawick
a8c0c0b8d7dada680bd3f3d70f78ce0656ba5aa6trawickPKG_MACROS += PYVER=$(PYTHON_VERSION)
77c656dabf05adcdee0d30b15b4628be738a1913rbb#
77c656dabf05adcdee0d30b15b4628be738a1913rbb# Since it looks like you can't build HPLIP with both HPIJS and CUPS support
77c656dabf05adcdee0d30b15b4628be738a1913rbb# and seperate the HPIJS and CUPS PPD data, we need to replicate the code and
77c656dabf05adcdee0d30b15b4628be738a1913rbb# build it twice. Once for the HPIJS support used by LP and once for the rest
77c656dabf05adcdee0d30b15b4628be738a1913rbb# of the support used for CUPS and SANE.
7e73041858979fd162c849cc2e7447beb51eedf8rbb#
7e73041858979fd162c849cc2e7447beb51eedf8rbbconfigure: $(VARIANTS:%=%/.configured)
886cd69ebf69e990dbc365be87ff8ea7cd681904rbb
886cd69ebf69e990dbc365be87ff8ea7cd681904rbbbuild: $(VARIANTS:%=%/.built)
886cd69ebf69e990dbc365be87ff8ea7cd681904rbb
a8c0c0b8d7dada680bd3f3d70f78ce0656ba5aa6trawickinstall: $(BUILD_DIR)/.allvariantsinstalled
886cd69ebf69e990dbc365be87ff8ea7cd681904rbb
886cd69ebf69e990dbc365be87ff8ea7cd681904rbb# empty test target
886cd69ebf69e990dbc365be87ff8ea7cd681904rbbtest: $(NO_TESTS)
db9ac238bf63d7df2bebbaff4de1628a32151028trawick
ce121a776564df6bb75498209094142d92404b8atrawickREQUIRED_PACKAGES += image/library/libjpeg
ce121a776564df6bb75498209094142d92404b8atrawickREQUIRED_PACKAGES += image/scanner/xsane/sane-backends
ce121a776564df6bb75498209094142d92404b8atrawickREQUIRED_PACKAGES += library/print/cups-libs
e1ade9256c87684358786fcf7eef251bd4c1db10rbbREQUIRED_PACKAGES += runtime/python-27
e1ade9256c87684358786fcf7eef251bd4c1db10rbbREQUIRED_PACKAGES += system/library
e1ade9256c87684358786fcf7eef251bd4c1db10rbbREQUIRED_PACKAGES += system/library/c++-runtime
e1ade9256c87684358786fcf7eef251bd4c1db10rbbREQUIRED_PACKAGES += system/library/libdbus
e1ade9256c87684358786fcf7eef251bd4c1db10rbbREQUIRED_PACKAGES += system/library/math
e1ade9256c87684358786fcf7eef251bd4c1db10rbbREQUIRED_PACKAGES += system/library/usb/libusb
db9ac238bf63d7df2bebbaff4de1628a32151028trawickREQUIRED_PACKAGES += system/linker
db9ac238bf63d7df2bebbaff4de1628a32151028trawickREQUIRED_PACKAGES += system/management/snmp/net-snmp
db9ac238bf63d7df2bebbaff4de1628a32151028trawick