Bug#270949: amd64/ia64/sparc support for java-package 0.16

Kaare Hviid Kaare Hviid <ukh@id.cbs.dk>, 270949@bugs.debian.org
Thu Nov 11 06:56:02 2004


Patch against vanilla java-package 0.16, which ought to resolve #274844,
#270949 and #271846.

diff -Naur java-package-0.16/lib/blackdown-j2re.sh java-package-0.16.fixed/lib/blackdown-j2re.sh
--- java-package-0.16/lib/blackdown-j2re.sh	2004-10-12 01:23:05.000000000 +0200
+++ java-package-0.16.fixed/lib/blackdown-j2re.sh	2004-11-11 10:04:52.799965713 +0100
@@ -1,7 +1,10 @@
 # Detect product
 function blackdown_j2re_detect() {
-    local found=
-    case "$archive_name" in
+  local found=
+  eval $(dpkg-architecture)
+  case "$DEB_BUILD_GNU_TYPE" in
+    "i386-linux")
+      case "$archive_name" in
 	"j2re-1.3.1-02b-FCS-linux-i386.bin")
 	    j2se_version=1.3.1+02b
 	    j2se_expected_min_size=35 # 35882 kB
@@ -27,8 +30,48 @@
 	    j2se_expected_min_size=48 # 49988 kB
 	    found=true
 	    ;;
-    esac
-    if [[ -n "$found" ]]; then
+	"j2re-1.4.2-fcs-linux-i586-gcc2.95.bin")
+	    j2se_version=1.4.2
+	    j2se_expected_min_size=56 # 58044 kB
+	    found=true
+	    ;;
+	"j2re-1.4.2-fcs-linux-i586-gcc3.2.bin")
+	    j2se_version=1.4.2
+	    j2se_expected_min_size=54 # 55524 kB
+	    found=true
+	    ;;
+      esac
+      ;;
+    "sparc-linux")
+      case "$archive_name" in
+	"j2re-1.3.1-02b-FCS-linux-sparc.bin")
+	    j2se_version=1.3.1+02b
+	    j2se_expected_min_size=26 # 27064 kB
+	    found=true
+	    ;;
+        "j2re-1.4.1-01-linux-sparc-gcc3.2.bin")
+	    j2se_version=1.4.1+01
+	    j2se_expected_min_size=55 # 57084 kB
+	    found=true
+	    ;;
+      esac
+      ;;
+    "x86_64-linux")
+      case "$archive_name" in
+	"j2re-1.4.2-rc1-linux-amd64.bin")
+	    j2se_version=1.4.2+rc1
+	    j2se_expected_min_size=53 # 54748 kB
+	    found=true
+	    ;;
+	"j2re-1.4.2-fcs-linux-amd64.bin")
+	    j2se_version=1.4.2
+	    j2se_expected_min_size=54 # 55468 kB
+	    found=true
+	    ;;
+      esac
+      ;;
+  esac
+  if [[ -n "$found" ]]; then
 	cat << EOF
 
 Detected product:
diff -Naur java-package-0.16/lib/blackdown-j2sdk.sh java-package-0.16.fixed/lib/blackdown-j2sdk.sh
--- java-package-0.16/lib/blackdown-j2sdk.sh	2004-10-12 01:23:05.000000000 +0200
+++ java-package-0.16.fixed/lib/blackdown-j2sdk.sh	2004-11-11 10:03:28.300990378 +0100
@@ -1,7 +1,10 @@
 # Detect product
 function blackdown_j2sdk_detect() {
-    local found=
-    case "$archive_name" in
+  local found=
+  eval $(dpkg-architecture)
+  case "$DEB_BUILD_GNU_TYPE" in
+    "i386-linux")
+      case "$archive_name" in
 	"j2sdk-1.3.1-02b-FCS-linux-i386.bin")
 	    j2se_version=1.3.1+02b
 	    j2se_expected_min_size=52 # 54083 kB
@@ -27,9 +30,49 @@
 	    j2se_expected_min_size=76 # 78055 kB
 	    found=true
 	    ;;
-    esac
-    if [[ -n "$found" ]]; then
-	cat << EOF
+	"j2sdk-1.4.2-fcs-linux-i586-gcc2.95.bin")
+	    j2se_version=1.4.2
+	    j2se_expected_min_size=90 # 92740 kB
+	    found=true
+	    ;;
+	"j2sdk-1.4.2-fcs-linux-i586-gcc3.2.bin")
+	    j2se_version=1.4.2
+	    j2se_expected_min_size=88 # 90316 kB
+	    found=true
+	    ;;
+      esac
+      ;;
+    "sparc-linux")
+      case "$archive_name" in
+	"j2sdk-1.3.1-02b-FCS-linux-sparc.bin")
+	    j2se_version=1.3.1+02b
+	    j2se_expected_min_size=44 # 46048 kB
+	    found=true
+	    ;;
+	"j2sdk-1.4.1-01-linux-sparc-gcc3.2.bin")
+	    j2se_version=1.4.1+01
+	    j2se_expected_min_size=83 # 85712 kB
+	    found=true
+	    ;;
+      esac
+      ;;
+    "x86_64-linux")
+      case "$archive_name" in
+	"j2sdk-1.4.2-rc1-linux-amd64.bin")
+	    j2se_version=1.4.2+rc1
+	    j2se_expected_min_size=86 # 88556 kB
+	    found=true
+	    ;;
+	"j2sdk-1.4.2-fcs-linux-amd64.bin")
+	    j2se_version=1.4.2
+	    j2se_expected_min_size=89 # 91460 kB
+	    found=true
+	    ;;
+      esac
+      ;;
+  esac
+  if [[ -n "$found" ]]; then
+    cat << EOF
 
 Detected product:
     Java(TM) Software Development Kit (J2SDK)
diff -Naur java-package-0.16/lib/sun-j2re.sh java-package-0.16.fixed/lib/sun-j2re.sh
--- java-package-0.16/lib/sun-j2re.sh	2004-10-12 02:11:38.000000000 +0200
+++ java-package-0.16.fixed/lib/sun-j2re.sh	2004-11-11 12:27:06.776222500 +0100
@@ -1,12 +1,20 @@
 # Detect product
 function sun_j2re_detect() {
-    local found=
-    case "$archive_name" in
+local found=
+  eval $(dpkg-architecture)
+  case "$DEB_BUILD_GNU_TYPE" in
+    "i386-linux")
+      case "$archive_name" in
 	"j2re-1_3_1_"[0-9][0-9]"-linux-i586.bin")
 	    j2se_version="1.3.1+${archive_name:11:2}"
 	    j2se_expected_min_size=38 # 39089 kB
 	    found=true
 	    ;;
+	"j2re-1_4_1_"[0-9][0-9]"-linux-i586.bin")
+	    j2se_version="1.4.1+${archive_name:11:2}"
+	    j2se_expected_min_size=54 # 55392 kB
+	    found=true
+	    ;;
 	"j2re-1_4_2-linux-i586.bin")
 	    j2se_version=1.4.2
 	    j2se_expected_min_size=56 # 58000 kB
@@ -25,9 +33,21 @@
 	"jre-1_5_0-linux-i586.bin")
 	    j2se_version=1.5.0+final
 	    j2se_expected_min_size=85 # 86832 kB
+	    found=true
+	    ;;
+      esac
+      ;;
+    "x86_64-linux")
+      case "$archive_name" in
+	"jre-1_5_0-linux-amd64.bin")
+	    j2se_version=1.5.0+final
+	    j2se_expected_min_size=68 # 69936 kB
+	    found=true
 	    ;;
-    esac
-    if [[ -n "$found" ]]; then
+      esac
+      ;;
+  esac
+  if [[ -n "$found" ]]; then
 	cat << EOF
 
 Detected product:
diff -Naur java-package-0.16/lib/sun-j2sdk.sh java-package-0.16.fixed/lib/sun-j2sdk.sh
--- java-package-0.16/lib/sun-j2sdk.sh	2004-10-12 02:11:38.000000000 +0200
+++ java-package-0.16.fixed/lib/sun-j2sdk.sh	2004-11-11 12:25:31.693152643 +0100
@@ -1,14 +1,17 @@
 # Detect product
 function sun_j2sdk_detect() {
-    local found=
-    case "$archive_name" in
+  local found=
+  eval $(dpkg-architecture)
+  case "$DEB_BUILD_GNU_TYPE" in
+    "i386-linux")
+      case "$archive_name" in
 	"j2sdk-1_3_1_"[0-9][0-9]"-linux-i586.bin")
 	    j2se_version="1.3.1+${archive_name:12:2}"
 	    j2se_expected_min_size=54 # 56259 kB
 	    found=true
 	    ;;
-	"j2sdk-1_4_1_03-linux-i586.bin")
-	    j2se_version=1.4.1+03
+	"j2sdk-1_4_1_"[0-9][0-9]"-linux-i586.bin")
+	    j2se_version="1.4.1+${archive_name:12:2}"
 	    j2se_expected_min_size=77 # 79515 kB
 	    found=true
 	    ;;
@@ -28,12 +31,42 @@
 	    found=true
 	    ;;
 	"jdk-1_5_0-linux-i586.bin")
-	    j2se_version="1.5.0+final"
+	    j2se_version=1.5.0+final
 	    j2se_expected_min_size=134 # 136608 kB
 	    found=true
 	    ;;
-    esac
-    if [[ -n "$found" ]]; then
+      esac
+      ;;
+    "ia64-linux")
+      case "$archive_name" in
+	"j2sdk-1_4_1-linux-ia64.bin")
+	    j2se_version=1.4.1
+	    j2se_expected_min_size=86 # 88452 kB
+	    found=true
+	    ;;
+        "j2sdk-1_4_2_"[0-9][0-9]"-linux-ia64.bin")
+	    j2se_version="1.4.2+${archive_name:12:2}"
+	    j2se_expected_min_size=107 # 109256 kB
+	    found=true
+	    ;;
+      esac
+      ;;
+    "x86_64-linux")
+      case "$archive_name" in
+	"jdk-1_5_0-beta2-linux-amd64.bin")
+	    j2se_version=1.5.0+beta2
+	    j2se_expected_min_size=108 # 110956 kB
+	    found=true
+	    ;;
+	"jdk-1_5_0-linux-amd64.bin")
+	    j2se_version=1.5.0+final
+	    j2se_expected_min_size=110 # 112940 kB
+	    found=true
+	    ;;
+      esac
+      ;;
+  esac
+  if [[ -n "$found" ]]; then
 	cat << EOF
 
 Detected product:

-ukh