From 036e6f387486ad5dd35686e5ef13144350a8b6e1 Mon Sep 17 00:00:00 2001 From: Sangwon Ha Date: Fri, 17 Jul 2015 13:33:00 +0900 Subject: [PATCH] Change pkg name to libtpl-egl and ABI scheme - ABI now includes minor version - Remove yield function dependency on DDK Change-Id: I360af430a266b809944ca4047b3d915a1cb369ca --- Makefile | 5 ++--- packaging/{libtpl.spec => libtpl-egl.spec} | 32 +++++++++++++++++------------- pkgconfig/{tpl.pc => tpl-egl.pc} | 0 src/tpl.c | 3 ++- src/tpl_internal.h | 2 -- 5 files changed, 22 insertions(+), 20 deletions(-) rename packaging/{libtpl.spec => libtpl-egl.spec} (83%) rename pkgconfig/{tpl.pc => tpl-egl.pc} (100%) diff --git a/Makefile b/Makefile index 7ad1803..5e81038 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,9 @@ $(findstring -$1-,-$(TPL_OPTIONS)-) endef SRC_DIR = ./src -SO_NAME = libtpl.so.$(TPL_VER_MAJOR) -BIN_NAME = $(SO_NAME).$(TPL_VER_MINOR) +SO_NAME = libtpl-egl.so.$(TPL_VER_MAJOR).$(TPL_VER_MINOR) +BIN_NAME = $(SO_NAME).$(TPL_RELEASE) INST_DIR = $(libdir) -SO_VER = $(TPL_VER_MAJOR) CC ?= gcc diff --git a/packaging/libtpl.spec b/packaging/libtpl-egl.spec similarity index 83% rename from packaging/libtpl.spec rename to packaging/libtpl-egl.spec index f3ef8af..1ed9f2d 100644 --- a/packaging/libtpl.spec +++ b/packaging/libtpl-egl.spec @@ -1,7 +1,8 @@ %define TPL_VER_MAJOR 0 -%define TPL_VER_MINOR 1 +%define TPL_VER_MINOR 2 +%define TPL_RELEASE 1 %define TPL_VERSION %{TPL_VER_MAJOR}.%{TPL_VER_MINOR} -%define TPL_RELEASE 01 +%define TPL_VER_FULL %{TPL_VERSION}.%{TPL_RELEASE} %define WINSYS_DRI2 0 %define WINSYS_DRI3 0 @@ -11,7 +12,7 @@ ################################################################################ -Name: libtpl +Name: libtpl-egl Summary: Tizen Porting Layer for ARM Mali EGL %if "%{WINSYS_DRI2}" == "1" Version: %{TPL_VERSION}.dri2 @@ -101,18 +102,19 @@ This package contains the development libraries and header files. make -C src/wayland_module/gbm_tbm all %endif -%if "%{WINSYS_DRI2}" == "1" +%if "%{WINSYS_DRI2}" == "1" export TPL_OPTIONS=${TPL_OPTIONS}-winsys_dri2 %endif -%if "%{WINSYS_DRI3}" == "1" +%if "%{WINSYS_DRI3}" == "1" export TPL_OPTIONS=${TPL_OPTIONS}-winsys_dri3 %endif -%if "%{WINSYS_WL}" == "1" +%if "%{WINSYS_WL}" == "1" export TPL_OPTIONS=${TPL_OPTIONS}-winsys_wl %endif export TPL_VER_MAJOR=%{TPL_VER_MAJOR} export TPL_VER_MINOR=%{TPL_VER_MINOR} +export TPL_RELEASE=%{TPL_RELEASE} %if "%{ENABLE_TTRACE}" == "1" export TPL_OPTIONS=${TPL_OPTIONS}-ttrace @@ -127,9 +129,10 @@ mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_includedir} mkdir -p %{buildroot}%{_libdir}/pkgconfig -cp -a libtpl.so.%{TPL_VERSION} %{buildroot}%{_libdir}/ -ln -sf libtpl.so.%{TPL_VERSION} %{buildroot}%{_libdir}/libtpl.so.%{TPL_VER_MAJOR} -ln -sf libtpl.so.%{TPL_VER_MAJOR} %{buildroot}%{_libdir}/libtpl.so +cp -a libtpl-egl.so.%{TPL_VER_FULL} %{buildroot}%{_libdir}/ +ln -sf libtpl-egl.so.%{TPL_VER_FULL} %{buildroot}%{_libdir}/libtpl-egl.so.%{TPL_VERSION} +ln -sf libtpl-egl.so.%{TPL_VERSION} %{buildroot}%{_libdir}/libtpl-egl.so.%{TPL_VER_MAJOR} +ln -sf libtpl-egl.so.%{TPL_VER_MAJOR} %{buildroot}%{_libdir}/libtpl-egl.so cp -a src/tpl.h %{buildroot}%{_includedir}/ cp -a src/tpl_internal.h %{buildroot}%{_includedir}/ @@ -140,7 +143,7 @@ cp -a src/tpl_x11_internal.h %{buildroot}%{_includedir}/ %if "%{WINSYS_DRI3}" == "1" cp -a src/tpl_x11_internal.h %{buildroot}%{_includedir}/ %endif -cp -a pkgconfig/tpl.pc %{buildroot}%{_libdir}/pkgconfig/ +cp -a pkgconfig/tpl-egl.pc %{buildroot}%{_libdir}/pkgconfig/ %if "%{WINSYS_WL}" == "1" %makeinstall -C src/wayland_module/gbm_tbm @@ -152,9 +155,10 @@ cp -a pkgconfig/tpl.pc %{buildroot}%{_libdir}/pkgconfig/ %files %defattr(-,root,root,-) -%{_libdir}/libtpl.so -%{_libdir}/libtpl.so.%{TPL_VER_MAJOR} -%{_libdir}/libtpl.so.%{TPL_VER_MAJOR}.%{TPL_VER_MINOR} +%{_libdir}/libtpl-egl.so +%{_libdir}/libtpl-egl.so.%{TPL_VER_MAJOR} +%{_libdir}/libtpl-egl.so.%{TPL_VERSION} +%{_libdir}/libtpl-egl.so.%{TPL_VER_FULL} %files devel %defattr(-,root,root,-) @@ -167,7 +171,7 @@ cp -a pkgconfig/tpl.pc %{buildroot}%{_libdir}/pkgconfig/ %if "%{WINSYS_DRI3}" == "1" %{_includedir}/tpl_x11_internal.h %endif -%{_libdir}/pkgconfig/tpl.pc +%{_libdir}/pkgconfig/tpl-egl.pc %if "%{WINSYS_WL}" == "1" %files -n libgbm_tbm diff --git a/pkgconfig/tpl.pc b/pkgconfig/tpl-egl.pc similarity index 100% rename from pkgconfig/tpl.pc rename to pkgconfig/tpl-egl.pc diff --git a/src/tpl.c b/src/tpl.c index 7f96d30..b60a40d 100644 --- a/src/tpl.c +++ b/src/tpl.c @@ -53,7 +53,8 @@ void tpl_util_sys_yield(void) status = sched_yield(); if (0 != status) { - TPL_ERR("sched_yield failed, ret=%.8x\n", status); + /* non-fatal on error, warning is enough */ + TPL_WARN("Yield failed, ret=%.8x\n", status); } } diff --git a/src/tpl_internal.h b/src/tpl_internal.h index 5fd5b29..ad80a71 100644 --- a/src/tpl_internal.h +++ b/src/tpl_internal.h @@ -46,8 +46,6 @@ struct _tpl_egl_funcs int ptrdict_size; int ptrdict_iter_size; - void (*yield)(); - int (*atomic_get)(const tpl_util_osu_atomic * const atom); void (*atomic_set)(tpl_util_osu_atomic * const atom, int val); int (*atomic_inc)(tpl_util_osu_atomic * const atom); -- 2.7.4