1################################################################################ 2# 3# lua-gd 4# 5################################################################################ 6 7LUA_GD_VERSION = 2ce8e478a8591afd71e607506bc8c64b161bbd30 8LUA_GD_SITE = $(call github,ittner,lua-gd,$(LUA_GD_VERSION)) 9LUA_GD_LICENSE = MIT 10LUA_GD_LICENSE_FILES = COPYING 11LUA_GD_DEPENDENCIES = luainterpreter gd 12 13ifeq ($(BR2_PACKAGE_FONTCONFIG),y) 14LUA_GD_FEATURES += -DGD_FONTCONFIG 15endif 16 17ifeq ($(BR2_PACKAGE_FREETYPE),y) 18LUA_GD_FEATURES += -DGD_FREETYPE 19endif 20 21ifeq ($(BR2_PACKAGE_JPEG),y) 22LUA_GD_FEATURES += -DGD_JPEG 23endif 24 25ifeq ($(BR2_PACKAGE_LIBPNG),y) 26LUA_GD_FEATURES += -DGD_PNG 27endif 28 29ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y) 30LUA_GD_FEATURES += -DGD_XPM 31endif 32 33# VERSION follows the scheme described on https://ittner.github.io/lua-gd/manual.html#intro, 34# the current version of the binding is 3. 35define LUA_GD_BUILD_CMDS 36 $(MAKE) -C $(@D) gd.so \ 37 GDFEATURES="$(LUA_GD_FEATURES)" \ 38 CC=$(TARGET_CC) \ 39 CFLAGS="$(TARGET_CFLAGS) -fPIC -DVERSION=\\\"$(GD_VERSION)r3\\\"" \ 40 LFLAGS="-shared -lgd" 41endef 42 43define LUA_GD_INSTALL_TARGET_CMDS 44 $(INSTALL) -m 755 -D $(@D)/gd.so $(TARGET_DIR)/usr/lib/lua/$(LUAINTERPRETER_ABIVER)/gd.so 45endef 46 47$(eval $(generic-package)) 48