summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-graphics/userland/userland/0002-set-VMCS_INSTALL_PREFIX-to-usr.patch29
-rw-r--r--recipes-graphics/userland/userland/0003-cmake-generate-and-install-pkgconfig-files.patch114
-rw-r--r--recipes-graphics/userland/userland_git.bb21
3 files changed, 152 insertions, 12 deletions
diff --git a/recipes-graphics/userland/userland/0002-set-VMCS_INSTALL_PREFIX-to-usr.patch b/recipes-graphics/userland/userland/0002-set-VMCS_INSTALL_PREFIX-to-usr.patch
new file mode 100644
index 0000000..1c981af
--- /dev/null
+++ b/recipes-graphics/userland/userland/0002-set-VMCS_INSTALL_PREFIX-to-usr.patch
@@ -0,0 +1,29 @@
1From 05554d8486050546efc3c0605015786c8b267d19 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 9 Aug 2015 23:58:17 -0700
4Subject: [PATCH 1/2] set VMCS_INSTALL_PREFIX to /usr
5
6in OE we dont use /opt/vc but standard prefix
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10Upstream-Status: Submitted
11 makefiles/cmake/vmcs.cmake | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/makefiles/cmake/vmcs.cmake b/makefiles/cmake/vmcs.cmake
15index 0f8641b..e9d576d 100644
16--- a/makefiles/cmake/vmcs.cmake
17+++ b/makefiles/cmake/vmcs.cmake
18@@ -10,7 +10,7 @@ INCLUDE(CPack)
19 if (ANDROID)
20 SET(VMCS_INSTALL_PREFIX "/vendor/brcm/islands" CACHE PATH "Prefix prepended to install directories" FORCE)
21 else()
22- SET(VMCS_INSTALL_PREFIX "/opt/vc" CACHE PATH "Prefix prepended to install directories" FORCE)
23+ SET(VMCS_INSTALL_PREFIX "/usr" CACHE PATH "Prefix prepended to install directories" FORCE)
24 endif()
25
26 SET(CMAKE_INSTALL_PREFIX "${VMCS_INSTALL_PREFIX}" CACHE INTERNAL "Prefix
27--
282.1.4
29
diff --git a/recipes-graphics/userland/userland/0003-cmake-generate-and-install-pkgconfig-files.patch b/recipes-graphics/userland/userland/0003-cmake-generate-and-install-pkgconfig-files.patch
new file mode 100644
index 0000000..c644d52
--- /dev/null
+++ b/recipes-graphics/userland/userland/0003-cmake-generate-and-install-pkgconfig-files.patch
@@ -0,0 +1,114 @@
1From ef43e09c2d13b88c2e92cffc94b68003afcb1f13 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 9 Aug 2015 23:59:32 -0700
4Subject: [PATCH 2/2] cmake: generate and install pkgconfig files
5
6many packages expect packageconfig support especially for detecting EGL
7libraries. This patch helps in compiling those packages on RPi
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Submitted
12 CMakeLists.txt | 10 +++++++++-
13 pkgconfig/bcm_host.pc.in | 10 ++++++++++
14 pkgconfig/egl.pc.in | 12 ++++++++++++
15 pkgconfig/glesv2.pc.in | 12 ++++++++++++
16 pkgconfig/vg.pc.in | 11 +++++++++++
17 5 files changed, 54 insertions(+), 1 deletion(-)
18 create mode 100644 pkgconfig/bcm_host.pc.in
19 create mode 100644 pkgconfig/egl.pc.in
20 create mode 100644 pkgconfig/glesv2.pc.in
21 create mode 100644 pkgconfig/vg.pc.in
22
23diff --git a/CMakeLists.txt b/CMakeLists.txt
24index d8f776c..f15dc2b 100644
25--- a/CMakeLists.txt
26+++ b/CMakeLists.txt
27@@ -105,6 +105,14 @@ set(vmcs_host_apps_VERSION_MAJOR 1)
28 set(vmcs_host_apps_VERSION_MINOR 0)
29
30 include_directories("${PROJECT_BINARY_DIR}")
31-
32+include(FindPkgConfig QUIET)
33+if(PKG_CONFIG_FOUND)
34+ # Produce a pkg-config file
35+ foreach(PCFILE bcm_host.pc egl.pc glesv2.pc vg.pc)
36+ configure_file("pkgconfig/${PCFILE}.in" "${PCFILE}" @ONLY)
37+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PCFILE}"
38+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
39+ endforeach()
40+endif()
41 # Remove cache entry, if one added by command line
42 unset(KHRONOS_EGL_PLATFORM CACHE)
43diff --git a/pkgconfig/bcm_host.pc.in b/pkgconfig/bcm_host.pc.in
44new file mode 100644
45index 0000000..c7237c5
46--- /dev/null
47+++ b/pkgconfig/bcm_host.pc.in
48@@ -0,0 +1,10 @@
49+prefix=@CMAKE_INSTALL_PREFIX@
50+exec_prefix=${prefix}
51+libdir=${exec_prefix}/lib
52+includedir=${prefix}/include
53+
54+Name: bcm_host
55+Description: Broadcom VideoCore host API library
56+Version: 1
57+Libs: -L${libdir} -lbcm_host -lvcos -lvchiq_arm -pthread
58+Cflags: -I${includedir} -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM
59diff --git a/pkgconfig/egl.pc.in b/pkgconfig/egl.pc.in
60new file mode 100644
61index 0000000..4e3d6ac
62--- /dev/null
63+++ b/pkgconfig/egl.pc.in
64@@ -0,0 +1,12 @@
65+prefix=@CMAKE_INSTALL_PREFIX@
66+exec_prefix=${prefix}
67+libdir=${exec_prefix}/lib
68+includedir=${prefix}/include
69+
70+Name: EGL
71+Description: Fake EGL package for RPi
72+Version: 10
73+Requires: bcm_host
74+Libs: -L${libdir} -lEGL
75+Cflags: -I${includedir}
76+
77diff --git a/pkgconfig/glesv2.pc.in b/pkgconfig/glesv2.pc.in
78new file mode 100644
79index 0000000..5900225
80--- /dev/null
81+++ b/pkgconfig/glesv2.pc.in
82@@ -0,0 +1,12 @@
83+prefix=@CMAKE_INSTALL_PREFIX@
84+exec_prefix=${prefix}
85+libdir=${exec_prefix}/lib
86+includedir=${prefix}/include
87+
88+Name: GLESv2
89+Description: Fake GL ES 2 package for RPi
90+Version: 10
91+Requires: bcm_host
92+Libs: -L${libdir} -lGLESv2
93+Cflags: -I${includedir}
94+
95diff --git a/pkgconfig/vg.pc.in b/pkgconfig/vg.pc.in
96new file mode 100644
97index 0000000..8c39c98
98--- /dev/null
99+++ b/pkgconfig/vg.pc.in
100@@ -0,0 +1,11 @@
101+prefix=@CMAKE_INSTALL_PREFIX@
102+exec_prefix=${prefix}
103+libdir=${exec_prefix}/lib
104+includedir=${prefix}/include
105+
106+Name: OpenVG
107+Description: Fake OpenVG package for RPi
108+Version: 10
109+Requires: bcm_host
110+Libs: -L${libdir} -lOpenVG
111+Cflags: -I${includedir}
112--
1132.1.4
114
diff --git a/recipes-graphics/userland/userland_git.bb b/recipes-graphics/userland/userland_git.bb
index 896229e..6ba28c0 100644
--- a/recipes-graphics/userland/userland_git.bb
+++ b/recipes-graphics/userland/userland_git.bb
@@ -21,31 +21,28 @@ SRC_URI = "\
21 file://0001-fix-gcc-5.x-inlines.patch \ 21 file://0001-fix-gcc-5.x-inlines.patch \
22 file://0002-fix-musl-build.patch \ 22 file://0002-fix-musl-build.patch \
23 file://0003-fix-alloc-size-uninitialized.patch \ 23 file://0003-fix-alloc-size-uninitialized.patch \
24 file://0002-set-VMCS_INSTALL_PREFIX-to-usr.patch \
25 file://0003-cmake-generate-and-install-pkgconfig-files.patch \
24 " 26 "
25 27
26S = "${WORKDIR}/git" 28S = "${WORKDIR}/git"
27 29
28inherit cmake 30inherit cmake pkgconfig
29 31
30EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed'" 32EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed'"
31CFLAGS_append = " -fPIC" 33CFLAGS_append = " -fPIC"
32 34
33# The compiled binaries don't provide sonames. 35# Shared libs from userland package build aren't versioned, so we need
34SOLIBS = "${SOLIBSDEV}" 36# to force the .so files into the runtime package (and keep them
35 37# out of -dev package).
36do_install_append() { 38FILES_SOLIBSDEV = ""
37 mkdir -p ${D}/${prefix}
38 mv ${D}/opt/vc/* ${D}/${prefix}
39 rm -rf ${D}/opt
40}
41 39
42FILES_${PN} += " \ 40FILES_${PN} += " \
43 ${libdir}/*${SOLIBS} \ 41 ${libdir}/*.so \
44 ${libdir}/plugins" 42 ${libdir}/plugins"
45FILES_${PN}-dev = "${includedir} \ 43FILES_${PN}-dev += "${includedir} \
46 ${prefix}/src" 44 ${prefix}/src"
47FILES_${PN}-doc += "${datadir}/install" 45FILES_${PN}-doc += "${datadir}/install"
48FILES_${PN}-dbg += "${libdir}/plugins/.debug" 46FILES_${PN}-dbg += "${libdir}/plugins/.debug"
49 47
50PACKAGE_ARCH = "${MACHINE_ARCH}" 48PACKAGE_ARCH = "${MACHINE_ARCH}"
51