Bug 226683

Summary: New port: net-im/fractal, a GTK+ Matrix client
Product: Ports & Packages Reporter: Val Packett <val>
Component: Individual Port(s)Assignee: Steve Wills <swills>
Status: Closed FIXED    
Severity: Affects Only Me CC: lantw44, rigoletto, swills
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on: 229761    
Bug Blocks:    
Attachments:
Description Flags
fractal.patch
none
fractal.patch v2
none
fractal.diff v3
none
fractal.diff v4
none
fractal.patch v5 none

Description Val Packett 2018-03-17 21:29:04 UTC
Created attachment 191583 [details]
fractal.patch

Not the best port but works. Please help:

- better way to fetch from various self hosted gitlabs? (I especially don't like listing the commit. It will download without it, but the extracted directory will contain the commit anyway and WRKSRC will be wrong!)
- better support for Cargo+Meson builds? (should the configure hook be a separate make task that then gets assigned to either do-configure or pre-configure depending on settings?)
- is there an existing script for getting CARGO_CRATES from a Cargo.lock?
Comment 2 Val Packett 2018-03-18 10:54:19 UTC
(In reply to Alexandre C. Guimarães from comment #1)
oh, didn't notice GL_SITE, I thought it's only for gitlab.com. Thanks!
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2018-06-06 18:55:47 UTC
Try to use the release tarballs.  They contain vendored crates and
using a Git checkout is the wrong approach here.  See
https://gitlab.gnome.org/World/fractal/tags and pick a file with
a paperclip next to it.

E.g. the fractal 0.1.3 tarball is here:

https://gitlab.gnome.org/World/fractal/uploads/307ea6fe16f617750490a359b727aebb/fractal-0.1.30.tar.xz

USES=cargo is only needed for upstreams that do not do their own vendoring.

> - is there an existing script for getting CARGO_CRATES from a Cargo.lock?

make cargo-crates
Comment 4 Val Packett 2018-06-06 20:22:28 UTC
Created attachment 194050 [details]
fractal.patch v2

(In reply to Tobias Kortkamp from comment #3)
ooh, I never noticed that they make these tarballs! (Probably because I was looking at danigm/fractal instead of World/fractal.) Thanks!

Here's the new version.
Comment 5 Tobias Kortkamp freebsd_committer freebsd_triage 2018-06-07 10:50:46 UTC
Created attachment 194062 [details]
fractal.diff v3

It would be easier if you'd test your ports with Poudriere and a
vanilla ports tree before submitting them.

It's missing a few build dependencies (I'm uploading an updated
diff) and it fails to build:

/wrkdirs/usr/ports/net-im/fractal/work/fractal-0.1.30/scripts/cargo.sh .. fractal /usr/local/share/locale
FAILED: fractal 
/wrkdirs/usr/ports/net-im/fractal/work/fractal-0.1.30/scripts/cargo.sh .. fractal /usr/local/share/locale
/wrkdirs/usr/ports/net-im/fractal/work/fractal-0.1.30/scripts/cargo.sh: [[: not found
RELEASE MODE
[...]
error: failed to run custom build command for `gspell-sys v0.2.0 (https://gitlab.gnome.org/jsparber/gspell-sys-rs#96e2dd5f)`
process didn't exit successfully: `/wrkdirs/usr/ports/net-im/fractal/work/fractal-0.1.30/target/release/build/gspell-sys-9395f1bdadc085eb/build-script-build` (exit code: 1)
--- stderr
`"pkg-config" "--libs" "--cflags" "gspell-1 >= 1.8"` did not exit successfully: exit code: 1
--- stderr
Package dependency requirement 'gspell-1 >= 1.8' could not be satisfied.
Package 'gspell-1' has version '1.4.1', required version is '>= 1.8'

So this appears to be blocked until textproc/gspell is updated.
Comment 6 Tobias Kortkamp freebsd_committer freebsd_triage 2018-06-08 11:00:57 UTC
Created attachment 194079 [details]
fractal.diff v4

- Add more missing build dependencies
- Fix misuse of PREFIX vs LOCALBASE
Comment 7 Val Packett 2018-09-12 13:47:17 UTC
Created attachment 197052 [details]
fractal.patch v5

- Update to 3.30.0
- No more shebangfix — cargo.sh comes with #!/bin/sh — but a patch for it to use [ instead of [[ (also submitted upstream)
- WITHOUT_FBSD10_FIX to prevent ports from changing libbacktrace's checksum
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-10-09 18:07:13 UTC
A commit references this bug:

Author: swills
Date: Tue Oct  9 18:06:16 UTC 2018
New revision: 481644
URL: https://svnweb.freebsd.org/changeset/ports/481644

Log:
  net-im/fractal: create port

  Fractal is a Gtk+ Matrix messaging client written in Rust.
  Its interface is optimized for collaboration in large groups
  such as free software projects.

  WWW: https://wiki.gnome.org/Apps/Fractal

  PR:		226683
  Submitted by:	Greg V <greg@unrelenting.technology>

Changes:
  head/net-im/fractal/
  head/net-im/fractal/Makefile
  head/net-im/fractal/distinfo
  head/net-im/fractal/files/
  head/net-im/fractal/files/patch-scripts_cargo.sh
  head/net-im/fractal/pkg-descr
  head/net-im/fractal/pkg-plist
Comment 9 Steve Wills freebsd_committer freebsd_triage 2018-10-09 18:07:52 UTC
Committed, thanks!