1 |
commit: 1db78c1c920bf8184f4f22eacfa9cfb2d5ee63c8 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 6 19:19:04 2012 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 6 19:19:04 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=1db78c1c |
7 |
|
8 |
media-libs/mesa: patch configure.ac to respect user defined macros |
9 |
|
10 |
--- |
11 |
media-libs/mesa/files/respect-user-defines.patch | 19 +++++++++++++++++++ |
12 |
media-libs/mesa/files/uclibc-defines.patch | 12 ------------ |
13 |
media-libs/mesa/mesa-7.11.2-r99.ebuild | 10 ++++++---- |
14 |
media-libs/mesa/metadata.xml | 1 + |
15 |
4 files changed, 26 insertions(+), 16 deletions(-) |
16 |
|
17 |
diff --git a/media-libs/mesa/files/respect-user-defines.patch b/media-libs/mesa/files/respect-user-defines.patch |
18 |
new file mode 100644 |
19 |
index 0000000..291d71e |
20 |
--- /dev/null |
21 |
+++ b/media-libs/mesa/files/respect-user-defines.patch |
22 |
@@ -0,0 +1,19 @@ |
23 |
+diff -Naur Mesa-7.11.2.orig/configure.ac Mesa-7.11.2/configure.ac |
24 |
+--- Mesa-7.11.2.orig/configure.ac 2011-10-15 00:43:58.000000000 +0000 |
25 |
++++ Mesa-7.11.2/configure.ac 2012-01-06 18:38:58.213283132 +0000 |
26 |
+@@ -20,6 +20,7 @@ |
27 |
+ dnl Save user CFLAGS and CXXFLAGS so one can override the default ones |
28 |
+ USER_CFLAGS="$CFLAGS" |
29 |
+ USER_CXXFLAGS="$CXXFLAGS" |
30 |
++USER_DEFINES="$DEFINES" |
31 |
+ |
32 |
+ dnl Versions for external dependencies |
33 |
+ LIBDRM_REQUIRED=2.4.24 |
34 |
+@@ -1836,6 +1837,7 @@ |
35 |
+ dnl Add user CFLAGS and CXXFLAGS |
36 |
+ CFLAGS="$CFLAGS $USER_CFLAGS" |
37 |
+ CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS" |
38 |
++DEFINES="$DEFINES $USER_DEFINES" |
39 |
+ |
40 |
+ dnl Substitute the config |
41 |
+ AC_CONFIG_FILES([configs/autoconf]) |
42 |
|
43 |
diff --git a/media-libs/mesa/files/uclibc-defines.patch b/media-libs/mesa/files/uclibc-defines.patch |
44 |
deleted file mode 100644 |
45 |
index 901f9cc..0000000 |
46 |
--- a/media-libs/mesa/files/uclibc-defines.patch |
47 |
+++ /dev/null |
48 |
@@ -1,12 +0,0 @@ |
49 |
-diff -Naur Mesa-7.11.2.orig/configure Mesa-7.11.2/configure |
50 |
---- Mesa-7.11.2.orig/configure 2012-01-06 12:53:32.000000000 -0500 |
51 |
-+++ Mesa-7.11.2/configure 2012-01-06 12:54:20.000000000 -0500 |
52 |
-@@ -11401,6 +11401,8 @@ |
53 |
- echo " Shared libs: $enable_shared" |
54 |
- echo " Static libs: $enable_static" |
55 |
- |
56 |
-+DEFINES+=" -U__GLIBC__ -U_GNU_SOURCE" |
57 |
-+ |
58 |
- # cleanup the CFLAGS/CXXFLAGS/DEFINES vars |
59 |
- cflags=`echo $CFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \ |
60 |
- $SED 's/^ *//;s/ */ /;s/ *$//'` |
61 |
|
62 |
diff --git a/media-libs/mesa/mesa-7.11.2-r99.ebuild b/media-libs/mesa/mesa-7.11.2-r99.ebuild |
63 |
index e4241b7..701f4aa 100644 |
64 |
--- a/media-libs/mesa/mesa-7.11.2-r99.ebuild |
65 |
+++ b/media-libs/mesa/mesa-7.11.2-r99.ebuild |
66 |
@@ -23,7 +23,7 @@ SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2 |
67 |
|
68 |
LICENSE="MIT LGPL-3 SGI-B-2.0" |
69 |
SLOT="0" |
70 |
-KEYWORDS="~amd64 ~x86" |
71 |
+KEYWORDS="amd64 x86" |
72 |
|
73 |
INTEL_CARDS="intel" |
74 |
RADEON_CARDS="radeon" |
75 |
@@ -33,7 +33,7 @@ for card in ${VIDEO_CARDS}; do |
76 |
done |
77 |
|
78 |
IUSE="${IUSE_VIDEO_CARDS} |
79 |
- bindist +classic debug +egl +gallium gbm gles +llvm motif +nptl openvg osmesa pic pax_kernel selinux shared-dricore +shared-glapi" |
80 |
+ bindist +classic debug +egl +gallium gbm gles +llvm motif +nptl openvg osmesa pic pax_kernel selinux shared-dricore +shared-glapi uclibc" |
81 |
|
82 |
LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.24" |
83 |
# not a runtime dependency of this package, but dependency of packages which |
84 |
@@ -112,6 +112,8 @@ src_unpack() { |
85 |
} |
86 |
|
87 |
src_prepare() { |
88 |
+ use uclibc && export DEFINES="-U__GLIBC__ -D__UCLIBC__" |
89 |
+ |
90 |
# apply patches |
91 |
if [[ -n ${SRC_PATCHES} ]]; then |
92 |
EPATCH_FORCE="yes" \ |
93 |
@@ -123,11 +125,11 @@ src_prepare() { |
94 |
# fix for hardened pax_kernel, bug 240956 |
95 |
epatch "${FILESDIR}"/glx_ro_text_segm.patch |
96 |
|
97 |
+ epatch "${FILESDIR}"/respect-user-defines.patch |
98 |
+ |
99 |
base_src_prepare |
100 |
|
101 |
eautoreconf |
102 |
- |
103 |
- epatch "${FILESDIR}"/uclibc-defines.patch |
104 |
} |
105 |
|
106 |
src_configure() { |
107 |
|
108 |
diff --git a/media-libs/mesa/metadata.xml b/media-libs/mesa/metadata.xml |
109 |
index 4b20581..99e333e 100644 |
110 |
--- a/media-libs/mesa/metadata.xml |
111 |
+++ b/media-libs/mesa/metadata.xml |
112 |
@@ -15,5 +15,6 @@ |
113 |
<flag name='pic'>disable optimized assembly code that is not PIC friendly</flag> |
114 |
<flag name='shared-dricore'>Enable sharing of common code for classic DRI drivers.</flag> |
115 |
<flag name='shared-glapi'>Enable sharing of common code for the OpenGL API.</flag> |
116 |
+ <flag name='uclibc'>Disable GLIBC and enabled UCLIBC.</flag> |
117 |
</use> |
118 |
</pkgmetadata> |