Skip to content

Commit

Permalink
unison: update version 2.48.4->2.51.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusCalhoun-Lopez authored and pmetzger committed Jun 8, 2018
1 parent 0e1b188 commit af118fd
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 93 deletions.
74 changes: 38 additions & 36 deletions net/unison/Portfile
@@ -1,10 +1,9 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup github 1.0

name unison
version 2.48.4
revision 1
github.setup bcpierce00 unison 2.51.2 v
categories net
maintainers nomaintainer
license GPL-3
Expand All @@ -16,39 +15,41 @@ long_description Unison is a file-synchronization tool for Unix and \
modified separately, and then brought up to date by \
propagating the changes in each replica to the other.
homepage http://www.cis.upenn.edu/~bcpierce/unison/
master_sites ${homepage}download/releases/${name}-${version}/
platforms darwin openbsd
platforms darwin

set branch [join [lrange [split ${version} .] 0 1] .]
checksums rmd160 24050d73c3d38389816828dd8ce77b4de7c80639 \
sha256 8e071e862fef675ea034f0c3e4b881d392be0889db4f04ad894cc5a931891e3d \
size 1400793

checksums rmd160 d5a1d66caffc02832c446f375a16319779fc5e0b \
sha256 30aa53cd671d673580104f04be3cf81ac1e20a2e8baaf7274498739d59e99de8
# from ocaml port
supported_archs i386 x86_64
universal_variant no

patchfiles-append patch-Makefile.diff
platform darwin 8 {
patchfiles-append patch-Makefile.OCaml-MINOSXVERSION.diff
}

worksrcdir src
depends_build port:ocaml

use_configure no
installs_libs no

build.args UISTYLE=text NATIVE=true THREADS=true
depends_build bin:camlp4:ocaml
use_parallel_build no

destroot.args PREFIX=${prefix} UISTYLE=text NATIVE=true THREADS=true
patchfiles-append patch-Makefile.OCaml.diff \
patch-target.diff \
patch-Makefile.diff \
patch-check-cltool.diff

default_variants +symlink
post-patch {
reinplace "s|__MACPORTS_PREFIX__|${prefix}|g" ${worksrcpath}/src/uimac14/MyController.m

variant symlink description {Create symlink to versioned binary} {
post-destroot {
ln -s ${prefix}/bin/${name}-${branch} ${destroot}${prefix}/bin/${name}
}
}

variant x11 conflicts aqua {
patchfiles-append patch-Makefile.OCaml.diff
build.env-append CC=${configure.cc}
destroot.env-append PREFIX=${prefix}

build.args UISTYLE=text THREADS=true
destroot.args UISTYLE=text THREADS=true

use_configure no

variant gtk description {Build GTK front-end} conflicts aqua {
depends_lib-append port:lablgtk2

build.args-replace UISTYLE=text \
Expand All @@ -63,26 +64,27 @@ unison -ui graphic
"
}

variant aqua description {Build Aqua front-end} conflicts x11 {
patchfiles-append patch-uimacnew-uimacnew.xcodeproj-project.pbxproj.diff

variant aqua description {Build Aqua front-end} conflicts gtk {
build.args-replace UISTYLE=text \
UISTYLE=macnew
UISTYLE=mac14

destroot.args-replace UISTYLE=text \
UISTYLE=mac14

destroot {
system "cd ${worksrcpath}/uimacnew/build && mv Default/* . || true"
copy ${worksrcpath}/uimacnew/build/Unison.app \
${destroot}${applications_dir}
copy ${worksrcpath}/src/uimac14/build/Default/Unison.app ${destroot}${applications_dir}
ln -s ${applications_dir}/Unison.app/Contents/MacOS/cltool ${destroot}${prefix}/bin/unison
}
}

if {![variant_isset gtk] && ![variant_isset aqua]} {
default_variants +aqua
}

notes "
Unison has always suggested using the same version across machines accessing the\
the same files. If you want to keep the previous version, you can reactivate\
the previous version; see:
https://trac.macports.org/wiki/howto/InstallingOlderPort
"

livecheck.type regex
livecheck.url ${homepage}download/releases/stable/
livecheck.regex {unison-(\d+(?:\.\d+)*)}
11 changes: 0 additions & 11 deletions net/unison/files/patch-Makefile.OCaml-MINOSXVERSION.diff

This file was deleted.

32 changes: 22 additions & 10 deletions net/unison/files/patch-Makefile.OCaml.diff
@@ -1,11 +1,23 @@
--- Makefile.OCaml.orig Sun Sep 28 18:48:05 2014
+++ Makefile.OCaml Fri Jan 9 15:23:59 2015
@@ -299,7 +299,7 @@ endif

# Gtk2 GUI
ifeq ($(UISTYLE), gtk2)
- CAMLFLAGS+=-I +lablgtk2
+ CAMLFLAGS+=-I +site-lib/lablgtk2
OCAMLOBJS+=pixmaps.cmo uigtk2.cmo linkgtk2.cmo
OCAMLLIBS+=lablgtk.cma
--- src/Makefile.OCaml.orig 2018-01-27 13:12:13.000000000 -0800
+++ src/Makefile.OCaml 2018-06-04 07:05:54.000000000 -0700
@@ -180,7 +180,7 @@
buildexecutable:: $(NAME)$(EXEC_EXT)
endif

-MINOSXVERSION=10.5
+MINOSXVERSION=$(MACOSX_DEPLOYMENT_TARGET)
# XCODEFLAGS=-sdk macosx$(MINOSXVERSION)
ifeq ($(OSARCH),osx)
CAMLFLAGS+=-ccopt -mmacosx-version-min=$(MINOSXVERSION)
@@ -194,9 +194,9 @@
# sed -e's/@@VERSION@@/$(VERSION)/' $(UIMACDIR)/Info.plist.template > $(UIMACDIR)/Info.plist
(cd $(UIMACDIR); xcodebuild $(XCODEFLAGS) OCAMLLIBDIR="$(OCAMLLIBDIR)" SYMROOT=build)
if [ -e $(UIMACDIR)/build/Default ]; then \
- gcc -mmacosx-version-min=$(MINOSXVERSION) $(UIMACDIR)/cltool.c -o $(UIMACDIR)/build/Default/Unison.app/Contents/MacOS/cltool -framework Carbon; \
+ $(CC) -mmacosx-version-min=$(MINOSXVERSION) $(UIMACDIR)/cltool.c -o $(UIMACDIR)/build/Default/Unison.app/Contents/MacOS/cltool -framework Carbon; \
else \
- gcc -mmacosx-version-min=$(MINOSXVERSION) $(UIMACDIR)/cltool.c -o $(UIMACDIR)/build/Unison.app/Contents/MacOS/cltool -framework Carbon; \
+ $(CC) -mmacosx-version-min=$(MINOSXVERSION) $(UIMACDIR)/cltool.c -o $(UIMACDIR)/build/Unison.app/Contents/MacOS/cltool -framework Carbon; \
fi

# OCaml objects for the bytecode version
21 changes: 11 additions & 10 deletions net/unison/files/patch-Makefile.diff
@@ -1,6 +1,6 @@
--- Makefile 2016-10-10 10:04:26.000000000 -0400
+++ Makefile 2016-10-10 10:04:58.000000000 -0400
@@ -78,7 +78,7 @@
--- src/Makefile.orig 2018-01-27 14:12:13.000000000 -0700
+++ src/Makefile 2018-06-06 22:50:53.000000000 -0700
@@ -68,7 +68,7 @@
######################################################################
# Installation

Expand All @@ -9,12 +9,13 @@

# This has two names because on OSX the file INSTALL shadows the target 'install'!
install: doinstall
@@ -90,8 +90,6 @@
$(MAKE) -C .. text

doinstall: $(NAME)$(EXEC_EXT)
@@ -86,9 +86,7 @@
echo "makefile variable NAME not bound"; \
exit 1 \
; fi
- -mv $(INSTALLDIR)/$(NAME)$(EXEC_EXT) /tmp/$(NAME)-$(shell echo $$$$)
- cp $(NAME)$(EXEC_EXT) $(INSTALLDIR)
cp $(NAME)$(EXEC_EXT) $(INSTALLDIR)$(NAME)-$(MAJORVERSION)$(EXEC_EXT)

cp $(NAME)$(EXEC_EXT) $(INSTALLDIR)
- cp $(NAME)$(EXEC_EXT) $(INSTALLDIR)$(NAME)-$(MAJORVERSION)$(EXEC_EXT)

######################################################################
# Demo
11 changes: 11 additions & 0 deletions net/unison/files/patch-check-cltool.diff
@@ -0,0 +1,11 @@
--- src/uimac14/MyController.m.orig 2018-01-27 14:12:13.000000000 -0700
+++ src/uimac14/MyController.m 2018-06-06 23:29:07.000000000 -0700
@@ -186,7 +186,7 @@
(![[NSFileManager defaultManager]
/* BCP 6/2016: Changed from /usr/bin/unison for El Capitan, per
suggestion from Alan Shutko */
- fileExistsAtPath:@"/usr/local/bin/unison"]) )
+ fileExistsAtPath:@"__MACPORTS_PREFIX__/bin/unison"]) )
[self raiseCltoolWindow:nil];
}

26 changes: 26 additions & 0 deletions net/unison/files/patch-target.diff
@@ -0,0 +1,26 @@
--- src/uimac14/uimacnew.xcodeproj/project.pbxproj.orig 2018-01-27 13:12:13.000000000 -0800
+++ src/uimac14/uimacnew.xcodeproj/project.pbxproj 2018-06-04 07:12:16.000000000 -0700
@@ -742,7 +742,6 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
LIBRARY_SEARCH_PATHS = "";
- MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = edu.upenn.cis.Unison;
SDKROOT = macosx;
@@ -773,7 +772,6 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
LIBRARY_SEARCH_PATHS = "";
- MACOSX_DEPLOYMENT_TARGET = 10.6;
PRODUCT_BUNDLE_IDENTIFIER = edu.upenn.cis.Unison;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = $OCAMLLIBDIR;
@@ -803,7 +801,6 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
LIBRARY_SEARCH_PATHS = "";
- MACOSX_DEPLOYMENT_TARGET = 10.6;
PRODUCT_BUNDLE_IDENTIFIER = edu.upenn.cis.Unison;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = $OCAMLLIBDIR;

This file was deleted.

0 comments on commit af118fd

Please sign in to comment.