~julienxx/castor

1

macOS installation

Details
Message ID
<D1AF0401-137B-4C3A-A051-2821E76D5626@ijams.tk>
DKIM signature
pass
Download raw message
Hello! First, I want to say thanks for all the work being done on  
Castor! I am really enjoying diving into gemini and gopher. I’ve been  
looking into how to best install and use Castor on my Mac. I found two  
general methods to get a full installation running over the current  
non-installation method.

tldr; see my preferred instructions at
https://paste.sr.ht/~exprez135/c35bcd0c4d370517c5deb129ad5813642d19e5df

Explanation of what I’ve done:

First, in terms of dependencies, you can easily just use Homebrew for  
these:

brew install rust
brew install gtk+3
brew install adwaita-icon-theme

The current instructions are right in that if you install gtk+3 first,  
the rest are pulled in automatically. Without adwaita-icon-theme  
(gnome-icon-theme), I get constant error messages and the  
bookmarks/back button icons are not loaded.

There are then three problems which must be solved with the Makefile:
- /usr is off-limits on macOS: Use /usr/local as my prefix (`make  
install PREFIX=/usr/local`)
- `update-desktop-database` does not exist on macOS: Comment out  
`update-desktop-database` in the Makefile

The final problem is more complex, and I’ve found a couple ways to fix  
it. macOS uses BSD install (not just this, it’s also terribly old: the  
man page is from May of 2001), which does not support the `-D` option  
which is used. I can then either install GNU install or revert the  
changes in 779e37c0, which is when Castor started using `install -D`  
over the manual `mkdir -p` section.

- - -

The first option makes the changes to the Makefile more elegant, but  
requires that one installs GNU coreutils:

brew install coreutils

Then change:

- INSTALL=install -D
+ INSTALL=ginstall -D

Then run:
make
make install PREFIX=/usr/local

- - -

The second option can just be:

git revert 779e37c0

Then:
make
make install PREFIX=/usr/local

This does change a significant portion of the Makefile though, which  
might cause problems down the line with merging updates if they happen.

- - -

In sum: 1) use a writeable prefix, 2) remove `update-desktop-database`,  
and 3) create directories manually or use GNU install.

Sorry for the length of this message. Let me know if I can do anything  
to help simplify the process of macOS users. Perhaps some of this could  
be added to Castor's instructions. I’m also looking into creating a  
Homebrew tap & formula for this to give that option.
Details
Message ID
<3c7b1cf6-d060-cda4-da51-4975b51e68f6@typed-hole.org>
In-Reply-To
<D1AF0401-137B-4C3A-A051-2821E76D5626@ijams.tk> (view parent)
DKIM signature
pass
Download raw message
Thanks a lot Nate! I'll have a look at how I could update the Makefile 
to make it work for various platfroms.

On 5/15/20 6:49 PM, Nate Ijams wrote:
> Hello! First, I want to say thanks for all the work being done on 
> Castor! I am really enjoying diving into gemini and gopher. I’ve been 
> looking into how to best install and use Castor on my Mac. I found two 
> general methods to get a full installation running over the current 
> non-installation method.
>
> tldr; see my preferred instructions at
> https://paste.sr.ht/~exprez135/c35bcd0c4d370517c5deb129ad5813642d19e5df
>
> Explanation of what I’ve done:
>
> First, in terms of dependencies, you can easily just use Homebrew for 
> these:
>
> brew install rust
> brew install gtk+3
> brew install adwaita-icon-theme
>
> The current instructions are right in that if you install gtk+3 first, 
> the rest are pulled in automatically. Without adwaita-icon-theme 
> (gnome-icon-theme), I get constant error messages and the 
> bookmarks/back button icons are not loaded.
>
> There are then three problems which must be solved with the Makefile:
> - /usr is off-limits on macOS: Use /usr/local as my prefix (`make 
> install PREFIX=/usr/local`)
> - `update-desktop-database` does not exist on macOS: Comment out 
> `update-desktop-database` in the Makefile
>
> The final problem is more complex, and I’ve found a couple ways to fix 
> it. macOS uses BSD install (not just this, it’s also terribly old: the 
> man page is from May of 2001), which does not support the `-D` option 
> which is used. I can then either install GNU install or revert the 
> changes in 779e37c0, which is when Castor started using `install -D` 
> over the manual `mkdir -p` section.
>
> - - -
>
> The first option makes the changes to the Makefile more elegant, but 
> requires that one installs GNU coreutils:
>
> brew install coreutils
>
> Then change:
>
> - INSTALL=install -D
> + INSTALL=ginstall -D
>
> Then run:
> make
> make install PREFIX=/usr/local
>
> - - -
>
> The second option can just be:
>
> git revert 779e37c0
>
> Then:
> make
> make install PREFIX=/usr/local
>
> This does change a significant portion of the Makefile though, which 
> might cause problems down the line with merging updates if they happen.
>
> - - -
>
> In sum: 1) use a writeable prefix, 2) remove 
> `update-desktop-database`, and 3) create directories manually or use 
> GNU install.
>
> Sorry for the length of this message. Let me know if I can do anything 
> to help simplify the process of macOS users. Perhaps some of this 
> could be added to Castor's instructions. I’m also looking into 
> creating a Homebrew tap & formula for this to give that option.
Export thread (mbox)