Bug#659361: Info received ([Pkg-gtkpod-devel] Bug#659361: Reverting of mp4/m4a support (please add back))

2012-02-14 Thread Fabian Greffrath
forwarded 659361 
http://sourceforge.net/tracker/?func=detailaid=3487032group_id=67873atid=519275

thanks



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#659361: Reverting of mp4/m4a support (please add back)

2012-02-10 Thread Fabian Greffrath

Package: gtkpod
Version: 2.1.1-1
Severity: wishlist
Tags: patch

Am 10.02.2012 14:42, schrieb Fabian Greffrath:

What was the purpose of this plugin? I mean, isn't gtkpod able to
dlopen() libmp4v2 anyway and thus use it when it is there without
explicit linking? Was the reveerted plugin explicitely linked against
libmp4v2 and thus caused the infamous MPL-GPL license clash?


It seems that when filetype support got refactored into individual 
plugins, an if HAVE_MP4 conditional was added around the relevant 
code in the plugins/filetype_{m4a,mp4}/Makefile.am files. This caused 
the filetype support plugin to only get compiled when libmp4v2 was 
detected at configure time, instead of the unconditional attempt to 
try loading the library that was carried out when the code was still 
in libgtkpod/mp4file.c.


I have applied the attached patch to the gtkpod 2.1.1 Debian package 
(please note that I added just another SONAME, because the libmp4v2 
Debian package is already at 2), ran autoreconf and rebuilt it, all 
without libmp4v2-dev installed. The m4a and mp4 plugins were built 
fine and got installed into the resulting binary package:


$ dpkg -c ../gtkpod_2.1.1-1_i386.deb | egrep 'm4a|mp4'
-rw-r--r-- root/root 21108 2012-02-10 15:23 
./usr/lib/gtkpod/libfiletype_m4a.so
-rw-r--r-- root/root 20032 2012-02-10 15:23 
./usr/lib/gtkpod/libfiletype_mp4.so
-rw-r--r-- root/root   395 2012-02-10 15:23 
./usr/lib/gtkpod/filetype_m4a.plugin
-rw-r--r-- root/root   400 2012-02-10 15:23 
./usr/lib/gtkpod/filetype_mp4.plugin


I could install the gtkpod packages, start the application and 
explicitely activate the plugins in the corresponding preferences 
menu. I didn't test any further, though.


Please note that dh_shlibdeps gave warnings like dpkg-shlibdeps: 
warning: debian/gtkpod/usr/lib/gtkpod/libfiletype_m4a.so contains an 
unresolvable reference to symbol dlopen: it's probably a plugin. for 
both plugins, so maybe a line like libfiletype_{m4a,mp4}_la_LIBADD = 
-ldl should get added to the appropriate Makefile.am files.


Hope that helps,
Fabian

--- gtkpod-2.1.1.orig/plugins/filetype_m4a/Makefile.am
+++ gtkpod-2.1.1/plugins/filetype_m4a/Makefile.am
@@ -19,7 +19,7 @@ filetype_m4a_plugin_DATA =
 
 SUBDIRS =
 
-if HAVE_M4A
+#if HAVE_M4A
 
 include ../plugins.mk
 filetype_m4a.plugin: build-plugin-file
@@ -40,7 +40,7 @@ libfiletype_m4a_la_LIBADD = \
 $(GTKPOD_LIBS) \
 $(LIBANJUTA_LIBS)
 
-endif
+#endif
 
 EXTRA_DIST = \
 	$(plugin_file).in \
--- gtkpod-2.1.1.orig/plugins/filetype_m4a/mp4file.c
+++ gtkpod-2.1.1/plugins/filetype_m4a/mp4file.c
@@ -317,13 +317,17 @@ static MP4TagsFree_t MP4TagsFreeFunc = N
 /* mp4v2 initialization code */
 
 void mp4_init() {
-mp4v2_handle = dlopen(libmp4v2.so.1, RTLD_LAZY);
+mp4v2_handle = dlopen(libmp4v2.so.2, RTLD_LAZY);
 
 if (!mp4v2_handle) {
-mp4v2_handle = dlopen(libmp4v2.so.0, RTLD_LAZY);
+mp4v2_handle = dlopen(libmp4v2.so.1, RTLD_LAZY);
 
 if (!mp4v2_handle) {
-return;
+mp4v2_handle = dlopen(libmp4v2.so.0, RTLD_LAZY);
+
+if (!mp4v2_handle) {
+return;
+}
 }
 }
 
--- gtkpod-2.1.1.orig/plugins/filetype_mp4/Makefile.am
+++ gtkpod-2.1.1/plugins/filetype_mp4/Makefile.am
@@ -19,7 +19,7 @@ filetype_mp4_plugin_DATA =
 
 SUBDIRS =
 
-if HAVE_MP4
+#if HAVE_MP4
 
 include ../plugins.mk
 filetype_mp4.plugin: build-plugin-file
@@ -39,7 +39,7 @@ libfiletype_mp4_la_LIBADD = \
 $(GTKPOD_LIBS) \
 $(LIBANJUTA_LIBS)
 
-endif
+#endif
 
 EXTRA_DIST = \
 	$(plugin_file).in \
--- gtkpod-2.1.1.orig/plugins/filetype_mp4/mp4file.c
+++ gtkpod-2.1.1/plugins/filetype_mp4/mp4file.c
@@ -317,13 +317,17 @@ static MP4TagsFree_t MP4TagsFreeFunc = N
 /* mp4v2 initialization code */
 
 void mp4_init() {
-mp4v2_handle = dlopen(libmp4v2.so.1, RTLD_LAZY);
+mp4v2_handle = dlopen(libmp4v2.so.2, RTLD_LAZY);
 
 if (!mp4v2_handle) {
-mp4v2_handle = dlopen(libmp4v2.so.0, RTLD_LAZY);
+mp4v2_handle = dlopen(libmp4v2.so.1, RTLD_LAZY);
 
 if (!mp4v2_handle) {
-return;
+mp4v2_handle = dlopen(libmp4v2.so.0, RTLD_LAZY);
+
+if (!mp4v2_handle) {
+return;
+}
 }
 }
 



Bug#659361: [Pkg-gtkpod-devel] Bug#659361: Reverting of mp4/m4a support (please add back)

2012-02-10 Thread Matteo F. Vescovi

Hi!

On 10/02/2012 15:39, Fabian Greffrath wrote:

I have applied the attached patch to the gtkpod 2.1.1 Debian package
(please note that I added just another SONAME, because the libmp4v2
Debian package is already at 2), ran autoreconf and rebuilt it, all
without libmp4v2-dev installed. The m4a and mp4 plugins were built fine
and got installed into the resulting binary package:

$ dpkg -c ../gtkpod_2.1.1-1_i386.deb | egrep 'm4a|mp4'
-rw-r--r-- root/root 21108 2012-02-10 15:23
./usr/lib/gtkpod/libfiletype_m4a.so
-rw-r--r-- root/root 20032 2012-02-10 15:23
./usr/lib/gtkpod/libfiletype_mp4.so
-rw-r--r-- root/root 395 2012-02-10 15:23
./usr/lib/gtkpod/filetype_m4a.plugin
-rw-r--r-- root/root 400 2012-02-10 15:23
./usr/lib/gtkpod/filetype_mp4.plugin

I could install the gtkpod packages, start the application and
explicitely activate the plugins in the corresponding preferences menu.
I didn't test any further, though.

Please note that dh_shlibdeps gave warnings like dpkg-shlibdeps:
warning: debian/gtkpod/usr/lib/gtkpod/libfiletype_m4a.so contains an
unresolvable reference to symbol dlopen: it's probably a plugin. for
both plugins, so maybe a line like libfiletype_{m4a,mp4}_la_LIBADD =
-ldl should get added to the appropriate Makefile.am files.

Hope that helps,
Fabian


Your efforts are really appreciated! :-)

I will test and apply your patch as soon as I find some free time. Maybe 
in the weekend, already.
Once all the changes have been made and checked, I'll ask my sponsor to 
upload the new revision.


Thanks a lot.

Cheers.

--
Matteo F. Vescovi
Debian Sponsored Maintainer
GnuPG KeyID: 83B2CF7A



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#659361: [Pkg-gtkpod-devel] Bug#659361: Reverting of mp4/m4a support (please add back)

2012-02-10 Thread Fabian Greffrath

Am 10.02.2012 16:28, schrieb Matteo F. Vescovi:

I will test and apply your patch as soon as I find some free time.
Maybe in the weekend, already.


Please note that the configure script is currently missing a check for 
dlopen(), which might become a serious portability issue. Such a check 
should get added and then the conditional for building the m4a/mp4 
file format plugins should get changed from if HAVE_MP4 to if 
HAVE_DLOPEN or similar.


I would add this myself, but my autoconf-foo is not good enough. :/

 - Fabian



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org