Opened 8 years ago

Closed 6 years ago

#52596 closed request (fixed)

Add port for i3 window manager

Reported by: jenstroeger (Jens Troeger) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: i3

Description

I found an unmaintained Portfile for the i3 window manager, and I was wondering if the portfile could be integrated into the main MacPorts repo.

Attachments (5)

Portfile (2.0 KB) - added by mf2k (Frank Schima) 6 years ago.
patch-configure-libiconv.diff (299 bytes) - added by mf2k (Frank Schima) 6 years ago.
patch-Makefile.in.diff (413 bytes) - added by jens-maus (Jens Maus) 6 years ago.
Portfile.2 (2.1 KB) - added by jens-maus (Jens Maus) 6 years ago.
functional Portfile but with necessary libxkcommon-x11 dependency
Portfile.3 (2.2 KB) - added by mf2k (Frank Schima) 6 years ago.
Latest Portfile with some added dependencies

Download all attachments as: .zip

Change History (22)

comment:1 Changed 8 years ago by larryv (Lawrence Velázquez)

Keywords: X11 window manager removed
Port: i3 added
Summary: Add i3 window manager PortfileAdd port for i3 window manager
Version: 2.3.4

comment:2 Changed 8 years ago by mf2k (Frank Schima)

Comments:

  • Have you tested it?
  • It needs to use perl 5.24 - See #52081
  • Some of the dependencies could possibly be re-written to allow the -devel version. I'm looking at pango and cairo.

Attach an updated version of the Portfile and we can call this a submission.

comment:3 Changed 8 years ago by jpo@…

Hey all. Author of the original portfile here.

I never submitted the i3 port because its dependencies did not all have ports yet. One of which is dmenu, for which I submitted a port 3 years ago (#41630) but it just rotted in the tracker.

I no longer use MacPorts (or even OS X), and it's been several years since I actually used i3 on OS X as my primary WM, but I can confirm that it worked once upon a time.

Consider it abandoned and do as you please :)

Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 8 years ago by jenstroeger (Jens Troeger)

I started to look into this and would like to track progress and blocking issues here.

First, I had to add a second port on which the i3 port depends: xkbcommon by jpo@…. Compiling the xkbcommon port requires the cairo/cairo-xcb.h include which doesn't seem to come with the default cairo port. This seems to be a circular dependency? Ticket #23483 seems to be related, by quite dated.

Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 7 years ago by jenstroeger (Jens Troeger)

Anybody care for this, or dependent blocking issues?

comment:6 Changed 7 years ago by mf2k (Frank Schima)

It would be best if you submit a Portfile for ​xkbcommon in another ticket. Then we can work on the i3 Portfile.

I'm not clear if this ticket is related? #52955

comment:7 Changed 7 years ago by jenstroeger (Jens Troeger)

I would agree: ticket #52955 seems to be related.

If I remember correctly then I tried to build xkbcommon manually but that failed because of the missing cairo header. If xkbcommon was part of MacPorts then at least that would be one step closer to building i3.

comment:8 Changed 6 years ago by mf2k (Frank Schima)

So I think all of the tickets we have been waiting on have been resolved. I am going to attach my latest version of the Portfile as a starting point for this. It fails at the configure phase as follows:

:info:configure checking for library containing iconv_open... no
:info:configure configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_x11_i3/i3/work/i3-4.15/x86_64-apple-darwin16.7.0':
:info:configure configure: error: cannot find the required iconv_open() function despite trying to link with -liconv

Changed 6 years ago by mf2k (Frank Schima)

Attachment: Portfile added

Changed 6 years ago by mf2k (Frank Schima)

comment:9 Changed 6 years ago by mf2k (Frank Schima)

With help from jmroot, I got past that error to hit another one:

:info:configure checking for XCB_UTIL_XRM... no
:info:configure configure: error: Package requirements (xcb-xrm) were not met:
:info:configure No package 'xcb-xrm' found

comment:10 Changed 6 years ago by mf2k (Frank Schima)

That package needs to be added to Macports.

https://github.com/Airblader/xcb-util-xrm

comment:11 Changed 6 years ago by mf2k (Frank Schima)

The existing request ticket is #54094.

Changed 6 years ago by jens-maus (Jens Maus)

Attachment: patch-Makefile.in.diff added

Changed 6 years ago by jens-maus (Jens Maus)

Attachment: Portfile.2 added

functional Portfile but with necessary libxkcommon-x11 dependency

comment:12 Changed 6 years ago by jens-maus (Jens Maus)

Now that ticket #54094 is resolved and xcb-xrm compiles with the supplied portfile I managed to get "i3" compiled and running. The necessary changes were:

  1. reactivate the libxcbcommon-x11 subport in the Portfile of libxcbcommon (why is the x11 subport disabled/commented out in first place?)
  2. install libxcbcommon-x11 with forcing activation because it conflicts with the standard libxcbcommon package
  3. install the new "patch-Makefile.in.diff" which will patch a slight problem in the Makefile.in resulting in a broken build.

After these three steps (in addition to getting xorg-xcb-xrm compiled) I was able to compile+install i3 with the supplied Portfile.

Hope the mess around libxcbcommon-x11 gets cleaned up somehow and all this integrated/merged into MacPorts one day.

comment:13 Changed 6 years ago by mf2k (Frank Schima)

The conflict between libxkbcommon and libxkbcommon-x11 needs to be resolved by identifying the conflicting files and figuring out which port should install them - not both.

comment:14 Changed 6 years ago by mf2k (Frank Schima)

Now that #54094 is committed, I opened #57623 for libxkbcommon-x11.

Last edited 6 years ago by mf2k (Frank Schima) (previous) (diff)

comment:15 Changed 6 years ago by mf2k (Frank Schima)

It builds now with Portfile.2! But I don't know how to test it. Running i3 gives me the following runtime error:

$ i3
11/30/2018 10:45:06 - ERROR: Another window manager seems to be running (X error 10)

How does it work?

comment:16 Changed 6 years ago by mf2k (Frank Schima)

I created a file ~/.xinitrc with the following in it:

exec /opt/local/bin/i3

And that caused xeyes to take up the full screen. I'm not sure if I did it correctly.

Changed 6 years ago by mf2k (Frank Schima)

Attachment: Portfile.3 added

Latest Portfile with some added dependencies

comment:17 Changed 6 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.