81 lines
2.6 KiB
Plaintext
81 lines
2.6 KiB
Plaintext
$NetBSD: patch-ab,v 1.5 2010/04/18 12:22:40 zafer Exp $
|
|
|
|
--- configure.orig 2010-04-07 15:23:25.000000000 +0000
|
|
+++ configure
|
|
@@ -954,65 +954,7 @@ EOF
|
|
macos*|darwin|rhapsody)
|
|
OS="macosx"
|
|
SYS="macosx"
|
|
- os_v=`perl -e '{open(F, "< /System/Library/CoreServices/SystemVersion.plist") or exit(2); my ($doc) = ""; my ($line); while (defined($line = <F>)) { $doc .= $line; } close(F); $doc =~ s/\s+//gs; if ($doc =~ /<key>ProductVersion<\/key><string>([^<]+)<\/string>/) { print , "\n"; exit(0); } exit(1); }' 2>/dev/null`
|
|
- if [ "$os_v" = "" ] && [ -x "$HOME/bin/macosver" ] ; then
|
|
- os_v=`"$HOME/bin/macosver" 2>/dev/null`
|
|
- fi
|
|
- if [ "$os_v" = "" ] ; then
|
|
- cat > "$HOME/macosver.c" <<EOF
|
|
-/*
|
|
-<?xml version="1.0" encoding="UTF-8"?>
|
|
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
|
-<plist version="0.9">
|
|
-<dict>
|
|
- <key>ProductBuildVersion</key>
|
|
- <string>5S66</string>
|
|
- <key>ProductName</key>
|
|
- <string>Mac OS X</string>
|
|
- <key>ProductVersion</key>
|
|
- <string>10.1.5</string>
|
|
-</dict>
|
|
-</plist>
|
|
-*/
|
|
-
|
|
-#include <stdio.h>
|
|
-#include <string.h>
|
|
-#include <stdlib.h>
|
|
-#include <ctype.h>
|
|
-
|
|
-main()
|
|
-{
|
|
- char line[256], *cp, *cp2;
|
|
- FILE *fp;
|
|
-
|
|
- fp = fopen("/System/Library/CoreServices/SystemVersion.plist", "r");
|
|
-
|
|
- if (fp != NULL) {
|
|
- memset(line, 0, sizeof(line));
|
|
- while (fgets(line, sizeof(line) - 1, fp) != NULL) {
|
|
- cp = strstr(line, "<key>ProductVersion</key>");
|
|
- if (cp != NULL) {
|
|
- memset(line, 0, sizeof(line));
|
|
- if (fgets(line, sizeof(line) - 2, fp) != NULL) {
|
|
- for (cp = line; ((*cp != '\0') && (! isdigit(*cp))); ) cp++;
|
|
- for (cp2 = cp; ((*cp2 != '\0') && (! isspace(*cp2)) && (*cp2 != '<') && (*cp2 != '>')); ) cp2++;
|
|
- cp2[0] = '\0';
|
|
- fclose(fp);
|
|
- fprintf(stdout, "%s\n", cp);
|
|
- exit(0);
|
|
- }
|
|
- }
|
|
- }
|
|
- }
|
|
- fclose(fp);
|
|
- exit(1);
|
|
-}
|
|
-EOF
|
|
- ${CC-cc} "$HOME/macosver.c" -o "$HOME/macosver" > /dev/null 2>&1
|
|
- os_v=`"$HOME/macosver" 2>/dev/null`
|
|
- mv "$HOME/macosver" "$HOME/bin/macosver" 2>/dev/null
|
|
- rm -f "$HOME/macosver.c" "$HOME/macosver"
|
|
- fi
|
|
+ os_v=`perl -e '{open(F, "< /System/Library/CoreServices/SystemVersion.plist") or exit(2); my ($doc) = ""; my ($line); while (defined($line = <F>)) { $doc .= $line; } close(F); $doc =~ s/\s+//gs; if ($doc =~ /<key>ProductVersion<\/key><string>([^<]+)<\/string>/) { print $1, "\n"; exit(0); } exit(1); }' 2>/dev/null`
|
|
if [ "$os_v" != "" ] ; then
|
|
OS="macosx${os_v}"
|
|
os_v1=`echo "$os_v" | cut -d. -f1`
|
|
@@ -11335,7 +11277,7 @@ fi
|
|
fi
|
|
|
|
|
|
-if test "x$mandir" = 'x${prefix}/man' ; then
|
|
+if false; then
|
|
# Mandir is at default value -- try to see
|
|
# if $prefix/share/man would be better.
|
|
#
|