aboutsummaryrefslogtreecommitdiff
path: root/net/unison
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2024-02-20 09:46:47 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2024-02-20 09:47:36 +0000
commita5f16599eda7acbb466ac20beaef5f3025cff378 (patch)
tree14765e14dc16a8906a51caea25fac696c5754ba3 /net/unison
parent99b3cff2719bcb534a874721d4edeca8dde03893 (diff)
downloadports-a5f16599eda7acbb466ac20beaef5f3025cff378.tar.gz
ports-a5f16599eda7acbb466ac20beaef5f3025cff378.zip
Diffstat (limited to 'net/unison')
-rw-r--r--net/unison/Makefile58
-rw-r--r--net/unison/distinfo6
-rw-r--r--net/unison/files/patch-Makefile.OCaml40
-rw-r--r--net/unison/files/patch-fsmonitor_linux_Makefile13
-rw-r--r--net/unison/pkg-plist2
5 files changed, 53 insertions, 66 deletions
diff --git a/net/unison/Makefile b/net/unison/Makefile
index 44b03db1d358..05f212a2fbff 100644
--- a/net/unison/Makefile
+++ b/net/unison/Makefile
@@ -1,7 +1,6 @@
PORTNAME= unison
-PORTVERSION= 2.53.3
+PORTVERSION= 2.53.4
DISTVERSIONPREFIX= v
-PORTREVISION= 2
CATEGORIES= net
MAINTAINER= madpilot@FreeBSD.org
@@ -17,79 +16,80 @@ FLAVOR?= ${FLAVORS:[1]}
nox11_PKGNAMESUFFIX= -nox11
nox11_CONFLICTS_INSTALL= unison
-x11_CONFLICTS_INSTALL= unison-nox11
x11_BUILD_DEPENDS= icotool:graphics/icoutils \
ocaml-lablgtk3>0:x11-toolkits/ocaml-lablgtk3
x11_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2 \
libharfbuzz.so:print/harfbuzz
+x11_CONFLICTS_INSTALL= unison-nox11
USES= gmake localbase
+USE_GITHUB= yes
+GH_ACCOUNT= bcpierce00
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
+WRKSRC_SUBDIR= src
PLIST_SUB= PORTVERSION=${PORTVERSION}
-USE_GITHUB= yes
-GH_ACCOUNT= bcpierce00
-
-DOCS= NEWS.md README.md
-
OPTIONS_DEFINE= DOCS FSMONITOR
OPTIONS_DEFAULT?= FSMONITOR
+OPTIONS_SUB= YES
FSMONITOR_DESC= Compile and install fsmonitor plugin
-OPTIONS_SUB= YES
+DOCS_USES= tex
+DOCS_USE= TEX=dvipsk:build,latex:build
FSMONITOR_LIB_DEPENDS= libinotify.so:devel/libinotify
.if ${FLAVOR} == nox11
-MAKE_ARGS= UISTYLE=text
+ALL_TARGET= tui
PKGMESSAGE= ${PKGDIR}/pkg-message.nox11
PLIST_SUB+= X11="@comment "
.else
-MAKE_ARGS= UISTYLE=gtk3
+ALL_TARGET= tui guimaybe
SUB_FILES= ${PORTNAME}.desktop
-USE_GNOME+= atk cairo gdkpixbuf2 glib20 gtk30 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
+DOCS= NEWS.md README.md
-post-patch:
-.if ${FLAVOR} == x11
- @${REINPLACE_CMD} -Ee 's@(\+|/)(lablgtk3)@\1site-lib/\2@' \
- ${WRKSRC}/Makefile.OCaml
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MFSMONITOR}
+ALL_TARGET+= fsmonitor
.endif
post-build:
- (cd ${WRKSRC} && HOME=${WRKSRC} ./unison -selftest -ui text -batch)
+ cd ${WRKSRC} && HOME=${WRKSRC} ./unison -selftest -ui text -batch
+ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC}/../man
+.if ${PORT_OPTIONS:MDOCS}
+ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC}/../doc unison-manual.pdf
+.endif
.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
+ cd ${WRKSRC}/win32rc && ${LOCALBASE}/bin/icotool -x U.ico
.endif
do-install:
+.if ${FLAVOR} == nox11
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
-.if ${FLAVOR} == x11
- ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-text ${STAGEDIR}${PREFIX}/bin
+.else
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-gui ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-text
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.desktop ${STAGEDIR}${DESKTOPDIR}
${INSTALL_DATA} ${WRKSRC}/win32rc/U_4_48x48x32.png ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
.endif
+ ${INSTALL_MAN} ${WRKSRC}/../man/${PORTNAME}.1 ${STAGEDIR}${PREFIX}/share/man/man1
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/.. && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC}/../doc && ${INSTALL_DATA} unison-manual.pdf ${STAGEDIR}${DOCSDIR}
do-install-FSMONITOR-on:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-fsmonitor ${STAGEDIR}${PREFIX}/bin
diff --git a/net/unison/distinfo b/net/unison/distinfo
index 48327d0f92cb..fe03cfcf887e 100644
--- a/net/unison/distinfo
+++ b/net/unison/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1682664394
-SHA256 (bcpierce00-unison-v2.53.3_GH0.tar.gz) = aaea04fc5bc76dcfe8627683c9659ee4c194d4f992cc8aaa15bbb2820fc8de46
-SIZE (bcpierce00-unison-v2.53.3_GH0.tar.gz) = 1415490
+TIMESTAMP = 1708372021
+SHA256 (bcpierce00-unison-v2.53.4_GH0.tar.gz) = d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
+SIZE (bcpierce00-unison-v2.53.4_GH0.tar.gz) = 1407429
diff --git a/net/unison/files/patch-Makefile.OCaml b/net/unison/files/patch-Makefile.OCaml
index 330f26d01721..a215227ad1cc 100644
--- a/net/unison/files/patch-Makefile.OCaml
+++ b/net/unison/files/patch-Makefile.OCaml
@@ -1,23 +1,21 @@
---- Makefile.OCaml.orig 2023-04-24 16:49:02 UTC
+--- Makefile.OCaml.orig 2024-02-18 15:03:04 UTC
+++ Makefile.OCaml
-@@ -248,7 +248,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)
-@@ -309,6 +309,11 @@ ifeq ($(OSARCH),Linux)
- ### Filesystem monitoring
-
- ifeq ($(OSARCH),Linux)
-+-include fsmonitor/linux/Makefile src/fsmonitor/linux/Makefile
-+INCLFLAGS+=-I fsmonitor -I fsmonitor/linux
-+endif
-+
-+ifeq ($(OSARCH),FreeBSD)
- -include fsmonitor/linux/Makefile src/fsmonitor/linux/Makefile
- INCLFLAGS+=-I fsmonitor -I fsmonitor/linux
+@@ -336,15 +336,9 @@ ifneq ($(findstring $(OSARCH),FreeBSD OpenBSD NetBSD D
+ ifneq ($(findstring $(OSARCH),FreeBSD OpenBSD NetBSD DragonFly),)
+ LIBINOTIFY_LIB:=-cclib '$(shell pkg-config --libs libinotify 2> /dev/null || printf ' -linotify')'
+ LIBINOTIFY_INC:=-ccopt '$(shell pkg-config --cflags libinotify 2> /dev/null)'
+- FOUND_LIBINOTIFY := $(shell { printf '' > inotifytest__.ml ;\
+- $(CAMLC) $(CAMLCFLAGS) $(CAMLLDFLAGS) $(LIBINOTIFY_LIB) \
+- -o inotifytest__ inotifytest__.ml > /dev/null 2>&1 && printf true ; } ;\
+- rm -f inotifytest__.ml inotifytest__.cm[oix] inotifytest__.o inotifytest__ > /dev/null 2>&1)
+- ifeq ($(FOUND_LIBINOTIFY), true)
+- FSMDIR = fsmonitor/inotify
+- $(NAME_FSM)$(EXEC_EXT): CAMLCFLAGS += $(LIBINOTIFY_INC)
+- $(NAME_FSM)$(EXEC_EXT): CLIBS += $(LIBINOTIFY_LIB)
+- endif
++ FSMDIR = fsmonitor/inotify
++ $(NAME_FSM)$(EXEC_EXT): CAMLCFLAGS += $(LIBINOTIFY_INC)
++ $(NAME_FSM)$(EXEC_EXT): CLIBS += $(LIBINOTIFY_LIB)
endif
+
+ ifeq ($(OSARCH),SunOS)
diff --git a/net/unison/files/patch-fsmonitor_linux_Makefile b/net/unison/files/patch-fsmonitor_linux_Makefile
deleted file mode 100644
index 7d44e1c8b925..000000000000
--- a/net/unison/files/patch-fsmonitor_linux_Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
---- fsmonitor/linux/Makefile.orig 2023-04-24 16:49:02 UTC
-+++ fsmonitor/linux/Makefile
-@@ -18,6 +18,10 @@ endif
- FSMCAMLLIBS=$(FSMOCAMLLIBS)
- endif
-
-+ifeq ($(OSARCH),FreeBSD)
-+ CLIBS+=-cclib -linotify
-+endif
-+
- buildexecutable:: $(FSMONITOR)$(EXEC_EXT)
-
- $(FSMONITOR)$(EXEC_EXT): $(FSMCAMLOBJS) $(FSMCOBJS)
diff --git a/net/unison/pkg-plist b/net/unison/pkg-plist
index 6fdcfff3e067..69dd33226ec4 100644
--- a/net/unison/pkg-plist
+++ b/net/unison/pkg-plist
@@ -3,5 +3,7 @@ bin/unison
%%X11%%share/applications/unison.desktop
%%X11%%bin/unison-text
%%X11%%share/pixmaps/unison.png
+share/man/man1/unison.1.gz
%%PORTDOCS%%%%DOCSDIR%%/NEWS.md
%%PORTDOCS%%%%DOCSDIR%%/README.md
+%%PORTDOCS%%%%DOCSDIR%%/unison-manual.pdf