On Tue, 2015-01-13 at 21:11 +0100, Patrick Ohly wrote: > The if checks are unnecessarily complex at the moment because they get > created mechanically, without any logic for simplifying them. I intend > to add that shortly and will post an update when done, so please don't > get put off by that complexity in the meantime.
The enhanced merge-srpm.py script indeed produces much nicer output. As example I am attaching cairo.spec again. The work is not done completely yet (for example, ca-certificates still has unnecessary checks), but it shows already that this approach is viable. The "pohly" branch of meta-translator and the "sandbox/pohly/converter" branch of meta-tizen contain the necessary changes. -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter.
%bcond_with wayland %bcond_with x11 Name: cairo Version: 1.12.16 Release: 0 License: MPL-1.0 and LGPL-2.1 Summary: The Cairo 2D vector graphics library Group: Graphics & UI Framework/Libraries Url: http://cairographics.org Source0: http://cairographics.org/releases/cairo-1.12.16.tar.xz Source1: tizen-default.manifest Source2: file-list-generator.py Patch0: 0001-Remove-LTO-support.patch BuildRequires: autoconf BuildRequires: automake %if %{with x11} BuildRequires: libX11-devel BuildRequires: libsm-devel %endif BuildRequires: libtool %if %{with x11} BuildRequires: libxext-devel BuildRequires: libxrender-devel %endif BuildRequires: pkg-config BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(pixman-1) BuildRequires: python BuildRequires: zlib-devel %description Cairo is a multi-platform library providing anti-aliased vector-based rendering for multiple target backends. Paths consist of line segments and cubic splines and can be rendered at any width with various join and cap styles. All colors may be specified with optional translucence (opacity/alpha) and combined using the extended Porter/Duff compositing algebra as found in the X Render Extension. %package -n libcairo Summary: The Cairo 2D vector graphics library %description -n libcairo Cairo is a multi-platform library providing anti-aliased vector-based rendering for multiple target backends. Paths consist of line segments and cubic splines and can be rendered at any width with various join and cap styles. All colors may be specified with optional translucence (opacity/alpha) and combined using the extended Porter/Duff compositing algebra as found in the X Render Extension. %package -n cairo-gobject Summary: The Cairo library GObject wrapper library Group: Graphics & UI Framework/Libraries %description -n cairo-gobject A GObject wrapper library for the Cairo API. %package -n cairo-script-interpreter Summary: The Cairo library script interpreter Group: Graphics & UI Framework/Libraries %description -n cairo-script-interpreter The Cairo script interpreter implements CairoScript. CairoScript is used by tracing utilities to enable the ability to replay rendering. %package -n cairo-perf-utils Summary: The Cairo library performance utilities Group: Graphics & UI Framework/Libraries %description -n cairo-perf-utils The Cairo library performance utilities %package -n cairo-devel Summary: The Cairo 2D vector graphics library - Development files Group: Graphics & UI Framework/Libraries Requires: libcairo = %{version}-%{release} %description -n cairo-devel Cairo is a multi-platform library providing anti-aliased vector-based rendering for multiple target backends. Paths consist of line segments and cubic splines and can be rendered at any width with various join and cap styles. All colors may be specified with optional translucence (opacity/alpha) and combined using the extended Porter/Duff compositing algebra as found in the X Render Extension. This package contains symbolic links, header files, and related items necessary for software development. %package -n cairo-doc Summary: The Cairo 2D vector graphics library - Documentation files Group: Graphics & UI Framework/Libraries %description -n cairo-doc Cairo is a multi-platform library providing anti-aliased vector-based rendering for multiple target backends. Paths consist of line segments and cubic splines and can be rendered at any width with various join and cap styles. All colors may be specified with optional translucence (opacity/alpha) and combined using the extended Porter/Duff compositing algebra as found in the X Render Extension. This package contains documentation. %package -n cairo-locale Summary: The Cairo 2D vector graphics library Group: Graphics & UI Framework/Libraries %description -n cairo-locale Cairo is a multi-platform library providing anti-aliased vector-based rendering for multiple target backends. Paths consist of line segments and cubic splines and can be rendered at any width with various join and cap styles. All colors may be specified with optional translucence (opacity/alpha) and combined using the extended Porter/Duff compositing algebra as found in the X Render Extension. %prep %setup -q -n %{name}-%{version} %patch0 -p1 cp %{SOURCE1} . %build export ac_cv_lib_bfd_bfd_openr="no" export ac_cv_lib_lzo2_lzo2a_decompress="no" export CFLAGS=" -ffat-lto-objects" do_configure() { autotools_do_configure } autotools_do_configure() { if [ -e %{_builddir}/cairo-1.12.16/configure.in -o -e %{_builddir}/cairo-1.12.16/configure.ac ]; then if [ x"default" = xdefault ]; then acpaths= for i in `find %{_builddir}/cairo-1.12.16 -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \ grep -v 'acinclude.m4' | grep -v 'aclocal-copy' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do acpaths="$acpaths -I $i" done else acpaths="default" fi autoreconf --verbose --install --force --exclude=autopoint $acpaths fi if [ -e %{_builddir}/cairo-1.12.16/configure ]; then %configure \ %ifarch armv7l --disable-some-floating-point \ %endif --enable-tee \ --enable-egl=yes \ --enable-glesv2 \ --disable-valgrind \ %if %{with wayland} --without-x \ %endif %if %{with x11} --with-x=yes \ %endif fi } # Now configure do_configure cd %{_builddir}/%{name}-%{version} export ac_cv_lib_bfd_bfd_openr="no" export ac_cv_lib_lzo2_lzo2a_decompress="no" export CFLAGS=" -ffat-lto-objects" do_compile() { base_do_compile } base_do_compile() { make %{?_smp_mflags} } # Now build do_compile cd %{_builddir}/%{name}-%{version} %install export ac_cv_lib_bfd_bfd_openr="no" export ac_cv_lib_lzo2_lzo2a_decompress="no" export CFLAGS=" -ffat-lto-objects" do_install() { autotools_do_install rm -rf %{buildroot}%{_bindir}/cairo-sphinx rm -rf %{buildroot}%{_libdir}/cairo/cairo-fdr* rm -rf %{buildroot}%{_libdir}/cairo/cairo-sphinx* rm -rf %{buildroot}%{_libdir}/cairo/.debug/cairo-fdr* rm -rf %{buildroot}%{_libdir}/cairo/.debug/cairo-sphinx* } autotools_do_install() { %make_install } # Now install do_install cd %{_builddir}/%{name}-%{version} cat >sub-cairo-gobject-file.list <<EOF %{_libdir}/libcairo-gobject.so.* EOF cat >sub-cairo-script-interpreter-file.list <<EOF %{_libdir}/libcairo-script-interpreter.so.* EOF cat >sub-cairo-perf-utils-file.list <<EOF %{_bindir}/cairo-trace %{_libdir}/cairo/libcairo-trace.so.* EOF cat >sub-cairo-devel-file.list <<EOF %{_includedir} /lib/lib*.so %{_libdir}/lib*.so %{_libdir}/*.la %{_libdir}/*.o %{_libdir}/pkgconfig %{_datadir}/pkgconfig %{_datadir}/aclocal /lib/*.o %{_libdir}/cairo/*.la /lib/*.la %{_libdir}/cairo/*.la %{_libdir}/cairo/*.so EOF cat >sub-cairo-doc-file.list <<EOF %{_datadir}/doc %{_mandir} %{_infodir} %{_datadir}/gtk-doc %{_datadir}/gnome/help EOF cat >sub-cairo-locale-file.list <<EOF %{_datadir}/locale EOF cat >main-file.list <<EOF %{_libdir}/libcairo.so.* EOF %{__python} \ "$RPM_SOURCE_DIR/file-list-generator.py" \ -d \ '--compress=/(info|man)/' \ '%{buildroot}' \ sub-cairo-gobject \ sub-cairo-script-interpreter \ sub-cairo-perf-utils \ sub-cairo-devel \ sub-cairo-doc \ sub-cairo-locale \ main \ %post -n cairo-gobject -p /sbin/ldconfig %postun -n cairo-gobject -p /sbin/ldconfig %post -n cairo-script-interpreter -p /sbin/ldconfig %postun -n cairo-script-interpreter -p /sbin/ldconfig %post -n libcairo -p /sbin/ldconfig %postun -n libcairo -p /sbin/ldconfig %files -n libcairo -f main-spec.list %manifest tizen-default.manifest %files -n cairo-gobject -f sub-cairo-gobject-spec.list %manifest tizen-default.manifest %files -n cairo-script-interpreter -f sub-cairo-script-interpreter-spec.list %manifest tizen-default.manifest %files -n cairo-perf-utils -f sub-cairo-perf-utils-spec.list %manifest tizen-default.manifest %files -n cairo-devel -f sub-cairo-devel-spec.list %manifest tizen-default.manifest %files -n cairo-doc -f sub-cairo-doc-spec.list %manifest tizen-default.manifest %files -n cairo-locale -f sub-cairo-locale-spec.list %manifest tizen-default.manifest
_______________________________________________ Dev mailing list [email protected] https://lists.tizen.org/listinfo/dev
