Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs17:/tmp/cvs-serv9132/perlmod/Fink
Modified Files:
ChangeLog VirtPackage.pm
Log Message:
xcode virtual package
Index: VirtPackage.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/VirtPackage.pm,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- VirtPackage.pm 19 Jul 2007 14:01:27 -0000 1.134
+++ VirtPackage.pm 20 Jul 2007 00:51:51 -0000 1.135
@@ -621,6 +621,66 @@
}
}
+=item "xcode"
+
+This package represents your XCode version.
+
+=cut
+
+ print STDERR "- checking for xcode version... " if ($options{debug});
+
+ $hash = {};
+ $hash->{package} = "xcode";
+ $hash->{status} = STATUS_PRESENT;
+ $hash->{description} = "[virtual package representing the developer
tools]";
+ $hash->{homepage} =
"http://www.finkproject.org/faq/usage-general.php#virtpackage";
+ $hash->{builddependsonly} = "true";
+ $hash->{descdetail} = <<END;
+This package represents the C/C++/ObjC developer tools
+provided by Apple. If it does not show as installed,
+you can download it from Apple at:
+
+ http://connect.apple.com/
+
+(free registration required)
+END
+ $hash->{compilescript} = &gen_compile_script($hash);
+ my $xcode_version = 0;
+
+ if (-f "/Developer/Applications/Xcode.app/Contents/version.plist" and
-x "/usr/bin/plutil") {
+ if (my $tempfile = tmpnam()) {
+ if (system("/usr/bin/plutil -convert xml1 -o
'$tempfile' -s /Developer/Applications/Xcode.app/Contents/version.plist") == 0)
{
+ my $last_was_version = 0;
+ if (open(PLUTIL, $tempfile)) {
+ while (<PLUTIL>) {
+ if
(/CFBundleShortVersionString/) {
+ $last_was_version++;
+ } elsif ($last_was_version) {
+ ($xcode_version) = $_
=~ /<string>(.*?)<\/string>/;
+ last;
+ }
+ }
+ close(PLUTIL);
+ unlink($tempfile);
+ } else {
+ print STDERR "unable to open the
property list temp file: $!" if ($options{debug});
+ }
+ } else {
+ print STDERR "unable to run plutil: $!" if
($options{debug});
+ }
+ }
+ }
+
+ if ($xcode_version) {
+ $hash->{version} = $xcode_version . '-1';
+ print STDERR $hash->{version}, "\n" if ($options{debug});
+ } else {
+ $hash->{version} = '0-0';
+ print STDERR "unknown\n" if ($options{debug});
+ $hash->{status} = STATUS_ABSENT;
+ }
+ $self->{$hash->{package}} = $hash;
+
=item "cctools-I<XXX>"
This package represents the compiler tools provided by Apple. It is
Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.1481
retrieving revision 1.1482
diff -u -d -r1.1481 -r1.1482
--- ChangeLog 19 Jul 2007 02:29:55 -0000 1.1481
+++ ChangeLog 20 Jul 2007 00:51:51 -0000 1.1482
@@ -1,3 +1,7 @@
+2007-07-19 Benjamin Reed <[EMAIL PROTECTED]>
+
+ * VirtPackage.pm: add an "xcode" virtual package
+
2007-07-18 Benjamin Reed <[EMAIL PROTECTED]>
* VirtPackage.pm: fix sysctl call to actually be used ;)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits