updated to 0.94

- dropped patches
This commit is contained in:
Adrian Reber 2016-11-14 14:33:18 +01:00
parent b4d3b60448
commit eb48a3f00f
5 changed files with 14 additions and 374 deletions

2
.gitignore vendored
View File

@ -8,3 +8,5 @@ libcdio-0.82.tar.gz.sig
/libcdio-0.92.tar.gz.sig
/libcdio-0.93.tar.gz
/libcdio-0.93.tar.gz.sig
/libcdio-0.94.tar.gz
/libcdio-0.94.tar.gz.sig

View File

@ -1,286 +0,0 @@
From: R. Bernstein <rocky@gnu.org>
Date: Fri, 12 Aug 2016 23:31:55 +0000 (-0400)
Subject: g++ greater than 4.0 handles "pack"
X-Git-Url: http://git.savannah.gnu.org/gitweb/?p=libcdio.git;a=commitdiff_plain;h=47f3fbf3eb0ca1ae1294744e8824d023f32ec756
g++ greater than 4.0 handles "pack"
Fixes bug #48759 where example/C++/isolist.cpp built with g++
fails on gcc 5.0 and greater
---
diff --git a/include/cdio/types.h b/include/cdio/types.h
index d00c359..3274b61 100644
--- a/include/cdio/types.h
+++ b/include/cdio/types.h
@@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file types.h
+/** \file types.h
* \brief Common type definitions used pervasively in libcdio.
*/
@@ -31,9 +31,9 @@ extern "C" {
/* If <sys/types.h> is not available on your platform please
contact the libcdio mailing list so that we can fix it! */
-#if !defined(ARE_THERE_STILL_ENVS_WITHOUT_SYS_TYPES)
+#if !defined(ARE_THERE_STILL_ENVS_WITHOUT_SYS_TYPES)
#include <sys/types.h>
-#endif
+#endif
#if defined(AMIGA)
typedef u_int8_t uint8_t;
@@ -68,11 +68,11 @@ typedef uint8_t ubyte;
/* if it's still not defined, take a good guess... should work for
most 32bit and 64bit archs */
-
+
#ifndef UINT16_C
# define UINT16_C(c) c ## U
#endif
-
+
#ifndef UINT32_C
# if defined (SIZEOF_INT) && SIZEOF_INT == 4
# define UINT32_C(c) c ## U
@@ -82,7 +82,7 @@ typedef uint8_t ubyte;
# define UINT32_C(c) c ## U
# endif
#endif
-
+
#ifndef UINT64_C
# if defined (SIZEOF_LONG) && SIZEOF_LONG == 8
# define UINT64_C(c) c ## UL
@@ -92,17 +92,17 @@ typedef uint8_t ubyte;
# define UINT64_C(c) c ## ULL
# endif
#endif
-
+
#ifndef INT64_C
# if defined (SIZEOF_LONG) && SIZEOF_LONG == 8
# define INT64_C(c) c ## L
# elif defined (SIZEOF_INT) && SIZEOF_INT == 8
-# define INT64_C(c) c
+# define INT64_C(c) c
# else
# define INT64_C(c) c ## LL
# endif
#endif
-
+
#ifndef __cplusplus
/* All the stdbool.h seem to define those */
@@ -123,9 +123,9 @@ typedef uint8_t ubyte;
#endif /* __bool_true_false_are_defined */
#endif /*C++*/
-
+
/* some GCC optimizations -- gcc 2.5+ */
-
+
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
#define GNUC_PRINTF( format_idx, arg_idx ) \
__attribute__((format (printf, format_idx, arg_idx)))
@@ -150,13 +150,14 @@ typedef uint8_t ubyte;
#define GNUC_UNUSED
#define GNUC_PACKED
#endif /* !__GNUC__ */
-
+
#if defined(__MINGW32__)
# define PRAGMA_BEGIN_PACKED _Pragma("pack(push)") \
_Pragma("pack(1)")
# define PRAGMA_END_PACKED _Pragma("pack(pop)")
-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
- /* should work with most EDG-frontend based compilers */
+#elif __GNUC__ > 4 || (__STDC_VERSION__ >= 199901)
+ /* should work with GCC > 4.0 clang and most EDG-frontend based C
+ and C++ compilers */
# define PRAGMA_BEGIN_PACKED _Pragma("pack(1)")
# define PRAGMA_END_PACKED _Pragma("pack()")
#elif defined(_MSC_VER)
@@ -167,18 +168,18 @@ typedef uint8_t ubyte;
# define PRAGMA_BEGIN_PACKED
# define PRAGMA_END_PACKED
#endif
-
+
/*
* user directed static branch prediction gcc 2.96+
*/
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
# define GNUC_LIKELY(x) __builtin_expect((x),true)
# define GNUC_UNLIKELY(x) __builtin_expect((x),false)
-#else
-# define GNUC_LIKELY(x) (x)
+#else
+# define GNUC_LIKELY(x) (x)
# define GNUC_UNLIKELY(x) (x)
#endif
-
+
#ifndef NULL
# define NULL ((void*) 0)
#endif
@@ -199,9 +200,9 @@ typedef uint8_t ubyte;
/** our own offsetof()-like macro */
#define __cd_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-
+
/*!
- \brief MSF (minute/second/frame) structure
+ \brief MSF (minute/second/frame) structure
One CD-ROMs addressing scheme especially used in audio formats
(Red Book) is an address by minute, sector and frame which
@@ -211,7 +212,7 @@ typedef uint8_t ubyte;
cdio_to_bcd8() or cdio_from_bcd8() to convert an integer into or
out of this format. The format specifier %x (not %d) can be used
if you need to format or print values in this structure.
-
+
@see lba_t
*/
PRAGMA_BEGIN_PACKED
@@ -219,13 +220,13 @@ typedef uint8_t ubyte;
uint8_t m, s, f; /* BCD encoded! */
} GNUC_PACKED;
PRAGMA_END_PACKED
-
+
typedef struct msf_s msf_t;
#define msf_t_SIZEOF 3
/*!
- \brief UTF-8 char definition
+ \brief UTF-8 char definition
Type to denote UTF-8 strings.
*/
@@ -237,7 +238,7 @@ typedef uint8_t ubyte;
yep = 1,
dunno = 2
} bool_3way_t;
-
+
/* type used for bit-fields in structs (1 <= bits <= 8) */
#if defined(__GNUC__)
/* this is strict ISO C99 which allows only 'unsigned int', 'signed
@@ -249,23 +250,23 @@ typedef uint8_t ubyte;
be pragma'ed on non-gcc compilers */
typedef uint8_t bitfield_t;
#endif
-
- /*! The type of a Logical Block Address. We allow for an lba to be
+
+ /*! The type of a Logical Block Address. We allow for an lba to be
negative to be consistent with an lba, although I'm not sure this
this is possible.
-
+
*/
typedef int32_t lba_t;
-
+
/*! The type of a Logical Sector Number. Note that an lba can be negative
and the MMC3 specs allow for a conversion of a negative lba.
@see msf_t
*/
typedef int32_t lsn_t;
-
+
/* Address in either MSF or logical format */
- union cdio_cdrom_addr
+ union cdio_cdrom_addr
{
msf_t msf;
lba_t lba;
@@ -273,46 +274,46 @@ typedef uint8_t ubyte;
/*! The type of a track number 0..99. */
typedef uint8_t track_t;
-
+
/*! The type of a session number 0..99. */
typedef uint8_t session_t;
-
- /*!
+
+ /*!
Constant for invalid session number
*/
#define CDIO_INVALID_SESSION 0xFF
-
- /*!
+
+ /*!
Constant for invalid LBA. It is 151 less than the most negative
LBA -45150. This provide slack for the 150-frame offset in
LBA to LSN 150 conversions
*/
#define CDIO_INVALID_LBA -45301
-
- /*!
+
+ /*!
Constant for invalid LSN
*/
#define CDIO_INVALID_LSN CDIO_INVALID_LBA
- /*!
+ /*!
Number of ASCII bytes in a media catalog number (MCN).
We include an extra 0 byte so these can be used as C strings.
*/
#define CDIO_MCN_SIZE 13
- /*!
+ /*!
Type to hold ASCII bytes in a media catalog number (MCN).
We include an extra 0 byte so these can be used as C strings.
*/
typedef char cdio_mcn_t[CDIO_MCN_SIZE+1];
-
- /*!
+
+ /*!
Number of ASCII bytes in International Standard Recording Codes (ISRC)
*/
#define CDIO_ISRC_SIZE 12
- /*!
+ /*!
Type to hold ASCII bytes in a ISRC.
We include an extra 0 byte so these can be used as C strings.
*/
@@ -320,7 +321,7 @@ typedef uint8_t ubyte;
typedef int cdio_fs_anal_t;
- /*!
+ /*!
track flags
Q Sub-channel Control Field (4.2.3.3)
*/
@@ -341,7 +342,7 @@ typedef uint8_t ubyte;
#endif /* CDIO_TYPES_H_ */
-/*
+/*
* Local variables:
* c-file-style: "gnu"
* tab-width: 8

View File

@ -1,70 +0,0 @@
From 22ba393bd54b72da01ed2cd9f6705c1a7ca59d3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Sun, 11 Jan 2015 18:16:28 -0500
Subject: [PATCH 1/2] fix lba calculation for BE
---
lib/udf/udf_fs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/udf/udf_fs.c b/lib/udf/udf_fs.c
index a3b10d0..beaeb79 100644
--- a/lib/udf/udf_fs.c
+++ b/lib/udf/udf_fs.c
@@ -167,7 +167,7 @@ udf_get_lba(const udf_file_entry_t *p_udf_fe,
{
/* The allocation descriptor field is filled with short_ad's. */
udf_short_ad_t *p_ad = (udf_short_ad_t *)
- (p_udf_fe->u.ext_attr + p_udf_fe->i_extended_attr);
+ (p_udf_fe->u.ext_attr + uint32_from_le(p_udf_fe->i_extended_attr));
*start = uint32_from_le(p_ad->pos);
*end = *start +
@@ -179,7 +179,7 @@ udf_get_lba(const udf_file_entry_t *p_udf_fe,
{
/* The allocation descriptor field is filled with long_ad's */
udf_long_ad_t *p_ad = (udf_long_ad_t *)
- (p_udf_fe->u.ext_attr + p_udf_fe->i_extended_attr);
+ (p_udf_fe->u.ext_attr + uint32_from_le(p_udf_fe->i_extended_attr));
*start = uint32_from_le(p_ad->loc.lba); /* ignore partition number */
*end = *start +
@@ -190,7 +190,7 @@ udf_get_lba(const udf_file_entry_t *p_udf_fe,
case ICBTAG_FLAG_AD_EXTENDED:
{
udf_ext_ad_t *p_ad = (udf_ext_ad_t *)
- (p_udf_fe->u.ext_attr + p_udf_fe->i_extended_attr);
+ (p_udf_fe->u.ext_attr + uint32_from_le(p_udf_fe->i_extended_attr));
*start = uint32_from_le(p_ad->ext_loc.lba); /* ignore partition number */
*end = *start +
--
2.1.0
From b4e3a76af159b5f0d5f006f6acd6df10d4ffaefa Mon Sep 17 00:00:00 2001
From: Michal Toman <mtoman@redhat.com>
Date: Tue, 13 Jan 2015 05:40:14 -0500
Subject: [PATCH 2/2] udf_readdir: fix lba on BE
Signed-off-by: Michal Toman <mtoman@redhat.com>
---
lib/udf/udf_fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/udf/udf_fs.c b/lib/udf/udf_fs.c
index beaeb79..a0a3903 100644
--- a/lib/udf/udf_fs.c
+++ b/lib/udf/udf_fs.c
@@ -739,7 +739,7 @@ udf_readdir(udf_dirent_t *p_udf_dirent)
const unsigned int i_len = p_udf_dirent->fid->i_file_id;
if (DRIVER_OP_SUCCESS != udf_read_sectors(p_udf, &p_udf_dirent->fe, p_udf->i_part_start
- + p_udf_dirent->fid->icb.loc.lba, 1)) {
+ + uint32_from_le(p_udf_dirent->fid->icb.loc.lba), 1)) {
udf_dirent_free(p_udf_dirent);
return NULL;
}
--
2.1.0

View File

@ -1,18 +1,14 @@
Name: libcdio
Version: 0.93
Release: 8%{?dist}
Version: 0.94
Release: 1%{?dist}
Summary: CD-ROM input and control library
Group: System Environment/Libraries
License: GPLv3+
URL: http://www.gnu.org/software/libcdio/
Source0: http://ftp.gnu.org/gnu/libcdio/libcdio-0.93.tar.gz
Source1: http://ftp.gnu.org/gnu/libcdio/libcdio-0.93.tar.gz.sig
Source0: http://ftp.gnu.org/gnu/libcdio/libcdio-%{version}.tar.gz
Source1: http://ftp.gnu.org/gnu/libcdio/libcdio-%{version}.tar.gz.sig
Source2: libcdio-no_date_footer.hml
Source3: cdio_config.h
# https://savannah.gnu.org/bugs/index.php?43995
Patch0: libcdio-0.93-udf-bigendian.patch
Patch1: http://git.savannah.gnu.org/gitweb/?p=libcdio.git;a=commitdiff_plain;h=47f3fbf3eb0ca1ae1294744e8824d023f32ec756
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig doxygen
BuildRequires: ncurses-devel
BuildRequires: help2man
@ -44,8 +40,6 @@ This package contains header files and libraries for %{name}.
%prep
%setup -q
%patch0 -p1 -b .udf-bigendian
%patch1 -p1
iconv -f ISO88591 -t utf-8 -o THANKS.utf8 THANKS && mv THANKS.utf8 THANKS
@ -68,7 +62,6 @@ cp %{SOURCE2} .
./run_doxygen
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# multilib header hack; taken from postgresql.spec
@ -112,10 +105,6 @@ chrpath --delete $RPM_BUILD_ROOT%{_libdir}/*.so.*
make check
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
@ -131,7 +120,8 @@ fi
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README README.libcdio THANKS TODO
%license COPYING
%doc AUTHORS NEWS README README.libcdio THANKS TODO
%{_bindir}/*
%{_libdir}/*.so.*
%{_infodir}/*
@ -148,6 +138,10 @@ fi
%changelog
* Mon Nov 14 2016 Adrian Reber <adrian@lisas.de> - 0.94-1
- updated to 0.94
- dropped patches
* Tue Aug 30 2016 Adrian Reber <adrian@lisas.de> - 0.93-8
- Fixes #1366718 (Bug in libcdio preventing it from use in c++ applications)

View File

@ -1,2 +1,2 @@
d154476feaac5a7b5f180e83eaf3d689 libcdio-0.93.tar.gz
3ee355a0662f0198fe1389dd4a6b704e libcdio-0.93.tar.gz.sig
d8734266a20fbc2605a97b701b838ab6 libcdio-0.94.tar.gz
d3da9f29ce092323b9b5be90ec3d23fa libcdio-0.94.tar.gz.sig