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
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
:=3fe822ece20796060af63b7c60acb151e5844204d289da0ce08f8fdf131e5a61
18 PKG_MAINTAINER
:=Jo-Philipp Wich
<jo@mein.io
>
20 PKG_LICENSE_FILES
:=COPYING
21 PKG_CPE_ID
:=cpe
:/a
:libgd
:libgd
25 include $(INCLUDE_DIR
)/package.mk
26 include $(INCLUDE_DIR
)/cmake.mk
28 define Package
/libgd
/default
31 DEPENDS
:=+libjpeg
+libpng
+libwebp
32 TITLE
:=The GD graphics library
33 URL
:=https
://libgd.github.io
/
37 $(call Package
/libgd
/default
)
39 DEPENDS
+=+LIBGD_TIFF
:libtiff
+LIBGD_FREETYPE
:libfreetype
44 define Package
/libgd-full
45 $(call Package
/libgd
/default
)
46 DEPENDS
+=+libtiff
+libfreetype
52 define Package
/libgd
/description
/default
53 GD is an open source code library for the dynamic creation of images by
54 programmers. GD creates PNG
, JPEG and GIF images
, among other formats.
57 Package
/libgd
/description
=$(Package
/libgd
/description
/default
)
59 define Package
/libgd-full
/description
60 $(call Package
/libgd
/description
/default
)
62 This variant of the libgd package is compiled will
all features enabled.
65 define Package
/libgd
/config
68 bool
"TIFF image support"
71 Enable TIFF image support through libtiff
75 bool
"Freetype 2.x library support"
78 Enable Freetype
2.x font engine support through libfreetype
82 TARGET_CFLAGS
+= $(FPIC
) -ffunction-sections
-fdata-sections
85 -DENABLE_FONTCONFIG
=OFF \
90 -DENABLE_TIFF
=$(if
$(CONFIG_LIBGD_TIFF
),ON
,OFF
) \
93 -DZLIB_INCLUDE_DIR
="$(STAGING_DIR)/usr"
95 ifeq ($(BUILD_VARIANT
),full
)
98 -DFREETYPE_INCLUDE_DIRS
=$(STAGING_DIR
)/usr
/include/freetype2
/ \
103 ifdef CONFIG_LIBGD_FREETYPE
105 -DFREETYPE_INCLUDE_DIRS
=$(STAGING_DIR
)/usr
/include/freetype2
/ \
109 -DENABLE_FREETYPE
=OFF
114 define Build
/InstallDev
115 $(call Build
/InstallDev
/cmake
,$(1))
116 $(SED
) 's,/usr/lib,$(STAGING_DIR)/usr/lib,g' $(1)/usr
/lib
/pkgconfig
/gdlib.
pc
117 $(SED
) 's,/usr/include,$(STAGING_DIR)/include,g' $(1)/usr
/lib
/pkgconfig
/gdlib.
pc
120 define Package
/libgd
/install
121 $(INSTALL_DIR
) $(1)/usr
/lib
122 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgd.so
* $(1)/usr
/lib
/
125 Package
/libgd-full
/install=$(Package
/libgd
/install)
127 $(eval
$(call BuildPackage
,libgd
))
128 $(eval
$(call BuildPackage
,libgd-full
))