diff --git a/net/unison/Makefile b/net/unison/Makefile index 0b19294b495d..760953afe5fa 100644 --- a/net/unison/Makefile +++ b/net/unison/Makefile @@ -1,100 +1,100 @@ PORTNAME= unison -PORTVERSION= 2.52.1 +PORTVERSION= 2.53.0 DISTVERSIONPREFIX= v CATEGORIES= net MAINTAINER= madpilot@FreeBSD.org COMMENT= User-level file synchronization tool WWW= https://www.cis.upenn.edu/~bcpierce/unison/ LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING FLAVORS= x11 nox11 FLAVOR?= ${FLAVORS:[1]} nox11_PKGNAMESUFFIX= -nox11 nox11_CONFLICTS_INSTALL= unison x11_CONFLICTS_INSTALL= unison-nox11 -x11_BUILD_DEPENDS= lablgtk2:x11-toolkits/ocaml-lablgtk2 \ +x11_BUILD_DEPENDS= ocaml-lablgtk3>0:x11-toolkits/ocaml-lablgtk3 \ icotool:graphics/icoutils x11_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz -x11_RUN_DEPENDS= lablgtk2:x11-toolkits/ocaml-lablgtk2 +x11_RUN_DEPENDS= ocaml-lablgtk3>0:x11-toolkits/ocaml-lablgtk3 PLIST_SUB= PORTVERSION=${PORTVERSION} USES= gmake localbase USE_OCAML= yes WRKSRC_SUBDIR= src NO_OCAML_RUNDEPENDS=yes CONFLICTS= unison-devel MAKE_ENV= CLIBS="${LIBS:S/^-/-ccopt -/}" COFLAGS="${CFLAGS:C/ *(-[^ ]*) */ -ccopt \"\1 \"/gW}" ALL_TARGET= unison all USE_GITHUB= yes GH_ACCOUNT= bcpierce00 DOCS= NEWS.md README.md OPTIONS_DEFINE= DOCS FSMONITOR OPTIONS_DEFAULT?= FSMONITOR FSMONITOR_DESC= Compile and install fsmonitor plugin OPTIONS_SUB= YES FSMONITOR_LIB_DEPENDS= libinotify.so:devel/libinotify .if ${FLAVOR} == nox11 MAKE_ARGS= UISTYLE=text PKGMESSAGE= ${PKGDIR}/pkg-message.nox11 PLIST_SUB+= X11="@comment " .else -MAKE_ARGS= UISTYLE=gtk2 +MAKE_ARGS= UISTYLE=gtk3 SUB_FILES= ${PORTNAME}.desktop -USE_GNOME+= atk cairo gdkpixbuf2 glib20 gtk20 pango +USE_GNOME+= atk cairo gdkpixbuf2 glib20 gtk30 pango USES+= gettext-runtime gnome PLIST_SUB+= X11="" .endif post-patch-FSMONITOR-off: @${REINPLACE_CMD} -e 's/-include fsmonitor/#&/' \ ${WRKSRC}/Makefile.OCaml post-patch: .if ${FLAVOR} == nox11 @${REINPLACE_CMD} -e 's/CFLAGS/COFLAGS/g' \ ${WRKSRC}/Makefile.OCaml ${WRKSRC}/fsmonitor/linux/Makefile .else - @${REINPLACE_CMD} -Ee 's@(\+|/)(lablgtk2)@\1site-lib/\2@' \ + @${REINPLACE_CMD} -Ee 's@(\+|/)(lablgtk3)@\1site-lib/\2@' \ -e 's/CFLAGS/COFLAGS/g' \ ${WRKSRC}/Makefile.OCaml ${WRKSRC}/fsmonitor/linux/Makefile .endif post-build: (cd ${WRKSRC} && HOME=${WRKSRC} ./unison -selftest -ui text -batch) .if ${FLAVOR} == x11 @${ECHO} Building text-only version @${ECHO} ${WRKSRC} ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC} UISTYLE=text NAME=unison-text @cd ${WRKSRC}/win32rc && ${LOCALBASE}/bin/icotool -x U.ico .endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin .if ${FLAVOR} == x11 ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-text ${STAGEDIR}${PREFIX}/bin ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.desktop ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKSRC}/win32rc/U_4_48x48x32.png ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png .endif do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC}/.. && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR} do-install-FSMONITOR-on: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-fsmonitor ${STAGEDIR}${PREFIX}/bin .include diff --git a/net/unison/distinfo b/net/unison/distinfo index 020a99d20028..91d48791f149 100644 --- a/net/unison/distinfo +++ b/net/unison/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1652016497 -SHA256 (bcpierce00-unison-v2.52.1_GH0.tar.gz) = ff7d920e1b4ec0872df764130b82a515f6f21a361f31a67b39c3e3ea12bfda80 -SIZE (bcpierce00-unison-v2.52.1_GH0.tar.gz) = 1360920 +TIMESTAMP = 1669069594 +SHA256 (bcpierce00-unison-v2.53.0_GH0.tar.gz) = 9364477df4501b9c7377e2ca1a7c4b44c1f16fa7cbc12b7f5b543d08c3f0740a +SIZE (bcpierce00-unison-v2.53.0_GH0.tar.gz) = 1387266 diff --git a/net/unison/files/patch-Makefile.OCaml b/net/unison/files/patch-Makefile.OCaml index 503906115d6e..6172ff5c8790 100644 --- a/net/unison/files/patch-Makefile.OCaml +++ b/net/unison/files/patch-Makefile.OCaml @@ -1,46 +1,55 @@ ---- Makefile.OCaml.orig 2022-03-12 16:24:03 UTC +--- Makefile.OCaml.orig 2022-10-30 19:42:39 UTC +++ Makefile.OCaml -@@ -31,7 +31,11 @@ ifeq ($(shell uname),NetBSD) +@@ -34,7 +34,11 @@ ifeq ($(shell uname),NetBSD) else ifeq ($(shell uname),NetBSD) OSARCH=NetBSD +else +ifeq ($(shell uname),FreeBSD) + OSARCH=FreeBSD endif +endif ifeq ($(shell uname),Linux) OSARCH=Linux endif -@@ -315,6 +319,11 @@ endif +@@ -256,7 +260,7 @@ OCAMLOBJS+=main.cmo + + # OCaml libraries for the bytecode version + # File extensions will be substituted for the native code version +-OCAMLLIBS+=unix.cma str.cma ++OCAMLLIBS+=unix.cma str.cma bigarray.cma + INCLFLAGS+=-I +unix -I +str + + COBJS+=osxsupport$(OBJ_EXT) pty$(OBJ_EXT) bytearray_stubs$(OBJ_EXT) hash_compat$(OBJ_EXT) props_xattr$(OBJ_EXT) props_acl$(OBJ_EXT) +@@ -321,6 +325,11 @@ endif INCLFLAGS+=-I fsmonitor -I fsmonitor/linux endif +ifeq ($(OSARCH),FreeBSD) +-include fsmonitor/linux/Makefile src/fsmonitor/linux/Makefile +INCLFLAGS+=-I fsmonitor -I fsmonitor/linux +endif + ifeq ($(OSARCH),solaris) -include fsmonitor/solaris/Makefile src/fsmonitor/solaris/Makefile INCLFLAGS+=-I fsmonitor -I fsmonitor/solaris -@@ -442,6 +451,10 @@ win32rc/unison.res.lib: win32rc/unison.rc win32rc/U.ic +@@ -434,6 +443,10 @@ win32rc/unison.res.lib: win32rc/unison.rc win32rc/U.ic -$(RM) $@ ocamllex $< +compat%.cmi: compat%.mli + @echo "$(CAMLC): $< ---> $@" + $(CAMLC) $(CAMLFLAGS) $(COMPATCAMLFLAGS) -c $(CWD)/$< + %.cmi : %.mli @echo "$(CAMLC): $< ---> $@" - $(CAMLC) $(CAMLFLAGS) $(COMPATCAMLFLAGS) -c $(CWD)/$< -@@ -466,7 +479,7 @@ compat%.cmx: compat%.ml + $(CAMLC) $(CAMLFLAGS) -c $(CWD)/$< +@@ -448,7 +461,7 @@ win32rc/unison.res.lib: win32rc/unison.rc win32rc/U.ic %.o %.obj: %.c @echo "$(CAMLC): $< ---> $@" - $(CAMLC) $(CAMLFLAGS) -ccopt $(OUTPUT_SEL)$(CWD)/$@ -c $(CWD)/$< + $(CAMLC) $(CAMLFLAGS) -ccopt $(OUTPUT_SEL)$(CWD)/$@ -c $(CFLAGS) $(CWD)/$< $(NAME)$(EXEC_EXT): $(CAMLOBJS) $(COBJS) @echo Linking $@ diff --git a/net/unison/files/patch-ubase_umarshal.ml b/net/unison/files/patch-ubase_umarshal.ml new file mode 100644 index 000000000000..0edb9f18aec5 --- /dev/null +++ b/net/unison/files/patch-ubase_umarshal.ml @@ -0,0 +1,114 @@ +--- ubase/umarshal.ml.orig 2022-10-30 19:42:39 UTC ++++ ubase/umarshal.ml +@@ -15,6 +15,111 @@ + along with this program. If not, see . + *) + ++(* OCaml 4.07 compatibility ONLY *) ++module Bytes = struct ++ ++include Bytes ++ ++(* The following code is taken from OCaml sources. ++ Authors of the code snippet: Alain Frisch and Daniel Bünzli *) ++ ++(**************************************************************************) ++(* *) ++(* OCaml *) ++(* *) ++(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) ++(* *) ++(* Copyright 1996 Institut National de Recherche en Informatique et *) ++(* en Automatique. *) ++(* *) ++(* All rights reserved. This file is distributed under the terms of *) ++(* the GNU Lesser General Public License version 2.1, with the *) ++(* special exception on linking described in the file LICENSE. *) ++(* *) ++(**************************************************************************) ++ ++(** {6 Binary encoding/decoding of integers} *) ++ ++external get_uint8 : bytes -> int -> int = "%string_safe_get" ++external get_uint16_ne : bytes -> int -> int = "%caml_string_get16" ++external get_int32_ne : bytes -> int -> int32 = "%caml_string_get32" ++external get_int64_ne : bytes -> int -> int64 = "%caml_string_get64" ++external set_int8 : bytes -> int -> int -> unit = "%string_safe_set" ++external set_int16_ne : bytes -> int -> int -> unit = "%caml_string_set16" ++external set_int32_ne : bytes -> int -> int32 -> unit = "%caml_string_set32" ++external set_int64_ne : bytes -> int -> int64 -> unit = "%caml_string_set64" ++external swap16 : int -> int = "%bswap16" ++external swap32 : int32 -> int32 = "%bswap_int32" ++external swap64 : int64 -> int64 = "%bswap_int64" ++ ++let get_int8 b i = ++ ((get_uint8 b i) lsl (Sys.int_size - 8)) asr (Sys.int_size - 8) ++ ++let get_uint16_le b i = ++ if Sys.big_endian then swap16 (get_uint16_ne b i) ++ else get_uint16_ne b i ++ ++let get_uint16_be b i = ++ if not Sys.big_endian then swap16 (get_uint16_ne b i) ++ else get_uint16_ne b i ++ ++let get_int16_ne b i = ++ ((get_uint16_ne b i) lsl (Sys.int_size - 16)) asr (Sys.int_size - 16) ++ ++let get_int16_le b i = ++ ((get_uint16_le b i) lsl (Sys.int_size - 16)) asr (Sys.int_size - 16) ++ ++let get_int16_be b i = ++ ((get_uint16_be b i) lsl (Sys.int_size - 16)) asr (Sys.int_size - 16) ++ ++let get_int32_le b i = ++ if Sys.big_endian then swap32 (get_int32_ne b i) ++ else get_int32_ne b i ++ ++let get_int32_be b i = ++ if not Sys.big_endian then swap32 (get_int32_ne b i) ++ else get_int32_ne b i ++ ++let get_int64_le b i = ++ if Sys.big_endian then swap64 (get_int64_ne b i) ++ else get_int64_ne b i ++ ++let get_int64_be b i = ++ if not Sys.big_endian then swap64 (get_int64_ne b i) ++ else get_int64_ne b i ++ ++let set_int16_le b i x = ++ if Sys.big_endian then set_int16_ne b i (swap16 x) ++ else set_int16_ne b i x ++ ++let set_int16_be b i x = ++ if not Sys.big_endian then set_int16_ne b i (swap16 x) ++ else set_int16_ne b i x ++ ++let set_int32_le b i x = ++ if Sys.big_endian then set_int32_ne b i (swap32 x) ++ else set_int32_ne b i x ++ ++let set_int32_be b i x = ++ if not Sys.big_endian then set_int32_ne b i (swap32 x) ++ else set_int32_ne b i x ++ ++let set_int64_le b i x = ++ if Sys.big_endian then set_int64_ne b i (swap64 x) ++ else set_int64_ne b i x ++ ++let set_int64_be b i x = ++ if not Sys.big_endian then set_int64_ne b i (swap64 x) ++ else set_int64_ne b i x ++ ++let set_uint8 = set_int8 ++let set_uint16_ne = set_int16_ne ++let set_uint16_be = set_int16_be ++let set_uint16_le = set_int16_le ++ ++end ++(* / *) ++ + exception Error of string + + type 'a t = {