Spec fixes

This commit is contained in:
Sandro Mani 2015-06-25 23:10:48 +02:00
parent afa5824d68
commit 9f066f19b5
4 changed files with 25 additions and 15 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/openjpeg-2.0.0-svn20140403.tar.gz
/openjpeg-2.0.0.tar.gz
/openjpeg-2.1.0.tar.gz
/version.2.1.tar.gz

View File

@ -1,4 +1,5 @@
%global upname openjpeg
%global upver 2.1
# Conformance tests disabled by default since it requires 1 GB of test data
#global runcheck 1
@ -18,7 +19,7 @@ URL: https://github.com/uclouvain/openjpeg
%if 0%{?master}
Source0: https://github.com/uclouvain/openjpeg/archive/master.tar.gz
%else
Source0: https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz
Source0: https://github.com/uclouvain/openjpeg/archive/version.%{upver}.tar.gz
%endif
%if 0%{?runcheck}
# svn checkout http://openjpeg.googlecode.com/svn/data
@ -206,7 +207,7 @@ OpenJPEG2 JP3D module command line tools
%if 0%{?master}
%setup -q -n %{upname}-master %{?runcheck:-a 1}
%else
%setup -q -n %{upname}-%{version} %{?runcheck:-a 1}
%setup -q -n %{upname}-version.%{upver} %{?runcheck:-a 1}
%endif
%patch0 -p1
%patch1 -p1
@ -268,7 +269,7 @@ make test -C %{_target_platform}
%files
%license LICENSE
%doc AUTHORS NEWS README.md THANKS
%doc AUTHORS NEWS README THANKS
%{_libdir}/libopenjp2.so.*
%{_mandir}/man3/libopenjp2.3*

View File

@ -1,21 +1,26 @@
diff -rupN openjpeg-master/src/lib/openjp2/cio.c openjpeg-master-new/src/lib/openjp2/cio.c
--- openjpeg-master/src/lib/openjp2/cio.c 2015-06-24 17:11:09.000000000 +0200
+++ openjpeg-master-new/src/lib/openjp2/cio.c 2015-06-25 22:28:19.840764480 +0200
@@ -46,11 +46,11 @@
From e1992c3e5ddeeea784e931ebd74414e47ab6c167 Mon Sep 17 00:00:00 2001
From: Sandro Mani <manisandro@gmail.com>
Date: Thu, 25 Jun 2015 22:42:56 +0200
Subject: [PATCH] Fix opj_write_bytes_BE
---
src/lib/openjp2/cio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/openjp2/cio.c b/src/lib/openjp2/cio.c
index c455bf7..c6f778c 100644
--- a/src/lib/openjp2/cio.c
+++ b/src/lib/openjp2/cio.c
@@ -46,7 +46,7 @@
void opj_write_bytes_BE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_nb_bytes)
{
- const OPJ_BYTE * l_data_ptr = ((const OPJ_BYTE *) &p_value) + p_nb_bytes;
+ const OPJ_BYTE * l_data_ptr = ((const OPJ_BYTE *) &p_value);
+ const OPJ_BYTE * l_data_ptr = ((const OPJ_BYTE *) &p_value)+sizeof(OPJ_UINT32)-p_nb_bytes;
assert(p_nb_bytes > 0 && p_nb_bytes <= sizeof(OPJ_UINT32));
- memcpy(p_buffer,l_data_ptr,p_nb_bytes);
+ memcpy(p_buffer,l_data_ptr+sizeof(OPJ_UINT32)-p_nb_bytes,p_nb_bytes);
}
void opj_write_bytes_LE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_nb_bytes)
@@ -72,7 +72,7 @@ void opj_read_bytes_BE(const OPJ_BYTE *
@@ -72,7 +72,7 @@ void opj_read_bytes_BE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT
assert(p_nb_bytes > 0 && p_nb_bytes <= sizeof(OPJ_UINT32));
*p_value = 0;
@ -24,3 +29,6 @@ diff -rupN openjpeg-master/src/lib/openjp2/cio.c openjpeg-master-new/src/lib/ope
}
void opj_read_bytes_LE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT32 p_nb_bytes)
--
2.4.4

View File

@ -1 +1 @@
f6419fcc233df84f9a81eb36633c6db6 openjpeg-2.1.0.tar.gz
3e1c451c087f8462955426da38aa3b3d version.2.1.tar.gz