forked from enlightenment/efl
this one was quite a huge work, but hopefully it's correct. NOTES: * removed vlc generic module, it should go into a separate package. * gstreamer is enabled by default (see --disable-gstreamer) * xine is disabled by default (see --enable-gstreamer) * generic is always built statically if supported * gstreamer and xine can't be configured as static (just lacks command line options, build system supports it) * v4l2 is enabled by default on linux if eeze is built (see --disable-v4l2) * emotion_test moved to src/tests/emotion and depends on EFL_ENABLE_TESTS (--with-tests), but is still installed if enabled. TODO (need your help!): * fix warnings with gstreamer and xine engine * call engine shutdown functions if building as static * remove direct usage of PACKAGE_*_DIR and use eina_prefix * add eina_prefix checkme file as evas and others * add support for $EFL_RUN_IN_TREE * create separate package for emotion_generic_modules * check docs hierarchy (doxygen is segv'in here) SVN revision: 82501devs/devilhorns/wayland_egl
parent
532284dbbe
commit
dfb84c1657
68 changed files with 5283 additions and 223 deletions
@ -1,5 +1,5 @@ |
||||
/** |
||||
* @page Examples Examples |
||||
* @page emotion_examples Emotion Examples |
||||
* |
||||
* Here is a page with some Emotion examples explained: |
||||
* |
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@ -0,0 +1,96 @@ |
||||
dnl use: EMOTION_MODULE_DEP_CHECK_XINE(want_engine) |
||||
dnl where want_engine = yes or static |
||||
AC_DEFUN([EMOTION_MODULE_DEP_CHECK_XINE], |
||||
[dnl |
||||
requirements="libxine >= 1.1.1" |
||||
if test "$1" = "static"; then |
||||
EFL_DEPEND_PKG([EMOTION], [EMOTION_MODULE_XINE], [${requirements}]) |
||||
else |
||||
PKG_CHECK_MODULES([EMOTION_MODULE_XINE], [${requirements}]) |
||||
fi |
||||
]) |
||||
|
||||
dnl use: EMOTION_MODULE_DEP_CHECK_GSTREAMER(want_static) |
||||
dnl where want_engine = yes or static |
||||
AC_DEFUN([EMOTION_MODULE_DEP_CHECK_GSTREAMER], |
||||
[dnl |
||||
GST_VER=0.10.2 |
||||
requirements="gstreamer-0.10 >= ${GST_VER} gstreamer-plugins-base-0.10 >= ${GST_VER} gstreamer-video-0.10 >= ${GST_VER} gstreamer-interfaces-0.10 >= ${GST_VER}" |
||||
have_gst_xoverlay="no" |
||||
if test "$1" = "static"; then |
||||
EFL_DEPEND_PKG([EMOTION], [EMOTION_MODULE_GSTREAMER], [${requirements}]) |
||||
else |
||||
PKG_CHECK_MODULES([EMOTION_MODULE_GSTREAMER], [${requirements}]) |
||||
fi |
||||
|
||||
if test "${want_x11_any}" = "yes"; then |
||||
if test "$1" = "static"; then # we need gstreamer cflags and libs to test xoverlay support |
||||
PKG_CHECK_MODULES([EMOTION_MODULE_GSTREAMER], [${requirements}]) |
||||
fi |
||||
CFLAGS_save="${CFLAGS}" |
||||
CFLAGS="${CFLAGS} ${EMOTION_MODULE_GSTREAMER_CFLAGS}" |
||||
AC_CHECK_HEADER([gst/interfaces/xoverlay.h], |
||||
[have_gst_xoverlay="old" # will check for "new" later with AC_CHECK_LIB() |
||||
AC_DEFINE(HAVE_XOVERLAY_H, 1, [Build with Gstreamer Xoverlay support])], |
||||
[AC_MSG_WARN([Building Gstreamer with X11 but no gst/interfaces/xoverlay.h found])], |
||||
[#include <gst/gst.h>]) |
||||
CFLAGS="${CFLAGS_save}" |
||||
|
||||
LDFLAGS_save=${LDFLAGS} |
||||
LDFLAGS="${LDFLAGS} ${EMOTION_MODULE_GSTREAMER_LIBS}" |
||||
AC_CHECK_LIB([gstinterfaces-0.10], [gst_x_overlay_set_window_handle], |
||||
[have_gst_xoverlay="new" |
||||
AC_DEFINE([HAVE_X_OVERLAY_SET], [1], [Use gst_x_overlay_set_window_handle instead of old deprecated gst_x_overlay_set_xwindow_id])]) |
||||
LDFLAGS="${LDFLAGS_save}" |
||||
fi |
||||
]) |
||||
|
||||
dnl use: EMOTION_MODULE_DEP_CHECK_GENERIC(want_static) |
||||
dnl where want_engine = yes or static |
||||
AC_DEFUN([EMOTION_MODULE_DEP_CHECK_GENERIC], []) |
||||
|
||||
dnl use: EMOTION_MODULE(name, want_engine) |
||||
dnl |
||||
dnl defines EMOTION_BUILD_NAME if it should be built |
||||
dnl defines EMOTION_STATIC_BUILD_NAME if should be built statically |
||||
dnl |
||||
AC_DEFUN([EMOTION_MODULE], |
||||
[ |
||||
m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl |
||||
m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl |
||||
|
||||
want_engine="$2" |
||||
want_static_engine="no" |
||||
have_engine="no" |
||||
have_emotion_module_[]DOWN="no" |
||||
|
||||
EMOTION_MODULE_[]m4_defn([UP])[]_CFLAGS="" |
||||
EMOTION_MODULE_[]m4_defn([UP])[]_LIBS="" |
||||
|
||||
if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic"; then |
||||
|
||||
m4_default([EMOTION_MODULE_DEP_CHECK_]m4_defn([UP]))([${want_engine}]) |
||||
|
||||
have_engine="yes" |
||||
if test "x${want_engine}" = "xstatic" ; then |
||||
have_emotion_module_[]DOWN="static" |
||||
want_static_engine="yes" |
||||
else |
||||
have_emotion_module_[]DOWN="yes" |
||||
fi |
||||
fi |
||||
|
||||
AC_DEFINE_IF(EMOTION_BUILD_[]UP, [test "${have_engine}" = "yes"], |
||||
[1], [Build $1 Evas engine]) |
||||
AM_CONDITIONAL(EMOTION_BUILD_[]UP, [test "${have_engine}" = "yes"]) |
||||
|
||||
AC_DEFINE_IF(EMOTION_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"], |
||||
[1], [Build $1 Evas engine inside libevas]) |
||||
AM_CONDITIONAL(EMOTION_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"]) |
||||
|
||||
AC_SUBST([EMOTION_MODULE_]m4_defn([UP])[_CFLAGS]) |
||||
AC_SUBST([EMOTION_MODULE_]m4_defn([UP])[_LIBS]) |
||||
|
||||
m4_popdef([UP]) |
||||
m4_popdef([DOWN]) |
||||
]) |
@ -0,0 +1,235 @@ |
||||
### Library |
||||
|
||||
lib_LTLIBRARIES += \ |
||||
lib/emotion/libemotion.la |
||||
|
||||
EMOTION_COMMON_CPPFLAGS = \ |
||||
-I$(top_srcdir)/src/lib/eina \ |
||||
-I$(top_builddir)/src/lib/eina \ |
||||
-I$(top_srcdir)/src/lib/eo \ |
||||
-I$(top_builddir)/src/lib/eo \ |
||||
-I$(top_srcdir)/src/lib/ecore \ |
||||
-I$(top_builddir)/src/lib/ecore \ |
||||
-I$(top_srcdir)/src/lib/ecore_x \ |
||||
-I$(top_builddir)/src/lib/ecore_x \ |
||||
-I$(top_srcdir)/src/lib/ecore_input \ |
||||
-I$(top_builddir)/src/lib/ecore_input \ |
||||
-I$(top_srcdir)/src/lib/ecore_evas \ |
||||
-I$(top_builddir)/src/lib/ecore_evas \ |
||||
-I$(top_srcdir)/src/lib/eet \ |
||||
-I$(top_builddir)/src/lib/eet \ |
||||
-I$(top_srcdir)/src/lib/evas \ |
||||
-I$(top_builddir)/src/lib/evas \ |
||||
-I$(top_srcdir)/src/lib/eio \ |
||||
-I$(top_builddir)/src/lib/eio \ |
||||
-I$(top_srcdir)/src/lib/eeze \ |
||||
-I$(top_builddir)/src/lib/eeze \ |
||||
-I$(top_srcdir)/src/lib/emotion \ |
||||
-I$(top_builddir)/src/lib/emotion \ |
||||
@EFL_COV_CFLAGS@ \ |
||||
@EMOTION_CFLAGS@ |
||||
|
||||
EMOTION_COMMON_LDADD = \ |
||||
lib/eina/libeina.la \ |
||||
lib/eo/libeo.la \ |
||||
lib/ecore/libecore.la \ |
||||
lib/eet/libeet.la \ |
||||
lib/evas/libevas.la \ |
||||
lib/eio/libeio.la \ |
||||
@EFL_COV_LIBS@ |
||||
|
||||
if EMOTION_HAVE_V4L2 |
||||
EMOTION_COMMON_LDADD += lib/eeze/libeeze.la |
||||
endif |
||||
|
||||
installed_emotionmainheadersdir = $(includedir)/emotion-@VMAJ@ |
||||
dist_installed_emotionmainheaders_DATA = lib/emotion/Emotion.h |
||||
|
||||
# libemotion.la |
||||
lib_emotion_libemotion_la_SOURCES = \ |
||||
lib/emotion/emotion_private.h \ |
||||
lib/emotion/emotion_smart.c \ |
||||
lib/emotion/emotion_main.c |
||||
|
||||
EMOTION_COMMON_LIBADD = $(EMOTION_COMMON_LDADD) @EMOTION_LIBS@ |
||||
EMOTION_COMMON_LDADD += @EMOTION_LDFLAGS@ |
||||
EMOTION_COMMON_USER_LIBADD = $(EMOTION_COMMON_LIBADD) lib/emotion/libemotion.la |
||||
EMOTION_COMMON_USER_LDADD = $(EMOTION_COMMON_LDADD) lib/emotion/libemotion.la |
||||
|
||||
lib_emotion_libemotion_la_CPPFLAGS = \ |
||||
$(EMOTION_COMMON_CPPFLAGS) \ |
||||
-DPACKAGE_BIN_DIR=\"$(bindir)\" \ |
||||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \ |
||||
-DPACKAGE_DATA_DIR=\"$(datadir)/emotion\" \ |
||||
-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)\" \ |
||||
-DEFL_EMOTION_BUILD |
||||
|
||||
lib_emotion_libemotion_la_LIBADD = $(EMOTION_COMMON_LIBADD) |
||||
lib_emotion_libemotion_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@ |
||||
|
||||
## Modules |
||||
|
||||
# Xine |
||||
EMOTION_XINE_SOURCES = \ |
||||
modules/emotion/xine/emotion_xine.h \ |
||||
modules/emotion/xine/emotion_xine.c \ |
||||
modules/emotion/xine/emotion_xine_vo_out.c |
||||
|
||||
if EMOTION_STATIC_BUILD_XINE |
||||
lib_emotion_libemotion_la_SOURCES += $(EMOTION_XINE_SOURCES) |
||||
else |
||||
if EMOTION_BUILD_XINE |
||||
emotionmodulexinedir = $(libdir)/emotion/modules/xine/$(MODULE_ARCH) |
||||
emotionmodulexine_LTLIBRARIES = modules/emotion/xine/module.la |
||||
modules_emotion_xine_module_la_SOURCES = $(EMOTION_XINE_SOURCES) |
||||
modules_emotion_xine_module_la_CPPFLAGS = \ |
||||
$(EMOTION_COMMON_CPPFLAGS) \ |
||||
@EMOTION_MODULE_XINE_CFLAGS@ |
||||
modules_emotion_xine_module_la_LIBADD = \ |
||||
$(EMOTION_COMMON_USER_LIBADD) \ |
||||
@EMOTION_MODULE_XINE_LIBS@ |
||||
modules_emotion_xine_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ |
||||
modules_emotion_xine_module_la_LIBTOOLFLAGS = --tag=disable-static |
||||
endif |
||||
endif |
||||
|
||||
# Gstreamer |
||||
EMOTION_GSTREAMER_SOURCES = \ |
||||
modules/emotion/gstreamer/emotion_gstreamer.h \ |
||||
modules/emotion/gstreamer/emotion_gstreamer.c \ |
||||
modules/emotion/gstreamer/emotion_alloc.c \ |
||||
modules/emotion/gstreamer/emotion_convert.c \ |
||||
modules/emotion/gstreamer/emotion_fakeeos.c \ |
||||
modules/emotion/gstreamer/emotion_sink.c |
||||
|
||||
if EMOTION_STATIC_BUILD_GSTREAMER |
||||
lib_emotion_libemotion_la_SOURCES += $(EMOTION_GSTREAMER_SOURCES) |
||||
if HAVE_ECORE_X |
||||
EMOTION_COMMON_LDADD += \ |
||||
lib/ecore_evas/libecore_evas.la \ |
||||
lib/ecore_x/libecore_x.la |
||||
endif |
||||
else |
||||
if EMOTION_BUILD_GSTREAMER |
||||
emotionmodulegstreamerdir = $(libdir)/emotion/modules/gstreamer/$(MODULE_ARCH) |
||||
emotionmodulegstreamer_LTLIBRARIES = modules/emotion/gstreamer/module.la |
||||
modules_emotion_gstreamer_module_la_SOURCES = $(EMOTION_GSTREAMER_SOURCES) |
||||
modules_emotion_gstreamer_module_la_CPPFLAGS = \ |
||||
$(EMOTION_COMMON_CPPFLAGS) \ |
||||
@EMOTION_MODULE_GSTREAMER_CFLAGS@ |
||||
modules_emotion_gstreamer_module_la_LIBADD = \ |
||||
$(EMOTION_COMMON_USER_LIBADD) \ |
||||
@EMOTION_MODULE_GSTREAMER_LIBS@ |
||||
modules_emotion_gstreamer_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ |
||||
modules_emotion_gstreamer_module_la_LIBTOOLFLAGS = --tag=disable-static |
||||
if HAVE_ECORE_X |
||||
modules_emotion_gstreamer_module_la_LIBADD += \ |
||||
lib/ecore_evas/libecore_evas.la \ |
||||
lib/ecore_x/libecore_x.la |
||||
endif |
||||
endif |
||||
endif |
||||
|
||||
# Generic |
||||
EMOTION_GENERIC_SOURCES = \ |
||||
modules/emotion/generic/emotion_generic.h \ |
||||
modules/emotion/generic/emotion_generic.c |
||||
|
||||
if EMOTION_STATIC_BUILD_GENERIC |
||||
lib_emotion_libemotion_la_SOURCES += $(EMOTION_GENERIC_SOURCES) |
||||
else |
||||
if EMOTION_BUILD_GENERIC |
||||
emotionmodulegenericdir = $(libdir)/emotion/modules/generic/$(MODULE_ARCH) |
||||
emotionmodulegeneric_LTLIBRARIES = modules/emotion/generic/module.la |
||||
modules_emotion_generic_module_la_SOURCES = $(EMOTION_GENERIC_SOURCES) |
||||
modules_emotion_generic_module_la_CPPFLAGS = \ |
||||
$(EMOTION_COMMON_CPPFLAGS) |
||||
modules_emotion_generic_module_la_LIBADD = \ |
||||
$(EMOTION_COMMON_USER_LIBADD) |
||||
modules_emotion_generic_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ |
||||
modules_emotion_generic_module_la_LIBTOOLFLAGS = --tag=disable-static |
||||
endif |
||||
endif |
||||
|
||||
if EMOTION_BUILD_GENERIC |
||||
dist_installed_emotionmainheaders_DATA += \ |
||||
modules/emotion/generic/Emotion_Generic_Plugin.h |
||||
endif |
||||
|
||||
|
||||
# Edje_External |
||||
emotionedjeexternaldir = $(libdir)/edje/modules/emotion/$(MODULE_ARCH) |
||||
emotionedjeexternal_LTLIBRARIES = edje_external/emotion/module.la |
||||
|
||||
edje_external_emotion_module_la_SOURCES = \ |
||||
edje_external/emotion/emotion.c |
||||
edje_external_emotion_module_la_CPPFLAGS = \ |
||||
$(EMOTION_COMMON_CPPFLAGS) \ |
||||
$(EDJE_COMMON_CPPFLAGS) |
||||
edje_external_emotion_module_la_LIBADD = \ |
||||
$(EMOTION_COMMON_USER_LIBADD) \ |
||||
$(EDJE_COMMON_USER_LIBADD) |
||||
edje_external_emotion_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ |
||||
edje_external_emotion_module_la_LIBTOOLFLAGS = --tag=disable-static |
||||
|
||||
### Binary |
||||
|
||||
### Unit tests |
||||
|
||||
if EFL_ENABLE_TESTS |
||||
|
||||
bin_PROGRAMS += tests/emotion/emotion_test |
||||
|
||||
tests_emotion_emotion_test_SOURCES = \ |
||||
tests/emotion/emotion_test_main.c |
||||
|
||||
tests_emotion_emotion_test_CPPFLAGS = \ |
||||
$(EMOTION_COMMON_CPPFLAGS) \ |
||||
-I$(top_srcdir)/src/lib/edje \ |
||||
-I$(top_builddir)/src/lib/edje \ |
||||
-DPACKAGE_BIN_DIR=\"$(bindir)\" \ |
||||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \ |
||||
-DPACKAGE_DATA_DIR=\"$(datadir)/emotion\" \ |
||||
-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)\" |
||||
|
||||
tests_emotion_emotion_test_LDADD = \ |
||||
$(EMOTION_COMMON_USER_LDADD) \ |
||||
lib/edje/libedje.la |
||||
|
||||
tests/emotion/data/theme.edj: tests/emotion/data/theme.edc |
||||
$(AM_V_EDJ)$(EDJE_CC) $(EDJE_CC_FLAGS) -id $(srcdir)/tests/emotion/data $< $@ |
||||
|
||||
EMOTION_DATA_FILES = \ |
||||
tests/emotion/data/bpause.png \ |
||||
tests/emotion/data/bplay.png \ |
||||
tests/emotion/data/bstop.png \ |
||||
tests/emotion/data/e_logo.png \ |
||||
tests/emotion/data/fr1.png \ |
||||
tests/emotion/data/fr2.png \ |
||||
tests/emotion/data/fr3.png \ |
||||
tests/emotion/data/fr4.png \ |
||||
tests/emotion/data/fr5.png \ |
||||
tests/emotion/data/fr6.png \ |
||||
tests/emotion/data/fr7.png \ |
||||
tests/emotion/data/h_slider.png \ |
||||
tests/emotion/data/icon.edc \ |
||||
tests/emotion/data/knob.png \ |
||||
tests/emotion/data/orb.png \ |
||||
tests/emotion/data/pnl.png \ |
||||
tests/emotion/data/sl.png \ |
||||
tests/emotion/data/theme.edc \ |
||||
tests/emotion/data/tiles.png \ |
||||
tests/emotion/data/video_frame_bottom.png \ |
||||
tests/emotion/data/video_frame_left.png \ |
||||
tests/emotion/data/video_frame_right.png \ |
||||
tests/emotion/data/video_frame_top.png \ |
||||
tests/emotion/data/whb.png \ |
||||
tests/emotion/data/window_inner_shadow.png |
||||
|
||||
emotiondatafilesdir = $(datadir)/emotion/data |
||||
emotiondatafiles_DATA = tests/emotion/data/theme.edj |
||||
endif |
||||
|
||||
EXTRA_DIST += \ |
||||
$(EMOTION_DATA_FILES) \ |
||||
modules/emotion/generic/README |
@ -0,0 +1,57 @@ |
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/lib/eina \ |
||||
-I$(top_srcdir)/src/lib/eo \ |
||||
-I$(top_srcdir)/src/lib/evas \ |
||||
-I$(top_srcdir)/src/lib/ecore \ |
||||
-I$(top_srcdir)/src/lib/ecore_evas \ |
||||
-I$(top_srcdir)/src/lib/emotion \ |
||||
-I$(top_builddir)/src/lib/eina \ |
||||
-I$(top_builddir)/src/lib/eo \ |
||||
-I$(top_builddir)/src/lib/evas \ |
||||
-I$(top_builddir)/src/lib/ecore \ |
||||
-I$(top_builddir)/src/lib/ecore_evas \ |
||||
-I$(top_builddir)/src/lib/emotion \ |
||||
@EMOTION_CFLAGS@ |
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/src/lib/eina/libeina.la \ |
||||
$(top_builddir)/src/lib/eo/libeo.la \ |
||||
$(top_builddir)/src/lib/evas/libevas.la \ |
||||
$(top_builddir)/src/lib/ecore/libecore.la \ |
||||
$(top_builddir)/src/lib/ecore_evas/libecore_evas.la \ |
||||
$(top_builddir)/src/lib/emotion/libemotion.la \ |
||||
@EMOTION_LDFLAGS@ |
||||
|
||||
EXTRA_PROGRAMS = \
|
||||
emotion_basic_example \ |
||||
emotion_generic_example \ |
||||
emotion_generic_subtitle_example \ |
||||
emotion_border_example \ |
||||
emotion_signals_example |
||||
|
||||
SRCS = \
|
||||
emotion_basic_example.c \ |
||||
emotion_generic_example.c \ |
||||
emotion_generic_subtitle_example.c \ |
||||
emotion_border_example.c \ |
||||
emotion_signals_example.c |
||||
|
||||
examples: $(EXTRA_PROGRAMS) |
||||
|
||||
clean-local: |
||||
rm -f $(EXTRA_PROGRAMS)
|
||||
|
||||
install-examples: |
||||
mkdir -p $(datadir)/emotion/examples
|
||||
$(install_sh_DATA) -c $(SRCS) $(datadir)/emotion/examples
|
||||
|
||||
uninstall-local: |
||||
for f in $(SRCS); do \
|
||||
rm -f $(datadir)/emotion/examples/$$f ; \
|
||||
done
|
||||
|
||||
if ALWAYS_BUILD_EXAMPLES |
||||
noinst_PROGRAMS = $(EXTRA_PROGRAMS)
|
||||
endif |