[4/4] cairo: Add pkgconfig for opengl support

Message ID 20170809141922.2603-4-raj.khem@gmail.com
State New
Headers show
Series
  • [1/4] musl: Drop the protected symbol optimization at configure time
Related show

Commit Message

Khem Raj Aug. 9, 2017, 2:19 p.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta/recipes-graphics/cairo/cairo.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.14.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Andre McCurdy Aug. 9, 2017, 3:41 p.m. | #1
On Wed, Aug 9, 2017 at 7:19 AM, Khem Raj <raj.khem@gmail.com> wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>


Any explanation? Was this previously non-deterministic? If so, how far
back does the problem go?

> ---

>  meta/recipes-graphics/cairo/cairo.inc | 4 +++-

>  1 file changed, 3 insertions(+), 1 deletion(-)

>

> diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc

> index 8e1e2e1b88..fd376951bd 100644

> --- a/meta/recipes-graphics/cairo/cairo.inc

> +++ b/meta/recipes-graphics/cairo/cairo.inc

> @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"

>  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"

>

>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \

> -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"

> +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \

> +           ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"

>

>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"

>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"

> @@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"

>  PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"

>  PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"

>  PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"

> +PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"


Since the opengl distro feature can imply either OpenGL or OpenGL ES
support, it doesn't seem right to use it to select one over the other
(ie for recipes which support both, shouldn't the choice between
OpenGL or OpenGL ES be independent of the opengl distro feature) ?

>

>  #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points

>  require cairo-fpu.inc

> --

> 2.14.0

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Aug. 9, 2017, 6:11 p.m. | #2
On 8/9/17 8:41 AM, Andre McCurdy wrote:
> On Wed, Aug 9, 2017 at 7:19 AM, Khem Raj <raj.khem@gmail.com> wrote:

>> Signed-off-by: Khem Raj <raj.khem@gmail.com>

> 

> Any explanation? Was this previously non-deterministic? If so, how far

> back does the problem go?


it isnt non-deterministic atleast not after RSS. However, we need this
enabled when we have openGL/X11 enabled.

> 

>> ---

>>  meta/recipes-graphics/cairo/cairo.inc | 4 +++-

>>  1 file changed, 3 insertions(+), 1 deletion(-)

>>

>> diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc

>> index 8e1e2e1b88..fd376951bd 100644

>> --- a/meta/recipes-graphics/cairo/cairo.inc

>> +++ b/meta/recipes-graphics/cairo/cairo.inc

>> @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"

>>  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"

>>

>>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \

>> -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"

>> +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \

>> +           ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"

>>

>>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"

>>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"

>> @@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"

>>  PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"

>>  PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"

>>  PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"

>> +PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"

> 

> Since the opengl distro feature can imply either OpenGL or OpenGL ES

> support, it doesn't seem right to use it to select one over the other

> (ie for recipes which support both, shouldn't the choice between

> OpenGL or OpenGL ES be independent of the opengl distro feature) ?


at some point we differentiated between opengl and gles at distro level
atleast for RDK, but I agree that marking opengl as a distro feature
encompassing all OpenGL implementations is better. Although, in this
particular case all openGL implementations can be enabled simultaneously
so may be we can enable egl and gles too with same knob. Alternatively
We can leave the packageconfig knob disabled which will make it same
defaults effectively ( which is disabled)

> 

>>

>>  #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points

>>  require cairo-fpu.inc

>> --

>> 2.14.0

>>

>> --

>> _______________________________________________

>> Openembedded-core mailing list

>> Openembedded-core@lists.openembedded.org

>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Burton, Ross Aug. 9, 2017, 6:16 p.m. | #3
Breaks the no-x11 builder:
https://autobuilder.yoctoproject.org/main/builders/nightly-no-x11/builds/543/steps/BuildImages/logs/stdio

Ross

On 9 August 2017 at 19:11, Khem Raj <raj.khem@gmail.com> wrote:

> On 8/9/17 8:41 AM, Andre McCurdy wrote:

> > On Wed, Aug 9, 2017 at 7:19 AM, Khem Raj <raj.khem@gmail.com> wrote:

> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>

> >

> > Any explanation? Was this previously non-deterministic? If so, how far

> > back does the problem go?

>

> it isnt non-deterministic atleast not after RSS. However, we need this

> enabled when we have openGL/X11 enabled.

>

> >

> >> ---

> >>  meta/recipes-graphics/cairo/cairo.inc | 4 +++-

> >>  1 file changed, 3 insertions(+), 1 deletion(-)

> >>

> >> diff --git a/meta/recipes-graphics/cairo/cairo.inc

> b/meta/recipes-graphics/cairo/cairo.inc

> >> index 8e1e2e1b88..fd376951bd 100644

> >> --- a/meta/recipes-graphics/cairo/cairo.inc

> >> +++ b/meta/recipes-graphics/cairo/cairo.inc

> >> @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"

> >>  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"

> >>

> >>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11',

> 'x11 xcb', '', d)} \

> >> -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"

> >> +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \

> >> +           ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"

> >>

> >>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no

> --disable-xlib,${X11DEPENDS}"

> >>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"

> >> @@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] = "--enable-directfb=yes,,

> directfb"

> >>  PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--

> disable-valgrind,valgrind"

> >>  PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"

> >>  PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-

> glesv2,virtual/libgles2"

> >> +PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"

> >

> > Since the opengl distro feature can imply either OpenGL or OpenGL ES

> > support, it doesn't seem right to use it to select one over the other

> > (ie for recipes which support both, shouldn't the choice between

> > OpenGL or OpenGL ES be independent of the opengl distro feature) ?

>

> at some point we differentiated between opengl and gles at distro level

> atleast for RDK, but I agree that marking opengl as a distro feature

> encompassing all OpenGL implementations is better. Although, in this

> particular case all openGL implementations can be enabled simultaneously

> so may be we can enable egl and gles too with same knob. Alternatively

> We can leave the packageconfig knob disabled which will make it same

> defaults effectively ( which is disabled)

>

> >

> >>

> >>  #check for TARGET_FPU=soft and inform configure of the result so it

> can disable some floating points

> >>  require cairo-fpu.inc

> >> --

> >> 2.14.0

> >>

> >> --

> >> _______________________________________________

> >> Openembedded-core mailing list

> >> Openembedded-core@lists.openembedded.org

> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core

>

>

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

>

>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Andre McCurdy Aug. 9, 2017, 6:24 p.m. | #4
On Wed, Aug 9, 2017 at 11:11 AM, Khem Raj <raj.khem@gmail.com> wrote:
> On 8/9/17 8:41 AM, Andre McCurdy wrote:

>> On Wed, Aug 9, 2017 at 7:19 AM, Khem Raj <raj.khem@gmail.com> wrote:

>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>

>>

>> Any explanation? Was this previously non-deterministic? If so, how far

>> back does the problem go?

>

> it isnt non-deterministic atleast not after RSS. However, we need this

> enabled when we have openGL/X11 enabled.

>

>>

>>> ---

>>>  meta/recipes-graphics/cairo/cairo.inc | 4 +++-

>>>  1 file changed, 3 insertions(+), 1 deletion(-)

>>>

>>> diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc

>>> index 8e1e2e1b88..fd376951bd 100644

>>> --- a/meta/recipes-graphics/cairo/cairo.inc

>>> +++ b/meta/recipes-graphics/cairo/cairo.inc

>>> @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"

>>>  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"

>>>

>>>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \

>>> -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"

>>> +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \

>>> +           ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"

>>>

>>>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"

>>>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"

>>> @@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"

>>>  PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"

>>>  PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"

>>>  PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"

>>> +PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"

>>

>> Since the opengl distro feature can imply either OpenGL or OpenGL ES

>> support, it doesn't seem right to use it to select one over the other

>> (ie for recipes which support both, shouldn't the choice between

>> OpenGL or OpenGL ES be independent of the opengl distro feature) ?

>

> at some point we differentiated between opengl and gles at distro level

> atleast for RDK, but I agree that marking opengl as a distro feature

> encompassing all OpenGL implementations is better. Although, in this

> particular case all openGL implementations can be enabled simultaneously


According to the tests in the configure script it looks like a choice
between OpenGL or OpenGL ES, not both.

> so may be we can enable egl and gles too with same knob. Alternatively

> We can leave the packageconfig knob disabled which will make it same

> defaults effectively ( which is disabled)


Either leave it disabled or enable it conditionally based on both the
opengl and x11 distro features?

>

>>

>>>

>>>  #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points

>>>  require cairo-fpu.inc

>>> --

>>> 2.14.0

>>>

>>> --

>>> _______________________________________________

>>> Openembedded-core mailing list

>>> Openembedded-core@lists.openembedded.org

>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core

>

>

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Aug. 9, 2017, 6:40 p.m. | #5
On Wed, Aug 9, 2017 at 11:16 AM, Burton, Ross <ross.burton@intel.com> wrote:
> Breaks the no-x11 builder:

> https://autobuilder.yoctoproject.org/main/builders/nightly-no-x11/builds/543/steps/BuildImages/logs/stdio

>


yes I was expecting that

> Ross

>

> On 9 August 2017 at 19:11, Khem Raj <raj.khem@gmail.com> wrote:

>>

>> On 8/9/17 8:41 AM, Andre McCurdy wrote:

>> > On Wed, Aug 9, 2017 at 7:19 AM, Khem Raj <raj.khem@gmail.com> wrote:

>> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>

>> >

>> > Any explanation? Was this previously non-deterministic? If so, how far

>> > back does the problem go?

>>

>> it isnt non-deterministic atleast not after RSS. However, we need this

>> enabled when we have openGL/X11 enabled.

>>

>> >

>> >> ---

>> >>  meta/recipes-graphics/cairo/cairo.inc | 4 +++-

>> >>  1 file changed, 3 insertions(+), 1 deletion(-)

>> >>

>> >> diff --git a/meta/recipes-graphics/cairo/cairo.inc

>> >> b/meta/recipes-graphics/cairo/cairo.inc

>> >> index 8e1e2e1b88..fd376951bd 100644

>> >> --- a/meta/recipes-graphics/cairo/cairo.inc

>> >> +++ b/meta/recipes-graphics/cairo/cairo.inc

>> >> @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender

>> >> libxext"

>> >>  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"

>> >>

>> >>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11

>> >> xcb', '', d)} \

>> >> -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"

>> >> +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \

>> >> +           ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"

>> >>

>> >>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no

>> >> --disable-xlib,${X11DEPENDS}"

>> >>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"

>> >> @@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] =

>> >> "--enable-directfb=yes,,directfb"

>> >>  PACKAGECONFIG[valgrind] =

>> >> "--enable-valgrind=yes,--disable-valgrind,valgrind"

>> >>  PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"

>> >>  PACKAGECONFIG[glesv2] =

>> >> "--enable-glesv2,--disable-glesv2,virtual/libgles2"

>> >> +PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"

>> >

>> > Since the opengl distro feature can imply either OpenGL or OpenGL ES

>> > support, it doesn't seem right to use it to select one over the other

>> > (ie for recipes which support both, shouldn't the choice between

>> > OpenGL or OpenGL ES be independent of the opengl distro feature) ?

>>

>> at some point we differentiated between opengl and gles at distro level

>> atleast for RDK, but I agree that marking opengl as a distro feature

>> encompassing all OpenGL implementations is better. Although, in this

>> particular case all openGL implementations can be enabled simultaneously

>> so may be we can enable egl and gles too with same knob. Alternatively

>> We can leave the packageconfig knob disabled which will make it same

>> defaults effectively ( which is disabled)

>>

>> >

>> >>

>> >>  #check for TARGET_FPU=soft and inform configure of the result so it

>> >> can disable some floating points

>> >>  require cairo-fpu.inc

>> >> --

>> >> 2.14.0

>> >>

>> >> --

>> >> _______________________________________________

>> >> Openembedded-core mailing list

>> >> Openembedded-core@lists.openembedded.org

>> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core

>>

>>

>>

>> --

>> _______________________________________________

>> Openembedded-core mailing list

>> Openembedded-core@lists.openembedded.org

>> http://lists.openembedded.org/mailman/listinfo/openembedded-core

>>

>

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Aug. 9, 2017, 6:58 p.m. | #6
On Wed, Aug 9, 2017 at 11:24 AM, Andre McCurdy <armccurdy@gmail.com> wrote:
> On Wed, Aug 9, 2017 at 11:11 AM, Khem Raj <raj.khem@gmail.com> wrote:

>> On 8/9/17 8:41 AM, Andre McCurdy wrote:

>>> On Wed, Aug 9, 2017 at 7:19 AM, Khem Raj <raj.khem@gmail.com> wrote:

>>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>

>>>

>>> Any explanation? Was this previously non-deterministic? If so, how far

>>> back does the problem go?

>>

>> it isnt non-deterministic atleast not after RSS. However, we need this

>> enabled when we have openGL/X11 enabled.

>>

>>>

>>>> ---

>>>>  meta/recipes-graphics/cairo/cairo.inc | 4 +++-

>>>>  1 file changed, 3 insertions(+), 1 deletion(-)

>>>>

>>>> diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc

>>>> index 8e1e2e1b88..fd376951bd 100644

>>>> --- a/meta/recipes-graphics/cairo/cairo.inc

>>>> +++ b/meta/recipes-graphics/cairo/cairo.inc

>>>> @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"

>>>>  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"

>>>>

>>>>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \

>>>> -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"

>>>> +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \

>>>> +           ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"

>>>>

>>>>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"

>>>>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"

>>>> @@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"

>>>>  PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"

>>>>  PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"

>>>>  PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"

>>>> +PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"

>>>

>>> Since the opengl distro feature can imply either OpenGL or OpenGL ES

>>> support, it doesn't seem right to use it to select one over the other

>>> (ie for recipes which support both, shouldn't the choice between

>>> OpenGL or OpenGL ES be independent of the opengl distro feature) ?

>>

>> at some point we differentiated between opengl and gles at distro level

>> atleast for RDK, but I agree that marking opengl as a distro feature

>> encompassing all OpenGL implementations is better. Although, in this

>> particular case all openGL implementations can be enabled simultaneously

>

> According to the tests in the configure script it looks like a choice

> between OpenGL or OpenGL ES, not both.

>

>> so may be we can enable egl and gles too with same knob. Alternatively

>> We can leave the packageconfig knob disabled which will make it same

>> defaults effectively ( which is disabled)

>

> Either leave it disabled or enable it conditionally based on both the

> opengl and x11 distro features?


could be a way forward.

>

>>

>>>

>>>>

>>>>  #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points

>>>>  require cairo-fpu.inc

>>>> --

>>>> 2.14.0

>>>>

>>>> --

>>>> _______________________________________________

>>>> Openembedded-core mailing list

>>>> Openembedded-core@lists.openembedded.org

>>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core

>>

>>

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
index 8e1e2e1b88..fd376951bd 100644
--- a/meta/recipes-graphics/cairo/cairo.inc
+++ b/meta/recipes-graphics/cairo/cairo.inc
@@ -22,7 +22,8 @@  X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
 DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
-           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
+           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
+           ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
 
 PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
 PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
@@ -30,6 +31,7 @@  PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
 PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
 PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
 PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
+PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
 
 #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points 
 require cairo-fpu.inc