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
:=60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee
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 \
103 --with-iconv
$(if
$(ICONV_PREFIX
),="$(ICONV_PREFIX)") \
106 HOST_CONFIGURE_ARGS
+= \
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
147 $(INSTALL_DIR
) $(1)/usr
/include
148 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libxml2
$(1)/usr
/include/
150 $(INSTALL_DIR
) $(1)/usr
/lib
151 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libxml2.
{la
,a
,so
*} $(1)/usr
/lib
/
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
157 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
158 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libxml-2.0.
pc $(1)/usr
/lib
/pkgconfig
/
160 $(INSTALL_DIR
) $(2)/share
/aclocal
/
161 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/aclocal
/* $(2)/share
/aclocal
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
170 define Package
/libxml2
/install
171 $(INSTALL_DIR
) $(1)/usr
/lib
172 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libxml2.so.
* $(1)/usr
/lib
/
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
180 $(INSTALL_DIR
) $(1)/usr
/include/
181 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/* $(1)/usr
/include/
183 $(INSTALL_DIR
) $(1)/usr
/lib
184 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libxml2.so
$(1)/usr
/lib
/
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
190 $(INSTALL_DIR
) $(1)/usr
/share
/aclocal
191 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/aclocal
/* $(1)/usr
/share
/aclocal
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
/
200 $(eval
$(call HostBuild
))
201 $(eval
$(call BuildPackage
,libxml2
))
202 $(eval
$(call BuildPackage
,libxml2-dev
))
203 $(eval
$(call BuildPackage
,libxml2-utils
))