Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 600970 - media-libs/opencv-3.1.0-r6 automagic dependencies app-text/tesseract
Summary: media-libs/opencv-3.1.0-r6 automagic dependencies app-text/tesseract
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amy Liffey
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-27 09:41 UTC by Frank Krömmelbein
Modified: 2016-11-27 16:35 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Krömmelbein 2016-11-27 09:41:42 UTC
1) opencv installed without tesseract useflag:
[ebuild   R   ~] media-libs/opencv-3.1.0-r6:0/3.1::gentoo  USE="contrib eigen ffmpeg gphoto2 jpeg opencl opengl openmp png python qt5 tiff v4l vaapi webp -contrib_cvv -contrib_hdf -contrib_sfm -cuda -examples -gdal -gflags -glog -gstreamer -gtk -ieee1394 (-ipp) -java -jpeg2k -libav -openexr (-pch) -tesseract -testprograms -threads -vtk -xine" PYTHON_TARGETS="python2_7 python3_4 -python3_5" 0 KiB

2) emerge app-text/tesseract

[ebuild  N     ] media-libs/leptonica-1.71-r1::gentoo  USE="gif jpeg png tiff webp zlib -jpeg2k -static-libs {-test} -utils" 0 KiB
[ebuild  N     ] app-text/tesseract-3.04.00-r2::gentoo  USE="jpeg opencl png scrollview tiff webp -doc -examples -osd -static-libs -training" L10N="de -ar -bg -ca -chr -cs -da -el -es -fi -fr -he -hi -hu -id -it -ja -ko -lt -lv -nl -no -pl -pt -ro -ru -sk -sl -sr -sv -th -tl -tr -uk -vi -zh-CN -zh-TW" 0 KiB

3) Rebuild media-libs/opencv

4) Remove app-text/tesseract and media-libs/leptonica

Result:
!!! existing preserved libs:
>>> package: app-text/tesseract-3.04.00-r2
 *  - /usr/lib64/libtesseract.so.3
 *  - /usr/lib64/libtesseract.so.3.0.4
 *      used by /usr/lib64/libopencv_text.so.3.1.0 (media-libs/opencv-3.1.0-r6)
>>> package: media-libs/leptonica-1.71-r1
 *  - /usr/lib64/liblept.so.4
 *  - /usr/lib64/liblept.so.4.0.2
 *      used by /usr/lib64/libtesseract.so.3 (preserved)
 *      used by /usr/lib64/libtesseract.so.3.0.4 (preserved)
Use emerge @preserved-rebuild to rebuild packages using these libraries
Comment 1 Michael Palimaka (kensington) gentoo-dev 2016-11-27 10:19:57 UTC
It looks like leptonica is only being preserved because it's used by tesseract.
Comment 2 Frank Krömmelbein 2016-11-27 10:56:37 UTC
(In reply to Michael Palimaka (kensington) from comment #1)
> It looks like leptonica is only being preserved because it's used by
> tesseract.

You're right Michael. I just checked it.
Comment 3 Amy Liffey gentoo-dev 2016-11-27 13:42:05 UTC
You are using experimental useflag "contrib"
(Install user contributed scripts from opencv_contrib (Experimental!))

This experimental useflag uses autodetect on your dependencies thus it is experimental. We are unfortunately not able to rewrite whole opencv_contrib repo to not use autodetect but patches are welcome.

Tesseract useflag only enables dependency on tesseract which ensures that tesseract is installed on your system.

Thank you.
Comment 4 Michael Palimaka (kensington) gentoo-dev 2016-11-27 13:47:23 UTC
What about building with -DCMAKE_DISABLE_FIND_PACKAGE_Tesseract=$(usex tesseract) ?
Comment 5 Amy Liffey gentoo-dev 2016-11-27 13:54:29 UTC
(In reply to Michael Palimaka (kensington) from comment #4)
> What about building with -DCMAKE_DISABLE_FIND_PACKAGE_Tesseract=$(usex
> tesseract) ?

Patches are welcome if it works for you :) It didnt work on version before.
Comment 6 Michael Palimaka (kensington) gentoo-dev 2016-11-27 16:35:05 UTC
(In reply to Michael Palimaka (kensington) from comment #4)
> What about building with -DCMAKE_DISABLE_FIND_PACKAGE_Tesseract=$(usex
> tesseract) ?

Sorry, that should say -DCMAKE_DISABLE_FIND_PACKAGE_Tesseract=$(usex !tesseract). Tests OK locally.