commit ee714f4f16626f02e9c3fed07d8b85443f7af641
Author: Jakub Bogusz <[email protected]>
Date:   Fri Oct 16 17:23:06 2015 +0200

    - new
    - sh patch fixes POSIX sh compatibility
    - gcc patch fixes incompatible asm constaints (by using cpuid builtins)
    - ffmpeg patch fixes build with current ffmpeg
    - link patch fixes library linking with X libs
    - m4 patch fixes underquoted definition in installed .m4 file

 libvideogfx-ffmpeg.patch |  11 ++++
 libvideogfx-gcc.patch    |  33 +++++++++++
 libvideogfx-link.patch   |  11 ++++
 libvideogfx-m4.patch     |  11 ++++
 libvideogfx-sh.patch     |  46 ++++++++++++++++
 libvideogfx.spec         | 140 +++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 252 insertions(+)
---
diff --git a/libvideogfx.spec b/libvideogfx.spec
new file mode 100644
index 0000000..d1b0ce9
--- /dev/null
+++ b/libvideogfx.spec
@@ -0,0 +1,140 @@
+#
+# Conditional build:
+%bcond_without static_libs     # don't build static libraries
+#
+Summary:       LibVideoGfx - video processing library
+Summary(pl.UTF-8):     LibVideoGfx - biblioteka do przetwarzania obrazu
+Name:          libvideogfx
+Version:       1.0.9
+Release:       1
+License:       LGPL v2.1+
+Group:         Libraries
+Source0:       
https://github.com/farindk/libvideogfx/releases/download/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: e60c78bce880264572203fcdb208da79
+Patch0:                %{name}-sh.patch
+Patch1:                %{name}-gcc.patch
+Patch2:                %{name}-ffmpeg.patch
+Patch3:                %{name}-link.patch
+Patch4:                %{name}-m4.patch
+URL:           http://dirk-farin.net/software/libvideogfx/index.html
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: ffmpeg-devel
+BuildRequires: libjpeg-devel
+BuildRequires: libpng-devel
+BuildRequires: libstdc++-devel >= 6:4.5
+BuildRequires: libtool >= 2:1.5
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXext-devel
+BuildRequires: xorg-lib-libXv-devel
+BuildRequires: zlib-devel
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+LibVideoGfx is a C++ library for low-level video processing. It aims
+at speeding up the development process for image and video processing
+applications by providing high-level classes for commonly required
+tasks. The library comprises support for:
+ - basic image data classes
+ - color-space convertion for RGB, YUV, HSV
+ - drawing primitives (lines, circles, ...)
+ - image manipulation (scaling, pixel-ops, convolution)
+ - file-IO (ppm, yuv, jpeg, png, mpeg, V4L-grabbing)
+ - X11 image display (including Xv-extension support)
+
+%description -l pl.UTF-8
+LibVideoGfx to biblioteka C++ do niskopoziomowego przetwarzania
+obrazu. Celem jest przyspieszenie procesu tworzenia aplikacji do
+przetwarzania obrazu statycznego i ruchomego poprzez dostarczenie
+wysokopoziomowych klas do często wymaganych zadań. Biblioteka pokrywa:
+ - podstawowe klasy danych obrazu
+ - konwersję przestrzeni kolorów RGB, YUV, HSV
+ - prymitywy rysunkowe (linie, okręgi...)
+ - obróbkę obrazu (skalowanie, operacje na pikselach, sploty)
+ - operacje na plikach (ppm, yuv, jpeg, png, mpeg, przechwytywanie
+   V4L)
+ - wyświetlanie obrazu X11 (wraz z obsługą rozszerzenia Xv)
+
+%package devel
+Summary:       Header files for LibVideoGfx library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki LibVideoGfx
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      libstdc++-devel >= 6:4.5
+Requires:      libjpeg-devel
+Requires:      libpng-devel
+Requires:      xorg-lib-libX11-devel
+Requires:      xorg-lib-libXext-devel
+Requires:      xorg-lib-libXv-devel
+
+%description devel
+Header files for LibVideoGfx library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki LibVideoGfx.
+
+%package static
+Summary:       Static LibVideoGfx library
+Summary(pl.UTF-8):     Statyczna biblioteka LibVideoGfx
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static LibVideoGfx library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka LibVideoGfx.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+       %{!?with_static_libs:--disable-static}
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libvideogfx.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS NEWS README TODO
+%attr(755,root,root) %{_libdir}/libvideogfx-1.0.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libvideogfx-1.0.so.9
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/libvideogfx-config
+%attr(755,root,root) %{_libdir}/libvideogfx.so
+%{_includedir}/libvideogfx
+%{_includedir}/libvideogfx.hh
+%{_pkgconfigdir}/libvideogfx.pc
+%{_aclocaldir}/libvideogfx.m4
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libvideogfx.a
+%endif
diff --git a/libvideogfx-ffmpeg.patch b/libvideogfx-ffmpeg.patch
new file mode 100644
index 0000000..cc8dcfa
--- /dev/null
+++ b/libvideogfx-ffmpeg.patch
@@ -0,0 +1,11 @@
+--- libvideogfx-1.0.9/libvideogfx/graphics/fileio/ffmpeg.cc.orig       
2015-10-15 21:48:26.217193172 +0200
++++ libvideogfx-1.0.9/libvideogfx/graphics/fileio/ffmpeg.cc    2015-10-15 
21:50:12.237190962 +0200
+@@ -166,7 +166,7 @@
+     if (frameRGB)  { av_free(frameRGB); frameRGB=NULL; }
+     if (frame)     { av_free(frame); frame=NULL; }
+     if (codecCtx)  { avcodec_close(codecCtx); codecCtx=NULL; }
+-    if (formatCtx) { av_close_input_file(formatCtx); formatCtx=NULL; }
++    if (formatCtx) { avformat_close_input(&formatCtx); formatCtx=NULL; }
+   }
+ 
+ 
diff --git a/libvideogfx-gcc.patch b/libvideogfx-gcc.patch
new file mode 100644
index 0000000..b9bd4ae
--- /dev/null
+++ b/libvideogfx-gcc.patch
@@ -0,0 +1,33 @@
+--- libvideogfx-1.0.9/libvideogfx/arch/cpu.cc.orig     2014-01-22 
12:07:21.000000000 +0100
++++ libvideogfx-1.0.9/libvideogfx/arch/cpu.cc  2015-10-15 21:36:59.703874154 
+0200
+@@ -53,6 +53,8 @@
+ 
+ #if CPU_x86
+ 
++#include <cpuid.h>
++
+ #define CPU_CAP_MMX      (1<<0)
+ #define CPU_CAP_MMXEXT   (1<<1)
+ #define CPU_CAP_SSE      (1<<2)
+@@ -82,9 +84,7 @@
+       __cpuid((int *)regs, (int)a);
+ 
+ #else
+-      __asm__ volatile
+-      ("cpuid" : "=a" (regs[0]), "=b" (regs[1]), "=c" (regs[2]), "=d" 
(regs[3])
+-       : "a" (a), "c" (0));
++      __cpuid_count(a, 0, regs[0], regs[1], regs[2], regs[3]);
+       // ECX is set to zero for CPUID function 4
+ #endif
+   
+@@ -110,9 +110,7 @@
+       __cpuid((int *)regs, (int)a);
+ 
+ #else
+-      __asm__ volatile
+-      ("cpuid" : "=a" (regs[0]), "=b" (regs[1]), "=c" (regs[2]), "=d" 
(regs[3])
+-       : "a" (a), "c" (0));
++      __cpuid_count(a, 0, regs[0], regs[1], regs[2], regs[3]);
+       // ECX is set to zero for CPUID function 4
+ #endif
+ 
diff --git a/libvideogfx-link.patch b/libvideogfx-link.patch
new file mode 100644
index 0000000..c3b0da0
--- /dev/null
+++ b/libvideogfx-link.patch
@@ -0,0 +1,11 @@
+--- libvideogfx-1.0.9/libvideogfx/x11/Makefile.am.orig 2014-01-22 
12:07:21.000000000 +0100
++++ libvideogfx-1.0.9/libvideogfx/x11/Makefile.am      2015-10-15 
22:18:14.410489236 +0200
+@@ -5,6 +5,8 @@
+ libvideogfx_x11_includedir = \
+       $(includedir)/libvideogfx/x11
+ 
++libvideogfx_x11_la_LIBADD = $(X_LIBS)
++
+ libvideogfx_x11_la_SOURCES = \
+       server.cc       \
+       server.hh       \
diff --git a/libvideogfx-m4.patch b/libvideogfx-m4.patch
new file mode 100644
index 0000000..a7ac3c3
--- /dev/null
+++ b/libvideogfx-m4.patch
@@ -0,0 +1,11 @@
+--- libvideogfx-1.0.9/libvideogfx.m4.orig      2014-01-22 12:07:21.000000000 
+0100
++++ libvideogfx-1.0.9/libvideogfx.m4   2015-10-15 22:21:25.267151924 +0200
+@@ -4,7 +4,7 @@
+ dnl AM_PATH_LIBVIDEOGFX([MINIMUM-VERSION, [ACTION-IF-FOUND [, 
ACTION-IF-NOT-FOUND [, MODULES]]]])
+ dnl Test for LibVideoGfx, and define LIBVIDEOGFX_CFLAGS and LIBVIDEOGFX_LIBS
+ dnl
+-AC_DEFUN(AM_PATH_LIBVIDEOGFX,
++AC_DEFUN([AM_PATH_LIBVIDEOGFX],
+ [dnl 
+ dnl Get the cflags and libraries from the libvideogfx-config script
+ dnl
diff --git a/libvideogfx-sh.patch b/libvideogfx-sh.patch
new file mode 100644
index 0000000..8816226
--- /dev/null
+++ b/libvideogfx-sh.patch
@@ -0,0 +1,46 @@
+--- libvideogfx-1.0.9/configure.in.orig        2014-02-03 17:52:57.000000000 
+0100
++++ libvideogfx-1.0.9/configure.in     2015-10-15 21:09:02.417242456 +0200
+@@ -142,8 +142,8 @@
+ 
+ if test "$GCC" = "yes" ; then
+   if test x$have_gcc45 = xyes; then
+-#    CFLAGS+=" -std=c++0x"
+-    CXXFLAGS+=" -std=c++0x"
++#    CFLAGS=$CFLAGS" -std=c++0x"
++    CXXFLAGS="$CXXFLAGS -std=c++0x"
+   fi
+ fi
+ 
+@@ -305,8 +305,8 @@
+      AC_MSG_RESULT(no)
+    ])
+ 
+-   AC_CHECK_LIB(avcodec,  avcodec_decode_video,  [LIBS+=" -lavcodec" 
AC_DEFINE(HAVE_AVCODEC_DECODE_VIDEO, 1, [Define if the libavcodec supports 
avcodec_decode_video])], [], [-lavutil -lpthread -lm])
+-   AC_CHECK_LIB(avcodec,  avcodec_decode_video2, [LIBS+=" -lavcodec" 
AC_DEFINE(HAVE_AVCODEC_DECODE_VIDEO2, 1, [Define if the libavcodec supports 
avcodec_decode_video2])], [], [-lavutil -lpthread -lm])
++   AC_CHECK_LIB(avcodec,  avcodec_decode_video,  [LIBS="$LIBS -lavcodec" 
AC_DEFINE(HAVE_AVCODEC_DECODE_VIDEO, 1, [Define if the libavcodec supports 
avcodec_decode_video])], [], [-lavutil -lpthread -lm])
++   AC_CHECK_LIB(avcodec,  avcodec_decode_video2, [LIBS="$LIBS -lavcodec" 
AC_DEFINE(HAVE_AVCODEC_DECODE_VIDEO2, 1, [Define if the libavcodec supports 
avcodec_decode_video2])], [], [-lavutil -lpthread -lm])
+    AC_CHECK_LIB(avformat, avio_open, [AC_DEFINE(HAVE_AVIO_OPEN, 1, [Define if 
the libavformat supports avio_open])], [], [-lavcodec -lavutil -lpthread -lm])
+    AC_CHECK_LIB(avformat, url_fopen, [AC_DEFINE(HAVE_URL_FOPEN, 1, [Define if 
the libavformat supports url_fopen])], [], [-lavcodec -lavutil -lpthread -lm])
+    AC_CHECK_LIB(avformat, avformat_alloc_context, 
[AC_DEFINE(HAVE_AVFORMAT_ALLOW_CONTEXT, 1, [Define if the libavformat supports 
avformat_alloc_context,])], [], [-lavcodec -lavutil -lpthread -lz -lm])
+@@ -317,8 +317,8 @@
+      fi
+    fi
+ 
+-   AC_CHECK_LIB(avformat,  avformat_open_input, [LIBS+=" -lavformat" 
AC_DEFINE(HAVE_AVFORMAT_AVFORMAT_OPEN_INPUT, 1, [Define if the libavformat 
supports avformat_open_input])], [], [-lavcodec -lavutil -lpthread -lz -lm])
+-   AC_CHECK_LIB(avformat,  av_open_input_file,  [LIBS+=" -lavformat" 
AC_DEFINE(HAVE_AVFORMAT_AV_OPEN_INPUT_FILE,  1, [Define if the libavformat 
supports av_open_input_file])], [], [-lavcodec -lavutil -lpthread -lz -lm])
++   AC_CHECK_LIB(avformat,  avformat_open_input, [LIBS="$LIBS -lavformat" 
AC_DEFINE(HAVE_AVFORMAT_AVFORMAT_OPEN_INPUT, 1, [Define if the libavformat 
supports avformat_open_input])], [], [-lavcodec -lavutil -lpthread -lz -lm])
++   AC_CHECK_LIB(avformat,  av_open_input_file,  [LIBS="$LIBS -lavformat" 
AC_DEFINE(HAVE_AVFORMAT_AV_OPEN_INPUT_FILE,  1, [Define if the libavformat 
supports av_open_input_file])], [], [-lavcodec -lavutil -lpthread -lz -lm])
+ 
+    AC_CHECK_LIB(avformat,  avformat_write_header, 
[AC_DEFINE(HAVE_AVFORMAT_AVFORMAT_WRITE_HEADER, 1, [Define if the libavformat 
supports avformat_write_header])], [], [-lavcodec -lavutil -lpthread -lz -lm])
+    AC_CHECK_LIB(avformat,  av_write_header,       
[AC_DEFINE(HAVE_AVFORMAT_AV_WRITE_HEADER,       1, [Define if the libavformat 
supports av_write_header])], [], [-lavcodec -lavutil -lpthread -lz -lm])
+@@ -341,8 +341,8 @@
+ 
+    saved_cflags=$CFLAGS
+    saved_cxxflags=$CXXFLAGS
+-   CFLAGS+=" -Werror" # "-fstrict-aliasing -Wstrict-aliasing=1 
-Werror=strict-aliasing"
+-   CXXFLAGS+=" -Werror" # "-fstrict-aliasing -Wstrict-aliasing=1 
-Werror=strict-aliasing"
++   CFLAGS="$CFLAGS -Werror" # "-fstrict-aliasing -Wstrict-aliasing=1 
-Werror=strict-aliasing"
++   CXXFLAGS="$CXXFLAGS -Werror" # "-fstrict-aliasing -Wstrict-aliasing=1 
-Werror=strict-aliasing"
+ 
+    AC_MSG_CHECKING(type of ByteIOContext in AVFormatContext)
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libvideogfx.git/commitdiff/ee714f4f16626f02e9c3fed07d8b85443f7af641

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to