forked from pool/libmirage
Accepting request 487460 from filesystems
- Fix SLES 11 build. We're also need Glib 2.28 instead of 2.22.5. Most desktop and workstation users are turn on Packman repository, so they're have Glib 2.28 installed from there. - Added 01_g_assert_nonnull.diff patch taken from Cdemu PPA. - Add libmirage-3.0.5-glib-2.28-workaround.patch - Add glib2-devel as a required for the -devel package. That fixes some rpmbuild warning. OBS-URL: https://build.opensuse.org/request/show/487460 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libmirage?expand=0&rev=16
This commit is contained in:
commit
9214a57e29
52
01_g_assert_nonnull.diff
Normal file
52
01_g_assert_nonnull.diff
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
Index: libmirage-3.0.5/images/image-ccd/parser.c
|
||||||
|
===================================================================
|
||||||
|
--- libmirage-3.0.5.orig/images/image-ccd/parser.c 2016-10-19 20:45:47.238020045 +0200
|
||||||
|
+++ libmirage-3.0.5/images/image-ccd/parser.c 2016-10-19 20:46:38.188531986 +0200
|
||||||
|
@@ -927,7 +927,7 @@
|
||||||
|
|
||||||
|
CCD_RegexRule *new_rule = g_new(CCD_RegexRule, 1);
|
||||||
|
new_rule->regex = g_regex_new(rule, G_REGEX_OPTIMIZE, 0, NULL);
|
||||||
|
- g_assert_nonnull(new_rule->regex);
|
||||||
|
+ g_assert(new_rule->regex != NULL);
|
||||||
|
new_rule->callback_func = callback;
|
||||||
|
/* Append to the list */
|
||||||
|
list = g_list_append(list, new_rule);
|
||||||
|
Index: libmirage-3.0.5/images/image-cue/parser.c
|
||||||
|
===================================================================
|
||||||
|
--- libmirage-3.0.5.orig/images/image-cue/parser.c 2016-10-19 20:45:47.238020045 +0200
|
||||||
|
+++ libmirage-3.0.5/images/image-cue/parser.c 2016-10-19 20:46:38.188531986 +0200
|
||||||
|
@@ -767,7 +767,7 @@
|
||||||
|
|
||||||
|
CUE_RegexRule *new_rule = g_new(CUE_RegexRule, 1);
|
||||||
|
new_rule->regex = g_regex_new(rule, G_REGEX_OPTIMIZE, 0, NULL);
|
||||||
|
- g_assert_nonnull(new_rule->regex);
|
||||||
|
+ g_assert(new_rule->regex != NULL);
|
||||||
|
new_rule->callback_func = callback;
|
||||||
|
/* Append to the list */
|
||||||
|
list = g_list_append(list, new_rule);
|
||||||
|
Index: libmirage-3.0.5/images/image-toc/parser.c
|
||||||
|
===================================================================
|
||||||
|
--- libmirage-3.0.5.orig/images/image-toc/parser.c 2016-10-19 20:45:47.238020045 +0200
|
||||||
|
+++ libmirage-3.0.5/images/image-toc/parser.c 2016-10-19 20:46:38.188531986 +0200
|
||||||
|
@@ -863,7 +863,7 @@
|
||||||
|
|
||||||
|
TOC_RegexRule *new_rule = g_new(TOC_RegexRule, 1);
|
||||||
|
new_rule->regex = g_regex_new(rule, G_REGEX_OPTIMIZE, 0, NULL);
|
||||||
|
- g_assert_nonnull(new_rule->regex);
|
||||||
|
+ g_assert(new_rule->regex != NULL);
|
||||||
|
new_rule->callback_func = callback;
|
||||||
|
/* Append to the list */
|
||||||
|
list = g_list_append(list, new_rule);
|
||||||
|
Index: libmirage-3.0.5/images/image-xcdroast/parser.c
|
||||||
|
===================================================================
|
||||||
|
--- libmirage-3.0.5.orig/images/image-xcdroast/parser.c 2016-10-19 20:45:47.238020045 +0200
|
||||||
|
+++ libmirage-3.0.5/images/image-xcdroast/parser.c 2016-10-19 20:46:38.188531986 +0200
|
||||||
|
@@ -496,7 +496,7 @@
|
||||||
|
|
||||||
|
XCDROAST_RegexRule *new_rule = g_new(XCDROAST_RegexRule, 1);
|
||||||
|
new_rule->regex = g_regex_new(rule, G_REGEX_OPTIMIZE, 0, NULL);
|
||||||
|
- g_assert_nonnull(new_rule->regex);
|
||||||
|
+ g_assert(new_rule->regex != NULL);
|
||||||
|
new_rule->callback_func = callback;
|
||||||
|
/* Append to the list */
|
||||||
|
list = g_list_append(list, new_rule);
|
71
libmirage-3.0.5-glib-2.28-workaround.patch
Normal file
71
libmirage-3.0.5-glib-2.28-workaround.patch
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
--- a/images/image-ccd/parser.c 2016-10-10 02:01:03.000000000 +0100
|
||||||
|
+++ b/images/image-ccd/parser.c 2017-03-20 02:40:11.000000000 +0100
|
||||||
|
@@ -1033,7 +1033,7 @@
|
||||||
|
gsize line_length;
|
||||||
|
|
||||||
|
/* Read line */
|
||||||
|
- line_string = g_data_input_stream_read_line_utf8(data_stream, &line_length, NULL, &local_error);
|
||||||
|
+ line_string = g_data_input_stream_read_line(data_stream, &line_length, NULL, &local_error);
|
||||||
|
|
||||||
|
/* Handle error */
|
||||||
|
if (!line_string) {
|
||||||
|
--- a/images/image-cue/parser.c 2016-10-10 02:01:03.000000000 +0100
|
||||||
|
+++ b/images/image-cue/parser.c 2017-03-20 02:40:56.000000000 +0100
|
||||||
|
@@ -839,7 +839,7 @@
|
||||||
|
gsize line_length;
|
||||||
|
|
||||||
|
/* Read line */
|
||||||
|
- line_string = g_data_input_stream_read_line_utf8(data_stream, &line_length, NULL, &local_error);
|
||||||
|
+ line_string = g_data_input_stream_read_line(data_stream, &line_length, NULL, &local_error);
|
||||||
|
|
||||||
|
/* Handle error */
|
||||||
|
if (!line_string) {
|
||||||
|
--- a/images/image-toc/parser.c 2016-10-10 02:01:03.000000000 +0100
|
||||||
|
+++ b/images/image-toc/parser.c 2017-03-20 02:42:21.000000000 +0100
|
||||||
|
@@ -1007,7 +1007,7 @@
|
||||||
|
GMatchInfo *match_info = NULL;
|
||||||
|
|
||||||
|
/* Read line */
|
||||||
|
- line_string = g_data_input_stream_read_line_utf8(data_stream, &line_length, NULL, &local_error);
|
||||||
|
+ line_string = g_data_input_stream_read_line(data_stream, &line_length, NULL, &local_error);
|
||||||
|
|
||||||
|
/* Handle error */
|
||||||
|
if (!line_string) {
|
||||||
|
@@ -1166,7 +1166,7 @@
|
||||||
|
GMatchInfo *match_info = NULL;
|
||||||
|
|
||||||
|
/* Read line */
|
||||||
|
- line_string = g_data_input_stream_read_line_utf8(data_stream, &line_length, NULL, &local_error);
|
||||||
|
+ line_string = g_data_input_stream_read_line(data_stream, &line_length, NULL, &local_error);
|
||||||
|
|
||||||
|
/* Handle error */
|
||||||
|
if (!line_string) {
|
||||||
|
--- a/images/image-xcdroast/parser.c 2016-10-10 02:01:03.000000000 +0100
|
||||||
|
+++ b/images/image-xcdroast/parser.c 2017-03-20 02:42:52.000000000 +0100
|
||||||
|
@@ -587,7 +587,7 @@
|
||||||
|
gsize line_length;
|
||||||
|
|
||||||
|
/* Read line */
|
||||||
|
- line_string = g_data_input_stream_read_line_utf8(data_stream, &line_length, NULL, &local_error);
|
||||||
|
+ line_string = g_data_input_stream_read_line(data_stream, &line_length, NULL, &local_error);
|
||||||
|
|
||||||
|
/* Handle error */
|
||||||
|
if (!line_string) {
|
||||||
|
@@ -670,7 +670,7 @@
|
||||||
|
gsize line_length;
|
||||||
|
|
||||||
|
/* Read line */
|
||||||
|
- line_string = g_data_input_stream_read_line_utf8(data_stream, &line_length, NULL, &local_error);
|
||||||
|
+ line_string = g_data_input_stream_read_line(data_stream, &line_length, NULL, &local_error);
|
||||||
|
|
||||||
|
/* Handle error */
|
||||||
|
if (!line_string) {
|
||||||
|
@@ -766,7 +766,7 @@
|
||||||
|
GMatchInfo *match_info = NULL;
|
||||||
|
|
||||||
|
/* Read line */
|
||||||
|
- line_string = g_data_input_stream_read_line_utf8(data_stream, &line_length, NULL, &local_error);
|
||||||
|
+ line_string = g_data_input_stream_read_line(data_stream, &line_length, NULL, &local_error);
|
||||||
|
|
||||||
|
/* Handle error */
|
||||||
|
if (!line_string) {
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Apr 06 08:39:43 UTC 2017 - zenitur@ya.ru
|
||||||
|
|
||||||
|
- Fix SLES 11 build. We're also need Glib 2.28 instead of 2.22.5.
|
||||||
|
Most desktop and workstation users are turn on Packman
|
||||||
|
repository, so they're have Glib 2.28 installed from there.
|
||||||
|
- Added 01_g_assert_nonnull.diff patch taken from Cdemu PPA.
|
||||||
|
- Add libmirage-3.0.5-glib-2.28-workaround.patch
|
||||||
|
- Add glib2-devel as a required for the -devel package. That fixes
|
||||||
|
some rpmbuild warning.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 6 18:08:02 UTC 2017 - jengelh@inai.de
|
Mon Feb 6 18:08:02 UTC 2017 - jengelh@inai.de
|
||||||
|
|
||||||
|
@ -28,6 +28,23 @@ Url: http://cdemu.sf.net/about/libmirage/
|
|||||||
|
|
||||||
#Git-Clone: git://git.code.sf.net/p/cdemu/code
|
#Git-Clone: git://git.code.sf.net/p/cdemu/code
|
||||||
Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2
|
Source: http://downloads.sf.net/cdemu/%name-%version.tar.bz2
|
||||||
|
# A patch taken from Cdemu PPA
|
||||||
|
Patch1: 01_g_assert_nonnull.diff
|
||||||
|
# SLES 11 is still supported
|
||||||
|
%if 0%{?sles_version} && 0%{?suse_version} == 1110
|
||||||
|
Patch2: libmirage-3.0.5-glib-2.28-workaround.patch
|
||||||
|
# Dependencies list in an old style
|
||||||
|
BuildRequires: cmake >= 2.8.5
|
||||||
|
BuildRequires: glib2-devel >= 2.28
|
||||||
|
BuildRequires: gtk-doc >= 1.4
|
||||||
|
BuildRequires: libbz2-devel >= 1.0.0
|
||||||
|
BuildRequires: libsamplerate-devel >= 0.1.0
|
||||||
|
BuildRequires: libsndfile-devel >= 1.0.0
|
||||||
|
BuildRequires: pkg-config >= 0.16
|
||||||
|
BuildRequires: shared-mime-info
|
||||||
|
BuildRequires: xz-devel >= 5.0.0
|
||||||
|
BuildRequires: zlib-devel >= 1.2.0
|
||||||
|
%else
|
||||||
BuildRequires: cmake >= 2.8.5
|
BuildRequires: cmake >= 2.8.5
|
||||||
BuildRequires: pkg-config >= 0.16
|
BuildRequires: pkg-config >= 0.16
|
||||||
BuildRequires: pkgconfig(bzip2) >= 1.0.0
|
BuildRequires: pkgconfig(bzip2) >= 1.0.0
|
||||||
@ -41,6 +58,8 @@ BuildRequires: pkgconfig(samplerate) >= 0.1.0
|
|||||||
BuildRequires: pkgconfig(shared-mime-info)
|
BuildRequires: pkgconfig(shared-mime-info)
|
||||||
BuildRequires: pkgconfig(sndfile) >= 1.0.0
|
BuildRequires: pkgconfig(sndfile) >= 1.0.0
|
||||||
BuildRequires: pkgconfig(zlib) >= 1.2.0
|
BuildRequires: pkgconfig(zlib) >= 1.2.0
|
||||||
|
%endif
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A CD-ROM image access library part of the cdemu suite.
|
A CD-ROM image access library part of the cdemu suite.
|
||||||
@ -80,6 +99,7 @@ This package provides the image format plugins for libmirage.
|
|||||||
Summary: Development files for libmirage, a CD-ROM image access library
|
Summary: Development files for libmirage, a CD-ROM image access library
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %lname = %version
|
Requires: %lname = %version
|
||||||
|
Requires: glib2-devel
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
A CD-ROM image access library part of the cdemu suite.
|
A CD-ROM image access library part of the cdemu suite.
|
||||||
@ -95,7 +115,9 @@ Summary: MIME type definitions and documentation for libmirage
|
|||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires(post): shared-mime-info
|
Requires(post): shared-mime-info
|
||||||
Requires(postun): shared-mime-info
|
Requires(postun): shared-mime-info
|
||||||
|
%if 0%{?suse_version} >= 1130
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%endif
|
||||||
|
|
||||||
%description data
|
%description data
|
||||||
libmirage provides uniform access to the data stored in different
|
libmirage provides uniform access to the data stored in different
|
||||||
@ -105,7 +127,7 @@ file.
|
|||||||
This package contains the MIME type definitions and documentation.
|
This package contains the MIME type definitions and documentation.
|
||||||
|
|
||||||
%package -n typelib-1_0-libmirage-%pname
|
%package -n typelib-1_0-libmirage-%pname
|
||||||
Summary: The libmirage CD-ROM image access library – introspection bindings
|
Summary: The libmirage CD-ROM image access library – introspection bindings
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
|
|
||||||
%description -n typelib-1_0-libmirage-%pname
|
%description -n typelib-1_0-libmirage-%pname
|
||||||
@ -117,6 +139,10 @@ This package provides the GObject Introspection bindings for libmirage.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch1 -p1
|
||||||
|
%if 0%{?sles_version} && 0%{?suse_version} == 1110
|
||||||
|
%patch2 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake -DCMAKE_MODULE_LINKER_FLAGS=""
|
%cmake -DCMAKE_MODULE_LINKER_FLAGS=""
|
||||||
@ -129,10 +155,18 @@ make %{?_smp_mflags}
|
|||||||
%postun -n %lname -p /sbin/ldconfig
|
%postun -n %lname -p /sbin/ldconfig
|
||||||
|
|
||||||
%post data
|
%post data
|
||||||
|
%if 0%{?sles_version} && 0%{?suse_version} == 1110
|
||||||
|
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
|
||||||
|
%else
|
||||||
%mime_database_post
|
%mime_database_post
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun data
|
%postun data
|
||||||
|
%if 0%{?sles_version} && 0%{?suse_version} == 1110
|
||||||
|
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
|
||||||
|
%else
|
||||||
%mime_database_postun
|
%mime_database_postun
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n %lname
|
%files -n %lname
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -152,10 +186,12 @@ make %{?_smp_mflags}
|
|||||||
%_includedir/libmirage-3.0/
|
%_includedir/libmirage-3.0/
|
||||||
%_libdir/libmirage.so
|
%_libdir/libmirage.so
|
||||||
%_libdir/pkgconfig/libmirage.pc
|
%_libdir/pkgconfig/libmirage.pc
|
||||||
|
%if 0%{?suse_version} > 1110
|
||||||
%_datadir/gir-1.0
|
%_datadir/gir-1.0
|
||||||
|
|
||||||
%files -n typelib-1_0-libmirage-%pname
|
%files -n typelib-1_0-libmirage-%pname
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%_libdir/girepository-1.0
|
%_libdir/girepository-1.0
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user