[112865] trunk/dports/aqua/namebench

ryandesign at macports.org ryandesign at macports.org
Sat Nov 2 19:28:23 PDT 2013


Revision: 112865
          https://trac.macports.org/changeset/112865
Author:   ryandesign at macports.org
Date:     2013-11-02 19:28:23 -0700 (Sat, 02 Nov 2013)
Log Message:
-----------
namebench: actually use MacPorts python (#40859); add required PyObjC and PyObjC-Cocoa dependencies; remove python24 variant because python24 does not provide a Python library

Modified Paths:
--------------
    trunk/dports/aqua/namebench/Portfile
    trunk/dports/aqua/namebench/files/project.diff

Added Paths:
-----------
    trunk/dports/aqua/namebench/files/patch-main.m.diff

Modified: trunk/dports/aqua/namebench/Portfile
===================================================================
--- trunk/dports/aqua/namebench/Portfile	2013-11-03 00:54:14 UTC (rev 112864)
+++ trunk/dports/aqua/namebench/Portfile	2013-11-03 02:28:23 UTC (rev 112865)
@@ -6,6 +6,7 @@
 
 name                namebench
 version             1.3.1
+revision            1
 categories          aqua sysutils
 maintainers         nomaintainer
 license             Apache-2
@@ -26,22 +27,31 @@
 distname            ${name}-${version}-source
 extract.suffix      .tgz
 worksrcdir          ${name}-${version}/cocoa
-patchfiles          project.diff
 checksums           rmd160  93d1186caf2a214ecf1966ee798f01d329ecfd64 \
                     sha256  30ccf9e870c1174c6bf02fca488f62bba280203a0b1e8e4d26f3756e1a5b9425
 
-variant python24 conflicts python25 python26 python27 {
-    depends_lib         port:py24-libnamebench
+patchfiles          project.diff patch-main.m.diff
+
+post-patch {
+    set py_bin      ${prefix}/bin/python${py}
+    reinplace "s|/usr/bin/python|${py_bin}|g" ${worksrcpath}/main.m
+    reinplace "s|@FRAMEWORKS_DIR@|${frameworks_dir}|g" ${worksrcpath}/namebench.xcodeproj/project.pbxproj
+    reinplace "s|@PYTHON_VERSION@|${py}|g" ${worksrcpath}/namebench.xcodeproj/project.pbxproj
 }
-variant python25 conflicts python24 python26 python27 {
-    depends_lib         port:py25-libnamebench
+
+set py ""
+variant python25 conflicts python26 python27 {
+    set py              2.5
+    depends_lib-append  port:py25-libnamebench port:py25-pyobjc port:py25-pyobjc-cocoa
 }
-variant python26 conflicts python24 python25 python27 {
-    depends_lib         port:py26-libnamebench
+variant python26 conflicts python25 python27 {
+    set py              2.6
+    depends_lib-append  port:py26-libnamebench port:py26-pyobjc port:py26-pyobjc-cocoa
 }
-variant python27 conflicts python24 python25 python26 {
-    depends_lib         port:py27-libnamebench
+variant python27 conflicts python25 python26 {
+    set py              2.7
+    depends_lib-append  port:py27-libnamebench port:py27-pyobjc port:py27-pyobjc-cocoa
 }
-if {![variant_isset python24] && ![variant_isset python25] && ![variant_isset python26] && ![variant_isset python27]} {
+if {![variant_isset python25] && ![variant_isset python26] && ![variant_isset python27]} {
     default_variants    +python27
 }

Added: trunk/dports/aqua/namebench/files/patch-main.m.diff
===================================================================
--- trunk/dports/aqua/namebench/files/patch-main.m.diff	                        (rev 0)
+++ trunk/dports/aqua/namebench/files/patch-main.m.diff	2013-11-03 02:28:23 UTC (rev 112865)
@@ -0,0 +1,11 @@
+--- main.m.orig	2013-11-02 19:31:58.000000000 -0500
++++ main.m	2013-11-02 19:35:35.000000000 -0500
+@@ -6,7 +6,7 @@
+ //  Copyright __MyCompanyName__ 2009. All rights reserved.
+ //
+ 
+-#import <Python/Python.h>
++#import <Python.h>
+ #import <Cocoa/Cocoa.h>
+ 
+ int main(int argc, char *argv[])

Modified: trunk/dports/aqua/namebench/files/project.diff
===================================================================
--- trunk/dports/aqua/namebench/files/project.diff	2013-11-03 00:54:14 UTC (rev 112864)
+++ trunk/dports/aqua/namebench/files/project.diff	2013-11-03 02:28:23 UTC (rev 112865)
@@ -1,5 +1,72 @@
 --- namebench.xcodeproj/project.pbxproj.orig	2010-05-18 11:03:01.000000000 -0400
-+++ namebench.xcodeproj/project.pbxproj	2010-05-18 11:01:31.000000000 -0400
++++ namebench.xcodeproj/project.pbxproj	2013-11-02 19:25:47.000000000 -0500
+@@ -7,17 +7,17 @@
+ 	objects = {
+ 
+ /* Begin PBXBuildFile section */
++		5016A55B1825CF38009A6057 /* Python in Frameworks */ = {isa = PBXBuildFile; fileRef = 5016A55A1825CF38009A6057 /* Python */; };
+ 		697CE1ED10DA048D00D5C46F /* tools in Resources */ = {isa = PBXBuildFile; fileRef = 697CE1E910DA048D00D5C46F /* tools */; };
+ 		697CE1EE10DA048D00D5C46F /* nb_third_party in Resources */ = {isa = PBXBuildFile; fileRef = 697CE1EA10DA048D00D5C46F /* nb_third_party */; };
+ 		697CE1EF10DA048D00D5C46F /* templates in Resources */ = {isa = PBXBuildFile; fileRef = 697CE1EB10DA048D00D5C46F /* templates */; };
+ 		697CE1F010DA048D00D5C46F /* libnamebench in Resources */ = {isa = PBXBuildFile; fileRef = 697CE1EC10DA048D00D5C46F /* libnamebench */; };
+ 		697CE2B110DA04D600D5C46F /* config in Resources */ = {isa = PBXBuildFile; fileRef = 697CE2AB10DA04D600D5C46F /* config */; };
+-		77631A270C06C501005415CB /* Python.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77631A260C06C501005415CB /* Python.framework */; };
+ 		77631A3F0C0748CF005415CB /* main.py in Resources */ = {isa = PBXBuildFile; fileRef = 77631A3E0C0748CF005415CB /* main.py */; };
+ 		7790198F0C07548A00326F66 /* namebenchAppDelegate.py in Resources */ = {isa = PBXBuildFile; fileRef = 7790198E0C07548A00326F66 /* namebenchAppDelegate.py */; };
+ 		77C8C1F90C07829500965286 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 77C8C1F70C07829500965286 /* MainMenu.xib */; };
+ 		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
+-		8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
++		8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); COMPILER_FLAGS = "-isystem at FRAMEWORKS_DIR@/Python.framework/Versions/@PYTHON_VERSION@/Headers"; }; };
+ 		8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+ 		DCABD7DC11365CF10067F26A /* data in Resources */ = {isa = PBXBuildFile; fileRef = DCABD7D711365CF10067F26A /* data */; };
+ 		DCC47243107F4BB1009BBD14 /* controller.py in Resources */ = {isa = PBXBuildFile; fileRef = DCC47242107F4BB1009BBD14 /* controller.py */; };
+@@ -32,6 +32,7 @@
+ 		29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ 		29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 		32CA4F630368D1EE00C91783 /* namebench_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = namebench_Prefix.pch; sourceTree = "<group>"; };
++		5016A55A1825CF38009A6057 /* Python */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = Python; path = @FRAMEWORKS_DIR@/Python.framework/Versions/@PYTHON_VERSION@/Python; sourceTree = "<group>"; };
+ 		697CE1E910DA048D00D5C46F /* tools */ = {isa = PBXFileReference; lastKnownFileType = folder; name = tools; path = ../tools; sourceTree = SOURCE_ROOT; };
+ 		697CE1EA10DA048D00D5C46F /* nb_third_party */ = {isa = PBXFileReference; lastKnownFileType = folder; name = nb_third_party; path = ../nb_third_party; sourceTree = SOURCE_ROOT; };
+ 		697CE1EB10DA048D00D5C46F /* templates */ = {isa = PBXFileReference; lastKnownFileType = folder; name = templates; path = ../templates; sourceTree = SOURCE_ROOT; };
+@@ -54,7 +55,7 @@
+ 			buildActionMask = 2147483647;
+ 			files = (
+ 				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+-				77631A270C06C501005415CB /* Python.framework in Frameworks */,
++				5016A55B1825CF38009A6057 /* Python in Frameworks */,
+ 			);
+ 			runOnlyForDeploymentPostprocessing = 0;
+ 		};
+@@ -139,6 +140,7 @@
+ 		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ 			isa = PBXGroup;
+ 			children = (
++				5016A55A1825CF38009A6057 /* Python */,
+ 				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+ 				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+ 			);
+@@ -248,6 +256,10 @@
+ 				GCC_PREFIX_HEADER = namebench_Prefix.pch;
+ 				INFOPLIST_FILE = Info.plist;
+ 				INSTALL_PATH = "$(HOME)/Applications";
++				LIBRARY_SEARCH_PATHS = (
++					"$(inherited)",
++					@FRAMEWORKS_DIR@/Python.framework/Versions/@PYTHON_VERSION@,
++				);
+ 				ONLY_ACTIVE_ARCH = YES;
+ 				PRODUCT_NAME = namebench;
+ 				WRAPPER_EXTENSION = app;
+@@ -264,6 +276,10 @@
+ 				GCC_PREFIX_HEADER = namebench_Prefix.pch;
+ 				INFOPLIST_FILE = Info.plist;
+ 				INSTALL_PATH = "$(HOME)/Applications";
++				LIBRARY_SEARCH_PATHS = (
++					"$(inherited)",
++					@FRAMEWORKS_DIR@/Python.framework/Versions/@PYTHON_VERSION@,
++				);
+ 				PRODUCT_NAME = namebench;
+ 				WRAPPER_EXTENSION = app;
+ 			};
 @@ -286,14 +286,14 @@
  		C01FCF5008A954540054247B /* Release */ = {
  			isa = XCBuildConfiguration;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131102/7ebedede/attachment-0001.html>


More information about the macports-changes mailing list