Accepting request 568742 from multimedia:libs

- Drop the py2 bindings they fail to build using rpm macros and
  somehow ingnore LD_LIBRARY_PATH, anyway provide py3 variant and
  stick with that

- 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

- 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

OBS-URL: https://build.opensuse.org/request/show/568742
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libcaca?expand=0&rev=39
This commit is contained in:
Dominique Leuenberger 2018-01-26 12:37:39 +00:00 committed by Git OBS Bridge
commit fb608a5128
7 changed files with 120 additions and 181 deletions

15
_service Normal file
View File

@ -0,0 +1,15 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="version">0.99.beta19</param>
<param name="versionformat">0.99.beta19+git%cd.%h</param>
<param name="url">https://github.com/cacalabs/libcaca.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">
<param name="compression">xz</param>
<param name="file">*.tar</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cb6966533f1e3c8762f5b5b8cd579921263c022e5817e9d61f517bdbd9dae2eb
size 629280

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:128b467c4ed03264c187405172a4e83049342cc8cc2f655f53a2d0ee9d3772f4
size 1203495

View File

@ -1,9 +1,9 @@
Index: ruby/Makefile.am Index: ruby/Makefile.am
=================================================================== ===================================================================
--- ruby/Makefile.am.orig 2010-02-08 03:27:22.000000000 +0200 --- ruby/Makefile.am.orig
+++ ruby/Makefile.am 2010-11-20 07:31:50.000000000 +0200 +++ ruby/Makefile.am
@@ -8,7 +8,7 @@ rubysite_DATA = lib/caca.rb @@ -12,7 +12,7 @@ TESTS = test
TESTS = test endif
endif endif
-CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes -CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes

View File

@ -1,19 +1,19 @@
Index: configure.ac Index: configure.ac
=================================================================== ===================================================================
--- configure.ac.orig 2012-05-14 11:56:04.447928052 +0200 --- configure.ac.orig
+++ configure.ac 2012-05-14 12:03:02.562272828 +0200 +++ configure.ac
@@ -465,14 +465,17 @@ @@ -475,14 +475,17 @@ ac_cv_my_have_ruby_minitest="no"
if test "${enable_ruby}" != "no"; then if test "${enable_ruby}" != "no"; then
AC_PATH_PROG(RUBY, ruby, no) AC_PATH_PROG(RUBY, ruby, no)
if test "${RUBY}" != "no"; then 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) + RUBY_CFLAGS=$(pkg-config --cflags ruby-1.9)
+ if test -z "$RUBY_CFLAGS"; then + if test -z "$RUBY_CFLAGS"; then
+ RUBY_CFLAGS="-I$(ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"archdir"@:>@')" + RUBY_CFLAGS="-I$(ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"archdir"@:>@')"
+ fi + fi
RUBY_LIBS="-L$(ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"libdir"@:>@') -l$(ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"RUBY_SO_NAME"@:>@')" 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_SITEARCHDIR=`"${RUBY}" -r rbconfig -e 'print RbConfig::CONFIG@<:@"sitearchdir"@:>@'`
- RUBY_SITELIBDIR=`ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"sitelibdir"@:>@'` - RUBY_SITELIBDIR=`"${RUBY}" -r rbconfig -e 'print RbConfig::CONFIG@<:@"sitelibdir"@:>@'`
+ RUBY_VENDORARCHDIR=`ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"vendorarchdir"@:>@'` + RUBY_VENDORARCHDIR=`ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"vendorarchdir"@:>@'`
+ RUBY_VENDORLIBDIR=`ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"vendorlibdir"@:>@'` + RUBY_VENDORLIBDIR=`ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"vendorlibdir"@:>@'`
AC_SUBST(RUBY_CFLAGS) AC_SUBST(RUBY_CFLAGS)
@ -27,9 +27,11 @@ Index: configure.ac
[ac_cv_my_have_ruby="yes" [ac_cv_my_have_ruby="yes"
Index: ruby/Makefile.am Index: ruby/Makefile.am
=================================================================== ===================================================================
--- ruby/Makefile.am.orig 2012-05-14 11:56:04.460927441 +0200 --- ruby/Makefile.am.orig
+++ ruby/Makefile.am 2012-05-14 11:56:04.474926783 +0200 +++ ruby/Makefile.am
@@ -1,10 +1,10 @@ @@ -1,12 +1,12 @@
include $(top_srcdir)/build/autotools/common.am
-rubylibdir = $(RUBY_SITEARCHDIR) -rubylibdir = $(RUBY_SITEARCHDIR)
-rubysitedir = $(RUBY_SITELIBDIR) -rubysitedir = $(RUBY_SITELIBDIR)
@ -40,6 +42,6 @@ Index: ruby/Makefile.am
rubylib_LTLIBRARIES = caca.la rubylib_LTLIBRARIES = caca.la
-rubysite_DATA = lib/caca.rb -rubysite_DATA = lib/caca.rb
+rubyvendor_DATA = lib/caca.rb +rubyvendor_DATA = lib/caca.rb
if USE_RUBY_MINITEST
TESTS = test TESTS = test
endif endif

View File

@ -1,3 +1,38 @@
-------------------------------------------------------------------
Tue Jan 23 18:32:31 UTC 2018 - tchvatal@suse.com
- Drop the py2 bindings they fail to build using rpm macros and
somehow ingnore LD_LIBRARY_PATH, anyway provide py3 variant and
stick with that
-------------------------------------------------------------------
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 Fri Mar 11 09:19:33 UTC 2016 - hguo@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package libcaca # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,40 +16,16 @@
# #
%define withjava 0
%define withpython 1
%bcond_with mono
Name: libcaca Name: libcaca
BuildRequires: doxygen Version: 0.99.beta19+git20171002.da28e96
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
Release: 0 Release: 0
Summary: Library for Colour ASCII Art, text mode graphics Summary: Library for Colour ASCII Art, text mode graphics
License: WTFPL License: WTFPL
Group: Development/Languages/C and C++ Group: Development/Languages/C and C++
Url: http://sam.zoy.org/projects/libcaca/ Url: http://caca.zoy.org/
Source0: http://caca.zoy.org/files/libcaca/%{name}-%{version}.tar.gz # 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 Source1: baselibs.conf
Patch1: libcaca-0.99-texbuild.patch Patch1: libcaca-0.99-texbuild.patch
Patch2: libcaca-X11_test.patch Patch2: libcaca-X11_test.patch
@ -58,9 +34,23 @@ Patch5: libcaca-ruby_vendor_install.patch
Patch7: libcaca-0.99.beta16-missing-GLU.patch Patch7: libcaca-0.99.beta16-missing-GLU.patch
Patch9: caca-no-build-date.patch Patch9: caca-no-build-date.patch
Patch10: libcaca-ncurses6.patch Patch10: libcaca-ncurses6.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: doxygen
%define rb_vendorarch %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch} BuildRequires: fdupes
%define rb_vendorlib %{_libdir}/ruby/vendor_ruby/%{rb_ver} BuildRequires: freeglut-devel
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: python3-setuptools
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 %description
libcaca is the Colour AsCii Art library. It provides high level libcaca is the Colour AsCii Art library. It provides high level
@ -73,9 +63,6 @@ Summary: Library for Colour ASCII Art, text mode graphics
Group: Development/Languages/C and C++ Group: Development/Languages/C and C++
Provides: libcaca = %{version} Provides: libcaca = %{version}
Obsoletes: libcaca < %{version} Obsoletes: libcaca < %{version}
%if 0%{?suse_version} <= 1110
%define python_sitelib %_libdir/python2.6/site-packages
%endif
%description -n libcaca0 %description -n libcaca0
libcaca is the Colour AsCii Art library. It provides high level libcaca is the Colour AsCii Art library. It provides high level
@ -83,65 +70,24 @@ functions for colour text drawing, simple primitives for line, polygon
and ellipse drawing, as well as powerful image to text conversion and ellipse drawing, as well as powerful image to text conversion
routines. routines.
%if "%(pkg-config --variable prefix x11 || echo /usr/X11R6)" == "/usr"
%define _xorg7libs %{_libdir}
%else
%define _xorg7libs /usr/X11R6/%{_lib}
%endif
%package devel %package devel
Summary: Library for Colour ASCII Art, text mode graphics Summary: Library for Colour ASCII Art, text mode graphics
Group: Development/Languages/C and C++ Group: Development/Languages/C and C++
#yes, nothing else is required to link other applications with "libcaca"
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: %{name}0-plugins = %{version} Requires: %{name}0-plugins = %{version}
%if 0%{?withjava} == 1
Requires: %{name}0-java = %{version}
%endif
%description devel %description devel
This package contains the header files and static libraries needed to This package contains the header files and static libraries needed to
compile applications or shared objects that use libcaca. compile applications or shared objects that use libcaca.
%if %{with mono} %package -n python3-caca
%package csharp Summary: Python3 support for libcaca
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
Group: Development/Languages/Python Group: Development/Languages/Python
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: python-base = %{py_ver}
%if 0%{?suse_version} >= 1120
BuildArch: noarch BuildArch: noarch
%endif
%description python %description -n python3-caca
This package contains all that is needed to use libcaca from python. This package contains all that is needed to use libcaca from python3.
%endif
%package -n libcaca0-plugins %package -n libcaca0-plugins
Summary: Plugins for libcaca Summary: Plugins for libcaca
@ -180,10 +126,8 @@ displays burning ASCII art flames, and cacademo is a simple application
that shows the libcaca rendering features such as line and ellipses that shows the libcaca rendering features such as line and ellipses
drawing, triangle filling and sprite blitting. drawing, triangle filling and sprite blitting.
%prep %prep
chmod 0644 %{S:0} %setup -q
%setup -q -n libcaca-%{version}
%patch2 %patch2
%patch4 %patch4
%patch5 %patch5
@ -195,66 +139,53 @@ RUBY="ruby-`echo %{rb_ver} | sed 's|\.[^\.]*$||'`"
find . -type f -exec sed -i "s|ruby-1.9|$RUBY|" \{\} \; find . -type f -exec sed -i "s|ruby-1.9|$RUBY|" \{\} \;
%build %build
autoreconf -fi autoreconf -fvi
export CFLAGS="$CFLAGS %{optflags} -I../caca/" export CFLAGS="$CFLAGS %{optflags} -I../caca/"
export CXXFLAGS="$CXXFLAGS %{optflags}" export CXXFLAGS="$CXXFLAGS %{optflags}"
%configure --with-pic \ %configure \
--program-prefix="%{?_program_prefix}" \
--enable-slang \ --enable-slang \
--enable-ncurses \ --enable-ncurses \
--enable-x11 \ --enable-x11 \
--x-libraries=%{_xorg7libs} \
--enable-imlib2 \ --enable-imlib2 \
--enable-gl \ --enable-gl \
--enable-csharp \ --enable-csharp=no \
--enable-doc \ --enable-doc \
--enable-shared=yes \ --enable-shared=yes \
--enable-static=no \ --enable-static=no \
--enable-conio=no \ --enable-conio=no \
--enable-plugins \ --enable-plugins \
%if 0%{?withjava} == 1 --enable-java=no \
--enable-java --enable-python=no
%else make %{?_smp_mflags} V=1
--enable-java=no
%endif pushd python
make %{?_smp_mflags} export LD_LIBRARY_PATH=$PWD/../caca/.libs/:$LD_LIBRARY_PATH
export LANG=en_US.UTF-8
python3 setup.py build
popd
%install %install
%makeinstall %make_install
%{__rm} -f %{buildroot}%{_libdir}/*.la find %{buildroot} -type f -name "*.la" -delete -print
%{__rm} -f %{buildroot}%{_libdir}/caca/*.la
%if 0%{?withjava} == 1
%{__rm} -f %{buildroot}%{_libdir}/jni/libcaca-java.la
%endif
%fdupes -s %{buildroot}%{python_sitelib}/caca/ pushd python
export LD_LIBRARY_PATH=$PWD/../caca/.libs/:$LD_LIBRARY_PATH
export LANG=en_US.UTF-8
python3 setup.py install -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix}
popd
%fdupes -s %{buildroot}%{_mandir}/ %fdupes -s %{buildroot}%{_mandir}/
%if %{with mono}
%fdupes -s %{buildroot}%{_libdir}/mono
%endif
%post -n libcaca0 -p /sbin/ldconfig %post -n libcaca0 -p /sbin/ldconfig
%postun -n libcaca0 -p /sbin/ldconfig %postun -n libcaca0 -p /sbin/ldconfig
%post -n libcaca0-plugins -p /sbin/ldconfig %post -n libcaca0-plugins -p /sbin/ldconfig
%postun -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 %files -n libcaca0
%defattr(-, root, root, 0755)
%doc AUTHORS ChangeLog COPYING NEWS NOTES README THANKS %doc AUTHORS ChangeLog COPYING NEWS NOTES README THANKS
%{_libdir}/*.so.* %{_libdir}/*.so.*
%files devel %files devel
%defattr(-, root, root, 0755) %{_datadir}/doc/libcaca-dev
%dir %{_libdir}/caca %dir %{_libdir}/caca
%{_libdir}/*.so %{_libdir}/*.so
%{_libdir}/caca/libx11_plugin.so %{_libdir}/caca/libx11_plugin.so
@ -264,58 +195,15 @@ make %{?_smp_mflags}
%{_includedir}/* %{_includedir}/*
%{_mandir}/man1/caca-config.1* %{_mandir}/man1/caca-config.1*
%{_mandir}/man3/* %{_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 %files ruby
%defattr(-, root, root, 0755)
%{rb_vendorarch}/* %{rb_vendorarch}/*
%{rb_vendorlib}/caca.rb %{rb_vendorlib}/caca.rb
%if 0%{?withjava} == 1 %files -n python3-caca
%{python3_sitelib}/*
%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
%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 libcaca0-plugins %files -n libcaca0-plugins
%defattr(-, root, root, 0755)
%dir %{_libdir}/caca %dir %{_libdir}/caca
%{_libdir}/caca/libgl_plugin.so.0 %{_libdir}/caca/libgl_plugin.so.0
%{_libdir}/caca/libgl_plugin.so.0.0.0 %{_libdir}/caca/libgl_plugin.so.0.0.0
@ -323,7 +211,6 @@ make %{?_smp_mflags}
%{_libdir}/caca/libx11_plugin.so.0.0.0 %{_libdir}/caca/libx11_plugin.so.0.0.0
%files -n caca-utils %files -n caca-utils
%defattr(-, root, root, 0755)
%{_bindir}/cacademo %{_bindir}/cacademo
%{_bindir}/cacafire %{_bindir}/cacafire
%{_bindir}/cacaview %{_bindir}/cacaview