Created attachment 310237 [details] emerge --info Overall result: ebuild does not use libjasper even if properly installed on my system. As I see from following snippet of code from ebuild, ebuild should add "--with-jasper=system --without-openjpeg" to parameter list of configure script. And does not! if use jpeg2k; then myconf="--enable-jpeg" if hasv media-libs/jasper; then myconf="${myconf} --with-jasper=system --without-openjpeg" elif hasv media-libs/openjpeg; then myconf="${myconf} --without-jasper --with-openjpeg=system" fi else myconf="--disable-jpeg --without-jasper --without-openjpeg" fi In reality, it runs configure as follows: ./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --e nable-install-system-perl --with-perl-options=INSTALLDIRS=vendor --enable-fortran --enable-omp-packing --enable-python --enable-numpy --disable-static --with-netcdf=/usr --with-perl --with-png-support --enable-jpeg I suspect that this statement: ********************************** if hasv media-libs/jasper; then... ********************************** was meant by words: if there is a media-libs/jasper installed then... But, hasv() does not do that job... Here is, how the has(), hasv() is defined (in /usr/lib/portage/bin/isolated-functions.sh): hasv() { if has "$@" ; then echo "$1" return 0 fi return 1 } has() { local needle=$1 shift local x for x in "$@"; do [ "${x}" = "${needle}" ] && return 0 done return 1 }
Obviously this is the wrong way to go about it. Imagine you build a tbz2 on one host that has openjpeg installed, but then deploy the tbz2 on a system with jasper installed - the dependencies in RDEPEND would be met but the deployed package would be broken. The ebuild should have USE flags for those dependencies, and then probably define a REQUIRED_USE, and possibly a default USE to set a default dependency: REQUIRED_USE=( jpeg2k? ( ^^ ( jasper openjpeg ) ) ) Note that it also fails in src_configure() with USE=-netcdf when sci-libs/netcdf is not installed.
configure.ac says that when both are present, openjpeg is preferred and then goes on to entirely ignore the given configure options in favour of openjpeg. So there's a little more work to be done here.
Building without netcdf support should be set using --with-netcdf=none, configure.ac says.
Created attachment 310281 [details, diff] make openjpeg optional even if present
Created attachment 310283 [details, diff] hasty ebuild patch Not much time on my hands here, so someone should triple check this.
Package removed.