PTREL-546:disable ecore-x in the X-Free enviroment 16/13816/1 accepted/tizen/mobile/20131218.175259 submit/tizen/20131218.093150
authorJuan Zhao <juan.j.zhao@intel.com>
Tue, 17 Dec 2013 02:14:34 +0000 (10:14 +0800)
committerJuan Zhao <juan.j.zhao@intel.com>
Tue, 17 Dec 2013 02:19:11 +0000 (10:19 +0800)
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 ecore package.

The gl implementation in mesa, will bring glX directly, and triggle the X
 dependency, so pkgconfig(gl) will also trigle X dependency, also clean this
 in !{with x} condition.

Change-Id: I093741d2a3730c8807574d88976c5b72396d36d7

packaging/ecore.spec

index fad3509..e310beb 100644 (file)
@@ -1,4 +1,5 @@
 %bcond_with wayland
+%bcond_with x
 
 Name:           ecore
 Version:        1.7.8
@@ -15,30 +16,36 @@ BuildRequires:  doxygen
 BuildRequires:  gettext-tools
 BuildRequires:  libgcrypt-devel
 %if %{with wayland}
-BuildRequires:  libwayland-egl
+BuildRequires:  pkgconfig(wayland-egl)
 BuildRequires:  pkgconfig(wayland-client)
 BuildRequires:  pkgconfig(wayland-cursor)
 BuildRequires:  pkgconfig(xkbcommon)
 %endif
+%if %{with x}
+BuildRequires:  pkgconfig(xcursor)
+BuildRequires:  pkgconfig(xrender)
+BuildRequires:  pkgconfig(xinerama)
+BuildRequires:  pkgconfig(xrandr)
+BuildRequires:  pkgconfig(xext)
+BuildRequires:  pkgconfig(xi)
+BuildRequires:  pkgconfig(xfixes)
+BuildRequires:  pkgconfig(xcomposite)
+BuildRequires:  pkgconfig(xdamage)
+BuildRequires:  pkgconfig(xextproto)
+BuildRequires:  pkgconfig(xtst)
+BuildRequires:  pkgconfig(xgesture)
+BuildRequires:  pkgconfig(x11)
+BuildRequires:  pkgconfig(ice)
+BuildRequires:  pkgconfig(xscrnsaver)
+BuildRequires:  pkgconfig(gl)
+%endif
 BuildRequires:  pkgconfig(eet)
 BuildRequires:  pkgconfig(egl)
 BuildRequires:  pkgconfig(eina)
 BuildRequires:  pkgconfig(evas)
-BuildRequires:  pkgconfig(gl)
 BuildRequires:  pkgconfig(glesv2)
 BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:  pkgconfig(ice)
 BuildRequires:  pkgconfig(pixman-1)
-BuildRequires:  pkgconfig(x11)
-BuildRequires:  pkgconfig(xcomposite)
-BuildRequires:  pkgconfig(xcursor)
-BuildRequires:  pkgconfig(xdamage)
-BuildRequires:  pkgconfig(xext)
-BuildRequires:  pkgconfig(xi)
-BuildRequires:  pkgconfig(xinerama)
-BuildRequires:  pkgconfig(xrandr)
-BuildRequires:  pkgconfig(xscrnsaver)
-BuildRequires:  pkgconfig(xt)
 
 %description
 Ecore is the event/X abstraction layer that makes doing selections,
@@ -70,6 +77,9 @@ cp %{SOURCE1001} .
 %if %{with wayland}
     --enable-ecore-wayland \
     --enable-ecore-evas-wayland-egl \
+%if !%{with x}
+    --disable-ecore-x  \
+%endif
 %endif
     --enable-glib-integration-always \
     --disable-static