This repository has been archived by the owner. It is now read-only.

Emacs formula: patching errors #4085

Closed
jone opened this Issue Feb 1, 2011 · 5 comments

Comments

Projects
None yet
4 participants
@jone

jone commented Feb 1, 2011

I just tried to build emacs using
$ brew install emacs --use-git-head --HEAD --cocoa

Console output:
==> Patching
patching file lisp/term/ns-win.el
Hunk #1 succeeded at 921 with fuzz 1 (offset -342 lines).
patching file src/nsfns.m
Hunk #1 succeeded at 2566 (offset -23 lines).
Hunk #2 succeeded at 2679 (offset -25 lines).
patching file src/nsterm.h
Hunk #1 succeeded at 97 (offset 2 lines).
patching file src/nsterm.m
Hunk #1 succeeded at 674 (offset -12 lines).
Hunk #2 succeeded at 1146 (offset 8 lines).
Hunk #3 FAILED at 1171.
Hunk #4 succeeded at 1202 (offset -8 lines).
Hunk #5 succeeded at 5698 with fuzz 2 (offset 76 lines).
Hunk #6 succeeded at 5806 (offset 73 lines).
1 out of 6 hunks FAILED -- saving rejects to file src/nsterm.m.rej
Error: Failure while executing: /usr/bin/patch -f -p1 -i 001-homebrew.diff

The formula applies a fullscreen-patch (when using --cocoa):
"https://github.com/downloads/typester/emacs/feature-fullscreen.patch" if ARGV.include? "--cocoa"

The patch seems not to apply any more on the git-head.
After some bisecting I discovered the commit which seems to break the patch:
http://repo.or.cz/w/emacs.git/commitdiff/7a4103d0f1754a34b6eb0e14edcf2501314b743c

The commit breaks the following hunk of the patch:
diff --git a/src/nsterm.m b/src/nsterm.m
index 9256c08..8bbb575 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1150,7 +1163,7 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows)
+ FRAME_NS_TOOLBAR_HEIGHT (f);

   /* constrain to screen if we can */
-  if (screen)
+  if (screen && ![window isKindOfClass:[EmacsFullWindow class]])
     {   
       NSSize sz = [screen visibleFrame].size;
       NSSize ez = { wr.size.width - sz.width, wr.size.height - sz.height };

I'm not able to fix this due to lack of language knowledge.
Any clues how this could be fixed?

Cheers

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Feb 1, 2011

Contributor

We'll probably need to disable applying patches on HEAD builds.

Contributor

adamv commented Feb 1, 2011

We'll probably need to disable applying patches on HEAD builds.

@jone

This comment has been minimized.

Show comment
Hide comment
@jone

jone Feb 1, 2011

Removing the failing hunk seems to work, but I'm not sure if this a good idea.

jone commented Feb 1, 2011

Removing the failing hunk seems to work, but I'm not sure if this a good idea.

@MikeMcQuaid

This comment has been minimized.

Show comment
Hide comment
@MikeMcQuaid

MikeMcQuaid Feb 7, 2011

Member

It probably isn't really, we'll disable applying patches on HEAD builds.

Member

MikeMcQuaid commented Feb 7, 2011

It probably isn't really, we'll disable applying patches on HEAD builds.

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Mar 6, 2011

Contributor

Pulled an emacs patch that skips the patch for --HEAD builds.

Contributor

adamv commented Mar 6, 2011

Pulled an emacs patch that skips the patch for --HEAD builds.

@Atalanta

This comment has been minimized.

Show comment
Hide comment
@Atalanta

Atalanta Jun 27, 2011

brew install emacs --cocoa --HEAD --use-git-head still attempts to apply patches for me. I did brew update, and no formulae were updated, checked the Emacs formula, commented out the fullscreen patch, and it worked.

Atalanta commented Jun 27, 2011

brew install emacs --cocoa --HEAD --use-git-head still attempts to apply patches for me. I did brew update, and no formulae were updated, checked the Emacs formula, commented out the fullscreen patch, and it worked.

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.