2 # Copyright (C) 2006-2016 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
:=@GNOME
/libxml2
/$(basename $(PKG_VERSION
))
16 PKG_HASH
:=276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e
19 PKG_LICENSE_FILES
:=COPYING
20 PKG_CPE_ID
:=cpe
:/a
:xmlsoft
:libxml2
22 PKG_MAINTAINER
:=Michael Heimpold
<mhei@heimpold.de
>
28 include $(INCLUDE_DIR
)/host-build.mk
29 include $(INCLUDE_DIR
)/package.mk
30 include $(INCLUDE_DIR
)/nls.mk
32 define Package
/libxml2
35 TITLE
:=Gnome XML library
36 URL
:=http
://xmlsoft.org
/
37 DEPENDS
:=+libpthread
+zlib
$(ICONV_DEPENDS
)
40 define Package
/libxml2
/description
41 A library for manipulating XML and HTML resources.
44 define Package
/libxml2-dev
48 TITLE
:=Development files for libxml2
49 URL
:=http
://xmlsoft.org
/
53 define Package
/libxml2-dev
/description
54 A library for manipulating XML and HTML resources.
56 This package contains the headers and xml2-config binary.
59 define Package
/libxml2-utils
62 TITLE
:=XML command line utilities
(xmllint...
)
63 URL
:=http
://xmlsoft.org
/
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.
72 TARGET_CFLAGS
+= $(FPIC
)
102 --with-zlib
=$(STAGING_DIR
)/usr \
105 HOST_CONFIGURE_ARGS
+= \
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
146 $(INSTALL_DIR
) $(1)/usr
/include
147 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libxml2
$(1)/usr
/include/
149 $(INSTALL_DIR
) $(1)/usr
/lib
150 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libxml2.
{la
,a
,so
*} $(1)/usr
/lib
/
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
156 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
157 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libxml-2.0.
pc $(1)/usr
/lib
/pkgconfig
/
159 $(INSTALL_DIR
) $(2)/share
/aclocal
/
160 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/aclocal
/* $(2)/share
/aclocal
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
169 define Package
/libxml2
/install
170 $(INSTALL_DIR
) $(1)/usr
/lib
171 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libxml2.so.
* $(1)/usr
/lib
/
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
179 $(INSTALL_DIR
) $(1)/usr
/include/
180 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/* $(1)/usr
/include/
182 $(INSTALL_DIR
) $(1)/usr
/lib
183 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libxml2.so
$(1)/usr
/lib
/
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
189 $(INSTALL_DIR
) $(1)/usr
/share
/aclocal
190 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/aclocal
/* $(1)/usr
/share
/aclocal
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
/
199 $(eval
$(call HostBuild
))
200 $(eval
$(call BuildPackage
,libxml2
))
201 $(eval
$(call BuildPackage
,libxml2-dev
))
202 $(eval
$(call BuildPackage
,libxml2-utils
))