[33541] trunk/dports/graphics/fontconfig/Portfile

ryandesign at macports.org ryandesign at macports.org
Tue Jan 29 08:01:22 PST 2008


Revision: 33541
          http://trac.macosforge.org/projects/macports/changeset/33541
Author:   ryandesign at macports.org
Date:     2008-01-29 08:01:04 -0800 (Tue, 29 Jan 2008)

Log Message:
-----------
fontconfig: add sensible error message if /usr/bin/head is missing or unusable; see #14102

Modified Paths:
--------------
    trunk/dports/graphics/fontconfig/Portfile

Modified: trunk/dports/graphics/fontconfig/Portfile
===================================================================
--- trunk/dports/graphics/fontconfig/Portfile	2008-01-29 15:53:00 UTC (rev 33540)
+++ trunk/dports/graphics/fontconfig/Portfile	2008-01-29 16:01:04 UTC (rev 33541)
@@ -34,6 +34,44 @@
 configure.args  --docdir=${prefix}/share/doc/${name}-${version} \
                 --disable-docs
 
+platform darwin {
+	pre-fetch {
+		set disposition ""
+		if {![file exists /usr/bin/head]} {
+			set disposition "missing"
+		} else {
+			if {-1 == [string first Mach-O [exec file --brief /usr/bin/head]]} {
+				set disposition "broken"
+			}
+		}
+		if {"" != "${disposition}"} {
+			return -code error "
+
+***************************************************************************
+
+${name} cannot be installed, and you may be experiencing other problems
+with your computer, because the program /usr/bin/head is ${disposition}.
+This program is essential to the correct functioning of your computer.
+
+You can reinstall it by copying it from your Mac OS X installation media,
+using these commands:
+
+    sudo rm -f /usr/bin/head
+    sudo cp -p \"/Volumes/Mac OS X Install Disc 1/usr/bin/head\" /usr/bin
+    sudo chown root:wheel /usr/bin/head
+
+You may need to adjust the \"sudo cp\" command above if your Mac OS X
+installation media has a different name.
+
+Make sure to use the correct Mac OS X installation media for the version
+of Mac OS X installed on this computer.
+
+***************************************************************************
+"
+		}
+	}
+}
+
 # We put this into a pre-configure so it can be evaluated _after_ variants selection.
 pre-configure {
     configure.args-append   --with-add-fonts=[join ${add_fonts} ,]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080129/6f7c5109/attachment.html


More information about the macports-changes mailing list