[libyuv] Initial commit (see rhbz #772217)
Peter Lemenkov
peter at fedoraproject.org
Thu Jan 12 11:36:22 UTC 2012
commit 2965cfc100afad2f3a1a58f0790d3b13982ed532
Author: Peter Lemenkov <lemenkov at gmail.com>
Date: Thu Jan 12 15:36:14 2012 +0400
Initial commit (see rhbz #772217)
Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
.gitignore | 1 +
libyuv-0001-Initial-autotools-support.patch | 213 +++++++++++++++++++++++++++
libyuv.spec | 90 +++++++++++
sources | 1 +
4 files changed, 305 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..fe01dbe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/libyuv-0.tar.xz
diff --git a/libyuv-0001-Initial-autotools-support.patch b/libyuv-0001-Initial-autotools-support.patch
new file mode 100644
index 0000000..9efd80d
--- /dev/null
+++ b/libyuv-0001-Initial-autotools-support.patch
@@ -0,0 +1,213 @@
+From ee51477cdedf2126af866064ff627cb3fe652ce7 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Fri, 16 Dec 2011 22:08:41 +0400
+Subject: [PATCH 1/1] Initial autotools support
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ Makefile.am | 1 +
+ autogen.sh | 9 ++++++
+ configure.ac | 67 +++++++++++++++++++++++++++++++++++++++++++++++++
+ source/Makefile.am | 47 ++++++++++++++++++++++++++++++++++
+ source/libyuv.pc.in | 9 ++++++
+ unit_test/Makefile.am | 20 ++++++++++++++
+ 6 files changed, 153 insertions(+), 0 deletions(-)
+ create mode 100644 Makefile.am
+ create mode 100755 autogen.sh
+ create mode 100644 configure.ac
+ create mode 100644 source/Makefile.am
+ create mode 100644 source/libyuv.pc.in
+ create mode 100644 unit_test/Makefile.am
+
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+index 0000000..5e769be
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1 @@
++SUBDIRS = source unit_test
+diff --git a/autogen.sh b/autogen.sh
+new file mode 100755
+index 0000000..14988f2
+--- /dev/null
++++ b/autogen.sh
+@@ -0,0 +1,9 @@
++#!/bin/sh
++[ -f NEWS ] || touch NEWS
++[ -f README ] || touch README
++[ -f ChangeLog ] || touch ChangeLog
++libtoolize
++aclocal
++automake --add-missing --copy
++autoconf
++./configure ${@}
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+index 0000000..140866a
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,67 @@
++AC_INIT([libyuv], [0], [http://groups.google.com/group/discuss-libyuv], [libyuv], [http://code.google.com/p/libyuv/])
++
++AC_CANONICAL_TARGET
++
++AM_INIT_AUTOMAKE([dist-xz tar-ustar])
++
++AC_SUBST(LIBYUV_VERSION_INFO, [0:0:0])
++
++AC_PROG_CXX
++AC_PROG_LIBTOOL
++AC_PROG_INSTALL
++
++AC_LANG_CPLUSPLUS
++
++case "$target" in
++ *-linux*)
++ posix="yes"
++ ;;
++ *-darwin*)
++ posix="yes"
++ ;;
++ *-windows*)
++ windows="yes"
++ ;;
++ *)
++ AC_MSG_ERROR([No support for this target ($target) yet])
++ ;;
++esac
++
++AC_ARG_WITH([test],
++ AC_HELP_STRING([--with-test],[enable test suite.]),
++ [with_test="$withval"],[with_test="no"]
++ )
++
++if test "$with_test" = "yes" ; then
++ AC_MSG_WARN([Test suite is enabled])
++ AC_CHECK_HEADERS(
++ [gtest/gtest.h],
++ [],
++ [AC_MSG_ERROR([gtest not found])],
++ []
++ )
++ AC_PATH_PROG([GTEST_CONFIG], gtest-config, [no])
++ if test "$GTEST_CONFIG" = "no" ; then
++ AC_MSG_ERROR([gtest-config was not found])
++ fi
++ GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
++ GTEST_LIBS=`$GTEST_CONFIG --libs`
++ AC_SUBST([GTEST_CXXFLAGS])
++ AC_SUBST([GTEST_LIBS])
++else
++ AC_MSG_WARN([Test suite is disabled])
++fi
++
++AC_CONFIG_FILES([
++Makefile
++source/libyuv.pc
++source/Makefile
++unit_test/Makefile
++])
++
++AM_CONDITIONAL(LIBYUV_POSIX, test "$posix" = "yes")
++AM_CONDITIONAL(LIBYUV_WINDOWS, test "$windows" = "yes")
++
++AM_CONDITIONAL(WITH_TEST, test "$with_test" = "yes")
++
++AC_OUTPUT
+diff --git a/source/Makefile.am b/source/Makefile.am
+new file mode 100644
+index 0000000..bbec8d4
+--- /dev/null
++++ b/source/Makefile.am
+@@ -0,0 +1,47 @@
++lib_LTLIBRARIES = libyuv.la
++
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = libyuv.pc
++
++libyuvincludedir = $(includedir)
++libyuvnobase_includedir = $(includedir)/libyuv
++
++libyuvinclude_HEADERS = ../include/libyuv.h
++libyuvnobase_include_HEADERS = ../include/libyuv/basic_types.h \
++ ../include/libyuv/compare.h \
++ ../include/libyuv/convert.h \
++ ../include/libyuv/cpu_id.h \
++ ../include/libyuv/format_conversion.h \
++ ../include/libyuv/planar_functions.h \
++ ../include/libyuv/rotate.h \
++ ../include/libyuv/scale.h \
++ ../include/libyuv/video_common.h
++
++if LIBYUV_POSIX
++posix_SOURCES = row_posix.cc
++endif
++
++if LIBYUV_WINDOWS
++windows_SOURCES = row_win.cc
++endif
++
++#if ANDROID_NEON
++#neon_SOURCES = rotate_neon.cc row_neon.cc
++#endif
++
++libyuv_la_SOURCES = compare.cc \
++ convert.cc \
++ convertfrom.cc \
++ cpu_id.cc \
++ format_conversion.cc \
++ planar_functions.cc \
++ rotate.cc \
++ row_common.cc \
++ scale.cc \
++ video_common.cc \
++ $(posix_SOURCES) \
++ $(windows_SOURCES) \
++ $(neon_SOURCES)
++
++libyuv_la_CXXFLAGS = $(AM_LDFLAGS) -I$(top_srcdir)/include
++libyuv_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBYUV_VERSION_INFO)
+diff --git a/source/libyuv.pc.in b/source/libyuv.pc.in
+new file mode 100644
+index 0000000..d921dd5
+--- /dev/null
++++ b/source/libyuv.pc.in
+@@ -0,0 +1,9 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: libyuv
++Description: YUV conversion and scaling functionality library
++Version: @PACKAGE_VERSION@
++Libs: -lyuv
+diff --git a/unit_test/Makefile.am b/unit_test/Makefile.am
+new file mode 100644
+index 0000000..f9e742f
+--- /dev/null
++++ b/unit_test/Makefile.am
+@@ -0,0 +1,20 @@
++if WITH_TEST
++
++TESTS = unit_test
++
++noinst_PROGRAMS = $(TESTS)
++
++unit_test_SOURCES = compare_test.cc \
++ planar_test.cc \
++ rotate_test.cc \
++ scale_test.cc \
++ unit_test.cc
++
++unit_test_CXXFLAGS = $(AM_CXXFLAGS) @GTEST_CXXFLAGS@ -I$(top_srcdir)/include
++unit_test_LDADD = @GTEST_LIBS@ $(top_builddir)/source/libyuv.la
++
++else
++
++TESTS =
++
++endif
+--
+1.7.7.5
+
diff --git a/libyuv.spec b/libyuv.spec
new file mode 100644
index 0000000..4f54e64
--- /dev/null
+++ b/libyuv.spec
@@ -0,0 +1,90 @@
+Name: libyuv
+Summary: YUV conversion and scaling functionality library
+Version: 0
+Release: 0.2.20120109svn128%{?dist}
+License: BSD
+Group: Development/Libraries
+Url: http://code.google.com/p/libyuv/
+## svn -r 128 export http://libyuv.googlecode.com/svn/trunk libyuv-0
+## tar -cJvf libyuv-0.tar.xz libyuv-0
+Source0: %{name}-%{version}.tar.xz
+Patch1: libyuv-0001-Initial-autotools-support.patch
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libtool
+BuildRequires: gtest-devel
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+
+%description
+This is an open source project that includes YUV conversion and scaling
+functionality. Converts all webcam formats to YUV (I420). Convert YUV to
+formats for rendering/effects. Rotate by 90 degrees to adjust for mobile
+devices in portrait mode. Scale YUV to prepare content for compression,
+with point, bilinear or box filter.
+
+
+%package devel
+Summary: The development files for %{name}
+Group: Development/Libraries
+Requires: pkgconfig
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+
+%description devel
+Additional header files for development with %{name}.
+
+
+%prep
+%setup -q
+%patch1 -p1 -b .autotools
+
+
+%build
+sh autogen.sh
+%configure --disable-static --with-pic --with-test
+make %{?_smp_mflags}
+
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+rm -f %{buildroot}%{_libdir}/*.la
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%check
+make check
+
+
+%post -p /sbin/ldconfig
+
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%doc AUTHORS LICENSE PATENTS
+%{_libdir}/%{name}.so.*
+
+
+%files devel
+%{_includedir}/%{name}
+%{_includedir}/%{name}.h
+%{_libdir}/%{name}.so
+%{_libdir}/pkgconfig/%{name}.pc
+
+
+%changelog
+* Wed Jan 11 2012 Peter Lemenkov <lemenkov at gmail.com> - 0-0.2.20120109svn128
+- Update to svn rev. 128
+- Enable unit-tests
+- Dropped obsolete defattr directive
+- Consistently use macros
+- Explicitly add _isa to the Requires for *-devel sub-package
+
+* Fri Jan 6 2012 Peter Lemenkov <lemenkov at gmail.com> - 0-0.1.20120105svn127
+- Initial package
diff --git a/sources b/sources
index e69de29..39d2c5b 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+e813a5055290e300fb03e0201844d2c6 libyuv-0.tar.xz
More information about the scm-commits
mailing list