Speech-Recognizer-SPX fails to emerge when called through g-cpan.
Steps to Reproduce:
1.g-cpan -i Speech-Recognizer-SPX
# g-cpan -i Speech-Recognizer-SPX
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Fri, 31 Aug 2007 08:37:00 GMT
Strange distribution name [Speech-Recognizer-SPX]
* g-cpan: Ebuild already exists for Speech-Recognizer-SPX
Calculating dependencies \
>>> Verifying ebuild Manifests...
>>> Emerging (1 of 1) perl-gcpan/Speech-Recognizer-SPX-0.0801 to /
* Speech-Recognizer-SPX-0.0801.tar.gz MD5 ;-) ... [ ok ]
* Speech-Recognizer-SPX-0.0801.tar.gz RMD160 ;-) ... [ ok ]
* Speech-Recognizer-SPX-0.0801.tar.gz SHA1 ;-) ... [ ok ]
* Speech-Recognizer-SPX-0.0801.tar.gz SHA256 ;-) ... [ ok ]
* Speech-Recognizer-SPX-0.0801.tar.gz size ;-) ... [ ok ]
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
* checking Speech-Recognizer-SPX-0.0801.tar.gz ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking Speech-Recognizer-SPX-0.0801.tar.gz to /var/tmp/portage/perl-gcpan/Speech-Recognizer-SPX-0.0801/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/perl-gcpan/Speech-Recognizer-SPX-0.0801/work/Speech-Recognizer-SPX-0.0801 ...
* Using ExtUtils::MakeMaker
No Sphinx2 installation could be found in any of the following
Please specify the --prefix option used to configure Sphinx2 on the
command-line for 'perl Makefile.PL" like this:
$ perl Makefile.PL --sphinx-prefix=/path/where/you/installed/it
If you are unsure where this is, ask your system administrator,
or whoever installed Sphinx2 on your system.
!!! ERROR: perl-gcpan/Speech-Recognizer-SPX-0.0801 failed.
ebuild.sh, line 1615: Called dyn_compile
ebuild.sh, line 972: Called qa_call 'src_compile'
ebuild.sh, line 44: Called src_compile
ebuild.sh, line 1305: Called perl-module_src_compile
perl-module.eclass, line 136: Called perl-module_src_prep
perl-module.eclass, line 125: Called die
!!! Unable to build! (are you using USE="build"?)
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/perl-gcpan/Speech-Recognizer-SPX-0.0801/temp/build.log'.
!!! This ebuild is from an overlay: '/usr/local/portage'
Speech-Recognizer-SPX should detect the previously emerged sphinx2 package and install correctly.
Of course, sphinx2 has already been emerged.
I am using:
A quick solution was to edit /usr/local/portage/perl-gcpan/Speech-Recognizer-SPX/Speech-Recognizer-SPX-0.0801.ebuild
It emerged successfully but this is probably not the right way to do it.
A year later I'm still getting the same error.
One has to emerge with the following command (version 0.0801 for sphinx2):
# myconf="--sphinx-prefix=/usr" emerge -pv Speech-Recognizer-SPX
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] perl-gcpan/Speech-Recognizer-SPX-0.0801 0 kB 
I haven't tried version 0.09 with pocketsphinx (which isn't in portage anyway).
There's no way g-cpan can handle every special case of external deps in perl modules. I've committed dev-perl/Speech-Recognizer-SPX-0.0801 to the tree instead for you.