diff options
Diffstat (limited to 'meta-emenlow/recipes-graphics/xpsb-glx')
4 files changed, 187 insertions, 0 deletions
diff --git a/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/cross-compile.patch b/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/cross-compile.patch new file mode 100644 index 0000000000..a231596810 --- /dev/null +++ b/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/cross-compile.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | Index: mesa/configs/linux-dri | ||
2 | =================================================================== | ||
3 | --- mesa.orig/configs/linux-dri | ||
4 | +++ mesa/configs/linux-dri | ||
5 | @@ -3,11 +3,9 @@ | ||
6 | |||
7 | include $(TOP)/configs/default | ||
8 | |||
9 | -CONFIG_NAME = linux-dri | ||
10 | +$(warning ENVIRONMENT = $(shell printenv)) | ||
11 | |||
12 | -# Compiler and flags | ||
13 | -CC = gcc | ||
14 | -CXX = g++ | ||
15 | +CONFIG_NAME = linux-dri | ||
16 | |||
17 | #MKDEP = /usr/X11R6/bin/makedepend | ||
18 | #MKDEP = gcc -M | ||
19 | @@ -25,8 +23,6 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOU | ||
20 | -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \ | ||
21 | -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN | ||
22 | |||
23 | -X11_INCLUDES = -I/usr/X11R6/include | ||
24 | - | ||
25 | CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \ | ||
26 | $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS) | ||
27 | |||
28 | @@ -40,9 +36,6 @@ CXXFLAGS += -fno-strict-aliasing | ||
29 | |||
30 | ASM_SOURCES = | ||
31 | |||
32 | -# Library/program dependencies | ||
33 | -EXTRA_LIB_PATH=-L/usr/X11R6/lib | ||
34 | - | ||
35 | LIBDRM_CFLAGS = `pkg-config --cflags libdrm-poulsbo` | ||
36 | LIBDRM_LIB = `pkg-config --libs libdrm-poulsbo` | ||
37 | DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) | ||
38 | Index: mesa/configs/default | ||
39 | =================================================================== | ||
40 | --- mesa.orig/configs/default | ||
41 | +++ mesa/configs/default | ||
42 | @@ -17,8 +17,6 @@ MESA_VERSION = $(MESA_MAJOR).$(MESA_MINO | ||
43 | DRM_SOURCE_PATH=$(TOP)/../drm | ||
44 | |||
45 | # Compiler and flags | ||
46 | -CC = cc | ||
47 | -CXX = CC | ||
48 | CFLAGS = -O | ||
49 | CXXFLAGS = -O | ||
50 | LDFLAGS = | ||
51 | @@ -67,7 +65,6 @@ ASM_SOURCES = | ||
52 | # GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in | ||
53 | # order to build the Motif widget too) | ||
54 | GLW_SOURCES = GLwDrawA.c | ||
55 | -MOTIF_CFLAGS = -I/usr/include/Motif1.2 | ||
56 | |||
57 | |||
58 | # Directories to build | ||
diff --git a/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/libdrmname.patch b/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/libdrmname.patch new file mode 100644 index 0000000000..96b94ef2c8 --- /dev/null +++ b/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/libdrmname.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | Index: mesa/configure.ac | ||
2 | =================================================================== | ||
3 | --- mesa.orig/configure.ac 2010-05-13 13:20:26.000000000 +0100 | ||
4 | +++ mesa/configure.ac 2010-07-25 17:02:58.000000000 +0100 | ||
5 | @@ -524,10 +524,10 @@ | ||
6 | fi | ||
7 | |||
8 | # Check for libdrm | ||
9 | - PKG_CHECK_MODULES([LIBDRM], [libdrm-poulsbo >= $LIBDRM_REQUIRED]) | ||
10 | + PKG_CHECK_MODULES([LIBDRM], [libdrm_poulsbo >= $LIBDRM_REQUIRED]) | ||
11 | PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) | ||
12 | - GL_PC_REQ_PRIV="libdrm-poulsbo >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED" | ||
13 | - DRI_PC_REQ_PRIV="libdrm-poulsbo >= $LIBDRM_REQUIRED" | ||
14 | + GL_PC_REQ_PRIV="libdrm_poulsbo >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED" | ||
15 | + DRI_PC_REQ_PRIV="libdrm_poulsbo >= $LIBDRM_REQUIRED" | ||
16 | |||
17 | # find the DRI deps for libGL | ||
18 | if test "$x11_pkgconfig" = yes; then | ||
19 | Index: mesa/configs/linux-dri | ||
20 | =================================================================== | ||
21 | --- mesa.orig/configs/linux-dri 2010-07-25 17:08:01.000000000 +0100 | ||
22 | +++ mesa/configs/linux-dri 2010-07-25 17:08:17.000000000 +0100 | ||
23 | @@ -36,8 +36,8 @@ | ||
24 | |||
25 | ASM_SOURCES = | ||
26 | |||
27 | -LIBDRM_CFLAGS = `pkg-config --cflags libdrm-poulsbo` | ||
28 | -LIBDRM_LIB = `pkg-config --libs libdrm-poulsbo` | ||
29 | +LIBDRM_CFLAGS = `pkg-config --cflags libdrm_poulsbo` | ||
30 | +LIBDRM_LIB = `pkg-config --libs libdrm_poulsbo` | ||
31 | DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) | ||
32 | GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ | ||
33 | -lm -lpthread -ldl $(LIBDRM_LIB) | ||
34 | Index: mesa/configs/linux-dri-xcb | ||
35 | =================================================================== | ||
36 | --- mesa.orig/configs/linux-dri-xcb 2010-07-25 17:08:25.000000000 +0100 | ||
37 | +++ mesa/configs/linux-dri-xcb 2010-07-25 17:08:44.000000000 +0100 | ||
38 | @@ -41,8 +41,8 @@ | ||
39 | # Library/program dependencies | ||
40 | EXTRA_LIB_PATH=`pkg-config --libs-only-L x11` | ||
41 | |||
42 | -LIBDRM_CFLAGS = `pkg-config --cflags libdrm-poulsbo` | ||
43 | -LIBDRM_LIB = `pkg-config --libs libdrm-poulsbo` | ||
44 | +LIBDRM_CFLAGS = `pkg-config --cflags libdrm_poulsbo` | ||
45 | +LIBDRM_LIB = `pkg-config --libs libdrm_poulsbo` | ||
46 | DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) | ||
47 | GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ | ||
48 | -lm -lpthread -ldl $(LIBDRM_LIB) `pkg-config --libs xcb` \ | ||
49 | Index: mesa/configs/linux-solo | ||
50 | =================================================================== | ||
51 | --- mesa.orig/configs/linux-solo 2010-07-25 17:09:03.000000000 +0100 | ||
52 | +++ mesa/configs/linux-solo 2010-07-25 17:09:13.000000000 +0100 | ||
53 | @@ -16,8 +16,8 @@ | ||
54 | ARCH_FLAGS ?= | ||
55 | |||
56 | # DRM and pciaccess | ||
57 | -LIBDRM_CFLAGS = `pkg-config --cflags libdrm-poulsbo` | ||
58 | -LIBDRM_LIB = `pkg-config --libs libdrm-poulsbo` | ||
59 | +LIBDRM_CFLAGS = `pkg-config --cflags libdrm_poulsbo` | ||
60 | +LIBDRM_LIB = `pkg-config --libs libdrm_poulsbo` | ||
61 | PCIACCESS_CFLAGS = `pkg-config --cflags pciaccess` | ||
62 | PCIACCESS_LIB = `pkg-config --libs pciaccess` | ||
63 | |||
diff --git a/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/native-matypes.patch b/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/native-matypes.patch new file mode 100644 index 0000000000..26b1f52a3e --- /dev/null +++ b/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/native-matypes.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Index: mesa/src/mesa/x86/Makefile | ||
2 | =================================================================== | ||
3 | --- mesa.orig/src/mesa/x86/Makefile 2010-10-11 16:34:12.664960996 +0100 | ||
4 | +++ mesa/src/mesa/x86/Makefile 2010-10-11 16:34:43.854960861 +0100 | ||
5 | @@ -20,11 +20,12 @@ | ||
6 | -rm -f matypes.h gen_matypes | ||
7 | |||
8 | |||
9 | -gen_matypes: gen_matypes.c | ||
10 | - $(CC) $(INCLUDE_DIRS) $(CFLAGS) gen_matypes.c -o gen_matypes | ||
11 | +#gen_matypes: gen_matypes.c | ||
12 | +# $(CC) $(INCLUDE_DIRS) $(CFLAGS) gen_matypes.c -o gen_matypes | ||
13 | |||
14 | # need some special rules here, unfortunately | ||
15 | -matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes | ||
16 | +matypes.h: ../main/mtypes.h ../tnl/t_context.h | ||
17 | +# gen_matypes | ||
18 | ./gen_matypes > matypes.h | ||
19 | |||
20 | common_x86_asm.o: matypes.h | ||
diff --git a/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx_0.18.bb b/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx_0.18.bb new file mode 100644 index 0000000000..6ceb1cbe08 --- /dev/null +++ b/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx_0.18.bb | |||
@@ -0,0 +1,46 @@ | |||
1 | DESCRIPTION = "X11 drivers for Poulsbo (psb) 3D acceleration" | ||
2 | |||
3 | # There's a mesa implementation in this package, which is presumably | ||
4 | # not Intel proprietary, but it has no obvious license attached to it. | ||
5 | LICENSE = "Intel-binary-only" | ||
6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/${PN}-${PV}/COPYING;md5=02c597a2f082b4581596065bb5a521a8" | ||
7 | PR = "r6" | ||
8 | |||
9 | inherit autotools | ||
10 | |||
11 | PROVIDES = "virtual/libgl mesa-dri" | ||
12 | |||
13 | SRC_URI="https://launchpad.net/~gma500/+archive/ppa/+files/xpsb-glx_0.18-0ubuntu1netbook2~1004um1ubuntu1.tar.gz \ | ||
14 | file://cross-compile.patch \ | ||
15 | file://libdrmname.patch \ | ||
16 | file://native-matypes.patch" | ||
17 | |||
18 | do_configure () { | ||
19 | chmod +x autogen.sh && ./autogen.sh ${CONFIGUREOPTS} && make realclean | ||
20 | cd ${S}/src/mesa/x86/ | ||
21 | ${BUILD_CC} -I../../../include/GL -I../../../include -I.. -I../main -I../math -I../glapi -I../tnl -Wall -Wmissing-prototypes -std=c99 -ffast-math -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -fno-strict-aliasing gen_matypes.c -o gen_matypes | ||
22 | } | ||
23 | |||
24 | do_install() { | ||
25 | make DESTDIR=${D} install | ||
26 | install -d -m 0755 ${D}/${libdir}/xorg/modules/dri \ | ||
27 | ${D}/${libdir}/xorg/modules/drivers | ||
28 | install -m 0644 ${WORKDIR}/${PN}-${PV}/dri/* \ | ||
29 | ${D}/${libdir}/xorg/modules/dri | ||
30 | install -m 0644 ${WORKDIR}/${PN}-${PV}/drivers/* \ | ||
31 | ${D}/${libdir}/xorg/modules/drivers | ||
32 | } | ||
33 | |||
34 | S = "${WORKDIR}/${PN}-${PV}/mesa" | ||
35 | |||
36 | EXTRA_OEMAKE = "linux-dri-x86" | ||
37 | |||
38 | DEPENDS += "libdrm-poulsbo libxxf86vm dri2proto libxmu libxi glproto makedepend-native" | ||
39 | |||
40 | FILES_${PN} = "${libdir}/* ${libdir}/xorg/modules/dri/* \ | ||
41 | ${libdir}/xorg/modules/drivers/*" | ||
42 | |||
43 | # Multiple virtual/gl providers being built breaks staging | ||
44 | EXCLUDE_FROM_WORLD = "1" | ||
45 | |||
46 | COMPATIBLE_MACHINE = "emenlow" | ||