libxml2: fix compilation on archlinux and gentoo
[feed/packages.git] / libs / libxml2 / Makefile
1 #
2 # Copyright (C) 2006-2014 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.2
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://gd.tuwien.ac.at/languages/libxml/ \
16 http://xmlsoft.org/sources/ \
17 ftp://fr.rpmfind.net/pub/libxml/
18 PKG_MD5SUM:=9e6a9aca9d155737868b3dc5fd82f788
19
20 PKG_LICENSE:=MIT
21 PKG_LICENSE_FILES:=COPYING
22
23 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
24
25 PKG_FIXUP:=autoreconf
26 PKG_INSTALL:=1
27 PKG_BUILD_PARALLEL:=1
28
29 include $(INCLUDE_DIR)/host-build.mk
30 include $(INCLUDE_DIR)/package.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
38 endef
39
40 define Package/libxml2/description
41 A library for manipulating XML and HTML resources.
42 endef
43
44 TARGET_CFLAGS += $(FPIC)
45 TARGET_LDFLAGS += -lz
46
47 CONFIGURE_ARGS += \
48 --enable-shared \
49 --enable-static \
50 --with-c14n \
51 --without-catalog \
52 --with-debug \
53 --without-docbook \
54 --with-html \
55 --without-ftp \
56 --without-http \
57 --without-iconv \
58 --without-iso8859x \
59 --without-legacy \
60 --with-output \
61 --without-pattern \
62 --without-push \
63 --without-python \
64 --with-reader \
65 --without-readline \
66 --without-regexps \
67 --with-sax1 \
68 --with-schemas \
69 --with-threads \
70 --with-tree \
71 --with-valid \
72 --with-writer \
73 --with-xinclude \
74 --with-xpath \
75 --with-xptr \
76 --with-zlib \
77 --without-lzma
78
79 HOST_CONFIGURE_ARGS += \
80 --enable-shared \
81 --enable-static \
82 --with-c14n \
83 --without-catalog \
84 --with-debug \
85 --without-docbook \
86 --with-html \
87 --without-ftp \
88 --without-http \
89 --without-iconv \
90 --without-iso8859x \
91 --without-legacy \
92 --with-output \
93 --without-pattern \
94 --without-push \
95 --without-python \
96 --with-reader \
97 --without-readline \
98 --without-regexps \
99 --with-sax1 \
100 --with-schemas \
101 --with-threads \
102 --with-tree \
103 --with-valid \
104 --with-writer \
105 --with-xinclude \
106 --with-xpath \
107 --with-xptr \
108 --with-zlib \
109 --without-lzma
110
111 define Build/InstallDev
112 $(INSTALL_DIR) $(2)/bin
113 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(2)/bin/
114 $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(2)/bin/xml2-config
115
116 $(INSTALL_DIR) $(1)/usr/include
117 $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
118
119 $(INSTALL_DIR) $(1)/usr/lib
120 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} $(1)/usr/lib/
121
122 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
123 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
124
125 $(INSTALL_DIR) $(2)/share/aclocal/
126 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal
127 endef
128
129 define Package/libxml2/install
130 $(INSTALL_DIR) $(1)/usr/lib
131 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/
132 endef
133
134 $(eval $(call HostBuild))
135 $(eval $(call BuildPackage,libxml2))