# Maintainer: Natanael Copa global pkgname := 'libtheora' global pkgver := '1.1.1' global pkgrel := '13' global pkgdesc := '"An open video codec developed by the Xiph.org'" global url := '"http://www.xiph.org'" global arch := '"all'" global license := '"custom'" global subpackages := ""$pkgname-dev $pkgname-doc $pkgname-examples"" global depends_dev := '"libogg-dev'" global makedepends := '"libvorbis-dev libogg-dev sdl-dev autoconf automake libtool linux-headers'" global source := ""http://downloads.xiph.org/releases/theora/$pkgname-$pkgver.tar.bz2 libtheora-flags.patch enc.patch fix-timeb.patch fix-mmx.patch automake.patch "" global builddir := ""$srcdir/$pkgname-$pkgver"" proc prepare { default_prepare cd $builddir sed -i 's/png_\(sizeof\)/\1/g' examples/png2theora.c libtoolize --force aclocal -I m4 autoconf --force automake --force --add-missing } proc build { cd $builddir env CFLAGS=$(CFLAGS/-Os/-O3) CPPFLAGS=$(CPPFLAGS/-Os/-O3) ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --enable-shared \ --enable-static make -C lib make } proc check { cd $builddir make check } proc package { cd $builddir make -j1 DESTDIR="$pkgdir" install install -m755 -d "$pkgdir"/usr/share/licenses/$pkgname install -m644 LICENSE COPYING "$pkgdir"/usr/share/licenses/$pkgname/ } proc examples { global pkgdesc := '"Example applications for libtheora'" cd "$builddir"/examples/.libs install -d "$subpkgdir"/usr/bin install -m755 dump_psnr player_example dump_video encoder_example \ "$subpkgdir"/usr/bin/ } global md5sums := '"292ab65cedd5021d6b7ddd117e07cd8e libtheora-1.1.1.tar.bz2 7cbab1ce1f52adb98e1c241515a27aca libtheora-flags.patch 5024b6c41351433bf0e8a354969f8efd enc.patch b82250b0a1120e73bf225a0d313b848a fix-timeb.patch 128a42b7182c73cccea61b3d76327f93 fix-mmx.patch 0ed0917a6dac6a0e3242b1f7ce9785a5 automake.patch'" global sha256sums := '"b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc libtheora-1.1.1.tar.bz2 7efb7aec3e472914ffc0facbdc9769e088e5d69e285254d19f353555ca90c7d6 libtheora-flags.patch eb8452cc4022e8a591c5b1e679c8c1434d965d842411feeb7121255aae5e4cc5 enc.patch 38228518e7a4ef0efc29cef9f99e98cce1f9668eff6e43ac783478163c08e420 fix-timeb.patch 287baa8021af52c62a8a2e998659043492f394327449a44541618ee586fd7783 fix-mmx.patch 9a58f7cb9069c5b1792af07ddd7e5dfcc5765fd047f3dbe8e6ab9e39235da37c automake.patch'" global sha512sums := '"9ab9b3af1c35d16a7d6d84f61f59ef3180132e30c27bdd7c0fa2683e0d00e2c791accbc7fd2c90718cc947d8bd10ee4a5940fb55f90f1fd7b0ed30583a47dbbd libtheora-1.1.1.tar.bz2 72916c4ed0f9609b84af7c72b35b558ecfb2ed7533739e170ed088e06d0e82a585dcc1185f3c5a5d0644d30901459813b635df2ba951e2290bcd4303cfebc20b libtheora-flags.patch 569132fd0a576abb26b3c28fe84c4c2c66ff871129f00bfb23e593b8f985e47d61bc910d383aa3fc7477cc9de21e86f8df412901c609a62da972410733ec41f2 enc.patch 985dd5f5f3afcb36d71a636082c6e09ec18bb9e442b552babc4706299f502b90e79fb4aacb50a43c5e87a0b8429b311bcfeb21027f6cdca6fdb81e76b491dfff fix-timeb.patch f86b15fe5b1029c1e82b8f3785cbd6c81dd5e17dc6c8e4052de3c55482be3948d53828930df864a4668078c5cbab38b1d06b5807563f5fa342da1d084ce924b2 fix-mmx.patch d72648de058d42ed85d9870596d8c42148f9bcf5b08e2a333c279e1516f4bfa6535566cda807abb06ae58bfb1e373909148cb5c10aad6f56879d9c8452f2cc4f automake.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(libtheora)} spids:[3])] spids: [3] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(1.1.1)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(13)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("An open video codec developed by the Xiph.org"))} spids: [12] ) ] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://www.xiph.org"))} 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 (custom))} spids:[27])] spids: [27] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") ("-dev ") ($ VSub_Name "$pkgname") ("-doc ") ($ VSub_Name "$pkgname") (-examples) ) } spids: [32] ) ] spids: [32] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:depends_dev) op: Equal rhs: {(DQ (libogg-dev))} spids: [42] ) ] spids: [42] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: { (DQ ("libvorbis-dev libogg-dev sdl-dev autoconf automake libtool\n") ("\tlinux-headers")) } spids: [47] ) ] spids: [47] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("http://downloads.xiph.org/releases/theora/") ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (".tar.bz2\n") ("\tlibtheora-flags.patch\n") ("\tenc.patch\n") ("\tfix-timeb.patch\n") ("\tfix-mmx.patch\n") ("\tautomake.patch\n") ("\t") ) } spids: [53] ) ] spids: [53] ) (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: [68] ) ] spids: [68] ) (FuncDef name: prepare body: (BraceGroup children: [ (C {(default_prepare)}) (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(sed)} {(-i)} {(SQ <"s/png_\\(sizeof\\)/\\1/g">)} {(examples/png2theora.c)}) (C {(libtoolize)} {(--force)}) (C {(aclocal)} {(-I)} {(m4)}) (C {(autoconf)} {(--force)}) (C {(automake)} {(--force)} {(--add-missing)}) ] spids: [82] ) spids: [78 81] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (SimpleCommand words: [ {(./configure)} {(--build) (Lit_Other "=") ($ VSub_Name "$CBUILD")} {(--host) (Lit_Other "=") ($ VSub_Name "$CHOST")} {(--prefix) (Lit_Other "=") (/usr)} {(--enable-shared)} {(--enable-static)} ] more_env: [ (env_pair name: CFLAGS val: { (DQ (BracedVarSub token: suffix_op: (PatSub pat: {(-Os)} replace: {(-O3)} do_all: False do_prefix: False do_suffix: False ) spids: [151 157] ) ) } spids: [149] ) (env_pair name: CPPFLAGS val: { (DQ (BracedVarSub token: suffix_op: (PatSub pat: {(-Os)} replace: {(-O3)} do_all: False do_prefix: False do_suffix: False ) spids: [162 168] ) ) } spids: [160] ) ] ) (C {(make)} {(-C)} {(lib)}) (C {(make)}) ] spids: [138] ) spids: [134 137] ) (FuncDef name: check body: (BraceGroup children: [(C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(make)} {(check)})] spids: [216] ) spids: [212 215] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(make)} {(-j1)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))} {(install)}) (C {(install)} {(-m755)} {(-d)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/share/licenses/) ($ VSub_Name "$pkgname")} ) (C {(install)} {(-m644)} {(LICENSE)} {(COPYING)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/share/licenses/) ($ VSub_Name "$pkgname") (/)} ) ] spids: [238] ) spids: [234 237] ) (FuncDef name: examples body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Example applications for libtheora"))} spids: [300] ) ] spids: [300] ) (C {(cd)} {(DQ ($ VSub_Name "$builddir")) (/examples/.libs)}) (C {(install)} {(-d)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)}) (C {(install)} {(-m755)} {(dump_psnr)} {(player_example)} {(dump_video)} {(encoder_example)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/)} ) ] spids: [297] ) spids: [293 296] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:md5sums) op: Equal rhs: { (DQ ("292ab65cedd5021d6b7ddd117e07cd8e libtheora-1.1.1.tar.bz2\n") ("7cbab1ce1f52adb98e1c241515a27aca libtheora-flags.patch\n") ("5024b6c41351433bf0e8a354969f8efd enc.patch\n") ("b82250b0a1120e73bf225a0d313b848a fix-timeb.patch\n") ("128a42b7182c73cccea61b3d76327f93 fix-mmx.patch\n") ("0ed0917a6dac6a0e3242b1f7ce9785a5 automake.patch") ) } spids: [348] ) ] spids: [348] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha256sums) op: Equal rhs: { (DQ ( "b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc libtheora-1.1.1.tar.bz2\n" ) ("7efb7aec3e472914ffc0facbdc9769e088e5d69e285254d19f353555ca90c7d6 libtheora-flags.patch\n") ("eb8452cc4022e8a591c5b1e679c8c1434d965d842411feeb7121255aae5e4cc5 enc.patch\n") ("38228518e7a4ef0efc29cef9f99e98cce1f9668eff6e43ac783478163c08e420 fix-timeb.patch\n") ( "287baa8021af52c62a8a2e998659043492f394327449a44541618ee586fd7783 fix-mmx.patch\n" ) ("9a58f7cb9069c5b1792af07ddd7e5dfcc5765fd047f3dbe8e6ab9e39235da37c automake.patch") ) } spids: [358] ) ] spids: [358] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "9ab9b3af1c35d16a7d6d84f61f59ef3180132e30c27bdd7c0fa2683e0d00e2c791accbc7fd2c90718cc947d8bd10ee4a5940fb55f90f1fd7b0ed30583a47dbbd libtheora-1.1.1.tar.bz2\n" ) ( "72916c4ed0f9609b84af7c72b35b558ecfb2ed7533739e170ed088e06d0e82a585dcc1185f3c5a5d0644d30901459813b635df2ba951e2290bcd4303cfebc20b libtheora-flags.patch\n" ) ( "569132fd0a576abb26b3c28fe84c4c2c66ff871129f00bfb23e593b8f985e47d61bc910d383aa3fc7477cc9de21e86f8df412901c609a62da972410733ec41f2 enc.patch\n" ) ( "985dd5f5f3afcb36d71a636082c6e09ec18bb9e442b552babc4706299f502b90e79fb4aacb50a43c5e87a0b8429b311bcfeb21027f6cdca6fdb81e76b491dfff fix-timeb.patch\n" ) ( "f86b15fe5b1029c1e82b8f3785cbd6c81dd5e17dc6c8e4052de3c55482be3948d53828930df864a4668078c5cbab38b1d06b5807563f5fa342da1d084ce924b2 fix-mmx.patch\n" ) ( "d72648de058d42ed85d9870596d8c42148f9bcf5b08e2a333c279e1516f4bfa6535566cda807abb06ae58bfb1e373909148cb5c10aad6f56879d9c8452f2cc4f automake.patch" ) ) } spids: [368] ) ] spids: [368] ) ] )