components/hplip/Makefile
branchs11u2-sru
changeset 3941 5a0ea91a2761
parent 3014 c1a1dfff9d89
equal deleted inserted replaced
3939:fcd26b3de46c 3941:5a0ea91a2761
    17 # fields enclosed by brackets "[]" replaced with your own identifying
    17 # fields enclosed by brackets "[]" replaced with your own identifying
    18 # information: Portions Copyright [yyyy] [name of copyright owner]
    18 # information: Portions Copyright [yyyy] [name of copyright owner]
    19 #
    19 #
    20 # CDDL HEADER END
    20 # CDDL HEADER END
    21 #
    21 #
    22 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
    22 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
    23 #
    23 #
    24 include ../../make-rules/shared-macros.mk
    24 include ../../make-rules/shared-macros.mk
    25 
    25 
    26 COMPONENT_NAME=         hplip
    26 COMPONENT_NAME=         hplip
    27 COMPONENT_VERSION=      3.12.4
    27 COMPONENT_VERSION=      3.14.6
       
    28 TPNO=			18296
    28 COMPONENT_PROJECT_URL=	http://hplipopensource.com/hplip-web/index.html
    29 COMPONENT_PROJECT_URL=	http://hplipopensource.com/hplip-web/index.html
    29 COMPONENT_SRC=          $(COMPONENT_NAME)-$(COMPONENT_VERSION)
    30 COMPONENT_SRC=          $(COMPONENT_NAME)-$(COMPONENT_VERSION)
    30 COMPONENT_ARCHIVE=      $(COMPONENT_SRC).tar.gz
    31 COMPONENT_ARCHIVE=      $(COMPONENT_SRC).tar.gz
    31 COMPONENT_ARCHIVE_HASH= \
    32 COMPONENT_ARCHIVE_HASH= sha256:a57233cd0e2db1dcf1d34d8b90c6a9d3e027e522695aada6c3c411a839868b8e
    32     sha256:350375c78d79adf635a59a448b27b3fe9ab7ac622637c47125fe5f7d8a537fff
       
    33 COMPONENT_ARCHIVE_URL=  http://sourceforge.net/projects/hplip/files/hplip/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
    33 COMPONENT_ARCHIVE_URL=  http://sourceforge.net/projects/hplip/files/hplip/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
    34 COMPONENT_BUGDB=	utility/hplip
    34 COMPONENT_BUGDB=	utility/hplip
    35 
    35 
    36 include ../../make-rules/prep.mk
    36 include $(WS_MAKE_RULES)/prep.mk
    37 include ../../make-rules/configure.mk
    37 include $(WS_MAKE_RULES)/configure.mk
    38 include ../../make-rules/ips.mk
    38 include $(WS_MAKE_RULES)/ips.mk
       
    39 
       
    40 PKG_OPTIONS += -I $(COMPONENT_DIR)
    39 
    41 
    40 # Enable ASLR for this component
    42 # Enable ASLR for this component
    41 ASLR_MODE = $(ASLR_ENABLE)
    43 ASLR_MODE = $(ASLR_ENABLE)
    42 
    44 
    43 # We need to be able to return from void functions
    45 # We need to be able to return from void functions
    44 CC += $(studio_FEATURES_EXTENSIONS)
    46 CC += $(studio_FEATURES_EXTENSIONS)
    45 CXX += $(studio_FEATURES_EXTENSIONS) $(studio_NORUNPATH) $(studio_CXXLIB_CSTD) 
    47 CXX += $(studio_FEATURES_EXTENSIONS) $(studio_NORUNPATH) $(studio_CXXLIB_CSTD) 
    46 
    48 
    47 ROOTPPDCACHE =  $(PROTO_DIR)/usr/lib/lp/caches/SUNWhpijs.cache
    49 ROOTPPDCACHE =  $(PROTO_DIR)/usr/lib/lp/caches/SUNWhpijs.cache
    48 
    50 
    49 # configure(1) options to use
    51 # version aligned with 12.0
       
    52 PYTHON_VERSION = 2.7
       
    53 
       
    54 # common configure options
    50 CONFIGURE_OPTIONS +=	--localedir=$(CONFIGURE_LOCALEDIR)
    55 CONFIGURE_OPTIONS +=	--localedir=$(CONFIGURE_LOCALEDIR)
    51 CONFIGURE_OPTIONS +=	--disable-pp-build
    56 CONFIGURE_OPTIONS +=	--disable-pp-build
    52 CONFIGURE_OPTIONS +=	--disable-gui-build
    57 CONFIGURE_OPTIONS +=	--disable-gui-build
       
    58 CONFIGURE_OPTIONS +=	--disable-qt4
       
    59 CONFIGURE_OPTIONS +=	am_cv_python_pythondir="$(PYTHON_VENDOR_PACKAGES)"
       
    60 CONFIGURE_OPTIONS +=	am_cv_python_pyexecdir="$(PYTHON_VENDOR_PACKAGES)"
    53 
    61 
    54 CONFIGURE_ENV +=	LDFLAGS=" -lnsl"
    62 CONFIGURE_ENV +=	LDFLAGS=" -lnsl"
    55 
    63 
    56 HPLIP_VARIANT = $(BUILD_DIR)/$(MACH32)-hplip
    64 HPLIP_VARIANT = $(BUILD_DIR)/$(MACH32)-hplip
    57 HPIJS_VARIANT = $(BUILD_DIR)/$(MACH32)-hpijs
    65 HPIJS_VARIANT = $(BUILD_DIR)/$(MACH32)-hpijs
    61 # We build two variants: for the CUPS/SANE support
    69 # We build two variants: for the CUPS/SANE support
    62 # and for the HPIJS only support
    70 # and for the HPIJS only support
    63 
    71 
    64 # use these options for the CUPS/SANE support
    72 # use these options for the CUPS/SANE support
    65 $(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/cups/model/SUNWhplip
    73 $(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/cups/model/SUNWhplip
       
    74 $(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-libusb01_build
    66 $(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-fax-build
    75 $(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-fax-build
    67 $(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-udev-acl-rules
       
    68 $(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpcups-install
    76 $(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-hpcups-install
    69 $(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-new-hpcups
    77 $(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --disable-new-hpcups
    70 $(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-cups-drv-install
    78 $(HPLIP_VARIANT)/.built: CONFIGURE_OPTIONS += --enable-cups-drv-install
    71 
    79 
    72 # use these options for the HPIJS only support
    80 # use these options for the HPIJS only support
    89 $(HPLIP_VARIANT)/.built: COMPONENT_PREP_ACTION = \
    97 $(HPLIP_VARIANT)/.built: COMPONENT_PREP_ACTION = \
    90 		(cd $(@D) ; autoconf )
    98 		(cd $(@D) ; autoconf )
    91 
    99 
    92 BUILD_PKG_DEPENDENCIES =        $(BUILD_TOOLS)
   100 BUILD_PKG_DEPENDENCIES =        $(BUILD_TOOLS)
    93 
   101 
    94 #
   102 $(BUILD_DIR)/.allvariantsinstalled: $(VARIANTS:%=%/.installed)
    95 # Since it looks like you can't build HPLIP with both HPIJS and CUPS support
       
    96 # and seperate the HPIJS and CUPS PPD data, we need to replicate the code and
       
    97 # build it twice.  Once for the HPIJS support used by LP and once for the rest
       
    98 # of the support used for CUPS and SANE.
       
    99 #
       
   100 build: $(VARIANTS:%=%/.built)
       
   101 
       
   102 install: $(VARIANTS:%=%/.installed)
       
   103 	$(RM) $(ROOTPPDCACHE)
   103 	$(RM) $(ROOTPPDCACHE)
   104 	$(MKDIR) $(PROTO_DIR)/usr/lib/lp/caches
   104 	$(MKDIR) $(PROTO_DIR)/usr/lib/lp/caches
   105 	($(ENV) VER="$(BUILD_DIR)/$(MACH32)-hpijs" \
   105 	($(ENV) VER="$(BUILD_DIR)/$(MACH32)-hpijs" \
   106 		PPDSRC="$(PROTO_DIR)/usr/share/ppd/SUNWhpijs" \
   106 		PPDSRC="$(PROTO_DIR)/usr/share/ppd/SUNWhpijs" \
   107 		DONOTINSTALL="/dev/null" \
   107 		DONOTINSTALL="/dev/null" \
   108 		CACHE="$(ROOTPPDCACHE)" \
   108 		CACHE="$(ROOTPPDCACHE)" \
   109 		IPATH="/usr/share/ppd/$(BUILD_DIR)/" \
   109 		IPATH="/usr/share/ppd/$(BUILD_DIR)/" \
   110 		$(KSH93) cache.ksh)
   110 		$(KSH93) cache.ksh)
       
   111 	# set version of python interpreter to calm the pkglint
       
   112 	find $(PROTO_DIR) -name \*.py -print0 | \
       
   113 	   while IFS= read -r -d $$'\0' file; do \
       
   114 		/usr/bin/sed -e '1,1s&^#!.*python[:blank:]\{0,\}$$&#!$(PYTHON)&' \
       
   115 		   $$file > $$file.pyverset ; \
       
   116 	   done
       
   117 	find $(PROTO_DIR) -name \*.py.pyverset -print0 | \
       
   118 	   while IFS= read -r -d $$'\0' file; do \
       
   119 		$(MV) $$file `echo $$file | sed -e 's/[.]pyverset$$//'` ; \
       
   120 	   done
       
   121 	$(PYTHON) -m compileall $(PROTO_DIR)/usr/share/hplip/
       
   122 	$(TOUCH) $@
       
   123 
       
   124 PKG_MACROS +=	PYVER=$(PYTHON_VERSION)
       
   125 #
       
   126 # Since it looks like you can't build HPLIP with both HPIJS and CUPS support
       
   127 # and seperate the HPIJS and CUPS PPD data, we need to replicate the code and
       
   128 # build it twice.  Once for the HPIJS support used by LP and once for the rest
       
   129 # of the support used for CUPS and SANE.
       
   130 #
       
   131 configure: $(VARIANTS:%=%/.configured)
       
   132 
       
   133 build: $(VARIANTS:%=%/.built)
       
   134 
       
   135 install: $(BUILD_DIR)/.allvariantsinstalled
   111 
   136 
   112 # empty test target
   137 # empty test target
   113 test:	$(NO_TESTS)
   138 test:	$(NO_TESTS)
   114 
   139 
   115 include ../../make-rules/depend.mk
   140 include ../../make-rules/depend.mk