Re: [Mesa-dev] [RFC mesa-demos] Add --with-system-data-files configure option
On 01/31/2011 05:17 AM, Paulo Zanoni wrote: 2011/1/29 Henri Verbeethverb...@gmail.com: If you pass -M to format-patch, it becomes a lot smaller. Thanks for the tip. For some reason I had to use -M -C --find-copies-harder. Attached is the same patch, but with these options. I haven't seen any objections to the patch so I'll commit it. Thanks. -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC mesa-demos] Add --with-system-data-files configure option
2011/1/29 Henri Verbeet hverb...@gmail.com: If you pass -M to format-patch, it becomes a lot smaller. Thanks for the tip. For some reason I had to use -M -C --find-copies-harder. Attached is the same patch, but with these options. -- Paulo Zanoni From df235322ecbe969ce70dcf516111686ff1d59ee0 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni pzan...@mandriva.com Date: Fri, 28 Jan 2011 17:34:24 -0200 Subject: [PATCH] Add --with-system-data-files option If you specify --with-system-data-files, binaries will try to find .dat and image files inside ${datadir}/${PACKAGE}. If you don't specify, they will try to find the files inside ../data (keeping backwards compatibility). Signed-off-by: Paulo Zanoni pzan...@mandriva.com --- .gitignore |5 +++ CMakeLists.txt |2 + Makefile.am |3 +- configure.ac| 18 - index.html |2 +- m4/ac_define_dir.m4 | 49 +++ src/CMakeLists.txt |2 +- src/Makefile.am |2 +- src/{images = data}/CMakeLists.txt |2 +- src/{images = data}/Makefile.am|9 +- src/{images = data}/arch.rgb | Bin 793398 - 793398 bytes src/{images = data}/bw.rgb | Bin 206452 - 206452 bytes src/{demos = data}/geartrain.dat |0 src/{images = data}/girl.rgb | Bin 117075 - 117075 bytes src/{images = data}/girl2.rgb | Bin 117139 - 117139 bytes src/{demos = data}/isosurf.dat |0 src/{images = data}/reflect.rgb| Bin 39632 - 39632 bytes src/{images = data}/s128.rgb | Bin 54258 - 54258 bytes src/{demos = data}/terrain.dat |0 src/{images = data}/tile.rgb | Bin 206534 - 206534 bytes src/{images = data}/tree2.rgba | Bin 66048 - 66048 bytes src/{images = data}/tree3.rgb | Bin 24816 - 24816 bytes src/{images = data}/wrs_logo.rgb | Bin 37574 - 37574 bytes src/demos/CMakeLists.txt|4 --- src/demos/Makefile.am |5 +--- src/demos/copypix.c |2 +- src/demos/dissolve.c|4 +- src/demos/drawpix.c |2 +- src/demos/engine.c |2 +- src/demos/fbo_firecube.c|7 +++-- src/demos/fire.c|7 +++-- src/demos/geartrain.c |2 +- src/demos/gloss.c |4 +- src/demos/ipers.c |2 +- src/demos/isosurf.c |4 +- src/demos/lodbias.c |2 +- src/demos/multiarb.c|4 +- src/demos/projtex.c |8 +++--- src/demos/rain.cxx |3 +- src/demos/readpix.c |2 +- src/demos/reflect.c |2 +- src/demos/teapot.c |4 +- src/demos/terrain.c |2 +- src/demos/texcyl.c |2 +- src/demos/textures.c|8 +++--- src/demos/tunnel.c |4 +- src/demos/tunnel2.c |4 +- src/demos/winpos.c |2 +- src/fp/fp-tri.c |2 +- src/fp/tri-tex.c|2 +- src/fpglsl/fp-tri.c |2 +- src/glsl/bump.c |2 +- src/glsl/convolutions.c |2 +- src/glsl/multitex.c |4 +- src/glsl/texdemo1.c |2 +- src/perf/glslstateschange.c |8 +++--- src/samples/sphere.c|2 +- src/tests/afsmultiarb.c |4 +- src/tests/arbfptexture.c|2 +- src/tests/arbfptrig.c |2 +- src/tests/arbnpot.c |2 +- src/tests/arraytexture.c| 16 +- src/tests/blendxor.c|2 +- src/tests/bug_3195.c|2 +- src/tests/bumpmap.c |2 +- src/tests/ext422square.c|2 +- src/tests/fillrate.c|4 +- src/tests/floattex.c|2 +- src/tests/fptexture.c |2 +- src/tests/invert.c |2 +- src/tests/mipmap_limits.c |2 +- src/tests/mipmap_view.c |2 +- src/tests/multipal.c|4 +- src/tests/pbo.c |2 +- src/tests/rubberband.c |2 +- src/tests/texcmp.c |2 +- src/tests/texcompress2.c|2 +- src/tests/texline.c |2 +- src/tests/texrect.c |4 +- src/tests/vparray.c |2 +- src/tests/yuvrect.c |2 +- src/tests/yuvsquare.c |2 +- src/xdemos/yuvrect_client.c |2 +- 83 files changed, 180 insertions(+), 106 deletions(-) create mode 100644 m4/ac_define_dir.m4 rename src/{images =
Re: [Mesa-dev] [RFC mesa-demos] Add --with-system-data-files configure option
On 28 January 2011 21:09, Paulo Zanoni przan...@gmail.com wrote: As a consequence of moving images/ to data/, the patch file is 3.9MB long, so you can grab it here: http://www.inf.ufpr.br/paulo/0002-Add-with-system-data-files-option.patch If you pass -M to format-patch, it becomes a lot smaller. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [RFC mesa-demos] Add --with-system-data-files configure option
Hello One of the problems with mesa-demos is that the demos have hardcoded paths to data files (example: fopen(../images/something.rgb, ...)). Distributions shipping the package need to sed all those paths in order to ship working demos. This patch introduces a DEMOS_DATA_DIR definition that should be used when trying to open a data file. After this patch, distros packaging mesa-demos only need to specify --with-system-data-files when building and the apps will automatically look for the file in the right place. If you're a developer that doesn't use make install, everything will still work as always: just don't use the new option, the patch is backwards-compatible. I have to admit that my autotools-fu is bad, so if you know any better way to implement this feature, please tell me: I'll be happy to learn and implement. IMHO, the ugliest part is the addition of the ac_define_dir m4 macro (stolen from the xserver tree, btw). For the CMake system, I only added a definition to keep backward-compatibility. Suggestions are welcome here too. Another detail is that image files were moved from src/images to src/data (since data/ contais not only image files, but .dat files too). As a last note, I didn't do anything to .vert, .geom and .frag files. Maybe they should be handled the same way? Some of these files are mentioned in .shtest files, and I didn't have time to investigate how these files work (maybe the only way would be using .in files?). As a consequence of moving images/ to data/, the patch file is 3.9MB long, so you can grab it here: http://www.inf.ufpr.br/paulo/0002-Add-with-system-data-files-option.patch Any comments, improvements or objections? Cheers, Paulo -- Paulo Zanoni ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev