Signed-off-by: Juergen Beisert <[email protected]>
---
 patches/id3lib-3.8.3/autogen.sh                  |    1 +
 patches/id3lib-3.8.3/fix_configure_for_gcc4.diff |  314 ++++++++++++++++++++++
 patches/id3lib-3.8.3/series                      |    1 +
 rules/libid3lib.in                               |    8 +
 rules/libid3lib.make                             |   63 +++++
 5 files changed, 387 insertions(+)
 create mode 120000 patches/id3lib-3.8.3/autogen.sh
 create mode 100644 patches/id3lib-3.8.3/fix_configure_for_gcc4.diff
 create mode 100644 patches/id3lib-3.8.3/series
 create mode 100644 rules/libid3lib.in
 create mode 100644 rules/libid3lib.make

diff --git a/patches/id3lib-3.8.3/autogen.sh b/patches/id3lib-3.8.3/autogen.sh
new file mode 120000
index 0000000..9f8a4cb
--- /dev/null
+++ b/patches/id3lib-3.8.3/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/patches/id3lib-3.8.3/fix_configure_for_gcc4.diff 
b/patches/id3lib-3.8.3/fix_configure_for_gcc4.diff
new file mode 100644
index 0000000..a911496
--- /dev/null
+++ b/patches/id3lib-3.8.3/fix_configure_for_gcc4.diff
@@ -0,0 +1,314 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2008-11-21
+Initial Package Version: 3.8.3
+Upstream Status: unknown
+Origin: fedora
+Description: Allows it to compile with gcc-4.3.
+
+---
+ Makefile.am                  |    2 +
+ configure.in                 |   72 
+++++++++++++++++++++++--------------------
+ examples/demo_convert.cpp    |    2 -
+ examples/demo_copy.cpp       |    2 -
+ examples/demo_info.cpp       |    2 -
+ examples/demo_tag.cpp        |    2 -
+ include/id3/id3lib_strings.h |    1 
+ include/id3/writers.h        |    2 -
+ src/Makefile.am              |    2 +
+ 9 files changed, 50 insertions(+), 37 deletions(-)
+
+Index: id3lib-3.8.3/include/id3/id3lib_strings.h
+===================================================================
+--- id3lib-3.8.3.orig/include/id3/id3lib_strings.h
++++ id3lib-3.8.3/include/id3/id3lib_strings.h
+@@ -29,6 +29,7 @@
+ #ifndef _ID3LIB_STRINGS_H_
+ #define _ID3LIB_STRINGS_H_
+ 
++#include <cstring>
+ #include <string>
+ 
+ #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 
1000))
+Index: id3lib-3.8.3/configure.in
+===================================================================
+--- id3lib-3.8.3.orig/configure.in
++++ id3lib-3.8.3/configure.in
+@@ -12,17 +12,21 @@
+ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ 
+ # require autoconf 2.13
+-AC_PREREQ(2.13)
++AC_PREREQ([2.68])
+ 
+ # init autoconf (and check for presence fo reconf)
+-AC_INIT(reconf)
++AC_INIT([id3lib], [3.8.3], [])
++AC_CONFIG_SRCDIR([config.h.in])
++AC_CONFIG_HEADERS([config.h])
++AC_CONFIG_SRCDIR([reconf])
++AC_CONFIG_MACRO_DIR([m4])
+ 
+ ID3LIB_NAME=id3lib
+ 
+ dnl The following has been adapted from glib (http://www.gtk.org)
+ dnl
+ dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
+-dnl are available for $ac_help expansion (don't we all *love* autoconf?)
++dnl are available for $ac_help expansion (dont we all *love* autoconf?)
+ #AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
+ ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+                             [AC_DIVERT_PUSH(NOTICE)])
+@@ -83,14 +87,12 @@ ID3LIB_FULLNAME=$ID3LIB_NAME-$ID3LIB_VER
+ 
+ AC_SUBST(ID3LIB_FULLNAME)
+ 
+-AM_CONFIG_HEADER(config.h)
+-
+ AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
+ 
+-AC_ISC_POSIX
++AC_SEARCH_LIBS([strerror],[cposix])
+ 
+ dnl Initialize libtool
+-AM_PROG_LIBTOOL
++LT_INIT
+ 
+ dnl Initialize maintainer mode
+ AM_MAINTAINER_MODE
+@@ -123,15 +125,22 @@ dnl for executable extensions
+ AC_EXEEXT
+ 
+ dnl Checks for libraries.
+-AC_CHECK_LIB(z,uncompress,AC_DEFINE_UNQUOTED(HAVE_ZLIB))#,,
+-#  AC_MSG_ERROR([id3lib requires zlib to process compressed frames]))
+ 
+-AM_CONDITIONAL(ID3_NEEDZLIB, test x$ac_cv_lib_z_uncompress = xno)
++PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2],
++      [
++              AC_DEFINE(HAVE_ZLIB)
++              AM_CONDITIONAL(ID3_NEEDZLIB, false)
++      ],
++      [
++              AM_CONDITIONAL(ID3_NEEDZLIB, true)
++              CONDITIONAL_SUBDIRS="$CONDITIONAL_SUBDIRS zlib"
++      ])
++
+ AM_CONDITIONAL(ID3_NEEDDEBUG, test x$enable_debug = xyes)
+ 
+ dnl Checks for header files.
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS(zlib.h wchar.h sys/param.h unistd.h )
++AC_CHECK_HEADERS(wchar.h sys/param.h unistd.h )
+ 
+ dnl check wheter iconv is the part of libc.
+ AC_CHECK_HEADERS( iconv.h, has_iconv=1,  has_iconv=0)
+@@ -161,18 +170,17 @@ if test $has_iconv = 1; then
+   fi
+   #we have iconv at this moment, better check which call to use
+   AC_MSG_CHECKING(whether iconv takes const char ** or char **)
+-  AC_TRY_COMPILE([#include <iconv.h>],[
++  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <iconv.h>]], [[
+               {
+               size_t iconv (iconv_t a, const char ** b, size_t *c, char **d, 
size_t *e);
+-              }],
+-              iconv_oldstyle=1, iconv_oldstyle=0)
++              }]])],[iconv_oldstyle=1],[iconv_oldstyle=0])
+   if test $iconv_oldstyle = 1; then
+     AC_MSG_RESULT(const char **)
+-    AC_DEFINE(ID3LIB_ICONV_OLDSTYLE)
++    AC_DEFINE([ID3LIB_ICONV_OLDSTYLE], [], [old style])
+     #we'll check out the need of
+     #typecast in the call of iconv_open
+     AC_MSG_CHECKING(whether to typecast in iconv)
+-    AC_TRY_COMPILE([#include <iconv.h>],[
++    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <iconv.h>]], [[
+                    {
+                       const char *src = "nothing";
+                       char *outbuf;
+@@ -180,11 +188,10 @@ if test $has_iconv = 1; then
+                       size_t outsize = 0;
+                       iconv_t cd;
+                       iconv(cd, &src, &insize, &outbuf, &outsize);
+-                   }],
+-                   iconv_cast=0, iconv_cast=1)
++                   }]])],[iconv_cast=0],[iconv_cast=1])
+     if test $iconv_cast = 1; then
+       AC_MSG_RESULT(yes)
+-      AC_DEFINE(ID3LIB_ICONV_CAST_OK)
++      AC_DEFINE(ID3LIB_ICONV_CAST_OK, [], [cast okay])
+     else
+       AC_MSG_RESULT(no)
+     fi
+@@ -194,7 +201,7 @@ if test $has_iconv = 1; then
+     #we'll check out the need of
+     #typecast in the call of iconv_open
+     AC_MSG_CHECKING(whether to typecast in iconv)
+-    AC_TRY_COMPILE([#include <iconv.h>],[
++    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <iconv.h>]], [[
+                    {
+                       char *src = "nothing";
+                       char *outbuf;
+@@ -202,11 +209,10 @@ if test $has_iconv = 1; then
+                       size_t outsize = 0;
+                       iconv_t cd;
+                       iconv(cd, &src, &insize, &outbuf, &outsize);
+-                   }],
+-                   iconv_cast=0, iconv_cast=1)
++                   }]])],[iconv_cast=0],[iconv_cast=1])
+     if test $iconv_cast = 1; then
+       AC_MSG_RESULT(yes)
+-      AC_DEFINE(ID3LIB_ICONV_CAST_OK)
++      AC_DEFINE(ID3LIB_ICONV_CAST_OK, [], [cast okay])
+     else
+       AC_MSG_RESULT(no)
+     fi
+@@ -218,8 +224,14 @@ if test "x$ICONV_LIB" != "x"; then
+ fi
+ 
+ dnl Check for c++ features
++AC_DIAGNOSE([obsolete],[Instead of using `AC_LANG', 
`AC_DIAGNOSE([obsolete],[Instead of using `AC_LANG', `AC_LANG_SAVE', and 
`AC_LANG_RESTORE',
++you should use `AC_LANG_PUSH' and `AC_LANG_POP'.])dnl
++AC_LANG_SAVE', and `AC_LANG_POP([])',
++you should use `AC_LANG_PUSH' and `AC_LANG_POP'.])dnl
++AC_DIAGNOSE([obsolete],[Instead of using `AC_LANG', `AC_LANG_SAVE', and 
`AC_LANG_RESTORE',
++you should use `AC_LANG_PUSH' and `AC_LANG_POP'.])dnl
+ AC_LANG_SAVE
+-AC_LANG_CPLUSPLUS
++AC_LANG([C++])
+ AC_CHECK_HEADERS(libcw/sys.h)
+ AC_CHECK_HEADERS(cctype climits cstdio cstdlib bitset cstring)
+ AC_CHECK_HEADERS(fstream iostream iomanip vector \
+@@ -227,7 +239,6 @@ AC_CHECK_HEADERS(fstream iostream iomani
+ )
+ AC_CHECK_HEADERS(               \
+   string                        \
+-  iomanip.h                     \
+   ,,AC_MSG_ERROR([Missing a vital header file for id3lib])
+ )
+ 
+@@ -237,7 +248,7 @@ ID3_CXX_PORTABILITY
+ 
+ ID3_CXX_WARNINGS
+ 
+-AC_LANG_RESTORE
++AC_LANG_POP([])
+ 
+ ID3_DEBUG
+ ID3_UNICODE
+@@ -296,15 +307,11 @@ AC_DEFINE_UNQUOTED(_ID3LIB_INTERFACE_AGE
+ AC_DEFINE_UNQUOTED(_ID3LIB_BINARY_AGE,            $ID3LIB_BINARY_AGE)
+ AC_DEFINE_UNQUOTED(_ID3_COMPILED_WITH_DEBUGGING, "${enable_debug}")
+ 
+-CONDITIONAL_SUBDIRS=
+-if test "x$ac_cv_lib_z_uncompress" = "xno"; then
+-  CONDITIONAL_SUBDIRS="$CONDITIONAL_SUBDIRS zlib"
+-fi
+ AC_CONFIG_SUBDIRS(zlib)
+ 
+ CFLAGS="$CFLAGS -Wall"
+ 
+-AC_OUTPUT(                      \
++AC_CONFIG_FILES([\
+   Makefile                      \
+   doc/Makefile                  \
+   m4/Makefile                   \
+@@ -316,4 +323,5 @@ AC_OUTPUT(                      \
+   examples/Makefile             \
+   prj/Makefile                        \
+   libprj/Makefile
+-)
++])
++AC_OUTPUT
+Index: id3lib-3.8.3/include/id3/writers.h
+===================================================================
+--- id3lib-3.8.3.orig/include/id3/writers.h
++++ id3lib-3.8.3/include/id3/writers.h
+@@ -28,9 +28,9 @@
+ #ifndef _ID3LIB_WRITERS_H_
+ #define _ID3LIB_WRITERS_H_
+ 
++#include <cstring>
+ #include "id3/writer.h"
+ #include "id3/id3lib_streams.h"
+-//#include <string.h>
+ 
+ class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer
+ {
+Index: id3lib-3.8.3/examples/demo_info.cpp
+===================================================================
+--- id3lib-3.8.3.orig/examples/demo_info.cpp
++++ id3lib-3.8.3/examples/demo_info.cpp
+@@ -309,7 +309,7 @@ void PrintInformation(const ID3_Tag &myT
+ 
+ #define DEBUG
+ 
+-int main( unsigned int argc, char * const argv[])
++int main(int argc, char * const argv[])
+ {
+   ID3D_INIT_DOUT();
+ 
+Index: id3lib-3.8.3/examples/demo_copy.cpp
+===================================================================
+--- id3lib-3.8.3.orig/examples/demo_copy.cpp
++++ id3lib-3.8.3/examples/demo_copy.cpp
+@@ -81,7 +81,7 @@ void DisplayTags(ostream &os, luint nTag
+   }
+ }
+ 
+-int main( unsigned int argc, char * const argv[])
++int main(int argc, char * const argv[])
+ {
+   int ulFlag = ID3TT_ID3;
+   ID3D_INIT_DOUT();
+Index: id3lib-3.8.3/examples/demo_convert.cpp
+===================================================================
+--- id3lib-3.8.3.orig/examples/demo_convert.cpp
++++ id3lib-3.8.3/examples/demo_convert.cpp
+@@ -84,7 +84,7 @@ void DisplayTags(ostream &os, luint nTag
+   }
+ }
+ 
+-int main( unsigned int argc, char * const argv[])
++int main(int argc, char * const argv[])
+ {
+   flags_t ulFlag = ID3TT_ALL;
+   gengetopt_args_info args;
+Index: id3lib-3.8.3/examples/demo_tag.cpp
+===================================================================
+--- id3lib-3.8.3.orig/examples/demo_tag.cpp
++++ id3lib-3.8.3/examples/demo_tag.cpp
+@@ -46,7 +46,7 @@ void DisplayTags(ostream &os, luint nTag
+     os << "v2";
+ }
+ 
+-int main( unsigned int argc, char * const argv[])
++int main(int argc, char * const argv[])
+ {
+   int ulFlag = ID3TT_ID3;
+   ID3D_INIT_DOUT();
+Index: id3lib-3.8.3/Makefile.am
+===================================================================
+--- id3lib-3.8.3.orig/Makefile.am
++++ id3lib-3.8.3/Makefile.am
+@@ -9,6 +9,8 @@
+ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ 
++ACLOCAL_AMFLAGS = -I m4
++
+ # require automake 1.5
+ AUTOMAKE_OPTIONS = 1.5
+ 
+Index: id3lib-3.8.3/src/Makefile.am
+===================================================================
+--- id3lib-3.8.3.orig/src/Makefile.am
++++ id3lib-3.8.3/src/Makefile.am
+@@ -74,6 +74,8 @@ libid3_la_SOURCES = $(id3lib_sources)
+ 
+ if ID3_NEEDZLIB
+ LDADD        = $(top_builddir)/zlib/src/libz.la
++else
++LDADD = @ZLIB_LIBS@
+ endif
+ 
+ libid3_la_LDFLAGS = \
diff --git a/patches/id3lib-3.8.3/series b/patches/id3lib-3.8.3/series
new file mode 100644
index 0000000..2c71a8b
--- /dev/null
+++ b/patches/id3lib-3.8.3/series
@@ -0,0 +1 @@
+fix_configure_for_gcc4.diff
diff --git a/rules/libid3lib.in b/rules/libid3lib.in
new file mode 100644
index 0000000..3b7aa4b
--- /dev/null
+++ b/rules/libid3lib.in
@@ -0,0 +1,8 @@
+## SECTION=multimedia_sound
+
+config LIBID3LIB
+       tristate
+       prompt "libid3lib"
+       select ZLIB
+       help
+         ID3 tag reading library
diff --git a/rules/libid3lib.make b/rules/libid3lib.make
new file mode 100644
index 0000000..73d0ca2
--- /dev/null
+++ b/rules/libid3lib.make
@@ -0,0 +1,63 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Juergen Beisert <[email protected]>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBID3LIB) += libid3lib
+
+#
+# Paths and names
+#
+LIBID3LIB_VERSION      := 3.8.3
+LIBID3LIB_MD5          := 19f27ddd2dda4b2d26a559a4f0f402a7
+LIBID3LIB              := id3lib-$(LIBID3LIB_VERSION)
+LIBID3LIB_SUFFIX       := tar.gz
+LIBID3LIB_URL          := $(call ptx/mirror, SF, 
id3lib/$(LIBID3LIB_VERSION)/$(LIBID3LIB).$(LIBID3LIB_SUFFIX))
+LIBID3LIB_SOURCE       := $(SRCDIR)/$(LIBID3LIB).$(LIBID3LIB_SUFFIX)
+LIBID3LIB_DIR          := $(BUILDDIR)/$(LIBID3LIB)
+LIBID3LIB_LICENSE      := LGPLv2
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+LIBID3LIB_CONF_TOOL    := autoconf
+LIBID3LIB_CONF_OPT     := \
+       $(CROSS_AUTOCONF_USR) \
+       --enable-shared \
+       --disable-static \
+       --disable-ansi \
+       --enable-cxx-warnings=yes \
+       --enable-debug=no
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libid3lib.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, libid3lib)
+       @$(call install_fixup, libid3lib,PRIORITY,optional)
+       @$(call install_fixup, libid3lib,SECTION,base)
+       @$(call install_fixup, libid3lib,AUTHOR,"Juergen Beisert 
<[email protected]>")
+       @$(call install_fixup, libid3lib,DESCRIPTION,missing)
+
+       @$(call install_lib, libid3lib, 0, 0, 0644, libid3-3.8)
+
+       @$(call install_finish, libid3lib)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
1.7.9.5


-- 
ptxdist mailing list
[email protected]

Reply via email to