[114748] users/landonf/openjdk7/dports/java/openjdk6/Portfile

landonf at macports.org landonf at macports.org
Sat Dec 14 12:28:09 PST 2013


Revision: 114748
          https://trac.macports.org/changeset/114748
Author:   landonf at macports.org
Date:     2013-12-14 12:28:09 -0800 (Sat, 14 Dec 2013)
Log Message:
-----------
Checkpoint of version that successfully builds to completion.

Modified Paths:
--------------
    users/landonf/openjdk7/dports/java/openjdk6/Portfile

Modified: users/landonf/openjdk7/dports/java/openjdk6/Portfile
===================================================================
--- users/landonf/openjdk7/dports/java/openjdk6/Portfile	2013-12-14 20:27:31 UTC (rev 114747)
+++ users/landonf/openjdk7/dports/java/openjdk6/Portfile	2013-12-14 20:28:09 UTC (rev 114748)
@@ -25,8 +25,6 @@
                     Classpath exception. The Java Hotspot virtual machine source code is \
                     licensed under the GPL version 2 only.
 
-supported_archs     x86_64
-
 # Licensed GPLv2-CPE. See also:
 # - http://openjdk.java.net/legal/gplv2+ce.html
 # - http://en.wikipedia.org/wiki/GPL_linking_exception#The_classpath_exception
@@ -59,8 +57,12 @@
                     port:xorg-libXtst \
                     port:dejavu-fonts
 
-# Java 8 should support clang directly
-depends_build       port:llvm-gcc42
+# NOTES:
+# OpenJDK7 requires gcc/llvm-gcc; java 8 should support clang directly
+# Apple's jobjc depends on both Ruby and Haskell. Go figure.
+depends_build       port:llvm-gcc42 \
+                    port:ghc \
+                    port:ruby
 
 # Check if the bootstrap is required
 if {[file exists ${prefix}/share/java/openjdk7/bin/java]} {
@@ -80,6 +82,17 @@
 
 worksrcdir          "openjdk"
 
+post-patch {
+    # The jobjc build system includes hard-coded references to /usr/bin/ant; Java build tools (such as ant)
+    # are no longer shipped with Xcode 5.0+ on Mavericks.
+    reinplace "s|/usr/bin/ant|${workpath}/apache-ant-${ant_version}/bin/ant|g" \
+        "${worksrcpath}/jdk/make/java/jobjc/Makefile" \
+        "${worksrcpath}/jdk/src/macosx/native/jobjc/JObjC.xcodeproj/project.pbxproj"
+
+    # Fix missing executable permissions on the code generator
+    file attributes "${worksrcpath}/jdk/src/macosx/native/jobjc/src/core/PrimitiveCoder.hs" -permissions 0755 
+}
+
 # Override the overzealous setting of build environmental variables and settings. These
 # assume the use of (a well-behaved) autoconf, and cause an assortment of odd build failures when
 # used with OpenJDK's build system.
@@ -90,14 +103,28 @@
 build.pre_args {}
 build.post_args {}
 
+# Determine the OpenJDK architecture name
+supported_archs     x86_64
+if {${build_arch} == "i386"} {
+    set openjdk_build_arch "i586"
+} elseif {${build_arch} == "x86_64"} {
+    set openjdk_build_arch "${build_arch}"
+} else {
+    # Unknown architecture
+    return -error "Platform unsupported"
+}
+
+# LLVM GCC is required by the build, but no longer shipped in Xcode.
+# In addition, Mavericks has marked a number of APIs required by JDK 7
+# as deprecated, mandating the use of -Wno-deprecated-declarations
 build.args \
     CC="${prefix}/bin/llvm-gcc-4.2" \
     CXX="${prefix}/bin/llvm-g++-4.2" \
+    EXTRA_CFLAGS="-Wno-deprecated-declarations -I\"${filespath}/clang-compat-headers\"" \
     LANG="C" \
     "${bootflags}" \
     ALT_BOOTDIR="${bootstrapvm}" \
     ALT_COMPILER_PATH="${prefix}" \
-    ANT_HOME="${prefix}/share/java/apache-ant" \
     ANT_HOME="${workpath}/apache-ant-${ant_version}" \
     ALT_FREETYPE_HEADERS_PATH="${prefix}/include" \
     ALT_FREETYPE_LIB_PATH="${prefix}/lib" \
@@ -116,11 +143,8 @@
     MILESTONE=fcs \
     HOTSPOT_BUILD_JOBS="${build.jobs}"
 
-
-#ALT_CUPS_HEADERS_PATH="/usr/include"
-
 destroot {
     set path "${destroot}${prefix}/share/java/${name}/"
     xinstall -m 755 -d ${path}
-    system "(cd ${worksrcpath}/build/macosx-universal/j2sdk-image && tar cf - *) | (tar -C ${path} -xf -)"
+    system "(cd ${worksrcpath}/build/macosx-${openjdk_build_arch}/j2sdk-image && tar cf - *) | (tar -C ${path} -xf -)"
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131214/21a905a9/attachment.html>


More information about the macports-changes mailing list