[MacPorts] #43582: surf: variant without x11 doesn't build
#43582: surf: variant without x11 doesn't build ---------------------+-------------------------------- Reporter: mojca@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Keywords: | Port: ---------------------+-------------------------------- Based on the ticket #39383 I tried to patch `surf`: {{{ #!diff Index: Portfile =================================================================== --- Portfile (revision 119745) +++ Portfile (working copy) @@ -26,13 +26,21 @@ port:flex \ port:xorg-libXmu \ port:jpeg \ - port:tiff \ - port:gtk1 + port:tiff -variant no_x11 { - depends_lib-delete port:gtk1 - configure.args-append --disable-gui +configure.args --disable-gui + +# remove this in May 2015 +variant no_x11 conflicts x11 description {legacy compatibility variant} {} +variant x11 conflicts no_x11 description {} { + depends_lib-append port:gtk1 + configure.args-delete --disable-gui } +if {[variant_isset no_x11]} { + default_variants -x11 +} else { + default_variants +x11 +} post-destroot { 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` or `x11`? * 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` or `gtk3`? -- Ticket URL: <https://trac.macports.org/ticket/43582> MacPorts <http://www.macports.org/> Ports system for OS X
#43582: surf: variant without x11 doesn't build ----------------------+-------------------------------- Reporter: mojca@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: | ----------------------+-------------------------------- Comment (by devans@…): 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 {{{ image-formats/Makefile.am image-formats/xbitmap.cc image-formats/xbitmap.cc image-formats/xwd.cc image-formats/xwd.h }}} -- Ticket URL: <https://trac.macports.org/ticket/43582#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#43582: surf: variant without x11 doesn't build ----------------------+-------------------------------- Reporter: mojca@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: | ----------------------+-------------------------------- Comment (by devans@…): Given these results, I think would add a +gui default variant instead of +x11 or +gtk and just drop the broken +no_x11 without any legacy variant. -- Ticket URL: <https://trac.macports.org/ticket/43582#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#43582: surf: variant without x11 doesn't build ----------------------+-------------------------------- Reporter: mojca@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: | ----------------------+-------------------------------- Comment (by devans@…): 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. -- Ticket URL: <https://trac.macports.org/ticket/43582#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#43582: surf: variant without x11 doesn't build ----------------------+-------------------------------- Reporter: mojca@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: | ----------------------+-------------------------------- Comment (by mojca@…): 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. -- Ticket URL: <https://trac.macports.org/ticket/43582#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#43582: surf: variant without x11 doesn't build ----------------------+-------------------------------- Reporter: mojca@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: | ----------------------+-------------------------------- Changes (by devans@…): * status: new => closed * resolution: => fixed Comment: 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). -- Ticket URL: <https://trac.macports.org/ticket/43582#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#43582: surf: variant without x11 doesn't build ----------------------+-------------------------------- Reporter: mojca@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: | ----------------------+-------------------------------- Comment (by mojca@…): Thanks a lot for taking care of this. We're almost done with getting rid of `no_x11`. -- Ticket URL: <https://trac.macports.org/ticket/43582#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts