packages: camwire/camwire-etc.patch (NEW), camwire/camwire-fixes.patch (NEW...
qboosh
qboosh at pld-linux.org
Sun Aug 7 07:27:42 CEST 2011
Author: qboosh Date: Sun Aug 7 05:27:42 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- new
- fixes patch to fix compilation with recent gcc (and one detected runtime bug)
- netpbm patch to adjust netpbm include path
- link patch to fix libcamwire linking and link examples dynamically
- etc patch to use /etc instead of /usr/etc
- separated cammonitor subpackage because of additional dependencies (SDL, X11, netpbm)
---- Files affected:
packages/camwire:
camwire-etc.patch (NONE -> 1.1) (NEW), camwire-fixes.patch (NONE -> 1.1) (NEW), camwire-link.patch (NONE -> 1.1) (NEW), camwire-netpbm.patch (NONE -> 1.1) (NEW), camwire.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/camwire/camwire-etc.patch
diff -u /dev/null packages/camwire/camwire-etc.patch:1.1
--- /dev/null Sun Aug 7 07:27:42 2011
+++ packages/camwire/camwire-etc.patch Sun Aug 7 07:27:36 2011
@@ -0,0 +1,11 @@
+--- camwire2-1.9.0-Source/CMakeLists.txt.orig 2011-02-17 03:31:14.000000000 +0100
++++ camwire2-1.9.0-Source/CMakeLists.txt 2011-08-07 01:26:59.533060518 +0200
+@@ -25,7 +25,7 @@
+ add_subdirectory (examples)
+
+ # What to install where:
+-install (DIRECTORY etc/ DESTINATION etc PATTERN "RCS" EXCLUDE)
++install (DIRECTORY etc/ DESTINATION /etc PATTERN "RCS" EXCLUDE)
+ install (DIRECTORY share/ DESTINATION share)
+
+
================================================================
Index: packages/camwire/camwire-fixes.patch
diff -u /dev/null packages/camwire/camwire-fixes.patch:1.1
--- /dev/null Sun Aug 7 07:27:42 2011
+++ packages/camwire/camwire-fixes.patch Sun Aug 7 07:27:37 2011
@@ -0,0 +1,72 @@
+--- camwire2-1.9.0-Source/camwire/camwire.c.orig 2011-02-17 03:31:12.000000000 +0100
++++ camwire2-1.9.0-Source/camwire/camwire.c 2011-08-06 18:12:59.946406902 +0200
+@@ -3633,7 +3633,7 @@
+ &capability));
+ if (feature_is_usable(&capability))
+ {
+- if (capability.trigger_polarity == DC1394_TRUE)
++ if (capability.trigger_polarity == DC1394_TRIGGER_ACTIVE_HIGH)
+ set->trigger_polarity = 1;
+ else
+ set->trigger_polarity = 0;
+@@ -3980,7 +3980,6 @@
+ dc1394video_mode_t video_mode;
+ dc1394framerate_t frame_rate_index;
+ uint32_t num_packets, packet_size;
+- char *dma_device_file;
+ int depth;
+ dc1394framerates_t framerate_list;
+ dc1394color_coding_t color_id;
+@@ -3993,15 +3992,6 @@
+ internal_status = camwire_bus_get_userdata(c_handle);
+ ERROR_IF_NULL(internal_status);
+
+- if (cfg->dma_device_name[0] == '\0')
+- {
+- dma_device_file = 0;
+- }
+- else
+- {
+- dma_device_file = cfg->dma_device_name;
+- }
+-
+ /* If dc1394_capture_stop() is called without a preceding
+ successful call to dc1394_capture_setup(), libdc1394 used to get
+ into a tangled state. That is why we keep track with the
+--- camwire2-1.9.0-Source/examples/measureconf_1394.c.orig 2011-02-17 03:31:13.000000000 +0100
++++ camwire2-1.9.0-Source/examples/measureconf_1394.c 2011-08-06 18:20:13.159740017 +0200
+@@ -621,7 +621,6 @@
+ static int setup_trigger(const Camwire_handle c_handle, const int serial_dev)
+ {
+ int result, ext_trig;
+- double trig_time;
+ void *buffer;
+
+ single_shot_capable = 1; /* True unless we find out otherwise.*/
+@@ -633,7 +632,7 @@
+ {
+ camwire_set_trigger_polarity(c_handle, 1);
+ camwire_set_run_stop(c_handle, 1); /* Camera waits for a trigger.*/
+- trig_time = trigger(c_handle, serial_dev);
++ trigger(c_handle, serial_dev);
+ complete_acquisition(c_handle); /* Make sure it's arrived.*/
+ result = camwire_point_next_frame_poll(c_handle, &buffer, 0);
+ if (result != CAMWIRE_SUCCESS)
+@@ -979,7 +978,7 @@
+ const int serial_dev)
+ {
+ dc1394video_mode_t video_mode;
+- double framerate, shutter;
++ double framerate;
+ double f_dummy;
+ double T, trig_time, timestamp;
+ double transmit_time_in_ts_calc;
+@@ -1024,7 +1023,7 @@
+ /* nanosleep(&nap, 0); */
+
+ /* Trigger: */
+- shutter = set_random_shutter(c_handle);
++ set_random_shutter(c_handle);
+ if (ext_trig_OK) trig_time = trigger(c_handle, serial_dev);
+ else trig_time = soft_trigger(c_handle);
+ /* fprintf(stderr, "."); // Debugging. */
================================================================
Index: packages/camwire/camwire-link.patch
diff -u /dev/null packages/camwire/camwire-link.patch:1.1
--- /dev/null Sun Aug 7 07:27:42 2011
+++ packages/camwire/camwire-link.patch Sun Aug 7 07:27:37 2011
@@ -0,0 +1,59 @@
+--- camwire2-1.9.0-Source/camwire/CMakeLists.txt.orig 2011-02-17 03:31:12.000000000 +0100
++++ camwire2-1.9.0-Source/camwire/CMakeLists.txt 2011-08-06 20:11:05.519736684 +0200
+@@ -45,6 +45,7 @@
+ VERSION ${Camwire_VERSION_STRING}
+ SOVERSION ${Camwire_SOVERSION}
+ SKIP_BUILD_RPATH ON)
++target_link_libraries(camwire dc1394 m)
+
+ # What to install where:
+ install (TARGETS camwire camwire_static DESTINATION lib)
+--- camwire2-1.9.0-Source/examples/cammonitor/CMakeLists.txt.orig 2011-02-17 03:31:14.000000000 +0100
++++ camwire2-1.9.0-Source/examples/cammonitor/CMakeLists.txt 2011-08-07 07:21:57.196383177 +0200
+@@ -15,7 +15,7 @@ set_target_properties (cammonitor PROPER
+ LINK_FLAGS ${Camwire_SDL_LIBS}
+ SKIP_BUILD_RPATH ON)
+ target_link_libraries (cammonitor
+- libcamwire.a
++ camwire
+ dc1394
+ netpbm
+ m
+--- camwire2-1.9.0-Source/examples/CMakeLists.txt.orig 2011-02-17 03:31:14.000000000 +0100
++++ camwire2-1.9.0-Source/examples/CMakeLists.txt 2011-08-07 07:21:45.499716516 +0200
+@@ -9,7 +9,7 @@ add_executable (hello hello.c)
+ set_target_properties (hello PROPERTIES
+ SKIP_BUILD_RPATH ON)
+ target_link_libraries (hello
+- libcamwire.a
++ camwire
+ dc1394
+ m)
+
+@@ -17,7 +17,7 @@ add_executable (camlatency camlatency.c
+ set_target_properties (camlatency PROPERTIES
+ SKIP_BUILD_RPATH ON)
+ target_link_libraries (camlatency
+- libcamwire.a
++ camwire
+ dc1394
+ m)
+
+@@ -25,7 +25,7 @@ add_executable (measureconf_1394 measur
+ set_target_properties (measureconf_1394 PROPERTIES
+ SKIP_BUILD_RPATH ON)
+ target_link_libraries (measureconf_1394
+- libcamwire.a
++ camwire
+ dc1394
+ m)
+
+@@ -33,7 +33,7 @@ add_executable (resetbus_1394 resetbus_
+ set_target_properties (resetbus_1394 PROPERTIES
+ SKIP_BUILD_RPATH ON)
+ target_link_libraries (resetbus_1394
+- libcamwire.a
++ camwire
+ dc1394
+ m)
+
================================================================
Index: packages/camwire/camwire-netpbm.patch
diff -u /dev/null packages/camwire/camwire-netpbm.patch:1.1
--- /dev/null Sun Aug 7 07:27:42 2011
+++ packages/camwire/camwire-netpbm.patch Sun Aug 7 07:27:37 2011
@@ -0,0 +1,11 @@
+--- camwire2-1.9.0-Source/examples/cammonitor/cammonitor.c.orig 2011-02-17 03:31:13.000000000 +0100
++++ camwire2-1.9.0-Source/examples/cammonitor/cammonitor.c 2011-08-06 18:23:37.156406582 +0200
+@@ -41,7 +41,7 @@
+ #include <ctype.h>
+ #include <math.h>
+ #include <sys/time.h>
+-#include <netpbm/pam.h>
++#include <pam.h>
+ #include <inttypes.h>
+
+ #include "camwire/camwirebus.h"
================================================================
Index: packages/camwire/camwire.spec
diff -u /dev/null packages/camwire/camwire.spec:1.1
--- /dev/null Sun Aug 7 07:27:42 2011
+++ packages/camwire/camwire.spec Sun Aug 7 07:27:37 2011
@@ -0,0 +1,135 @@
+# $Revision$, $Date$
+Summary: Digital camera library for Linux
+Summary(pl.UTF-8): Biblioteka obsługi kamer cyfrowych dla Linuksa
+Name: camwire
+Version: 1.9.0
+Release: 1
+License: LGPL v2.1+
+Group: Libraries
+# camwire1 was for libdc1394 < 2.0, camwire2 for libdc1394 2.0+
+Source0: http://kauri.auck.irl.cri.nz/~johanns/camwire/download/camwire2/camwire2-%{version}-Source.tar.gz
+# Source0-md5: 94edddf9f4b7efb00a695ed4fbd22f9f
+Patch0: %{name}-fixes.patch
+Patch1: %{name}-netpbm.patch
+Patch2: %{name}-link.patch
+Patch3: %{name}-etc.patch
+URL: http://kauri.auck.irl.cri.nz/~johanns/camwire/
+BuildRequires: SDL-devel
+BuildRequires: cmake >= 2.6
+BuildRequires: netpbm-devel
+BuildRequires: libdc1394-devel >= 2.1.0
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXext-devel
+BuildRequires: xorg-lib-libXv-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Camwire is a digital camera library for Linux. It provides a set of C
+functions to control IEEE1394 digital cameras from a computer.
+
+%description -l pl.UTF-8
+Camwire to biblioteka obsługi kamer cyfrowych dla Linuksa. Udostępnia
+zbiór funkcji C do sterowania kamerami cyfrowymi IEEE1394 z poziomu
+komputera.
+
+%package devel
+Summary: Header files for Camwire library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Camwire
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: libdc1394-devel >= 2.1.0
+
+%description devel
+Header files for Camwire library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki Camwire.
+
+%package static
+Summary: Static Camwire library
+Summary(pl.UTF-8): Statyczna biblioteka Camwire
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static Camwire library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka Camwire.
+
+%package cammonitor
+Summary: Camera monitor
+Summary(pl.UTF-8): Monitor kamer
+Group: X11/Applications/Multimedia
+Requires: %{name} = %{version}-%{release}
+
+%description cammonitor
+Camera monitor provides basic access to digital camera functions via a
+simple terminal and display interface, using the Camwire API.
+
+%description cammonitor -l pl.UTF-8
+Monitor kamery zapewnia podstawowy dostęp do funkcji kamer cyfrowych
+poprzez prosty interfejs terminala i wyświetlacza. Wykorzystuje API
+Camwire.
+
+%prep
+%setup -q -n camwire2-%{version}-Source
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+%build
+%cmake
+%{__make} -j1
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGELOG CONFIGURATION README index.html
+%attr(755,root,root) %{_bindir}/camlatency
+%attr(755,root,root) %{_bindir}/measureconf_1394
+%attr(755,root,root) %{_bindir}/resetbus_1394
+%dir %{_sysconfdir}/camwire
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/camwire/*.conf
+%attr(755,root,root) %{_libdir}/libcamwire.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libcamwire.so.2
+%{_datadir}/camwire
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libcamwire.so
+%{_includedir}/camwire
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libcamwire.a
+
+%files cammonitor
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/cammonitor
+
+%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 2011/08/07 05:27:37 qboosh
+- new
+- fixes patch to fix compilation with recent gcc (and one detected runtime bug)
+- netpbm patch to adjust netpbm include path
+- link patch to fix libcamwire linking and link examples dynamically
+- etc patch to use /etc instead of /usr/etc
+- separated cammonitor subpackage because of additional dependencies (SDL, X11, netpbm)
================================================================
More information about the pld-cvs-commit
mailing list