[127937] trunk/dports/devel/icu/Portfile
mcalhoun at macports.org
mcalhoun at macports.org
Sat Nov 8 08:45:53 PST 2014
Revision: 127937
https://trac.macports.org/changeset/127937
Author: mcalhoun at macports.org
Date: 2014-11-08 08:45:53 -0800 (Sat, 08 Nov 2014)
Log Message:
-----------
icu: replace variants doc and doxygen with subports
Modified Paths:
--------------
trunk/dports/devel/icu/Portfile
Modified: trunk/dports/devel/icu/Portfile
===================================================================
--- trunk/dports/devel/icu/Portfile 2014-11-08 15:15:44 UTC (rev 127936)
+++ trunk/dports/devel/icu/Portfile 2014-11-08 16:45:53 UTC (rev 127937)
@@ -2,7 +2,6 @@
# $Id$
PortSystem 1.0
-PortGroup muniversal 1.0
name icu
set my_name icu4c
@@ -11,7 +10,7 @@
# To find dependencies, use:
# port file all | sort -u | xargs grep -E ':icu( |$)' | cut -d / -f 12 | sort -u
version 53.1
-revision 1
+revision 2
categories devel textproc
platforms darwin freebsd
license MIT
@@ -28,16 +27,59 @@
master_sites http://download.icu-project.org/files/${my_name}/${version}/
distname ${my_name}-[join [split ${version} .] _]
+
+worksrcdir ${name}/source
+set docdir ${prefix}/share/doc/${name}
+
+subport ${name}-docs {
+ conflicts ${name}-doxygen-docs
+ supported_archs noarch
+
+ description-append (documentation)
+ long_description-append Documentation.
+
+ distfiles ${distname}-docs.zip
+ checksums rmd160 60ce19f8633c18d670ad2f0b8d7920cd6ed0a314 \
+ sha256 2c700534d52b98615b4baffcf0502f37540604e67817625f05d6e2fbf98d0c0b
+
+ use_zip yes
+ extract.suffix .zip
+ extract.dir ${worksrcpath}/doc/html
+
+ use_configure no
+
+ build {}
+
+ destroot {
+ xinstall -m 755 -d ${destroot}${docdir}
+ copy ${worksrcpath}/doc/html ${destroot}${docdir}
+ }
+}
+
+subport ${name}-doxygen-docs {
+ conflicts ${name}-docs
+ supported_archs noarch
+
+ depends_build port:doxygen
+
+ description-append (build documentation)
+ long_description-append Build documentation.
+
+ build.target doc
+ destroot.target install-doc
+}
+
+if { ${subport} ne "${name}-docs" } {
+ if { ${supported_archs} ne "noarch" } {
+ PortGroup muniversal 1.0
+ }
+
extract.suffix .tgz
distfiles ${distname}-src${extract.suffix}
-checksums ${distname}-src.tgz \
- rmd160 9bd1b4bdc2010545c76a927dcf46049686beeab9 \
+checksums rmd160 9bd1b4bdc2010545c76a927dcf46049686beeab9 \
sha256 6fa74fb5aac070c23eaba1711a7178fe582c59867484c5ec07c49002787a9a28
-worksrcdir ${name}/source
-set docdir ${prefix}/share/doc/${name}
-
patchfiles patch-config-mh-darwin.diff
# icu appends -O2 to the cflags and cxxflags
@@ -63,7 +105,7 @@
# for upstream reports and discussion, see
# http://bugs.icu-project.org/trac/ticket/10308
# http://bugs.icu-project.org/trac/ticket/6102
-if {[variant_isset universal]} {
+if { [variant_exists universal] && [variant_isset universal]} {
merger-post-destroot {
set rebuilton ""
foreach arch ${universal_archs_to_use} {
@@ -90,9 +132,15 @@
} else {
post-destroot {
# stay consistent with the universal build (see comments above)
+ if { [file exists ${destroot}${prefix}/bin/icu-config] } {
reinplace {s| -DSIZEOF_VOID_P=[48]||g} ${destroot}${prefix}/bin/icu-config
+ }
+ if { [file exists ${destroot}${prefix}/lib/icu/${version}/Makefile.inc] } {
reinplace {s| -DSIZEOF_VOID_P=[48]||g} ${destroot}${prefix}/lib/icu/${version}/Makefile.inc
+ }
+ if { [file exists ${destroot}${prefix}/lib/icu/${version}/pkgdata.inc] } {
reinplace -E {s:-arch +[^ ]+::g} ${destroot}${prefix}/lib/icu/${version}/pkgdata.inc
+ }
}
}
@@ -126,11 +174,23 @@
test.target check
test.args VERBOSE=1
+if { ${name} eq ${subport} } {
post-destroot {
xinstall -d ${destroot}${docdir}
eval xinstall -m 0644 [glob ${worksrcpath}/../*.{css,html,txt}] ${destroot}${docdir}
}
+if { [variant_isset doc] } {
+ ui_warn "You have requested an obsolete variant. Replaced by port ${name}-docs"
+ depends_build-append port:${name}-docs
+}
+if { [variant_isset doxygen] } {
+ ui_warn "You have requested an obsolete variant. Replaced by port ${name}-doxygen-docs"
+ depends_build-append port:${name}-doxygen-docs
+}
+
+}
+
# icu @51.2_0 and earlier also installed the following files directly, bypassing destroot:
# ${prefix}/lib/icu/${version}/pkgdata.inc
# These files can be removed from the below deactivation block after August 2014.
@@ -150,34 +210,6 @@
}
}
-variant doc conflicts doxygen description {Install pre-built API documentation} {
- depends_extract-append bin:unzip:unzip
- extract.only ${distname}-src${extract.suffix}
- distfiles-append ${distname}-docs.zip
- checksums-append ${distname}-docs.zip \
- rmd160 60ce19f8633c18d670ad2f0b8d7920cd6ed0a314 \
- sha256 2c700534d52b98615b4baffcf0502f37540604e67817625f05d6e2fbf98d0c0b
-
- post-extract {
- xinstall -m 0755 -d ${worksrcpath}/doc
- system "unzip -q ${distpath}/${distname}-docs.zip -d ${worksrcpath}/doc/html"
- }
-
- post-destroot {
- copy ${worksrcpath}/doc/html ${destroot}${docdir}
- }
-}
-
-variant doxygen conflicts doc universal description {Build and install API documentation} {
- depends_build port:doxygen
- post-build {
- system -W ${worksrcpath} "${build.cmd} doc"
- }
- post-destroot {
- system -W ${worksrcpath} "${build.cmd} install-doc DESTDIR=${destroot}"
- }
-}
-
platform freebsd {
build.env MAKE=/usr/local/bin/gmake
destroot.env MAKE=/usr/local/bin/gmake
@@ -186,6 +218,7 @@
platform darwin 8 {
patchfiles-append patch-common-putil.cpp.diff
}
+}
livecheck.url http://site.icu-project.org/download
livecheck.regex {>ICU4C \((\d+(?:\.\d+)*)\)<}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141108/45b82496/attachment.html>
More information about the macports-changes
mailing list