packages: XIMEA/XIMEA-gcc.patch (NEW), XIMEA/XIMEA-glib.patch (NEW), XIMEA/...
qboosh
qboosh at pld-linux.org
Wed Feb 1 18:39:47 CET 2012
Author: qboosh Date: Wed Feb 1 17:39:47 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- new, probably non-distributable package
- glib patch to fix C++ type conflicts with current glib 2.x
- gcc patch to convert SSE assembler from intel/masm compiler to gcc syntax
---- Files affected:
packages/XIMEA:
XIMEA-gcc.patch (NONE -> 1.1) (NEW), XIMEA-glib.patch (NONE -> 1.1) (NEW), XIMEA.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/XIMEA/XIMEA-gcc.patch
diff -u /dev/null packages/XIMEA/XIMEA-gcc.patch:1.1
--- /dev/null Wed Feb 1 18:39:47 2012
+++ packages/XIMEA/XIMEA-gcc.patch Wed Feb 1 18:39:42 2012
@@ -0,0 +1,44 @@
+--- XIMEA-1.04/examples/vaViewer/acquisition.cpp.orig 2011-11-29 22:53:23.000000000 +0100
++++ XIMEA-1.04/examples/vaViewer/acquisition.cpp 2012-02-01 18:16:03.439775467 +0100
+@@ -204,23 +204,24 @@
+ char * byte_data = surface_p+surface_image.offsets[0]+i*surface_image.pitches[0];
+ int bitshift = lps->sgf.curBPP - 8;
+ int cnt = (lps->sgf.curCX * sizeof(WORD)) / 32;
+- _asm{
+- mov esi, [data] ;
+- mov edi, [byte_data] ;
+- movd xmm2, [bitshift] ;
+-t00:
+- movdqa xmm0, [esi] ;
+- movdqa xmm1, [esi+16] ;
+- psrlw xmm0, xmm2 ;
+- psrlw xmm1, xmm2 ;
+- packuswb xmm0, xmm1 ;
+- movntdq [edi], xmm0 ;
+- add edi, 16 ;
+- add esi, 32 ;
+-
+- sub [cnt], 1 ;
+- ja t00 ;
+- }
++ __asm__(
++ "movl (%1), %%esi\n" // mov esi, [data]
++ "movl (%2), %%edi\n" // mov edi, [byte_data]
++ "movd (%3), %%xmm2\n" // movd xmm2, [bitshift]
++ "1: movdqa (%%esi), %%xmm0\n" // movdqa xmm0, [esi]
++ "movdqa $16(%%esi), %%xmm1\n" // movdqa xmm1, [esi+16]
++ "psrlw %%xmm2, %%xmm0\n" // psrlw xmm0, xmm2
++ "psrlw %%xmm2, %%xmm1\n" // psrlw xmm1, xmm2
++ "packuswb %%xmm1, %%xmm0\n" // packuswb xmm0, xmm1
++ "movntdq %%xmm0, (%%edi)\n" // movntdq [edi], xmm0
++ "addl $16, %%edi\n" // add edi, 16
++ "addl $32, %%esi\n" // add esi, 32
++ "sub $1, (%0)\n" // sub [cnt], 1
++ "ja 1b\n"
++ : "=&r"(cnt)
++ : "mr"(data), "mr"(byte_data), "mr"(bitshift)
++ : "memory", "cc", "esi", "edi"
++ );
+ } else {
+ memcpy(surface_p+surface_image.offsets[0]+i*surface_image.pitches[0], (char*)lps->sgf.bp+i*surface_width, surface_width);
+ }
================================================================
Index: packages/XIMEA/XIMEA-glib.patch
diff -u /dev/null packages/XIMEA/XIMEA-glib.patch:1.1
--- /dev/null Wed Feb 1 18:39:47 2012
+++ packages/XIMEA/XIMEA-glib.patch Wed Feb 1 18:39:42 2012
@@ -0,0 +1,20 @@
+--- XIMEA-1.04/examples/vaViewer/main.cpp.orig 2011-11-29 22:53:23.000000000 +0100
++++ XIMEA-1.04/examples/vaViewer/main.cpp 2012-02-01 18:36:06.409815747 +0100
+@@ -390,7 +390,7 @@
+ return TRUE;
+ }
+ startLive();
+- g_signal_handlers_block_matched(ctrl->mode, G_SIGNAL_MATCH_FUNC, 0, 0, 0, G_CALLBACK(update_mode),0);
++ g_signal_handlers_block_matched(ctrl->mode, G_SIGNAL_MATCH_FUNC, 0, 0, 0, (gpointer)(update_mode),0);
+ while(gtk_combo_box_get_active_text(GTK_COMBO_BOX(ctrl->mode))) {
+ gtk_combo_box_remove_text(GTK_COMBO_BOX(ctrl->mode), 0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(ctrl->mode), 0);
+@@ -402,7 +402,7 @@
+ gtk_combo_box_append_text(GTK_COMBO_BOX(ctrl->mode), szMode);
+ }
+ gtk_combo_box_set_active(GTK_COMBO_BOX(ctrl->mode), 0);
+- g_signal_handlers_unblock_matched(ctrl->mode, G_SIGNAL_MATCH_FUNC, 0, 0, 0, G_CALLBACK(update_mode),0);
++ g_signal_handlers_unblock_matched(ctrl->mode, G_SIGNAL_MATCH_FUNC, 0, 0, 0, (gpointer)(update_mode),0);
+ } else {
+ stopLive();
+ }
================================================================
Index: packages/XIMEA/XIMEA.spec
diff -u /dev/null packages/XIMEA/XIMEA.spec:1.1
--- /dev/null Wed Feb 1 18:39:47 2012
+++ packages/XIMEA/XIMEA.spec Wed Feb 1 18:39:42 2012
@@ -0,0 +1,116 @@
+# $Revision$, $Date$
+Summary: XIMEA API Software Package for Linux
+Summary(pl.UTF-8): Pakiet XIMEA API dla Linuksa
+Name: XIMEA
+# see version_LINUX_SP.txt
+Version: 1.04
+Release: 1
+# probably non-distributable: contains some mix of binaries and sources with no licensing information;
+# there is also binary .ko module (probably for some particular Ubuntu kernel) with license=GPL
+# and no sources included
+License: unknown
+Group: Libraries
+Source0: http://www.ximea.com/support/attachments/271/XIMEA_Linux_SP.tgz
+# NoSource0-md5: 2dabc84fe3a9bd5d31f5882c9d0aff21
+NoSource: 0
+Patch0: %{name}-gcc.patch
+Patch1: %{name}-glib.patch
+URL: http://www.ximea.com/support/wiki/currera/XIMEA_Linux_Software_Package
+BuildRequires: gtk+2-devel
+BuildRequires: libva-devel
+BuildRequires: libstdc++-devel
+BuildRequires: pkgconfig
+BuildArch: %{ix86}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+XIMEA Linux Software Package contains of
+ * Kernel Driver of CURRERA-R cameras for Ubuntu 10.04
+ * xiAPI
+ * Examples:
+ * xiSample - sample showing basic image acquisition in xiAPI
+ * vaViewer - camera live image viewer for picture check
+
+%description -l pl.UTF-8
+Pakiet XIMEA Linux Software Package składa się z:
+ - modułu jądra dla kamer CURRERA-R dla Ubuntu 10.04
+ - biblioteki xiAPI
+ - przykładów:
+ - xiSample - przykładu pokazującego proste ściąganie obrazu przy
+ użyciu xiAPI
+ - vaViewer - podgląd kamery na żywo
+
+%package devel
+Summary: Header files for xiAPI library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki xiAPI
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for xiAPI library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki xiAPI.
+
+%package viewer
+Summary: XIMEA vaViewer utility
+Summary(pl.UTF-8): Narzędzie vaViewer dla urządzeń XIMEA
+Group: X11/Applications/Graphics
+Requires: %{name}-devel = %{version}-%{release}
+
+%description viewer
+XIMEA vaViewer utility.
+
+%description viewer -l pl.UTF-8
+Narzędzie vaViewer dla urządzeń XIMEA.
+
+%prep
+%setup -q -c
+%patch0 -p1
+%patch1 -p1
+
+%build
+cd examples/vaViewer
+
+CXXFLAGS="%{rpmcxxflags} %{rpmcppflags} $(pkg-config --cflags libva libva-x11 gtk+-2.0) -I ../../include"
+%{__cxx} $CXXFLAGS -c acquisition.cpp
+%{__cxx} $CXXFLAGS -c main.cpp
+%{__cxx} %{rpmldflags} %{rpmcxxflags} -o vaViewer acquisition.o main.o $(pkg-config --libs libva libva-x11 gtk+-2.0) -L../../api -lm3api
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_includedir}/ximea}
+
+cp -p include/*.h $RPM_BUILD_ROOT%{_includedir}/ximea
+install api/libm3api.so $RPM_BUILD_ROOT%{_libdir}
+install examples/vaViewer/vaViewer $RPM_BUILD_ROOT%{_bindir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README
+%attr(755,root,root) %{_libdir}/libm3api.so
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/ximea
+
+%files viewer
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/vaViewer
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2012/02/01 17:39:42 qboosh
+- new, probably non-distributable package
+- glib patch to fix C++ type conflicts with current glib 2.x
+- gcc patch to convert SSE assembler from intel/masm compiler to gcc syntax
================================================================
More information about the pld-cvs-commit
mailing list