Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 743983

Summary: app-text/atril: Drop dev-util/gtk-doc and dev-build/gtk-doc-am dependencies
Product: Gentoo Linux Reporter: MW <spamfilter-1>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal CC: jstein, oz.tiram
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/17650
Whiteboard:
Package list:
Runtime testing required: ---

Description MW 2020-09-21 17:57:45 UTC
Please drop unnecessary dependencies for app-text/atril:
 - dev-util/gtk-doc
 - dev-util/gtk-doc-am
Comment 1 OzTiram 2020-09-24 07:34:13 UTC
As far as I can tell, these are still required to build atril.

First, configure.ac is still checking for gtk-doc:

https://github.com/mate-desktop/atril/blob/c71e8323088ef9326e655a21c269d71a62982459/configure.ac#L786

And for running the actual check it needs the macros supplied by the package.
If you try to build atril on a system without dev-util/gtk-doc-am you will see the following error:

$ ./autogen.sh 
/usr/bin/mate-autogen
/usr/bin/yelp-build
checking for autoreconf >= 2.53...
  testing autoreconf... found 2.69
checking for pkg-config >= 0.14.0...
  testing pkg-config... found 1.6.3
checking for gtk-doc >= 1.13...
  testing gtkdocize... found 1.32
Checking for required M4 macros...
  gtk-doc.m4 not found
***Error***: some autoconf macros required to build atril
  were not found in your aclocal path, or some forbidden
  macros were found.  Perhaps you need to adjust your
  ACLOCAL_FLAGS?
Comment 2 MW 2020-09-24 09:56:30 UTC
If I unmerge these dependencies and remove them from the atril ebuild, atril still builds fine.. This may or may not be consistent with theory, but works in practice.

Maybe we could have a doc use-flag that pulls these dependencies in for people who want litter in /usr/share/gtk-doc/html/atril/, but patch it away for ordinary users?
Comment 3 OzTiram 2020-09-24 13:49:29 UTC
>Maybe we could have a doc use-flag that pulls these dependencies in for people >who want litter in /usr/share/gtk-doc/html/atril/, but patch it away for ordinary >users?

Removing those dependencies isn't correct. They still have a use case.

That's what BDEPENDS is for. However, mate (and gnome) still have not changed to EAPI 7.

When this happens, the dependencies can be moved to BDEPENDS.


Until then, you can have a "doc" flag.

$ diff atril-1.24.0-r2.ebuild atril-1.24.0-r1.ebuild
18c18
< IUSE="caja dbus debug djvu doc dvi epub +introspection gnome-keyring +postscript t1lib tiff xps"
---
> IUSE="caja dbus debug djvu dvi epub +introspection gnome-keyring +postscript t1lib tiff xps"
65,68c65,66
< 	doc? (
< 		dev-util/gtk-doc
< 		dev-util/gtk-doc-am
< 	)
---
> 	dev-util/gtk-doc
> 	dev-util/gtk-doc-am
Comment 4 OzTiram 2020-09-24 14:01:14 UTC
Sorry, I omitted an important part of the patch:

 $ diff atril-1.24.0-r2.ebuild atril-1.24.0-r1.ebuild
11c11
< 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
---
> 	KEYWORDS="amd64 ~arm ~arm64 x86"
18c18
< IUSE="caja dbus debug djvu doc dvi epub +introspection gnome-keyring +postscript t1lib tiff xps"
---
> IUSE="caja dbus debug djvu dvi epub +introspection gnome-keyring +postscript t1lib tiff xps"
65,68c65,66
< 	doc? (
< 		dev-util/gtk-doc
< 		dev-util/gtk-doc-am
< 	)
---
> 	dev-util/gtk-doc
> 	dev-util/gtk-doc-am
92d89
< 		$(use_enable doc gtk-doc) \


With this patch, when you enable doc you'll see:

$ sudo USE=doc emerge -a =app-text/atril-1.24.0-r2::mate-de-gentoo

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-util/gtk-doc-am-1.32 
[ebuild  N     ] dev-util/gtk-doc-1.32-r2  USE="doc -debug -emacs" PYTHON_SINGLE_TARGET="python3_7 -python3_6" 
[ebuild     U ~] app-text/atril-1.24.0-r2 [1.24.0] USE="doc%*" 

Would you like to merge these packages? [Yes/No] 

>>> Verifying ebuild manifests
>>> Emerging (1 of 3) dev-util/gtk-doc-am-1.32::gentoo
...
>>> Emerging (2 of 3) dev-util/gtk-doc-1.32-r2::gentoo
>>> Emerging (3 of 3) app-text/atril-1.24.0-r2::gentoo
...
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile

Configure summary:

    GTK+ Unix Print.....:    yes
    Keyring Support.....:    no
    DBUS Support........:    yes
    Caja Plugin.........:    no
    Thumbnailer.........:    yes
    Previewer...........:    yes
    Gtk-Doc Support.....:    yes
    Debug mode..........:    no
    GObj. Introspection.:    yes
    Tests...............:    no

    PDF Backend.........:    yes
    PostScript Backend..:    yes
    TIFF Backend........:    no
    DJVU Backend........:    no
    DVI Backend.........:    no
    Pixbuf Backend......:    yes
    Comics Backend......:    yes
    XPS Backend.........:    no
    ePub Backend........:    no

    SyncTeX.............:    yes



Notice, Gtk-Doc-Support: yes.
Comment 5 Adam Feldman gentoo-dev 2020-10-09 22:13:46 UTC
We should definitely look at the deps (for the whole DE), but I am not sure that, based on:

(In reply to MW from comment #2)
> If I unmerge these dependencies and remove them from the atril ebuild, atril
> still builds fine.. This may or may not be consistent with theory, but works
> in practice.
> 
> Maybe we could have a doc use-flag that pulls these dependencies in for
> people who want litter in /usr/share/gtk-doc/html/atril/, but patch it away
> for ordinary users?

that you will get what you are expecting...  The eclass inherits from gnome2.eclass which calls EVERY configure with --disable-gtk-doc.  As such, the patch from Oz will toggle the deps, but won't achieve what I think you are stating is the desired outcome.  The files installed are pre-generated and come in the upstream release tarball.

And from a legacy comment in the ebuild:

> # Passing --disable-help would drop offline help, that would be inconsistent
> # with helps of the most of GNOME apps that doesn't require network for that.

We aren't killing off documentation via --disable-help because that would be inconsistent with how we handle every other MATE package.   I guess theoretically the build system could be patched to separate out user documentation from developer documentation, but I'd prefer to do that for all packages consistently... Wouldn't be high on my list of priorities, but I'd be happy to start a tracker bug and accept PRs for in the project repo ::gentoo-mate for it if someone wants to put in that effort.  If you look in the /usr/share/gtk-doc/html, there is documentation installed from quite a few MATE packages.
Comment 6 OzTiram 2024-04-11 08:03:56 UTC
This issue is fixed in 1.28.

 dev-util/gtk-doc
 dev-util/gtk-doc-am

Are only in BDEPENDS.