# Maintainer: Natanael Copa global pkgname := 'strace' global pkgver := '4.19' global pkgrel := '0' global pkgdesc := '"A useful diagnositic, instructional, and debugging tool'" global url := '"https://strace.io/'" global arch := '"all'" global license := '"BSD'" global depends := ''"" global makedepends := '"linux-headers autoconf automake'" global subpackages := ""$pkgname-doc"" global source := ""$pkgname-$pkgver.tar.gz::https://github.com/strace/$pkgname/archive/v$pkgver.tar.gz fix-ppc-pt-regs-collision.patch "" global builddir := ""$srcdir/$pkgname-$pkgver"" proc build { cd $builddir matchstr $CLIBC { musl { export CFLAGS="$CFLAGS -Dsigcontext_struct=sigcontext" } } matchstr $CARCH { s390x { # __SIGNAL_FRAMESIZE is defined in asm/sigcontext.h # but including it would make conflict with struct sigcontext # since we compile with it in musl. # Temporarily add this until musl upstream has a proper fix # for struct sigcontext. export CFLAGS="$CFLAGS -D__SIGNAL_FRAMESIZE=160" } } ./bootstrap env ac_cv_have_long_long_off_t=yes \ ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var make } proc package { cd $builddir make -j1 DESTDIR="$pkgdir" install } global sha512sums := '"fbf953d64b43785648e2df0eb6beee409c6b6f6c6a4d227b54c02a049031c5ff3a3a6af52a68a2980d89eb06dcafc36be5f8784728e9a28348145cdb4a7764f9 strace-4.19.tar.gz b70cee89dd49a2b5a69dc2a56c3a11169d3306e1a73981155188b574486965c034aa52b4ac1c6edff5ef55c9d52f27750acb242fac095a8a9f69689b51b3fad1 fix-ppc-pt-regs-collision.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(strace)} spids:[3])] spids: [3] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(4.19)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(0)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("A useful diagnositic, instructional, and debugging tool"))} spids: [12] ) ] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("https://strace.io/"))} spids: [17] ) ] spids: [17] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[22])] spids: [22] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (BSD))} spids:[27])] spids: [27] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(DQ )} spids:[32])] spids: [32] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ("linux-headers autoconf automake"))} spids: [36] ) ] spids: [36] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (-doc))} spids: [41] ) ] spids: [41] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (".tar.gz::https://github.com/strace/") ($ VSub_Name "$pkgname") (/archive/v) ($ VSub_Name "$pkgver") (".tar.gz\n") ("\tfix-ppc-pt-regs-collision.patch\n") ("\t") ) } spids: [47] ) ] spids: [47] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir") (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver"))} spids: [62] ) ] spids: [62] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (Case to_match: {(DQ ($ VSub_Name "$CLIBC"))} arms: [ (case_arm pat_list: [{(musl)}] action: [ (C {(export)} {(Lit_VarLike "CFLAGS=") (DQ ($ VSub_Name "$CFLAGS") (" -Dsigcontext_struct=sigcontext")) } ) ] spids: [95 96 106 -1] ) ] spids: [86 92 109] ) (Case to_match: {(DQ ($ VSub_Name "$CARCH"))} arms: [ (case_arm pat_list: [{(s390x)}] action: [ (C {(export)} {(Lit_VarLike "CFLAGS=") (DQ ($ VSub_Name "$CFLAGS") (" -D__SIGNAL_FRAMESIZE=160")) } ) ] spids: [122 123 155 -1] ) ] spids: [113 119 158] ) (C {(./bootstrap)}) (SimpleCommand words: [ {(./configure)} {(--build) (Lit_Other "=") ($ VSub_Name "$CBUILD")} {(--host) (Lit_Other "=") ($ VSub_Name "$CHOST")} {(--prefix) (Lit_Other "=") (/usr)} {(--sysconfdir) (Lit_Other "=") (/etc)} {(--mandir) (Lit_Other "=") (/usr/share/man)} {(--localstatedir) (Lit_Other "=") (/var)} ] more_env: [(env_pair name:ac_cv_have_long_long_off_t val:{(yes)} spids:[166])] ) (C {(make)}) ] spids: [76] ) spids: [72 75] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(make)} {(-j1)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))} {(install)}) ] spids: [219] ) spids: [215 218] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "fbf953d64b43785648e2df0eb6beee409c6b6f6c6a4d227b54c02a049031c5ff3a3a6af52a68a2980d89eb06dcafc36be5f8784728e9a28348145cdb4a7764f9 strace-4.19.tar.gz\n" ) ( "b70cee89dd49a2b5a69dc2a56c3a11169d3306e1a73981155188b574486965c034aa52b4ac1c6edff5ef55c9d52f27750acb242fac095a8a9f69689b51b3fad1 fix-ppc-pt-regs-collision.patch" ) ) } spids: [243] ) ] spids: [243] ) ] )