Empty library created
authorStanislav Vorobiov <s.vorobiov@samsung.com>
Fri, 31 May 2013 12:47:34 +0000 (16:47 +0400)
committerStanislav Vorobiov <s.vorobiov@samsung.com>
Fri, 31 May 2013 12:47:34 +0000 (16:47 +0400)
Change-Id: Icd6bdea1c1e1e5a9d5478054eedff77a4f9e8e1b

AUTHORS [new file with mode: 0644]
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
autogen.sh [new file with mode: 0644]
configure.ac [new file with mode: 0644]
packaging/libtbm-emulator.spec [new file with mode: 0644]
src/Makefile.am [new file with mode: 0644]
src/tbm_bufmgr_emulator.c [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..523ec0b
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Stanislav Vorobiov <s.vorobiov@samsung.com>
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..52fd458
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,18 @@
+Copyright (C) 2000 - 2012 Samsung Electronics co., Ltd. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
+NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..af437a6
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = src
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/autogen.sh b/autogen.sh
new file mode 100644 (file)
index 0000000..904cd67
--- /dev/null
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..603227f
--- /dev/null
@@ -0,0 +1,60 @@
+#
+#  Permission is hereby granted, free of charge, to any person obtaining a
+#  copy of this software and associated documentation files (the "Software"),
+#  to deal in the Software without restriction, including without limitation
+#  on the rights to use, copy, modify, merge, publish, distribute, sub
+#  license, and/or sell copies of the Software, and to permit persons to whom
+#  the Software is furnished to do so, subject to the following conditions:
+#
+#  The above copyright notice and this permission notice (including the next
+#  paragraph) shall be included in all copies or substantial portions of the
+#  Software.
+#
+#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+AC_PREREQ(2.60)
+AC_INIT(libtbm-emulator, 1.0.0)
+AC_USE_SYSTEM_EXTENSIONS
+AC_CONFIG_SRCDIR([Makefile.am])
+AM_INIT_AUTOMAKE([dist-bzip2])
+
+AM_CONFIG_HEADER([config.h])
+
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+AC_PROG_CC
+
+AC_HEADER_STDC
+AC_SYS_LARGEFILE
+AC_FUNC_ALLOCA
+
+# Enable quiet compiles on automake 1.11.
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+PKG_CHECK_MODULES(LIBDRM, libdrm)
+PKG_CHECK_MODULES(LIBTBM, libtbm)
+
+LIBTBM_EMULATOR_CFLAGS="$LIBDRM_CFLAGS $LIBTBM_CFLAGS "
+LIBTBM_EMULATOR_LIBS="$LIBDRM_LIBS $LIBTBM_LIBS "
+AC_SUBST(LIBTBM_EMULATOR_CFLAGS)
+AC_SUBST(LIBTBM_EMULATOR_LIBS)
+
+bufmgr_dir=${libdir#*/}
+AC_SUBST(bufmgr_dir)
+
+AC_OUTPUT([
+       Makefile
+       src/Makefile])
+
+echo ""
+echo "CFLAGS  : $CFLAGS"
+echo "LDFLAGS : $LDFLAGS"
+echo "LIBTBM_EMULATOR_CFLAGS : $LIBTBM_EMULATOR_CFLAGS"
+echo "LIBTBM_EMULATOR_LIBS   : $LIBTBM_EMULATOR_LIBS"
+echo "bufmgr_dir : $bufmgr_dir"
+echo ""
diff --git a/packaging/libtbm-emulator.spec b/packaging/libtbm-emulator.spec
new file mode 100644 (file)
index 0000000..5761aaf
--- /dev/null
@@ -0,0 +1,43 @@
+Name:           libtbm-emulator
+Version:        0.1.0
+Release:        1
+License:        MIT
+Summary:        Tizen Buffer Manager - emulator backend
+Group:          System/Libraries
+Source0:        %{name}-%{version}.tar.gz
+
+BuildRequires:  pkgconfig(pthread-stubs)
+BuildRequires:  pkgconfig(libdrm)
+BuildRequires:  pkgconfig(libtbm)
+
+Requires:   libtbm
+Requires:   libdrm2
+
+%description
+description: ${summary}
+
+%prep
+%setup -q
+
+%build
+autoreconf -vfi
+./configure --prefix=%{_prefix} --libdir=%{_libdir}/bufmgr \
+            CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
+
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+
+%make_install
+
+%post
+if [ -f %{_libdir}/bufmgr/libtbm_default.so ]; then
+    rm -rf %{_libdir}/bufmgr/libtbm_default.so
+fi
+ln -s libtbm_emulator.so %{_libdir}/bufmgr/libtbm_default.so
+
+%postun -p /sbin/ldconfig
+
+%files
+%{_libdir}/bufmgr/libtbm_*.so*
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..9e7f1e6
--- /dev/null
@@ -0,0 +1,11 @@
+AM_CFLAGS = \
+       @LIBTBM_EMULATOR_CFLAGS@ \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/src
+
+libtbm_emulator_la_LTLIBRARIES = libtbm_emulator.la
+libtbm_emulator_ladir = /${bufmgr_dir}
+libtbm_emulator_la_LIBADD = @LIBTBM_EMULATOR_LIBS@
+
+libtbm_emulator_la_SOURCES = \
+       tbm_bufmgr_emulator.c
diff --git a/src/tbm_bufmgr_emulator.c b/src/tbm_bufmgr_emulator.c
new file mode 100644 (file)
index 0000000..e69de29