mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-12 02:14:37 +08:00
56 lines
1.4 KiB
Bash
56 lines
1.4 KiB
Bash
pkgname=libxml2
|
|
pkgver=2.9.6+3+g5af594d8
|
|
pkgrel=1
|
|
pkgdesc="XML parsing library, version 2"
|
|
arch=('x86_64')
|
|
license=('MIT')
|
|
depends=('zlib' 'readline' 'ncurses' 'xz' 'icu')
|
|
makedepends=('python2' 'python3' 'git')
|
|
url="http://www.xmlsoft.org/"
|
|
_commit=5af594d8bc55121ae454cba4d05793d1db7ff612 # master
|
|
source=(git://git.gnome.org/libxml2#commit=$_commit
|
|
http://www.w3.org/XML/Test/xmlts20080827.tar.gz)
|
|
md5sums=('SKIP'
|
|
'ae3d1ebe000a3972afa104ca7f0e1b4a')
|
|
|
|
pkgver() {
|
|
cd $pkgname
|
|
git describe --long | sed -e 's/-/+/g' -e 's/^v//'
|
|
}
|
|
|
|
prepare() {
|
|
mkdir build-py3
|
|
mkdir build-py2
|
|
mv xmlconf build-py2/
|
|
cd $pkgname
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
}
|
|
|
|
build() {
|
|
cd build-py2
|
|
../$pkgname/configure --prefix=/usr --with-threads --with-history --with-python=/usr/bin/python2
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool
|
|
make
|
|
|
|
cd ../build-py3
|
|
../$pkgname/configure --prefix=/usr --with-threads --with-history --with-python=/usr/bin/python3
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool
|
|
PYTHONHASHSEED=0 make
|
|
}
|
|
|
|
check() {
|
|
cd ${srcdir}/build-py2
|
|
make check
|
|
}
|
|
|
|
package() {
|
|
cd ${srcdir}/build-py2
|
|
find doc -type f -exec chmod 0644 {} \;
|
|
|
|
make DESTDIR="${pkgdir}" install
|
|
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
|
|
|
|
cd ../build-py3/python
|
|
PYTHONHASHSEED=0 make DESTDIR="${pkgdir}" install
|
|
}
|