2007-07-16 22:13:22 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# libxml2
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
|
|
|
LIBXML2_VERSION=2.6.29
|
|
|
|
LIBXML2_SOURCE=libxml2-sources-$(LIBXML2_VERSION).tar.gz
|
|
|
|
LIBXML2_SITE=ftp://xmlsoft.org/libxml2
|
|
|
|
LIBXML2_DIR=$(BUILD_DIR)/libxml2-$(LIBXML2_VERSION)
|
|
|
|
LIBXML2_CAT:=$(ZCAT)
|
|
|
|
|
|
|
|
$(DL_DIR)/$(LIBXML2_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(LIBXML2_SITE)/$(LIBXML2_SOURCE)
|
|
|
|
|
|
|
|
$(LIBXML2_DIR)/.unpacked: $(DL_DIR)/$(LIBXML2_SOURCE)
|
|
|
|
$(LIBXML2_CAT) $(DL_DIR)/$(LIBXML2_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
touch $(LIBXML2_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(LIBXML2_DIR)/.configured: $(LIBXML2_DIR)/.unpacked
|
|
|
|
(cd $(LIBXML2_DIR); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
2007-08-07 19:27:59 +02:00
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
|
|
|
--libexecdir=/usr/lib \
|
2007-07-16 22:13:22 +02:00
|
|
|
--sysconfdir=/etc \
|
2007-08-07 19:27:59 +02:00
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
|
|
|
--includedir=/usr/include \
|
|
|
|
--with-gnu-ld \
|
2007-07-16 22:13:22 +02:00
|
|
|
--enable-shared \
|
2007-08-07 19:27:59 +02:00
|
|
|
--enable-static \
|
|
|
|
--enable-ipv6=no \
|
|
|
|
--without-debugging \
|
|
|
|
--without-python \
|
|
|
|
--without-threads \
|
2007-07-16 22:13:22 +02:00
|
|
|
$(DISABLE_NLS) \
|
|
|
|
);
|
|
|
|
touch $(LIBXML2_DIR)/.configured
|
|
|
|
|
2007-08-19 22:59:37 +02:00
|
|
|
$(STAGING_DIR)/usr/lib/libxml2.so: $(LIBXML2_DIR)/.configured
|
2007-07-16 22:13:22 +02:00
|
|
|
$(MAKE) CC=$(TARGET_CC) -C $(LIBXML2_DIR)
|
|
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(LIBXML2_DIR) install
|
2007-08-07 19:27:59 +02:00
|
|
|
rm -f $(STAGING_DIR)/usr/lib/libxml2.la
|
|
|
|
$(SED) 's:prefix=/usr:prefix=$(STAGING_DIR)/usr:' \
|
|
|
|
-e 's:includedir=/usr/include:includedir=$(STAGING_DIR)/usr/include:' \
|
|
|
|
$(STAGING_DIR)/usr/bin/xml2-config
|
2007-07-16 22:13:22 +02:00
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/lib/libxml2.so: $(STAGING_DIR)/usr/lib/libxml2.so
|
2007-08-19 22:59:37 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib
|
2007-07-16 22:13:22 +02:00
|
|
|
cp -dpf $(STAGING_DIR)/usr/lib/libxml2.so* $(TARGET_DIR)/usr/lib/
|
|
|
|
$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libxml2.so*
|
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/lib/libxml2.a: $(STAGING_DIR)/usr/lib/libxml2.so
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/lib/libxml2.*a $(TARGET_DIR)/usr/lib/
|
|
|
|
|
2007-07-17 17:17:42 +02:00
|
|
|
libxml2: uclibc $(TARGET_DIR)/usr/lib/libxml2.so libxml2-headers
|
2007-07-16 22:13:22 +02:00
|
|
|
|
2007-08-19 22:59:37 +02:00
|
|
|
$(STAGING_DIR)/usr/include/libxml: $(TARGET_DIR)/usr/lib/libxml2.so
|
2007-07-17 17:17:42 +02:00
|
|
|
cp -af $(LIBXML2_DIR)/include/libxml $(STAGING_DIR)/usr/include/libxml2
|
|
|
|
|
2007-07-24 16:12:38 +02:00
|
|
|
$(TARGET_DIR)/usr/include/libxml2: libxml2-headers
|
2007-07-17 17:17:42 +02:00
|
|
|
cp -af $(LIBXML2_DIR)/include/libxml $(TARGET_DIR)/usr/include/libxml2
|
|
|
|
|
|
|
|
|
2007-07-24 16:12:38 +02:00
|
|
|
libxml2-headers: $(STAGING_DIR)/usr/include/libxml
|
2007-07-17 17:17:42 +02:00
|
|
|
|
2007-08-19 22:59:37 +02:00
|
|
|
libxml2-target-headers: $(TARGET_DIR)/usr/include/libxml2 $(TARGET_DIR)/usr/lib/libxml2.a
|
2007-07-16 22:13:22 +02:00
|
|
|
|
|
|
|
libxml2-source: $(DL_DIR)/$(LIBXML2_SOURCE)
|
|
|
|
|
|
|
|
libxml2-clean:
|
|
|
|
@if [ -d $(LIBXML2_DIR)/Makefile ] ; then \
|
|
|
|
$(MAKE) -C $(LIBXML2_DIR) clean ; \
|
|
|
|
fi;
|
|
|
|
rm -f $(STAGING_DIR)/usr/lib/libxml2.*
|
|
|
|
rm -f $(TARGET_DIR)/usr/lib/libxml2.*
|
|
|
|
|
|
|
|
|
|
|
|
libxml2-dirclean:
|
|
|
|
rm -rf $(LIBXML2_DIR)
|
2007-07-17 17:17:42 +02:00
|
|
|
|
|
|
|
.PHONY: libxml2-headers libxml2-target-headers
|
2007-07-16 22:13:22 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_LIBXML2)),y)
|
|
|
|
TARGETS+=libxml2
|
|
|
|
endif
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_LIBXML2_TARGET_HEADERS)),y)
|
2007-07-17 17:17:42 +02:00
|
|
|
TARGETS+=libxml2-target-headers
|
2007-07-16 22:13:22 +02:00
|
|
|
endif
|