Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 96127 Details for
Bug 138907
bump request for media-sound/kid3: 0.6 -> 0.7
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for building with tunepimp 0.5
kid3-0.7-tunepimp05.patch (text/plain), 31.41 KB, created by
Tomas Cohen Arazi
on 2006-09-05 16:11:49 UTC
(
hide
)
Description:
Patch for building with tunepimp 0.5
Filename:
MIME Type:
Creator:
Tomas Cohen Arazi
Created:
2006-09-05 16:11:49 UTC
Size:
31.41 KB
patch
obsolete
>diff -ru kid3-0.7/admin/Makefile.in kid3.new/admin/Makefile.in >--- kid3-0.7/admin/Makefile.in 2006-06-27 21:34:40.000000000 +0200 >+++ kid3.new/admin/Makefile.in 2006-08-29 22:28:13.000000000 +0200 >@@ -295,7 +295,7 @@ > #>+ 3 > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu admin/Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/admin/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit admin/Makefile.in > Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status > cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) > >@@ -451,9 +451,8 @@ > # Otherwise a system limit (for SysV at least) may be exceeded. > .NOEXPORT: > >- > #>+ 2 >-KDE_DIST=configure.in.bot.end bcheck.pl detect-autoconf.sh deps.am configure.in.min debianrules cvs.sh config.pl oldinclude.m4.in am_edit Makefile.common cvs-clean.pl Makefile.in Doxyfile.global acinclude.m4.in libtool.m4.in nmcheck Doxyfile.am conf.change.pl >+KDE_DIST=configure.in.bot.end bcheck.pl cvs-clean.pl Makefile.in detect-autoconf.sh Doxyfile.global deps.am configure.in.min acinclude.m4.in debianrules libtool.m4.in nmcheck cvs.sh config.pl Doxyfile.am oldinclude.m4.in am_edit conf.change.pl Makefile.common > > #>+ 2 > docs-am: >@@ -462,7 +461,7 @@ > force-reedit: > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu admin/Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/admin/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit admin/Makefile.in > > > #>+ 21 >diff -ru kid3-0.7/configure kid3.new/configure >--- kid3-0.7/configure 2006-06-27 20:55:03.000000000 +0200 >+++ kid3.new/configure 2006-08-29 22:27:59.000000000 +0200 >@@ -31630,22 +31630,146 @@ > > fi; > if test "$with_musicbrainz" != "no"; then >+ if test "${ac_cv_header_tunepimp_0_5_tp_c_h+set}" = set; then >+ echo "$as_me:$LINENO: checking for tunepimp-0.5/tp_c.h" >&5 >+echo $ECHO_N "checking for tunepimp-0.5/tp_c.h... $ECHO_C" >&6 >+if test "${ac_cv_header_tunepimp_0_5_tp_c_h+set}" = set; then >+ echo $ECHO_N "(cached) $ECHO_C" >&6 >+fi >+echo "$as_me:$LINENO: result: $ac_cv_header_tunepimp_0_5_tp_c_h" >&5 >+echo "${ECHO_T}$ac_cv_header_tunepimp_0_5_tp_c_h" >&6 >+else >+ # Is the header compilable? >+echo "$as_me:$LINENO: checking tunepimp-0.5/tp_c.h usability" >&5 >+echo $ECHO_N "checking tunepimp-0.5/tp_c.h usability... $ECHO_C" >&6 >+cat >conftest.$ac_ext <<_ACEOF >+/* confdefs.h. */ >+_ACEOF >+cat confdefs.h >>conftest.$ac_ext >+cat >>conftest.$ac_ext <<_ACEOF >+/* end confdefs.h. */ >+$ac_includes_default >+#include <tunepimp-0.5/tp_c.h> >+_ACEOF >+rm -f conftest.$ac_objext >+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 >+ (eval $ac_compile) 2>conftest.er1 >+ ac_status=$? >+ grep -v '^ *+' conftest.er1 >conftest.err >+ rm -f conftest.er1 >+ cat conftest.err >&5 >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); } && >+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; } && >+ { ac_try='test -s conftest.$ac_objext' >+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); }; }; then >+ ac_header_compiler=yes >+else >+ echo "$as_me: failed program was:" >&5 >+sed 's/^/| /' conftest.$ac_ext >&5 > >+ac_header_compiler=no >+fi >+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext >+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 >+echo "${ECHO_T}$ac_header_compiler" >&6 > >+# Is the header present? >+echo "$as_me:$LINENO: checking tunepimp-0.5/tp_c.h presence" >&5 >+echo $ECHO_N "checking tunepimp-0.5/tp_c.h presence... $ECHO_C" >&6 >+cat >conftest.$ac_ext <<_ACEOF >+/* confdefs.h. */ >+_ACEOF >+cat confdefs.h >>conftest.$ac_ext >+cat >>conftest.$ac_ext <<_ACEOF >+/* end confdefs.h. */ >+#include <tunepimp-0.5/tp_c.h> >+_ACEOF >+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 >+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 >+ ac_status=$? >+ grep -v '^ *+' conftest.er1 >conftest.err >+ rm -f conftest.er1 >+ cat conftest.err >&5 >+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 >+ (exit $ac_status); } >/dev/null; then >+ if test -s conftest.err; then >+ ac_cpp_err=$ac_c_preproc_warn_flag >+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag >+ else >+ ac_cpp_err= >+ fi >+else >+ ac_cpp_err=yes >+fi >+if test -z "$ac_cpp_err"; then >+ ac_header_preproc=yes >+else >+ echo "$as_me: failed program was:" >&5 >+sed 's/^/| /' conftest.$ac_ext >&5 > >+ ac_header_preproc=no >+fi >+rm -f conftest.err conftest.$ac_ext >+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 >+echo "${ECHO_T}$ac_header_preproc" >&6 > >- kde_safe_cppflags=$CPPFLAGS >- CPPFLAGS="$CPPFLAGS $all_includes" >- ac_ext=cc >-ac_cpp='$CXXCPP $CPPFLAGS' >-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' >-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' >-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu >- >-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' >- >+# So? What about this header? >+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in >+ yes:no: ) >+ { echo "$as_me:$LINENO: WARNING: tunepimp-0.5/tp_c.h: accepted by the compiler, rejected by the preprocessor!" >&5 >+echo "$as_me: WARNING: tunepimp-0.5/tp_c.h: accepted by the compiler, rejected by the preprocessor!" >&2;} >+ { echo "$as_me:$LINENO: WARNING: tunepimp-0.5/tp_c.h: proceeding with the compiler's result" >&5 >+echo "$as_me: WARNING: tunepimp-0.5/tp_c.h: proceeding with the compiler's result" >&2;} >+ ac_header_preproc=yes >+ ;; >+ no:yes:* ) >+ { echo "$as_me:$LINENO: WARNING: tunepimp-0.5/tp_c.h: present but cannot be compiled" >&5 >+echo "$as_me: WARNING: tunepimp-0.5/tp_c.h: present but cannot be compiled" >&2;} >+ { echo "$as_me:$LINENO: WARNING: tunepimp-0.5/tp_c.h: check for missing prerequisite headers?" >&5 >+echo "$as_me: WARNING: tunepimp-0.5/tp_c.h: check for missing prerequisite headers?" >&2;} >+ { echo "$as_me:$LINENO: WARNING: tunepimp-0.5/tp_c.h: see the Autoconf documentation" >&5 >+echo "$as_me: WARNING: tunepimp-0.5/tp_c.h: see the Autoconf documentation" >&2;} >+ { echo "$as_me:$LINENO: WARNING: tunepimp-0.5/tp_c.h: section \"Present But Cannot Be Compiled\"" >&5 >+echo "$as_me: WARNING: tunepimp-0.5/tp_c.h: section \"Present But Cannot Be Compiled\"" >&2;} >+ { echo "$as_me:$LINENO: WARNING: tunepimp-0.5/tp_c.h: proceeding with the preprocessor's result" >&5 >+echo "$as_me: WARNING: tunepimp-0.5/tp_c.h: proceeding with the preprocessor's result" >&2;} >+ { echo "$as_me:$LINENO: WARNING: tunepimp-0.5/tp_c.h: in the future, the compiler will take precedence" >&5 >+echo "$as_me: WARNING: tunepimp-0.5/tp_c.h: in the future, the compiler will take precedence" >&2;} >+ ( >+ cat <<\_ASBOX >+## ------------------------------------------ ## >+## Report this to the AC_PACKAGE_NAME lists. ## >+## ------------------------------------------ ## >+_ASBOX >+ ) | >+ sed "s/^/$as_me: WARNING: /" >&2 >+ ;; >+esac >+echo "$as_me:$LINENO: checking for tunepimp-0.5/tp_c.h" >&5 >+echo $ECHO_N "checking for tunepimp-0.5/tp_c.h... $ECHO_C" >&6 >+if test "${ac_cv_header_tunepimp_0_5_tp_c_h+set}" = set; then >+ echo $ECHO_N "(cached) $ECHO_C" >&6 >+else >+ ac_cv_header_tunepimp_0_5_tp_c_h=$ac_header_preproc >+fi >+echo "$as_me:$LINENO: result: $ac_cv_header_tunepimp_0_5_tp_c_h" >&5 >+echo "${ECHO_T}$ac_cv_header_tunepimp_0_5_tp_c_h" >&6 > >- if test "${ac_cv_header_tunepimp_tp_c_h+set}" = set; then >+fi >+if test $ac_cv_header_tunepimp_0_5_tp_c_h = yes; then >+ build_musicbrainz="yes" >+else >+ if test "${ac_cv_header_tunepimp_tp_c_h+set}" = set; then > echo "$as_me:$LINENO: checking for tunepimp/tp_c.h" >&5 > echo $ECHO_N "checking for tunepimp/tp_c.h... $ECHO_C" >&6 > if test "${ac_cv_header_tunepimp_tp_c_h+set}" = set; then >@@ -31675,7 +31799,7 @@ > cat conftest.err >&5 > echo "$as_me:$LINENO: \$? = $ac_status" >&5 > (exit $ac_status); } && >- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' >+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' > { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 > (eval $ac_try) 2>&5 > ac_status=$? >@@ -31718,8 +31842,8 @@ > echo "$as_me:$LINENO: \$? = $ac_status" >&5 > (exit $ac_status); } >/dev/null; then > if test -s conftest.err; then >- ac_cpp_err=$ac_cxx_preproc_warn_flag >- ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag >+ ac_cpp_err=$ac_c_preproc_warn_flag >+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag > else > ac_cpp_err= > fi >@@ -31739,7 +31863,7 @@ > echo "${ECHO_T}$ac_header_preproc" >&6 > > # So? What about this header? >-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in >+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in > yes:no: ) > { echo "$as_me:$LINENO: WARNING: tunepimp/tp_c.h: accepted by the compiler, rejected by the preprocessor!" >&5 > echo "$as_me: WARNING: tunepimp/tp_c.h: accepted by the compiler, rejected by the preprocessor!" >&2;} >@@ -31788,19 +31912,14 @@ > fi > > >- CPPFLAGS=$kde_safe_cppflags >- ac_ext=c >-ac_cpp='$CPP $CPPFLAGS' >-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' >-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' >-ac_compiler_gnu=$ac_cv_c_compiler_gnu >+fi > > > fi > if test "$build_musicbrainz" = "yes"; then >- echo "$as_me:$LINENO: checking for tp_SetPUIDCollisionThreshold in -ltunepimp" >&5 >-echo $ECHO_N "checking for tp_SetPUIDCollisionThreshold in -ltunepimp... $ECHO_C" >&6 >-if test "${ac_cv_lib_tunepimp_tp_SetPUIDCollisionThreshold+set}" = set; then >+ echo "$as_me:$LINENO: checking for tr_GetPUID in -ltunepimp" >&5 >+echo $ECHO_N "checking for tr_GetPUID in -ltunepimp... $ECHO_C" >&6 >+if test "${ac_cv_lib_tunepimp_tr_GetPUID+set}" = set; then > echo $ECHO_N "(cached) $ECHO_C" >&6 > else > ac_check_lib_save_LIBS=$LIBS >@@ -31818,11 +31937,11 @@ > #endif > /* We use char because int might match the return type of a gcc2 > builtin and then its argument prototype would still apply. */ >-char tp_SetPUIDCollisionThreshold (); >+char tr_GetPUID (); > int > main () > { >-tp_SetPUIDCollisionThreshold (); >+tr_GetPUID (); > ; > return 0; > } >@@ -31848,20 +31967,20 @@ > ac_status=$? > echo "$as_me:$LINENO: \$? = $ac_status" >&5 > (exit $ac_status); }; }; then >- ac_cv_lib_tunepimp_tp_SetPUIDCollisionThreshold=yes >+ ac_cv_lib_tunepimp_tr_GetPUID=yes > else > echo "$as_me: failed program was:" >&5 > sed 's/^/| /' conftest.$ac_ext >&5 > >-ac_cv_lib_tunepimp_tp_SetPUIDCollisionThreshold=no >+ac_cv_lib_tunepimp_tr_GetPUID=no > fi > rm -f conftest.err conftest.$ac_objext \ > conftest$ac_exeext conftest.$ac_ext > LIBS=$ac_check_lib_save_LIBS > fi >-echo "$as_me:$LINENO: result: $ac_cv_lib_tunepimp_tp_SetPUIDCollisionThreshold" >&5 >-echo "${ECHO_T}$ac_cv_lib_tunepimp_tp_SetPUIDCollisionThreshold" >&6 >-if test $ac_cv_lib_tunepimp_tp_SetPUIDCollisionThreshold = yes; then >+echo "$as_me:$LINENO: result: $ac_cv_lib_tunepimp_tr_GetPUID" >&5 >+echo "${ECHO_T}$ac_cv_lib_tunepimp_tr_GetPUID" >&6 >+if test $ac_cv_lib_tunepimp_tr_GetPUID = yes; then > > cat >>confdefs.h <<\_ACEOF > #define HAVE_TUNEPIMP 5 >@@ -31980,6 +32099,7 @@ > > > >+ > kde_safe_cppflags=$CPPFLAGS > CPPFLAGS="$CPPFLAGS $all_includes" > ac_ext=cc >diff -ru kid3-0.7/configure.in kid3.new/configure.in >--- kid3-0.7/configure.in 2006-06-27 20:54:46.000000000 +0200 >+++ kid3.new/configure.in 2006-08-29 22:27:43.000000000 +0200 >@@ -133,10 +133,12 @@ > with_musicbrainz=yes > ) > if test "$with_musicbrainz" != "no"; then >- KDE_CHECK_HEADER(tunepimp/tp_c.h, [build_musicbrainz="yes"], [build_musicbrainz="no"]) >+ AC_CHECK_HEADER(tunepimp-0.5/tp_c.h, [build_musicbrainz="yes"], >+ [AC_CHECK_HEADER(tunepimp/tp_c.h, [build_musicbrainz="yes"], >+ [build_musicbrainz="no"])]) > fi > if test "$build_musicbrainz" = "yes"; then >- AC_CHECK_LIB(tunepimp, tp_SetPUIDCollisionThreshold, >+ AC_CHECK_LIB(tunepimp, tr_GetPUID, > AC_DEFINE(HAVE_TUNEPIMP, 5, [have TunePimp 0.5.x]), > AC_CHECK_LIB(tunepimp, tp_SetFileNameEncoding, > AC_DEFINE(HAVE_TUNEPIMP, 4, [have TunePimp 0.4.x]), >diff -ru kid3-0.7/configure.in.in kid3.new/configure.in.in >--- kid3-0.7/configure.in.in 2006-06-05 20:24:46.000000000 +0200 >+++ kid3.new/configure.in.in 2006-08-29 22:26:29.000000000 +0200 >@@ -68,10 +68,12 @@ > with_musicbrainz=yes > ) > if test "$with_musicbrainz" != "no"; then >- KDE_CHECK_HEADER(tunepimp/tp_c.h, [build_musicbrainz="yes"], [build_musicbrainz="no"]) >+ AC_CHECK_HEADER(tunepimp-0.5/tp_c.h, [build_musicbrainz="yes"], >+ [AC_CHECK_HEADER(tunepimp/tp_c.h, [build_musicbrainz="yes"], >+ [build_musicbrainz="no"])]) > fi > if test "$build_musicbrainz" = "yes"; then >- AC_CHECK_LIB(tunepimp, tp_SetPUIDCollisionThreshold, >+ AC_CHECK_LIB(tunepimp, tr_GetPUID, > AC_DEFINE(HAVE_TUNEPIMP, 5, [have TunePimp 0.5.x]), > AC_CHECK_LIB(tunepimp, tp_SetFileNameEncoding, > AC_DEFINE(HAVE_TUNEPIMP, 4, [have TunePimp 0.4.x]), >diff -ru kid3-0.7/doc/de/Makefile.in kid3.new/doc/de/Makefile.in >--- kid3-0.7/doc/de/Makefile.in 2006-06-27 21:34:40.000000000 +0200 >+++ kid3.new/doc/de/Makefile.in 2006-08-29 22:28:13.000000000 +0200 >@@ -296,7 +296,7 @@ > #>+ 3 > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu doc/de/Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/doc/de/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit doc/de/Makefile.in > Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status > cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) > >@@ -446,7 +446,6 @@ > # Otherwise a system limit (for SysV at least) may be exceeded. > .NOEXPORT: > >- > #>+ 2 > KDE_DIST=Makefile.in > >@@ -499,7 +498,7 @@ > force-reedit: > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu doc/de/Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/doc/de/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit doc/de/Makefile.in > > > #>+ 21 >diff -ru kid3-0.7/doc/en/Makefile.in kid3.new/doc/en/Makefile.in >--- kid3-0.7/doc/en/Makefile.in 2006-06-27 21:34:40.000000000 +0200 >+++ kid3.new/doc/en/Makefile.in 2006-08-29 22:28:13.000000000 +0200 >@@ -296,7 +296,7 @@ > #>+ 3 > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu doc/en/Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/doc/en/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit doc/en/Makefile.in > Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status > cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) > >@@ -446,7 +446,6 @@ > # Otherwise a system limit (for SysV at least) may be exceeded. > .NOEXPORT: > >- > #>+ 2 > KDE_DIST=Makefile.in > >@@ -499,7 +498,7 @@ > force-reedit: > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu doc/en/Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/doc/en/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit doc/en/Makefile.in > > > #>+ 21 >diff -ru kid3-0.7/doc/Makefile.in kid3.new/doc/Makefile.in >--- kid3-0.7/doc/Makefile.in 2006-06-27 21:34:40.000000000 +0200 >+++ kid3.new/doc/Makefile.in 2006-08-29 22:28:13.000000000 +0200 >@@ -307,7 +307,7 @@ > #>+ 3 > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu doc/Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/doc/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit doc/Makefile.in > Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status > cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) > >@@ -593,7 +593,6 @@ > # Otherwise a system limit (for SysV at least) may be exceeded. > .NOEXPORT: > >- > #>+ 2 > KDE_DIST=Makefile.in > >@@ -604,7 +603,7 @@ > force-reedit: > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu doc/Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/doc/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit doc/Makefile.in > > > #>+ 21 >diff -ru kid3-0.7/kid3/Makefile.in kid3.new/kid3/Makefile.in >--- kid3-0.7/kid3/Makefile.in 2006-06-27 21:34:40.000000000 +0200 >+++ kid3.new/kid3/Makefile.in 2006-08-29 22:28:13.000000000 +0200 >@@ -491,7 +491,7 @@ > #>+ 3 > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu kid3/Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/kid3/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit kid3/Makefile.in > Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status > cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) > binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) >@@ -910,7 +910,6 @@ > # Otherwise a system limit (for SysV at least) may be exceeded. > .NOEXPORT: > >- > #>+ 3 > importdialog.moc.cpp: $(srcdir)/importdialog.h > $(MOC) $(srcdir)/importdialog.h -o importdialog.moc.cpp >@@ -1023,7 +1022,7 @@ > force-reedit: > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu kid3/Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/kid3/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit kid3/Makefile.in > > > #>+ 21 >diff -ru kid3-0.7/kid3/musicbrainzclient.cpp kid3.new/kid3/musicbrainzclient.cpp >--- kid3-0.7/kid3/musicbrainzclient.cpp 2006-06-05 22:18:36.000000000 +0200 >+++ kid3.new/kid3/musicbrainzclient.cpp 2006-08-29 22:26:29.000000000 +0200 >@@ -17,10 +17,161 @@ > #define I18N_NOOP(s) QT_TR_NOOP(s) > #endif > #include <qfile.h> >+#if HAVE_TUNEPIMP >= 5 >+#include <qsocket.h> >+#include <qdom.h> >+#endif > #include "musicbrainzconfig.h" > #include "freedbclient.h" > #include "importtrackdata.h" > >+#if HAVE_TUNEPIMP >= 5 >+/** >+ * Constructor. >+ * >+ * @param numFiles number of files to be queried >+ * @param serverName server name >+ * @param serverPort server port >+ * @param proxyName proxy name, empty if no proxy >+ * @param proxyPort proxy port >+ */ >+LookupQuery::LookupQuery(int numFiles, >+ const QString& serverName, Q_UINT16 serverPort, >+ const QString& proxyName, Q_UINT16 proxyPort) : >+ m_numFiles(numFiles), m_serverName(serverName), m_serverPort(serverPort), >+ m_proxyName(proxyName), m_proxyPort(proxyPort), >+ m_currentFile(-1), m_fileQueries(new FileQuery[numFiles]), >+ m_sock(new QSocket) >+{ >+ for (int i = 0; i < m_numFiles; ++i) { >+ m_fileQueries[i].requested = false; >+ m_fileQueries[i].puid = ""; >+ } >+ connect(m_sock, SIGNAL(connected()), >+ this, SLOT(socketConnected())); >+ connect(m_sock, SIGNAL(error(int)), >+ this, SLOT(socketError())); >+ connect(m_sock, SIGNAL(connectionClosed()), >+ this, SLOT(socketConnectionClosed())); >+} >+ >+/** >+ * Destructor. >+ */ >+LookupQuery::~LookupQuery() >+{ >+ m_sock->close(); >+ m_sock->disconnect(); >+ delete m_sock; >+ delete [] m_fileQueries; >+} >+ >+/** >+ * Connect to server to query information about the current file. >+ */ >+void LookupQuery::socketQuery() >+{ >+ if (m_currentFile >= 0 && m_currentFile < m_numFiles) { >+ QString destName = m_proxyName.isEmpty() ? m_serverName : m_proxyName; >+ Q_UINT16 destPort = m_proxyName.isEmpty() ? m_serverPort : m_proxyPort; >+ m_request = "GET http://"; >+ m_request += m_serverName; >+ if (m_serverPort != 80) { >+ m_request += ':'; >+ m_request += QString::number(m_serverPort); >+ } >+ m_request += "/ws/1/track/?type=xml&puid="; >+ m_request += m_fileQueries[m_currentFile].puid; >+ m_request += " HTTP/1.0\r\nHost: "; >+ m_request += m_serverName; >+ m_request += "\r\nUser-agent: Kid3/" VERSION "\r\n\r\n"; >+ m_sock->connectToHost(destName, destPort); >+ m_fileQueries[m_currentFile].requested = true; >+ } >+} >+ >+/** >+ * Query the next file. >+ */ >+void LookupQuery::queryNext() >+{ >+ // handle the first pending query >+ for (int i = 0; i < m_numFiles; ++i) { >+ if (!m_fileQueries[i].requested && >+ !m_fileQueries[i].puid.isEmpty()) { >+ m_currentFile = i; >+ socketQuery(); >+ return; >+ } >+ } >+ // no pending query => socketQuery() will be done in next query() >+ m_currentFile = -1; >+} >+ >+/** >+ * Query a PUID from the server. >+ * >+ * @param puid PUID >+ * @param index index of file >+ */ >+void LookupQuery::query(const char* puid, int index) >+{ >+ m_fileQueries[index].puid = QString(puid); >+ // if no request is being executed, start the current request >+ if (m_currentFile < 0 || m_currentFile >= m_numFiles || >+ !m_fileQueries[m_currentFile].requested) { >+ m_currentFile = index; >+ socketQuery(); >+ } >+} >+ >+/** >+ * Send query when the socket is connected. >+ */ >+void LookupQuery::socketConnected() >+{ >+ m_sock->writeBlock(m_request.latin1(), m_request.length()); >+} >+ >+/** >+ * Error on socket connection. >+ */ >+void LookupQuery::socketError() >+{ >+ queryNext(); >+} >+ >+/** >+ * Read received data when the server has closed the connection. >+ */ >+void LookupQuery::socketConnectionClosed() >+{ >+ Q_ULONG len = m_sock->bytesAvailable(); >+ QCString buf; >+ buf.resize(len + 1 ); >+ m_sock->readBlock(buf.data(), len); >+ m_sock->close(); >+ >+ int xmlStart = buf.find("<?xml"); >+ if (xmlStart >= 0 && >+ m_currentFile >= 0 && m_currentFile < m_numFiles && >+ m_fileQueries[m_currentFile].requested) { >+ emit queryResponseReceived(m_currentFile, buf.mid(xmlStart, len - xmlStart)); >+ } >+ queryNext(); >+} >+ >+#else >+ >+LookupQuery::LookupQuery(int, const QString&, Q_UINT16, const QString&, Q_UINT16) {} >+LookupQuery::~LookupQuery() {} >+void LookupQuery::socketConnected() {} >+void LookupQuery::socketError() {} >+void LookupQuery::socketConnectionClosed() {} >+ >+#endif >+ >+ > /** > * Constructor. > * >@@ -29,6 +180,9 @@ > */ > MusicBrainzClient::MusicBrainzClient(ImportTrackDataVector& trackDataList) : > m_trackDataVector(trackDataList), m_tp(0), m_ids(0), m_numFiles(0) >+#if HAVE_TUNEPIMP >= 5 >+ , m_lookupQuery(0) >+#endif > { > m_tp = tp_New("kid3", VERSION); > #ifdef WIN32 >@@ -39,7 +193,11 @@ > #else > tp_SetUseUTF8(m_tp, 1); > #endif >+#if HAVE_TUNEPIMP >= 5 >+ tp_SetMusicDNSClientId(m_tp, "a95f5c7cd37fd4bce12dc86d196fb4fe"); >+#else > tp_SetAutoFileLookup(m_tp, 1); >+#endif > tp_SetRenameFiles(m_tp, 0); > tp_SetMoveFiles(m_tp, 0); > tp_SetWriteID3v1(m_tp, 0); >@@ -110,8 +268,13 @@ > { eUnrecognized, I18N_NOOP("Unrecognized") }, > { eRecognized, I18N_NOOP("Recognized") }, > { ePending, I18N_NOOP("Pending") }, >+#if HAVE_TUNEPIMP >= 5 >+ { ePUIDLookup, I18N_NOOP("PUID Lookup") }, >+ { ePUIDCollision, I18N_NOOP("PUID Collision") }, >+#else > { eTRMLookup, I18N_NOOP("TRM Lookup") }, > { eTRMCollision, I18N_NOOP("TRM Collision") }, >+#endif > { eFileLookup, I18N_NOOP("File Lookup") }, > { eUserSelection, I18N_NOOP("User Selection") }, > { eVerified, I18N_NOOP("Verified") }, >@@ -163,7 +326,11 @@ > track_t track = tp_GetTrack(m_tp, id); > if (track) { > tr_Lock(track); >+#if HAVE_TUNEPIMP >= 5 >+ tr_GetPUID(track, trm, sizeof(trm)); >+#else > tr_GetTRM(track, trm, sizeof(trm)); >+#endif > if (trm[0] == '\0') { > tr_SetStatus(track, ePending); > tp_Wake(m_tp, track); >@@ -189,13 +356,33 @@ > ImportTrackData trackData; > getMetaData(id, trackData); > emit metaDataReceived(index, trackData); >- } else if (statusCode == eTRMCollision || >- statusCode == eUserSelection) { >+ } >+#if HAVE_TUNEPIMP >= 5 >+ else if (statusCode == ePUIDLookup || >+ statusCode == ePUIDCollision || >+ statusCode == eFileLookup) { >+ char puid[255]; >+ puid[0] = '\0'; >+ track_t track = tp_GetTrack(m_tp, id); >+ if (track) { >+ tr_Lock(track); >+ tr_GetPUID(track, puid, sizeof(puid)); >+ tr_Unlock(track); >+ tp_ReleaseTrack(m_tp, track); >+ } >+ if (m_lookupQuery) { >+ m_lookupQuery->query(puid, index); >+ } >+ } >+#else >+ else if (statusCode == eTRMCollision || >+ statusCode == eUserSelection) { > ImportTrackDataVector trackDataList; > if (getResults(id, trackDataList)) { > emit resultsReceived(index, trackDataList); > } > } >+#endif > } > break; > } >@@ -242,6 +429,16 @@ > m_numFiles = m_trackDataVector.count(); > #endif > m_ids = new int[m_numFiles]; >+#if HAVE_TUNEPIMP >= 5 >+ char serverName[80], proxyName[80]; >+ short serverPort, proxyPort; >+ tp_GetServer(m_tp, serverName, sizeof(serverName) - 1, &serverPort); >+ tp_GetProxy(m_tp, proxyName, sizeof(proxyName) - 1, &proxyPort); >+ m_lookupQuery = new LookupQuery(m_numFiles, serverName, serverPort, >+ proxyName, proxyPort); >+ connect(m_lookupQuery, SIGNAL(queryResponseReceived(int, const QCString&)), >+ this, SLOT(parseLookupResponse(int, const QCString&))); >+#endif > int i = 0; > for ( > #if QT_VERSION >= 300 >@@ -271,6 +468,10 @@ > } > delete [] m_ids; > m_ids = 0; >+#if HAVE_TUNEPIMP >= 5 >+ delete m_lookupQuery; >+ m_lookupQuery = 0; >+#endif > m_numFiles = 0; > } > } >@@ -308,6 +509,68 @@ > } > } > >+#if HAVE_TUNEPIMP >= 5 >+ >+bool MusicBrainzClient::getResults(int, ImportTrackDataVector&) { >+ return false; >+} >+ >+/** >+ * Process server response with lookup data. >+ * >+ * @param index index of file >+ * @param response response from server >+ */ >+void MusicBrainzClient::parseLookupResponse(int index, const QCString& response) >+{ >+ ImportTrackDataVector trackDataList; >+ QDomDocument doc; >+ if (doc.setContent(response)) { >+ QDomElement trackList = >+ doc.namedItem("metadata").toElement().namedItem("track-list").toElement(); >+ >+ for (QDomNode trackNode = trackList.namedItem("track"); >+ !trackNode.isNull(); >+ trackNode = trackNode.nextSibling()) { >+ QDomElement track = trackNode.toElement(); >+ >+ ImportTrackData trackData; >+ trackData.artist = >+ track.namedItem("artist").toElement().namedItem("name").toElement().text(); >+ trackData.title = track.namedItem("title").toElement().text(); >+ >+ for (QDomNode releaseNode = >+ track.namedItem("release-list").toElement().namedItem("release"); >+ !releaseNode.isNull(); >+ releaseNode = releaseNode.nextSibling() ) { >+ QDomElement release = releaseNode.toElement(); >+ >+ trackData.album = release.namedItem("title").toElement().text(); >+ trackData.track = -1; >+ QDomNode releaseTrackNode = release.namedItem("track-list"); >+ if (!releaseTrackNode.isNull()) { >+ QDomElement releaseTrack = releaseTrackNode.toElement(); >+ if (!releaseTrack.attribute("offset").isEmpty()) >+ trackData.track = releaseTrack.attribute("offset").toInt() + 1; >+ } >+ } >+ trackDataList.append(trackData); >+ } >+ } >+ >+ if (trackDataList.size() > 1) { >+ emit resultsReceived(index, trackDataList); >+ emit statusChanged(index, i18n("User Selection")); >+ } else if (trackDataList.size() == 1) { >+ emit metaDataReceived(index, *trackDataList.begin()); >+ emit statusChanged(index, i18n("Recognized")); >+ } else { >+ emit statusChanged(index, i18n("Unrecognized")); >+ } >+} >+ >+#else >+ > /** > * Get results for an ambiguous file. > * >@@ -388,6 +651,10 @@ > return resultsAvailable; > } > >+void MusicBrainzClient::parseLookupResponse(int, const QCString&) {} >+ >+#endif >+ > #else // HAVE_TUNEPIMP > > MusicBrainzClient::MusicBrainzClient(ImportTrackDataVector&) {} >diff -ru kid3-0.7/kid3/musicbrainzclient.h kid3.new/kid3/musicbrainzclient.h >--- kid3-0.7/kid3/musicbrainzclient.h 2006-02-23 20:48:34.000000000 +0100 >+++ kid3.new/kid3/musicbrainzclient.h 2006-08-29 22:26:29.000000000 +0200 >@@ -15,7 +15,13 @@ > #include <qobject.h> > > #ifdef HAVE_TUNEPIMP >+#if HAVE_TUNEPIMP >= 5 >+#include <qbuffer.h> >+#include <tunepimp-0.5/tp_c.h> >+class QSocket; >+#else > #include <tunepimp/tp_c.h> >+#endif > #endif // HAVE_TUNEPIMP > > class MusicBrainzConfig; >@@ -23,6 +29,103 @@ > class ImportTrackDataVector; > > /** >+ * A HTTP query to a musicbrainz server for HAVE_TUNEPIMP >= 5. >+ */ >+class LookupQuery : public QObject { >+Q_OBJECT >+ >+public: >+ /** >+ * Constructor. >+ * >+ * @param numFiles number of files to be queried >+ * @param serverName server name >+ * @param serverPort server port >+ * @param proxyName proxy name, empty if no proxy >+ * @param proxyPort proxy port >+ */ >+ LookupQuery(int numFiles, >+ const QString& serverName, Q_UINT16 serverPort = 80, >+ const QString& proxyName = "", Q_UINT16 proxyPort = 80); >+ >+ /** >+ * Destructor. >+ */ >+ virtual ~LookupQuery(); >+ >+#if HAVE_TUNEPIMP >= 5 >+ /** >+ * Query a PUID from the server. >+ * >+ * @param puid PUID >+ * @param index index of file >+ */ >+ void query(const char* puid, int index); >+#endif >+ >+signals: >+ /** >+ * Emitted when the query response is received >+ */ >+ void queryResponseReceived(int, const QCString&); >+ >+private slots: >+ /** >+ * Send query when the socket is connected. >+ */ >+ void socketConnected(); >+ >+ /** >+ * Error on socket connection. >+ */ >+ void socketError(); >+ >+ /** >+ * Read received data when the server has closed the connection. >+ */ >+ void socketConnectionClosed(); >+ >+#if HAVE_TUNEPIMP >= 5 >+private: >+ /** >+ * Connect to server to query information about the current file. >+ */ >+ void socketQuery(); >+ >+ /** >+ * Query the next file. >+ */ >+ void queryNext(); >+ >+ struct FileQuery { >+ bool requested; >+ QString puid; >+ }; >+ >+ /** Number of files to be queried. */ >+ int m_numFiles; >+ /** MusicBrainz server */ >+ QString m_serverName; >+ /** Port of MusicBrainz server */ >+ Q_UINT16 m_serverPort; >+ /** Proxy */ >+ QString m_proxyName; >+ /** Port of proxy */ >+ Q_UINT16 m_proxyPort; >+ /** >+ * -1 if not yet started, >+ * 0..m_numFiles-1 if a file is currently processed, >+ * >=m_numFiles if all files processed. >+ */ >+ int m_currentFile; >+ FileQuery* m_fileQueries; >+ QSocket* m_sock; >+ QString m_request; >+#endif >+}; >+ >+ >+/** > * MusicBrainz client. > */ > class MusicBrainzClient : public QObject >@@ -85,6 +188,15 @@ > */ > void resultsReceived(int, ImportTrackDataVector&); > >+private slots: >+ /** >+ * Process server response with lookup data. >+ * >+ * @param index index of file >+ * @param response response from server >+ */ >+ void parseLookupResponse(int index, const QCString& response); >+ > #ifdef HAVE_TUNEPIMP > private: > /** >@@ -126,6 +238,9 @@ > tunepimp_t m_tp; > int* m_ids; > int m_numFiles; >+#if HAVE_TUNEPIMP >= 5 >+ LookupQuery* m_lookupQuery; >+#endif > #endif // HAVE_TUNEPIMP > }; > >diff -ru kid3-0.7/Makefile.in kid3.new/Makefile.in >--- kid3-0.7/Makefile.in 2006-06-27 21:34:40.000000000 +0200 >+++ kid3.new/Makefile.in 2006-08-29 22:28:13.000000000 +0200 >@@ -317,7 +317,7 @@ > #>+ 3 > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit Makefile.in > Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status > cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) > >@@ -740,9 +740,8 @@ > # Otherwise a system limit (for SysV at least) may be exceeded. > .NOEXPORT: > >- > #>+ 2 >-KDE_DIST=configure.files kid3_ru.qm build-stamp kid3_de.qm configure.in.in stamp-h.in subdirs Makefile.in kid3_de.html kid3_en.html Makefile.cvs kid3_es.qm LICENSE >+KDE_DIST=stamp-h.in subdirs Makefile.in kid3_de.html configure.files kid3_en.html kid3_ru.qm kid3_de.qm Makefile.cvs configure.in.in kid3_es.qm LICENSE > > #>+ 2 > docs-am: >@@ -751,7 +750,7 @@ > force-reedit: > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit Makefile.in > > > #>+ 21 >diff -ru kid3-0.7/po/Makefile.in kid3.new/po/Makefile.in >--- kid3-0.7/po/Makefile.in 2006-06-27 21:34:40.000000000 +0200 >+++ kid3.new/po/Makefile.in 2006-08-29 22:28:13.000000000 +0200 >@@ -297,7 +297,7 @@ > #>+ 3 > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu po/Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/po/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit po/Makefile.in > Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status > cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) > >@@ -451,7 +451,6 @@ > # Otherwise a system limit (for SysV at least) may be exceeded. > .NOEXPORT: > >- > #>+ 2 > KDE_DIST=ru.gmo de.po de.gmo es.po es.gmo kid3.pot ru.po Makefile.in > >@@ -511,7 +510,7 @@ > force-reedit: > cd $(top_srcdir) && \ > $(AUTOMAKE) --gnu po/Makefile >- cd $(top_srcdir) && perl admin/am_edit -padmin kid3-0.7/po/Makefile.in >+ cd $(top_srcdir) && perl admin/am_edit po/Makefile.in > > > #>+ 21
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 138907
: 96127