aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/xdelta3/APKBUILD27
-rw-r--r--main/xdelta3/xdelta3-makefile.patch33
-rw-r--r--main/xdelta3/xdelta3-xz.patch12
3 files changed, 72 insertions, 0 deletions
diff --git a/main/xdelta3/APKBUILD b/main/xdelta3/APKBUILD
new file mode 100644
index 0000000000..fece127a66
--- /dev/null
+++ b/main/xdelta3/APKBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=xdelta3
+pkgver=3.0v
+pkgrel=0
+pkgdesc="A diff utility which works with binary files"
+url="http://xdelta.org/"
+license="GPL"
+depends=
+makedepends=
+source="http://xdelta.googlecode.com/files/$pkgname.0v.tar.gz
+ $pkgname-makefile.patch
+ $pkgname-xz.patch"
+
+build ()
+{
+ cd $srcdir/xdelta$pkgver
+ patch -Np1 -i $srcdir/xdelta3-makefile.patch
+ patch -Np1 -i $srcdir/xdelta3-xz.patch
+ make xdelta3 || return 1
+ install -D xdelta3 "$pkgdir"/usr/bin/xdelta3
+# python ./setup.py install --root "$pkgdir"
+# make xdelta3module.so || return 1
+# install -m644 {xdelta3.py,xdelta3module.so} "$pkgdir"/usr/lib/python2.6/site-packages
+}
+md5sums="6b5faeb88028a1211cb047e49b687a3a xdelta3.0v.tar.gz
+35aa0d20a27791addeb929591a78bd3f xdelta3-makefile.patch
+fb1e685d810a15f04b7bdbc9a3f3e635 xdelta3-xz.patch"
diff --git a/main/xdelta3/xdelta3-makefile.patch b/main/xdelta3/xdelta3-makefile.patch
new file mode 100644
index 0000000000..f7fc6a657d
--- /dev/null
+++ b/main/xdelta3/xdelta3-makefile.patch
@@ -0,0 +1,33 @@
+diff -Naur xdelta3.0v-old/Makefile xdelta3.0v/Makefile
+--- xdelta3.0v-old/Makefile 2009-03-12 01:44:51.000000000 +0000
++++ xdelta3.0v/Makefile 2009-03-14 17:02:33.000000000 +0000
+@@ -4,7 +4,7 @@
+ UNAME = $(shell uname)
+ CYGWIN = $(findstring CYGWIN, $(UNAME))
+ DARWIN = $(findstring Darwin, $(UNAME))
+-PYVER = 2.5
++PYVER = 2.6
+
+ ifeq ("$(CYGWIN)", "")
+ SWIGTGT = xdelta3module.so
+@@ -200,6 +200,9 @@
+ xdelta3.o: $(SOURCES)
+ $(CC) -O3 $(CFLAGS) -c xdelta3.c $(SWIG_FLAGS) -o xdelta3.o
+
++xdelta3_PIC.o: $(SOURCES)
++ $(CC) -O3 $(CFLAGS) -fPIC -c xdelta3.c $(SWIG_FLAGS) -o xdelta3_PIC.o
++
+ xdelta3_wrap.o: xdelta3_wrap.c
+ $(CC) -O3 $(CFLAGS) $(SWIG_FLAGS) \
+ -DHAVE_CONFIG_H \
+@@ -218,8 +221,8 @@
+ cp $(SWIGTGT) /usr/lib/python$(PYVER)/site-packages
+
+ ifeq ("$(DARWIN)", "")
+-xdelta3module.so: xdelta3_wrap.o xdelta3.o
+- ld -shared xdelta3.o xdelta3_wrap.o \
++xdelta3module.so: xdelta3_wrap.o xdelta3_PIC.o
++ cc -shared xdelta3_PIC.o xdelta3_wrap.o \
+ -o xdelta3module.so \
+ /usr/lib/libpython$(PYVER).so \
+ -lc
diff --git a/main/xdelta3/xdelta3-xz.patch b/main/xdelta3/xdelta3-xz.patch
new file mode 100644
index 0000000000..3527406c16
--- /dev/null
+++ b/main/xdelta3/xdelta3-xz.patch
@@ -0,0 +1,12 @@
+diff -ruNa a/xdelta3-main.h b/xdelta3-main.h
+--- a/xdelta3-main.h 2009-01-30 05:59:02.000000000 +0100
++++ b/xdelta3-main.h 2009-05-13 12:43:00.000000000 +0200
+@@ -355,6 +355,7 @@
+ RD_NONEXTERNAL },
+ { "bzip2", "-cf", "bzip2", "-dcf", "B", "BZh", 3, 0 },
+ { "gzip", "-cf", "gzip", "-dcf", "G", "\037\213", 2, 0 },
++ { "xz", "-cf", "xz", "-dcf", "Y", "\xfd\x37\x7a\x58\x5a\x00", 2, 0 },
+ { "compress", "-cf", "uncompress", "-cf", "Z", "\037\235", 2, 0 },
+
+ /* TODO: add commandline support for magic-less formats */
+