- mesa-7.1-link-shared.patch: Make a libdricore.so from libmesa.a, install
it into %_libdir/dri, and link the DRI drivers against it. Drops ~20M from the installed system (not including debuginfo). Inspired by a similar patch in openSUSE but reworked to be compatible with the OSMesa build.
This commit is contained in:
parent
d3c4211e93
commit
c0c14a5047
101
mesa-7.1-link-shared.patch
Normal file
101
mesa-7.1-link-shared.patch
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
diff -up mesa-20080331/src/mesa/x86/read_rgba_span_x86.S.jx mesa-20080331/src/mesa/x86/read_rgba_span_x86.S
|
||||||
|
--- mesa-20080331/src/mesa/x86/read_rgba_span_x86.S.jx 2008-03-31 16:58:48.000000000 -0400
|
||||||
|
+++ mesa-20080331/src/mesa/x86/read_rgba_span_x86.S 2008-04-10 12:11:31.000000000 -0400
|
||||||
|
@@ -77,7 +77,6 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
.globl _generic_read_RGBA_span_BGRA8888_REV_MMX
|
||||||
|
-.hidden _generic_read_RGBA_span_BGRA8888_REV_MMX
|
||||||
|
.type _generic_read_RGBA_span_BGRA8888_REV_MMX, @function
|
||||||
|
_generic_read_RGBA_span_BGRA8888_REV_MMX:
|
||||||
|
pushl %ebx
|
||||||
|
@@ -172,7 +171,6 @@ _generic_read_RGBA_span_BGRA8888_REV_MMX
|
||||||
|
*/
|
||||||
|
|
||||||
|
.globl _generic_read_RGBA_span_BGRA8888_REV_SSE
|
||||||
|
-.hidden _generic_read_RGBA_span_BGRA8888_REV_SSE
|
||||||
|
.type _generic_read_RGBA_span_BGRA8888_REV_SSE, @function
|
||||||
|
_generic_read_RGBA_span_BGRA8888_REV_SSE:
|
||||||
|
pushl %esi
|
||||||
|
@@ -335,7 +333,6 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE
|
||||||
|
|
||||||
|
.text
|
||||||
|
.globl _generic_read_RGBA_span_BGRA8888_REV_SSE2
|
||||||
|
-.hidden _generic_read_RGBA_span_BGRA8888_REV_SSE2
|
||||||
|
.type _generic_read_RGBA_span_BGRA8888_REV_SSE2, @function
|
||||||
|
_generic_read_RGBA_span_BGRA8888_REV_SSE2:
|
||||||
|
pushl %esi
|
||||||
|
@@ -492,7 +489,6 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE
|
||||||
|
|
||||||
|
.text
|
||||||
|
.globl _generic_read_RGBA_span_RGB565_MMX
|
||||||
|
- .hidden _generic_read_RGBA_span_RGB565_MMX
|
||||||
|
.type _generic_read_RGBA_span_RGB565_MMX, @function
|
||||||
|
|
||||||
|
_generic_read_RGBA_span_RGB565_MMX:
|
||||||
|
diff -up mesa-20080331/src/mesa/drivers/dri/Makefile.jx mesa-20080331/src/mesa/drivers/dri/Makefile
|
||||||
|
--- mesa-20080331/src/mesa/drivers/dri/Makefile.jx 2008-03-31 16:58:48.000000000 -0400
|
||||||
|
+++ mesa-20080331/src/mesa/drivers/dri/Makefile 2008-04-10 12:02:30.000000000 -0400
|
||||||
|
@@ -6,12 +6,17 @@ include $(TOP)/configs/current
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-default: $(TOP)/$(LIB_DIR) subdirs
|
||||||
|
+default: $(TOP)/$(LIB_DIR) $(TOP)/$(LIB_DIR)/libdricore.so subdirs
|
||||||
|
|
||||||
|
|
||||||
|
$(TOP)/$(LIB_DIR):
|
||||||
|
-mkdir $(TOP)/$(LIB_DIR)
|
||||||
|
|
||||||
|
+libdricore.so:
|
||||||
|
+ ld -shared -o libdricore.so --whole-archive ../../libmesa.a --no-whole-archive -lm -lpthread -lc
|
||||||
|
+
|
||||||
|
+$(TOP)/$(LIB_DIR)/libdricore.so: $(TOP)/$(LIB_DIR) libdricore.so
|
||||||
|
+ $(INSTALL) libdricore.so $(TOP)/$(LIB_DIR)
|
||||||
|
|
||||||
|
subdirs:
|
||||||
|
@for dir in $(DRI_DIRS) ; do \
|
||||||
|
@@ -21,12 +26,14 @@ subdirs:
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
-install:
|
||||||
|
+install: $(TOP)/$(LIB_DIR)/libdricore.so
|
||||||
|
@for dir in $(DRI_DIRS) ; do \
|
||||||
|
if [ -d $$dir ] ; then \
|
||||||
|
(cd $$dir && $(MAKE) install) || exit 1 ; \
|
||||||
|
fi \
|
||||||
|
done
|
||||||
|
+ $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
|
||||||
|
+ $(INSTALL) -m 755 $(TOP)/$(LIB_DIR)/libdricore.so $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
|
||||||
|
$(TOP)/bin/minstall -d $(DESTDIR)$(INSTALL_DIR)/include/GL/internal
|
||||||
|
$(TOP)/bin/minstall -m 0644 $(TOP)/include/GL/internal/dri_interface.h $(DESTDIR)$(INSTALL_DIR)/include/GL/internal
|
||||||
|
$(TOP)/bin/minstall -m 0644 $(TOP)/include/GL/internal/dri_sarea.h $(DESTDIR)$(INSTALL_DIR)/include/GL/internal
|
||||||
|
@@ -38,4 +45,5 @@ clean:
|
||||||
|
(cd $$dir && $(MAKE) clean) ; \
|
||||||
|
fi \
|
||||||
|
done
|
||||||
|
+ -rm -f libdricore.so $(TOP)/$(LIB_DIR)/libdricore.so
|
||||||
|
-rm -f common/*.o
|
||||||
|
diff -up mesa-20080331/src/mesa/drivers/dri/Makefile.template.jx mesa-20080331/src/mesa/drivers/dri/Makefile.template
|
||||||
|
--- mesa-20080331/src/mesa/drivers/dri/Makefile.template.jx 2008-03-31 16:58:48.000000000 -0400
|
||||||
|
+++ mesa-20080331/src/mesa/drivers/dri/Makefile.template 2008-04-10 12:02:30.000000000 -0400
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
# -*-makefile-*-
|
||||||
|
|
||||||
|
-MESA_MODULES = $(TOP)/src/mesa/libmesa.a
|
||||||
|
+MESA_MODULES = $(TOP)/$(LIB_DIR)/libdricore.so
|
||||||
|
|
||||||
|
COMMON_SOURCES = \
|
||||||
|
../../common/driverfuncs.c \
|
||||||
|
@@ -70,7 +70,9 @@ default: symlinks depend $(LIBNAME) $(TO
|
||||||
|
|
||||||
|
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
|
||||||
|
$(TOP)/bin/mklib -ldflags '$(LDFLAGS)' -noprefix -o $@ \
|
||||||
|
- $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
|
||||||
|
+ $(OBJECTS) $(WINOBJ) \
|
||||||
|
+ -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore \
|
||||||
|
+ $(DRI_LIB_DEPS)
|
||||||
|
|
||||||
|
|
||||||
|
$(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
|
23
mesa.spec
23
mesa.spec
@ -15,7 +15,7 @@
|
|||||||
Summary: Mesa graphics libraries
|
Summary: Mesa graphics libraries
|
||||||
Name: mesa
|
Name: mesa
|
||||||
Version: 7.1
|
Version: 7.1
|
||||||
Release: 0.22%{?dist}
|
Release: 0.23%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://www.mesa3d.org
|
URL: http://www.mesa3d.org
|
||||||
@ -36,6 +36,7 @@ Patch3: disable-tex-offset.patch
|
|||||||
Patch4: mesa-7.1-visual-crash.patch
|
Patch4: mesa-7.1-visual-crash.patch
|
||||||
Patch5: mesa-7.1-fbconfig-fix.patch
|
Patch5: mesa-7.1-fbconfig-fix.patch
|
||||||
Patch6: mesa-7.1-dri2.patch
|
Patch6: mesa-7.1-dri2.patch
|
||||||
|
Patch7: mesa-7.1-link-shared.patch
|
||||||
|
|
||||||
BuildRequires: pkgconfig autoconf automake
|
BuildRequires: pkgconfig autoconf automake
|
||||||
%if %{with_dri}
|
%if %{with_dri}
|
||||||
@ -164,6 +165,7 @@ This package provides some demo applications for testing Mesa.
|
|||||||
%patch4 -p1 -b .visual-crash
|
%patch4 -p1 -b .visual-crash
|
||||||
%patch5 -p1 -b .fbconfig
|
%patch5 -p1 -b .fbconfig
|
||||||
%patch6 -p1 -b .dri2
|
%patch6 -p1 -b .dri2
|
||||||
|
%patch7 -p1 -b .dricore
|
||||||
|
|
||||||
# WARNING: The following files are copyright "Mark J. Kilgard" under the GLUT
|
# WARNING: The following files are copyright "Mark J. Kilgard" under the GLUT
|
||||||
# license and are not open source/free software, so we remove them.
|
# license and are not open source/free software, so we remove them.
|
||||||
@ -181,7 +183,10 @@ autoreconf --install
|
|||||||
|
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -fvisibility=hidden -Os"
|
export CFLAGS="$RPM_OPT_FLAGS -fvisibility=hidden -Os"
|
||||||
export CXXFLAGS="$RPM_OPT_FLAGS -fvisibility=hidden -Os"
|
export CXXFLAGS="$RPM_OPT_FLAGS -fvisibility=hidden -Os"
|
||||||
# first, build the osmesa variants
|
|
||||||
|
# first, build the osmesa variants. XXX this is overkill. osmesa32 is
|
||||||
|
# sufficient to render to any of the channel sizes, according to the
|
||||||
|
# docs. should fix this someday.
|
||||||
%configure --with-driver=osmesa --with-osmesa-bits=8
|
%configure --with-driver=osmesa --with-osmesa-bits=8
|
||||||
make %{_smp_mflags} SRC_DIRS=mesa
|
make %{_smp_mflags} SRC_DIRS=mesa
|
||||||
mv %{_lib} osmesa8
|
mv %{_lib} osmesa8
|
||||||
@ -200,8 +205,9 @@ make clean
|
|||||||
# just to be sure...
|
# just to be sure...
|
||||||
[ `find . -name \*.o | wc -l` -eq 0 ] || exit "make cleaner plz"
|
[ `find . -name \*.o | wc -l` -eq 0 ] || exit "make cleaner plz"
|
||||||
|
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -fvisibility=hidden"
|
# XXX should get visibility working again post-dricore.
|
||||||
export CXXFLAGS="$RPM_OPT_FLAGS -fvisibility=hidden"
|
export CFLAGS="$RPM_OPT_FLAGS -Os"
|
||||||
|
export CXXFLAGS="$RPM_OPT_FLAGS -Os"
|
||||||
|
|
||||||
# now build the rest of mesa
|
# now build the rest of mesa
|
||||||
%configure \
|
%configure \
|
||||||
@ -230,6 +236,7 @@ make install DESTDIR=$RPM_BUILD_ROOT DRI_DIRS=
|
|||||||
# just the DRI drivers that are sane
|
# just the DRI drivers that are sane
|
||||||
%if %{with_dri}
|
%if %{with_dri}
|
||||||
install -d $RPM_BUILD_ROOT%{_libdir}/dri
|
install -d $RPM_BUILD_ROOT%{_libdir}/dri
|
||||||
|
install -m 0755 -t $RPM_BUILD_ROOT%{_libdir}/dri %{_lib}/libdricore.so >& /dev/null
|
||||||
for f in i810 i915 i965 mach64 mga r128 r200 r300 radeon savage sis tdfx unichrome; do
|
for f in i810 i915 i965 mach64 mga r128 r200 r300 radeon savage sis tdfx unichrome; do
|
||||||
so=%{_lib}/${f}_dri.so
|
so=%{_lib}/${f}_dri.so
|
||||||
test -e $so && echo $so
|
test -e $so && echo $so
|
||||||
@ -291,6 +298,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/libGL.so.1.2
|
%{_libdir}/libGL.so.1.2
|
||||||
%if %{with_dri}
|
%if %{with_dri}
|
||||||
%dir %{_libdir}/dri
|
%dir %{_libdir}/dri
|
||||||
|
%{_libdir}/dri/libdricore.so
|
||||||
%{_libdir}/dri/*_dri.so
|
%{_libdir}/dri/*_dri.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -406,6 +414,13 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/mesa-demos-data
|
%{_libdir}/mesa-demos-data
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 10 2008 Adam Jackson <ajax@redhat.com> 7.1-0.23
|
||||||
|
- mesa-7.1-link-shared.patch: Make a libdricore.so from libmesa.a, install
|
||||||
|
it into %%_libdir/dri, and link the DRI drivers against it. Drops ~20M
|
||||||
|
from the installed system (not including debuginfo). Inspired by a
|
||||||
|
similar patch in openSUSE but reworked to be compatible with the OSMesa
|
||||||
|
build.
|
||||||
|
|
||||||
* Wed Apr 09 2008 Adam Jackson <ajax@redhat.com> 7.1-0.22
|
* Wed Apr 09 2008 Adam Jackson <ajax@redhat.com> 7.1-0.22
|
||||||
- mesa-7.1-visual-crash.patch: Fix a segfault if DRI unavailable.
|
- mesa-7.1-visual-crash.patch: Fix a segfault if DRI unavailable.
|
||||||
- mesa-7.1-fbconfig-fix.patch: Fix fbconfig comparisons.
|
- mesa-7.1-fbconfig-fix.patch: Fix fbconfig comparisons.
|
||||||
|
Loading…
Reference in New Issue
Block a user