From 3f493bb4983f3d4ca7670c72e074ce9b84044e4dcb9815e50942ba2faee6a7e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 14 May 2012 10:15:56 +0000 Subject: [PATCH] Accepting request 120907 from home:coolo:branches:openSUSE:Factory - update to libcaca-0.99beta18 - new "cacaclock" utility - improved FIGlet support - improved Python and Ruby bindings - numerous improvements and bugfixes - fix build with ruby 1.9 and re-enable python support OBS-URL: https://build.opensuse.org/request/show/120907 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libcaca?expand=0&rev=15 --- libcaca-0.99.beta16-missing-GLU.patch | 10 +- libcaca-0.99.beta17.tar.gz | 3 - libcaca-0.99.beta18.tar.gz | 3 + libcaca-ruby_vendor_install.patch | 133 ++++++++++++++++++++++++-- libcaca.changes | 10 ++ libcaca.spec | 110 ++++++--------------- 6 files changed, 173 insertions(+), 96 deletions(-) delete mode 100644 libcaca-0.99.beta17.tar.gz create mode 100644 libcaca-0.99.beta18.tar.gz diff --git a/libcaca-0.99.beta16-missing-GLU.patch b/libcaca-0.99.beta16-missing-GLU.patch index 5383063..030679b 100644 --- a/libcaca-0.99.beta16-missing-GLU.patch +++ b/libcaca-0.99.beta16-missing-GLU.patch @@ -1,13 +1,13 @@ Index: caca/Makefile.am =================================================================== ---- caca/Makefile.am.orig 2010-02-08 14:34:28.000000000 +0200 -+++ caca/Makefile.am 2011-01-29 12:13:29.633631655 +0200 -@@ -54,7 +54,7 @@ libcaca_la_DEPENDENCIES = \ +--- caca/Makefile.am.orig 2012-05-14 11:37:31.929230228 +0200 ++++ caca/Makefile.am 2012-05-14 11:39:48.458807793 +0200 +@@ -55,7 +55,7 @@ libcaca_la_DEPENDENCIES = \ $(NULL) libcaca_la_CPPFLAGS = $(AM_CPPFLAGS) @CACA_CFLAGS@ -D__LIBCACA__ libcaca_la_LDFLAGS = -no-undefined -version-number @LT_VERSION@ --libcaca_la_LIBADD = @CACA_LIBS@ $(ZLIB_LIBS) -+libcaca_la_LIBADD = @CACA_LIBS@ $(ZLIB_LIBS) -lGLU +-libcaca_la_LIBADD = @CACA_LIBS@ $(ZLIB_LIBS) $(GETOPT_LIBS) ++libcaca_la_LIBADD = @CACA_LIBS@ $(ZLIB_LIBS) $(GETOPT_LIBS) -lGLU codec_source = \ codec/import.c \ diff --git a/libcaca-0.99.beta17.tar.gz b/libcaca-0.99.beta17.tar.gz deleted file mode 100644 index 3c163cd..0000000 --- a/libcaca-0.99.beta17.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6355ae9e3961e983ef66057a232d25f1fba2e7fa615d7591aba011d78764f1d6 -size 1110516 diff --git a/libcaca-0.99.beta18.tar.gz b/libcaca-0.99.beta18.tar.gz new file mode 100644 index 0000000..3217d7d --- /dev/null +++ b/libcaca-0.99.beta18.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77ea06633f4a6022dccd4f76c1823e167a40cb05308fc1c7ea0fa1f80f6c33a1 +size 1168552 diff --git a/libcaca-ruby_vendor_install.patch b/libcaca-ruby_vendor_install.patch index d2df067..7beb847 100644 --- a/libcaca-ruby_vendor_install.patch +++ b/libcaca-ruby_vendor_install.patch @@ -1,10 +1,16 @@ Index: configure.ac =================================================================== ---- configure.ac.orig 2011-01-29 12:09:24.385753017 +0200 -+++ configure.ac 2011-01-29 12:09:54.937754460 +0200 -@@ -471,12 +471,12 @@ if test "${enable_ruby}" != "no"; then +--- configure.ac.orig 2012-05-14 11:56:04.447928052 +0200 ++++ configure.ac 2012-05-14 12:03:02.562272828 +0200 +@@ -462,14 +462,17 @@ ac_cv_my_have_ruby="no" + if test "${enable_ruby}" != "no"; then + AC_PATH_PROG(RUBY, ruby, no) if test "${RUBY}" != "no"; then - RUBY_CFLAGS="-I$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"archdir"@:>@')" +- RUBY_CFLAGS="-I$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"archdir"@:>@')" ++ RUBY_CFLAGS=$(pkg-config --cflags ruby-1.9) ++ if test -z "$RUBY_CFLAGS"; then ++ RUBY_CFLAGS="-I$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"archdir"@:>@')" ++ fi RUBY_LIBS="-L$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"libdir"@:>@') -l$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"RUBY_SO_NAME"@:>@')" - RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"sitearchdir"@:>@'` - RUBY_SITELIBDIR=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"sitelibdir"@:>@'` @@ -21,8 +27,8 @@ Index: configure.ac [ac_cv_my_have_ruby="yes" Index: ruby/Makefile.am =================================================================== ---- ruby/Makefile.am.orig 2011-01-29 12:09:52.514753254 +0200 -+++ ruby/Makefile.am 2011-01-29 12:09:54.938755226 +0200 +--- ruby/Makefile.am.orig 2012-05-14 11:56:04.460927441 +0200 ++++ ruby/Makefile.am 2012-05-14 11:56:04.474926783 +0200 @@ -1,10 +1,10 @@ -rubylibdir = $(RUBY_SITEARCHDIR) @@ -37,3 +43,118 @@ Index: ruby/Makefile.am TESTS = test endif +Index: ruby/caca-canvas.c +=================================================================== +--- ruby/caca-canvas.c.orig 2010-02-16 00:49:40.000000000 +0100 ++++ ruby/caca-canvas.c 2012-05-14 12:05:27.623453608 +0200 +@@ -274,7 +274,7 @@ static VALUE draw_polyline(VALUE self, V + int error = 0; + VALUE v, x, y; + +- n = RARRAY(points)->len; ++ n = RARRAY_LEN(points); + + ax = (int*)malloc(n*sizeof(int)); + if(!ax) +@@ -290,7 +290,7 @@ static VALUE draw_polyline(VALUE self, V + for(i=0; ilen == 2)) ++ if((TYPE(v) == T_ARRAY) && (RARRAY_LEN(v) == 2)) + { + x = rb_ary_entry(v,0); + y = rb_ary_entry(v,1); +@@ -336,7 +336,7 @@ static VALUE draw_thin_polyline(VALUE se + int error = 0; + VALUE v, x, y; + +- n = RARRAY(points)->len; ++ n = RARRAY_LEN(points); + + ax = (int*)malloc(n*sizeof(int)); + if(!ax) +@@ -352,7 +352,7 @@ static VALUE draw_thin_polyline(VALUE se + for(i=0; ilen == 2)) ++ if((TYPE(v) == T_ARRAY) && (RARRAY_LEN(v) == 2)) + { + x = rb_ary_entry(v,0); + y = rb_ary_entry(v,1); +@@ -459,7 +459,7 @@ static VALUE fill_triangle_textured(VALU + float cuv[6]; + VALUE v; + +- l = RARRAY(coords)->len; ++ l = RARRAY_LEN(coords); + if(l != 6 && l != 3) + { + rb_raise(rb_eArgError, "invalid coords list"); +@@ -471,14 +471,14 @@ static VALUE fill_triangle_textured(VALU + ccoords[i] = NUM2INT(v); + else + { +- if((TYPE(v) != T_ARRAY) || (RARRAY(v)->len != 2)) ++ if((TYPE(v) != T_ARRAY) || (RARRAY_LEN(v) != 2)) + rb_raise(rb_eArgError, "invalid coords list"); + ccoords[2*i] = NUM2INT(rb_ary_entry(v, 0)); + ccoords[2*i+1] = NUM2INT(rb_ary_entry(v, 1)); + } + } + +- l = RARRAY(uv)->len; ++ l = RARRAY_LEN(uv); + if(l != 6 && l != 3) + { + rb_raise(rb_eArgError, "invalid uv list"); +@@ -490,7 +490,7 @@ static VALUE fill_triangle_textured(VALU + cuv[i] = NUM2DBL(v); + else + { +- if((TYPE(v) != T_ARRAY) || (RARRAY(v)->len != 2)) ++ if((TYPE(v) != T_ARRAY) || (RARRAY_LEN(v) != 2)) + rb_raise(rb_eArgError, "invalid uv list"); + ccoords[2*i] = NUM2DBL(rb_ary_entry(v, 0)); + ccoords[2*i+1] = NUM2DBL(rb_ary_entry(v, 1)); +@@ -600,7 +600,7 @@ static VALUE render_canvas(VALUE self, V + static VALUE import_from_memory(VALUE self, VALUE data, VALUE format) + { + long int bytes; +- bytes = caca_import_canvas_from_memory (_SELF, StringValuePtr(data), RSTRING(StringValue(data))->len, StringValuePtr(format)); ++ bytes = caca_import_canvas_from_memory (_SELF, StringValuePtr(data), RSTRING_LEN(StringValue(data)), StringValuePtr(format)); + if(bytes <= 0) + rb_raise(rb_eRuntimeError, strerror(errno)); + +@@ -610,7 +610,7 @@ static VALUE import_from_memory(VALUE se + static VALUE import_area_from_memory(VALUE self, VALUE x, VALUE y, VALUE data, VALUE format) + { + long int bytes; +- bytes = caca_import_area_from_memory (_SELF, NUM2INT(x), NUM2INT(y), StringValuePtr(data), RSTRING(StringValue(data))->len, StringValuePtr(format)); ++ bytes = caca_import_area_from_memory (_SELF, NUM2INT(x), NUM2INT(y), StringValuePtr(data), RSTRING_LEN(StringValue(data)), StringValuePtr(format)); + if(bytes <= 0) + rb_raise(rb_eRuntimeError, strerror(errno)); + +Index: ruby/caca-dither.c +=================================================================== +--- ruby/caca-dither.c.orig 2010-02-16 00:49:47.000000000 +0100 ++++ ruby/caca-dither.c 2012-05-14 12:06:49.420608093 +0200 +@@ -48,7 +48,7 @@ static VALUE set_dither_palette(VALUE se + VALUE v, r, g, b, a; + int error = 0; + +- if(RARRAY(palette)->len != 256) ++ if(RARRAY_LEN(palette) != 256) + { + rb_raise(rb_eArgError, "Palette must contain 256 elements"); + } +@@ -84,7 +84,7 @@ static VALUE set_dither_palette(VALUE se + for(i=0; i<256; i++) + { + v = rb_ary_entry(palette, i); +- if((TYPE(v) == T_ARRAY) && (RARRAY(v)->len == 4)) ++ if((TYPE(v) == T_ARRAY) && (RARRAY_LEN(v) == 4)) + { + r = rb_ary_entry(v,0); + g = rb_ary_entry(v,1); diff --git a/libcaca.changes b/libcaca.changes index 8a9041b..819ab1f 100644 --- a/libcaca.changes +++ b/libcaca.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon May 14 09:29:06 UTC 2012 - coolo@suse.com + +- update to libcaca-0.99beta18 + - new "cacaclock" utility + - improved FIGlet support + - improved Python and Ruby bindings + - numerous improvements and bugfixes +- fix build with ruby 1.9 and re-enable python support + ------------------------------------------------------------------- Sun Nov 13 09:14:01 UTC 2011 - coolo@suse.com diff --git a/libcaca.spec b/libcaca.spec index f5a0bad..adf367a 100644 --- a/libcaca.spec +++ b/libcaca.spec @@ -1,7 +1,7 @@ # # spec file for package libcaca # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,20 +17,32 @@ %define withjava 0 -%define withpython 0 +%define withpython 1 Name: libcaca -BuildRequires: doxygen freetype2-devel imlib2-devel ncurses-devel pkgconfig -BuildRequires: fdupes slang-devel xorg-x11 xorg-x11-devel +BuildRequires: doxygen +BuildRequires: fdupes +BuildRequires: freetype2-devel +BuildRequires: imlib2-devel BuildRequires: libtool +BuildRequires: ncurses-devel +BuildRequires: pkgconfig +BuildRequires: slang-devel +BuildRequires: xorg-x11 +BuildRequires: xorg-x11-devel #texlive-latex -BuildRequires: freeglut-devel ftgl-devel xorg-x11-libs -BuildRequires: gcc-c++ java-devel mono-devel python-devel ruby-devel -%{py_requires} -Version: 0.99.beta17 -Release: 6 -License: WTFPL +BuildRequires: freeglut-devel +BuildRequires: ftgl-devel +BuildRequires: gcc-c++ +BuildRequires: java-devel +BuildRequires: mono-devel +BuildRequires: python-devel +BuildRequires: ruby-devel +BuildRequires: xorg-x11-libs +Version: 0.99.beta18 +Release: 0 Summary: Library for Colour ASCII Art, text mode graphics +License: WTFPL Group: Development/Languages/C and C++ Url: http://sam.zoy.org/projects/libcaca/ Source0: http://caca.zoy.org/files/libcaca/%{name}-%{version}.tar.gz @@ -50,25 +62,13 @@ functions for colour text drawing, simple primitives for line, polygon and ellipse drawing, as well as powerful image to text conversion routines. - - -Authors: --------- - Sam Hocevar - Jean-Yves Lamoureux - %package -n libcaca0 -License: WTFPL Summary: Library for Colour ASCII Art, text mode graphics Group: Development/Languages/C and C++ Provides: libcaca = %{version} Obsoletes: libcaca < %{version} %if 0%{?suse_version} <= 1110 -%ifarch == x86_64 -%define python_sitelib /usr/lib64/python2.6/site-packages -%else -%define python_sitelib /usr/lib/python2.6/site-packages -%endif +%define python_sitelib %_libdir/python2.6/site-packages %endif %description -n libcaca0 @@ -77,13 +77,6 @@ functions for colour text drawing, simple primitives for line, polygon and ellipse drawing, as well as powerful image to text conversion routines. - - -Authors: --------- - Sam Hocevar - Jean-Yves Lamoureux - %if "%(pkg-config --variable prefix x11 || echo /usr/X11R6)" == "/usr" %define _xorg7libs %{_libdir} %else @@ -91,7 +84,6 @@ Authors: %endif %package devel -License: WTFPL Summary: Library for Colour ASCII Art, text mode graphics Group: Development/Languages/C and C++ #yes, nothing else is required to link other applications with "libcaca" @@ -105,15 +97,7 @@ Requires: %{name}0-java = %{version} This package contains the header files and static libraries needed to compile applications or shared objects that use libcaca. - - -Authors: --------- - Sam Hocevar - Jean-Yves Lamoureux - %package csharp -License: WTFPL Summary: C# support for libcaca Group: Development/Languages/Mono Requires: %{name} = %{version} @@ -122,17 +106,9 @@ Requires: mono %description csharp This package contains all that is needed to use libcaca from C# code. - - -Authors: --------- - Sam Hocevar - Jean-Yves Lamoureux - %if 0%{?withjava} == 1 %package -n libcaca0-java -License: WTFPL Summary: Java support for libcaca Group: Development/Languages/Java Requires: %{name} = %{version} @@ -141,21 +117,15 @@ Requires: java %description -n libcaca0-java This package contains all that is needed to use libcaca from java. - - -Authors: --------- - Sam Hocevar - Jean-Yves Lamoureux %endif %if 0%{?withpython} == 1 %package python -License: WTFPL Summary: Python support for libcaca Group: Development/Languages/Python -Requires: %{name} = %{version} python-base = %{py_ver} +Requires: %{name} = %{version} +Requires: python-base = %{py_ver} %if 0%{?suse_version} >= 1120 BuildArch: noarch %endif @@ -163,16 +133,9 @@ BuildArch: noarch %description python This package contains all that is needed to use libcaca from python. - - -Authors: --------- - Sam Hocevar - Jean-Yves Lamoureux %endif %package -n libcaca0-plugins -License: WTFPL Summary: Plugins for libcaca Group: Development/Languages/C and C++ Requires: %{name} = %{version} @@ -180,31 +143,16 @@ Requires: %{name} = %{version} %description -n libcaca0-plugins This package contains gl and x11 plugins for caca. - - -Authors: --------- - Sam Hocevar - Jean-Yves Lamoureux - %package ruby -License: WTFPL Summary: Ruby bindings for libcaca Group: Development/Languages/Ruby -Requires: %{name} = %{version} ruby +Requires: %{name} = %{version} +Requires: ruby %description ruby All that is needed to use libcaca from ruby code. - - -Authors: --------- - Sam Hocevar - Jean-Yves Lamoureux - %package -n caca-utils -License: WTFPL Summary: Colour ASCII Art Text mode graphics utilities based on libcaca Group: Amusements/Toys/Graphics @@ -290,9 +238,6 @@ export CXXFLAGS="$CXXFLAGS %{optflags}" %postun -n libcaca0-java -p /sbin/ldconfig %endif -%clean -%{__rm} -rf %{buildroot} - %files -n libcaca0 %defattr(-, root, root, 0755) %doc AUTHORS ChangeLog COPYING NEWS NOTES README THANKS @@ -372,6 +317,7 @@ export CXXFLAGS="$CXXFLAGS %{optflags}" %{_bindir}/cacafire %{_bindir}/cacaview %{_bindir}/cacaplay +%{_bindir}/cacaclock %{_bindir}/cacaserver %{_bindir}/img2txt %{_datadir}/libcaca