Bug 283863 - [NEW PORT] textproc/libinfinity: Collaborative editing library
Summary: [NEW PORT] textproc/libinfinity: Collaborative editing library
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Nuno Teixeira
URL:
Keywords:
Depends on:
Blocks: 283864
  Show dependency treegraph
 
Reported: 2025-01-05 15:23 UTC by Yusuf Yaman
Modified: 2025-01-06 17:07 UTC (History)
2 users (show)

See Also:


Attachments
textproc/libinfinity.patch (24.37 KB, patch)
2025-01-05 15:24 UTC, Yusuf Yaman
no flags Details | Diff
textproc/libinfinity.patch (24.14 KB, patch)
2025-01-05 16:59 UTC, Yusuf Yaman
no flags Details | Diff
textproc/libinfinity.patch (24.02 KB, patch)
2025-01-05 18:23 UTC, Yusuf Yaman
no flags Details | Diff
textproc/libinfinity.patch (24.19 KB, patch)
2025-01-05 20:03 UTC, Yusuf Yaman
no flags Details | Diff
textproc/libinfinity.patch (24.18 KB, patch)
2025-01-06 14:58 UTC, Yusuf Yaman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuf Yaman 2025-01-05 15:23:23 UTC

    
Comment 1 Yusuf Yaman 2025-01-05 15:24:30 UTC
Created attachment 256441 [details]
textproc/libinfinity.patch

libinfinity is library to build collaborative text editors. Changes to the text
buffers are synced to all other clients over a central server. Even though a
central server is involved, the local user sees his changes applied instantly
and the merging is done on the individual clients.

WWW:	https://github.com/gobby/libinfinity

Thanks in advance.
Comment 2 Nuno Teixeira freebsd_committer freebsd_triage 2025-01-05 16:14:07 UTC
[USE_GNOME=cairo gdkpixbuf2 libxml2 pango] should take care of most LIB_DEPENDS
Comment 3 Yusuf Yaman 2025-01-05 16:59:46 UTC
Created attachment 256445 [details]
textproc/libinfinity.patch

(In reply to Nuno Teixeira from comment #2)
It realy did take care of it, thanks.
Comment 4 Nuno Teixeira freebsd_committer freebsd_triage 2025-01-05 18:07:57 UTC
(In reply to Yusuf Yaman from comment #3)

The same for gtk3, glib2, harfbuzz, etc, all covered by helpers:
https://docs.freebsd.org/en/books/porters-handbook/book/#gnome-components
Comment 5 Yusuf Yaman 2025-01-05 18:11:54 UTC
(In reply to Nuno Teixeira from comment #4)
Sorry, thanks, i will look into it.
Comment 6 Yusuf Yaman 2025-01-05 18:23:43 UTC
Created attachment 256448 [details]
textproc/libinfinity.patch

diff --git a/textproc/libinfinity/Makefile b/textproc/libinfinity/Makefile
index 26ac8a4182e3..3369343138d1 100644
--- a/textproc/libinfinity/Makefile
+++ b/textproc/libinfinity/Makefile
@@ -10,20 +10,16 @@ WWW=                https://github.com/gobby/libinfinity
 LICENSE=       LGPL21
 LICENSE_FILE=  ${WRKSRC}/COPYING

-BUILD_DEPENDS= gtkdocize:textproc/gtk-doc \
-               intltoolize:textproc/intltool
+BUILD_DEPENDS= gtkdocize:textproc/gtk-doc
 LIB_DEPENDS=   libatk-1.0.so:accessibility/at-spi2-core \
                libavahi-client.so:net/avahi-app \
                libdaemon.so:devel/libdaemon \
-               libglib-2.0.so:devel/glib20 \
                libgnutls.so:security/gnutls \
-               libgobject-2.0.so:devel/glib20 \
                libgsasl.so:security/libgsasl \
-               libgtk-3.so:x11-toolkits/gtk30 \
                libharfbuzz.so:print/harfbuzz

 USES=          autoreconf gettext gmake gnome libtool:build pathfix pkgconfig
-USE_GNOME=     cairo gdkpixbuf2 libxml2 pango
+USE_GNOME=     cairo gdkpixbuf2 glib20 gtk30 intltool libxml2 pango
 USE_LDCONFIG=  yes

 GNU_CONFIGURE= yes

I switched some of available LIB_DEPENDS to USE_GNOME.
Comment 7 Yusuf Yaman 2025-01-05 20:03:25 UTC
Created attachment 256450 [details]
textproc/libinfinity.patch

I renamed cli binary's and manpage's names to eliminate version number appended to manpage and binaries. Before this patch, you had to use "man infinoted-0.7" and to run cli binary "infinoted-0.7", now with this patch, the version numbers are removed and it now works with "man infinoted" and "infinoted".

Here is the diff (the attached patch includes whole patch)

diff --git a/textproc/libinfinity/Makefile b/textproc/libinfinity/Makefile
index 3369343138d1..58661605a1d0 100644
--- a/textproc/libinfinity/Makefile
+++ b/textproc/libinfinity/Makefile
@@ -26,4 +26,12 @@ GNU_CONFIGURE=	yes
 
 INSTALL_TARGET=	install-strip
 
+post-install:
+	@cd ${STAGEDIR}${PREFIX}/bin && \
+		${MV} infinoted-0.7 \
+		infinoted
+	@cd ${STAGEDIR}${PREFIX}/share/man/man1 && \
+		${MV} infinoted-0.7.1 \
+		infinoted.1
+
 .include <bsd.port.mk>
diff --git a/textproc/libinfinity/pkg-plist b/textproc/libinfinity/pkg-plist
index 2079bd961eb8..4ccc0662b2cf 100644
--- a/textproc/libinfinity/pkg-plist
+++ b/textproc/libinfinity/pkg-plist
@@ -1,4 +1,4 @@
-bin/infinoted-0.7
+bin/infinoted
 include/libinfgtk-0.7/libinfgtk/inf-gtk-account-creation-dialog.h
 include/libinfgtk-0.7/libinfgtk/inf-gtk-acl-sheet-view.h
 include/libinfgtk-0.7/libinfgtk/inf-gtk-browser-model-filter.h
@@ -368,4 +368,4 @@ share/gtk-doc/html/libinftextgtk-0.7/up.png
 share/icons/hicolor/16x16/apps/infinote.png
 share/icons/hicolor/22x22/apps/infinote.png
 share/icons/hicolor/scalable/apps/infinote.svg
-share/man/man1/infinoted-0.7.1.gz
+share/man/man1/infinoted.1.gz
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2025-01-06 07:34:30 UTC
(In reply to Yusuf Yaman from comment #7)

Nice work on this port.

Just a quick look at pkg-plist, something bothers me about:
include/libinfinity-0.7/libinfinity/...
--------------------^^

I will take a closer look later today and check other ports that intall headers into $prefix/include if they behave same way.

Thanks
Comment 9 Yusuf Yaman 2025-01-06 07:36:12 UTC
(In reply to Nuno Teixeira from comment #8)
Okay, thanks.
Comment 10 Nuno Teixeira freebsd_committer freebsd_triage 2025-01-06 07:39:49 UTC
(In reply to Nuno Teixeira from comment #8)
(...)
A quick look shows that ports usually install headers in:

$prefix/include/
$prefix/include/$portname/

Need to check porter's handbook too.
Comment 11 Nuno Teixeira freebsd_committer freebsd_triage 2025-01-06 07:41:39 UTC
(In reply to Nuno Teixeira from comment #10)
(...)

Also check repology.org and check how other OSes/Distros deal with this.
Comment 12 Yusuf Yaman 2025-01-06 10:04:47 UTC
I checked some package build recipes of some distros on repology but as far as i can understand, they don't deal with it. It seems hard to configure source code to not cause output files without version information. I don't know how I can handle this. I think there are ports which installs include etc. files with version numbers.
Comment 13 Nuno Teixeira freebsd_committer freebsd_triage 2025-01-06 12:54:07 UTC
(In reply to Yusuf Yaman from comment #12)

I did look a NetBSD pkgsrc that confirms what you are saying.
Comment 14 Nuno Teixeira freebsd_committer freebsd_triage 2025-01-06 14:31:29 UTC
Last check: could you build without autoreconf? Build seems satisfied without it.

Ready to commit
Comment 15 Yusuf Yaman 2025-01-06 14:52:15 UTC
(In reply to Nuno Teixeira from comment #14)
Thanks, It might be only required when there are changes to Makefile etc. I will let you know after I try building it without that.
Comment 16 Yusuf Yaman 2025-01-06 14:58:20 UTC
Created attachment 256472 [details]
textproc/libinfinity.patch

It indeed builds fine without 'autoreconf' use flag.

diff --git a/textproc/libinfinity/Makefile b/textproc/libinfinity/Makefile
index 58661605a1d0..9c968ee447d3 100644
--- a/textproc/libinfinity/Makefile
+++ b/textproc/libinfinity/Makefile
@@ -18,7 +18,7 @@ LIB_DEPENDS=	libatk-1.0.so:accessibility/at-spi2-core \
 		libgsasl.so:security/libgsasl \
 		libharfbuzz.so:print/harfbuzz
 
-USES=		autoreconf gettext gmake gnome libtool:build pathfix pkgconfig
+USES=		gettext gmake gnome libtool:build pathfix pkgconfig
 USE_GNOME=	cairo gdkpixbuf2 glib20 gtk30 intltool libxml2 pango
 USE_LDCONFIG=	yes
Comment 17 commit-hook freebsd_committer freebsd_triage 2025-01-06 17:06:13 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6feefd0a1a74b53c04895604e2effdf2d923c08b

commit 6feefd0a1a74b53c04895604e2effdf2d923c08b
Author:     Yusuf Yaman <nxjoseph@protonmail.com>
AuthorDate: 2025-01-06 14:58:24 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2025-01-06 17:04:40 +0000

    textproc/libinfinity: New port: Collaborative editing library

    - Submitter becomes maintainer

    libinfinity is library to build collaborative text editors. Changes to the text
    buffers are synced to all other clients over a central server. Even though a
    central server is involved, the local user sees his changes applied instantly
    and the merging is done on the individual clients.

    WWW:            https://github.com/gobby/libinfinity
    PR:             283863

 textproc/Makefile                    |   1 +
 textproc/libinfinity/Makefile (new)  |  37 ++++
 textproc/libinfinity/distinfo (new)  |   3 +
 textproc/libinfinity/pkg-descr (new) |   4 +
 textproc/libinfinity/pkg-plist (new) | 371 +++++++++++++++++++++++++++++++++++
 5 files changed, 416 insertions(+)
Comment 18 Nuno Teixeira freebsd_committer freebsd_triage 2025-01-06 17:07:38 UTC
Committed with minor changes:
PORTVERSION -> DISTVERSION

Thanks!