summaryrefslogtreecommitdiff
path: root/cscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-11-06 21:04:46 +0100
committerCarl Hetherington <cth@carlh.net>2025-11-07 00:32:32 +0100
commit4cbbf6a52b45653fed86612589626b90f317378b (patch)
tree74ab04c3447a13eb5020923164b82e7889d8bdb7 /cscript
parent2bab31b0ab987688a283c802be939f6c68c74773 (diff)
Allow building of package for arch.HEADv0.17.16master
Diffstat (limited to 'cscript')
-rw-r--r--cscript31
1 files changed, 19 insertions, 12 deletions
diff --git a/cscript b/cscript
index 3ae0be3..de754f6 100644
--- a/cscript
+++ b/cscript
@@ -20,20 +20,27 @@
import os
-def build(target, options):
- cmd = './waf configure --prefix=%s' % target.directory
- if target.platform == 'linux':
- cmd += ' --static'
- if (target.distro, target.version) in [('centos', '7'), ('ubuntu', '16.04'), ('ubuntu', '14.04')]:
- cmd += ' --static-boost'
- elif target.platform == 'windows':
- cmd += f' --target-windows-{target.bits}'
+def build(target, options, for_package, version):
+ if for_package and target.platform == 'linux' and target.distro == 'arch':
+ target.command('git clone https://aur.archlinux.org/libcxml.git')
+ os.chdir('libcxml')
+ target.command('sed -i "s/tag=v\${pkgver}/branch=main/" PKGBUILD')
+ target.command('makepkg --skipinteg')
+ target.command('sudo pacman --noconfirm -U libcxml*.zst')
+ else:
+ cmd = './waf configure --prefix=%s' % target.directory
+ if target.platform == 'linux':
+ cmd += ' --static'
+ if (target.distro, target.version) in [('centos', '7'), ('ubuntu', '16.04'), ('ubuntu', '14.04')]:
+ cmd += ' --static-boost'
+ elif target.platform == 'windows':
+ cmd += f' --target-windows-{target.bits}'
- if 'c++17' in options and options['c++17']:
- cmd += ' --c++17'
+ if 'c++17' in options and options['c++17']:
+ cmd += ' --c++17'
- target.command(cmd)
- target.command('./waf build install')
+ target.command(cmd)
+ target.command('./waf build install')
def test(target, test):
if target.platform != 'windows':