PTREL-546 fix: enable wayland build
authorJuan Zhao <juan.j.zhao@intel.com>
Tue, 17 Dec 2013 09:33:38 +0000 (17:33 +0800)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Mon, 15 Dec 2014 14:37:08 +0000 (15:37 +0100)
The display server based on X or Wayland, is now a choice of different profile in Tizen 3.0.
Basically and consistently, two macros were used "with wayland" and "with x".
Below summarize the combination of the macros:

    | wayland |  x  | meaning
    |---------------------------
    |   0     |  1  | pure X11 platform(no wayland)
    |   1     |  0  | pure wayland platform (no X11)
    |   1     |  1  | wayland but X compatibility
    |   0     |  0  | no X and no wayland

This method unifies the meaning and usage. Deploy this method to elementary package.

Change-Id: I761ef5a9b03493fe7e867282d4d3cd2a812d7482

packaging/elementary.spec

index f4bac6b..4e27458 100644 (file)
@@ -1,3 +1,5 @@
+%bcond_with wayland
+%bcond_with x
 Name:           elementary
 Version:        1.7.8
 Release:        2 
@@ -13,14 +15,17 @@ BuildRequires:  pkgconfig(ecore-evas)
 BuildRequires:  pkgconfig(ecore-fb)
 BuildRequires:  pkgconfig(ecore-file)
 BuildRequires:  pkgconfig(ecore-imf)
+%if %{with x}
 BuildRequires:  pkgconfig(ecore-x)
+BuildRequires:  pkgconfig(x11)
+%endif
 BuildRequires:  pkgconfig(edbus)
 BuildRequires:  pkgconfig(edje)
 BuildRequires:  pkgconfig(eet)
 BuildRequires:  pkgconfig(efreet)
 BuildRequires:  pkgconfig(eina)
 BuildRequires:  pkgconfig(evas)
-BuildRequires:  pkgconfig(x11)
+
 BuildRequires:  eet-tools
 BuildRequires:  python-devel
 
@@ -61,7 +66,15 @@ cp %{SOURCE1001} .
 
 %build
 
-%autogen --disable-static --enable-build-examples
+%autogen --disable-static \
+%if %{with wayland}
+         --enable-ecore-wayland \
+%endif
+%if !%{with x}
+         --disable-ecore-x \
+%endif
+         --enable-build-examples
+
 make %{?_smp_mflags}
 
 %install