2019-03-27 11:30:47 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# lua-gd
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2020-09-08 07:23:52 +02:00
|
|
|
LUA_GD_VERSION = 2ce8e478a8591afd71e607506bc8c64b161bbd30
|
2019-03-27 11:30:47 +01:00
|
|
|
LUA_GD_SITE = $(call github,ittner,lua-gd,$(LUA_GD_VERSION))
|
|
|
|
LUA_GD_LICENSE = MIT
|
|
|
|
LUA_GD_LICENSE_FILES = COPYING
|
|
|
|
LUA_GD_DEPENDENCIES = luainterpreter gd
|
|
|
|
|
2020-09-08 07:23:52 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
|
|
|
|
LUA_GD_FEATURES += -DGD_FONTCONFIG
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FREETYPE),y)
|
|
|
|
LUA_GD_FEATURES += -DGD_FREETYPE
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_JPEG),y)
|
|
|
|
LUA_GD_FEATURES += -DGD_JPEG
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBPNG),y)
|
|
|
|
LUA_GD_FEATURES += -DGD_PNG
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y)
|
|
|
|
LUA_GD_FEATURES += -DGD_XPM
|
|
|
|
endif
|
|
|
|
|
2019-03-27 11:30:47 +01:00
|
|
|
# VERSION follows the scheme described on https://ittner.github.io/lua-gd/manual.html#intro,
|
|
|
|
# the current version of the binding is 3.
|
|
|
|
define LUA_GD_BUILD_CMDS
|
|
|
|
$(MAKE) -C $(@D) gd.so \
|
2020-09-08 07:23:52 +02:00
|
|
|
GDFEATURES="$(LUA_GD_FEATURES)" \
|
2019-03-27 11:30:47 +01:00
|
|
|
CC=$(TARGET_CC) \
|
2019-03-31 18:01:37 +02:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) -fPIC -DVERSION=\\\"$(GD_VERSION)r3\\\"" \
|
2019-03-27 11:30:47 +01:00
|
|
|
LFLAGS="-shared -lgd"
|
|
|
|
endef
|
|
|
|
|
|
|
|
define LUA_GD_INSTALL_TARGET_CMDS
|
|
|
|
$(INSTALL) -m 755 -D $(@D)/gd.so $(TARGET_DIR)/usr/lib/lua/$(LUAINTERPRETER_ABIVER)/gd.so
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|