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 d2fb2bf8d8
commit fbf6a5f597
  1. 47
      gl-dri-natives/pom.xml
  2. 8
      gl-dri-natives/src/main/c/jaggl_dri.c
  3. 25
      pom.xml

@ -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;
} }

@ -309,20 +309,6 @@
<module>nonfree</module> <module>nonfree</module>
</modules> </modules>
</profile> </profile>
<profile>
<id>natives</id>
<activation>
<!-- <activeByDefault> would be nicer, but it deactivates itself if any other profile is active -->
<file>
<exists>.</exists>
</file>
</activation>
<modules>
<module>gl-natives</module>
<module>gl-dri-natives</module>
<module>misc-natives</module>
</modules>
</profile>
<profile> <profile>
<id>mac</id> <id>mac</id>
<activation> <activation>
@ -330,6 +316,9 @@
<family>mac</family> <family>mac</family>
</os> </os>
</activation> </activation>
<modules>
<module>gl-natives</module>
</modules>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
@ -360,6 +349,10 @@
<name>!mac os x</name> <name>!mac os x</name>
</os> </os>
</activation> </activation>
<modules>
<module>gl-natives</module>
<module>gl-dri-natives</module>
</modules>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
@ -391,6 +384,10 @@
<family>windows</family> <family>windows</family>
</os> </os>
</activation> </activation>
<modules>
<module>gl-natives</module>
<module>misc-natives</module>
</modules>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>

Loading…
Cancel
Save