Summary: | app-office/gnucash: Add USE=gtk | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Reimundo Heluani <heluani> |
Component: | Current packages | Assignee: | Aaron W. Swenson <titanofold> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | gnome |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://bugzilla.gnome.org/show_bug.cgi?id=794617 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
patch on cmakefiles to compile without gnucash
changes in the ebuild to compile without gnucash Patch for version 3.2 CMAKE Files Ebuild for 3.2 Build log of 3.2 obscure failiure in the end. ebuild for 3.2 |
Created attachment 524936 [details, diff]
changes in the ebuild to compile without gnucash
IUSE=+gui would sound more appropriate to me, really. (In reply to Mart Raudsepp from comment #2) > IUSE=+gui would sound more appropriate to me, really. I agree, also, please forward your patch to upstream too -> bugzilla.gnome.org Thanks (In reply to Pacho Ramos from comment #3) > (In reply to Mart Raudsepp from comment #2) > > IUSE=+gui would sound more appropriate to me, really. > > I agree, also, please forward your patch to upstream too -> > bugzilla.gnome.org > > Thanks I have already opened a bug in https://bugzilla.gnome.org/show_bug.cgi?id=794617 Gnucash has moved their bugzilla and this bug is now tracked in https://bugs.gnucash.org/show_bug.cgi?id=794617 It seems that the compilation issues have been solved upstream. I would still recommend a gtk (or gui or whatever) use flag in the Gentoo ebuild. Would you redo this for 3.2? I think upstream has fixed the cmakefiles. I'll do a revbump with whatever changes are needed. (In reply to Mart Raudsepp from comment #2) > IUSE=+gui would sound more appropriate to me, really. (In reply to Aaron W. Swenson from comment #6) > Would you redo this for 3.2? I think upstream has fixed the cmakefiles. > > I'll do a revbump with whatever changes are needed. The fix upstream still does not work for me, I still need to get rid of the doc directory or CMAKE will complain about some file, so still need to apply part of the previous patch: diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e10a09..cdbdb7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -770,7 +770,9 @@ set(SCHEME_INSTALLED_CACHE_DIR ${PKGLIBDIR}/scm/ccache/${GUILE_EFFECTIVE_VERSION # The subdirectories add_subdirectory (borrowed) add_subdirectory (data) +if (WITH_GNUCASH) add_subdirectory (doc) +endif (WITH_GNUCASH) add_subdirectory (po) add_subdirectory (common) add_subdirectory (libgnucash) 3.2 builds fine with the attached ebuild. Unfortunately it fails in install without any descriptive error. This might be related to upgrading python yesterday here. I'm posting the build.log and the patch and ebuild for 3.2 that I used. (In reply to Aaron W. Swenson from comment #6) > Would you redo this for 3.2? I think upstream has fixed the cmakefiles. > > I'll do a revbump with whatever changes are needed. The fix upstream still does not work for me, I still need to get rid of the doc directory or CMAKE will complain about some file, so still need to apply part of the previous patch: diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e10a09..cdbdb7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -770,7 +770,9 @@ set(SCHEME_INSTALLED_CACHE_DIR ${PKGLIBDIR}/scm/ccache/${GUILE_EFFECTIVE_VERSION # The subdirectories add_subdirectory (borrowed) add_subdirectory (data) +if (WITH_GNUCASH) add_subdirectory (doc) +endif (WITH_GNUCASH) add_subdirectory (po) add_subdirectory (common) add_subdirectory (libgnucash) 3.2 builds fine with the attached ebuild. Unfortunately it fails in install without any descriptive error. This might be related to upgrading python yesterday here. I'm posting the build.log and the patch and ebuild for 3.2 that I used. Created attachment 544446 [details, diff]
Patch for version 3.2 CMAKE Files
Created attachment 544448 [details]
Ebuild for 3.2
Created attachment 544450 [details]
Build log of 3.2 obscure failiure in the end.
I think it should be default enabled, thus IUSE=+gui, not just gui. Why is gnome-common conditional to USE=gui? That makes no sense, given what gnome-common is. HOWEVER, it doesn't make any sense at all, as gnome-common ships some m4macro files, which are for autotools, but afaik, we use cmake here, so I suspect gnome-common as dep as a whole is redundant. Created attachment 544454 [details]
ebuild for 3.2
(In reply to Mart Raudsepp from comment #13) > I think it should be default enabled, thus IUSE=+gui, not just gui. > Why is gnome-common conditional to USE=gui? That makes no sense, given what > gnome-common is. HOWEVER, it doesn't make any sense at all, as gnome-common > ships some m4macro files, which are for autotools, but afaik, we use cmake > here, so I suspect gnome-common as dep as a whole is redundant. I think you're right, but I can't test it here, that's why I added that flag instead of removing gnome-common (which I didn't want to install anyway). Incidentally it was a stupid mistake on my part that prevented installing. Now it's working fine here 3.2 without gtk I'd remove it, it only ships m4, which even with autotools would be needed only if eautoreconf is ran The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37c1feba2c76814bb66da36d7fd8916396a99037 commit 37c1feba2c76814bb66da36d7fd8916396a99037 Author: Aaron W. Swenson <titanofold@gentoo.org> AuthorDate: 2018-08-29 10:47:53 +0000 Commit: Aaron W. Swenson <titanofold@gentoo.org> CommitDate: 2018-08-29 10:47:53 +0000 app-office/gnucash: Add option to disable GUI Thanks to Reimundo Heluani for working on this. Closes: https://bugs.gentoo.org/651200 Package-Manager: Portage-2.3.40, Repoman-2.3.9 app-office/gnucash/files/gnucash-3.2-no-gui.patch | 14 ++ app-office/gnucash/gnucash-3.2-r1.ebuild | 173 ++++++++++++++++++++++ app-office/gnucash/metadata.xml | 4 + 3 files changed, 191 insertions(+) What happened about comment #13 and #16? (In reply to Mart Raudsepp from comment #18) > What happened about comment #13 and #16? Eh, I thought the changes were already made. And, I've looked through the code now, gnome-common is mentioned anywhere. And, the functions provided by it aren't called either, so we can safely remove the dependency. I'm doing another revbump. revbump isn't necessary if it's just this change. It's a build time depend only and various other things would pull it in anyways, etc. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a01091ba11a5bbb94aebcb04bfee6c8df7b7de22 commit a01091ba11a5bbb94aebcb04bfee6c8df7b7de22 Author: Aaron W. Swenson <titanofold@gentoo.org> AuthorDate: 2018-09-02 10:58:50 +0000 Commit: Aaron W. Swenson <titanofold@gentoo.org> CommitDate: 2018-09-02 10:58:50 +0000 app-office/gnucash: Drop gnome-common, src_prepare The dependency on gnome-base/gnome-common turned out to be entirely unnecessary. There are no functions from that package that are needed by Gnucash’s build system. Drop the src_prepare and apply the no-gui.patch unconditionally. Whether it has an effect depends on the build flag being enabled. Bug: https://bugs.gentoo.org/651200 Closes: https://bugs.gentoo.org/664916 Package-Manager: Portage-2.3.40, Repoman-2.3.9 app-office/gnucash/gnucash-3.2-r2.ebuild | 169 +++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) |
Created attachment 524934 [details, diff] patch on cmakefiles to compile without gnucash gnucash comes with heavy required packages, specially webkit-gtk and gtk+. For those of us that have some gnucash databases and need to process them in systems without gtk (in particular no gnome nor webkit-gtk) it would be useful to have a way to install libgnucash without installing gnucash. upstream provides a way of compiling libgnucash and not gnucash with -DWITH_GNUCASH=NO. I've ran into some small compilation issues but I managed to get with minor changes on the ebuild a working system with libgnucash installed and not gnucash. I am attaching the diffs I used in case anyone is interested. These are certainly not production ebuilds since I just got rid of the docs (instead of solving for the missing gnucash.1 file that CMake would complain otherwise) and I got rid of scm-gnome-utils which I don't know if it will bite me later. But a little testing shows my scripts work parsing my gnucash databases.