pkg-perl: set PERL_USE_UNSAFE_INC
[buildroot-gz.git] / package / qwt / qwt.mk
blobd1bb5245b1ba8cbbef661e4920f58077a973dd6f
1 ################################################################################
3 # qwt
5 ################################################################################
7 QWT_VERSION = 6.1.3
8 QWT_SOURCE = qwt-$(QWT_VERSION).tar.bz2
9 QWT_SITE = http://downloads.sourceforge.net/project/qwt/qwt/$(QWT_VERSION)
10 QWT_INSTALL_STAGING = YES
11 ifeq ($(BR2_PACKAGE_QT),y)
12 QWT_DEPENDENCIES = qt
13 QWT_QMAKE = $(QT_QMAKE)
14 else ifeq ($(BR2_PACKAGE_QT5),y)
15 QWT_DEPENDENCIES += qt5base
16 QWT_QMAKE = $(QT5_QMAKE)
17 endif
19 QWT_LICENSE = LGPLv2.1 with exceptions
20 QWT_LICENSE_FILES = COPYING
22 QWT_CONFIG = 's%QWT_INSTALL_PREFIX.*/usr/local/.*%QWT_INSTALL_PREFIX = /usr%'
23 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDesigner.*$$/\# QWT_CONFIG += QwtDesigner/'
24 QWT_CONFIG += -e 's%/features%/mkspecs/features%'
26 ifeq ($(BR2_PACKAGE_QWT_SVG),y)
27 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/QWT_CONFIG += QwtSvg/'
28 else
29 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/\# QWT_CONFIG += QwtSvg/'
30 endif
32 ifeq ($(BR2_PACKAGE_QWT_MATHML),y)
33 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtMathML.*$$/QWT_CONFIG += QwtMathML/'
34 else
35 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtMathML.*$$/\# QWT_CONFIG += QwtMathML/'
36 endif
38 ifeq ($(BR2_PACKAGE_QWT_OPENGL),y)
39 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtOpenGL.*$$/QWT_CONFIG += QwtOpenGL/'
40 else
41 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtOpenGL.*$$/\# QWT_CONFIG += QwtOpenGL/'
42 endif
44 define QWT_CONFIGURE_CMDS
45 $(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri
46 (cd $(@D); $(TARGET_MAKE_ENV) $(QWT_QMAKE))
47 endef
49 define QWT_BUILD_CMDS
50 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
51 endef
53 # After installation, we fixup the INSTALL_PREFIX in qwtconfig.pri so
54 # that when building with qmake, -L$(STAGING_DIR)/usr/lib is used and
55 # not -L/usr/lib.
56 define QWT_INSTALL_STAGING_CMDS
57 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install INSTALL_ROOT=$(STAGING_DIR)
58 $(SED) "s%QWT_INSTALL_PREFIX = .*%QWT_INSTALL_PREFIX = $(STAGING_DIR)/usr%" \
59 $(STAGING_DIR)/usr/mkspecs/features/qwtconfig.pri
60 endef
62 define QWT_INSTALL_TARGET_CMDS
63 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install INSTALL_ROOT=$(TARGET_DIR)
64 rm -Rf $(TARGET_DIR)/usr/mkspecs
65 endef
67 $(eval $(generic-package))