aboutsummaryrefslogtreecommitdiff
blob: f51157d1853a897699176b38b0f43da0883d4162 (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
Description: Fixes the build failure with Java 10
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/java/net/highteq/nativetaglet/NativeTaglet.java
+++ /dev/null
@@ -1,237 +0,0 @@
-package net.highteq.nativetaglet;
-
-import com.sun.tools.doclets.Taglet;
-import com.sun.javadoc.*;
-
-import java.util.Map;
-import java.util.Properties;
-import java.util.Iterator;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.MalformedURLException;
-
-public class NativeTaglet implements Taglet
-{
-  private Properties mapping= null;
-  private static final String NAME = "native";
-
-  /**
-   * Return the name of this custom tag.
-   */
-  @Override
-  public String getName()
-  {
-    return NAME;
-  }
-
-  /**
-   * @return true since this tag can be used in a field
-   *         doc comment
-   */
-  @Override
-  public boolean inField()
-  {
-    return true;
-  }
-
-  /**
-   * @return true since this tag can be used in a constructor
-   *         doc comment
-   */
-  @Override
-  public boolean inConstructor()
-  {
-    return true;
-  }
-
-  /**
-   * @return true since this tag can be used in a method
-   *         doc comment
-   */
-  @Override
-  public boolean inMethod()
-  {
-    return true;
-  }
-
-  /**
-   * @return true since this tag can be used in an overview
-   *         doc comment
-   */
-  @Override
-  public boolean inOverview()
-  {
-    return true;
-  }
-
-  /**
-   * @return true since this tag can be used in a package
-   *         doc comment
-   */
-  @Override
-  public boolean inPackage()
-  {
-    return true;
-  }
-
-  /**
-   * @return true since this
-   */
-  @Override
-  public boolean inType()
-  {
-    return true;
-  }
-
-  /**
-   * Will return true since this is an inline tag.
-   *
-   * @return true since this is an inline tag.
-   */
-
-  @Override
-  public boolean isInlineTag()
-  {
-    return true;
-  }
-
-  /**
-   * Register this Taglet.
-   *
-   * @param tagletMap the map to register this tag to.
-   */
-  public static void register(final Map tagletMap)
-  {
-    final NativeTaglet tag = new NativeTaglet();
-    final Taglet t = (Taglet) tagletMap.get(tag.getName());
-    if (t != null)
-      {
-        tagletMap.remove(tag.getName());
-      }
-    tagletMap.put(tag.getName(), tag);
-  }
-
-  /**
-   * Given the <code>Tag</code> representation of this custom
-   * tag, return its string representation.
-   *
-   * @param tag the <code>Tag</code> representation of this custom tag.
-   */
-  @Override
-  public String toString(final Tag tag)
-  {
-    String text= tag.text().trim();
-    if(mapping== null)
-      {
-        mapping= new Properties();
-        InputStream in= null;
-        try
-          {
-            URL url;
-            try
-              {
-                url = new URL(System.getProperty("nativetaglet.mapping","file:native-taglet.properties"));
-              }
-            catch (final MalformedURLException e)
-              {
-                url = new URL("file:"+System.getProperty("nativetaglet.mapping","file:native-taglet.properties"));
-              }
-            in= url.openStream();
-            mapping.load(in);
-          }
-        catch (final Exception e)
-          {
-            System.err.println("[NATIVE TAGLET] Could not read mapping file");
-            System.err.println("-->");
-            e.printStackTrace(System.err);
-            System.err.println("<--");
-            System.err.println("[NATIVE TAGLET] !!! NO LINKS WILL BE GENERATED !!!");
-          }
-        finally
-          {
-            if(in!=null) try{ in.close(); }catch(final Exception ignore){}
-          }
-      }
-
-    if(mapping!=null)
-      {
-        // First check to see whether this key exists in the mapping
-        String url = mapping.getProperty(text);
-        if (url == null) {
-          // Try iterating the keySet seeing if we can find a partial match
-          // In the OpenGL spec this handles the case of glVertex -> glVertex3f
-          for(final Iterator i= mapping.keySet().iterator(); i.hasNext();) {
-            final String name= (String) i.next();
-            if (hasOpenGLSuffix(text, name)) {
-              url = mapping.getProperty(name);
-              break;
-            }
-          }
-        }
-        if (url != null) {
-          url = mapping.getProperty("nativetaglet.baseUrl", "") + url;
-          text = "<a href=\"" + url + "\">" + text + "</a>";
-        }
-      }
-    return text;
-  }
-
-  private static final String[] openGLSuffixes = {
-    "b",
-    "s",
-    "i",
-    "f",
-    "d",
-    "ub",
-    "us",
-    "ui",
-    "bv",
-    "sv",
-    "iv",
-    "fv",
-    "dv",
-    "ubv",
-    "usv",
-    "uiv"
-  };
-  private static boolean hasOpenGLSuffix(final String name,
-                                         final String baseName) {
-    if (!name.startsWith(baseName)) {
-      return false;
-    }
-    for (int i = 0; i < openGLSuffixes.length; i++) {
-      final String suffix = openGLSuffixes[i];
-      if (name.endsWith(suffix)) {
-        // First see whether it's a simple concatenation
-        if (name.equals(baseName + suffix)) {
-          return true;
-        }
-        // Now chop prefix and suffix off and see whether the
-        // resulting is a number
-        try {
-          final String tmp = name.substring(baseName.length(),
-                                      name.length() - suffix.length());
-          if (tmp.length() == 1 &&
-              Character.isDigit(tmp.charAt(0))) {
-            return true;
-          }
-        } catch (final IndexOutOfBoundsException e) {
-        }
-      }
-    }
-    return false;
-  }
-
-  /**
-   * This method should not be called since arrays of inline tags do not
-   * exist.  Method {@link #tostring(Tag)} should be used to convert this
-   * inline tag to a string.
-   *
-   * @param tags the array of <code>Tag</code>s representing of this custom tag.
-   */
-  @Override
-  public String toString(final Tag[] tags)
-  {
-    return null;
-  }
-}
--- a/make/build.xml
+++ b/make/build.xml
@@ -466,9 +466,6 @@
       <fail message="Requires '${compiler.cfg.id}'"      unless="compiler.cfg.id"/>
       <fail message="Requires '${linker.cfg.id}'"        unless="linker.cfg.id"/>
 
-      <javah destdir="${src.generated.c}"         classpath="${classes}" class="com.jogamp.common.os.Platform, com.jogamp.common.nio.PointerBuffer, jogamp.common.jvm.JVMUtil, com.jogamp.common.util.JarUtil, jogamp.common.os.MachineDataInfoRuntime" />
-      <javah destdir="${src.generated.c}/Unix"    classpath="${classes}" class="jogamp.common.os.UnixDynamicLinkerImpl" />
-      <javah destdir="${src.generated.c}/Windows" classpath="${classes}" class="jogamp.common.os.WindowsDynamicLinkerImpl"/>
 
       <echo message="Output lib name = ${output.lib.name} -> ${output.lib.name.os}" />
 
@@ -746,6 +743,7 @@
 
     <!-- Compile gluegen-rt first -->
     <javac destdir="${classes}"
+           nativeHeaderDir="${src.generated.c}"
            includeAntRuntime="false"
            includes="${gluegen-rt.classes} ${jogamp.common.classes}"
            excludes="${gluegen.excludes.all} ${java.part.android}"