#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
gtk1would actually work- Is
xorg-libXmustill needed? - Would it be better to call the variant
gtkorx11?
- 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:
glib1libiconvzlibxorg-libX11xorg-libicexorg-libsmxorg-lbXtxorg-libXext
- Is it possible to build the port against
gtk2orgtk3?
Change History (7)
comment:1 Changed 12 years ago by dbevans (David B. Evans)
comment:3 Changed 12 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 12 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 12 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 12 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 12 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
xwd.cc:54:10: fatal error: 'X11/Xlib.h' file not found #include <X11/Xlib.h> ^ 2 warnings generated. 1 error generated. make[1]: *** [xwd.o] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_macports_trunk_dports_math_surf/surf/work/surf-1.0.6/image-formats'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