diff --git a/_service b/_service new file mode 100644 index 0000000..689d8ac --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + 0.99.beta19 + 0.99.beta19+git%cd.%h + https://github.com/cacalabs/libcaca.git + git + .git + enable + + + xz + *.tar + + + diff --git a/libcaca-0.99.beta19+git20171002.da28e96.tar.xz b/libcaca-0.99.beta19+git20171002.da28e96.tar.xz new file mode 100644 index 0000000..e7b0af5 --- /dev/null +++ b/libcaca-0.99.beta19+git20171002.da28e96.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb6966533f1e3c8762f5b5b8cd579921263c022e5817e9d61f517bdbd9dae2eb +size 629280 diff --git a/libcaca-0.99.beta19.tar.gz b/libcaca-0.99.beta19.tar.gz deleted file mode 100644 index 6b3434c..0000000 --- a/libcaca-0.99.beta19.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:128b467c4ed03264c187405172a4e83049342cc8cc2f655f53a2d0ee9d3772f4 -size 1203495 diff --git a/libcaca-ruby_am_cflags.patch b/libcaca-ruby_am_cflags.patch index e6a41d3..a4f9abe 100644 --- a/libcaca-ruby_am_cflags.patch +++ b/libcaca-ruby_am_cflags.patch @@ -1,9 +1,9 @@ Index: ruby/Makefile.am =================================================================== ---- ruby/Makefile.am.orig 2010-02-08 03:27:22.000000000 +0200 -+++ ruby/Makefile.am 2010-11-20 07:31:50.000000000 +0200 -@@ -8,7 +8,7 @@ rubysite_DATA = lib/caca.rb - TESTS = test +--- ruby/Makefile.am.orig ++++ ruby/Makefile.am +@@ -12,7 +12,7 @@ TESTS = test + endif endif -CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes diff --git a/libcaca-ruby_vendor_install.patch b/libcaca-ruby_vendor_install.patch index 6b368fd..3474ffb 100644 --- a/libcaca-ruby_vendor_install.patch +++ b/libcaca-ruby_vendor_install.patch @@ -1,19 +1,19 @@ Index: configure.ac =================================================================== ---- configure.ac.orig 2012-05-14 11:56:04.447928052 +0200 -+++ configure.ac 2012-05-14 12:03:02.562272828 +0200 -@@ -465,14 +465,17 @@ +--- configure.ac.orig ++++ configure.ac +@@ -475,14 +475,17 @@ ac_cv_my_have_ruby_minitest="no" if test "${enable_ruby}" != "no"; then AC_PATH_PROG(RUBY, ruby, no) if test "${RUBY}" != "no"; then -- RUBY_CFLAGS="$(ruby -r mkmf -e 'conf = RbConfig::CONFIG.merge("hdrdir" => $hdrdir, "arch_hdrdir" => $arch_hdrdir); print RbConfig::expand("#$INCFLAGS", conf)')" +- RUBY_CFLAGS="$("${RUBY}" -r mkmf -e 'conf = RbConfig::CONFIG.merge("hdrdir" => $hdrdir, "arch_hdrdir" => $arch_hdrdir); print RbConfig::expand("#$INCFLAGS", conf)')" + RUBY_CFLAGS=$(pkg-config --cflags ruby-1.9) + if test -z "$RUBY_CFLAGS"; then + RUBY_CFLAGS="-I$(ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"archdir"@:>@')" + fi - RUBY_LIBS="-L$(ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"libdir"@:>@') -l$(ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"RUBY_SO_NAME"@:>@')" -- RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"sitearchdir"@:>@'` -- RUBY_SITELIBDIR=`ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"sitelibdir"@:>@'` + RUBY_LIBS="-L$("${RUBY}" -r rbconfig -e 'print RbConfig::CONFIG@<:@"libdir"@:>@') -l$("${RUBY}" -r rbconfig -e 'print RbConfig::CONFIG@<:@"RUBY_SO_NAME"@:>@')" +- RUBY_SITEARCHDIR=`"${RUBY}" -r rbconfig -e 'print RbConfig::CONFIG@<:@"sitearchdir"@:>@'` +- RUBY_SITELIBDIR=`"${RUBY}" -r rbconfig -e 'print RbConfig::CONFIG@<:@"sitelibdir"@:>@'` + RUBY_VENDORARCHDIR=`ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"vendorarchdir"@:>@'` + RUBY_VENDORLIBDIR=`ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"vendorlibdir"@:>@'` AC_SUBST(RUBY_CFLAGS) @@ -27,9 +27,11 @@ Index: configure.ac [ac_cv_my_have_ruby="yes" Index: ruby/Makefile.am =================================================================== ---- 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 @@ +--- ruby/Makefile.am.orig ++++ ruby/Makefile.am +@@ -1,12 +1,12 @@ + + include $(top_srcdir)/build/autotools/common.am -rubylibdir = $(RUBY_SITEARCHDIR) -rubysitedir = $(RUBY_SITELIBDIR) @@ -40,6 +42,6 @@ Index: ruby/Makefile.am rubylib_LTLIBRARIES = caca.la -rubysite_DATA = lib/caca.rb +rubyvendor_DATA = lib/caca.rb + if USE_RUBY_MINITEST TESTS = test endif - diff --git a/libcaca.changes b/libcaca.changes index a4dcf60..802a756 100644 --- a/libcaca.changes +++ b/libcaca.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Tue Jan 23 10:18:53 UTC 2018 - tchvatal@suse.com + +- Switch to git repack service in order to get all the latest fixes + * like python3 porting of the bindings +- Update to version 0.99.beta19+git20171002.da28e96: + * img2text.c: fix width arg case in example + * ruby: require 'caca' instead of 'caca.so' + * Only fail the check-copyright test if more than 10 files are affected. + * Try to run Coverity from Travis CI. + * Add some missing breaks (thanks coverity) + * Fix header copyright. + * Fix a bug into the autorepeat trigger. +- Refresh patches: + * libcaca-ruby_am_cflags.patch + * libcaca-ruby_vendor_install.patch + +------------------------------------------------------------------- +Mon Jan 22 18:49:24 UTC 2018 - tchvatal@suse.com + +- Fix URL +- Mention github repo containing more changes +- Format with spec-cleaner +- Remove support for older distros lets stick with latest only +- Remove for years disabled mono and java integration code snippets +- Use python macros to build python instead of waiting for autotools +- Convert to pkgconfig style dependencies + ------------------------------------------------------------------- Fri Mar 11 09:19:33 UTC 2016 - hguo@suse.com diff --git a/libcaca.spec b/libcaca.spec index 4212d37..d7208c1 100644 --- a/libcaca.spec +++ b/libcaca.spec @@ -1,7 +1,7 @@ # # spec file for package libcaca # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,40 +16,18 @@ # -%define withjava 0 -%define withpython 1 -%bcond_with mono - +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: libcaca -BuildRequires: doxygen -BuildRequires: fdupes -BuildRequires: imlib2-devel -BuildRequires: libtool -BuildRequires: ncurses-devel -BuildRequires: pkgconfig -BuildRequires: slang-devel -BuildRequires: zlib-devel -#texlive-latex -BuildRequires: freeglut-devel -BuildRequires: ftgl-devel -BuildRequires: gcc-c++ -BuildRequires: java-devel -%if %{with mono} -BuildRequires: mono-devel -%endif -BuildRequires: pkgconfig -BuildRequires: python-devel -BuildRequires: ruby-devel -BuildRequires: pkgconfig(gl) -BuildRequires: pkgconfig(glu) -BuildRequires: pkgconfig(x11) -Version: 0.99.beta19 +Version: 0.99.beta19+git20171002.da28e96 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 +Url: http://caca.zoy.org/ +# Git: https://github.com/cacalabs/libcaca +#Source0: http://caca.zoy.org/files/libcaca/%{name}-%{version}.tar.gz +Source0: %{name}-%{version}.tar.xz Source1: baselibs.conf Patch1: libcaca-0.99-texbuild.patch Patch2: libcaca-X11_test.patch @@ -58,9 +36,23 @@ Patch5: libcaca-ruby_vendor_install.patch Patch7: libcaca-0.99.beta16-missing-GLU.patch Patch9: caca-no-build-date.patch Patch10: libcaca-ncurses6.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%define rb_vendorarch %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch} -%define rb_vendorlib %{_libdir}/ruby/vendor_ruby/%{rb_ver} +BuildRequires: %{python_module setuptools} +BuildRequires: doxygen +BuildRequires: fdupes +BuildRequires: freeglut-devel +BuildRequires: gcc-c++ +BuildRequires: libtool +BuildRequires: ncurses-devel +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: ruby-devel +BuildRequires: pkgconfig(ftgl) +BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(glu) +BuildRequires: pkgconfig(imlib2) +BuildRequires: pkgconfig(slang) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(zlib) %description libcaca is the Colour AsCii Art library. It provides high level @@ -73,9 +65,6 @@ 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 -%define python_sitelib %_libdir/python2.6/site-packages -%endif %description -n libcaca0 libcaca is the Colour AsCii Art library. It provides high level @@ -83,65 +72,36 @@ functions for colour text drawing, simple primitives for line, polygon and ellipse drawing, as well as powerful image to text conversion routines. -%if "%(pkg-config --variable prefix x11 || echo /usr/X11R6)" == "/usr" -%define _xorg7libs %{_libdir} -%else -%define _xorg7libs /usr/X11R6/%{_lib} -%endif - %package devel 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" Requires: %{name} = %{version} Requires: %{name}0-plugins = %{version} -%if 0%{?withjava} == 1 -Requires: %{name}0-java = %{version} -%endif %description devel This package contains the header files and static libraries needed to compile applications or shared objects that use libcaca. -%if %{with mono} -%package csharp -Summary: C# support for libcaca -Group: Development/Languages/Mono -Requires: %{name} = %{version} -Requires: mono - -%description csharp -This package contains all that is needed to use libcaca from C# code. -%endif - -%if 0%{?withjava} == 1 - -%package -n libcaca0-java -Summary: Java support for libcaca -Group: Development/Languages/Java -Requires: %{name} = %{version} -Requires: java - -%description -n libcaca0-java -This package contains all that is needed to use libcaca from java. - -%endif - -%if 0%{?withpython} == 1 - -%package python -Summary: Python support for libcaca +%package -n python2-caca +Summary: Python2 support for libcaca Group: Development/Languages/Python Requires: %{name} = %{version} -Requires: python-base = %{py_ver} -%if 0%{?suse_version} >= 1120 +Provides: %{name}-python = %{version} +Obsoletes: %{name}-python < %{version} +Provides: python-%{name} = %{version} BuildArch: noarch -%endif -%description python -This package contains all that is needed to use libcaca from python. +%description -n python2-caca +This package contains all that is needed to use libcaca from python2. -%endif +%package -n python3-caca +Summary: Python3 support for libcaca +Group: Development/Languages/Python +Requires: %{name} = %{version} +BuildArch: noarch + +%description -n python3-caca +This package contains all that is needed to use libcaca from python3. %package -n libcaca0-plugins Summary: Plugins for libcaca @@ -180,10 +140,8 @@ displays burning ASCII art flames, and cacademo is a simple application that shows the libcaca rendering features such as line and ellipses drawing, triangle filling and sprite blitting. - %prep -chmod 0644 %{S:0} -%setup -q -n libcaca-%{version} +%setup -q %patch2 %patch4 %patch5 @@ -195,66 +153,55 @@ RUBY="ruby-`echo %{rb_ver} | sed 's|\.[^\.]*$||'`" find . -type f -exec sed -i "s|ruby-1.9|$RUBY|" \{\} \; %build -autoreconf -fi +autoreconf -fvi export CFLAGS="$CFLAGS %{optflags} -I../caca/" export CXXFLAGS="$CXXFLAGS %{optflags}" -%configure --with-pic \ - --program-prefix="%{?_program_prefix}" \ +%configure \ --enable-slang \ --enable-ncurses \ --enable-x11 \ - --x-libraries=%{_xorg7libs} \ --enable-imlib2 \ --enable-gl \ - --enable-csharp \ + --enable-csharp=no \ --enable-doc \ --enable-shared=yes \ --enable-static=no \ --enable-conio=no \ --enable-plugins \ -%if 0%{?withjava} == 1 - --enable-java -%else - --enable-java=no -%endif -make %{?_smp_mflags} + --enable-java=no \ + --enable-python=no +make %{?_smp_mflags} V=1 + +pushd python +export LD_LIBRARY_PATH=$PWD/../caca/.libs/:$LD_LIBRARY_PATH +export LANG=en_US.UTF-8 +%python_build +popd %install -%makeinstall -%{__rm} -f %{buildroot}%{_libdir}/*.la -%{__rm} -f %{buildroot}%{_libdir}/caca/*.la -%if 0%{?withjava} == 1 -%{__rm} -f %{buildroot}%{_libdir}/jni/libcaca-java.la -%endif +%make_install +find %{buildroot} -type f -name "*.la" -delete -print + +pushd python +export LD_LIBRARY_PATH=$PWD/../caca/.libs/:$LD_LIBRARY_PATH +export LANG=en_US.UTF-8 +%python_install +popd +%python_expand %fdupes %{buildroot}%{$python_sitelib} -%fdupes -s %{buildroot}%{python_sitelib}/caca/ %fdupes -s %{buildroot}%{_mandir}/ -%if %{with mono} -%fdupes -s %{buildroot}%{_libdir}/mono -%endif %post -n libcaca0 -p /sbin/ldconfig - %postun -n libcaca0 -p /sbin/ldconfig - %post -n libcaca0-plugins -p /sbin/ldconfig - %postun -n libcaca0-plugins -p /sbin/ldconfig -%if 0%{?withjava} == 1 - -%post -n libcaca0-java -p /sbin/ldconfig - -%postun -n libcaca0-java -p /sbin/ldconfig -%endif - %files -n libcaca0 -%defattr(-, root, root, 0755) %doc AUTHORS ChangeLog COPYING NEWS NOTES README THANKS %{_libdir}/*.so.* %files devel -%defattr(-, root, root, 0755) +%{_datadir}/doc/libcaca-dev %dir %{_libdir}/caca %{_libdir}/*.so %{_libdir}/caca/libx11_plugin.so @@ -264,58 +211,20 @@ make %{?_smp_mflags} %{_includedir}/* %{_mandir}/man1/caca-config.1* %{_mandir}/man3/* -%{_datadir}/doc/libcaca-dev -%if 0%{?withjava} == 1 -%{_libdir}/jni/libcaca-java.so -%endif - -%if %{with mono} -%files csharp -%defattr(-, root, root, 0755) -%{_libdir}/mono -%endif %files ruby -%defattr(-, root, root, 0755) %{rb_vendorarch}/* %{rb_vendorlib}/caca.rb -%if 0%{?withjava} == 1 - -%files -n libcaca0-java -%defattr(-, root, root, 0755) -%{_libdir}/jni/libcaca-java.so.0 -%{_libdir}/jni/libcaca-java.so.0.0.0 -%{_datadir}/java/libjava.jar +%if %{with python2} +%files -n python2-caca +%{python2_sitelib}/* %endif -%if 0%{?withpython} == 1 - -%files python -%defattr(-, root, root, 0755) -%dir %{python_sitelib}/caca -%{python_sitelib}/caca/__init__.py -%{python_sitelib}/caca/__init__.pyc -%{python_sitelib}/caca/__init__.pyo -%{python_sitelib}/caca/canvas.py -%{python_sitelib}/caca/canvas.pyc -%{python_sitelib}/caca/canvas.pyo -%{python_sitelib}/caca/common.py -%{python_sitelib}/caca/common.pyc -%{python_sitelib}/caca/common.pyo -%{python_sitelib}/caca/display.py -%{python_sitelib}/caca/display.pyc -%{python_sitelib}/caca/display.pyo -%{python_sitelib}/caca/dither.py -%{python_sitelib}/caca/dither.pyc -%{python_sitelib}/caca/dither.pyo -%{python_sitelib}/caca/font.py -%{python_sitelib}/caca/font.pyc -%{python_sitelib}/caca/font.pyo -%endif +%files -n python3-caca +%{python3_sitelib}/* %files -n libcaca0-plugins -%defattr(-, root, root, 0755) %dir %{_libdir}/caca %{_libdir}/caca/libgl_plugin.so.0 %{_libdir}/caca/libgl_plugin.so.0.0.0 @@ -323,7 +232,6 @@ make %{?_smp_mflags} %{_libdir}/caca/libx11_plugin.so.0.0.0 %files -n caca-utils -%defattr(-, root, root, 0755) %{_bindir}/cacademo %{_bindir}/cacafire %{_bindir}/cacaview