[packages/libyuv] - updated to latest svn version - remove autotools patch, cmake can do its job just fine - added sha
baggins
baggins at pld-linux.org
Sun Mar 15 11:50:38 CET 2015
commit 55325603eb82ccb566b4cae0bf0d70dbaddf8367
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Mar 15 11:49:22 2015 +0100
- updated to latest svn version
- remove autotools patch, cmake can do its job just fine
- added shared lib patch for cmake, disabled static lib
autotools-support.patch | 330 ------------------------------------------------
libyuv.pc | 9 ++
libyuv.spec | 56 ++++----
shared-lib.patch | 28 ++++
4 files changed, 63 insertions(+), 360 deletions(-)
---
diff --git a/libyuv.spec b/libyuv.spec
index 372db7d..636ad12 100644
--- a/libyuv.spec
+++ b/libyuv.spec
@@ -1,32 +1,27 @@
#
# Conditional build:
-%bcond_without static_libs # don't build static library
+%bcond_with static_libs # don't build static library
%bcond_without tests # build without tests
-%bcond_without armneon # disable ARM NEON support
-
-%ifnarch %{arm}
-%undefine with_armneon
-%endif
+%define svnver 1325
Summary: YUV conversion and scaling functionality library
Summary(pl.UTF-8): Biblioteka do konwersji i skalowania YUV
Name: libyuv
-Version: 0
-Release: 0.17.20121221svn522
+Version: 0.%{svnver}
+Release: 1
License: BSD
Group: Development/Libraries
-## 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
+## svn -r 1325 export http://libyuv.googlecode.com/svn/trunk libyuv
+## tar -cJf libyuv-svn1325.tar.bz2 --exclude-vcs libyuv
+Source0: %{name}-svn%{svnver}.tar.xz
+# Source0-md5: f18002950f43df0d168fbf8fcb5fc9c1
+Source1: %{name}.pc
+Patch0: shared-lib.patch
URL: http://code.google.com/p/libyuv/
-BuildRequires: autoconf >= 2.50
-BuildRequires: automake
+BuildRequires: cmake
%{?with_tests:BuildRequires: gtest-devel}
BuildRequires: libjpeg-devel
BuildRequires: libstdc++-devel
-BuildRequires: libtool >= 2:1.5
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -71,29 +66,30 @@ Static libyuv library.
Statyczna biblioteka libyuv.
%prep
-%setup -qc
-mv libyuv-*/* .
-%patch1 -p1
+%setup -q -n %{name}
+%patch0 -p1
%build
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__automake}
-%configure \
- %{!?with_static_libs:--disable-static} \
- %{?with_armneon:--enable-neon} \
- --with-mjpeg \
- %{?with_tests:--with-test}
+mkdir -p build
+cd build
+%cmake .. %{?with_tests:-DTEST=ON}
%{__make}
-%{?with_tests:%{__make} check}
+%{?with_tests:./libyuv_unittest}
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
+
+cd build
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
+
+%{__sed} -e 's|@PACKAGE_VERSION@|%{svnver}|' \
+ -e 's|@prefix@|%{_prefix}|' \
+ -e 's|@exec_prefix@|%{_prefix}|' \
+ -e 's|@libdir@|%{_libdir}|' \
+ -e 's|@includedir@|%{_includedir}|' %{SOURCE1} >$RPM_BUILD_ROOT%{_pkgconfigdir}/libyuv.pc
%clean
rm -rf $RPM_BUILD_ROOT
diff --git a/autotools-support.patch b/autotools-support.patch
deleted file mode 100644
index 1c1e9a1..0000000
--- a/autotools-support.patch
+++ /dev/null
@@ -1,330 +0,0 @@
-From c2294ecef0a8f90b9b8fadbe2c5e6493979247de 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 | 28 ++++++++++
- autogen.sh | 7 +++
- 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
- 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..0b7c289
---- /dev/null
-+++ b/Makefile.am
-@@ -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 util/compare.cc
-+
-+if WITH_TEST
-+
-+TESTS = unittest
-+
-+noinst_PROGRAMS = $(TESTS)
-+
-+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
-+
-+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..7f6673a
---- /dev/null
-+++ b/configure.ac
-@@ -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
-+
-+AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip tar-ustar foreign])
-+
-+AC_SUBST(LIBYUV_VERSION_INFO, [0:0:0])
-+
-+AM_PROG_AS
-+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=no].]),
-+ [with_mjpeg="$withval"],[with_mjpeg="no"]
-+ )
-+
-+if test "$with_mjpeg" = "yes" ; then
-+ 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])],
-+ []
-+ )
-+
-+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_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"
-+has_mips="no"
-+has_x86="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]
-+ )
-+ ]
-+ )
-+ ;;
-+ mips*)
-+ has_mips=yes
-+ ;;
-+ x86*)
-+ has_x86=yes
-+ ;;
-+ *)
-+ ;;
-+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")
-+AM_CONDITIONAL(ENABLE_MIPS, test "$has_mips" = "yes")
-+AM_CONDITIONAL(ENABLE_X86, test "$has_x86" = "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..0a10297
---- /dev/null
-+++ b/source/Makefile.am
-@@ -0,0 +1,78 @@
-+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 = compare_posix.cc row_posix.cc
-+endif
-+
-+if LIBYUV_WINDOWS
-+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 = compare_neon.cc rotate_neon.cc row_neon.cc scale_argb_neon.cc scale_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/convert_from_argb.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 \
-+ 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 \
-+ row_any.cc \
-+ row_common.cc \
-+ scale.cc \
-+ scale_argb.cc \
-+ video_common.cc \
-+ $(mjpeg_SOURCES) \
-+ $(posix_SOURCES) \
-+ $(windows_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)
-+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.8.0.2
-
diff --git a/libyuv.pc b/libyuv.pc
new file mode 100644
index 0000000..d921dd5
--- /dev/null
+++ b/libyuv.pc
@@ -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/shared-lib.patch b/shared-lib.patch
new file mode 100644
index 0000000..4a10056
--- /dev/null
+++ b/shared-lib.patch
@@ -0,0 +1,28 @@
+--- libyuv/CMakeLists.txt.orig 2015-03-15 11:25:05.195695761 +0100
++++ libyuv/CMakeLists.txt 2015-03-15 11:23:31.625695127 +0100
+@@ -86,7 +86,8 @@
+
+ include_directories(${ly_inc_dir})
+
+-add_library(${ly_lib_name} STATIC ${ly_source_files})
++add_library(${ly_lib_name} ${ly_source_files})
++set_target_properties(${ly_lib_name} PROPERTIES VERSION 0.0.0 SOVERSION 0)
+
+ add_executable(convert ${ly_base_dir}/util/convert.cc)
+ target_link_libraries(convert ${ly_lib_name})
+@@ -96,6 +96,7 @@
+ if (JPEG_FOUND)
+ include_directories(${JPEG_INCLUDE_DIR})
+ target_link_libraries(convert ${JPEG_LIBRARY})
++ target_link_libraries(${ly_lib_name} ${JPEG_LIBRARY})
+ add_definitions(-DHAVE_JPEG)
+ endif()
+
+@@ -126,6 +126,6 @@
+ target_link_libraries(libyuv_unittest glibc-compat)
+ endif()
+
+-install(TARGETS ${ly_lib_name} DESTINATION lib)
++install(TARGETS ${ly_lib_name} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(FILES ${ly_header_files} DESTINATION include/libyuv)
+ install(FILES ${ly_inc_dir}/libyuv.h DESTINATION include/)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libyuv.git/commitdiff/55325603eb82ccb566b4cae0bf0d70dbaddf8367
More information about the pld-cvs-commit
mailing list