+# Conditional build stuff; see /usr/lib/rpm/macros. bcond_without
+# defaults to WITH, and vice versa. Yes, it's ass-backward. Blame PLD.
+%bcond_without module_loader_edb
+%bcond_without module_loader_eet
+%bcond_without module_loader_jpeg
+%bcond_without module_loader_png
+%bcond_without module_saver_edb
+%bcond_without module_saver_eet
+%bcond_without module_saver_jpeg
+%bcond_without module_saver_png
+%bcond_without module_engine_buffer
+%bcond_with module_engine_cairo_x11
+%bcond_without module_engine_directfb
+%bcond_without module_engine_fb
+%bcond_without module_engine_gl_x11
+%bcond_with module_engine_software_qtopia
+%bcond_without module_engine_software_x11
+%bcond_with module_engine_software_xcb
+%bcond_without module_engine_xrender_x11
+
+# This just keeps a missing doxygen from killing the build.
%define _missing_doc_files_terminate_build 0
Summary: Multi-platform Canvas Library
Name: @PACKAGE@
Version: @VERSION@
-Release: 0.20050908
+Release: 0.%(date '+%Y%m%d')
License: BSD
Group: System Environment/Libraries
URL: http://www.enlightenment.org/
%package module_loader_eet
Summary: EET Image loader module for Evas
Group: System Environment/Libraries
-BuildRequires: libeet-devel
+BuildRequires: eet-devel
%description module_loader_eet
EET Image loader module for Evas
+%define ac_with_module_loader_eet --enable-image-loader-eet
+%else
+%define ac_with_module_loader_eet --disable-image-loader-eet
%endif
%if %{with module_loader_edb}
%package module_loader_edb
Summary: EDB Image loader module for Evas
Group: System Environment/Libraries
-BuildRequires: libedb-devel
+BuildRequires: edb-devel
%description module_loader_edb
EDB Image loader module for Evas
+%define ac_with_module_loader_edb --enable-image-loader-edb
+%else
+%define ac_with_module_loader_edb --disable-image-loader-edb
%endif
%if %{with module_loader_jpeg}
BuildRequires: libjpeg-devel
%description module_loader_jpeg
JPEG Image loader module for Evas
+%define ac_with_module_loader_jpeg --enable-image-loader-jpeg
+%else
+%define ac_with_module_loader_jpeg --disable-image-loader-jpeg
%endif
%if %{with module_loader_png}
BuildRequires: zlib-devel
%description module_loader_png
PNG Image loader module for Evas
+%define ac_with_module_loader_png --enable-image-loader-png
+%else
+%define ac_with_module_loader_png --disable-image-loader-png
%endif
%if %{with module_saver_eet}
%package module_saver_eet
Summary: EET Image saver module for Evas
Group: System Environment/Libraries
-BuildRequires: libeet-devel
+BuildRequires: eet-devel
%description module_saver_eet
EET Image saver module for Evas
%endif
%package module_saver_edb
Summary: EDB Image saver module for Evas
Group: System Environment/Libraries
-BuildRequires: libedb-devel
+BuildRequires: edb-devel
%description module_saver_edb
EDB Image saver module for Evas
%endif
Group: System Environment/Libraries
%description module_engine_buffer
Buffer rendering engine module for Evas
+%define ac_with_module_engine_buffer --enable-buffer
+%else
+%define ac_with_module_engine_buffer --disable-buffer
%endif
-%if %{with module_engine_cairo}
-%package module_engine_cairo
+%if %{with module_engine_cairo_x11}
+%package module_engine_cairo_x11
Summary: Cairo under X11 rendering engine module for Evas
Group: System Environment/Libraries
BuildRequires: cairo-devel
-%description module_engine_cairo
+%description module_engine_cairo_x11
Cairo under X11 rendering engine module for Evas
%endif
%package module_engine_directfb
Summary: Directfb rendering engine module for Evas
Group: System Environment/Libraries
-BuildRequires: directfb-devel
+BuildRequires: DirectFB
%description module_engine_directfb
Directfb rendering engine module for Evas
+%define ac_with_module_engine_directfb --enable-directfb
+%else
+%define ac_with_module_engine_directfb --disable-directfb
%endif
%if %{with module_engine_fb}
Group: System Environment/Libraries
%description module_engine_fb
Framebuffer rendering engine module for Evas
+%define ac_with_module_engine_fb --enable-fb
+%else
+%define ac_with_module_engine_fb --disable-fb
%endif
-%if %{with module_engine_gl}
-%package module_engine_gl
+%if %{with module_engine_gl_x11}
+%package module_engine_gl_x11
Summary: OpenGL under X11 rendering engine module for Evas
Group: System Environment/Libraries
-BuildRequires: opengl-devel
-%description module_engine_gl
+#BuildSuggests: xorg-x11-devel, xorg-x11-Mesa-libGL
+BuildRequires: XFree86-devel
+%description module_engine_gl_x11
OpenGL under X11 rendering engine module for Evas
+%define ac_with_module_engine_gl_x11 --enable-gl-x11
+%else
+%define ac_with_module_engine_gl_x11 --disable-gl-x11
%endif
%if %{with module_engine_software_qtopia}
BuildRequires: qtopia-devel
%description module_engine_software_qtopia
Qtopia rendering engine module for Evas
+%define ac_with_module_engine_software_qtopia --enable-software-qtopia
+%else
+%define ac_with_module_engine_software_qtopia --disable-software-qtopia
%endif
%if %{with module_engine_software_x11}
%package module_engine_software_x11
Summary: Software X11 rendering engine module for Evas
Group: System Environment/Libraries
+#BuildSuggests: xorg-x11-devel
BuildRequires: XFree86-devel
%description module_engine_software_x11
Software X11 rendering engine module for Evas
+%define ac_with_module_engine_software_x11 --enable-software-x11
+%else
+%define ac_with_module_engine_software_x11 --disable-software-x11
%endif
%if %{with module_engine_software_xcb}
BuildRequires: xcb-devel
%description module_engine_software_xcb
Software XCB X11 rendering engine module for Evas
+%define ac_with_module_engine_software_xcb --enable-software-xcb
+%else
+%define ac_with_module_engine_software_xcb --disable-software-xcb
%endif
%if %{with module_engine_xrender_x11}
%package module_engine_xrender_x11
Summary: XRender rendering engine module for Evas
Group: System Environment/Libraries
+#BuildSuggests: xorg-x11-devel
BuildRequires: XFree86-devel
-BuildRequires: xrender-devel
+#BuildRequires: xrender-devel
%description module_engine_xrender_x11
XRender rendering engine module for Evas
+%define ac_with_module_engine_xrender_x11 --enable-xrender-x11
+%else
+%define ac_with_module_engine_xrender_x11 --disable-xrender-x11
%endif
%setup -q -n %{name}-%{version}
%build
-%{configure} --prefix=%{_prefix} --x-libraries=%{_prefix}/X11R6/%{_lib} $RPM_CONFIGURE_OPTS
+%{configure} --prefix=%{_prefix} --x-libraries=%{_prefix}/X11R6/%{_lib} \
+ %{ac_with_module_loader_edb} \
+ %{ac_with_module_loader_eet} \
+ %{ac_with_module_loader_jpeg} \
+ %{ac_with_module_loader_png} \
+ %{ac_with_module_saver_edb} \
+ %{ac_with_module_saver_eet} \
+ %{ac_with_module_saver_jpeg} \
+ %{ac_with_module_saver_png} \
+ %{ac_with_module_engine_buffer} \
+ %{ac_with_module_engine_directfb} \
+ %{ac_with_module_engine_fb} \
+ %{ac_with_module_engine_gl_x11} \
+ %{ac_with_module_engine_software_qtopia} \
+ %{ac_with_module_engine_software_x11} \
+ %{ac_with_module_engine_software_xcb} \
+ %{ac_with_module_engine_xrender_x11} \
+ $RPM_CONFIGURE_OPTS
%{__make} %{?_smp_mflags} %{?mflags}
test -x `which doxygen` && /bin/sh gendoc || :
%install
%{__make} %{?mflags_install} DESTDIR=$RPM_BUILD_ROOT install
+%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/modules/*/*/*/*a
%clean
test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
%{_libdir}/evas/modules/engines/buffer/@MODULE_ARCH@/module.so
%endif
-%if %{with module_engine_buffer}
-%files module_engine_buffer
-%defattr(-, root, root)
-%{_libdir}/evas/modules/engines/buffer/@MODULE_ARCH@/module.so
-%endif
-
%if %{with module_engine_cairo_x11}
%files module_engine_cairo_x11
%defattr(-, root, root)