summaryrefslogtreecommitdiffstats
path: root/recipes-core/icedtea/openjdk-7-03b147/icedtea-ecj-disable-compilation.patch
blob: a9ee96c582746ab4bd6a1a8144679ecadb978211 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
diff --git openjdk/jdk/make/common/Sanity.gmk openjdk/jdk/make/common/Sanity.gmk
index 27fe5bd..97ad549 100644
--- openjdk/jdk/make/common/Sanity.gmk
+++ openjdk/jdk/make/common/Sanity.gmk
@@ -91,19 +91,7 @@ sanity-all:: sanity-base \
     sane-ld_run_path \
     sane-alt_bootdir \
     sane-bootdir \
-    sane-local-bootdir \
-    sane-alsa-headers
-
-ifdef OPENJDK
-sanity-all:: sane-freetype 
-endif
-
-
-# Always check cups header paths on solaris & linux
-ifneq ($(PLATFORM), windows)
-sanity-all:: \
-    sane-cups
-endif
+    sane-local-bootdir
 
 # Always check hotspot binary paths even if we are building them from scratch
 HOTSPOT_IMPORT_CHECK=true
diff --git openjdk/jdk/make/common/shared/Defs-java.gmk openjdk/jdk/make/common/shared/Defs-java.gmk
index 401f7db..bbd1157 100644
--- openjdk/jdk/make/common/shared/Defs-java.gmk
+++ openjdk/jdk/make/common/shared/Defs-java.gmk
@@ -36,14 +36,6 @@
 # Memory related -J flags that all uses of java tools should use.
 #
 JAVA_MEM_FLAGS   = -Xmx$(MAX_VM_MEMORY)m
-ifeq ($(ARCH), ia64)
-  # Special flags for javac on ia64 to work around a VM problem with
-  #   bad code generation during inlining (what version had this problem?):
-  #   Suspect this may not be needed anymore.
-  JAVA_MEM_FLAGS   += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
-else
-  JAVA_MEM_FLAGS   += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
-endif
 
 #
 # All java tools (javac, javah, and javadoc) run faster with certain java
diff --git openjdk/jdk/make/common/shared/Sanity.gmk openjdk/jdk/make/common/shared/Sanity.gmk
index a566d07..25ca978 100644
--- openjdk/jdk/make/common/shared/Sanity.gmk
+++ openjdk/jdk/make/common/shared/Sanity.gmk
@@ -200,7 +200,6 @@ include $(JDK_MAKE_SHARED_DIR)/Sanity-Settings.gmk
 	sane-alt_bootdir \
 	sane-bootdir \
 	sane-local-bootdir \
-	sane-cups \
 	sane-devtools_path \
 	sane-compiler_path \
 	sane-unixcommand_path \
@@ -218,12 +217,10 @@ include $(JDK_MAKE_SHARED_DIR)/Sanity-Settings.gmk
 	sane-compiler \
 	sane-link \
 	sane-cacerts \
-	sane-alsa-headers \
 	sane-ant_version \
 	sane-zip_version \
 	sane-unzip_version \
-	sane-msvcrt_path \
-        sane-freetype
+	sane-msvcrt_path
 
 ######################################################
 # check for COPYRIGHT_YEAR variable
diff --git openjdk/jdk/make/javax/sound/jsoundalsa/Makefile openjdk/jdk/make/javax/sound/jsoundalsa/Makefile
index 5fa0124..e56be17 100644
--- openjdk/jdk/make/javax/sound/jsoundalsa/Makefile
+++ openjdk/jdk/make/javax/sound/jsoundalsa/Makefile
@@ -44,34 +44,11 @@ include $(BUILDDIR)/common/Mapfile-vers.gmk
 # Files
 #
 
-FILES_c = \
-	Utilities.c \
-	$(DAUDIOFILES_c) \
-	$(MIDIFILES_c) \
-	$(PORTFILES_c)
-
-# platform dependent files
-FILES_c += \
-	PLATFORM_API_LinuxOS_ALSA_CommonUtils.c   \
-	PLATFORM_API_LinuxOS_ALSA_PCM.c     \
-	PLATFORM_API_LinuxOS_ALSA_PCMUtils.c   \
-	PLATFORM_API_LinuxOS_ALSA_MidiIn.c  \
-	PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
-	PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
-	PLATFORM_API_LinuxOS_ALSA_Ports.c
-
-FILES_export = \
-	$(DAUDIOFILES_export) \
-	$(MIDIFILES_export) \
-	$(PORTFILES_export)
-
-OTHER_LDLIBS += -lasound
-
 CPPFLAGS += \
-	-DUSE_DAUDIO=TRUE \
-	-DUSE_PORTS=TRUE  \
-	-DUSE_PLATFORM_MIDI_OUT=TRUE \
-	-DUSE_PLATFORM_MIDI_IN=TRUE \
+	-DUSE_DAUDIO=FALSE \
+	-DUSE_PORTS=FALSE  \
+	-DUSE_PLATFORM_MIDI_OUT=FALSE \
+	-DUSE_PLATFORM_MIDI_IN=FALSE \
 	-I$(SHARE_SRC)/native/com/sun/media/sound
 
 #
diff --git openjdk/jdk/make/launchers/Makefile openjdk/jdk/make/launchers/Makefile
index cc07bbe..bdd7b1f 100644
--- openjdk/jdk/make/launchers/Makefile
+++ openjdk/jdk/make/launchers/Makefile
@@ -43,18 +43,7 @@ $(MAKE) -f Makefile.launcher \
         MAIN_ARGS="$(strip $4)"
 endef
 
-# Run MAKE $@ for all generic launchers
-ifndef BUILD_HEADLESS_ONLY
-define make-appletviewer
-$(call make-launcher, appletviewer, sun.applet.Main, , )
-endef
-else
-define make-appletviewer
-endef
-endif
-
 define make-all-launchers
-$(make-appletviewer)
 $(call make-launcher, apt, com.sun.tools.apt.Main, , )
 $(call make-launcher, extcheck, com.sun.tools.extcheck.Main, , )
 $(call make-launcher, idlj, com.sun.tools.corba.se.idl.toJavaPortable.Compile, , )
diff --git openjdk/jdk/make/sun/awt/Makefile openjdk/jdk/make/sun/awt/Makefile
index 43c9ad2..c29c167 100644
--- openjdk/jdk/make/sun/awt/Makefile
+++ openjdk/jdk/make/sun/awt/Makefile
@@ -178,7 +178,7 @@ COMPILEFONTCONFIG_FLAGS =
 ifdef ALT_COMPILEFONTCONFIG_FLAGS
   COMPILEFONTCONFIG_FLAGS += $(ALT_COMPILEFONTCONFIG_FLAGS)
 endif
-build: fontconfigs
+build:
 
 
 ifeq ($(PLATFORM), windows)
@@ -503,10 +503,6 @@ CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
             -I$(PLATFORM_SRC)/native/$(PKGDIR) \
 	    $(EVENT_MODEL)
 
-ifeq ($(PLATFORM), linux)
-LDFLAGS += -L$(OPENWIN_LIB)
-endif
-
 LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \
 	   $(AWT_RUNPATH)
 
diff --git openjdk/jdk/make/sun/jawt/Makefile openjdk/jdk/make/sun/jawt/Makefile
index afbce78..ed6a1c3 100644
--- openjdk/jdk/make/sun/jawt/Makefile
+++ openjdk/jdk/make/sun/jawt/Makefile
@@ -36,7 +36,7 @@ include $(BUILDDIR)/common/Defs.gmk
 ifeq ($(PLATFORM), windows)
 FILES_cpp = jawt.cpp
 else # PLATFORM
-FILES_c = jawt.c
+FILES_c =
 endif # PLATFORM
 
 FILES_h = $(INCLUDEDIR)/jawt.h \
diff --git openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java
index cf3f1e5..657716a 100644
--- openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java
+++ openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java
@@ -137,7 +137,7 @@ public abstract class GraphicsEnvironment {
      * @since 1.4
      */
     public static boolean isHeadless() {
-        return getHeadlessProperty();
+        return true;
     }
 
     /**
diff --git openjdk/jdk/src/solaris/native/sun/awt/CUPSfuncs.c openjdk/jdk/src/solaris/native/sun/awt/CUPSfuncs.c
index 483f6f7..90812ee 100644
--- openjdk/jdk/src/solaris/native/sun/awt/CUPSfuncs.c
+++ openjdk/jdk/src/solaris/native/sun/awt/CUPSfuncs.c
@@ -25,12 +25,6 @@
 
 #include <jni.h>
 #include <jni_util.h>
-#include <cups/cups.h>
-#include <cups/ppd.h>
-
-#ifndef USE_SYSTEM_CUPS
-#include <cups_fp.h>
-#endif
 
 //#define CUPS_DEBUG
 
@@ -47,11 +41,7 @@
 JNIEXPORT jboolean JNICALL
 Java_sun_print_CUPSPrinter_initIDs(JNIEnv *env,
                                          jobject printObj) {
-#ifndef USE_SYSTEM_CUPS
-  return cups_init();
-#else
   return JNI_TRUE;
-#endif
 }
 
 /*
@@ -62,17 +52,7 @@ JNIEXPORT jstring JNICALL
 Java_sun_print_CUPSPrinter_getCupsServer(JNIEnv *env,
                                          jobject printObj)
 {
-    jstring cServer = NULL;
-    const char* server = cupsServer();
-    if (server != NULL) {
-        // Is this a local domain socket?
-        if (strncmp(server, "/", 1) == 0) {
-            cServer = JNU_NewStringPlatform(env, "localhost");
-        } else {
-            cServer = JNU_NewStringPlatform(env, server);
-        }
-    }
-    return cServer;
+    return NULL;
 }
 
 /*
@@ -83,8 +63,7 @@ JNIEXPORT jint JNICALL
 Java_sun_print_CUPSPrinter_getCupsPort(JNIEnv *env,
                                          jobject printObj)
 {
-    int port = ippPort();
-    return (jint) port;
+    return 8080;
 }
 
 
@@ -98,16 +77,6 @@ Java_sun_print_CUPSPrinter_canConnect(JNIEnv *env,
                                       jstring server,
                                       jint port)
 {
-    const char *serverName;
-    serverName = (*env)->GetStringUTFChars(env, server, NULL);
-    if (serverName != NULL) {
-        http_t *http = httpConnect(serverName, (int)port);
-        (*env)->ReleaseStringUTFChars(env, server, serverName);
-        if (http != NULL) {
-            httpClose(http);
-            return JNI_TRUE;
-        }
-    }
     return JNI_FALSE;
 }
 
@@ -120,111 +89,7 @@ Java_sun_print_CUPSPrinter_getMedia(JNIEnv *env,
                                          jobject printObj,
                                          jstring printer)
 {
-    ppd_file_t *ppd;
-    ppd_option_t *optionTray, *optionPage;
-    ppd_choice_t *choice;
-    const char *name;
-    const char *filename;
-    int i, nTrays=0, nPages=0, nTotal=0;
-    jstring utf_str;
-    jclass cls;
-    jobjectArray nameArray = NULL;
-
-    name = (*env)->GetStringUTFChars(env, printer, NULL);
-    if (name == NULL) {
-        return NULL;
-    }
-
-    // NOTE: cupsGetPPD returns a pointer to a filename of a temporary file.
-    // unlink() must be caled to remove the file when finished using it.
-    filename = cupsGetPPD(name);
-    (*env)->ReleaseStringUTFChars(env, printer, name);
-
-    cls = (*env)->FindClass(env, "java/lang/String");
-
-    if (filename == NULL) {
-        return NULL;
-    }
-
-    if ((ppd = ppdOpenFile(filename)) == NULL) {
-        unlink(filename);
-        DPRINTF("CUPSfuncs::unable to open PPD  %s\n", filename);
-        return NULL;
-    }
-
-    optionPage = ppdFindOption(ppd, "PageSize");
-    if (optionPage != NULL) {
-        nPages = optionPage->num_choices;
-    }
-
-    optionTray = ppdFindOption(ppd, "InputSlot");
-    if (optionTray != NULL) {
-        nTrays = optionTray->num_choices;
-    }
-
-    if ((nTotal = (nPages+nTrays) *2) > 0) {
-        nameArray = (*env)->NewObjectArray(env, nTotal, cls, NULL);
-        if (nameArray == NULL) {
-            unlink(filename);
-            ppdClose(ppd);
-            DPRINTF("CUPSfuncs::bad alloc new array\n", "")
-            JNU_ThrowOutOfMemoryError(env, "OutOfMemoryError");
-            return NULL;
-        }
-
-        for (i = 0; optionPage!=NULL && i<nPages; i++) {
-            choice = (optionPage->choices)+i;
-            utf_str = JNU_NewStringPlatform(env, choice->text);
-            if (utf_str == NULL) {
-                unlink(filename);
-                ppdClose(ppd);
-                DPRINTF("CUPSfuncs::bad alloc new string ->text\n", "")
-                JNU_ThrowOutOfMemoryError(env, "OutOfMemoryError");
-                return NULL;
-            }
-            (*env)->SetObjectArrayElement(env, nameArray, i*2, utf_str);
-            (*env)->DeleteLocalRef(env, utf_str);
-            utf_str = JNU_NewStringPlatform(env, choice->choice);
-            if (utf_str == NULL) {
-                unlink(filename);
-                ppdClose(ppd);
-                DPRINTF("CUPSfuncs::bad alloc new string ->choice\n", "")
-                JNU_ThrowOutOfMemoryError(env, "OutOfMemoryError");
-                return NULL;
-            }
-            (*env)->SetObjectArrayElement(env, nameArray, i*2+1, utf_str);
-            (*env)->DeleteLocalRef(env, utf_str);
-        }
-
-        for (i = 0; optionTray!=NULL && i<nTrays; i++) {
-            choice = (optionTray->choices)+i;
-            utf_str = JNU_NewStringPlatform(env, choice->text);
-            if (utf_str == NULL) {
-                unlink(filename);
-                ppdClose(ppd);
-                DPRINTF("CUPSfuncs::bad alloc new string text\n", "")
-                JNU_ThrowOutOfMemoryError(env, "OutOfMemoryError");
-                return NULL;
-            }
-            (*env)->SetObjectArrayElement(env, nameArray,
-                                          (nPages+i)*2, utf_str);
-            (*env)->DeleteLocalRef(env, utf_str);
-            utf_str = JNU_NewStringPlatform(env, choice->choice);
-            if (utf_str == NULL) {
-                unlink(filename);
-                ppdClose(ppd);
-                DPRINTF("CUPSfuncs::bad alloc new string choice\n", "")
-                JNU_ThrowOutOfMemoryError(env, "OutOfMemoryError");
-                return NULL;
-            }
-            (*env)->SetObjectArrayElement(env, nameArray,
-                                          (nPages+i)*2+1, utf_str);
-            (*env)->DeleteLocalRef(env, utf_str);
-        }
-    }
-    ppdClose(ppd);
-    unlink(filename);
-    return nameArray;
+    return NULL;
 }
 
 
@@ -236,63 +101,5 @@ Java_sun_print_CUPSPrinter_getPageSizes(JNIEnv *env,
                                          jobject printObj,
                                          jstring printer)
 {
-    ppd_file_t *ppd;
-    ppd_option_t *option;
-    ppd_choice_t *choice;
-    ppd_size_t *size;
-
-    const char *name = (*env)->GetStringUTFChars(env, printer, NULL);
-    const char *filename;
-    int i;
-    jobjectArray sizeArray = NULL;
-    jfloat *dims;
-
-    // NOTE: cupsGetPPD returns a pointer to a filename of a temporary file.
-    // unlink() must be called to remove the file after using it.
-    filename = cupsGetPPD(name);
-    (*env)->ReleaseStringUTFChars(env, printer, name);
-    if (filename == NULL) {
-        return NULL;
-    }
-    if ((ppd = ppdOpenFile(filename)) == NULL) {
-        unlink(filename);
-        DPRINTF("unable to open PPD  %s\n", filename)
-        return NULL;
-    }
-    option = ppdFindOption(ppd, "PageSize");
-    if (option != NULL && option->num_choices > 0) {
-        // create array of dimensions - (num_choices * 6)
-        //to cover length & height
-        DPRINTF( "CUPSfuncs::option->num_choices %d\n", option->num_choices)
-        sizeArray = (*env)->NewFloatArray(env, option->num_choices*6);
-        if (sizeArray == NULL) {
-            unlink(filename);
-            ppdClose(ppd);
-            DPRINTF("CUPSfuncs::bad alloc new float array\n", "")
-            JNU_ThrowOutOfMemoryError(env, "OutOfMemoryError");
-            return NULL;
-        }
-
-        dims = (*env)->GetFloatArrayElements(env, sizeArray, NULL);
-        for (i = 0; i<option->num_choices; i++) {
-            choice = (option->choices)+i;
-            size = ppdPageSize(ppd, choice->choice);
-            if (size != NULL) {
-                // paper width and height
-                dims[i*6] = size->width;
-                dims[(i*6)+1] = size->length;
-                // paper printable area
-                dims[(i*6)+2] = size->left;
-                dims[(i*6)+3] = size->top;
-                dims[(i*6)+4] = size->right;
-                dims[(i*6)+5] = size->bottom;
-            }
-        }
-
-        (*env)->ReleaseFloatArrayElements(env, sizeArray, dims, 0);
-    }
-
-    ppdClose(ppd);
-    unlink(filename);
-    return sizeArray;
+    return NULL;
 }
diff --git openjdk/jdk/make/sun/Makefile openjdk/jdk/make/sun/Makefile
index 4c19f4e..ef0e8be 100644
--- openjdk/jdk/make/sun/Makefile
+++ openjdk/jdk/make/sun/Makefile
@@ -74,7 +74,7 @@ ifdef BUILD_HEADLESS_ONLY
   DISPLAY_LIBS = awt $(HEADLESS_SUBDIR)
   DISPLAY_TOOLS = 
 else
-  DISPLAY_LIBS = awt splashscreen $(XAWT_SUBDIR) $(HEADLESS_SUBDIR)
+  DISPLAY_LIBS = awt $(XAWT_SUBDIR) $(HEADLESS_SUBDIR)
   DISPLAY_TOOLS = applet
 endif
 SUBDIRS_desktop    = audio $(RENDER_SUBDIR) image \
diff --git openjdk/jdk/make/sun/xawt/Makefile openjdk/jdk/make/sun/xawt/Makefile
index e7d54e2..de23453 100644
--- openjdk/jdk/make/sun/xawt/Makefile
+++ openjdk/jdk/make/sun/xawt/Makefile
@@ -46,15 +46,12 @@ include FILES_export_unix.gmk
 AUTO_FILES_JAVA_DIRS = sun/awt/X11
 AUTO_JAVA_PRUNE = WrapperGenerator.java
 
-LDFLAGS += -L$(OPENWIN_LIB)
-
 # For Xrender extension.
 ifeq ($(PLATFORM), solaris)
 LDFLAGS += -L/usr/openwin/sfw/lib$(ISA_DIR) -R/usr/openwin/sfw/lib$(ISA_DIR)
 endif
 
 ifeq ($(PLATFORM), linux)
-LDFLAGS += -lpthread
 dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
 endif
 
@@ -96,9 +93,7 @@ ifndef USE_SYSTEM_GIO
 vpath %.c   $(PLATFORM_SRC)/native/common/deps/glib2
 endif
 
-ifndef USE_SYSTEM_GTK
 vpath %.c   $(PLATFORM_SRC)/native/common/deps/gtk2
-endif
 
 ifndef USE_SYSTEM_CUPS
 vpath %.c   $(PLATFORM_SRC)/native/common/deps
@@ -109,15 +104,7 @@ vpath %.c   $(PLATFORM_SRC)/native/common/deps/fontconfig2
 endif
 
 OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -lXrender -ldl \
-                   $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
-
-ifdef USE_SYSTEM_GTK
-  OTHER_LDLIBS += $(GTK_LIBS)
-endif
-
-ifdef USE_SYSTEM_CUPS
-  OTHER_LDLIBS += $(CUPS_LIBS)
-endif
+                   $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS)
 
 ifdef USE_SYSTEM_FONTCONFIG
   OTHER_LDLIBS += $(FONTCONFIG_LIBS)
@@ -132,12 +119,6 @@ CPPFLAGS += -DFUNCPROTO=15
 dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
 endif
 
-ifdef CUPS_CFLAGS
-  CPPFLAGS += $(CUPS_CFLAGS)
-else
-  CPPFLAGS += -I$(CUPS_HEADERS_PATH)
-endif
-
 CPPFLAGS += -DXAWT -DXAWT_HACK \
         -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \
         -I$(PLATFORM_SRC)/native/sun/awt \
@@ -164,17 +145,7 @@ CPPFLAGS += -DXAWT -DXAWT_HACK \
         -I$(SHARE_SRC)/native/sun/awt \
         -I$(PLATFORM_SRC)/native/sun/awt
 
-ifdef USE_SYSTEM_GTK
-  CPPFLAGS += $(GTK_CFLAGS) -DUSE_SYSTEM_GTK
-else
-  CPPFLAGS += -I$(PLATFORM_SRC)/native/common/deps/gtk2
-endif
-
-ifdef USE_SYSTEM_CUPS
-  CPPFLAGS += -DUSE_SYSTEM_CUPS
-else
-  CPPFLAGS += -I$(PLATFORM_SRC)/native/common/deps
-endif
+CPPFLAGS += -I$(PLATFORM_SRC)/native/common/deps/gtk2
 
 ifdef USE_SYSTEM_FONTCONFIG
   CPPFLAGS += $(FONTCONFIG_CFLAGS) -DUSE_SYSTEM_FONTCONFIG
@@ -188,20 +159,6 @@ else
   CPPFLAGS += -I$(PLATFORM_SRC)/native/common/deps/glib2
 endif
 
-ifeq ($(PLATFORM), linux)
-  ifndef CROSS_COMPILE_ARCH
-    # Allows for builds on Debian GNU Linux, X11 is in a different place 
-    # This should really be handled at a higher-level so we don't have to
-    # work-around this when cross-compiling
-    CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
-                -I/usr/include/X11/extensions \
-                -I$(OPENWIN_HOME)/include 
-  else
-    CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
-                -I$(OPENWIN_HOME)/include 
-  endif
-endif
-
 # We have some odd logic here because some Solaris 10 updates
 # have a render.h file that suggests gradients are supported, but
 # the Xrender.h doesn't have the corresponding type definitions.
diff --git openjdk/jdk/make/sun/xawt/FILES_c_unix.gmk openjdk/jdk/make/sun/xawt/FILES_c_unix.gmk
index 57b34c3..c629f78 100644
--- openjdk/jdk/make/sun/xawt/FILES_c_unix.gmk
+++ openjdk/jdk/make/sun/xawt/FILES_c_unix.gmk
@@ -84,15 +84,8 @@ FILES_c = \
 	XRSurfaceData.c \
 	XRBackendNative.c
 
-ifndef USE_SYSTEM_GTK
 FILES_c += \
 	gtk_fp.c
-endif
-
-ifndef USE_SYSTEM_CUPS
-FILES_c += \
-	cups_fp.c
-endif
 
 ifndef USE_SYSTEM_FONTCONFIG
 FILES_c += \
diff --git openjdk/jdk/make/sun/awt/FILES_c_unix.gmk openjdk/jdk/make/sun/awt/FILES_c_unix.gmk
index dc1f61e..489abc1 100644
--- openjdk/jdk/make/sun/awt/FILES_c_unix.gmk
+++ openjdk/jdk/make/sun/awt/FILES_c_unix.gmk
@@ -230,11 +230,6 @@ FILES_NO_MOTIF_c = \
         AccelGlyphCache.c \
 	CUPSfuncs.c
 
-ifndef USE_SYSTEM_CUPS
-FILES_NO_MOTIF_c += \
-	cups_fp.c
-endif
-
 ifndef USE_SYSTEM_FONTCONFIG
 FILES_NO_MOTIF_c += \
 	fontconfig_fp.c
diff --git openjdk/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c openjdk/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c
index 5de53ca..b598a22 100644
--- openjdk/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c
+++ openjdk/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c
@@ -29,7 +29,7 @@
 #include "X11SurfaceData.h"
 
 /*#include <xcb/xcb.h>*/
-#include <Xrender.h>
+#include <X11/extensions/Xrender.h>
 
 #ifndef RepeatNone  /* added in 0.10 */
 #define RepeatNone    0
diff --git openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c
index c3384b2..867e40f 100644
--- openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c
+++ openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c
@@ -35,10 +35,6 @@
 #include <X11/Intrinsic.h>
 #include <X11/Xutil.h>
 #include <X11/Xmd.h>
-#include <X11/extensions/xtestext1.h>
-#include <X11/extensions/XTest.h>
-#include <X11/extensions/XInput.h>
-#include <X11/extensions/XI.h>
 #include <jni.h>
 #include "robot_common.h"
 #include "canvas.h"
@@ -55,37 +51,7 @@ static jint * masks;
 static jint num_buttons;
 
 static int32_t isXTestAvailable() {
-    int32_t major_opcode, first_event, first_error;
-    int32_t  event_basep, error_basep, majorp, minorp;
-    int32_t isXTestAvailable;
-
-    /* check if XTest is available */
-    isXTestAvailable = XQueryExtension(awt_display, XTestExtensionName, &major_opcode, &first_event, &first_error);
-    DTRACE_PRINTLN3("RobotPeer: XQueryExtension(XTEST) returns major_opcode = %d, first_event = %d, first_error = %d",
-                    major_opcode, first_event, first_error);
-    if (isXTestAvailable) {
-        /* check if XTest version is OK */
-        XTestQueryExtension(awt_display, &event_basep, &error_basep, &majorp, &minorp);
-        DTRACE_PRINTLN4("RobotPeer: XTestQueryExtension returns event_basep = %d, error_basep = %d, majorp = %d, minorp = %d",
-                        event_basep, error_basep, majorp, minorp);
-        if (majorp < 2 || (majorp == 2 && minorp < 2)) {
-            /* bad version*/
-            DTRACE_PRINTLN2("XRobotPeer: XTEST version is %d.%d \n", majorp, minorp);
-            if (majorp == 2 && minorp == 1) {
-                DTRACE_PRINTLN("XRobotPeer: XTEST is 2.1 - no grab is available\n");
-            } else {
-                isXTestAvailable = False;
-            }
-        } else {
-            /* allow XTest calls even if someone else has the grab; e.g. during
-             * a window resize operation. Works only with XTEST2.2*/
-            XTestGrabControl(awt_display, True);
-        }
-    } else {
-        DTRACE_PRINTLN("RobotPeer: XTEST extension is unavailable");
-    }
-
-    return isXTestAvailable;
+    return False;
 }
 
 
@@ -265,37 +231,12 @@ Java_sun_awt_X11_XRobotPeer_keyPressImpl (JNIEnv *env,
                          jclass cls,
                          jint keycode) {
 
-    AWT_LOCK();
-
-    DTRACE_PRINTLN1("RobotPeer: keyPressImpl(%i)", keycode);
-
-    XTestFakeKeyEvent(awt_display,
-                      XKeysymToKeycode(awt_display, awt_getX11KeySym(keycode)),
-                      True,
-                      CurrentTime);
-
-    XSync(awt_display, False);
-
-    AWT_UNLOCK();
-
 }
 
 JNIEXPORT void JNICALL
 Java_sun_awt_X11_XRobotPeer_keyReleaseImpl (JNIEnv *env,
                            jclass cls,
                            jint keycode) {
-    AWT_LOCK();
-
-    DTRACE_PRINTLN1("RobotPeer: keyReleaseImpl(%i)", keycode);
-
-    XTestFakeKeyEvent(awt_display,
-                      XKeysymToKeycode(awt_display, awt_getX11KeySym(keycode)),
-                      False,
-                      CurrentTime);
-
-    XSync(awt_display, False);
-
-    AWT_UNLOCK();
 }
 
 JNIEXPORT void JNICALL
@@ -328,43 +269,6 @@ void mouseAction(JNIEnv *env,
                  jint buttonMask,
                  Bool isMousePress)
 {
-    AWT_LOCK();
-
-    DTRACE_PRINTLN1("RobotPeer: mouseAction(%i)", buttonMask);
-    DTRACE_PRINTLN1("RobotPeer: mouseAction, press = %d", isMousePress);
-
-    if (buttonMask & java_awt_event_InputEvent_BUTTON1_MASK ||
-        buttonMask & java_awt_event_InputEvent_BUTTON1_DOWN_MASK )
-    {
-        XTestFakeButtonEvent(awt_display, 1, isMousePress, CurrentTime);
-    }
-    if ((buttonMask & java_awt_event_InputEvent_BUTTON2_MASK ||
-         buttonMask & java_awt_event_InputEvent_BUTTON2_DOWN_MASK) &&
-        (num_buttons >= 2)) {
-        XTestFakeButtonEvent(awt_display, 2, isMousePress, CurrentTime);
-    }
-    if ((buttonMask & java_awt_event_InputEvent_BUTTON3_MASK ||
-         buttonMask & java_awt_event_InputEvent_BUTTON3_DOWN_MASK) &&
-        (num_buttons >= 3)) {
-        XTestFakeButtonEvent(awt_display, 3, isMousePress, CurrentTime);
-    }
-
-    if (num_buttons > 3){
-        int32_t i;
-        int32_t button = 0;
-        for (i = 3; i<num_buttons; i++){
-            if ((buttonMask & masks[i])) {
-                // arrays starts from zero index => +1
-                // users wants to affect 4 or 5 button but they are assigned
-                // to the wheel so => we have to shift it to the right by 2.
-                button = i + 3;
-                XTestFakeButtonEvent(awt_display, button, isMousePress, CurrentTime);
-            }
-        }
-    }
-
-    XSync(awt_display, False);
-    AWT_UNLOCK();
 }
 
 JNIEXPORT void JNICALL
@@ -389,22 +293,4 @@ Java_sun_awt_X11_XRobotPeer_mouseWheelImpl (JNIEnv *env,
 /* probably could have been hacked into robot_mouseButtonEvent, but it's */
 /* cleaner to give it its own command type, in case the implementation   */
 /* needs to be changed later.  -bchristi, 6/20/01                        */
-
-    int32_t repeat = abs(wheelAmt);
-    int32_t button = wheelAmt < 0 ? 4 : 5;  /* wheel up:   button 4 */
-                                                 /* wheel down: button 5 */
-    int32_t loopIdx;
-
-    AWT_LOCK();
-
-    DTRACE_PRINTLN1("RobotPeer: mouseWheelImpl(%i)", wheelAmt);
-
-    for (loopIdx = 0; loopIdx < repeat; loopIdx++) { /* do nothing for   */
-                                                     /* wheelAmt == 0    */
-        XTestFakeButtonEvent(awt_display, button, True, CurrentTime);
-        XTestFakeButtonEvent(awt_display, button, False, CurrentTime);
-    }
-    XSync(awt_display, False);
-
-    AWT_UNLOCK();
 }
diff --git openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c
index 0e6d021..7dc1c5d 100644
--- openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c
+++ openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c
@@ -45,7 +45,6 @@
 #include "sun_awt_X11_XToolkit.h"
 #include "java_awt_SystemColor.h"
 #include "java_awt_TrayIcon.h"
-#include <X11/extensions/XTest.h>
 
 #include <unistd.h>
 
@@ -1028,66 +1027,7 @@ JNIEXPORT jint JNICALL Java_sun_awt_X11_XToolkit_getNumberOfButtonsImpl
 }
 
 int32_t getNumButtons() {
-    int32_t major_opcode, first_event, first_error;
-    int32_t xinputAvailable;
-    int32_t numDevices, devIdx, clsIdx;
-    XDeviceInfo* devices;
-    XDeviceInfo* aDevice;
-    XButtonInfo* bInfo;
-    int32_t local_num_buttons = 0;
-
-    /* 4700242:
-     * If XTest is asked to press a non-existant mouse button
-     * (i.e. press Button3 on a system configured with a 2-button mouse),
-     * then a crash may happen.  To avoid this, we use the XInput
-     * extension to query for the number of buttons on the XPointer, and check
-     * before calling XTestFakeButtonEvent().
-     */
-    xinputAvailable = XQueryExtension(awt_display, INAME, &major_opcode, &first_event, &first_error);
-    DTRACE_PRINTLN3("RobotPeer: XQueryExtension(XINPUT) returns major_opcode = %d, first_event = %d, first_error = %d",
-                    major_opcode, first_event, first_error);
-    if (xinputAvailable) {
-        devices = XListInputDevices(awt_display, &numDevices);
-        for (devIdx = 0; devIdx < numDevices; devIdx++) {
-            aDevice = &(devices[devIdx]);
-#ifdef IsXExtensionPointer
-            if (aDevice->use == IsXExtensionPointer) {
-                for (clsIdx = 0; clsIdx < aDevice->num_classes; clsIdx++) {
-                    if (aDevice->inputclassinfo[clsIdx].class == ButtonClass) {
-                        bInfo = (XButtonInfo*)(&(aDevice->inputclassinfo[clsIdx]));
-                        local_num_buttons = bInfo->num_buttons;
-                        DTRACE_PRINTLN1("RobotPeer: XPointer has %d buttons", num_buttons);
-                        break;
-                    }
-                }
-                break;
-            }
-#endif
-            if (local_num_buttons <= 0 ) {
-                if (aDevice->use == IsXPointer) {
-                    for (clsIdx = 0; clsIdx < aDevice->num_classes; clsIdx++) {
-                        if (aDevice->inputclassinfo[clsIdx].class == ButtonClass) {
-                            bInfo = (XButtonInfo*)(&(aDevice->inputclassinfo[clsIdx]));
-                            local_num_buttons = bInfo->num_buttons;
-                            DTRACE_PRINTLN1("RobotPeer: XPointer has %d buttons", num_buttons);
-                            break;
-                        }
-                    }
-                    break;
-                }
-            }
-        }
-
-        XFreeDeviceList(devices);
-    }
-    else {
-        DTRACE_PRINTLN1("RobotPeer: XINPUT extension is unavailable, assuming %d mouse buttons", num_buttons);
-    }
-    if (local_num_buttons == 0 ) {
-        local_num_buttons = 3;
-    }
-
-    return local_num_buttons;
+    return 3;
 }
 
 /*