--- Portfile.orig	2008-05-15 23:21:35.000000000 -0700
+++ Portfile	2008-05-24 10:13:42.000000000 -0700
@@ -35,15 +35,12 @@
 # (e.g. assistant.app) and the examples directory
 set bindir ${prefix}/libexec/${name}/bin
 
-pre-configure {
-    # conflict with pcre
-    if {[file exists ${prefix}/include/pcre.h]} {
-        return -code error "port:pcre may prevent building this port. Please uninstall (or deactivate) pcre and restart the build."
-    }
-    # conflict with openjpeg
-    if {[file exists ${prefix}/include/event.h]} {
-        return -code error "port:openjpeg may prevent building this port. Please uninstall (or deactivate) openjpeg and restart the build."
-    }
+post-configure {
+    # Assures local header is included instead of one from PCRE and OpenJPEG (and perhaps others).
+    reinplace "s|\$(CFLAGS) \$(INCPATH)|\$(INCPATH) \$(CFLAGS)|g" ${worksrcpath}/src/3rdparty/webkit/WebCore/Makefile.Release
+    reinplace "s|\$(CXXFLAGS) \$(INCPATH)|\$(INCPATH) \$(CXXFLAGS)|g" ${worksrcpath}/src/3rdparty/webkit/WebCore/Makefile.Release
+    reinplace "s|\$(CFLAGS) \$(INCPATH)|\$(INCPATH) \$(CFLAGS)|g" ${worksrcpath}/src/3rdparty/webkit/WebCore/Makefile.Debug
+    reinplace "s|\$(CXXFLAGS) \$(INCPATH)|\$(INCPATH) \$(CXXFLAGS)|g" ${worksrcpath}/src/3rdparty/webkit/WebCore/Makefile.Debug
 }
 
 # See

