#43582 closed defect (fixed)
surf: variant without x11 doesn't build
Reported by: | mojca (Mojca Miklavec) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | shreevatsa.public@…, dbevans (David B. Evans) | |
Port: |
Description
Based on the ticket #39383 I tried to patch surf
:
-
Portfile
26 26 port:flex \ 27 27 port:xorg-libXmu \ 28 28 port:jpeg \ 29 port:tiff \ 30 port:gtk1 29 port:tiff 31 30 32 variant no_x11 { 33 depends_lib-delete port:gtk1 34 configure.args-append --disable-gui 31 configure.args --disable-gui 32 33 # remove this in May 2015 34 variant no_x11 conflicts x11 description {legacy compatibility variant} {} 35 variant x11 conflicts no_x11 description {} { 36 depends_lib-append port:gtk1 37 configure.args-delete --disable-gui 35 38 } 39 if {[variant_isset no_x11]} { 40 default_variants -x11 41 } else { 42 default_variants +x11 43 } 36 44 37 45 post-destroot { 38 46 copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}/
But the problem seems to be that surf
fails to build without x11
:
make[1]: *** No rule to make target `gtkgui/start.o', needed by `surf'. Stop.
so I'm wondering whether it makes any sense to provide x11
as an option if building without gui support is broken anyway.
I have a few other questions:
- Is flex a build or a runtime dependency?
- If building without
gtk1
would actually work- Is
xorg-libXmu
still needed? - Would it be better to call the variant
gtk
orx11
?
- Is
- The binary depends on a few other libraries here, but I'm not sure if those are true dependencies because I never rebuilt all the ports:
glib1
libiconv
zlib
xorg-libX11
xorg-libice
xorg-libsm
xorg-lbXt
xorg-libXext
- Is it possible to build the port against
gtk2
orgtk3
?
Change History (7)
comment:1 Changed 11 years ago by dbevans (David B. Evans)
comment:3 Changed 11 years ago by dbevans (David B. Evans)
Given these results, I think I would add a +gui default variant instead of +x11 or +gtk and just drop the broken +no_x11 without any legacy variant.
comment:4 Changed 11 years ago by dbevans (David B. Evans)
To answer another question, to use gtk2 or gtk3 the gui code would undoubtedly need to be rewritten (redesigned?) due to significant API and HIG differences between gtk1 and the later versions.
comment:5 Changed 11 years ago by mojca (Mojca Miklavec)
Can you please add a patch or commit this? (I'm not sure that I understood what exactly you meant.)
The other ticket has been open for almost a year without any maintainer feedback, so committing a change should be ok.
gtk: thanks for clarification. I wasn't sure how much the code has changed in the meantime and wasn't sure whether the author actually took a look into this changes already.
comment:6 Changed 11 years ago by dbevans (David B. Evans)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed in r119755. Added default variant +gui (to allow disabling with -gui) and removed +no_x11 because it was a misnomer and didn't work anyway. So no need for a legacy variant. xorg-libXmu is required only for +gui and the other X11 ports you mentioned are dependencies of xorg-libX11. A patch to configure was required to correctly allow disabling cups support (required to disable the GUI).
comment:7 Changed 11 years ago by mojca (Mojca Miklavec)
Thanks a lot for taking care of this. We're almost done with getting rid of no_x11
.
Referring to Makefile.am the --disable-gui directive will not be honored unless --disable-cups is also asserted. Having done this and deleting the dependency xorg-libXmu, the +no_x11 build still fails with this error
So this shows that disabling the gui (gtk1) does not completely eliminate dependencies on X11. It's also needed to support X11 image file formats. To completely disable the need for X11 one would have to disable this support (via a patch) as well. See