xref: /OK3568_Linux_fs/buildroot/package/libsvgtiny/libsvgtiny.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# libsvgtiny
4#
5################################################################################
6
7LIBSVGTINY_SITE = http://git.netsurf-browser.org/libsvgtiny.git
8LIBSVGTINY_SITE_METHOD = git
9LIBSVGTINY_VERSION = ea9d99fc8b231c22d06168135e181d61f4eb2f06
10LIBSVGTINY_INSTALL_STAGING = YES
11LIBSVGTINY_DEPENDENCIES = \
12	libxml2 host-gperf host-pkgconf host-netsurf-buildsystem
13LIBSVGTINY_LICENSE = MIT
14LIBSVGTINY_LICENSE_FILES = README
15
16# The libsvgtiny build system cannot build both the shared and static
17# libraries. So when the Buildroot configuration requests to build
18# both the shared and static variants, we build only the shared one.
19ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
20LIBSVGTINY_COMPONENT_TYPE = lib-shared
21else
22LIBSVGTINY_COMPONENT_TYPE = lib-static
23endif
24
25define LIBSVGTINY_CONFIGURE_CMDS
26	ln -sf $(HOST_DIR)/share/netsurf-buildsystem $(@D)/build
27endef
28
29# Use $(MAKE1) since parallel build fails
30define LIBSVGTINY_BUILD_CMDS
31	$(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) PREFIX=/usr \
32		COMPONENT_TYPE=$(LIBSVGTINY_COMPONENT_TYPE)
33endef
34
35define LIBSVGTINY_INSTALL_STAGING_CMDS
36	$(TARGET_CONFIGURE_OPTS) \
37		$(MAKE1) -C $(@D) PREFIX=/usr DESTDIR=$(STAGING_DIR) \
38		COMPONENT_TYPE=$(LIBSVGTINY_COMPONENT_TYPE) install
39endef
40
41define LIBSVGTINY_INSTALL_TARGET_CMDS
42	$(TARGET_CONFIGURE_OPTS) \
43		$(MAKE1) -C $(@D) PREFIX=/usr DESTDIR=$(TARGET_DIR) \
44		COMPONENT_TYPE=$(LIBSVGTINY_COMPONENT_TYPE) install
45endef
46
47$(eval $(generic-package))
48