diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PKGBUILD | 37 | ||||
-rw-r--r-- | rbgen.in.patch | 56 |
4 files changed, 112 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d08c070a6677 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = libredblack + pkgdesc = RedBlack balance tree searching and sorting library + pkgver = 1.3 + pkgrel = 1 + url = http://libredblack.sourceforge.net/ + arch = any + license = LGPL + makedepends = gcc + makedepends = make + makedepends = python2 + source = libredblack-1.3.tar.gz::https://sourceforge.net/projects/libredblack/files/libredblack/1.3/libredblack-1.3.tar.gz/download + source = rbgen.in.patch + sha256sums = a0ecc59b0aae2df01558a6950532c711a782a099277b439a51d270003092f44f + sha256sums = 15df219b5b472299198b67405d5ea2431ae82ac307ff9625a9ea381b50ef6f82 + +pkgname = libredblack + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..7f7e4c85b5aa --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +libredblack-1.3-1-any.pkg.tar.xz +libredblack-1.3.tar.gz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4eac60f44fff --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Kuan-Yen Chou <kuanyenchou@gmail.com> + +pkgname=libredblack +pkgver=1.3 +pkgrel=1 +pkgdesc='RedBlack balance tree searching and sorting library' +depends=() +makedepends=('gcc' 'make' 'python2') +arch=('any') +url='http://libredblack.sourceforge.net/' +license=('LGPL') +source=("$pkgname-$pkgver.tar.gz"::"https://sourceforge.net/projects/$pkgname/files/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz/download" + 'rbgen.in.patch') +sha256sums=('a0ecc59b0aae2df01558a6950532c711a782a099277b439a51d270003092f44f' + '15df219b5b472299198b67405d5ea2431ae82ac307ff9625a9ea381b50ef6f82') + +prepare() { + cd "$srcdir/$pkgname-$pkgver" + patch -p1 < "$srcdir/rbgen.in.patch" +} + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc \ + --with-python=/usr/bin/python2 + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="${pkgdir}" install +} + +# vim: set sw=4 ts=4 et: diff --git a/rbgen.in.patch b/rbgen.in.patch new file mode 100644 index 000000000000..4ec70ac73196 --- /dev/null +++ b/rbgen.in.patch @@ -0,0 +1,56 @@ +diff --git a/rbgen.in b/rbgen.in +index 7387b3a..3fdb1f4 100644 +--- a/rbgen.in ++++ b/rbgen.in +@@ -6,7 +6,7 @@ + # + # $Log: rbgen.in,v $ + # Revision 1.3 2003/10/24 01:31:21 damo +-# Patches from Eric Raymond: %prefix is implemented. Various other small ++# Patches from Eric Raymond: %prefix is implemented. Various other small + # changes avoid stepping on global namespaces and improve the documentation. + # + # Revision 1.2 2003/10/23 04:18:47 damo +@@ -78,7 +78,7 @@ def redblack(filename, lines): + if line[0] == "\n": + continue + elif startswith(line, "%%rbgen"): +- fpout.write("#define RB_CUSTOMIZE\n") ++ fpout.write("#define RB_CUSTOMIZE\n") + if not rb_type: + error("%type directive is required.") + else: +@@ -124,9 +124,9 @@ def redblack(filename, lines): + else: + error("unknown access type") + elif tokens[0] == "%omit": +- omittable = ("destroy", "search", "find", ++ omittable = ("destroy", "search", "find", + "delete", "walk", "readlist", +- "lookup", "destroy", "delete", ++ "lookup", "destroy", "delete", + "readlist") + rb_omit = tokens[1:] + for func in rb_omit: +@@ -153,9 +153,9 @@ if __name__ == "__main__": + lines = 1; + skelpath = [".", "@prefix@/share/@PACKAGE@" "/share/redblack"] + for (switch, val) in options: +- if (switch == '-l'): +- lines = 0 +- elif (switch == '-S'): ++ if (switch == '-l'): ++ lines = 0 ++ elif (switch == '-S'): + skeldir = val + + for skeldir in skelpath: +@@ -172,7 +172,7 @@ if __name__ == "__main__": + raise SystemExit, 0 + except SyntaxError: + raise SystemExit, 1 +- ++ + # The following sets edit modes for GNU EMACS + # Local Variables: + # mode:python |