Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Trouble Creating Diff for Tmux 2.1 Patch #45217

Closed
indiesquidge opened this issue Oct 21, 2015 · 4 comments
Closed

Trouble Creating Diff for Tmux 2.1 Patch #45217

indiesquidge opened this issue Oct 21, 2015 · 4 comments

Comments

@indiesquidge
Copy link
Contributor

The Tmux 2.1 update broke a few things that I regularly use, and I would like to create my own patch/diff for my installed package.

I have been reading about creating patches, but I don't know if I fully understand what to do with this diff to fix the issue. I have created the diff, but every time I run

brew install --interactive --git tmux 

make the diff changes, and

git diff >> /usr/local/Library/Formula/tmux.rb 

I get Error: Empty installation when I exit, and the package is nowhere to be found. What am I missing that is causing this issue?

I have downloaded the Tmux 2.0 tar file and gotten that to work manually based on Tmux's readme, but I would rather use Homebrew to install tmux 2.1 and patch this one thing. Any help would be appreciated.

@bfontaine
Copy link
Contributor

The brew install --interactive --git tmux is used to create the diff; if you already have one you don’t need this.

At the end of the formula add a line with __END__ followed by the patch. See an example here.

Then at the top of the formula, before def install, add patch :DATA. You can then try to brew install tmux. If it works, add a comment above patch :DATA explaining why it’s necessary and submit a pull-request 😉

@indiesquidge
Copy link
Contributor Author

@bfontaine, ah, that makes sense. Thank you for explaining. Unfortunately, after I created the correct diff and installed tmux, it seems that nothing has changed :(

I'm guessing it's a problem with the diff itself, so I'd have to take my issue back over to the tmux issue page?

@indiesquidge
Copy link
Contributor Author

@bfontaine, so I got it to work with brew install --build-from-source tmux. I will update the file with a comment on the patch and create a PR. Thank you for your help :)

@bfontaine
Copy link
Contributor

👍 😄

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants