[RFC][icedtea-web] Patch to enable compilation of icedtea-web on both xulrunners apis

Danesh Dadachanji ddadacha at redhat.com
Tue Mar 13 14:26:13 PDT 2012


On 20/12/11 11:26 AM, Deepak Bhole wrote:
> * Jiri Vanek<jvanek at redhat.com>  [2011-12-20 10:58]:
>> On 12/19/2011 05:43 PM, Deepak Bhole wrote:
>>> * Jiri Vanek<jvanek at redhat.com>   [2011-12-15 05:43]:
>>>> 2011-12-15  Jiri Vanek<jvanek at redhat.com>
>>>>
>>>> 	* acinclude.m4: added definition of IT_CHECK_XULLRUNNER_API_VERSION,
>>>> 	which tryes to compile small program against new xulrunner api
>>>> 	* configure.ac: added call of IT_CHECK_XULLRUNNER_API_VERSION
>>>> 	* plugin/icedteanp/IcedTeaNPPlugin.cc: (NP_GetMIMEDescription)
>>>> 	return type set-up by dependecy on defined LEGACY_XULRUNNERAPI.
>>>> 	 This one is seted by IT_CHECK_XULLRUNNER_API_VERSION during configure.
>>>> 	if defined, then old char* is used. New const char* is used otherwise.
>>>>
>>>>

[snip]

Hey Jiri,

I built icedtea6-1.9 recently, since it still has the old netx code, it 
builds with the same error.

I'm not too sure if we want to backport this to 6-1.9 considering how 
large a change it is but it will completely break the build with any 
updated xulrunner. What do you think?

Cheers,
Danesh

>> diff -r fb5e54f2b97e ChangeLog
>> --- a/ChangeLog	Thu Dec 08 16:01:06 2011 -0500
>> +++ b/ChangeLog	Thu Dec 20 11:37:31 2011 +0100
>> @@ -1,3 +1,13 @@
>> +2011-12-20  Jiri Vanek<jvanek at redhat.com>
>> +
>> +	* acinclude.m4: added definition of IT_CHECK_XULRUNNER_API_VERSION,
>> +	which tries to compile small program against new xulrunner api
>> +	* configure.ac: added call of IT_CHECK_XULRUNNER_API_VERSION
>> +	* plugin/icedteanp/IcedTeaNPPlugin.cc: (NP_GetMIMEDescription)
>> +	return type set-up by dependency on defined LEGACY_XULRUNNERAPI.
>> +	 This one is set by IT_CHECK_XULRUNNER_API_VERSION during configure.
>> +	if defined, then old char* is used. New const char* is used otherwise.
>> +
>>   2011-12-08  Omair Majid<omajid at redhat.com>
>>
>>   	* netx/net/sourceforge/jnlp/Launcher.java
>> diff -r fb5e54f2b97e acinclude.m4
>> --- a/acinclude.m4	Thu Dec 08 16:01:06 2011 -0500
>> +++ b/acinclude.m4	Thu Dec 20 11:37:31 2011 +0100
>> @@ -495,6 +495,26 @@
>>      PKG_CHECK_MODULES([GLIB2_V_216],[glib-2.0>= 2.16],[],[AC_DEFINE([LEGACY_GLIB])])
>>    ])
>>
>> +AC_DEFUN_ONCE([IT_CHECK_XULRUNNER_API_VERSION],
>> +[
>> +  AC_MSG_CHECKING([for legacy xulrunner api])
>> +  AC_LANG_PUSH(C++)
>> +  CXXFLAGS_BACKUP=$CXXFLAGS
>> +  CXXFLAGS=$CXXFLAGS" "$MOZILLA_CFLAGS
>> +  AC_TRY_COMPILE([
>> +    #include<npfunctions.h>
>> +    const  char* NP_GetMIMEDescription ()
>> +    {return (char*) "yap!";}
>> +  ],[],[
>> +    AC_MSG_RESULT(no)
>> +  ],[
>> +    AC_MSG_RESULT(yes)
>> +    AC_DEFINE([LEGACY_XULRUNNERAPI])
>> +  ])
>> +  CXXFLAGS=$CXXFLAGS_BACKUP
>> +  AC_LANG_POP(C++)
>> +])
>> +
>>   AC_DEFUN([IT_CHECK_WITH_GCJ],
>>   [
>>     AC_MSG_CHECKING([whether to compile ecj natively])
>> diff -r fb5e54f2b97e configure.ac
>> --- a/configure.ac	Thu Dec 08 16:01:06 2011 -0500
>> +++ b/configure.ac	Thu Dec 20 11:37:31 2011 +0100
>> @@ -81,6 +81,7 @@
>>   IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, [sun.applet.AppletImageRef])
>>   IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE
>>   IT_CHECK_GLIB_VERSION
>> +IT_CHECK_XULRUNNER_API_VERSION
>>
>>   #
>>   # Find optional depedencies
>> diff -r fb5e54f2b97e plugin/icedteanp/IcedTeaNPPlugin.cc
>> --- a/plugin/icedteanp/IcedTeaNPPlugin.cc	Thu Dec 08 16:01:06 2011 -0500
>> +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc	Thu Dec 20 11:37:31 2011 +0100
>> @@ -2291,7 +2291,11 @@
>>
>>   // Returns a string describing the MIME type that this plugin
>>   // handles.
>> +#ifdef LEGACY_XULRUNNERAPI
>>    char*
>> +#else
>> +  const char*
>> +#endif
>>   NP_GetMIMEDescription ()
>>   {
>>     PLUGIN_DEBUG ("NP_GetMIMEDescription\n");
>



More information about the distro-pkg-dev mailing list