I think I tried that variation too and it was as if CONFIG_SOFT_FLOAT wasn't defined when the dependencies are calculated. I usally check the .packageinfo file to see what the enabled dependency config is. Strangely, I think the problem lies with CONFIG_SOFT_FLOAT itself and the order of config evaluation?

/ted
-----Original Message----- From: Alexandru Ardelean
Sent: Tuesday, August 29, 2017 2:50 PM
To: LEDE Development List ; Ted Hess
Subject: Re: [LEDE-DEV] Conditional dependencies in Makefiles

What if you do outside of the function def.

ifeq ($(CONFIG_SOFT_FLOAT),y)
     FLOAT_DEPENDS:= +PACKAGE_shine:shine
else
      FLOAT_DEPENDS+= +PACKAGE_lame-lib:lame-lib +PACKAGE_libx264:libx264
endif

and then

DEPENDS+=$(FLOAT_DEPENDS)

?



On Tue, Aug 29, 2017 at 9:34 PM, Sebastian Kemper <sebastian...@gmx.net> wrote:
On Tue, Aug 29, 2017 at 05:15:51PM +0000, Sebastian Kemper wrote:
Hi Ted,

Maybe a stupid idea, but is there a tab in front of the depends? Does
removing it help?

No, that doesn't help.

I remember trying to do something like this with PKG_BUILD_DEPENDS and
couldn't get it working either.

Maybe the best you can do is this:

define Package/libffmpeg-full
$(call Package/libffmpeg/Default)
 TITLE+= (full)
 DEPENDS+= @BUILD_PATENTED +alsa-lib +PACKAGE_libopus:libopus @!SOFT_FLOAT 
+PACKAGE_lame-lib:lame-lib +PACKAGE_libx264:libx264
 VARIANT:=full
endef

Downside would be no libffmpeg-full for SOFT_FLOAT setups, obviously :)

On another note, are you sure you want deps like these:

+PACKAGE_libopus:libopus?

According to https://wiki.openwrt.org/doc/devel/dependencies it means
that libopus will only get selected by libffmpeg-full if libopus is
enabled. I think

+PACKAGE_libffmpeg-full:libopus

is what you're after.

Regards,
Sebastian


Seb

Am 29. August 2017 19:08:11 MESZ schrieb Ted Hess
<th...@kitschensync.net>:
>Hi all -
>
>I have a package (ffmpeg) build problem which is trying to specify a
>different DEPENDS for soft-float systems and one for hard-float. The
>package definition is as follows:
>
>> define Package/libffmpeg-full $(call Package/libffmpeg/Default)
>>  TITLE+= (full)  DEPENDS+= @BUILD_PATENTED +alsa-lib
>> +PACKAGE_libopus:libopus  ifeq ($(CONFIG_SOFT_FLOAT),y)
>>         DEPENDS+= +PACKAGE_shine:shine  else         DEPENDS+=
>> +PACKAGE_lame-lib:lame-lib +PACKAGE_libx264:libx264  endif
>>  VARIANT:=full endef
>
>Thinking the 'ifeq', etc is not proper within a function definition,
>I have also tried:
>
>  DEPENDS+=$(if
>$(CONFIG_SOFT_FLOAT),+PACKAGE_shine:shine,+PACKAGE_lame- lib:lame-lib
>+PACKAGE_libx264:libx264)
>
>In both cases, the behavior is as if CONFIG_SOFT_FLOAT is not
>defined.
>
>Any help would be greatly appreciated.
>
>/ted
>
>
>_______________________________________________ Lede-dev mailing list
>Lede-dev@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/lede-dev

_______________________________________________ Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to