Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 397420 Details for
Bug 541084
=app-cdr/mirage2iso-0.4 fails to build with libmirage-3.0.3: mirage.h: No such file or directory
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to allow libmirage-3.0.0 support
0001-Support-both-libmirage-3.0.0-and-2.0.0-API.patch (text/plain), 4.19 KB, created by
Alexandre Rostovtsev (RETIRED)
on 2015-02-24 15:54:08 UTC
(
hide
)
Description:
patch to allow libmirage-3.0.0 support
Filename:
MIME Type:
Creator:
Alexandre Rostovtsev (RETIRED)
Created:
2015-02-24 15:54:08 UTC
Size:
4.19 KB
patch
obsolete
>From b8ccc405e3f70bebe5c0b21b266351a76545436d Mon Sep 17 00:00:00 2001 >From: Alexandre Rostovtsev <tetromino@gentoo.org> >Date: Tue, 24 Feb 2015 10:50:15 -0500 >Subject: [PATCH] Support both libmirage 3.0.0 and 2.0.0 API > >Call sector types "sector types" instead of "modes", following the >new 3.0.0 convention. > >Also, only use g_type_init() with ancient glib versions - it's >deprecated now. >--- > configure.ac | 1 + > mirage-wrapper.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++--------- > 2 files changed, 53 insertions(+), 9 deletions(-) > >diff --git a/configure.ac b/configure.ac >index 4882e97..01da76f 100644 >--- a/configure.ac >+++ b/configure.ac >@@ -8,6 +8,7 @@ AC_USE_SYSTEM_EXTENSIONS > PKG_CHECK_MODULES([GLIB], [glib-2.0]) > dnl vv - workaround for libmirage missing reqs - vv > PKG_CHECK_MODULES([LIBMIRAGE], [libmirage >= 2.0.0]) >+PKG_CHECK_EXISTS([libmirage >= 3.0.0], [AC_DEFINE(HAVE_LIBMIRAGE3, [1], [Define if you have libmirage >= 3])]) > > AC_SYS_LARGEFILE > AC_CHECK_FUNCS([posix_fallocate]) >diff --git a/mirage-wrapper.c b/mirage-wrapper.c >index 0eab54e..95d2050 100644 >--- a/mirage-wrapper.c >+++ b/mirage-wrapper.c >@@ -15,7 +15,11 @@ > #include <string.h> > #include <errno.h> > >-#include <mirage.h> >+#if HAVE_LIBMIRAGE3 >+# include <mirage/mirage.h> >+#else >+# include <mirage.h> >+#endif > #include "mirage-password.h" > #include "mirage-wrapper.h" > >@@ -39,7 +43,9 @@ gchar* miragewrap_password_callback(gpointer user_data) { > gboolean miragewrap_init(void) { > GError *err = NULL; > >+#if !GLIB_CHECK_VERSION(2, 36, 0) > g_type_init(); >+#endif > > #if !defined(MIRAGE_API12) || defined(MIRAGE_API20) > if (!((mirage = g_object_new(MIRAGE_TYPE_CONTEXT, NULL)))) >@@ -137,41 +143,78 @@ static MirageTrack *miragewrap_get_track_common(const gint track_num, gint *ssta > *len = mirage_track_layout_get_length(track); > > if (sectsize) { >- gint mode; >+ gint sector_type; > const gchar *unsupp_desc; > >- mode = mirage_track_get_mode(track); >+#if MIRAGE_VERSION_MAJOR >= 3 >+ sector_type = mirage_track_get_sector_type(track); >+#else >+ sector_type = mirage_track_get_mode(track); >+#endif > > unsupp_desc = NULL; >- switch (mode) { >- /* supported modes, we set *sectsize and leave unsupp_desc NULL */ >+ switch (sector_type) { >+ /* supported sector types, we set *sectsize and leave unsupp_desc NULL */ >+#if MIRAGE_VERSION_MAJOR >= 3 >+ case MIRAGE_SECTOR_MODE1: >+ case MIRAGE_SECTOR_MODE2_FORM1: >+#else > case MIRAGE_MODE_MODE1: > case MIRAGE_MODE_MODE2_FORM1: >+#endif > *sectsize = 2048; > break; >- /* unsupported modes, we leave *sectsize unmodified and set unsupp_desc */ >+ /* unsupported sector types, we leave *sectsize unmodified and set unsupp_desc */ >+#if MIRAGE_VERSION_MAJOR >= 3 >+ case MIRAGE_SECTOR_MODE0: >+#else > case MIRAGE_MODE_MODE0: >+#endif > unsupp_desc = "a Mode 0"; > break; >+#if MIRAGE_VERSION_MAJOR >= 3 >+ case MIRAGE_SECTOR_AUDIO: >+#else > case MIRAGE_MODE_AUDIO: >+#endif > unsupp_desc = "an audio"; > break; >+#if MIRAGE_VERSION_MAJOR >= 3 >+ case MIRAGE_SECTOR_MODE2: >+#else > case MIRAGE_MODE_MODE2: >+#endif > unsupp_desc = "a Mode 2"; > break; >+#if MIRAGE_VERSION_MAJOR >= 3 >+ case MIRAGE_SECTOR_MODE2_FORM2: >+#else > case MIRAGE_MODE_MODE2_FORM2: >+#endif > unsupp_desc = "a Mode 2 Form 2"; > break; >+#if MIRAGE_VERSION_MAJOR >= 3 >+ case MIRAGE_SECTOR_MODE2_MIXED: >+#else > case MIRAGE_MODE_MODE2_MIXED: >+#endif > unsupp_desc = "a mixed Mode 2"; > break; >- /* unknown mode, report it even if non-verbose and leave now */ >+#if MIRAGE_VERSION_MAJOR >= 3 >+ case MIRAGE_SECTOR_RAW: >+ unsupp_desc = "a raw"; >+ break; >+ case MIRAGE_SECTOR_RAW_SCRAMBLED: >+ unsupp_desc = "a scrambled raw"; >+ break; >+#endif >+ /* unknown sector type, report it even if non-verbose and leave now */ > default: >- g_printerr("Unknown track mode (%d) for track %d (newer libmirage?)\n", mode, track_num); >+ g_printerr("Unknown track sector type / mode (%d) for track %d (newer libmirage?)\n", sector_type, track_num); > return NULL; > } > >- if (unsupp_desc) { /* got unsupported mode */ >+ if (unsupp_desc) { /* got unsupported sector type */ > if (verbose) > g_printerr("Track %d is %s track (unsupported)\n", track_num, unsupp_desc); > return NULL; >-- >2.3.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 541084
:
397266
|
397268
| 397420