[packages/libyuv] new, version checked out from svn

glen glen at pld-linux.org
Sun Nov 4 20:27:04 CET 2012


commit 8e69f3e2970812d897243dd373fe39b933e86db1
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Nov 4 21:26:18 2012 +0200

    new, version checked out from svn
    
    based on fedora package

 autotools-support.patch | 307 ++++++++++++++++++++++++++++++++++++++++++++++++
 libyuv.spec             |  88 ++++++++++++++
 2 files changed, 395 insertions(+)
---
diff --git a/libyuv.spec b/libyuv.spec
new file mode 100644
index 0000000..3ec1ed9
--- /dev/null
+++ b/libyuv.spec
@@ -0,0 +1,88 @@
+#
+# Conditional build:
+%bcond_without	tests		# build without tests
+%bcond_without	neon		# disable neon
+
+%ifnarch %{arm}
+%undefine	with_neon
+%endif
+
+Summary:	YUV conversion and scaling functionality library
+Name:		libyuv
+Version:	0
+Release:	0.14.20121001svn389
+License:	BSD
+Group:		Development/Libraries
+URL:		http://code.google.com/p/libyuv/
+## 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
+Patch1:		autotools-support.patch
+BuildRequires:	autoconf
+BuildRequires:	automake
+BuildRequires:	gtest-devel
+BuildRequires:	libjpeg-devel
+BuildRequires:	libtool
+%{?with_neon:BuildRequires:	neon-devel}
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%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:	%{name} = %{version}-%{release}
+
+%description devel
+Additional header files for development with %{name}.
+
+%prep
+%setup -q
+%patch1 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+%configure \
+	--disable-static \
+	--with-pic \
+	--with-test \
+	--with-mjpeg \
+	%{__enable_disable neon} \
+	%{nil}
+
+%{__make}
+%{?with_tests:%{__make} check}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS LICENSE PATENTS
+%attr(755,root,root) %{_libdir}/libyuv.so.*.*.*
+%ghost %{_libdir}/libyuv.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/%{name}.h
+%{_includedir}/%{name}
+%{_libdir}/%{name}.so
+%{_pkgconfigdir}/%{name}.pc
diff --git a/autotools-support.patch b/autotools-support.patch
new file mode 100644
index 0000000..6abd9f1
--- /dev/null
+++ b/autotools-support.patch
@@ -0,0 +1,307 @@
+From eaa2806843ebbf1b91f11436de196b47b20bd035 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         |  25 +++++++++
+ autogen.sh          |   7 +++
+ configure.ac        | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ source/Makefile.am  |  66 +++++++++++++++++++++++
+ source/libyuv.pc.in |   9 ++++
+ 5 files changed, 255 insertions(+)
+ 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
+
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+index 0000000..1127629
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,25 @@
++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
++
++if WITH_TEST
++
++TESTS = unittest
++
++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_CXXFLAGS = $(AM_CXXFLAGS) @GTEST_CXXFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)
++unittest_LDADD = @GTEST_LIBS@ $(top_builddir)/source/libyuv.la
++
++endif
+diff --git a/autogen.sh b/autogen.sh
+new file mode 100755
+index 0000000..bfd37d1
+--- /dev/null
++++ b/autogen.sh
+@@ -0,0 +1,7 @@
++#!/bin/sh
++LIBTOOLIZE=`which libtoolize || which glibtoolize`
++
++$LIBTOOLIZE
++aclocal
++automake --add-missing --copy
++autoconf
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+index 0000000..7014cee
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,148 @@
++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-bzip2 no-dist-gzip tar-ustar foreign])
++
++AC_SUBST(LIBYUV_VERSION_INFO, [0:0:0])
++
++AC_PROG_CXX
++AC_PROG_LIBTOOL
++AC_PROG_INSTALL
++
++AC_LANG_CPLUSPLUS
++
++AC_ARG_WITH([mjpeg],
++	    AC_HELP_STRING([--with-mjpeg],[enable Motion JPEG decoder [default=yes].]),
++	    [with_mjpeg="$withval"],[with_mjpeg="no"]
++	    )
++
++if test "$with_mjpeg" = "yes" ; then
++	AC_MSG_WARN([Motion JPEG decoder is enabled])
++	AC_CHECK_HEADERS(
++			 [jpeglib.h],
++			 [],
++			 [AC_MSG_ERROR([jpeglib.h header not found])],
++			 [AC_INCLUDES_DEFAULT]
++			 )
++	AC_CHECK_LIB(
++		     [jpeg],
++		     [jpeg_read_header],
++		     [
++		      CXXFLAGS="$CXXFLAGS -DHAVE_JPEG"
++		      LIBJPEG_LIBS="-ljpeg"
++		      AC_SUBST([LIBJPEG_LIBS])
++		      ],
++		     [AC_MSG_ERROR([libjpeg or libjpeg-turbo library not found])],
++		     []
++		     )
++
++else
++	AC_MSG_WARN([Motion JPEG decoder is disabled])
++fi
++
++
++AC_ARG_WITH([test],
++	    AC_HELP_STRING([--with-test],[enable test suite [default=no].]),
++	    [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
++
++case "$target_os" in
++	linux*)
++		posix="yes"
++		;;
++	darwin*)
++		posix="yes"
++		;;
++	mingw*)
++#		windows="yes"
++		posix="yes"
++		LDFLAGS="$LDFLAGS -no-undefined --enable-runtime-pseudo-reloc -avoid-version"
++		;;
++	*)
++		AC_MSG_ERROR([No support for this target ($target) yet])
++		;;
++esac
++
++has_neon="no"
++case "$target_cpu" in
++	arm*)
++		AC_ARG_ENABLE(neon,
++			      [  --enable-neon           enable ARM NEON support],
++			      [
++			       AC_MSG_CHECKING(for NEON in current arch/CFLAGS)
++			       AC_LINK_IFELSE([
++					       AC_LANG_PROGRAM(
++							       [[
++								#include <arm_neon.h>
++								int32x4_t testfunc(int16_t *a, int16_t *b)
++								{
++									return vmull_s16(vld1_s16(a), vld1_s16(b));
++								}
++								]]
++							       )
++					       ],
++					       [has_neon=yes],
++					       [has_neon=no]
++					      )
++			       AC_MSG_RESULT($has_neon)
++			      ]
++			     )
++		;;
++	*)
++		;;
++esac
++
++AC_CONFIG_FILES([
++Makefile
++source/libyuv.pc
++source/Makefile
++])
++
++AM_CONDITIONAL(LIBYUV_POSIX, test "$posix" = "yes")
++AM_CONDITIONAL(LIBYUV_WINDOWS, test "$windows" = "yes")
++
++AM_CONDITIONAL(WITH_MJPEG, test "$with_mjpeg" = "yes")
++AM_CONDITIONAL(WITH_TEST, test "$with_test" = "yes")
++AM_CONDITIONAL(ENABLE_NEON, test "$has_neon" = "yes")
++
++AC_OUTPUT
++
++AC_MSG_RESULT([
++------------------------------------------------------------------------
++  $PACKAGE $VERSION configuration.
++
++    Compiler support:
++
++      Target CPU: ................... ${target_cpu}
++             Has NEON? .............. ${has_neon}
++      Target OS: .................... ${target_os}
++             Is POSIX? .............. ${posix}
++
++    General configuration:
++
++      Enable Motion JPEG: ............ ${with_mjpeg}
++      Enable test suite: . ........... ${with_test}
++
++------------------------------------------------------------------------
++])
+diff --git a/source/Makefile.am b/source/Makefile.am
+new file mode 100644
+index 0000000..ef46e90
+--- /dev/null
++++ b/source/Makefile.am
+@@ -0,0 +1,66 @@
++lib_LTLIBRARIES = libyuv.la
++
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = libyuv.pc
++
++libyuvincludedir = $(includedir)
++libyuvnobase_includedir = $(includedir)/libyuv
++
++if WITH_MJPEG
++mjpeg_SOURCES = mjpeg_decoder.cc
++mjpeg_HDRS = ../include/libyuv/mjpeg_decoder.h
++endif
++
++if LIBYUV_POSIX
++posix_SOURCES = row_posix.cc
++endif
++
++if LIBYUV_WINDOWS
++windows_SOURCES = row_win.cc
++endif
++
++if ENABLE_NEON
++neon_SOURCES = rotate_neon.cc row_neon.cc
++endif
++
++libyuvinclude_HEADERS = ../include/libyuv.h
++libyuvnobase_include_HEADERS = ../include/libyuv/basic_types.h \
++			       ../include/libyuv/compare.h \
++			       ../include/libyuv/convert.h \
++			       ../include/libyuv/convert_argb.h \
++			       ../include/libyuv/convert_from.h \
++			       ../include/libyuv/cpu_id.h \
++			       ../include/libyuv/format_conversion.h \
++			       ../include/libyuv/planar_functions.h \
++			       ../include/libyuv/rotate.h \
++			       ../include/libyuv/rotate_argb.h \
++			       ../include/libyuv/row.h \
++			       ../include/libyuv/scale.h \
++			       ../include/libyuv/scale_argb.h \
++			       ../include/libyuv/version.h \
++			       ../include/libyuv/video_common.h \
++			       $(mjpeg_HDRS)
++
++libyuv_la_SOURCES = compare.cc \
++		    convert.cc \
++		    convert_argb.cc \
++		    convert_from.cc \
++		    cpu_id.cc \
++		    format_conversion.cc \
++		    planar_functions.cc \
++		    rotate.cc \
++		    rotate_argb.cc \
++		    rotate_priv.h \
++		    row.h \
++		    row_common.cc \
++		    scale.cc \
++		    scale_argb.cc \
++		    video_common.cc \
++		    $(posix_SOURCES) \
++		    $(windows_SOURCES) \
++		    $(mjpeg_SOURCES) \
++		    $(neon_SOURCES)
++
++libyuv_la_CXXFLAGS = $(AM_LDFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)
++libyuv_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBYUV_VERSION_INFO)
++libyuv_la_LIBADD = @LIBJPEG_LIBS@
+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
+-- 
+1.7.12.1
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libyuv.git/commitdiff/8e69f3e2970812d897243dd373fe39b933e86db1



More information about the pld-cvs-commit mailing list