initial import
This commit is contained in:
56
unison/PKGBUILD
Normal file
56
unison/PKGBUILD
Normal file
@@ -0,0 +1,56 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=unison
|
||||
pkgver=2.51.3
|
||||
pkgrel=2
|
||||
pkgdesc="File-synchronization tool"
|
||||
url='https://www.cis.upenn.edu/~bcpierce/unison/'
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL-3')
|
||||
options=('!makeflags')
|
||||
makedepends=('ocaml' 'lablgtk2')
|
||||
optdepends=('gtk2: graphical interface')
|
||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/bcpierce00/unison/archive/v${pkgver}.tar.gz"
|
||||
"unison-large.patch"
|
||||
"unison.desktop")
|
||||
sha512sums=('202bc592cf18d3ac76d7e29ec71add5d6e33a96b4b885e0e2add9a5a621db2290184f268c70e4f05e4884d6cdfed09f6fcd3dde85681c39628a10ea552917c8f'
|
||||
'e2f7a5e6e832ee9c694f36e399178652456d2047b22cba86603982cd6f6caf54e520fc87a8bde1940b2da46102cf3aa89f3e062c965efc77cd840b47e01b4d2f'
|
||||
'74526b1f583f49b3e1c68b72c9ab3d5875796b8b371c1388cf3b5b25aef8a0304023e9bb960b2ff9aec2eb989f712e99b2c049b8075529074f62ef9ffd6c1cdd')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
sed 's/region_of_string/region_of_bytes/' -i src/uigtk2.ml
|
||||
patch -p0 -i ../unison-large.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
for ui in gtk2 text; do
|
||||
cp -a . build || true
|
||||
pushd build
|
||||
export CFLAGS=
|
||||
make all UISTYLE=$ui DEBUGGING=false THREADS=true
|
||||
mv src/unison src/unison-$ui
|
||||
mv src/unison-* ..
|
||||
popd
|
||||
rm -fr build
|
||||
done
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
install -d "${pkgdir}"/usr/bin
|
||||
install -m755 unison-* "${pkgdir}"/usr/bin
|
||||
ln -s unison-text "${pkgdir}"/usr/bin/unison
|
||||
|
||||
install -Dm644 ../unison.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
|
||||
install -Dm644 icons/U.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"
|
||||
for i in 16 24 32 48 256; do
|
||||
install -Dm644 icons/U.${i}x${i}x16m.png "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png"
|
||||
done
|
||||
|
||||
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/$pkgname"
|
||||
}
|
||||
49
unison/unison-large.patch
Normal file
49
unison/unison-large.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
diff -Nrua /usr/ports/net/unison/patches/patch-bytearray_stubs_c ./patches/patch-bytearray_stubs_c
|
||||
--- /usr/ports/net/unison/patches/patch-bytearray_stubs_c Thu Jan 1 01:00:00 1970
|
||||
+++ ./patches/patch-bytearray_stubs_c Tue Jan 17 08:44:39 2017
|
||||
@@ -0,0 +1,45 @@
|
||||
+Fix rare SIGSEGV when transferring large replicas.
|
||||
+Fix a theoretical integer overflow.
|
||||
+
|
||||
+Patches from here:
|
||||
+https://caml.inria.fr/mantis/view.php?id=7431#c17026
|
||||
+and here:
|
||||
+https://caml.inria.fr/mantis/view.php?id=7431#c16962
|
||||
+
|
||||
+Related issue reports:
|
||||
+https://github.com/bcpierce00/unison/issues/48
|
||||
+https://caml.inria.fr/mantis/view.php?id=7431
|
||||
+https://bugzilla.redhat.com/show_bug.cgi?id=1401759
|
||||
+
|
||||
+Thanks to Alex Markley and OCaml developers
|
||||
+--- bytearray_stubs.c.orig Tue Jan 17 08:41:00 2017
|
||||
++++ bytearray_stubs.c Tue Jan 17 08:41:21 2017
|
||||
+@@ -5,6 +5,7 @@
|
||||
+
|
||||
+ #include "caml/intext.h"
|
||||
+ #include "caml/bigarray.h"
|
||||
++#include "caml/memory.h"
|
||||
+
|
||||
+ CAMLprim value ml_marshal_to_bigarray(value v, value flags)
|
||||
+ {
|
||||
+@@ -21,15 +22,18 @@ CAMLprim value ml_marshal_to_bigarray(value v, value f
|
||||
+
|
||||
+ CAMLprim value ml_unmarshal_from_bigarray(value b, value ofs)
|
||||
+ {
|
||||
++ CAMLparam1(b); /* Holds [b] live until unmarshalling completes. */
|
||||
++ value result;
|
||||
+ struct caml_bigarray *b_arr = Bigarray_val(b);
|
||||
+- return input_value_from_block (Array_data (b_arr, ofs),
|
||||
++ result = input_value_from_block (Array_data (b_arr, ofs),
|
||||
+ b_arr->dim[0] - Long_val(ofs));
|
||||
++ CAMLreturn(result);
|
||||
+ }
|
||||
+
|
||||
+ CAMLprim value ml_blit_string_to_bigarray
|
||||
+ (value s, value i, value a, value j, value l)
|
||||
+ {
|
||||
+- char *src = String_val(s) + Int_val(i);
|
||||
++ char *src = String_val(s) + Long_val(i);
|
||||
+ char *dest = Array_data(Bigarray_val(a), j);
|
||||
+ memcpy(dest, src, Long_val(l));
|
||||
+ return Val_unit;
|
||||
11
unison/unison.desktop
Normal file
11
unison/unison.desktop
Normal file
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=unison
|
||||
Comment=File synchronisation tool for X11
|
||||
TryExec=unison-gtk2
|
||||
Exec=unison-gtk2
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GTK;Application;Network;
|
||||
Icon=unison
|
||||
StartupNotify=true
|
||||
Reference in New Issue
Block a user