rules.mak 1.42 KB
Newer Older
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
1 2
# libxml2

3
LIBXML2_VERSION := 2.9.4
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
4 5
LIBXML2_URL := http://xmlsoft.org/sources/libxml2-$(LIBXML2_VERSION).tar.gz

6 7 8 9
PKGS += libxml2
ifeq ($(call need_pkg,"libxml-2.0"),)
PKGS_FOUND += libxml2
endif
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
10 11

$(TARBALLS)/libxml2-$(LIBXML2_VERSION).tar.gz:
12
	$(call download_pkg,$(LIBXML2_URL),libxml2)
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
13 14 15

.sum-libxml2: libxml2-$(LIBXML2_VERSION).tar.gz

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
XMLCONF = --with-minimal     \
          --with-catalog     \
          --with-reader      \
          --with-tree        \
          --with-push        \
          --with-xptr        \
          --with-valid       \
          --with-xpath       \
          --with-xinclude    \
          --with-sax1        \
          --without-zlib     \
          --without-iconv    \
          --without-http     \
          --without-ftp      \
          --without-docbook  \
          --without-regexps  \
          --without-python
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
33

34 35 36 37
ifdef WITH_OPTIMIZATION
XMLCONF+= --without-debug
endif

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
38 39
libxml2: libxml2-$(LIBXML2_VERSION).tar.gz .sum-libxml2
	$(UNPACK)
40
	$(APPLY) $(SRC)/libxml2/no-tests.patch
41
	$(APPLY) $(SRC)/libxml2/win32.patch
42
	$(APPLY) $(SRC)/libxml2/bins.patch
43
	$(APPLY) $(SRC)/libxml2/pthread.patch
44
ifdef HAVE_WINSTORE
45 46
	$(APPLY) $(SRC)/libxml2/nogetcwd.patch
endif
47
	$(APPLY) $(SRC)/libxml2/libxml2-lzma.patch
48
	$(call pkg_static,"libxml-2.0.pc.in")
49
	$(MOVE)
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
50 51

.libxml2: libxml2
52
	$(RECONF)
53
	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) CFLAGS="$(CFLAGS) -DLIBXML_STATIC" $(XMLCONF)
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
54 55
	cd $< && $(MAKE) install
	touch $@