Package-Name: seamonkey
Gentoo-Package: www-client/seamonkey
Requires: Xorg expat jpeg libpng gtk+ libIDL zip pkgconfig
Homepage: http://www.mozilla.org/projects/seamonkey/
#Source: ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/(\d+.\d+)(?:((?:a|b|rc)(\d*))|(.\d+))? e:$1.($2||$3||".0") $1$2$3/seamonkey-$1$2$3.source.tar.bz2
#Source: ftp://ring.aist.go.jp/pub/net/www/mozilla/seamonkey/releases/(\d+.\d+)(?:(?:(a|b|rc)(\d*))|(.\d+))? e:$1.(($2?$2.($3||"0"):"")||$4) $1$2$3/seamonkey-$1$2$3.source.tar.bz2
#Source: http://mirror.nucba.ac.jp/mirror/mozilla/seamonkey/releases/...
# no alpha:
Source: ftp://ring.aist.go.jp/pub/net/www/mozilla/seamonkey/releases/(\d+.\d+)(?:(?:(b|rc)(\d*))|(.\d+))? e:$1.(($2?$2.($3||"0"):"")||$4) $1$2$3/seamonkey-$1$2$3.source.tar.bz2
Repack:
	tar xjvfp "$(SOURCE)"
	mv mozilla seamonkey-"$(VERSION)"
Compile:
	mv -f my.mozconfig .mozconfig
	mv -f my.mozconfig.mk .mozconfig.mk
	CPPFLAGS=-I/usr/include/freetype2 make -f client.mk build
	rm -f dist/seamonkey*.tar.gz
	make -C xpinstall/packager
	mkdir instdir
	tar Cxzvfp instdir dist/seamonkey*.tar.gz
	mv -f instdir/seamonkey/seamonkey instdir/seamonkey/seamonkey~
	sed 's,/usr/local/lib/seamonkey-[0-9A-Za-z.]+,$(PREFIX),g' < instdir/seamonkey/seamonkey~ > instdir/seamonkey/seamonkey
	chmod 755 instdir/seamonkey/seamonkey
	touch instdir/seamonkey/seamonkey -r instdir/seamonkey/seamonkey~
	rm -f instdir/seamonkey/seamonkey~
	rm -rf "$(PREFIX)"/*
	cp -av instdir/seamonkey/* "$(PREFIX)"/
	cp -Lprv dist/sdk "$(PREFIX)"/
Install:
	ln -fs "$(PREFIX)"/seamonkey /usr/bin/
Patch: <<EOT
######## begin local mozconfig
--- /no/such/file	1994-07-18 08:46:18 +0900
+++ my.mozconfig	2007-01-23 06:24:59 +0900
@@ -0,0 +1,8 @@
+ac_add_options --enable-application=suite
+ac_add_options --enable-crypto
+ac_add_options --enable-optimize="-O2 -fno-strict-aliasing"
+ac_add_options --disable-debug
+ac_add_options --disable-tests
+ac_add_options --enable-default-toolkit=gtk2
+ac_add_options --enable-xft
+ac_add_options --disable-freetype2
--- /no/such/file	1994-07-18 08:46:18 +0900
+++ my.mozconfig.mk	2007-01-23 06:24:59 +0900
@@ -0,0 +1,2 @@
+MOZ_CO_PROJECT=suite
+MOZ_OBJDIR=$(TOPSRCDIR)
######## end local mozconfig
######## begin segv sleep time 5min -> 10sec
--- webshell/tests/viewer/nsPhMain.cpp.old	2004-09-09 07:56:02 +0900
+++ webshell/tests/viewer/nsPhMain.cpp	2007-01-22 18:57:47 +0900
@@ -152,9 +152,9 @@
     nsTraceRefcntImpl::WalkTheStack(stdout);
 #endif
 
-    printf("Sleeping for 5 minutes.\n");
+    printf("Sleeping for 10 seconds.\n");
     printf("Type 'gdb viewer %d' to attach your debugger to this thread.\n", getpid());
-    sleep(300);
+    sleep(10);
     printf("Done sleeping...\n");
   }
 #endif
--- webshell/tests/viewer/unix/gtk/nsGtkMain.cpp.old	2004-09-09 07:56:04 +0900
+++ webshell/tests/viewer/unix/gtk/nsGtkMain.cpp	2007-01-22 18:58:11 +0900
@@ -155,12 +155,12 @@
   printf("stack logged to someplace\n");
   nsTraceRefcntImpl::WalkTheStack(stdout);
 
-  printf("Sleeping for 5 minutes.\n");
+  printf("Sleeping for 10 seconds.\n");
   printf("Type 'gdb %s %d' to attach your debugger to this thread.\n",
          _progname,
          getpid());
 
-  sleep(300);
+  sleep(10);
 
   printf("Done sleeping...\n");
 } 
--- webshell/tests/viewer/unix/gtk2/nsGtkMain.cpp.old	2004-09-09 07:56:05 +0900
+++ webshell/tests/viewer/unix/gtk2/nsGtkMain.cpp	2007-01-22 18:58:31 +0900
@@ -153,12 +153,12 @@
   printf("stack logged to someplace\n");
   nsTraceRefcntImpl::WalkTheStack(stdout);
 
-  printf("Sleeping for 5 minutes.\n");
+  printf("Sleeping for 10 seconds.\n");
   printf("Type 'gdb %s %d' to attach your debugger to this thread.\n",
          _progname,
          getpid());
 
-  sleep(300);
+  sleep(10);
 
   printf("Done sleeping...\n");
 } 
--- webshell/tests/viewer/unix/qt/nsQtMain.cpp.old	2004-10-11 13:01:47 +0900
+++ webshell/tests/viewer/unix/qt/nsQtMain.cpp	2007-01-22 18:58:49 +0900
@@ -158,12 +158,12 @@
   printf("stack logged to someplace\n");
   nsTraceRefcntImpl::WalkTheStack(stdout);
 
-  printf("Sleeping for 5 minutes.\n");
+  printf("Sleeping for 10 seconds.\n");
   printf("Type 'gdb %s %d' to attach your debugger to this thread.\n",
          _progname,
          getpid());
 
-  sleep(300);
+  sleep(10);
 
   printf("Done sleeping...\n");
 }
######## end segv sleep time 5min -> 10sec
EOT
NoPatch: <<EOT
######## begin patch to force x-western lang group for ASCII chars
--- gfx/src/gtk/nsFontMetricsXft.cpp.old	2006-03-04 16:37:18 +0900
+++ gfx/src/gtk/nsFontMetricsXft.cpp	2006-03-04 16:57:58 +0900
@@ -934,7 +934,13 @@
     // match.  If we need to match later we don't have to set it up
     // again.
     if (!mPattern) {
+        nsIAtom* tempLangGroup = mLangGroup;
+        if (aChar >= ' ' && aChar <= '~') {
+            // Force "western"
+            mLangGroup = do_GetAtom("x-western");
+        }
         SetupFCPattern();
+        mLangGroup = tempLangGroup;
         // did we fail to set it up?
         if (!mPattern)
             return nsnull;
######## end patch to force x-western lang group for ASCII chars
EOT

/pkg/seamonkey-bin/
/usr/bin/seamonkey
