[98556] trunk/dports/databases/db46/Portfile
blair at macports.org
blair at macports.org
Mon Oct 8 12:26:42 PDT 2012
Revision: 98556
http://trac.macports.org//changeset/98556
Author: blair at macports.org
Date: 2012-10-08 12:26:42 -0700 (Mon, 08 Oct 2012)
Log Message:
-----------
db46: add db46-java subport so that other ports can depend on it.
Delete the no_java variant since the variant has been removed. The
java variant now prints a note that the db46-java port should be
installed.
Modified Paths:
--------------
trunk/dports/databases/db46/Portfile
Modified: trunk/dports/databases/db46/Portfile
===================================================================
--- trunk/dports/databases/db46/Portfile 2012-10-08 17:26:37 UTC (rev 98555)
+++ trunk/dports/databases/db46/Portfile 2012-10-08 19:26:42 UTC (rev 98556)
@@ -5,7 +5,7 @@
name db46
version 4.6.21
-revision 6
+revision 7
set branch [join [lrange [split ${version} .] 0 1] {}]
categories databases
license Sleepycat
@@ -71,20 +71,15 @@
}
}
-post-destroot {
- foreach bin [glob -tails -directory ${destroot}${prefix}/bin/ db_*] {
- set newbin [regsub {^db_} ${bin} "db${branch}_"]
- move ${destroot}${prefix}/bin/${bin} \
- ${destroot}${prefix}/bin/${newbin}
- }
-}
+subport ${name}-java {
+ depends_lib-append port:${name}
-variant java conflicts no_java description {Build the Java API} {
configure.args-append --enable-java
+
platform macosx {
pre-configure {
if {![file isfile "/System/Library/Frameworks/JavaVM.framework/Headers/jni.h"]} {
- ui_error "${name} requires the Java for Mac OS X development headers."
+ ui_error "${subport} requires the Java for Mac OS X development headers."
if {${os.major} == 10} {
ui_error "Download the Java Developer Package from: <https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719>"
} elseif {${os.major} == 9} {
@@ -97,16 +92,52 @@
}
}
}
-variant no_java conflicts java description {Legacy compatibility variant} {}
-if {[variant_isset no_java]} {
- default_variants -java
-} elseif {${os.subplatform} == "macosx" && ${os.major} < 11} {
- default_variants +java
-}
-variant tcl description {build Tcl API} {
- depends_lib-append port:tcl
- configure.args-append --enable-tcl --with-tcl=${prefix}/lib
+if {$subport == $name} {
+ post-destroot {
+ foreach bin [glob -tails -directory ${destroot}${prefix}/bin/ db_*] {
+ set newbin [regsub {^db_} ${bin} "db${branch}_"]
+ move ${destroot}${prefix}/bin/${bin} \
+ ${destroot}${prefix}/bin/${newbin}
+ }
+
+ delete ${destroot}${prefix}/share/doc/${name}/java
+ }
+
+ # Delete this variant on or after 2013-10-08.
+ variant java description "Java API - moved to ${name}-java port" {
+ notes "${name}'s +java variant has been replaced with the ${name}-java port."
+ }
+
+ variant tcl description {build Tcl API} {
+ depends_lib-append port:tcl
+ configure.args-append --enable-tcl --with-tcl=${prefix}/lib
+ }
+} else {
+ # There is no Java specific install target, so delete everything
+ # but the Java related files.
+ post-destroot {
+ set p ${destroot}${prefix}
+
+ delete ${p}/bin
+ delete ${p}/include
+
+ # Install the docs into the main ports's doc directory so that
+ # the link in index.html to java/index.html works.
+ foreach f [lsort [glob -tails -directory ${p}/share/doc/${name} *]] {
+ if {${f} != {java}} {
+ delete ${p}/share/doc/${name}/${f}
+ }
+ }
+ ln -s ${name} ${p}/share/doc/${subport}
+
+ foreach f [lsort [glob -tails -directory ${p}/lib/${name} *]] {
+ if { ${f} != {db.jar}
+ && [string compare -length 10 {libdb_java} ${f}]} {
+ delete ${p}/lib/${name}/${f}
+ }
+ }
+ }
}
if { [variant_isset universal] } {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121008/5b0cee13/attachment.html>
More information about the macports-changes
mailing list