aboutsummaryrefslogtreecommitdiffstats
path: root/www/galeon
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2003-04-08 11:58:13 +0800
committermarcus <marcus@FreeBSD.org>2003-04-08 11:58:13 +0800
commit1959594c04f756f53e25d110b9dc591b1feeb9c1 (patch)
treecb19c679f95dc1fc999c3750167d8320370b16f0 /www/galeon
parent249943f398a6266e25eb31ab448e7cdd1d0dd58a (diff)
downloadfreebsd-ports-gnome-1959594c04f756f53e25d110b9dc591b1feeb9c1.tar.gz
freebsd-ports-gnome-1959594c04f756f53e25d110b9dc591b1feeb9c1.tar.zst
freebsd-ports-gnome-1959594c04f756f53e25d110b9dc591b1feeb9c1.zip
Fix build with mozilla-1.4a.
Diffstat (limited to 'www/galeon')
-rw-r--r--www/galeon/files/patch-configure20
-rw-r--r--www/galeon/files/patch-src_mozilla_GaleonWrapper.cpp74
-rw-r--r--www/galeon/files/patch-src_mozilla_GaleonWrapper.h11
-rw-r--r--www/galeon/files/patch-src_mozilla_Makefile.in11
-rw-r--r--www/galeon/files/patch-src_mozilla_mozilla.cpp335
-rw-r--r--www/galeon/files/patch-src_mozilla_mozilla.h22
6 files changed, 466 insertions, 7 deletions
diff --git a/www/galeon/files/patch-configure b/www/galeon/files/patch-configure
index 86df3c00edd7..ce5a59c2d1e7 100644
--- a/www/galeon/files/patch-configure
+++ b/www/galeon/files/patch-configure
@@ -1,13 +1,19 @@
-
-$FreeBSD$
-
---- configure.orig Thu Apr 25 21:02:26 2002
-+++ configure Thu Apr 25 21:03:14 2002
-@@ -5434,6 +5434,7 @@
+--- configure.orig Mon Mar 17 15:31:41 2003
++++ configure Mon Apr 7 23:32:37 2003
+@@ -7950,6 +7950,7 @@
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+$ac_aux_dir/ltconfig $LIBTOOL_DEPS
# Always use our own libtool.
- LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+@@ -12535,7 +12536,7 @@
+ elif test "$_moz_snap" = "1.3b" ; then
+ MOZILLA_SNAPSHOT=5
+ elif test "$_moz_snap" = "trunk" ; then
+- MOZILLA_SNAPSHOT=6
++ MOZILLA_SNAPSHOT=7
+ else
+ MOZILLA_SNAPSHOT=3
+ fi
diff --git a/www/galeon/files/patch-src_mozilla_GaleonWrapper.cpp b/www/galeon/files/patch-src_mozilla_GaleonWrapper.cpp
new file mode 100644
index 000000000000..c47b8983f2bb
--- /dev/null
+++ b/www/galeon/files/patch-src_mozilla_GaleonWrapper.cpp
@@ -0,0 +1,74 @@
+--- src/mozilla/GaleonWrapper.cpp.orig Mon Apr 7 23:44:37 2003
++++ src/mozilla/GaleonWrapper.cpp Mon Apr 7 23:44:44 2003
+@@ -739,16 +739,24 @@
+
+ nsCOMPtr<nsIDOMDocument> aDOMDocument;
+
+- result = GetDOMDocument (getter_AddRefs(aDOMDocument));
++ result = GetDOMDocument(getter_AddRefs(aDOMDocument));
+ if (NS_FAILED(result) || !aDOMDocument) return NS_ERROR_FAILURE;
+
+ nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDOMDocument);
+- if(!doc) return NS_ERROR_FAILURE;
++ if (!doc) return NS_ERROR_FAILURE;
++
++#if MOZILLA_SNAPSHOT > 6
++ nsString docTitle;
++ result = doc->GetDocumentTitle(docTitle);
++ if (NS_FAILED(result)) return NS_ERROR_FAILURE;
+
++ *title = mozilla_unicode_to_locale(docTitle.get());
++#else
+ const nsString* t;
+ t = doc->GetDocumentTitle();
+
+- *title = mozilla_unicode_to_locale (t->get());
++ *title = mozilla_unicode_to_locale(t->get());
++#endif
+
+ return NS_OK;
+ }
+@@ -815,30 +823,35 @@
+ }
+
+
+-nsresult GaleonWrapper::SetSitePermission (gboolean block, PRInt32 type)
++nsresult GaleonWrapper::SetSitePermission (PRBool allow, PRUint32 type)
+ {
+ nsresult result;
+
+ nsCOMPtr<nsIDOMDocument> DOMDocument;
+- result = GetDOMDocument (getter_AddRefs(DOMDocument));
++ result = GetDOMDocument(getter_AddRefs(DOMDocument));
+ if (NS_FAILED(result) || !DOMDocument) return NS_ERROR_FAILURE;
+
+- nsCOMPtr<nsIDocument> doc = do_QueryInterface (DOMDocument);
++ nsCOMPtr<nsIDocument> doc = do_QueryInterface(DOMDocument);
+ if (!doc) return NS_ERROR_FAILURE;
+
+ nsCOMPtr<nsIURI> uri;
+ doc->GetDocumentURL(getter_AddRefs(uri));
+
+ nsCAutoString url;
+- uri->GetSpec (url);
++ uri->GetSpec(url);
+
+ nsCOMPtr<nsIPermissionManager> permissionManager =
+- do_CreateInstance (NS_PERMISSIONMANAGER_CONTRACTID);
++ do_GetService(NS_PERMISSIONMANAGER_CONTRACTID);
+
+-#if MOZILLA_SNAPSHOT > 2
+- result = permissionManager->Add (url, block ? PR_TRUE : PR_FALSE, type);
++#if MOZILLA_SNAPSHOT > 6
++ result = permissionManager->Add(uri, type,
++ allow ?
++ static_cast<PRUint32>(nsIPermissionManager::ALLOW_ACTION) :
++ static_cast<PRUint32>(nsIPermissionManager::DENY_ACTION));
++#elif MOZILLA_SNAPSHOT > 2
++ result = permissionManager->Add (url, allow, type);
+ #else
+- result = permissionManager->Add (url.get(), block ? PR_TRUE : PR_FALSE, type);
++ result = permissionManager->Add (url.get(), allow, type);
+ #endif
+
+ return result;
diff --git a/www/galeon/files/patch-src_mozilla_GaleonWrapper.h b/www/galeon/files/patch-src_mozilla_GaleonWrapper.h
new file mode 100644
index 000000000000..2cc37fe00365
--- /dev/null
+++ b/www/galeon/files/patch-src_mozilla_GaleonWrapper.h
@@ -0,0 +1,11 @@
+--- src/mozilla/GaleonWrapper.h.orig Mon Apr 7 23:45:09 2003
++++ src/mozilla/GaleonWrapper.h Mon Apr 7 23:45:14 2003
+@@ -80,7 +80,7 @@
+
+ nsresult GoToHistoryIndex (PRInt16 index);
+
+- nsresult SetSitePermission( PRBool permission, PRInt32 type );
++ nsresult SetSitePermission( PRBool permission, PRUint32 type );
+
+ nsresult ForceCharacterSet (char *charset);
+
diff --git a/www/galeon/files/patch-src_mozilla_Makefile.in b/www/galeon/files/patch-src_mozilla_Makefile.in
new file mode 100644
index 000000000000..ba8e03f44074
--- /dev/null
+++ b/www/galeon/files/patch-src_mozilla_Makefile.in
@@ -0,0 +1,11 @@
+--- src/mozilla/Makefile.in.orig Mon Apr 7 23:35:27 2003
++++ src/mozilla/Makefile.in Mon Apr 7 23:35:37 2003
+@@ -277,7 +277,7 @@
+ $(GALEON_DEPENDENCY_CFLAGS) \
+ -DLIB_DIR=\"$(pkglibdir)\" \
+ -DSHARE_DIR=\"$(pkgdatadir)\" \
+- -DNEW_H=\<new\>
++ -include $(MOZILLA_INCLUDE_ROOT)/mozilla-config.h
+
+
+ libgaleon_xpcom_la_LIBADD = $(GALEON_XPCOM_DEPENDENCY_LIBS) \
diff --git a/www/galeon/files/patch-src_mozilla_mozilla.cpp b/www/galeon/files/patch-src_mozilla_mozilla.cpp
new file mode 100644
index 000000000000..8991f6853ae3
--- /dev/null
+++ b/www/galeon/files/patch-src_mozilla_mozilla.cpp
@@ -0,0 +1,335 @@
+--- src/mozilla/mozilla.cpp.orig Mon Apr 7 23:44:18 2003
++++ src/mozilla/mozilla.cpp Mon Apr 7 23:44:29 2003
+@@ -1041,17 +1041,17 @@
+ * mozilla_list_cookies: get a list of all saved cookies
+ */
+ extern "C" GList *
+-mozilla_list_cookies (void)
++mozilla_list_cookies(void)
+ {
+ GList *cookies = NULL;
+ nsresult result;
+
+ nsCOMPtr<nsICookieManager> cookieManager =
+- do_CreateInstance (NS_COOKIEMANAGER_CONTRACTID);
++ do_GetService(NS_COOKIEMANAGER_CONTRACTID);
+ nsCOMPtr<nsISimpleEnumerator> cookieEnumerator;
+ result =
+- cookieManager->GetEnumerator (getter_AddRefs(cookieEnumerator));
+- g_return_val_if_fail (NS_SUCCEEDED(result), NULL);
++ cookieManager->GetEnumerator(getter_AddRefs(cookieEnumerator));
++ g_return_val_if_fail(NS_SUCCEEDED(result), NULL);
+ PRBool enumResult;
+ for (cookieEnumerator->HasMoreElements(&enumResult) ;
+ enumResult == PR_TRUE ;
+@@ -1060,39 +1060,39 @@
+ Cookie *c;
+
+ nsCOMPtr<nsICookie> nsCookie;
+- result = cookieEnumerator->GetNext (getter_AddRefs(nsCookie));
+- g_return_val_if_fail (NS_SUCCEEDED(result), NULL);
++ result = cookieEnumerator->GetNext(getter_AddRefs(nsCookie));
++ g_return_val_if_fail(NS_SUCCEEDED(result), NULL);
+
+- c = g_new0 (Cookie, 1);
++ c = g_new0(Cookie, 1);
+
+ nsCAutoString transfer;
+
+- nsCookie->GetHost (transfer);
+- c->base.domain = g_strdup (transfer.get());
+- nsCookie->GetName (transfer);
+- c->name = g_strdup (transfer.get());
+- nsCookie->GetValue (transfer);
+- c->value = g_strdup (transfer.get());
+- nsCookie->GetPath (transfer);
+- c->path = g_strdup (transfer.get());
++ nsCookie->GetHost(transfer);
++ c->base.domain = g_strdup(transfer.get());
++ nsCookie->GetName(transfer);
++ c->name = g_strdup(transfer.get());
++ nsCookie->GetValue(transfer);
++ c->value = g_strdup(transfer.get());
++ nsCookie->GetPath(transfer);
++ c->path = g_strdup(transfer.get());
+
+ PRBool isSecure;
+- nsCookie->GetIsSecure (&isSecure);
++ nsCookie->GetIsSecure(&isSecure);
+ if (isSecure == PR_TRUE)
+- c->secure = g_strdup (_("Yes"));
++ c->secure = g_strdup(_("Yes"));
+ else
+- c->secure = g_strdup (_("No"));
++ c->secure = g_strdup(_("No"));
+
+ PRUint64 dateTime;
+- nsCookie->GetExpires (&dateTime);
++ nsCookie->GetExpires(&dateTime);
+ if(dateTime == 0)
+- c->expire = g_strdup (_("End of current session"));
++ c->expire = g_strdup(_("End of current session"));
+ else
+- c->expire = g_strdup_printf ("%s",ctime((time_t*)&dateTime));
++ c->expire = g_strdup_printf("%s",ctime((time_t*)&dateTime));
+
+- cookies = g_list_prepend (cookies, c);
++ cookies = g_list_prepend(cookies, c);
+ }
+- cookies = g_list_reverse (cookies);
++ cookies = g_list_reverse(cookies);
+ return cookies;
+ }
+
+@@ -1102,16 +1102,16 @@
+ */
+
+ extern "C" GList *
+-mozilla_get_permissions (int type)
++mozilla_get_permissions (guint type)
+ {
+ GList *permissions = NULL;
+ nsresult result;
+ nsCOMPtr<nsIPermissionManager> permissionManager =
+- do_CreateInstance (NS_PERMISSIONMANAGER_CONTRACTID);
++ do_GetService(NS_PERMISSIONMANAGER_CONTRACTID);
+ nsCOMPtr<nsISimpleEnumerator> permissionEnumerator;
+ result = permissionManager->
+- GetEnumerator (getter_AddRefs(permissionEnumerator));
+- g_return_val_if_fail (NS_SUCCEEDED(result), NULL);
++ GetEnumerator(getter_AddRefs(permissionEnumerator));
++ g_return_val_if_fail(NS_SUCCEEDED(result), NULL);
+ PRBool enumResult;
+ for (permissionEnumerator->HasMoreElements(&enumResult) ;
+ enumResult == PR_TRUE ;
+@@ -1119,32 +1119,50 @@
+ {
+ nsCOMPtr<nsIPermission> nsPermission;
+ result = permissionEnumerator->
+- GetNext (getter_AddRefs(nsPermission));
+- g_return_val_if_fail (NS_SUCCEEDED(result), NULL);
++ GetNext(getter_AddRefs(nsPermission));
++ g_return_val_if_fail(NS_SUCCEEDED(result), NULL);
+
++#if MOZILLA_SNAPSHOT > 6
++ PRUint32 cType;
++#else
+ PRInt32 cType;
+- nsPermission->GetType (&cType);
++#endif
++ nsPermission->GetType(&cType);
+ if (cType == type)
+ {
+- BlockedHost *b = g_new0 (BlockedHost, 1);
+- gchar *tmp = NULL;
++ BlockedHost *b = g_new0(BlockedHost, 1);
+
+- nsPermission->GetHost (&tmp);
+- b->domain = g_strdup (tmp);
+- nsMemory::Free (tmp);
++#if MOZILLA_SNAPSHOT > 6
++ nsCString host;
++ nsPermission->GetHost(host);
++ b->domain = g_strdup(host.get());
++
++ PRUint32 cap;
++ nsPermission->GetCapability(&cap);
++ if (cap == nsIPermissionManager::ALLOW_ACTION)
++ b->type = g_strdup(_("Allowed"));
++ else if (cap == nsIPermissionManager::DENY_ACTION)
++ b->type = g_strdup(_("Blocked"));
++ else
++ b->type = g_strdup(_("Unknown"));
++#else
++ nsXPIDLCString host;
++ nsPermission->GetHost(getter_Copies(host));
++ b->domain = g_strdup(host.get());
+
+ PRBool cap;
+- nsPermission->GetCapability (&cap);
+- if (cap == PR_TRUE)
+- b->type = g_strdup (_("Allowed"));
+- else
+- b->type = g_strdup (_("Blocked"));
++ nsPermission->GetCapability(&cap);
++ if (cap == PR_TRUE)
++ b->type = g_strdup(_("Allowed"));
++ else
++ b->type = g_strdup(_("Blocked"));
++#endif
+
+- permissions = g_list_prepend (permissions, b);
++ permissions = g_list_prepend(permissions, b);
+ }
+ }
+
+- permissions = g_list_reverse (permissions);
++ permissions = g_list_reverse(permissions);
+ return permissions;
+ };
+
+@@ -1152,16 +1170,25 @@
+ * mozilla_set_url_permission: change permissions for a URL
+ */
+ extern "C" void
+-mozilla_set_url_permission (const char *imgURL, gint type, gboolean allow)
++mozilla_set_url_permission(const char *imgURL, guint type, gboolean allow)
+ {
+ nsCOMPtr<nsIPermissionManager> permissionManager =
+- do_CreateInstance (NS_PERMISSIONMANAGER_CONTRACTID);
++ do_GetService(NS_PERMISSIONMANAGER_CONTRACTID);
+
+-#if MOZILLA_SNAPSHOT > 2
+- permissionManager->Add (nsDependentCString(imgURL),
+- allow ? PR_TRUE : PR_FALSE, type);
++#if MOZILLA_SNAPSHOT > 6
++ nsCOMPtr<nsIURI> url;
++ nsresult result = NS_NewURI(getter_AddRefs(url), nsDependentCString(imgURL));
++ if(NS_FAILED(result) || !url) return;
++
++ permissionManager->Add(url, type,
++ allow ?
++ static_cast<PRUint32>(nsIPermissionManager::ALLOW_ACTION) :
++ static_cast<PRUint32>(nsIPermissionManager::DENY_ACTION));
++#elif MOZILLA_SNAPSHOT > 2
++ permissionManager->Add(nsDependentCString(imgURL),
++ allow ? PR_TRUE : PR_FALSE, type);
+ #else
+- permissionManager->Add (imgURL, allow ? PR_TRUE : PR_FALSE, type);
++ permissionManager->Add(imgURL, allow ? PR_TRUE : PR_FALSE, type);
+ #endif
+ }
+
+@@ -1172,10 +1199,10 @@
+ */
+
+ extern "C" void
+-mozilla_set_permission (GaleonEmbed *embed, gboolean permit, int type)
++mozilla_set_permission(GaleonEmbed *embed, gboolean allow, guint type)
+ {
+ GALEON_WRAPPER(wrapper)
+- wrapper->SetSitePermission (permit ? PR_TRUE : PR_FALSE, type);
++ wrapper->SetSitePermission(allow ? PR_TRUE : PR_FALSE, type);
+ }
+
+ /**
+@@ -1188,17 +1215,17 @@
+ {
+ nsresult result;
+ nsCOMPtr<nsICookieManager> cookieManager =
+- do_CreateInstance (NS_COOKIEMANAGER_CONTRACTID);
++ do_GetService(NS_COOKIEMANAGER_CONTRACTID);
+
+ for (GList *cookies = g_list_first(gone) ; cookies!=NULL ;
+ cookies = g_list_next(cookies))
+ {
+ Cookie *c = (Cookie *)cookies->data;
+
+- result = cookieManager->Remove (NS_LITERAL_CSTRING(c->base.domain),
+- NS_LITERAL_CSTRING(c->name),
+- NS_LITERAL_CSTRING(c->path),
+- block ? PR_TRUE : PR_FALSE);
++ result = cookieManager->Remove(nsDependentCString(c->base.domain),
++ nsDependentCString(c->name),
++ nsDependentCString(c->path),
++ block ? PR_TRUE : PR_FALSE);
+ if (NS_FAILED(result)) return FALSE;
+ };
+ return TRUE;
+@@ -1210,21 +1237,21 @@
+ * @type: type of permissions ( cookies or images )
+ */
+ extern "C" gboolean
+-mozilla_remove_permissions (GList *gone, int type)
++mozilla_remove_permissions (GList *gone, guint type)
+ {
+ nsresult result;
+ nsCOMPtr<nsIPermissionManager> permissionManager =
+- do_CreateInstance (NS_PERMISSIONMANAGER_CONTRACTID);
++ do_GetService(NS_PERMISSIONMANAGER_CONTRACTID);
+
+ for (GList *permissions = g_list_first(gone) ; permissions != NULL;
+ permissions = g_list_next(permissions))
+ {
+ BlockedHost *b = (BlockedHost *)permissions->data;
+ #if MOZILLA_SNAPSHOT > 2
+- result = permissionManager->Remove (nsDependentCString(b->domain),
+- type);
++ result = permissionManager->Remove(nsDependentCString(b->domain),
++ type);
+ #else
+- result = permissionManager->Remove (b->domain,type);
++ result = permissionManager->Remove(b->domain,type);
+ #endif
+ if (NS_FAILED(result)) return FALSE;
+ };
+@@ -1374,7 +1401,7 @@
+ nsresult result = NS_ERROR_FAILURE;
+
+ nsCOMPtr<nsIPasswordManager> passwordManager =
+- do_CreateInstance (NS_PASSWORDMANAGER_CONTRACTID);
++ do_GetService(NS_PASSWORDMANAGER_CONTRACTID);
+ nsCOMPtr<nsISimpleEnumerator> passwordEnumerator;
+ if (type == PASSWORD_PASSWORD)
+ result = passwordManager->GetEnumerator
+@@ -1392,24 +1419,24 @@
+ nsCOMPtr<nsIPassword> nsPassword;
+ result = passwordEnumerator->GetNext
+ (getter_AddRefs(nsPassword));
+- g_return_val_if_fail (NS_SUCCEEDED(result), NULL);
++ g_return_val_if_fail(NS_SUCCEEDED(result), NULL);
+
+- Password *p = g_new0 (Password, 1);
++ Password *p = g_new0(Password, 1);
+
+ nsCAutoString transfer;
+- nsPassword->GetHost (transfer);
+- p->host = g_strdup (transfer.get());
++ nsPassword->GetHost(transfer);
++ p->host = g_strdup(transfer.get());
+
+ if (type == PASSWORD_PASSWORD)
+ {
+ nsAutoString unicodeName;
+- nsPassword->GetUser (unicodeName);
+- p->username = mozilla_unicode_to_locale (unicodeName.get());
++ nsPassword->GetUser(unicodeName);
++ p->username = mozilla_unicode_to_locale(unicodeName.get());
+ }
+
+- passwords = g_list_prepend (passwords, p);
++ passwords = g_list_prepend(passwords, p);
+ }
+- passwords = g_list_reverse (passwords);
++ passwords = g_list_reverse(passwords);
+ return passwords;
+ }
+
+@@ -1423,7 +1450,7 @@
+ {
+ nsresult result = NS_ERROR_FAILURE;
+ nsCOMPtr<nsIPasswordManager> passwordManager =
+- do_CreateInstance (NS_PASSWORDMANAGER_CONTRACTID);
++ do_GetService(NS_PASSWORDMANAGER_CONTRACTID);
+
+ for (GList *passwords = g_list_first(gone) ; passwords!=NULL ;
+ passwords = g_list_next(passwords))
+@@ -1435,14 +1462,14 @@
+ (p->username);
+
+ nsDependentString unicodeString(unicodeName);
+- result = passwordManager->RemoveUser (NS_LITERAL_CSTRING(p->host),
+- unicodeString);
+- g_free (unicodeName);
++ result = passwordManager->RemoveUser(nsDependentCString(p->host),
++ unicodeString);
++ g_free(unicodeName);
+ }
+ else if (type == PASSWORD_REJECT)
+ {
+ result = passwordManager->RemoveReject
+- (NS_LITERAL_CSTRING(p->host));
++ (nsDependentCString(p->host));
+ };
+
+ if (NS_FAILED(result)) return FALSE;
diff --git a/www/galeon/files/patch-src_mozilla_mozilla.h b/www/galeon/files/patch-src_mozilla_mozilla.h
new file mode 100644
index 000000000000..ef0ffb2552d2
--- /dev/null
+++ b/www/galeon/files/patch-src_mozilla_mozilla.h
@@ -0,0 +1,22 @@
+--- src/mozilla/mozilla.h.orig Mon Apr 7 23:44:55 2003
++++ src/mozilla/mozilla.h Mon Apr 7 23:45:01 2003
+@@ -256,14 +256,14 @@
+ char *force_character_set);
+
+ /* Cookies manager */
+-void mozilla_set_url_permission (const gchar *imgURL, gint type,
++void mozilla_set_url_permission (const gchar *imgURL, guint type,
+ gboolean allow);
+ GList *mozilla_list_cookies (void);
+-void mozilla_set_permission (GaleonEmbed *embed, gboolean permit,
+- int type);
+-GList *mozilla_get_permissions (int type);
++void mozilla_set_permission (GaleonEmbed *embed, gboolean allow,
++ guint type);
++GList *mozilla_get_permissions (guint type);
+ gboolean mozilla_remove_cookies (GList *gone, gboolean block);
+-gboolean mozilla_remove_permissions (GList *gone, int type);
++gboolean mozilla_remove_permissions (GList *gone, guint type);
+
+ /* Password Manager */
+ GList *mozilla_list_passwords (PasswordType type);