Modified: trunk/dports/devel/cpphs/Portfile (20836 => 20837)
--- trunk/dports/devel/cpphs/Portfile 2006-12-02 16:33:35 UTC (rev 20836)
+++ trunk/dports/devel/cpphs/Portfile 2006-12-02 17:39:21 UTC (rev 20837)
@@ -2,9 +2,9 @@
PortSystem 1.0
name cpphs
-version 1.0
+version 1.3
categories devel
-maintainers gwright@opendarwin.org
+maintainers gwright@macports.org
platforms darwin
description cpp implemented in Haskell.
long_description \
@@ -14,23 +14,36 @@
homepage http://www.haskell.org/cpphs/
master_sites http://www.cs.york.ac.uk/fp/${name}/
-checksums md5 e57d550691dea74cd50f07e9323439af
+checksums md5 fe1f36d1cbc2ca4a8b769d1f9c2f63bc
-depends_build bin:ghc:ghc
+depends_build port:ghc
-configure { }
+pre-configure { cd ${worksrcpath}
+ system "ghc -o Setup Setup.hs -package Cabal"
+ }
+configure { cd ${worksrcpath}
+ system "./Setup configure --ghc --prefix=${prefix}"
+ }
+
build { cd ${worksrcpath}
- system "ghc --make ${name}"
+ system "./Setup build -v"
}
destroot { cd ${worksrcpath}
- file mkdir ${destroot}${prefix}/bin
- file copy a.out ${destroot}${prefix}/bin/${name}
+ system "./Setup copy --copy-prefix=${destroot}${prefix}"
+ system "./Setup register --gen-script"
+ system "./Setup unregister --gen-script"
- file mkdir ${destroot}${prefix}/share/man/man1
- file copy docs/${name}.1 ${destroot}${prefix}/share/man/man1
+ file mkdir ${destroot}${prefix}/libexec/${name}
+ file copy ${worksrcpath}/register.sh \
+ ${destroot}${prefix}/libexec/${name}
+ file copy ${worksrcpath}/unregister.sh \
+ ${destroot}${prefix}/libexec/${name}
}
+post-activate { system "${prefix}/libexec/${name}/register.sh" }
+#pre-deactivate { system "${prefix}/libexec/${name}/unregister.sh" }
+