<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[114790] users/landonf/openjdk7/dports/java/openjdk7</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/114790">114790</a></dd>
<dt>Author</dt> <dd>landonf@macports.org</dd>
<dt>Date</dt> <dd>2013-12-15 06:55:11 -0800 (Sun, 15 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Inject the upstream JDK7 Rhino sources into the OpenJDK build; this provides support for the JavaScript scripting engine.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#userslandonfopenjdk7dportsjavaopenjdk7Portfile">users/landonf/openjdk7/dports/java/openjdk7/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#userslandonfopenjdk7dportsjavaopenjdk7filespatchrhino">users/landonf/openjdk7/dports/java/openjdk7/files/patch-rhino</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="userslandonfopenjdk7dportsjavaopenjdk7Portfile"></a>
<div class="modfile"><h4>Modified: users/landonf/openjdk7/dports/java/openjdk7/Portfile (114789 => 114790)</h4>
<pre class="diff"><span>
<span class="info">--- users/landonf/openjdk7/dports/java/openjdk7/Portfile        2013-12-15 14:18:21 UTC (rev 114789)
+++ users/landonf/openjdk7/dports/java/openjdk7/Portfile        2013-12-15 14:55:11 UTC (rev 114790)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> set jdk_build_date      26_aug_2013
</span><span class="cx"> 
</span><span class="cx"> version             ${jdk_major_version}.${jport_minor_version}.${jport_build_number}
</span><del>-revision            3
</del><ins>+revision            4
</ins><span class="cx"> 
</span><span class="cx"> categories          java
</span><span class="cx"> maintainers         landonf openmaintainer
</span><span class="lines">@@ -47,21 +47,25 @@
</span><span class="cx"> # Use our own version of ant to avoid circular dependencies
</span><span class="cx"> set ant_version     1.8.4
</span><span class="cx"> set ant_distfile    apache-ant-${ant_version}-bin
</span><ins>+set rhino_distfile  rhino_jdk7.tar.gz
</ins><span class="cx"> 
</span><span class="cx"> use_zip             yes
</span><span class="cx"> distname            openjdk-${jdk_major_version}u${jdk_minor_version}-fcs-src-b${jdk_build_number}-${jdk_build_date}
</span><span class="cx"> distfiles           ${distname}${extract.suffix} \
</span><del>-                    ${ant_distfile}${extract.suffix}:ant
</del><ins>+                    ${ant_distfile}${extract.suffix}:ant \
+                    ${rhino_distfile}:rhino
</ins><span class="cx"> 
</span><span class="cx"> master_sites        http://download.java.net/openjdk/jdk${jdk_major_version}u${jdk_minor_version}/promoted/b${jdk_build_number}/ \
</span><ins>+                    http://download.oracle.com/otn-pub/oss/jdk/:rhino \
</ins><span class="cx">                     apache:ant/binaries:ant
</span><span class="cx"> 
</span><del>-checksums           ${distname}${extract.suffix} sha256  00f8ea561876cbcad174ba3ca7a9ae10b50df46a782ac64c2ac57ac357b50596 \
-                    \
-                    ${ant_distfile}${extract.suffix} sha256 d49d60bc0468279125e4a0db4d9b6637cab342a4bd736c90c0b71865b26c1479
</del><ins>+checksums           ${distname}${extract.suffix}        sha256 00f8ea561876cbcad174ba3ca7a9ae10b50df46a782ac64c2ac57ac357b50596 \
+                    ${rhino_distfile}                   sha256 cfd2459bd77e90c7b4fe3092af8b82f34f649f9c91bf59fabaf24a46d9bbb9c2 \
+                    ${ant_distfile}${extract.suffix}    sha256 d49d60bc0468279125e4a0db4d9b6637cab342a4bd736c90c0b71865b26c1479
</ins><span class="cx"> 
</span><span class="cx"> patchfiles          patch-jdk7u45-b18 \
</span><del>-                    patch-src-os-bsd-vm-os_bsd.cpp
</del><ins>+                    patch-src-os-bsd-vm-os_bsd.cpp \
+                    patch-rhino
</ins><span class="cx"> 
</span><span class="cx"> use_configure       no
</span><span class="cx"> use_parallel_build  no
</span><span class="lines">@@ -81,7 +85,7 @@
</span><span class="cx">                     port:ghc \
</span><span class="cx">                     port:ruby
</span><span class="cx"> 
</span><del>-# Check if the bootstrap is required
</del><ins>+# Find a usable bootstrap VM
</ins><span class="cx"> if {[file exists ${prefix}/share/java/openjdk7/bin/java]} {
</span><span class="cx">     # A previous OpenJDK7 release is already installed
</span><span class="cx">     set bootflags   {}
</span><span class="lines">@@ -99,9 +103,22 @@
</span><span class="cx">     set bootstrapvm [exec /usr/libexec/java_home -v 1.6]
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+# Extract the Rhino sources. This has to e done manually, as MacPorts
+# does not support extracting multiple types of distfiles automatically.
+extract.only-delete ${rhino_distfile}
+post-extract {
+    set expand &quot;gzip -cd ${distpath}/${rhino_distfile}&quot;
+    set untar &quot;${portutil::autoconf::tar_command} -xf -&quot;
+    system -W ${workpath} &quot;${expand} | ${untar}&quot;
+}
+
</ins><span class="cx"> worksrcdir          &quot;openjdk&quot;
</span><ins>+set rhino_srcpath   &quot;${workpath}/rhino_jdk7&quot;
</ins><span class="cx"> 
</span><span class="cx"> post-patch {
</span><ins>+    # Inject the Rhino sources
+    file copy &quot;${rhino_srcpath}/src/sun/org&quot; &quot;${worksrcpath}/jdk/src/share/classes/sun&quot;
+
</ins><span class="cx">     # Allow loading of extensions and libraries from $prefix
</span><span class="cx">     reinplace &quot;s|@@PREFIX@@|${prefix}|g&quot; &quot;${worksrcpath}/hotspot/src/os/bsd/vm/os_bsd.cpp&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -112,7 +129,7 @@
</span><span class="cx">         &quot;${worksrcpath}/jdk/src/macosx/native/jobjc/JObjC.xcodeproj/project.pbxproj&quot;
</span><span class="cx"> 
</span><span class="cx">     # Fix missing executable permissions on the code generator
</span><del>-    file attributes &quot;${worksrcpath}/jdk/src/macosx/native/jobjc/src/core/PrimitiveCoder.hs&quot; -permissions 0755 
</del><ins>+    file attributes &quot;${worksrcpath}/jdk/src/macosx/native/jobjc/src/core/PrimitiveCoder.hs&quot; -permissions 0755
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> # Override the overzealous setting of build environmental variables and settings. These
</span><span class="lines">@@ -181,10 +198,17 @@
</span><span class="cx">     set src_bundle_name &quot;jdk1.${jdk_major_version}.0_${jport_minor_version}.jdk&quot;
</span><span class="cx"> 
</span><span class="cx">     set bundle_path &quot;${prefix}/Library/Java/JavaVirtualMachines/${target_bundle_name}&quot;
</span><del>-    set path &quot;${destroot}${bundle_path}/&quot;
-    xinstall -m 755 -d ${path}
-    system &quot;(cd \&quot;${worksrcpath}/build/macosx-${openjdk_build_arch}/j2sdk-bundle/${src_bundle_name}\&quot; &amp;&amp; tar cf - *) | (tar -C \&quot;${path}\&quot; -xf -)&quot;
</del><ins>+    set destroot_bundle_path &quot;${destroot}${bundle_path}/&quot;
+    xinstall -m 755 -d ${destroot_bundle_path}
+    system &quot;(cd \&quot;${worksrcpath}/build/macosx-${openjdk_build_arch}/j2sdk-bundle/${src_bundle_name}\&quot; &amp;&amp; tar cf - *) | (tar -C \&quot;${destroot_bundle_path}\&quot; -xf -)&quot;
</ins><span class="cx"> 
</span><ins>+    # Embed the Rhino sources in the bundle
+    set demo_rhino_path ${destroot_bundle_path}/Contents/Home/demo/scripting/rhino
+    xinstall -m 755 -d ${demo_rhino_path}
+
+    system -W ${rhino_srcpath}/src {zip -r ../src.zip *}
+    xinstall -m 644 ${rhino_srcpath}/README.txt ${rhino_srcpath}/LICENSE ${rhino_srcpath}/src.zip ${demo_rhino_path}
+
</ins><span class="cx">     # Create a standard path for our Java Home; this is intended to be used by ports (and users)
</span><span class="cx">     # that don't want to reference the version-and-build-specific bundle path.
</span><span class="cx">     ln -sf &quot;Library/Java/JavaVirtualMachines/${target_bundle_name}/Contents/Home&quot; &quot;${destroot}${prefix}/${name}&quot;
</span></span></pre></div>
<a id="userslandonfopenjdk7dportsjavaopenjdk7filespatchrhino"></a>
<div class="addfile"><h4>Added: users/landonf/openjdk7/dports/java/openjdk7/files/patch-rhino (0 => 114790)</h4>
<pre class="diff"><span>
<span class="info">--- users/landonf/openjdk7/dports/java/openjdk7/files/patch-rhino                                (rev 0)
+++ users/landonf/openjdk7/dports/java/openjdk7/files/patch-rhino        2013-12-15 14:55:11 UTC (rev 114790)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+--- jdk/make/sun/Makefile.orig        2013-12-15 09:17:06.000000000 -0500
++++ jdk/make/sun/Makefile        2013-12-15 09:24:22.000000000 -0500
+@@ -31,11 +31,8 @@
+ PRODUCT  = sun
+ include $(BUILDDIR)/common/Defs.gmk

+-# Rhino/Mozilla java sources
+-ORG_EXISTS := $(call DirExists,$(CLOSED_SRC)/share/classes/sun/org,,)
+-ifneq (&quot;$(ORG_EXISTS)&quot;, &quot;&quot;)
+-  ORG_SUBDIR = org
+-endif
++# Rhino/Mozilla Sources
++ORG_SUBDIR = org

+ # Non windows subdirs
+ ifneq ($(PLATFORM), windows)
+--- jdk/make/com/sun/Makefile.orig        2013-12-15 09:18:11.000000000 -0500
++++ jdk/make/com/sun/Makefile        2013-12-15 09:24:05.000000000 -0500
+@@ -31,12 +31,8 @@
+ PRODUCT = sun
+ include $(BUILDDIR)/common/Defs.gmk

+-ifndef OPENJDK
+-  ORG_EXISTS := $(call DirExists,$(CLOSED_SRC)/share/classes/sun/org,,)
+-  ifneq (&quot;$(ORG_EXISTS)&quot;, &quot;&quot;) 
+-    SCRIPT_SUBDIR = script
+-  endif
+-endif
++# Rhino script bindings
++SCRIPT_SUBDIR = script

+ # jarsigner is part of JRE
+ SUBDIRS = java security net/ssl jarsigner
</ins></span></pre>
</div>
</div>

</body>
</html>