summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-11-06 22:20:43 +0100
committerCarl Hetherington <cth@carlh.net>2025-11-07 00:26:44 +0100
commitabb7bb7cf33b689433b2dac0c55d637fa52728bf (patch)
treebc294ad448a6c8516d6ff5cba8348aebc3a0d5fc
parentb1320b08ffc936a0ddf7e93055d26cc33d87e5f0 (diff)
Allow building of arch package.v1.6.57
-rw-r--r--cscript31
1 files changed, 19 insertions, 12 deletions
diff --git a/cscript b/cscript
index 6c82752..3e7e427 100644
--- a/cscript
+++ b/cscript
@@ -21,19 +21,26 @@ import os
option_defaults = { 'force-cpp11': False }
-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'
- if target.debug:
- cmd += ' --enable-debug'
- if target.platform == 'windows':
- cmd += f' --target-windows-{target.bits} --disable-tests'
+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/libsub.git')
+ os.chdir('libsub')
+ target.command('sed -i "s/tag=v\${pkgver}/branch=main/" PKGBUILD')
+ target.command('makepkg --skipinteg')
+ target.command('sudo pacman --noconfirm -U libsub*.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'
+ if target.debug:
+ cmd += ' --enable-debug'
+ if target.platform == 'windows':
+ cmd += f' --target-windows-{target.bits} --disable-tests'
- target.command(cmd)
- target.command('./waf build install')
+ target.command(cmd)
+ target.command('./waf build install')
def make_doxygen(target):
os.makedirs('build/doc')