[packages/fz-api] - up to 20130925 tarball (API version is 4.1.2) - use system-libyuv patch instead of sedding
qboosh
qboosh at pld-linux.org
Thu Jul 24 21:21:55 CEST 2014
commit 2802a0ce441b809fb19f77a2299d6d903f164177
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Jul 24 21:27:13 2014 +0200
- up to 20130925 tarball (API version is 4.1.2)
- use system-libyuv patch instead of sedding
fz-api-system-libyuv.patch | 66 ++++++++++++++++++++++++++++++++++++++++++++++
fz-api.spec | 34 ++++++++++--------------
2 files changed, 80 insertions(+), 20 deletions(-)
---
diff --git a/fz-api.spec b/fz-api.spec
index adf9921..4ab6668 100644
--- a/fz-api.spec
+++ b/fz-api.spec
@@ -1,16 +1,19 @@
Summary: FZ-API to access the Fotonic cameras
Summary(pl.UTF-8): FZ-API pozwalające na dostęp do kamer Fotonic
Name: fz-api
-# version unknown
-Version: 0
-Release: 1
+# see fz_api_src/fzapi.cpp /FZAPI_VERSION
+Version: 4.1.2
+%define verdate 20130925
+Release: 0.%{verdate}.1
License: LGPL v3+
Group: Libraries
-Source0: http://www.fotonic.com/assets/documents/downloads/fz-linux-api_x64.tar.gz.zip
-# Source0-md5: 74cc0d1dcd13a6fe98baae01777cb1a3
-# tarballs differ only by pre-compiled binaries; we use only sources and docs, which are the same
-#Source1: http://www.fotonic.com/assets/documents/downloads/fz-linux-api_x86.tar.gz.zip
-## Source1-md5: bb37c1bf0bfbd3f06e8f6b0393a46b87
+Source0: http://www.fotonic.com/assets/documents/files/131002/fz-linux-api_x64_%{verdate}.tar.gz
+# Source0-md5: bd306ca31230cd632ca4060b5c26b98b
+# there is also
+#Source1: http://www.fotonic.com/assets/documents/files/fz-linux-api_x86_20130322.tar.gz
+## Source1-md5: 05b3be93d3ba1644c53f5cca9f6029f9
+# but it's older and both versions could be built from the same sources
+Patch0: %{name}-system-libyuv.patch
URL: http://www.fotonic.com/content/Products/downloads.aspx
BuildRequires: libstdc++-devel
BuildRequires: libyuv-devel
@@ -60,23 +63,14 @@ Dokumentacja do FZ-API.
%prep
%setup -q -c
-
-tar xzf fz-linux-api_x64.tar.gz
-# not required so far
-#tar xzf fz-linux-api_x86.tar.gz
-
-# adjust libyuv include
-%{__sed} -i -e 's,libyuv/libyuv\.h,libyuv.h,' fz-linux-api_x64/fz_api_src/fzapi.cpp
-# be consistent with docs and precompiled binaries
-%{__sed} -i -e 's,libFZ_API,libfz_api,' fz-linux-api_x64/fz_api_src/Makefile
+%patch0 -p0
%build
%{__make} -C fz-linux-api_x64/fz_api_src \
CC="%{__cc}" \
CPP="%{__cxx}" \
- CFLAGS="%{rpmcflags} -fPIC -Wall" \
- LDFLAGS_D_OUT="%{rpmldflags} -shared -Wl,-soname,libfz_api.so.1 -o libfz_api.so.1.0" \
- LDFLAGS_PLAIN="-lyuv -lpthread" \
+ COMPILERFLAGS="%{rpmcflags} -Wall" \
+ LDFLAGS="%{rpmldflags}" \
TARGET_ARCH= \
TARGET_OS=Linux
diff --git a/fz-api-system-libyuv.patch b/fz-api-system-libyuv.patch
new file mode 100644
index 0000000..628205a
--- /dev/null
+++ b/fz-api-system-libyuv.patch
@@ -0,0 +1,66 @@
+--- fz-linux-api_x64/fz_api_src/Makefile.orig 2013-09-25 11:56:53.000000000 +0200
++++ fz-linux-api_x64/fz_api_src/Makefile 2014-07-24 21:20:32.086256112 +0200
+@@ -16,7 +16,7 @@
+ COMPILERFLAGS = -Wall -g
+
+
+-LDFLAGS_PLAIN = -lpthread
++LDFLAGS_PLAIN = -lyuv -lpthread
+ EXE_PATH = ./
+
+ ifeq ($(TARGET_OS),Darwin)
+@@ -24,13 +24,8 @@
+ LDFLAGS_D_OUT = -dynamiclib -o libfz_api.dylib
+ else
+
+-ifeq ($(TARGET_ARCH),x86_64)
+-CFLAGS = -m64 -fPIC $(COMPILERFLAGS) -I./
+-LDFLAGS_D_OUT = -m64 -shared -Wl,-soname,libfz_api.so.1 -o libfz_api.so.1.0
+-else
+-CFLAGS = $(COMPILERFLAGS) -I./
+-LDFLAGS_D_OUT = -shared -Wl,-soname,libfz_api.so.1 -o libfz_api.so.1.0
+-endif
++CFLAGS = -fPIC $(COMPILERFLAGS) -I./
++LDFLAGS_D_OUT = $(LDFLAGS) -shared -Wl,-soname,libfz_api.so.1 -o libfz_api.so.1.0
+
+ endif
+
+@@ -38,17 +33,7 @@
+ #objects
+
+ API_OBJECTS = ./timer.o ./socket_2.o ./logger.o ./common.o \
+- ./fzapi_channel.o ./fzapi.o ./fz_ll.o ./stream.o ./libyuv/cpu_id.o \
+- ./libyuv/compare.o ./libyuv/compare_common.o ./libyuv/compare_neon.o \
+- ./libyuv/compare_posix.o ./libyuv/compare_win.o ./libyuv/convert.o \
+- ./libyuv/convert_argb.o ./libyuv/convert_from.o ./libyuv/convert_from_argb.o \
+- ./libyuv/format_conversion.o ./libyuv/mjpeg_decoder.o ./libyuv/planar_functions.o \
+- ./libyuv/rotate.o ./libyuv/rotate_argb.o ./libyuv/rotate_mips.o \
+- ./libyuv/rotate_neon.o ./libyuv/row_posix.o ./libyuv/row_win.o \
+- ./libyuv/scale.o ./libyuv/scale_argb.o \
+- ./libyuv/scale_argb_neon.o ./libyuv/scale_mips.o ./libyuv/scale_neon.o \
+- ./libyuv/video_common.o ./libyuv/row_any.o ./libyuv/row_common.o \
+- ./libyuv/row_mips.o ./libyuv/row_neon.o
++ ./fzapi_channel.o ./fzapi.o ./fz_ll.o ./stream.o
+
+
+ #########
+@@ -65,7 +50,7 @@
+ @rm -f $*.d.tmp
+
+ %.o: %.cc
+- g++ $(CFLAGS) -c $*.cc -o $*.o
++ $(CPP) $(CFLAGS) -c $*.cc -o $*.o
+
+ %.o: %.c
+ $(CC) $(CFLAGS) -c $*.c -o $*.o
+--- fz-linux-api_x64/fz_api_src/fzapi.cpp.orig 2014-07-24 21:21:37.052920053 +0200
++++ fz-linux-api_x64/fz_api_src/fzapi.cpp 2014-07-24 21:21:40.052919927 +0200
+@@ -611,7 +611,7 @@
+ return iResult;
+ }
+
+-#include <libyuv/libyuv.h>
++#include <libyuv.h>
+
+ FZ_API FZ_Result FZ_GetFrameARGB(
+ FZ_Device_Handle_t hDev,
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/fz-api.git/commitdiff/2802a0ce441b809fb19f77a2299d6d903f164177
More information about the pld-cvs-commit
mailing list