components/hplip/Makefile
changeset 6449 33c7e6c982cd
parent 6250 4fde505e37d7
child 6471 7b42c58b14c1
equal deleted inserted replaced
6448:9c7d6df84360 6449:33c7e6c982cd
    31 TPNO=			24589
    31 TPNO=			24589
    32 COMPONENT_ARCHIVE_HASH= sha256:d310903048f3600f93422e5a8c39ddd682511e0849cd9abc5e943f9a10bdd49d
    32 COMPONENT_ARCHIVE_HASH= sha256:d310903048f3600f93422e5a8c39ddd682511e0849cd9abc5e943f9a10bdd49d
    33 COMPONENT_ARCHIVE_URL=	http://prdownloads.sourceforge.net/hplip/$(COMPONENT_ARCHIVE)
    33 COMPONENT_ARCHIVE_URL=	http://prdownloads.sourceforge.net/hplip/$(COMPONENT_ARCHIVE)
    34 COMPONENT_PROJECT_URL=	http://hplipopensource.com/hplip-web/index.html
    34 COMPONENT_PROJECT_URL=	http://hplipopensource.com/hplip-web/index.html
    35 
    35 
    36 COMMON_TARGETS= no
       
    37 include $(WS_MAKE_RULES)/common.mk
    36 include $(WS_MAKE_RULES)/common.mk
    38 
    37 
    39 PKG_OPTIONS += -I $(COMPONENT_DIR)
    38 PKG_OPTIONS += -I $(COMPONENT_DIR)
    40 
    39 
    41 # We need to be able to return from void functions
    40 # We need to be able to return from void functions
    42 CFLAGS.studio += $(studio_FEATURES_EXTENSIONS)
    41 CFLAGS.studio += $(studio_FEATURES_EXTENSIONS)
    43 CXXFLAGS.studio += $(studio_FEATURES_EXTENSIONS) 
    42 CXXFLAGS.studio += $(studio_FEATURES_EXTENSIONS) 
    44 CXXFLAGS.studio += $(studio_CXXLIB_CSTD) 
    43 CXXFLAGS.studio += $(studio_CXXLIB_CSTD) 
    45 
    44 
    46 ROOTPPDCACHE =  $(PROTOUSRLIBDIR)/lp/caches/SUNWhpijs.cache
       
    47 
       
    48 # common configure options
       
    49 CONFIGURE_OPTIONS +=	--localedir=$(CONFIGURE_LOCALEDIR)
    45 CONFIGURE_OPTIONS +=	--localedir=$(CONFIGURE_LOCALEDIR)
       
    46 CONFIGURE_OPTIONS +=	--with-hpppddir=$(USRSHAREDIR)/cups/model/hplip
       
    47 ifeq ($(OS_VERSION),5.11)
       
    48 CONFIGURE_OPTIONS +=	--enable-libusb01_build
       
    49 endif
       
    50 CONFIGURE_OPTIONS +=	--enable-fax-build
       
    51 CONFIGURE_OPTIONS +=	--enable-hpcups-install
       
    52 CONFIGURE_OPTIONS +=	--disable-new-hpcups
       
    53 CONFIGURE_OPTIONS +=	--enable-cups-drv-install
    50 CONFIGURE_OPTIONS +=	--disable-pp-build
    54 CONFIGURE_OPTIONS +=	--disable-pp-build
    51 CONFIGURE_OPTIONS +=	--disable-gui-build
    55 CONFIGURE_OPTIONS +=	--disable-gui-build
    52 CONFIGURE_OPTIONS +=	--disable-qt4
    56 CONFIGURE_OPTIONS +=	--disable-qt4
       
    57 CONFIGURE_OPTIONS +=	PYTHON=$(PYTHON.$(PYTHON_VERSION))
       
    58 CONFIGURE_OPTIONS +=	am_cv_python_pythondir="$(PYTHON_VENDOR_PACKAGES)"
       
    59 CONFIGURE_OPTIONS +=	am_cv_python_pyexecdir="$(PYTHON_VENDOR_PACKAGES)"
    53 # bye, bye SANE backends
    60 # bye, bye SANE backends
    54 CONFIGURE_OPTIONS +=	--disable-scan-build
    61 CONFIGURE_OPTIONS +=	--disable-scan-build
    55 CONFIGURE_OPTIONS +=	am_cv_python_pythondir="$(PYTHON_VENDOR_PACKAGES)"
       
    56 CONFIGURE_OPTIONS +=	am_cv_python_pyexecdir="$(PYTHON_VENDOR_PACKAGES)"
       
    57 
    62 
    58 ifeq ($(OS_VERSION),5.11)
    63 ifeq ($(OS_VERSION),5.11)
    59 LDFLAGS += -lnsl
    64 LDFLAGS += -lnsl
    60 endif
    65 endif
    61 
    66 
    62 HPLIP_VARIANT = $(BUILD_DIR)/$(MACH32)-hplip
    67 COMPONENT_INSTALL_ARGS += -e
    63 HPIJS_VARIANT = $(BUILD_DIR)/$(MACH32)-hpijs
       
    64 
    68 
    65 VARIANTS = $(HPLIP_VARIANT) $(HPIJS_VARIANT)
    69 # Generate configuration scripts
    66 
    70 COMPONENT_PREP_ACTION = (cd $(@D) ; autoconf )
    67 # We build two variants: for the CUPS support
       
    68 # and for the HPIJS only support
       
    69 
       
    70 # use these options for the CUPS support
       
    71 $(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-hpppddir=$(USRSHAREDIR)/cups/model/SUNWhplip
       
    72 $(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-libusb01_build
       
    73 $(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-fax-build
       
    74 $(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpcups-install
       
    75 $(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-new-hpcups
       
    76 $(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-cups-drv-install
       
    77 
       
    78 # use these options for the HPIJS only support
       
    79 $(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-foomatic-ppd-install
       
    80 $(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-hpppddir=$(USRSHAREDIR)/ppd/SUNWhpijs/HP
       
    81 $(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-cups-drv-install
       
    82 $(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-hpcups-install
       
    83 $(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-doc-build
       
    84 $(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpijs-only-build
       
    85 $(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpijs-install
       
    86 
       
    87 COMPONENT_INSTALL_ARGS += -e
       
    88 
    71 
    89 COMPONENT_PRE_CONFIGURE_ACTION = \
    72 COMPONENT_PRE_CONFIGURE_ACTION = \
    90 	($(CLONEY) $(SOURCE_DIR) $(@D))
    73 	($(CLONEY) $(SOURCE_DIR) $(@D))
    91 
    74 
    92 # Generate configuration scripts
    75 PYTHON_SCRIPTS += $(PROTO_DIR)/usr/lib/cups/backend/hpfax
    93 $(HPLIP_VARIANT)/.built: COMPONENT_PREP_ACTION = \
    76 PYTHON_SCRIPTS += $(PROTO_DIR)/usr/lib/cups/filter/hpps
    94 		(cd $(@D) ; autoconf )
    77 PYTHON_SCRIPTS += $(PROTO_DIR)/usr/lib/cups/filter/pstotiff
       
    78 PYTHON_SCRIPTS += \
       
    79  $(shell nawk -F \= \
       
    80   ' $$1 ~ /^file.*path/ && $$2 ~ /.*\.py$$/ {print "$(PROTO_DIR)/"$$2;} ' \
       
    81   $(COMPONENT_DIR)/hplip.proto-objects)
    95 
    82 
    96 $(BUILD_DIR)/.allvariantsinstalled: $(VARIANTS:%=%/.installed)
    83 # build .pyc's
    97 	$(RM) $(ROOTPPDCACHE)
    84 COMPONENT_POST_INSTALL_ACTION += \
    98 	$(MKDIR) $(PROTO_DIR)/usr/lib/lp/caches
       
    99 	($(ENV) VER="$(BUILD_DIR)/$(MACH32)-hpijs" \
       
   100 		PPDSRC="$(PROTO_DIR)/usr/share/ppd/SUNWhpijs" \
       
   101 		DONOTINSTALL="/dev/null" \
       
   102 		CACHE="$(ROOTPPDCACHE)" \
       
   103 		IPATH="/usr/share/ppd/$(BUILD_DIR)/" \
       
   104 		$(KSH93) cache.ksh)
       
   105 	# set version of python interpreter to calm the pkglint
       
   106 	find $(PROTO_DIR) -name \*.py -print0 | \
       
   107 	   while IFS= read -r -d $$'\0' file; do \
       
   108 		/usr/bin/sed -e '1,1s&^#!.*python[:blank:]\{0,\}$$&#!$(PYTHON.$(PYTHON_VERSION))&' \
       
   109 		   $$file > $$file.pyverset ; \
       
   110 	   done
       
   111 	find $(PROTO_DIR) -name \*.py.pyverset -print0 | \
       
   112 	   while IFS= read -r -d $$'\0' file; do \
       
   113 		$(MV) $$file `echo $$file | sed -e 's/[.]pyverset$$//'` ; \
       
   114 	   done
       
   115 	$(PYTHON.$(PYTHON_VERSION)) -m compileall $(PROTO_DIR)/usr/share/hplip/
    85 	$(PYTHON.$(PYTHON_VERSION)) -m compileall $(PROTO_DIR)/usr/share/hplip/
   116 	$(TOUCH) $@
       
   117 
       
   118 # Since it looks like you can't build HPLIP with both HPIJS and CUPS support
       
   119 # and seperate the HPIJS and CUPS PPD data, we need to replicate the code and
       
   120 # build it twice.  Once for the HPIJS support used by LP and once for the rest
       
   121 # of the support used for CUPS
       
   122 #
       
   123 configure: $(VARIANTS:%=%/.configured)
       
   124 
       
   125 build: $(VARIANTS:%=%/.built)
       
   126 
       
   127 install: $(BUILD_DIR)/.allvariantsinstalled
       
   128 
    86 
   129 # empty test target
    87 # empty test target
   130 test:	$(NO_TESTS)
    88 test:	$(NO_TESTS)
   131 
    89 
   132 system-test:    $(NO_TESTS)
    90 system-test:    $(NO_TESTS)
   133 
    91 
   134 # We need one Net-SNMP library on 12, the other on 11, so list both.
       
   135 REQUIRED_PACKAGES += image/library/libjpeg
    92 REQUIRED_PACKAGES += image/library/libjpeg
       
    93 REQUIRED_PACKAGES += library/libusb-1
   136 REQUIRED_PACKAGES += library/print/cups-libs
    94 REQUIRED_PACKAGES += library/print/cups-libs
   137 REQUIRED_PACKAGES += runtime/python-27
    95 REQUIRED_PACKAGES += runtime/python-27
   138 REQUIRED_PACKAGES += system/library/c++-runtime
    96 REQUIRED_PACKAGES += system/library/c++-runtime
   139 REQUIRED_PACKAGES += system/library/libdbus
    97 REQUIRED_PACKAGES += system/library/libdbus
   140 REQUIRED_PACKAGES += system/library/math
    98 REQUIRED_PACKAGES += system/library/math
   141 REQUIRED_PACKAGES += system/library/usb/libusb
       
   142 REQUIRED_PACKAGES += system/management/snmp/net-snmp
    99 REQUIRED_PACKAGES += system/management/snmp/net-snmp
   143 REQUIRED_PACKAGES += system/management/snmp/net-snmp-57