Index: Makefile =================================================================== --- Makefile (revision 304158) +++ Makefile (working copy) @@ -23,7 +23,7 @@ OPTIONS= GCONF "Use Gconf to store preferences" of GNU_CONFIGURE= yes USE_GETTEXT= yes USE_GNOME= glib20 pkgconfig -USE_GECKO= libxul19 +USE_GECKO= libxul libxul19 USE_WEBPLUGINS= native WEBPLUGINS_FILES= ${PORTNAME}-dvx.so ${PORTNAME}-qt.so ${PORTNAME}-rm.so \ ${PORTNAME}-wmp.so ${PORTNAME}.so @@ -35,6 +35,10 @@ PORTDOCS= README COPYING AUTHORS ChangeLog INSTALL .include +.if ${GECKO}=="libxul" +EXTRA_PATCHES= ${FILESDIR}/libxul.patch +.endif + .if defined(WITH_GCONF) USE_GNOME+= gconf2 CONFIGURE_ARGS+= --with-gconf Index: files/libxul.patch =================================================================== --- files/libxul.patch (revision 0) +++ files/libxul.patch (working copy) @@ -0,0 +1,157 @@ +--- src/npupp.h.orig 2010-06-24 14:17:36.000000000 -0400 ++++ src/npupp.h 2012-09-12 14:23:32.000000000 -0400 +@@ -684,7 +684,7 @@ + + NPError OSCALL NP_Shutdown(); + +- char *NP_GetMIMEDescription(); ++ const char *NP_GetMIMEDescription(); + + #ifdef __cplusplus + } +@@ -700,7 +700,7 @@ + + /* plugin meta member functions */ + +- NP_EXPORT(char *) NP_GetMIMEDescription(void); ++ NP_EXPORT(const char *) NP_GetMIMEDescription(void); + NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs *, NPPluginFuncs *); + NP_EXPORT(NPError) NP_Shutdown(void); + NP_EXPORT(NPError) NP_GetValue(void *future, NPPVariable aVariable, void *aValue); +--- src/np_entry.cpp.orig 2010-02-01 14:24:29.000000000 -0500 ++++ src/np_entry.cpp 2012-09-12 14:28:53.000000000 -0400 +@@ -80,9 +80,9 @@ + + #endif /* XP_WIN */ + +-char *NPP_GetMIMEDescription(); ++const char *NPP_GetMIMEDescription(); + +-char *NP_GetMIMEDescription() ++const char *NP_GetMIMEDescription() + { + return NPP_GetMIMEDescription(); + } +@@ -175,7 +175,7 @@ + pluginFuncs->javaClass = NPP_GetJavaClass(); + #endif + +- NPP_Initialize(); ++ // NPP_Initialize(); + #endif + + return NPERR_NO_ERROR; +--- src/npp_gate.cpp.orig 2010-02-01 14:24:29.000000000 -0500 ++++ src/npp_gate.cpp 2012-09-12 14:20:55.000000000 -0400 +@@ -44,7 +44,7 @@ + #include "plugin_types.h" + #include "plugin_setup.h" + +-char *NPP_GetMIMEDescription(void) ++const char *NPP_GetMIMEDescription(void) + { + return GetMIMEDescription(); + } +--- src/plugin.cpp.orig 2010-11-05 12:12:59.000000000 -0400 ++++ src/plugin.cpp 2012-09-12 14:31:51.000000000 -0400 +@@ -47,8 +47,6 @@ + #include + #include + +-nsIPrefBranch *prefBranch = NULL; +-nsIPrefService *prefService = NULL; + static NPObject *sWindowObj; + + //#include "nsIServiceManager.h" +@@ -179,82 +177,7 @@ + g_free(jscript); + } + +-void setPreference(CPlugin * instance, const gchar * name, const gchar * value) +-{ +- nsIServiceManager *sm = NULL; +- nsIServiceManager *ServiceManager = NULL; +- PRBool v; +- void (*get_sm)(nsIServiceManager**); +- +- get_sm = (void (*)(nsIServiceManager**))dlsym(RTLD_DEFAULT,"NS_GetServiceManager"); +- if (get_sm) { +- (*get_sm)(&sm); +- } else { +- NPN_GetValue(NULL, NPNVserviceManager, &sm); +- } +- +- if (sm) { +- sm->QueryInterface(NS_GET_IID(nsIServiceManager), (void **) (&ServiceManager)); +- NS_RELEASE(sm); +- } +- +- if (ServiceManager) { +- ServiceManager->GetServiceByContractID(NS_PREFSERVICE_CONTRACTID, NS_GET_IID(nsIPrefBranch), +- (void **) &prefBranch); +- if (prefBranch) { +- instance->user_agent = g_new0(gchar, 1024); +- prefBranch->PrefHasUserValue(name, &v); +- if (v) { +- prefBranch->GetCharPref(name, &(instance->user_agent)); +- prefBranch->ClearUserPref(name); +- } +- prefBranch->SetCharPref(name, value); +- printf("Set preference %s to %s, old value was '%s'\n", name, value, +- instance->user_agent); +- } +- NS_RELEASE(ServiceManager); +- } +- +-} + +-void clearPreference(CPlugin * instance, const gchar * name) +-{ +- nsIServiceManager *sm = NULL; +- nsIServiceManager *ServiceManager = NULL; +- PRBool v; +- void (*get_sm)(nsIServiceManager**); +- +- get_sm = (void (*)(nsIServiceManager**))dlsym(RTLD_DEFAULT,"NS_GetServiceManager"); +- if (get_sm) { +- (*get_sm)(&sm); +- } else { +- NPN_GetValue(NULL, NPNVserviceManager, &sm); +- } +- +- if (sm) { +- sm->QueryInterface(NS_GET_IID(nsIServiceManager), (void **) (&ServiceManager)); +- NS_RELEASE(sm); +- } +- +- if (ServiceManager) { +- ServiceManager->GetServiceByContractID(NS_PREFSERVICE_CONTRACTID, NS_GET_IID(nsIPrefBranch), +- (void **) &prefBranch); +- if (prefBranch) { +- if (instance->user_agent == NULL || strlen(instance->user_agent) == 0) { +- prefBranch->ClearUserPref(name); +- } else { +- if (g_strrstr(instance->user_agent, "QuickTime/7.6.4")) { +- prefBranch->ClearUserPref(name); +- } else { +- prefBranch->ClearUserPref(name); +- prefBranch->SetCharPref(name, instance->user_agent); +- } +- } +- g_free(instance->user_agent); +- } +- NS_RELEASE(ServiceManager); +- } +-} + + //////////////////////////////////////// + // +@@ -441,7 +364,7 @@ + NS_IF_RELEASE(mControlsScriptablePeer); + } + */ +- clearPreference(this, "general.useragent.override"); ++ // clearPreference(this, "general.useragent.override"); + + if (m_pScriptableObjectControls) { + NPN_ReleaseObject(m_pScriptableObjectControls);