-From eaa2806843ebbf1b91f11436de196b47b20bd035 Mon Sep 17 00:00:00 2001
+From c2294ecef0a8f90b9b8fadbe2c5e6493979247de Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 16 Dec 2011 22:08:41 +0400
Subject: [PATCH 1/1] Initial autotools support
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
- Makefile.am | 25 +++++++++
+ Makefile.am | 28 ++++++++++
autogen.sh | 7 +++
- configure.ac | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++
- source/Makefile.am | 66 +++++++++++++++++++++++
- source/libyuv.pc.in | 9 ++++
- 5 files changed, 255 insertions(+)
+ configure.ac | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ source/Makefile.am | 78 ++++++++++++++++++++++++++
+ source/libyuv.pc.in | 9 +++
+ 5 files changed, 278 insertions(+)
create mode 100644 Makefile.am
create mode 100755 autogen.sh
create mode 100644 configure.ac
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
-index 0000000..1127629
+index 0000000..0b7c289
--- /dev/null
+++ b/Makefile.am
-@@ -0,0 +1,25 @@
+@@ -0,0 +1,28 @@
+SUBDIRS = source
+
-+EXTRA_DIST = AUTHORS DEPS LICENSE PATENTS README.chromium codereview.settings libyuv.gyp libyuv_test.gyp unit_test/testdata/arm_v7.txt unit_test/testdata/tegra3.txt
++EXTRA_DIST = AUTHORS DEPS LICENSE PATENTS README.chromium codereview.settings libyuv.gyp libyuv_test.gyp unit_test/testdata/arm_v7.txt unit_test/testdata/tegra3.txt util/compare.cc
+
+if WITH_TEST
+
+
+noinst_PROGRAMS = $(TESTS)
+
-+unittest_SOURCES = unit_test/compare_test.cc \
-+ unit_test/cpu_test.cc \
-+ unit_test/planar_test.cc \
-+ unit_test/rotate_test.cc \
-+ unit_test/rotate_argb_test.cc \
-+ unit_test/scale_argb_test.cc \
-+ unit_test/scale_test.cc \
-+ unit_test/unit_test.cc \
-+ unit_test/unit_test.h \
-+ unit_test/version_test.cc
++unittest_SOURCES = unit_test/basictypes_test.cc \
++ unit_test/compare_test.cc \
++ unit_test/convert_test.cc \
++ unit_test/cpu_test.cc \
++ unit_test/planar_test.cc \
++ unit_test/rotate_argb_test.cc \
++ unit_test/rotate_test.cc \
++ unit_test/scale_argb_test.cc \
++ unit_test/scale_test.cc \
++ unit_test/unit_test.cc \
++ unit_test/unit_test.h \
++ unit_test/version_test.cc \
++ unit_test/video_common_test.cc
+
+unittest_CXXFLAGS = $(AM_CXXFLAGS) @GTEST_CXXFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)
+unittest_LDADD = @GTEST_LIBS@ $(top_builddir)/source/libyuv.la
+autoconf
diff --git a/configure.ac b/configure.ac
new file mode 100644
-index 0000000..7014cee
+index 0000000..7f6673a
--- /dev/null
+++ b/configure.ac
-@@ -0,0 +1,148 @@
+@@ -0,0 +1,156 @@
+AC_INIT([libyuv], [0], [http://groups.google.com/group/discuss-libyuv], [libyuv], [http://code.google.com/p/libyuv/])
+
+AC_CANONICAL_TARGET
+
+AC_SUBST(LIBYUV_VERSION_INFO, [0:0:0])
+
++AM_PROG_AS
+AC_PROG_CXX
+AC_PROG_LIBTOOL
+AC_PROG_INSTALL
+ )
+
+if test "$with_mjpeg" = "yes" ; then
-+ AC_MSG_WARN([Motion JPEG decoder is enabled])
+ AC_CHECK_HEADERS(
+ [jpeglib.h],
+ [],
+ []
+ )
+
-+else
-+ AC_MSG_WARN([Motion JPEG decoder is disabled])
+fi
+
+
+ )
+
+if test "$with_test" = "yes" ; then
-+ AC_MSG_WARN([Test suite is enabled])
+ AC_CHECK_HEADERS(
+ [gtest/gtest.h],
+ [],
+esac
+
+has_neon="no"
++has_mips="no"
++has_x86="no"
++
+case "$target_cpu" in
+ arm*)
+ AC_ARG_ENABLE(neon,
+ [has_neon=yes],
+ [has_neon=no]
+ )
-+ AC_MSG_RESULT($has_neon)
+ ]
+ )
+ ;;
++ mips*)
++ has_mips=yes
++ ;;
++ x86*)
++ has_x86=yes
++ ;;
+ *)
+ ;;
+esac
+
+AM_CONDITIONAL(WITH_MJPEG, test "$with_mjpeg" = "yes")
+AM_CONDITIONAL(WITH_TEST, test "$with_test" = "yes")
++
+AM_CONDITIONAL(ENABLE_NEON, test "$has_neon" = "yes")
++AM_CONDITIONAL(ENABLE_MIPS, test "$has_mips" = "yes")
++AM_CONDITIONAL(ENABLE_X86, test "$has_x86" = "yes")
+
+AC_OUTPUT
+
+])
diff --git a/source/Makefile.am b/source/Makefile.am
new file mode 100644
-index 0000000..ef46e90
+index 0000000..0a10297
--- /dev/null
+++ b/source/Makefile.am
-@@ -0,0 +1,66 @@
+@@ -0,0 +1,78 @@
+lib_LTLIBRARIES = libyuv.la
+
+pkgconfigdir = $(libdir)/pkgconfig
+endif
+
+if LIBYUV_POSIX
-+posix_SOURCES = row_posix.cc
++posix_SOURCES = compare_posix.cc row_posix.cc
+endif
+
+if LIBYUV_WINDOWS
-+windows_SOURCES = row_win.cc
++windows_SOURCES = compare_win.cc row_win.cc
++endif
++
++if ENABLE_MIPS
++mips_SOURCES = memcpy_mips.S rotate_mips.cc row_mips.cc scale_mips.cc
++endif
++
++if ENABLE_X86
++x86_SOURCES = row_x86.asm x86inc.asm
+endif
+
+if ENABLE_NEON
-+neon_SOURCES = rotate_neon.cc row_neon.cc
++neon_SOURCES = compare_neon.cc rotate_neon.cc row_neon.cc scale_argb_neon.cc scale_neon.cc
+endif
+
+libyuvinclude_HEADERS = ../include/libyuv.h
+ ../include/libyuv/convert.h \
+ ../include/libyuv/convert_argb.h \
+ ../include/libyuv/convert_from.h \
++ ../include/libyuv/convert_from_argb.h \
+ ../include/libyuv/cpu_id.h \
+ ../include/libyuv/format_conversion.h \
+ ../include/libyuv/planar_functions.h \
+ $(mjpeg_HDRS)
+
+libyuv_la_SOURCES = compare.cc \
++ compare_common.cc \
+ convert.cc \
+ convert_argb.cc \
+ convert_from.cc \
++ convert_from_argb.cc \
+ cpu_id.cc \
+ format_conversion.cc \
+ planar_functions.cc \
+ rotate.cc \
+ rotate_argb.cc \
-+ rotate_priv.h \
-+ row.h \
++ row_any.cc \
+ row_common.cc \
+ scale.cc \
+ scale_argb.cc \
+ video_common.cc \
++ $(mjpeg_SOURCES) \
+ $(posix_SOURCES) \
+ $(windows_SOURCES) \
-+ $(mjpeg_SOURCES) \
-+ $(neon_SOURCES)
++ $(mips_SOURCES) \
++ $(neon_SOURCES) \
++ $(x86_SOURCES)
+
+libyuv_la_CXXFLAGS = $(AM_LDFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)
+libyuv_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBYUV_VERSION_INFO)
+Version: @PACKAGE_VERSION@
+Libs: -lyuv
--
-1.7.12.1
+1.8.0.2
Summary(pl.UTF-8): Biblioteka do konwersji i skalowania YUV
Name: libyuv
Version: 0
-Release: 0.14.20121001svn389
+Release: 0.17.20121221svn522
License: BSD
Group: Development/Libraries
-## svn -r 389 export http://libyuv.googlecode.com/svn/trunk libyuv-0
-## tar -cjvf libyuv-0.tar.bz2 libyuv-0
-Source0: %{name}-%{version}.tar.bz2
-# Source0-md5: 06a4d57a1d0848fcc9f5695accd771a7
+## svn -r 522 export http://libyuv.googlecode.com/svn/trunk libyuv
+## tar -cjf libyuv.tar.bz2 --exclude-vcs libyuv
+Source0: %{name}-svn522.tar.bz2
+# Source0-md5: 497724b093c5bda234e75d418cfc0f7e
Patch1: autotools-support.patch
URL: http://code.google.com/p/libyuv/
BuildRequires: autoconf >= 2.50
BuildRequires: automake
-BuildRequires: gtest-devel
+%{?with_tests:BuildRequires: gtest-devel}
BuildRequires: libjpeg-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 2:1.5
oraz skalowanie YUV. Potrafi:
- tłumaczyć formaty kamer internetowych na YUV (I420)
- przekształcać YUV na formaty zdatne do renderowania i efektów
-- obracać obraz o 90 stopni, aby dostosowaćdo urządzeń przenośnych
- w trybie portretowym
+- obracać obraz o 90 stopni, aby dostosowaćdo urządzeń przenośnych w
+ trybie portretowym
- skalować YUV w celu przygotowania do kompresji z filtrem punktowym,
dwuliniowym lub prostokątnym.
Statyczna biblioteka libyuv.
%prep
-%setup -q
+%setup -qc
+mv libyuv-*/* .
%patch1 -p1
%build
%{!?with_static_libs:--disable-static} \
%{?with_armneon:--enable-neon} \
--with-mjpeg \
- --with-test
+ %{?with_tests:--with-test}
%{__make}
%{?with_tests:%{__make} check}