Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 586018 - media-sound/fmit: Free Music Instrument Tuner
Summary: media-sound/fmit: Free Music Instrument Tuner
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Proxy Maintainers
URL: http://gillesdegottex.github.io/fmit
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2016-06-15 13:10 UTC by Brendan Horan
Modified: 2016-06-22 00:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,1.07 KB, text/plain)
2016-06-15 13:11 UTC, Brendan Horan
Details
Manifest (Manifest,1.09 KB, text/plain)
2016-06-15 13:11 UTC, Brendan Horan
Details
metadata.xml (metadata.xml,430 bytes, text/xml)
2016-06-15 13:11 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,1.07 KB, text/plain)
2016-06-15 13:23 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,916 bytes, text/plain)
2016-06-16 01:38 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,908 bytes, text/plain)
2016-06-16 03:09 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,972 bytes, text/plain)
2016-06-16 04:06 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,961 bytes, text/plain)
2016-06-16 04:07 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,915 bytes, text/plain)
2016-06-16 05:01 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,914 bytes, text/plain)
2016-06-16 05:02 UTC, Brendan Horan
Details
Manifest (Manifest,1.10 KB, text/plain)
2016-06-16 05:03 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,1.14 KB, text/plain)
2016-06-17 13:26 UTC, Brendan Horan
Details
Manifest (Manifest,1.83 KB, text/plain)
2016-06-17 13:27 UTC, Brendan Horan
Details
metadata.xml (metadata.xml,362 bytes, text/xml)
2016-06-17 13:28 UTC, Brendan Horan
Details
fmit-1.0.15-main.cpp.patch (fmit-1.0.15-main.cpp.patch,759 bytes, patch)
2016-06-17 13:28 UTC, Brendan Horan
Details | Diff
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,1.26 KB, text/plain)
2016-06-18 02:48 UTC, Brendan Horan
Details
Manifest (Manifest,1.83 KB, text/plain)
2016-06-18 02:49 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,1.63 KB, text/plain)
2016-06-20 05:15 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,1.63 KB, text/plain)
2016-06-20 05:17 UTC, Brendan Horan
Details
Manifest (Manifest,1.83 KB, text/plain)
2016-06-20 05:18 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,1.65 KB, text/plain)
2016-06-20 05:46 UTC, Brendan Horan
Details
Manifest (Manifest,1.45 KB, text/plain)
2016-06-20 05:46 UTC, Brendan Horan
Details
Manifest (Manifest,1.10 KB, text/plain)
2016-06-20 06:05 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,1.63 KB, text/plain)
2016-06-21 03:39 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,1.63 KB, text/plain)
2016-06-21 05:11 UTC, Brendan Horan
Details
fmit-1.0.15.ebuild (fmit-1.0.15.ebuild,1.63 KB, text/plain)
2016-06-21 05:11 UTC, Brendan Horan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Horan 2016-06-15 13:10:10 UTC
FMIT is a graphical utility for tuning your musical instruments, with error
and volume history and advanced features like microtonal tuning, statistics,
and various views like waveform shape, harmonics ratios and real-time Discrete
Fourier Transform (DFT). All views and advanced features are optional so that
the interface can also be very simple.
Comment 1 Brendan Horan 2016-06-15 13:10:40 UTC
This will replace bug 176790
Comment 2 Brendan Horan 2016-06-15 13:11:14 UTC
Created attachment 437644 [details]
fmit-1.0.15.ebuild
Comment 3 Brendan Horan 2016-06-15 13:11:29 UTC
Created attachment 437646 [details]
Manifest
Comment 4 Brendan Horan 2016-06-15 13:11:40 UTC
Created attachment 437648 [details]
metadata.xml
Comment 5 Brendan Horan 2016-06-15 13:16:29 UTC
A lot has changes since the last ebuikd in bug  176790

* dependencies changed 
* build system changed
* project home page changed
* SRC_URI changed
Comment 6 Brendan Horan 2016-06-15 13:23:05 UTC
Created attachment 437650 [details]
fmit-1.0.15.ebuild

fixed dev-qt/qtsvg in DEPEND
Comment 7 Brendan Horan 2016-06-15 23:25:55 UTC
I will also proxy-maint this ebuild.
Comment 8 Brendan Horan 2016-06-15 23:30:17 UTC
As pointed out by gokturk on IRC, the license I have is not exactly correct :
Most of the programming code is under GPL (v2) License and 
Copyright © 2004 Gilles Degottex, and under LGPL (v2) License, otherwise.
Comment 9 Coacher 2016-06-15 23:52:49 UTC
Note to proxy-maint: most likely no maintainership request/maintainer bug is needed here as Brendan is on his way to become a dev, see bug #584840.
Comment 10 Brendan Horan 2016-06-16 01:38:01 UTC
Created attachment 437688 [details]
fmit-1.0.15.ebuild

Attaching updated ebuild.
Fixed :
* License 
* cleaned up DEPEND/RDPEND
Comment 11 Brendan Horan 2016-06-16 03:09:15 UTC
Created attachment 437692 [details]
fmit-1.0.15.ebuild

Removed unneeded eutils class and removed a blank line.
Comment 12 Sam Jorna (wraeth) gentoo-dev 2016-06-16 03:20:23 UTC
There are a few further issues with this ebuild that will need to be resolved before it can be committed:

- SRC_URI downloads to "v1.0.15.tar.gz" rather than package name. This should be avoided and the downloaded distfile can be renamed with the "-> ${P}.tar.gz" operator in SRC_URI. [0]

- DEPEND adds itself to DEPEND (`DEPEND="${DEPEND}"`) - is this intended?

- Is dev-qt/qtsvg a build-time-only dependency - can the application run if this is later uninstalled?

- The variable "config" in src_configure() should arguably be made local.

- I am also getting all builds failing when testing in a minimal test environment. The failure message is "Project ERROR: Unknown module(s) in QT: opengl".

[0] https://devmanual.gentoo.org/ebuild-writing/variables/index.html#src_uri
Comment 13 Brendan Horan 2016-06-16 04:05:45 UTC
> - SRC_URI downloads to "v1.0.15.tar.gz" rather than package name. This
> should be avoided and the downloaded distfile can be renamed with the "->
> ${P}.tar.gz" operator in SRC_URI. [0]
Fixed.

> 
> - DEPEND adds itself to DEPEND (`DEPEND="${DEPEND}"`) - is this intended?
No its my mistake, this is now fixed.

> 
> - Is dev-qt/qtsvg a build-time-only dependency - can the application run if
> this is later uninstalled?
Yep, tested it a few times here.

> - The variable "config" in src_configure() should arguably be made local.
Unsure how best to do this, using local myconf=() gives me :
"use() calls are not allowed in global scope"
I would say blame me at this point ;)

> 
> - I am also getting all builds failing when testing in a minimal test
> environment. The failure message is "Project ERROR: Unknown module(s) in QT:
> opengl".
> 
> [0] https://devmanual.gentoo.org/ebuild-writing/variables/index.html#src_uri
Fixed, added "dev-qt/qtopengl:5"
Comment 14 Brendan Horan 2016-06-16 04:06:39 UTC
Created attachment 437704 [details]
fmit-1.0.15.ebuild

Fixes for comment 12.
Comment 15 Brendan Horan 2016-06-16 04:07:48 UTC
Created attachment 437706 [details]
fmit-1.0.15.ebuild
Comment 16 Brendan Horan 2016-06-16 05:01:44 UTC
Created attachment 437712 [details]
fmit-1.0.15.ebuild

put stuff into local, as discussed with wreath on IRC.
Comment 17 Brendan Horan 2016-06-16 05:02:52 UTC
Created attachment 437714 [details]
fmit-1.0.15.ebuild
Comment 18 Brendan Horan 2016-06-16 05:03:42 UTC
Created attachment 437716 [details]
Manifest

Updated Manifest
Comment 19 Göktürk Yüksek archtester gentoo-dev 2016-06-16 06:41:31 UTC
- dev-qt/qtsvg:5 is a runtime dependency even though both ldd and scanelf have false negatives on this. I've personally ran the binary with and without qtsvg and the app icon does not show up without it.

- we should make sure that the translation files are being picked up properly. the debug message on the console reads:
    INFO: Loading FMIT translation file: fmit_en_US in /var/tmp/portage/media-sound/fmit-1.0.15/image/share/fmit/tr
  which points to a location that does not exist post-merge.

- we should investigate why the following debug message is printed:
  QIODevice::read (QFile, ":/README.txt"): device not open
Comment 20 Göktürk Yüksek archtester gentoo-dev 2016-06-16 21:57:00 UTC
(In reply to Göktürk Yüksek from comment #19)
> - dev-qt/qtsvg:5 is a runtime dependency even though both ldd and scanelf
> have false negatives on this.

To clarify my comment: it's not that the tools are not working as they are supposed to. the library is indirectly required during runtime which these tools are not designed to detect.
Comment 21 Brendan Horan 2016-06-17 08:45:26 UTC
- we should make sure that the translation files are being picked up properly.

Not sure how best to resolve this atm.

I pass "PREFIX=" to eqmake5 otherwise I get sandbox violations.
However when I do this the app seems to end up with that path hard coded.
Files get installed correctly via the src_install() function however.
Comment 22 Brendan Horan 2016-06-17 11:06:26 UTC
(In reply to Brendan Horan from comment #21)
> - we should make sure that the translation files are being picked up
> properly.
> 
> Not sure how best to resolve this atm.
> 
> I pass "PREFIX=" to eqmake5 otherwise I get sandbox violations.
> However when I do this the app seems to end up with that path hard coded.
> Files get installed correctly via the src_install() function however.

OK I think I know whats going on.
It may be a bug/issue with upstream 

So in "src/main.cpp"

We have this :
QString fmitprefix(STR(PREFIX));

That pulls in PREFIX from the ebuild "PREFIX="${D}"/usr"

Then the translation path is set via :
QString trPath = fmitprefix + QString("/share/fmit/tr");

So that sends up been :
/var/tmp/portage/media-sound/fmit-1.0.15/image//usr/share/fmit/tr/fmit_en.ts


So now I know WHY and HOW, but no idea how to fix this.
Comment 23 Brendan Horan 2016-06-17 13:26:40 UTC
Created attachment 437836 [details]
fmit-1.0.15.ebuild

Fixed the following :

- dev-qt/qtsvg:5 is a runtime dependency
FIXED

- we should make sure that the translation files are being picked up properly. 
Fixed, with patch


- we should investigate why the following debug message is printed:
  QIODevice::read (QFile, ":/README.txt"): device not open
Fixed, with patch
Comment 24 Brendan Horan 2016-06-17 13:27:36 UTC
Created attachment 437838 [details]
Manifest

Regenerated Mainfest in thin format.
Comment 25 Brendan Horan 2016-06-17 13:28:14 UTC
Created attachment 437840 [details]
metadata.xml

Removed unneeded line from metadata
Comment 26 Brendan Horan 2016-06-17 13:28:45 UTC
Created attachment 437842 [details, diff]
fmit-1.0.15-main.cpp.patch

Adding patch
Comment 27 Brendan Horan 2016-06-17 13:34:54 UTC
Please excuse any messed up tab indents, my vim is hating me.
Comment 28 Göktürk Yüksek archtester gentoo-dev 2016-06-17 14:42:07 UTC
We might wanna sed the sources instead of hardcoding it. you'll have to keep updating the patch for every version otherwise. also, '/usr/share/doc/1.0.15/README.txt' is missing ${PN}. Normally we use ${PF} here (meaning with the revisions if there are any).

QString fmitprefix(STR(/usr)); also looks strange, you sure it's not STR("/usr") as opposed to STR(/usr) ?
Comment 29 Brendan Horan 2016-06-18 02:48:48 UTC
Created attachment 437906 [details]
fmit-1.0.15.ebuild

-> We might wanna sed the sources instead of hardcoding it. 
Fixed, dropped the patch used sed.

-> '/usr/share/doc/1.0.15/README.txt' is missing ${PN}. Normally we use ${PF} here -(meaning with the revisions if there are any).
FIXED

-> QString fmitprefix(STR(/usr)); also looks strange, you sure it's not STR("/usr") as opposed to STR(/usr) ?
FIXED
Comment 30 Brendan Horan 2016-06-18 02:49:13 UTC
Created attachment 437908 [details]
Manifest

Regenerated Manifest
Comment 31 Göktürk Yüksek archtester gentoo-dev 2016-06-19 01:16:31 UTC
Missing '|| die' on sed statements.

For the first sed, you can remove the double quotes around ${PF}, bash performs parameter expansion inside "".

For the second sed, you can remove escaping the double quotes around /usr by containing the whole thing in single wholes. i.e. " \"foo\" " vs. ' "foo" '.

Let's get single line comments before each sed for some little explanation.
Comment 32 nvinson234 2016-06-19 04:37:32 UTC
The line
> sed -i "/QString fmitprefix/c\QString fmitprefix(STR(\"/usr\"));" src/main.cpp
needs to be changed to
> sed -i "/QString fmitprefix/c\QString fmitprefix(STR(usr));" src/main.cpp || die
Otherwise, fmit will generate incorrect paths (as evident from the strace snippet below):

> 3654  write(1, "INFO: Loading FMIT translation file: fmit_en_US in \"/usr\"/share/fmit/tr\n", 72) = 72                
> 3654  access("\"/usr\"/share/fmit/tr/fmit_en_US.qm", R_OK) = -1 ENOENT (No such file or directory)
> 3654  access("\"/usr\"/share/fmit/tr/fmit_en_US", R_OK) = -1 ENOENT (No such file or directory)
> 3654  access("\"/usr\"/share/fmit/tr/fmit_en.qm", R_OK) = -1 ENOENT (No such file or directory)                       
> 3654  access("\"/usr\"/share/fmit/tr/fmit_en", R_OK) = -1 ENOENT (No such file or directory)
> 3654  access("\"/usr\"/share/fmit/tr/fmit.qm", R_OK) = -1 ENOENT (No such file or directory)                          
> 3654  access("\"/usr\"/share/fmit/tr/fmit", R_OK) = -1 ENOENT (No such file or directory)
Unfortunately, even with this correction, fmit still fails to load the translation file (strace output below):

> 1737  write(1, "INFO: Loading FMIT translation file: fmit_en_US in /usr/share/fmit/tr\n", 70) = 70                    
> 1737  access("/usr/share/fmit/tr/fmit_en_US.qm", R_OK) = -1 ENOENT (No such file or directory) 
> 1737  access("/usr/share/fmit/tr/fmit_en_US", R_OK) = -1 ENOENT (No such file or directory)
> 1737  access("/usr/share/fmit/tr/fmit_en.qm", R_OK) = -1 ENOENT (No such file or directory)
> 1737  access("/usr/share/fmit/tr/fmit_en", R_OK) = -1 ENOENT (No such file or directory)
> 1737  access("/usr/share/fmit/tr/fmit.qm", R_OK) = -1 ENOENT (No such file or directory)
> 1737  access("/usr/share/fmit/tr/fmit", R_OK) = -1 ENOENT (No such file or directory)

and this may be due to the fact that 'lrelease fmit.pro' isn't called prior to calling eqmake5 as mentioned in upstream's closed bug #38 (https://github.com/gillesdegottex/fmit/issues/38).
Comment 33 Brendan Horan 2016-06-20 05:15:37 UTC
Created attachment 438072 [details]
fmit-1.0.15.ebuild

New ebuild fixes the following :
* Translations now generated (lrelease)
* Prefix path for translations fixed in main.cpp
* Prefix path in MicrotonalView.cpp fixed
* Comments added for each sed to explain
* || die was added when needed
* Quotes in first sed statement removed around ${PF}
* second sed statement was adjusted, no longer need to quote anything
Comment 34 Brendan Horan 2016-06-20 05:17:12 UTC
Created attachment 438074 [details]
fmit-1.0.15.ebuild

New ebuild fixes the following :
* Translations now generated (lrelease)
* Prefix path for translations fixed in main.cpp
* Prefix path in MicrotonalView.cpp fixed
* Comments added for each sed to explain
* || die was added when needed
* Quotes in first sed statement removed around ${PF}
* second sed statement was adjusted, no longer need to quote anything
Comment 35 Brendan Horan 2016-06-20 05:18:35 UTC
Created attachment 438076 [details]
Manifest

Recreated Manifest
Comment 36 Brendan Horan 2016-06-20 05:46:04 UTC
Created attachment 438078 [details]
fmit-1.0.15.ebuild

Need build time dependency of dev-qt/qtchooser , updated ebuild
Comment 37 Brendan Horan 2016-06-20 05:46:26 UTC
Created attachment 438080 [details]
Manifest

Updated manifest
Comment 38 Brendan Horan 2016-06-20 06:05:00 UTC
Created attachment 438082 [details]
Manifest

Cleaned up Manifest
Comment 39 Brendan Horan 2016-06-21 03:39:23 UTC
Created attachment 438234 [details]
fmit-1.0.15.ebuild

kensington via IRC gave advise not to depend on qtchooser, but rather qtcore.
I've fixed that.
I will generate Manifest once the ebuild gets a dev OK.
Comment 40 Brendan Horan 2016-06-21 05:11:24 UTC
Created attachment 438236 [details]
fmit-1.0.15.ebuild

fixed typo.
Comment 41 Brendan Horan 2016-06-21 05:11:47 UTC
Created attachment 438238 [details]
fmit-1.0.15.ebuild
Comment 42 Göktürk Yüksek archtester gentoo-dev 2016-06-21 14:13:00 UTC
This is merged in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11775bd71064f465aac6822dd358a5a9e5fb4f9d. Thanks for your contribution!

For your information, here is what I did on top of your attachments:
- added missing dep media-libs/freeglut, referenced in
    src/modules/GLFT.cpp:440: glutBitmapCharacter(GLUT_BITMAP_HELVETICA_10, (unsigned char)str[i]);
- Replaced eapply_user with default for future convenience. This allows you to add patches with PATCHES=() without ever touching src_prepare()
- Prefixed lrelease with $(qt5_get_bindir)/ (thanks to username234)
- Updated HOMEPAGE to https
- Removed trailing whitespaces
Comment 43 Brendan Horan 2016-06-22 00:16:55 UTC
(In reply to Göktürk Yüksek from comment #42)
> This is merged in
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=11775bd71064f465aac6822dd358a5a9e5fb4f9d. Thanks for your contribution!
> 
> For your information, here is what I did on top of your attachments:
> - added missing dep media-libs/freeglut, referenced in
>     src/modules/GLFT.cpp:440: glutBitmapCharacter(GLUT_BITMAP_HELVETICA_10,
> (unsigned char)str[i]);
> - Replaced eapply_user with default for future convenience. This allows you
> to add patches with PATCHES=() without ever touching src_prepare()
> - Prefixed lrelease with $(qt5_get_bindir)/ (thanks to username234)
> - Updated HOMEPAGE to https
> - Removed trailing whitespaces

Thanks for the help Göktürk Yüksek. (and others)

As discussed via IRC  freeglut is no longer a dependency :
https://github.com/gillesdegottex/fmit/releases

I will fix upstream and than fix ebuild via a rebump/PR later on.

thanks