libgd: avoid recursive and redundant dependencies
[feed/packages.git] / libs / libxml2 / Makefile
1 #
2 # Copyright (C) 2006-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libxml2
11 PKG_VERSION:=2.9.14
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
16 PKG_HASH:=60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee
17
18 PKG_LICENSE:=MIT
19 PKG_LICENSE_FILES:=COPYING
20 PKG_CPE_ID:=cpe:/a:xmlsoft:libxml2
21
22 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
23
24 PKG_FIXUP:=autoreconf
25 PKG_INSTALL:=1
26 PKG_BUILD_PARALLEL:=0
27
28 include $(INCLUDE_DIR)/host-build.mk
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/nls.mk
31
32 define Package/libxml2
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE:=Gnome XML library
36 URL:=http://xmlsoft.org/
37 DEPENDS:=+libpthread +zlib $(ICONV_DEPENDS)
38 endef
39
40 define Package/libxml2/description
41 A library for manipulating XML and HTML resources.
42 endef
43
44 define Package/libxml2-dev
45 SECTION:=devel
46 CATEGORY:=Development
47 SUBMENU:=Libraries
48 TITLE:=Development files for libxml2
49 URL:=http://xmlsoft.org/
50 DEPENDS:=+libxml2
51 endef
52
53 define Package/libxml2-dev/description
54 A library for manipulating XML and HTML resources.
55
56 This package contains the headers and xml2-config binary.
57 endef
58
59 define Package/libxml2-utils
60 SECTION:=utils
61 CATEGORY:=Utilities
62 TITLE:=XML command line utilities (xmllint...)
63 URL:=http://xmlsoft.org/
64 DEPENDS:=+libxml2
65 endef
66
67 define Package/libxml2-utils/description
68 This package contains the binaries xmllint and xmlcatalog
69 from libxml2, a library for manipulating XML and HTML resources.
70 endef
71
72 TARGET_CFLAGS += $(FPIC)
73
74 CONFIGURE_ARGS += \
75 --enable-shared \
76 --enable-static \
77 --with-c14n \
78 --without-catalog \
79 --with-debug \
80 --without-docbook \
81 --with-html \
82 --without-ftp \
83 --without-http \
84 --without-iso8859x \
85 --without-legacy \
86 --with-output \
87 --without-pattern \
88 --without-push \
89 --without-python \
90 --with-reader \
91 --without-readline \
92 --without-regexps \
93 --with-sax1 \
94 --with-schemas \
95 --with-threads \
96 --with-tree \
97 --with-valid \
98 --with-writer \
99 --with-xinclude \
100 --with-xpath \
101 --with-xptr \
102 --with-zlib=$(STAGING_DIR)/usr \
103 --with-iconv$(if $(ICONV_PREFIX),="$(ICONV_PREFIX)") \
104 --without-lzma
105
106 HOST_CONFIGURE_ARGS += \
107 --disable-shared \
108 --enable-static \
109 --with-pic \
110 --with-c14n \
111 --without-catalog \
112 --with-debug \
113 --without-docbook \
114 --with-html \
115 --without-ftp \
116 --without-http \
117 --without-iconv \
118 --without-iso8859x \
119 --without-legacy \
120 --with-output \
121 --without-pattern \
122 --without-push \
123 --without-python \
124 --with-reader \
125 --without-readline \
126 --without-regexps \
127 --with-sax1 \
128 --with-schemas \
129 --with-threads \
130 --with-tree \
131 --with-valid \
132 --with-writer \
133 --with-xinclude \
134 --with-xpath \
135 --with-xptr \
136 --with-zlib \
137 --without-lzma
138
139 define Build/InstallDev
140 $(INSTALL_DIR) $(2)/bin
141 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config \
142 $(2)/bin/$(GNU_TARGET_NAME)-xml2-config
143 $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
144 $(2)/bin/$(GNU_TARGET_NAME)-xml2-config
145 $(LN) $(GNU_TARGET_NAME)-xml2-config $(2)/bin/xml2-config
146
147 $(INSTALL_DIR) $(1)/usr/include
148 $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
149
150 $(INSTALL_DIR) $(1)/usr/lib
151 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} $(1)/usr/lib/
152
153 $(INSTALL_DIR) $(1)/usr/lib/cmake/libxml2
154 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libxml2/libxml2-config.cmake \
155 $(1)/usr/lib/cmake/libxml2
156
157 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
158 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
159
160 $(INSTALL_DIR) $(2)/share/aclocal/
161 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal
162 endef
163
164 define Host/Install
165 $(call Host/Install/Default)
166 mv $(1)/bin/xml2-config $(1)/bin/$(GNU_HOST_NAME)-xml2-config
167 $(LN) $(GNU_HOST_NAME)-xml2-config $(1)/bin/xml2-config
168 endef
169
170 define Package/libxml2/install
171 $(INSTALL_DIR) $(1)/usr/lib
172 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
173 endef
174
175 define Package/libxml2-dev/install
176 $(INSTALL_DIR) $(1)/usr/bin
177 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
178 $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/bin/xml2-config
179
180 $(INSTALL_DIR) $(1)/usr/include/
181 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
182
183 $(INSTALL_DIR) $(1)/usr/lib
184 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so $(1)/usr/lib/
185
186 $(INSTALL_DIR) $(1)/usr/lib/{cmake,pkgconfig}
187 $(CP) $(PKG_INSTALL_DIR)/usr/lib/{cmake,pkgconfig} $(1)/usr/lib/
188 $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/lib/pkgconfig/*.pc
189
190 $(INSTALL_DIR) $(1)/usr/share/aclocal
191 $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal
192 endef
193
194 define Package/libxml2-utils/install
195 $(INSTALL_DIR) $(1)/usr/bin
196 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
197 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
198 endef
199
200 $(eval $(call HostBuild))
201 $(eval $(call BuildPackage,libxml2))
202 $(eval $(call BuildPackage,libxml2-dev))
203 $(eval $(call BuildPackage,libxml2-utils))