Patch to conform to current ISO C++ standard, resulting in a successful build.

Tue, 28 Aug 2012 19:00:30 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 19:00:30 +0200
changeset 627
aba05e03de0f
parent 626
03d66ab4c7ca
child 628
10fbfbc9b548

Patch to conform to current ISO C++ standard, resulting in a successful build.
Additionally modernize packaging in accordance with current OpenPKG boilerplate.

id3lib/id3lib.patch file | annotate | diff | comparison | revisions
id3lib/id3lib.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/id3lib/id3lib.patch	Tue Aug 28 19:00:30 2012 +0200
     1.3 @@ -0,0 +1,22 @@
     1.4 +Index: include/id3/id3lib_strings.h
     1.5 +--- include/id3/id3lib_strings.h.orig	2012-08-29 11:12:19.139220051 +0200
     1.6 ++++ include/id3/id3lib_strings.h	2012-08-29 11:10:08.246368381 +0200
     1.7 +@@ -30,6 +30,7 @@
     1.8 + #define _ID3LIB_STRINGS_H_
     1.9 + 
    1.10 + #include <string>
    1.11 ++#include <cstring>
    1.12 + 
    1.13 + #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
    1.14 + namespace std
    1.15 +Index: include/id3/writers.h
    1.16 +--- include/id3/writers.h.orig	2012-08-29 11:11:54.826330076 +0200
    1.17 ++++ include/id3/writers.h	2012-08-29 11:12:07.554666839 +0200
    1.18 +@@ -31,6 +31,7 @@
    1.19 + #include "id3/writer.h"
    1.20 + #include "id3/id3lib_streams.h"
    1.21 + //#include <string.h>
    1.22 ++#include <cstring>
    1.23 + 
    1.24 + class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer
    1.25 + {
     2.1 --- a/id3lib/id3lib.spec	Tue Aug 28 19:00:20 2012 +0200
     2.2 +++ b/id3lib/id3lib.spec	Tue Aug 28 19:00:30 2012 +0200
     2.3 @@ -1,6 +1,6 @@
     2.4  ##
     2.5  ##  id3lib.spec -- OpenPKG RPM Specification
     2.6 -##  Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com>
     2.7 +##  Copyright (c) 2012 Michael Schloh von Bennewitz <michael@schloh.com>
     2.8  ##
     2.9  ##  Permission to use, copy, modify, and distribute this software for
    2.10  ##  any purpose with or without fee is hereby granted, provided that
    2.11 @@ -33,18 +33,15 @@
    2.12  Group:        Audio
    2.13  License:      LGPL
    2.14  Version:      3.8.3
    2.15 -Release:      20090106
    2.16 +Release:      20120800
    2.17  
    2.18  #   list of sources
    2.19  Source0:      http://switch.dl.sourceforge.net/id3lib/id3lib-%{version}.tar.gz
    2.20 +Patch0:       id3lib.patch
    2.21  
    2.22  #   build information
    2.23 -Prefix:       %{l_prefix}
    2.24 -BuildRoot:    %{l_buildroot}
    2.25 -BuildPreReq:  OpenPKG, openpkg >= 20040130, make, gcc, gcc::with_cxx = yes
    2.26 -PreReq:       OpenPKG, openpkg >= 20040130
    2.27 -AutoReq:      no
    2.28 -AutoReqProv:  no
    2.29 +BuildPreReq:  OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes
    2.30 +PreReq:       OpenPKG, openpkg >= 20100101
    2.31  
    2.32  %description
    2.33      id3lib is an Opensource, cross platform software development library
    2.34 @@ -64,6 +61,10 @@
    2.35  %prep
    2.36      #   unpack sources
    2.37      %setup -q
    2.38 +    %patch -p0
    2.39 +    %{l_shtool} subst \
    2.40 +        -e 's;iomanip\.h;iomanip;' \
    2.41 +        configure
    2.42  
    2.43  %build
    2.44      #   prepare configuration
    2.45 @@ -81,9 +82,6 @@
    2.46      %{l_make} %{l_mflags -O}
    2.47  
    2.48  %install
    2.49 -    #   remove previously existing installations
    2.50 -    rm -rf $RPM_BUILD_ROOT
    2.51 -
    2.52      #   run the native installation logic
    2.53      %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
    2.54  
    2.55 @@ -96,5 +94,4 @@
    2.56  %files -f files
    2.57  
    2.58  %clean
    2.59 -    rm -rf $RPM_BUILD_ROOT
    2.60  

mercurial