Add workrave package and its dependencies#7753
Add workrave package and its dependencies#7753scheibelp merged 6 commits intospack:developfrom pozulp:package/workrave
Conversation
| depends_on('m4', type='build') | ||
|
|
||
| depends_on('libx11') | ||
| depends_on('py-cheetah') |
There was a problem hiding this comment.
Python packages are usually type=('build', 'run') dependencies.
|
Just a few flake8 warnings: If you have flake8 installed locally, you can run |
|
Thanks @adamjstewart for letting me know about |
|
No problem! If you haven't seen it already, our Contribution Guide explains things like flake8 and unit tests pretty well. |
|
@adamjstewart, I did not know there was a Contribution Guide, thanks for letting me know! |
| specs = self.spec.traverse(root=False) | ||
| pkgconfdirs = ['%s/pkgconfig' % s.prefix.lib | ||
| for s in specs if not s.external] | ||
| return ['PKG_CONFIG_PATH=%s' % ':'.join(pkgconfdirs)] |
There was a problem hiding this comment.
@mmpozulp build_environment already aggregates this into a PKG_CONFIG_PATH environment variable so you should be able to just say PKG_CONFIG_PATH=$PKG_CONFIG_PATH.
… automatically for dependencies which create a lib/pkgconfig in their install dir
|
@scheibelp you're right, I committed the fix. Turns out I don't need to set PKG_CONFIG_PATH myself, and I can't figure out why I did it in the first place. |
tgamblin
left a comment
There was a problem hiding this comment.
@mmpozulp: looks good! One last question: are the patches and other files in here available from someplace reliable? Could they be URL-fetched patches, or resources instead of included directly in Spack?
|
@tgamblin Sadly, no. But here's some information for anyone from the future who happens to come across this issue.
Of the .patch files and .m4 files in the workrave package dir, which are all my creation, those with URLs in comments in
The only .patch file in the glibmm package dir is of my creation. I couldn't find an associated bug documented anywhere. I looked in these places: |
| @@ -0,0 +1,980 @@ | |||
| # =========================================================================== | |||
| # https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html | |||
There was a problem hiding this comment.
@mmpozulp This looks to be available at http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_cxx_compile_stdcxx.m4;hb=579023fd0623be745c643faca62c95adab584325 as part of a git repositorygit://git.savannah.gnu.org/autoconf-archive.git. Would you be able to manage this as a resource?
There was a problem hiding this comment.
Done. Updating my PR asap.
|
|
||
| homepage = "https://pypi.python.org/pypi/Cheetah/2.4.4" | ||
| url = """\ | ||
| https://pypi.python.org/packages/b4/18\ |
There was a problem hiding this comment.
@mmpozulp If I try to visit https://files.pythonhosted.org/packages/b4/18a9b2f0f09e99024f4a9ea1ab80b6807aaecb7d1552529ea3590ad3d7bc93/Cheetah-2.3.0.tar.gz I'm getting a "file not found error", perhaps this has updated since the PR was opened?
EDIT: sorry this URL is fine, I copied it incorrectly.
There was a problem hiding this comment.
There was a problem hiding this comment.
Ah and that URL format would be better for Spack's version substitution as well (e.g. if more versions of py-cheetah were added)
There was a problem hiding this comment.
Also, there's no need to wrap long URLs onto multiple lines. We ignore URLs in our flake8 line-length checks.
There was a problem hiding this comment.
I used @adamjstewart's url and made it a single line. Thanks for reminder about flake8 skipping URLs.
| """Handle glibmm's version-based custom URLs.""" | ||
| url = "https://ftp.acc.umu.se/pub/GNOME/sources/glibmm" | ||
| ext = '.tar.gz' if version < Version('2.28.2') else '.tar.xz' | ||
| return url + "/%s/glibmm-%s%s" % (version.up_to(2), version, ext) |
There was a problem hiding this comment.
For all of these packages that override url_for_version, do you actually need all of these old versions where the extension differs, or do you only care about the latest release? We'll still need to override url_for_version because of the version.up_to(2), but we could drop a line from the function.
There was a problem hiding this comment.
Yes, the only workrave spec that I have been successful building involves the older versions which use the .tar.xz extension. That's because I'm using my system (RHEL7) glib as an 'external', and glibmm, which is c++ wrappers for glib, needs to be approximately as old as my system glib to get past pkg-config tests of the glib version during configure.
…ix ImportError: No module named site (issue #6968)
| patch('add_time_header.patch') | ||
|
|
||
| # removes call to missing glimm api function | ||
| patch('signal_size_changed.patch', when='@1.10.0') |
There was a problem hiding this comment.
@mmpozulp I'm having trouble finding other instances of this. As far as you know, has this only happened on your system? If so, do you have a notion of why? I'm concerned this means that something is missing or some component needs to be enabled that currently isn't
There was a problem hiding this comment.
@scheibelp I'm comfortable deleting this patch. It's only necessary when building the workrave tarball that comes from sourceforge (which was what I encountered first when googling for workrave, but am no longer using). Since then I discovered a workrave repo on github. I am using the github repo as the package url, not the sourceforge url, partly because of issues like this. The sourceforge tarball src calls nonexistent functions, like Gtk::StatusIcon::property_embedded(). I looked for it in several versions of gtkmm and couldn't find it.
There was a problem hiding this comment.
Got it - I will wait for that update. Are the other custom patches similarly resolved by changing the source?
There was a problem hiding this comment.
No. I just tried commenting-out the other 3 patch() calls one-at-a-time and each resulted in an error:
#patch('add_time_header.patch') >> 829 DayTimePred.cc:136:9: error: use of undeclared identifier 'localtime'
830 ret = localtime(&last_time);#patch('dont_get_widget.patch') >> 2631 ../../plugin/statistics/gtkmm/src/StatisticsDialog.cc:731:12: error: no member named 'get_widget_for_response' in 'Gtk::MessageDialog'
2632 mb_ask.get_widget_for_response( Gtk::RESPONSE_NO )->grab_default();#patch('no_gettext.patch') >> 393 config.status: error: po/Makefile.in.in was not created by intltoolize.Thus, I will leave in the remaining 3 workrave patches.
…ourceforge workrave tarball, but not for the github releases
Patches available from URLs have been updated accordingly
|
Thanks! |
Workrave is a program that assists in the recovery and prevention of Repetitive Strain Injury (RSI). The program frequently alerts you to take micro-pauses, rest breaks and restricts you to your daily limit. The program runs on GNU/Linux and Microsoft Windows.