Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

New Gimp Formula #34488

Closed
wants to merge 1 commit into from
Closed

New Gimp Formula #34488

wants to merge 1 commit into from

Conversation

skela
Copy link

@skela skela commented Nov 27, 2014

As discussed in #34473

This is a formula for gimp version 2.8.14.

depends_on "cairo"
depends_on "pygtk"
else
depends_on "pango" => ["without-x11"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: you don't need an array if there's only one option. You can pass it as a string: depends_on "pango" => "without-x11"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed that change to master :D thanks for the nitpicking :P

@mistydemeo
Copy link
Member

Do you mind squashing this down to one commit with the commit message gimp 2.8.14? Thanks!

depends_on "d-bus"

def install
system "./configure",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this one line :).

system "./configure", "--prefix=#{prefix}", "--disable-glibtest"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, added that too to my master.

@skela
Copy link
Author

skela commented Nov 27, 2014

@mistydemeo sure I don't mind, but do you mind telling me how to achieve that? I've used git for 5 years and I've never squashed commits before :(

@DomT4
Copy link
Member

DomT4 commented Nov 27, 2014

@skela Check out this link, or this link. Both explain it well :)

@mistydemeo
Copy link
Member

Sure! You can do that via interactive rebase:

git rebase -i HEAD~9 # interactive rebase with a range from the latest commit to 9 commits earlier

This will pop up a text file that looks somewhat like this:

pick a3e5f56 jenkins 1.591
pick 959202f uru 0.7.6
pick 20fc895 uru: add 0.7.6 bottle.
pick 1a653fb mpd 0.19.5
pick 13451b7 mpd: update 0.19.5 bottle.
pick 939205b doctor: handle non-extent methods passed as arguments
pick 2bf7b94 flac 1.3.1.
pick 25e8eb3 flac: Use https urls where possible.
pick b64c77e flac: update 1.3.1 bottle.

It has help text printed, there, but essentially you want to fixup every commit but the first, which you want to reword.

@skela
Copy link
Author

skela commented Nov 27, 2014

Thanks again to both of u ;) do you want me to cancel this pull request and make a new one once I've squashed it ?

@mistydemeo
Copy link
Member

Nope, if you force-push back to the same branch on Github it will update the pull request!

@skela
Copy link
Author

skela commented Nov 27, 2014

Ended up doing reword for the first one and squash for the rest, hope thats ok :P

@mistydemeo
Copy link
Member

Don't really need the commit messages from the others, but it's not a big deal. :b Thanks!

@skela
Copy link
Author

skela commented Nov 27, 2014

There, its just gimp 2.8.14 now, sorry about that.

depends_on "babl"
depends_on "fontconfig"

if build.with? "x11"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work okay with both the X11 GUI and the native GUI?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(i.e. have you tested it with --without-x11 and do things seem to work okay?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine with x11, let me try without though, you're right I better test that too.

@DomT4
Copy link
Member

DomT4 commented Nov 27, 2014

There are some startup errors. Nothing fatal though, the core functionality seems to be there. The errors seem to be Python based, so perhaps @tdsmith can add something on this.

Error spawning command line 'dbus-launch --autolaunch=fb3514ffc77d2751722195ac53ff8a4f --binary-syntax --close-stderr': Child process exited with code 1
Traceback (most recent call last):
  File "/usr/local/lib/gimp/2.0/plug-ins/text-brush.py", line 20, in <module>
    from gimpfu import *
  File "/usr/local/lib/gimp/2.0/python/gimpfu.py", line 76, in <module>
    import gimp
ImportError: could not import pygtk

(gimp:36142): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
Traceback (most recent call last):
  File "/usr/local/lib/gimp/2.0/plug-ins/python-eval.py", line 19, in <module>
    from gimpfu import *
  File "/usr/local/lib/gimp/2.0/python/gimpfu.py", line 76, in <module>
    import gimp
ImportError: could not import pygtk

(gimp:36142): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
Traceback (most recent call last):
  File "/usr/local/lib/gimp/2.0/plug-ins/python-console.py", line 19, in <module>
    from gimpfu import *
  File "/usr/local/lib/gimp/2.0/python/gimpfu.py", line 76, in <module>
    import gimp
ImportError: could not import pygtk

(gimp:36142): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
Traceback (most recent call last):
  File "/usr/local/lib/gimp/2.0/plug-ins/py-slice.py", line 30, in <module>
    from gimpfu import *
  File "/usr/local/lib/gimp/2.0/python/gimpfu.py", line 76, in <module>
    import gimp
ImportError: could not import pygtk

(gimp:36142): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
Traceback (most recent call last):
  File "/usr/local/lib/gimp/2.0/plug-ins/palette-to-gradient.py", line 16, in <module>
    from gimpfu import *
  File "/usr/local/lib/gimp/2.0/python/gimpfu.py", line 76, in <module>
    import gimp
ImportError: could not import pygtk

(gimp:36142): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
Traceback (most recent call last):
  File "/usr/local/lib/gimp/2.0/plug-ins/palette-sort.py", line 16, in <module>
    from gimpfu import *
  File "/usr/local/lib/gimp/2.0/python/gimpfu.py", line 76, in <module>
    import gimp
ImportError: could not import pygtk

(gimp:36142): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
Traceback (most recent call last):
  File "/usr/local/lib/gimp/2.0/plug-ins/palette-offset.py", line 16, in <module>
    from gimpfu import *
  File "/usr/local/lib/gimp/2.0/python/gimpfu.py", line 76, in <module>
    import gimp
ImportError: could not import pygtk

(gimp:36142): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
Traceback (most recent call last):
  File "/usr/local/lib/gimp/2.0/plug-ins/gradients-save-as-css.py", line 25, in <module>
    from gimpfu import *
  File "/usr/local/lib/gimp/2.0/python/gimpfu.py", line 76, in <module>
    import gimp
ImportError: could not import pygtk

(gimp:36142): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
Traceback (most recent call last):
  File "/usr/local/lib/gimp/2.0/plug-ins/foggify.py", line 19, in <module>
    from gimpfu import *
  File "/usr/local/lib/gimp/2.0/python/gimpfu.py", line 76, in <module>
    import gimp
ImportError: could not import pygtk

(gimp:36142): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
Traceback (most recent call last):
  File "/usr/local/lib/gimp/2.0/plug-ins/file-openraster.py", line 16, in <module>
    from gimpfu import *
  File "/usr/local/lib/gimp/2.0/python/gimpfu.py", line 76, in <module>
    import gimp
ImportError: could not import pygtk

(gimp:36142): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
Traceback (most recent call last):
  File "/usr/local/lib/gimp/2.0/plug-ins/colorxhtml.py", line 24, in <module>
    import gimp
ImportError: could not import pygtk

(gimp:36142): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error

@DomT4
Copy link
Member

DomT4 commented Nov 27, 2014

Apart from those Python errors though, which Tim may be able to advise on, everything else is like an absolute dream ❤️. This is great 👍

@tdsmith
Copy link
Contributor

tdsmith commented Nov 27, 2014

ImportError: could not import pygtk

Ugh, why not? Tell it to try harder. :|

Guessing you're using Homebrew's Python, Dominyk? Do you have the Homebrew site-packages in sys.path for Homebrew system python? For testing's sake, does

echo /usr/local/lib/python2.7/site-packages >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth

change the messages you see at startup? You shouldn't need to rebuild gimp.

@DomT4
Copy link
Member

DomT4 commented Nov 27, 2014

I removed GIMP from my system barely two minutes ago so I could move on with building something else I've been working on xD. Give me a little bit and I'll rebuilt it and try your echo.

Guessing you're using Homebrew's Python, Dominyk?

Always ❤️.

@skela
Copy link
Author

skela commented Nov 27, 2014

I don't get those python errors btw, so that's interesting. I've got a fresh homebrew install though, if that makes a difference. I tried to install without-x11, but it failed at make install.

brew install /Users/skela/code/terra/homebrew/Library/Formula/gimp.rb --without-x11

==> Installing dependencies for gimp: pango, gtk+, cairo, pygtk
==> Installing gimp dependency: pango
==> Downloading http://ftp.gnome.org/pub/GNOME/sources/pango/1.36/pango-1.36.8.tar.xz
Already downloaded: /Library/Caches/Homebrew/pango-1.36.8.tar.xz
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/pango/1.36.8 --enable-man --with-html-dir=/usr/local/Cellar/pango/1.3
==> make
==> make install
🍺  /usr/local/Cellar/pango/1.36.8: 126 files, 4.7M, built in 25 seconds
==> Installing gimp dependency: gtk+
==> Downloading http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.25.tar.xz
Already downloaded: /Library/Caches/Homebrew/gtk+-2.24.25.tar.xz
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/gtk+/2.24.25 --disable-glibtest --enable-introspection=yes --disable-
==> make install
🍺  /usr/local/Cellar/gtk+/2.24.25: 1198 files, 58M, built in 92 seconds
==> Installing gimp dependency: cairo
==> Downloading http://cairographics.org/releases/cairo-1.14.0.tar.xz
Already downloaded: /Library/Caches/Homebrew/cairo-1.14.0.tar.xz
==> ./configure --prefix=/usr/local/Cellar/cairo/1.14.0 --enable-gobject=yes --enable-svg=yes --enable-xlib=no --enable-xlib-xrender=no
==> make install
🍺  /usr/local/Cellar/cairo/1.14.0: 101 files, 6.0M, built in 51 seconds
==> Installing gimp dependency: pygtk
==> Downloading http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/pygtk-2.24.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/pygtk-2.24.0.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/pygtk/2.24.0
==> make install
🍺  /usr/local/Cellar/pygtk/2.24.0: 658 files, 17M, built in 26 seconds
==> Installing gimp
==> Downloading http://download.gimp.org/pub/gimp/v2.8/gimp-2.8.14.tar.bz2
Already downloaded: /Library/Caches/Homebrew/gimp-2.8.14.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/gimp/2.8.14 --disable-glibtest
==> make install
1 error generated.
make[3]: *** [gui-unique.o] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install] Error 2
make: *** [install-recursive] Error 1

READ THIS: http://git.io/brew-troubleshooting


These open issues may also help:
New Gimp Formula (https://github.com/Homebrew/homebrew/pull/34488)

I'll try again after cleaning away the without-x11 packages to force it to re-install them.
If the optional without x11 stuff causes problems, I would be more than happy to remove them.

@mistydemeo
Copy link
Member

Can you provide the brew gist-logs gimp output after the build fails with without-x11?

@skela
Copy link
Author

skela commented Nov 27, 2014

Yeah I'll provide them, just re-running it now, hang on ;)

@DomT4
Copy link
Member

DomT4 commented Nov 27, 2014

I don't get those python errors btw, so that's interesting

Are you using brewed python or system python?

@skela
Copy link
Author

skela commented Nov 27, 2014

skela@skelimac:~$ whereis python
/usr/bin/python

That's system python isn't it.

@skela
Copy link
Author

skela commented Nov 27, 2014

@mistydemeo brew gist-logs gimp fails because its referencing a github commit that no longer exists. How do I get rid of it?

@MikeMcQuaid
Copy link
Member

What's the advantage of this over the build at http://www.gimp.org/downloads/? I'm sorry I was late to the other PR but I'm not in favour of us having this in. This is a very good example of something where there are good upstream binaries provided that people should use instead (or with homebrew-cask).

depends_on "gettext" => :build
depends_on "intltool" => :build

depends_on :x11 => :recommended
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this defaults to X11 enabled it's worse than the upstream package here: http://www.gimp.org/downloads/

@MikeMcQuaid
Copy link
Member

Also, if this is included with X11 enabled by default it should really be in the homebrew-x11 tap.

@skela
Copy link
Author

skela commented Nov 27, 2014

@MikeMcQuaid , because if I want to install the build at gimp.org/downloads I need to open safari, find the link, download it, install it. That's tedious. Also I really want to use the X11 version, not the mac app bundle thing.

How come inkscape is in homebrew master then? Isn't it the same deal?

Advantages:

  • Installing gimp is just 1 command, as opposed to lots of actions that involve the mouse.
  • Easy to update
  • Not everybody wants to use the mac app
  • Easy to script to set up new machines
  • We can offer the ability for users to use homebrew and head this way if you want to stay really up to date with the stable branch of 2.8.

@skela
Copy link
Author

skela commented Nov 27, 2014

@mistydemeo here's the gist
https://gist.github.com/anonymous/1076488d39182c2cecbe

made it by doing this:
brew gist-logs /Users/skela/code/terra/homebrew/Library/Formula/gimp.rb
after the
brew install --without-x11 /Users/skela/code/terra/homebrew/Library/Formula/gimp.rb
command failed.

@DomT4
Copy link
Member

DomT4 commented Nov 27, 2014

@tdsmith

echo /usr/local/lib/python2.7/site-packages >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth

Gets me:

no such file or directory: /Users/Dominyk/Library/Python/2.7/lib/python/site-packages/homebrew.pth

Same thing if I remove the user ~:

echo /usr/local/lib/python2.7/site-packages >> /Library/Python/2.7/lib/python/site-packages

no such file or directory: /Library/Python/2.7/lib/python/site-packages

@MikeMcQuaid
Copy link
Member

@MikeMcQuaid , because if I want to install the build at gimp.org/downloads I need to open safari, find the link, download it, install it. That's tedious. Also I really want to use the X11 version, not the mac app bundle thing.

I recommend submitting it to homebrew-cask. This is exactly the use-case they handle well.

How come inkscape is in homebrew master then? Isn't it the same deal?

It requires X11 which makes it a little more eligable but yes: it shouldn't be in core and I'll move it at some stage.

Installing gimp is just 1 command, as opposed to lots of actions that involve the mouse.
Easy to update
Not everybody wants to use the mac app
Easy to script to set up new machines
We can offer the ability for users to use homebrew and head this way if you want to stay really up to date with the stable branch of 2.8.

Disadvantages:

  • People do brew install gimp and are told to install X11 which they don't need and offers a crappy user experience
  • We have to maintain a formula that breaks often
  • We encourage the building of more complex software where upstream already provides good binary packages

@DomT4
Copy link
Member

DomT4 commented Nov 27, 2014

I recommend submitting it to homebrew-cask. This is exactly the use-case they handle well.

I don't know how willing Cask would be to take it, to be honest. They ship the dmg already, and seem unlikely to want to adopt a x11 dependency any more than we are.

@skela
Copy link
Author

skela commented Nov 27, 2014

With that being said, can we continue with this pull request? I get the feeling not everybody agrees with @MikeMcQuaid , and this is exactly how the last pull request got torpedoed.

@DomT4
Copy link
Member

DomT4 commented Nov 27, 2014

Disclaimer at this juncture: I have no control whatsoever as to what goes into or out of Homebrew. I'm just a grunt 😉. When it comes down to votes on in or out, I don't have one 😀.

@skela
Copy link
Author

skela commented Nov 27, 2014

Also I def think we should continue with X11 as the default, as that seems to be less likely to break.
Quite tempted to remove the --without-x11 stuff, unless you guys have some tips on what to do with it to fix it.

@MikeMcQuaid
Copy link
Member

If Cask already ship the DMG this makes me even less likely to think this is a good idea. @skela even in the best-case scenario this PR will only be accepted at https://github.com/Homebrew/homebrew-x11.

@MikeMcQuaid
Copy link
Member

@skela I feel pretty strongly about this being a poor user experience, sorry.

@skela
Copy link
Author

skela commented Nov 27, 2014

@MikeMcQuaid is there any fundamental differences I have to make to the formula for it to be accepted in homebrew-x11 then? Or will I get similar arguments there against admitting it.

The fact that gimp is missing from homebrew is frankly a bit moronic, I can't believe this.

@MikeMcQuaid
Copy link
Member

@MikeMcQuaid is there any fundamental differences I have to make to the formula for it to be accepted in homebrew-x11 then? Or will I get similar arguments there against admitting it.

I don't mind if things get submitted there. Longer-term I want to work on improving our Homebrew Cask integration instead so that people can install things them from there instead. Ultimately, anyone can create their own tap.

The fact that gimp is missing from homebrew is frankly a bit moronic, I can't believe this.

https://github.com/Homebrew/homebrew/blob/master/CODEOFCONDUCT.md

@DomT4
Copy link
Member

DomT4 commented Nov 27, 2014

@MikeMcQuaid Genuine question. Not trying to make you drive your head into a wall at 9am, promise: What makes this x11 dependency different from the ~100+ mandatory x11 dependencies we already carry? Is it a case of some things just using x11 libraries rather than creating a full GUI experience, or is it a case of not yet migrating a lot of stuff, or? Just curious on this, not trying to deliberately poke you 😁

@MikeMcQuaid
Copy link
Member

@MikeMcQuaid Genuine question. Not trying to make you drive your head into a wall at 9am, promise: What makes this x11 dependency different from the ~100+ mandatory x11 dependencies we already carry? Is it a case of some things just using x11 libraries rather than creating a full GUI experience, or is it a case of not yet migrating a lot of stuff, or? Just curious on this, not trying to deliberately poke you

New formulae have a higher barrier of entry than the stuff already in here. If people are already using a formula we can't just remove it. I do want to migrate all those to homebrew-x11 or remove the X11 dependencies, though.

The libraries I care less about, yeh. It sucks to tell people to install XQuartz just to be able to install something but that's not what concerns me most. X11 on OSX is a terrible and non-default user-experience. That's OK but I do view it similar to devel-only or head-only software; something we don't want to flat out disable but something similarly dissuaded.

@MikeMcQuaid
Copy link
Member

Also, from Acceptable Formula:

Don’t make your formula build an .app (native OS X Application), we don’t want those things in Homebrew. Make it build a command line tool or a library. However, we have a few exceptions to that, e.g. when the App is just additional to CLI or if the GUI-application is non-native for OS X and/or hard to get in binary elsewhere (example: font forge). Check out the homebrew-cask project if you’d like to brew native OS X Applications.
https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Acceptable-Formulae.md#stuff-that-builds-a-app

This is widely ignored and personally I wish it wasn't.

@skela
Copy link
Author

skela commented Nov 27, 2014

@MikeMcQuaid I've made a pull request for the gimp formula in homebrew-x11 without the optional x11 stuff obviously.

https://github.com/Homebrew/homebrew-x11/pull/4

Guess its up to you guys now to choose which one you want.

homebrew-x11 only allows x11 based ones, and the one this pull request at least offers the user the choice (although atm without-x11 doesn't seem to work).

@MikeMcQuaid
Copy link
Member

Also I really want to use the X11 version, not the mac app bundle thing.

Why is this, out of interest?

@DomT4
Copy link
Member

DomT4 commented Nov 27, 2014

X11 on OSX is a terrible and non-default user-experience.

This is sadly true. It ain't pretty, backend or front, that's for sure.

Alright. Since we seem to be at a brick wall on this PR, and everyone is likely to start tearing strands of hair out pretty soon, as a better-than-nothing-still-onestep-install-process-for-those-who-desire-it we should move this PR over to Homebrew-x11.

Further to that, and to address Mike's comments a wee bit, perhaps over time we could consider expanding Homebrew-x11 to deal with more than that, and start shoving things that create .apps into Homebrew-x11 (Or a renamed Homebrew-gui perhaps). I tend to agree that the core should be almost all CLI tools, in part because I'm terribly anal about organising things.

I'd also propose that we start moving across things to Homebrew-x11 slowly, starting with formulae that haven't been updated for a while and aren't likely to suddenly drown Homebrew in support complaints if they move a little.

These are just proposals. Feel free to shoot them down as necessary 😁

@skela
Copy link
Author

skela commented Nov 27, 2014

@MikeMcQuaid because inkscape is the same, and it behaves much nicer for me with regard to scripts, launching it from the command line. Also the mac app built gimp client has always been buggy as hell for me.

  • things like man pages, and all that nice stuff.

@MikeMcQuaid
Copy link
Member

Closing this in favour of homebrew-x11 PR. I've also created this PR for better Cask integration. #34496

@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 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

Successfully merging this pull request may close these issues.

5 participants