From eb7dc57dbf0e5ade7423851374a86294835d711a75e52bafe33c929bd2f34f98 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 20 Jul 2016 07:17:29 +0000 Subject: [PATCH] Accepting request 398910 from network Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/398910 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/unison?expand=0&rev=34 --- unison-ocaml-4.03.patch | 16 ++++++++++++++++ unison.changes | 6 ++++++ unison.spec | 21 ++++++--------------- 3 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 unison-ocaml-4.03.patch diff --git a/unison-ocaml-4.03.patch b/unison-ocaml-4.03.patch new file mode 100644 index 0000000..57e9c3a --- /dev/null +++ b/unison-ocaml-4.03.patch @@ -0,0 +1,16 @@ +https://github.com/bcpierce00/unison/commit/4473822b5aa6de3e849ca6c958b365a71edbca4f +--- + system/system_generic.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/system/system_generic.ml ++++ b/system/system_generic.ml +@@ -57,7 +57,7 @@ let opendir f = + let readdir = Unix.readdir + let closedir = Unix.closedir + let readlink = Unix.readlink +-let symlink = Unix.symlink ++let symlink s1 s2 = Unix.symlink s1 s2 + let chdir = Sys.chdir + let getcwd = Sys.getcwd + diff --git a/unison.changes b/unison.changes index a93f46d..060cbe2 100644 --- a/unison.changes +++ b/unison.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 23 09:52:29 UTC 2016 - olaf@aepfle.de + +- Require ocaml >= 4.0.3 due to its API change in Unix.symlink + unison-ocaml-4.03.patch + ------------------------------------------------------------------- Sat Oct 10 09:40:28 UTC 2015 - olaf@aepfle.de diff --git a/unison.spec b/unison.spec index b685657..87f4bdb 100644 --- a/unison.spec +++ b/unison.spec @@ -1,7 +1,7 @@ # # spec file for package unison # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,17 +16,10 @@ # -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%if !%opt -# get rid of /usr/lib/rpm/find-debuginfo.sh -# strip kills the bytecode part of ELF binaries -# see also NO_BRP_STRIP_DEBUG in install section -%undefine _build_create_debug -%endif - Name: unison Version: 2.48.3 Release: 0 +%{ocaml_preserve_bytecode} Summary: File synchronization tool License: GPL-3.0+ Group: Productivity/Networking/Other @@ -35,9 +28,11 @@ Source0: http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stab Source1: http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-%{version}-manual.html Source2: %{name}.desktop Source3: %{name}.png +Patch0: unison-ocaml-4.03.patch BuildRequires: gtk2-devel BuildRequires: ncurses-devel BuildRequires: ocaml-lablgtk2-devel +BuildRequires: ocaml-rpm-macros >= 4.03.0 BuildRequires: update-desktop-files BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -50,12 +45,13 @@ replica to the other. %prep %setup -q +%patch0 -p1 %build # This package failed when testing with -Wl,-as-needed being default. # So we disable it here, if you want to retest, just delete this comment and the line below. export SUSE_ASNEEDED=0 -%if %opt +%if %{ocaml_native_compiler} NATIVE=true %else NATIVE=false @@ -63,11 +59,6 @@ NATIVE=false make UISTYLE=gtk2 NATIVE=$NATIVE THREADS=true %install -%if !%opt -# get rid of /usr/lib/rpm/brp-strip-debug -# strip kills the bytecode part of ELF binaries -export NO_BRP_STRIP_DEBUG=true -%endif install -m 755 -d %{buildroot}/%{_bindir} install -m 755 %{name} %{buildroot}%{_bindir} install -m 755 %{name}-fsmonitor %{buildroot}%{_bindir}