Stop building OS-specific modules on all systems

They were only built on all systems for the benefit of the site plugin,
but I'm not intending to use that any more.
master
Graham 5 years ago
parent 9bc88b8cc3
commit ed80e95428
  1. 47
      gl-dri-natives/pom.xml
  2. 8
      gl-dri-natives/src/main/c/jaggl_dri.c

@ -21,33 +21,22 @@
<openrs2.root>${project.parent.basedir}</openrs2.root> <openrs2.root>${project.parent.basedir}</openrs2.root>
</properties> </properties>
<profiles> <build>
<profile> <plugins>
<id>unix</id> <plugin>
<activation> <groupId>com.github.maven-nar</groupId>
<os> <artifactId>nar-maven-plugin</artifactId>
<family>unix</family> <configuration>
<name>!mac os x</name> <linker>
</os> <sysLibs>
</activation> <sysLib>
<build> <type>shared</type>
<plugins> <name>dl</name>
<plugin> </sysLib>
<groupId>com.github.maven-nar</groupId> </sysLibs>
<artifactId>nar-maven-plugin</artifactId> </linker>
<configuration> </configuration>
<linker> </plugin>
<sysLibs> </plugins>
<sysLib> </build>
<type>shared</type>
<name>dl</name>
</sysLib>
</sysLibs>
</linker>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project> </project>

@ -1,14 +1,11 @@
#include "jaggl_X11_dri.h" #include "jaggl_X11_dri.h"
#if defined(__unix__)
#include <dlfcn.h> #include <dlfcn.h>
#include <stddef.h> #include <stddef.h>
static void *jaggl_dri_handle; static void *jaggl_dri_handle;
#endif
JNIEXPORT jboolean JNICALL Java_jaggl_X11_dri_open(JNIEnv *env, jclass cls, jstring path) { JNIEXPORT jboolean JNICALL Java_jaggl_X11_dri_open(JNIEnv *env, jclass cls, jstring path) {
#if defined(__unix__)
if (jaggl_dri_handle) { if (jaggl_dri_handle) {
dlclose(jaggl_dri_handle); dlclose(jaggl_dri_handle);
jaggl_dri_handle = NULL; jaggl_dri_handle = NULL;
@ -19,19 +16,14 @@ JNIEXPORT jboolean JNICALL Java_jaggl_X11_dri_open(JNIEnv *env, jclass cls, jstr
(*env)->ReleaseStringUTFChars(env, path, path_str); (*env)->ReleaseStringUTFChars(env, path, path_str);
return jaggl_dri_handle != NULL; return jaggl_dri_handle != NULL;
#else
return JNI_FALSE;
#endif
} }
JNIEXPORT jboolean JNICALL Java_jaggl_X11_dri_close(JNIEnv *env, jclass cls) { JNIEXPORT jboolean JNICALL Java_jaggl_X11_dri_close(JNIEnv *env, jclass cls) {
#if defined(__unix__)
if (jaggl_dri_handle) { if (jaggl_dri_handle) {
dlclose(jaggl_dri_handle); dlclose(jaggl_dri_handle);
jaggl_dri_handle = NULL; jaggl_dri_handle = NULL;
return JNI_TRUE; return JNI_TRUE;
} }
#endif
return JNI_FALSE; return JNI_FALSE;
} }

Loading…
Cancel
Save