From da53ea9200922aaaf9313637bb1a43e82fdfe79f Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Wed, 19 Aug 2020 19:05:30 +0200 Subject: [PATCH] - updated to 0.8.0 - added format patch (fix C format string issues) - gstreamer0.10 plugin is gone --- aravis-format.patch | 137 ++++++++++++++++++++++++++++++++++++++++++++ aravis.spec | 137 ++++++++++++++++---------------------------- 2 files changed, 186 insertions(+), 88 deletions(-) create mode 100644 aravis-format.patch diff --git a/aravis-format.patch b/aravis-format.patch new file mode 100644 index 0000000..1aba08d --- /dev/null +++ b/aravis-format.patch @@ -0,0 +1,137 @@ +--- aravis-0.8.0/src/arvgvstream.c.orig 2020-08-17 15:26:01.681058000 +0200 ++++ aravis-0.8.0/src/arvgvstream.c 2020-08-19 18:19:13.369731905 +0200 +@@ -314,7 +314,7 @@ + block_end = block_size + block_offset; + + if (block_end > frame->buffer->priv->size) { +- arv_debug_stream_thread ("[GvStream::process_data_block] %" G_GUINT64_FORMAT " unexpected bytes in packet %u " ++ arv_debug_stream_thread ("[GvStream::process_data_block] %" G_GINTPTR_FORMAT " unexpected bytes in packet %u " + " for frame %" G_GUINT64_FORMAT, + block_end - frame->buffer->priv->size, + packet_id, frame->frame_id); +@@ -1333,7 +1333,7 @@ + thread_data = priv->thread_data; + + statistic_string = arv_statistic_to_string (thread_data->statistic); +- arv_debug_stream (statistic_string); ++ arv_debug_stream ("%s", statistic_string); + g_free (statistic_string); + arv_statistic_free (thread_data->statistic); + +--- aravis-0.8.0/src/arvuvdevice.c.orig 2020-08-17 15:26:01.683058000 +0200 ++++ aravis-0.8.0/src/arvuvdevice.c 2020-08-19 18:36:37.887406601 +0200 +@@ -468,9 +468,9 @@ + } + + arv_debug_device ("MAX_DEVICE_RESPONSE_TIME = 0x%08x", response_time); +- arv_debug_device ("DEVICE_CAPABILITY = 0x%016lx", device_capability); +- arv_debug_device ("SRBM_ADDRESS = 0x%016lx", offset); +- arv_debug_device ("MANIFEST_TABLE_ADDRESS = 0x%016lx", manifest_table_address); ++ arv_debug_device ("DEVICE_CAPABILITY = 0x%016" G_GINT64_MODIFIER "x", device_capability); ++ arv_debug_device ("SRBM_ADDRESS = 0x%016" G_GINT64_MODIFIER "x", offset); ++ arv_debug_device ("MANIFEST_TABLE_ADDRESS = 0x%016" G_GINT64_MODIFIER "x", manifest_table_address); + + priv->timeout_ms = MAX (ARV_UVCP_DEFAULT_RESPONSE_TIME_MS, response_time); + +@@ -486,7 +486,7 @@ + arv_debug_device ("U3VCP_CAPABILITY = 0x%08x", u3vcp_capability); + arv_debug_device ("MAX_CMD_TRANSFER = 0x%08x", max_cmd_transfer); + arv_debug_device ("MAX_ACK_TRANSFER = 0x%08x", max_ack_transfer); +- arv_debug_device ("SIRM_OFFSET = 0x%016lx", sirm_offset); ++ arv_debug_device ("SIRM_OFFSET = 0x%016" G_GINT64_MODIFIER "x", sirm_offset); + + priv->cmd_packet_size_max = MIN (priv->cmd_packet_size_max, max_cmd_transfer); + priv->ack_packet_size_max = MIN (priv->ack_packet_size_max, max_ack_transfer); +@@ -509,7 +509,7 @@ + + arv_debug_device ("SI_INFO = 0x%08x", si_info); + arv_debug_device ("SI_CONTROL = 0x%08x", si_control); +- arv_debug_device ("SI_REQ_PAYLOAD_SIZE = 0x%016lx", si_req_payload_size); ++ arv_debug_device ("SI_REQ_PAYLOAD_SIZE = 0x%016" G_GINT64_MODIFIER "x", si_req_payload_size); + arv_debug_device ("SI_REQ_LEADER_SIZE = 0x%08x", si_req_leader_size); + arv_debug_device ("SI_REQ_TRAILER_SIZE = 0x%08x", si_req_trailer_size); + arv_debug_device ("SI_MAX_LEADER_SIZE = 0x%08x", si_max_leader_size); +@@ -526,15 +526,15 @@ + return FALSE; + } + +- arv_debug_device ("MANIFEST_N_ENTRIES = 0x%016lx", manifest_n_entries); ++ arv_debug_device ("MANIFEST_N_ENTRIES = 0x%016" G_GINT64_MODIFIER "x", manifest_n_entries); + + string = g_string_new (""); + arv_g_string_append_hex_dump (string, &entry, sizeof (entry)); + arv_debug_device ("MANIFEST ENTRY\n%s", string->str); + g_string_free (string, TRUE); + +- arv_debug_device ("genicam address = 0x%016lx", entry.address); +- arv_debug_device ("genicam size = 0x%016lx", entry.size); ++ arv_debug_device ("genicam address = 0x%016" G_GINT64_MODIFIER "x", entry.address); ++ arv_debug_device ("genicam size = 0x%016" G_GINT64_MODIFIER "x", entry.size); + + data = g_malloc0 (entry.size); + success = success && arv_device_read_memory (device, entry.address, entry.size, data, NULL); +--- aravis-0.8.0/src/arvuvstream.c.orig 2020-08-17 15:26:01.683058000 +0200 ++++ aravis-0.8.0/src/arvuvstream.c 2020-08-19 18:39:27.603153838 +0200 +@@ -171,7 +171,7 @@ + case ARV_UVSP_PACKET_TYPE_TRAILER: + if (buffer != NULL) { + arv_log_stream_thread ("Received %" G_GUINT64_FORMAT +- " bytes - expected %" G_GUINT64_FORMAT, ++ " bytes - expected %zu", + offset, buffer->priv->size); + + /* If the image was incomplete, drop the frame and try again. */ +@@ -287,7 +287,7 @@ + alignment = 1 << ((si_info & ARV_SI_INFO_ALIGNMENT_MASK) >> ARV_SI_INFO_ALIGNMENT_SHIFT); + + arv_debug_stream ("SI_INFO = 0x%08x", si_info); +- arv_debug_stream ("SI_REQ_PAYLOAD_SIZE = 0x%016lx", si_req_payload_size); ++ arv_debug_stream ("SI_REQ_PAYLOAD_SIZE = 0x%016" G_GINT64_MODIFIER "x", si_req_payload_size); + arv_debug_stream ("SI_REQ_LEADER_SIZE = 0x%08x", si_req_leader_size); + arv_debug_stream ("SI_REQ_TRAILER_SIZE = 0x%08x", si_req_trailer_size); + +--- aravis-0.8.0/src/arvzip.c.orig 2020-08-17 15:26:01.683058000 +0200 ++++ aravis-0.8.0/src/arvzip.c 2020-08-19 18:50:28.016242740 +0200 +@@ -86,7 +86,7 @@ + ptr = zip->buffer + zip->header_size + offset; + if (ARV_GUINT32_FROM_LE_PTR (ptr, 0) != 0x02014b50) { + arv_debug_misc ("[Zip::build_file_list] Magic number of central directory not found (0x02014b50)"); +- arv_debug_misc ("[Zip::build_file_list] Expected at 0x%" G_GINT64_MODIFIER "x - found 0x%08x instead", ++ arv_debug_misc ("[Zip::build_file_list] Expected at 0x%" G_GSIZE_MODIFIER "x - found 0x%08x instead", + zip->header_size + offset, ARV_GUINT32_FROM_LE_PTR (ptr, 0)); + return; + } +@@ -191,9 +191,9 @@ + zip->header_size = zip->directory_position - (zip->directory_offset + zip->directory_size); + + arv_log_misc ("[Zip::new] number of files = %d", zip->n_files); +- arv_log_misc ("[Zip::new] directory position = 0x%08" G_GINT64_MODIFIER "x", zip->directory_position); ++ arv_log_misc ("[Zip::new] directory position = 0x%08" G_GINTPTR_MODIFIER "x", zip->directory_position); + arv_log_misc ("[Zip::new] directory size = %" G_GSIZE_FORMAT, zip->directory_size); +- arv_log_misc ("[Zip::new] directory offset = 0x%08" G_GINT64_MODIFIER "x", zip->directory_offset); ++ arv_log_misc ("[Zip::new] directory offset = 0x%08" G_GINTPTR_MODIFIER "x", zip->directory_offset); + arv_log_misc ("[Zip::new] header size = %" G_GSIZE_FORMAT, zip->header_size); + + arv_zip_build_file_list (zip); +--- aravis-0.8.0/src/arvgvsp.c.orig 2020-08-17 15:26:01.681058000 +0200 ++++ aravis-0.8.0/src/arvgvsp.c 2020-08-19 18:51:36.585871266 +0200 +@@ -180,7 +180,7 @@ + arv_gvsp_packet_get_frame_id (packet), + arv_gvsp_packet_has_extended_ids (packet) ? " extended" : ""); + g_string_append_printf (string, "packet_id = %8u\n", arv_gvsp_packet_get_packet_id (packet)); +- g_string_append_printf (string, "data_size = %8" G_GUINT64_FORMAT "\n", arv_gvsp_packet_get_data_size (packet, packet_size)); ++ g_string_append_printf (string, "data_size = %8" G_GSIZE_FORMAT "\n", arv_gvsp_packet_get_data_size (packet, packet_size)); + + switch (content_type) { + case ARV_GVSP_CONTENT_TYPE_DATA_LEADER: +--- aravis-0.8.0/tests/loadhttptest.c.orig 2020-08-17 15:26:01.685058000 +0200 ++++ aravis-0.8.0/tests/loadhttptest.c 2020-08-19 18:52:16.952319249 +0200 +@@ -45,7 +45,7 @@ + + g_strfreev (tokens); + +- printf ("size = %lu\n", len); ++ printf ("size = %" G_GSIZE_FORMAT "\n", len); + printf ("%s\n", genicam != NULL ? genicam : "NULL"); + + g_free (genicam); diff --git a/aravis.spec b/aravis.spec index 536b375..3d5423e 100644 --- a/aravis.spec +++ b/aravis.spec @@ -1,50 +1,44 @@ # # Conditional build: %bcond_without gui # Viewer application -%bcond_without gstreamer # alias to disable both GStreamer plugins -%bcond_without gstreamer1 # GStreamer 1 plugin -%bcond_without gstreamer0_10 # GStreamer 0.10 plugin +%bcond_without gstreamer # GStreamer plugin -%if %{without gstreamer} -%undefine with_gstreamer1 -%undefine with_gstreamer0_10 -%endif Summary: Aravis digital video camera acquisition library Summary(pl.UTF-8): Aravis - biblioteka do pobierania obrazu z kamer cyfrowych Name: aravis -Version: 0.6.4 +Version: 0.8.0 Release: 1 License: LGPL v2+ Group: Libraries -Source0: http://ftp.gnome.org/pub/GNOME/sources/aravis/0.6/%{name}-%{version}.tar.xz -# Source0-md5: 632227c75701dd687648b01e54a03206 +Source0: http://ftp.gnome.org/pub/GNOME/sources/aravis/0.8/%{name}-%{version}.tar.xz +# Source0-md5: 8e2f66fbd0cc715cb5794be592063c37 +Patch0: %{name}-format.patch URL: https://wiki.gnome.org/Projects/Aravis -BuildRequires: appstream-glib-devel +BuildRequires: appstream-glib BuildRequires: audit-libs-devel BuildRequires: gettext-tools -BuildRequires: glib2-devel >= 1:2.26 +BuildRequires: glib2-devel >= 1:2.44 BuildRequires: gobject-introspection-devel >= 0.10.0 -%if %{with gstreamer1} || %{with gui} +%if %{with gstreamer} || %{with gui} BuildRequires: gstreamer-devel >= 1.0 BuildRequires: gstreamer-plugins-base-devel >= 1.0 %endif -%if %{with gstreamer0_10} -BuildRequires: gstreamer0.10-devel >= 0.10 -BuildRequires: gstreamer0.10-plugins-base-devel >= 0.10 -%endif %{?with_gui:BuildRequires: gtk+3-devel >= 3.14.0} BuildRequires: gtk-doc >= 1.14 -BuildRequires: intltool >= 0.31.2 %{?with_gui:BuildRequires: libnotify-devel} BuildRequires: libusb-devel >= 1.0 BuildRequires: libxml2-devel >= 2.0 +BuildRequires: libxslt-progs +BuildRequires: meson >= 0.47.0 +BuildRequires: ninja >= 1.5 BuildRequires: pkgconfig >= 1:0.14 -BuildRequires: rpmbuild(macros) >= 1.592 +BuildRequires: rpmbuild(macros) >= 1.736 BuildRequires: tar >= 1:1.22 BuildRequires: xz BuildRequires: zlib-devel -Requires: glib2 >= 1:2.32.0 +Requires: glib2 >= 1:2.44 Requires: gtk+3 >= 3.14.0 +Obsoletes: gstreamer0.10-aravis < 0.7 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -78,7 +72,7 @@ Summary: Header files for Aravis library Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Aravis Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: glib2-devel >= 1:2.32.0 +Requires: glib2-devel >= 1:2.44 Requires: libxml2-devel >= 2.0 Requires: zlib-devel @@ -105,7 +99,7 @@ Summary: API documentation for Aravis library Summary(pl.UTF-8): Dokumentacja API biblioteki Aravis Group: Documentation Requires: gtk-doc-common -%if "%{_rpmversion}" >= "5" +%if "%{_rpmversion}" >= "4.6" BuildArch: noarch %endif @@ -115,65 +109,39 @@ API documentation for Aravis library. %description apidocs -l pl.UTF-8 Dokumentacja API biblioteki Aravis. -%package -n gstreamer0.10-aravis -Summary: GStreamer 0.10 plugin for Aravis digital video camera acquisition library -Summary(pl.UTF-8): Wtyczka GStreamera 0.10 do biblioteki pobierania obrazu z kamer cyfrowych Aravis -Group: Libraries -Requires: %{name} = %{version}-%{release} -Requires: gstreamer0.10 >= 0.10 -Requires: gstreamer0.10-plugins-base >= 0.10 - -%description -n gstreamer0.10-aravis -GStreamer 0.10 plugin for Aravis digital video camera acquisition -library. - -%description -n gstreamer0.10-aravis -l pl.UTF-8 -Wtyczka GStreamera 0.10 do biblioteki pobierania obrazu z kamer -cyfrowych Aravis. - %package -n gstreamer-aravis -Summary: GStreamer 1 plugin for Aravis digital video camera acquisition library -Summary(pl.UTF-8): Wtyczka GStreamera 1 do biblioteki pobierania obrazu z kamer cyfrowych Aravis +Summary: GStreamer plugin for Aravis digital video camera acquisition library +Summary(pl.UTF-8): Wtyczka GStreamera do biblioteki pobierania obrazu z kamer cyfrowych Aravis Group: Libraries Requires: %{name} = %{version}-%{release} Requires: gstreamer >= 1.0 Requires: gstreamer-plugins-base >= 1.0 %description -n gstreamer-aravis -GStreamer 1 plugin for Aravis digital video camera acquisition +GStreamer plugin for Aravis digital video camera acquisition library. %description -n gstreamer-aravis -l pl.UTF-8 -Wtyczka GStreamera 1 do biblioteki pobierania obrazu z kamer cyfrowych +Wtyczka GStreamera do biblioteki pobierania obrazu z kamer cyfrowych Aravis. %prep %setup -q +%patch0 -p1 %build -%configure \ - --disable-silent-rules \ - %{!?with_gstreamer1:--disable-gst-plugin} \ - %{!?with_gstreamer0_10:--disable-gst-0.10-plugin} \ - %{!?with_gui:--disable-viewer} \ - --with-html-dir=%{_gtkdocdir} +%meson build \ + %{!?with_gstreamer:-Dgst-plugin=disabled} \ + %{!?with_gui:-Dviewer=disabled} -%{__make} +%ninja_build -C build %install rm -rf $RPM_BUILD_ROOT -%{__make} install \ - DESTDIR=$RPM_BUILD_ROOT - -# loadable modules -%{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-*/libgstaravis.0.6.la -# obsoleted by pkg-config -%{__rm} $RPM_BUILD_ROOT%{_libdir}/libaravis-0.6.la -# packaged as %doc -%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/aravis +%ninja_install -C build -%find_lang %{name}-0.6 +%find_lang %{name}-0.8 %clean rm -rf $RPM_BUILD_ROOT @@ -187,51 +155,44 @@ rm -rf $RPM_BUILD_ROOT %postun viewer %update_icon_cache hicolor -%files -f %{name}-0.6.lang +%files -f %{name}-0.8.lang %defattr(644,root,root,755) -%doc AUTHORS NEWS README.md TODO -%attr(755,root,root) %{_bindir}/arv-fake-gv-camera-0.6 -%attr(755,root,root) %{_bindir}/arv-tool-0.6 -%attr(755,root,root) %{_libdir}/libaravis-0.6.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libaravis-0.6.so.0 -%{_libdir}/girepository-1.0/Aravis-0.6.typelib -%{_mandir}/man1/arv-tool-0.6.1* +%doc AUTHORS NEWS.md README.md +%attr(755,root,root) %{_bindir}/arv-fake-gv-camera-0.8 +%attr(755,root,root) %{_bindir}/arv-tool-0.8 +%attr(755,root,root) %{_libdir}/libaravis-0.8.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libaravis-0.8.so.0 +%{_libdir}/girepository-1.0/Aravis-0.8.typelib +%{_mandir}/man1/arv-tool-0.8.1* %if %{with gui} %files viewer %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/arv-viewer -%{_datadir}/aravis-0.6 -%{_datadir}/appdata/arv-viewer.appdata.xml -%{_desktopdir}/arv-viewer.desktop -%{_iconsdir}/hicolor/*x*/apps/aravis.png -%{_iconsdir}/hicolor/scalable/devices/aravis-*-symbolic.svg -%{_mandir}/man1/arv-viewer.1* +%attr(755,root,root) %{_bindir}/arv-viewer-0.8 +%{_datadir}/aravis-0.8 +%{_datadir}/metainfo/arv-viewer-0.8.appdata.xml +%{_desktopdir}/arv-viewer-0.8.desktop +%{_iconsdir}/hicolor/*x*/apps/aravis-0.8.png +%{_mandir}/man1/arv-viewer-0.8.1* %endif %files devel %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/libaravis-0.6.so -%{_includedir}/aravis-0.6 -%{_datadir}/gir-1.0/Aravis-0.6.gir -%{_pkgconfigdir}/aravis-0.6.pc +%attr(755,root,root) %{_libdir}/libaravis-0.8.so +%{_includedir}/aravis-0.8 +%{_datadir}/gir-1.0/Aravis-0.8.gir +%{_pkgconfigdir}/aravis-0.8.pc %files static %defattr(644,root,root,755) -%{_libdir}/libaravis-0.6.a +%{_libdir}/libaravis-0.8.a %files apidocs %defattr(644,root,root,755) -%{_gtkdocdir}/aravis-0.6 - -%if %{with gstreamer0_10} -%files -n gstreamer0.10-aravis -%defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/gstreamer-0.10/libgstaravis.0.6.so -%endif +%{_gtkdocdir}/aravis-0.8 -%if %{with gstreamer1} +%if %{with gstreamer} %files -n gstreamer-aravis %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstaravis.0.6.so +%attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstaravis.0.8.so %endif -- 2.43.0