<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>126</bug_id>
          
          <creation_ts>2005-01-04 07:03:27 +0100</creation_ts>
          <short_desc>Patch to allow building native driver on BSD</short_desc>
          <delta_ts>2015-09-27 03:09:33 +0200</delta_ts>
          <reporter_accessible>0</reporter_accessible>
          <cclist_accessible>0</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>core</component>
          <version>1</version>
          <rep_platform>All</rep_platform>
          <op_sys>bsd</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs></cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>142</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2010-03-24 07:47:14 +0100</bug_when>
    <thetext>


---- Reported by desjardins 2005-01-04 07:03:27 ----

I made changes to the build script and 2 source files in order to get the Native
driver to compile on FreeBSD. The changes will not effect any other OS, and
should also work on Net/OpenBSD.

Id be happy to verify them once they get included in a build.

If they work, is there any chance of getting a precompiled Native FreeBSD
release available in the future?

---

diff -r jogl-src-orig/make/build.xml jogl-src/make/build.xml
198d197
&lt;         &lt;property name=&quot;java.includes.dir.linux&quot;
value=&quot;${java.includes.dir}/linux&quot; /&gt;
199a199,200
&gt;         &lt;property name=&quot;java.includes.dir.linux&quot;
value=&quot;${java.includes.dir}/linux&quot; /&gt;
&gt;         &lt;property name=&quot;java.includes.dir.freebsd&quot;
value=&quot;${java.includes.dir}/freebsd&quot; /&gt;
202a204
&gt;         &lt;property name=&quot;java.lib.dir.freebsd&quot;
value=&quot;${java.home.dir}/jre/lib/i386&quot; /&gt;
305a308,315
&gt;     &lt;target name=&quot;declare.freebsd&quot; depends=&quot;declare.x11&quot;&gt;
&gt;         &lt;property name=&quot;java.includes.dir.platform&quot;          
value=&quot;${java.includes.dir.freebsd}&quot; /&gt;
&gt;         &lt;property name=&quot;java.lib.dir.platform&quot;               
value=&quot;${java.lib.dir.freebsd}&quot; /&gt;
&gt; 
&gt;         &lt;property name=&quot;compiler.cfg.id&quot;                     
value=&quot;compiler.cfg.linux&quot; /&gt;
&gt;         &lt;property name=&quot;linker.cfg.id&quot;                       
value=&quot;linker.cfg.linux&quot; /&gt;
&gt;     &lt;/target&gt;
&gt; 
787a798
&gt;           &lt;includepath path=&quot;/usr/X11R6/include&quot;/&gt;
1050a1062,1070
&gt; 
&gt;     &lt;target name=&quot;freebsd&quot; depends=&quot;declare.freebsd&quot;&gt;
&gt;         &lt;!-- Generate, compile, and build the jar for the Java sources. --&gt;
&gt;         &lt;antcall target=&quot;jar&quot; inheritRefs=&quot;true&quot; /&gt;
&gt; 
&gt;         &lt;!-- Compile the native C sources and build the jogl lib. --&gt;
&gt;         &lt;antcall target=&quot;c.compile.jogl.linux&quot; /&gt;
&gt;     &lt;/target&gt;
&gt; 

-----

diff -r jogl-src-orig/src/native/jogl/JAWT_DrawingSurfaceInfo.c
jogl-src/src/native/jogl/JAWT_DrawingSurfaceInfo.c
45c45
&lt; #elif defined(linux) || defined(__sun)
---
&gt; #elif defined(linux) || defined(__sun) || defined(__FreeBSD__)

----

diff -r jogl-src-orig/src/net/java/games/gluegen/StructLayout.java
jogl-src/src/net/java/games/gluegen/StructLayout.java
125d124
&lt;         (os.startsWith(&quot;linux&quot;) &amp;&amp; cpu.equals(&quot;i386&quot;)) ||
126a126,127
&gt;         (os.startsWith(&quot;linux&quot;) &amp;&amp; cpu.equals(&quot;i386&quot;)) ||
&gt;         (os.startsWith(&quot;freebsd&quot;) &amp;&amp; cpu.equals(&quot;i386&quot;)) ||



---- Additional Comments From kbr 2005-01-27 19:27:58 ----

Thanks for the patch. A slightly modified version which didn&apos;t perturb the Linux
portions of build.xml in any way was just checked in. I&apos;m marking this bug as
fixed; please reopen it if the changes don&apos;t work. As for supporting FreeBSD in
the official JOGL builds, we will try to do that once we have our nightly build
system completely on-line. Feel free to file a low-priority RFE about that.




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:47 EDT  ---

This bug was previously known as _bug_ 126 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=126
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>