Magellan Linux

Contents of /trunk/core/libxml2/libxml2-2.9.6-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 29814 - (show annotations) (download)
Fri Oct 13 07:16:50 2017 UTC (6 years, 8 months ago) by niro
File size: 1142 byte(s)
-python2/python3 rebuild
1 # $Id$
2
3 PNAME="libxml2"
4 PVER="2.9.6"
5 PBUILD="r3"
6
7 PCAT="dev-libs"
8
9 DESCRIPTION="Libxml2 is the XML C parser and toolkit developed for the Gnome project."
10 HOMEPAGE="http://xmlsoft.org/"
11
12 DEPEND=">= sys-libs/zlib-1.2.8"
13
14 SRCFILE="${PNAME}-${PVER}.tar.gz"
15 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
16
17 sminclude multilib mbuild python2 python3
18
19 SRC_URI=(
20 ftp://xmlsoft.org/${PNAME}/${SRCFILE}
21 mirror://${PNAME}/${SRCFILE}
22 )
23
24 UP2DATE="updatecmd ftp://xmlsoft.org/${PNAME} | grep LATEST_$(echo ${PNAME} | tr '[:lower:]' '[:upper:]')_IS | sed -n 's/.*_\([0-9].*\)/\1/g;$ p'"
25
26 src_prepare()
27 {
28 mbuild_src_prepare || die
29 python3_src_prepare || die
30 }
31
32 src_compile()
33 {
34 mconfigure --with-zlib --with-python=/usr/bin/python$(mget-python-version) || die
35 mmake || die
36
37 python3_src_compile --with-zlib --with-python=/usr/bin/python$(MAGE_PYTHON_EXEC="python3" mget-python-version) || die
38 }
39
40 postinstall()
41 {
42 # create needed xml-catalog
43 CATALOG=${MROOT}/etc/xml/catalog
44 if [ ! -e ${CATALOG} ]
45 then
46 [ -d ${MROOT}/etc/xml ] || install -d ${MROOT}/etc/xml
47 ${MROOT}/usr/bin/xmlcatalog --create > ${CATALOG}
48 echo "Created XML catalog in ${CATALOG}"
49 fi
50 }