2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
12 PKG_RELEASE
:=$(AUTORELEASE
)
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=https
://github.com
/$(PKG_NAME
)/$(PKG_NAME
)/releases
/download
/gd-
$(PKG_VERSION
)/
16 PKG_HASH
:=478a047084e0d89b83616e4c2cf3c9438175fb0cc55d8c8967f06e0427f7d7fb
18 PKG_MAINTAINER
:=Jo-Philipp Wich
<jo@mein.io
>
20 PKG_LICENSE_FILES
:=COPYING
21 PKG_CPE_ID
:=cpe
:/a
:libgd
:libgd
23 include $(INCLUDE_DIR
)/package.mk
24 include $(INCLUDE_DIR
)/cmake.mk
26 define Package
/libgd
/default
29 DEPENDS
:=+libjpeg
+libpng
+libwebp
30 TITLE
:=The GD graphics library
31 URL
:=https
://libgd.github.io
/
35 $(call Package
/libgd
/default
)
37 DEPENDS
+=+LIBGD_TIFF
:libtiff
+LIBGD_FREETYPE
:libfreetype
42 define Package
/libgd-full
43 $(call Package
/libgd
/default
)
44 DEPENDS
+=+libtiff
+libfreetype
50 define Package
/libgd
/description
/default
51 GD is an open source code library for the dynamic creation of images by
52 programmers. GD creates PNG
, JPEG and GIF images
, among other formats.
55 Package
/libgd
/description
=$(Package
/libgd
/description
/default
)
57 define Package
/libgd-full
/description
58 $(call Package
/libgd
/description
/default
)
60 This variant of the libgd package is compiled will
all features enabled.
63 define Package
/libgd
/config
66 bool
"TIFF image support"
69 Enable TIFF image support through libtiff
73 bool
"Freetype 2.x library support"
76 Enable Freetype
2.x font engine support through libfreetype
80 TARGET_CFLAGS
+= $(FPIC
) -ffunction-sections
-fdata-sections
-flto
83 -DENABLE_FONTCONFIG
=OFF \
88 -DENABLE_TIFF
=$(if
$(CONFIG_LIBGD_TIFF
),ON
,OFF
) \
91 -DZLIB_INCLUDE_DIR
="$(STAGING_DIR)/usr"
93 ifeq ($(BUILD_VARIANT
),full
)
96 -DFREETYPE_INCLUDE_DIRS
=$(STAGING_DIR
)/usr
/include/freetype2
/ \
101 ifdef CONFIG_LIBGD_FREETYPE
103 -DFREETYPE_INCLUDE_DIRS
=$(STAGING_DIR
)/usr
/include/freetype2
/ \
107 -DENABLE_FREETYPE
=OFF
112 define Build
/InstallDev
113 $(call Build
/InstallDev
/cmake
,$(1))
114 $(SED
) 's,/usr/lib,$(STAGING_DIR)/usr/lib,g' $(1)/usr
/lib
/pkgconfig
/gdlib.
pc
115 $(SED
) 's,/usr/include,$(STAGING_DIR)/include,g' $(1)/usr
/lib
/pkgconfig
/gdlib.
pc
118 define Package
/libgd
/install
119 $(INSTALL_DIR
) $(1)/usr
/lib
120 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgd.so
* $(1)/usr
/lib
/
123 Package
/libgd-full
/install=$(Package
/libgd
/install)
125 $(eval
$(call BuildPackage
,libgd
))
126 $(eval
$(call BuildPackage
,libgd-full
))