[97016] users/cal/ports/_resources/port1.0/group/haskellplatform-1.0.tcl
cal at macports.org
cal at macports.org
Fri Aug 24 11:03:33 PDT 2012
Revision: 97016
https://trac.macports.org/changeset/97016
Author: cal at macports.org
Date: 2012-08-24 11:03:32 -0700 (Fri, 24 Aug 2012)
Log Message:
-----------
haskellplatform-group: allow disabling (un)?register.sh for non-library ports
Modified Paths:
--------------
users/cal/ports/_resources/port1.0/group/haskellplatform-1.0.tcl
Modified: users/cal/ports/_resources/port1.0/group/haskellplatform-1.0.tcl
===================================================================
--- users/cal/ports/_resources/port1.0/group/haskellplatform-1.0.tcl 2012-08-24 17:55:56 UTC (rev 97015)
+++ users/cal/ports/_resources/port1.0/group/haskellplatform-1.0.tcl 2012-08-24 18:03:32 UTC (rev 97016)
@@ -31,15 +31,18 @@
#
# Usage:
# PortGroup haskell-platform 1.0
-# haskellplatform.setup haskell_package version
+# haskellplatform.setup haskell_package version [register_scripts]
# where haskell_package is the name of the package (eg, digest), version is the
# version for it. This automatically defines name, version, categories,
# homepage, master_sites, distname, and depends_build as appropriate, and sets
# up the configure, build, destroot, and post-activate stages. It can do
-# pre-deactivate if that ever becomes an option in MacPorts.
+# pre-deactivate if that ever becomes an option in MacPorts. register_scripts
+# can be used to deactivate installing register.sh and unregister.sh as might be
+# needed for non-library parts of the haskell platform. Set it to "no" to
+# achieve this; defaults to "yes".
-proc haskellplatform.setup {package version} {
+proc haskellplatform.setup {package version {register_scripts "yes"}} {
global homepage prefix configure.cmd configure.cc destroot worksrcpath name master_sites
name hs-platform-[string tolower ${package}]
@@ -64,19 +67,21 @@
destroot.cmd ${configure.cmd}
destroot.destdir
destroot.target Setup copy --destdir=${destroot}
- post-destroot {
- system "cd ${worksrcpath} && ${configure.cmd} Setup register --gen-script"
- system "cd ${worksrcpath} && ${configure.cmd} Setup unregister --gen-script"
- xinstall -m 755 -d ${destroot}${prefix}/libexec/${name}
- xinstall -m 755 -W ${worksrcpath} register.sh unregister.sh \
- ${destroot}${prefix}/libexec/${name}
- }
- post-activate {
- system "${prefix}/libexec/${name}/register.sh"
- }
- pre-deactivate {
- system "${prefix}/libexec/${name}/unregister.sh"
- }
+ if {${register_scripts} == "yes"} {
+ post-destroot {
+ system "cd ${worksrcpath} && ${configure.cmd} Setup register --gen-script"
+ system "cd ${worksrcpath} && ${configure.cmd} Setup unregister --gen-script"
+ xinstall -m 755 -d ${destroot}${prefix}/libexec/${name}
+ xinstall -m 755 -W ${worksrcpath} register.sh unregister.sh \
+ ${destroot}${prefix}/libexec/${name}
+ }
+ post-activate {
+ system "${prefix}/libexec/${name}/register.sh"
+ }
+ pre-deactivate {
+ system "${prefix}/libexec/${name}/unregister.sh"
+ }
+ }
universal_variant no
livecheck.type none
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120824/b48902ac/attachment.html>
More information about the macports-changes
mailing list