libxml2: update to 2.9.13
[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.13
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:=276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e
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 --without-lzma
104
105 HOST_CONFIGURE_ARGS += \
106 --disable-shared \
107 --enable-static \
108 --with-pic \
109 --with-c14n \
110 --without-catalog \
111 --with-debug \
112 --without-docbook \
113 --with-html \
114 --without-ftp \
115 --without-http \
116 --without-iconv \
117 --without-iso8859x \
118 --without-legacy \
119 --with-output \
120 --without-pattern \
121 --without-push \
122 --without-python \
123 --with-reader \
124 --without-readline \
125 --without-regexps \
126 --with-sax1 \
127 --with-schemas \
128 --with-threads \
129 --with-tree \
130 --with-valid \
131 --with-writer \
132 --with-xinclude \
133 --with-xpath \
134 --with-xptr \
135 --with-zlib \
136 --without-lzma
137
138 define Build/InstallDev
139 $(INSTALL_DIR) $(2)/bin
140 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config \
141 $(2)/bin/$(GNU_TARGET_NAME)-xml2-config
142 $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
143 $(2)/bin/$(GNU_TARGET_NAME)-xml2-config
144 $(LN) $(GNU_TARGET_NAME)-xml2-config $(2)/bin/xml2-config
145
146 $(INSTALL_DIR) $(1)/usr/include
147 $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
148
149 $(INSTALL_DIR) $(1)/usr/lib
150 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} $(1)/usr/lib/
151
152 $(INSTALL_DIR) $(1)/usr/lib/cmake/libxml2
153 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libxml2/libxml2-config.cmake \
154 $(1)/usr/lib/cmake/libxml2
155
156 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
157 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
158
159 $(INSTALL_DIR) $(2)/share/aclocal/
160 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal
161 endef
162
163 define Host/Install
164 $(call Host/Install/Default)
165 mv $(1)/bin/xml2-config $(1)/bin/$(GNU_HOST_NAME)-xml2-config
166 $(LN) $(GNU_HOST_NAME)-xml2-config $(1)/bin/xml2-config
167 endef
168
169 define Package/libxml2/install
170 $(INSTALL_DIR) $(1)/usr/lib
171 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
172 endef
173
174 define Package/libxml2-dev/install
175 $(INSTALL_DIR) $(1)/usr/bin
176 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
177 $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/bin/xml2-config
178
179 $(INSTALL_DIR) $(1)/usr/include/
180 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
181
182 $(INSTALL_DIR) $(1)/usr/lib
183 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so $(1)/usr/lib/
184
185 $(INSTALL_DIR) $(1)/usr/lib/{cmake,pkgconfig}
186 $(CP) $(PKG_INSTALL_DIR)/usr/lib/{cmake,pkgconfig} $(1)/usr/lib/
187 $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/lib/pkgconfig/*.pc
188
189 $(INSTALL_DIR) $(1)/usr/share/aclocal
190 $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal
191 endef
192
193 define Package/libxml2-utils/install
194 $(INSTALL_DIR) $(1)/usr/bin
195 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
196 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
197 endef
198
199 $(eval $(call HostBuild))
200 $(eval $(call BuildPackage,libxml2))
201 $(eval $(call BuildPackage,libxml2-dev))
202 $(eval $(call BuildPackage,libxml2-utils))