diff options
| author | Waldemar Brodkorb <wbx@openadk.org> | 2013-11-29 16:06:00 +0100 |
|---|---|---|
| committer | Waldemar Brodkorb <wbx@openadk.org> | 2013-11-29 16:06:00 +0100 |
| commit | 8e8512391c668fc7074f812f15eabe8f176fb01e (patch) | |
| tree | f9f0862dd6eb962fe3fc4803180b431843f6c5be /package/libxml2 | |
| parent | c491653a1f9574a42965025805d472c3d145f699 (diff) | |
| parent | ae3d4616ed9c19a29d656193254657f93d612fa2 (diff) | |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/libxml2')
| -rw-r--r-- | package/libxml2/Makefile | 45 | ||||
| -rw-r--r-- | package/libxml2/patches/patch-configure | 42 | ||||
| -rw-r--r-- | package/libxml2/patches/patch-configure_in | 87 | ||||
| -rw-r--r-- | package/libxml2/patches/patch-python_Makefile_am | 17 | ||||
| -rw-r--r-- | package/libxml2/patches/patch-python_setup_py | 11 |
5 files changed, 138 insertions, 64 deletions
diff --git a/package/libxml2/Makefile b/package/libxml2/Makefile index 602d2d551..624ffdb26 100644 --- a/package/libxml2/Makefile +++ b/package/libxml2/Makefile @@ -5,34 +5,47 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libxml2 PKG_VERSION:= 2.9.1 -PKG_RELEASE:= 2 +PKG_RELEASE:= 4 PKG_MD5SUM:= 9c0cfef285d5c4a5c80d00904ddab380 PKG_DESCR:= XML C parser and toolkit PKG_SECTION:= libs PKG_DEPENDS:= zlib -PKG_BUILDDEP:= zlib +PKG_BUILDDEP:= autotool gettext-tiny libxml2-host zlib PKG_URL:= http://www.xmlsoft.org/ PKG_SITES:= http://xmlsoft.org/sources/ +PKG_OPTS:= dev -PKG_SUBPKGS:= LIBXML2 LIBXML2_DEV LIBXML2_PYTHON -PKGSD_LIBXML2_DEV:= XML parser headers -PKGSC_LIBXML2_DEV:= devel +PKG_SUBPKGS:= LIBXML2 LIBXML2_PYTHON PKGSD_LIBXML2_PYTHON:= XML python bindings PKGSC_LIBXML2_PYTHON:= libs PKGSB_LIBXML2_PYTHON:= python2 +PKGSS_LIBXML2_PYTHON:= python2 +ifeq ($(ADK_STATIC),y) +PKG_OPTS+= libmix +endif + +include ${TOPDIR}/mk/host.mk include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,LIBXML2,libxml2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -$(eval $(call PKG_template,LIBXML2_DEV,libxml2-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBXML2_DEV},${PKGSC_LIBXML2_DEV})) +$(eval $(call HOST_template,LIBXML2,libxml2,${PKG_VERSION}-${PKG_RELEASE})) +$(eval $(call PKG_template,LIBXML2,libxml2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,LIBXML2_PYTHON,libxml2-python,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBXML2_PYTHON},${PKGSC_LIBXML2_PYTHON})) include $(TOPDIR)/mk/python.mk +HOST_STYLE:= auto +HOST_CONFIGURE_ARGS+= --with-python \ + --without-iconv \ + --without-lzma \ + --without-zlib +HOST_MAKE_FLAGS+= LDFLAGS=-lpthread + +AUTOTOOL_STYLE:= autoreconf TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) TARGET_LDFLAGS+= -lpthread ifneq ($(ADK_PACKAGE_LIBXML2_PYTHON),) -CONFIGURE_ARGS+= --with-python=${STAGING_DIR}/usr +CONFIGURE_ARGS+= --with-python=$(STAGING_TARGET_DIR)/usr else CONFIGURE_ARGS+= --without-python endif @@ -63,26 +76,14 @@ CONFIGURE_ARGS+= --without-c14n \ --with-xptr \ --with-zlib -pre-configure: - ${INSTALL_DIR} ${STAGING_DIR}/usr/lib/site-packages - libxml2-install: ${INSTALL_DIR} ${IDIR_LIBXML2}/usr/lib ${CP} ${WRKINST}/usr/lib/libxml2.so* ${IDIR_LIBXML2}/usr/lib -libxml2-dev-install: - ${INSTALL_DIR} ${IDIR_LIBXML2_DEV}/usr/include - ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBXML2_DEV}/usr/include - ${INSTALL_DIR} ${IDIR_LIBXML2_DEV}/usr/lib/pkgconfig - ${INSTALL_DATA} ${WRKINST}/usr/lib/pkgconfig/libxml-2.0.pc \ - ${IDIR_LIBXML2_DEV}/usr/lib/pkgconfig - ${INSTALL_DIR} ${IDIR_LIBXML2_DEV}/usr/bin - ${INSTALL_BIN} ${WRKINST}/usr/bin/xml2-config \ - ${IDIR_LIBXML2_DEV}/usr/bin - libxml2-python-install: $(INSTALL_DIR) $(IDIR_LIBXML2_PYTHON)/usr/lib/python$(PYTHON_VERSION)/site-packages - $(CP) $(WRKINST)/usr/lib/python$(PYTHON_VERSION)/site-packages/* \ + $(CP) $(WRKINST)/usr/lib/python$(PYTHON_VERSION)/site-packages/*.{so,py} \ $(IDIR_LIBXML2_PYTHON)/usr/lib/python$(PYTHON_VERSION)/site-packages +include ${TOPDIR}/mk/host-bottom.mk include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libxml2/patches/patch-configure b/package/libxml2/patches/patch-configure deleted file mode 100644 index 2f9b3b5bf..000000000 --- a/package/libxml2/patches/patch-configure +++ /dev/null @@ -1,42 +0,0 @@ ---- libxml2-2.9.1.orig/configure 2013-04-19 09:36:11.000000000 +0200 -+++ libxml2-2.9.1/configure 2013-09-25 13:59:27.000000000 +0200 -@@ -14010,17 +14010,17 @@ case ${host} in - esac - - -- -+set -x - PYTHON_VERSION= - PYTHON_INCLUDES= - PYTHON_SITE_PACKAGES= - PYTHON_TESTS= - pythondir= - if test "$with_python" != "no" ; then -- if test -x "$with_python/bin/python" -+ if test -x "$with_python/bin/hostpython" - then -- echo Found python in $with_python/bin/python -- PYTHON="$with_python/bin/python" -+ echo Found python in $with_python/bin/hostpython -+ PYTHON="$with_python/bin/hostpython" - else - if test -x "$with_python/python.exe" - then -@@ -14122,7 +14122,7 @@ fi - else - if test -d $with_python/lib/site-packages - then -- PYTHON_SITE_PACKAGES=$with_python/lib/site-packages -+ PYTHON_SITE_PACKAGES=/usr/lib/python$PYTHON_VERSION/site-packages - else - PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"` - fi -@@ -14148,7 +14148,7 @@ else - PYTHON_SUBDIR= - fi - -- -+set +x - - - WITH_MODULES=0 diff --git a/package/libxml2/patches/patch-configure_in b/package/libxml2/patches/patch-configure_in new file mode 100644 index 000000000..6432ced20 --- /dev/null +++ b/package/libxml2/patches/patch-configure_in @@ -0,0 +1,87 @@ +--- libxml2-2.9.1.orig/configure.in 2013-04-19 09:25:20.000000000 +0200 ++++ libxml2-2.9.1/configure.in 2013-11-23 23:02:06.000000000 +0100 +@@ -748,80 +748,16 @@ PYTHON_SITE_PACKAGES= + PYTHON_TESTS= + pythondir= + if test "$with_python" != "no" ; then +- if test -x "$with_python/bin/python" +- then +- echo Found python in $with_python/bin/python +- PYTHON="$with_python/bin/python" +- else +- if test -x "$with_python/python.exe" +- then +- echo Found python in $with_python/python.exe +- PYTHON="$with_python/python.exe" +- else +- if test -x "$with_python" +- then +- echo Found python in $with_python +- PYTHON="$with_python" +- else +- if test -x "$PYTHON" +- then +- echo Found python in environment PYTHON=$PYTHON +- with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"` +- else +- AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) +- fi +- fi +- fi +- fi ++ AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) + if test "$PYTHON" != "" + then + PYTHON_VERSION=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_version())"` +- PYTHON_INCLUDES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"` +-# does not work as it produce a /usr/lib/python path instead of/usr/lib64/python +-# +-# PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"` + echo Found Python version $PYTHON_VERSION + fi +- if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = "" +- then +- if test -r $with_python/include/python$PYTHON_VERSION/Python.h +- then +- PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION +- else +- if test -r $prefix/include/python$PYTHON_VERSION/Python.h +- then +- PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION +- else +- if test -r /usr/include/python$PYTHON_VERSION/Python.h +- then +- PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION +- else +- if test -r $with_python/include/Python.h +- then +- PYTHON_INCLUDES=$with_python/include +- else +- echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h +- fi +- fi +- fi +- fi +- fi +- if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = "" +- then +- if test -d $libdir/python$PYTHON_VERSION/site-packages +- then +- PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages +- else +- if test -d $with_python/lib/site-packages +- then +- PYTHON_SITE_PACKAGES=$with_python/lib/site-packages +- else +- PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"` +- fi +- fi +- fi +- pythondir='$(PYTHON_SITE_PACKAGES)' ++ PYTHON_INCLUDES=`python$PYTHON_VERSION-config --includes` + PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags` ++ PYTHON_SITE_PACKAGES=${prefix}/lib/python$PYTHON_VERSION/site-packages ++ pythondir='$(PYTHON_SITE_PACKAGES)' + else + PYTHON= + fi diff --git a/package/libxml2/patches/patch-python_Makefile_am b/package/libxml2/patches/patch-python_Makefile_am new file mode 100644 index 000000000..82061eee3 --- /dev/null +++ b/package/libxml2/patches/patch-python_Makefile_am @@ -0,0 +1,17 @@ +--- libxml2-2.9.1.orig/python/Makefile.am 2013-04-19 08:56:45.000000000 +0200 ++++ libxml2-2.9.1/python/Makefile.am 2013-11-24 09:18:44.000000000 +0100 +@@ -19,12 +19,12 @@ if WITH_PYTHON + AM_CPPFLAGS = \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ +- -I$(PYTHON_INCLUDES) ++ $(PYTHON_INCLUDES) + + python_LTLIBRARIES = libxml2mod.la + + libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c +-libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \ ++libxml2mod_la_LDFLAGS = $(LDFLAGS) $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \ + $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS) + + BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c diff --git a/package/libxml2/patches/patch-python_setup_py b/package/libxml2/patches/patch-python_setup_py new file mode 100644 index 000000000..13ec3493d --- /dev/null +++ b/package/libxml2/patches/patch-python_setup_py @@ -0,0 +1,11 @@ +--- libxml2-2.9.1.orig/python/setup.py 2013-04-19 09:36:20.000000000 +0200 ++++ libxml2-2.9.1/python/setup.py 2013-11-21 18:47:16.000000000 +0100 +@@ -8,7 +8,7 @@ from distutils.core import setup, Extens + # Below ROOT, we expect to find include, include/libxml2, lib and bin. + # On *nix, it is not needed (but should not harm), + # on Windows, it is set by configure.js. +-ROOT = r'/usr' ++ROOT = r'/Volumes/adk/openadk/host_i686_gnu_eglibc/usr' + + # Thread-enabled libxml2 + with_threads = 1 |
