Index: files/patch-GPGME.xcode-project.pbxproj.diff
===================================================================
--- files/patch-GPGME.xcode-project.pbxproj.diff	(révision 0)
+++ files/patch-GPGME.xcode-project.pbxproj.diff	(révision 0)
@@ -0,0 +1,70 @@
+--- GPGME.xcode/project.pbxproj.orig	2008-11-16 23:03:53.000000000 +0100
++++ GPGME.xcode/project.pbxproj	2008-11-16 23:44:08.000000000 +0100
+@@ -363,7 +363,7 @@
+ 			isa = PBXFileReference;
+ 			lastKnownFileType = sourcecode.c.h;
+ 			name = gpgme.h;
+-			path = /usr/local/include/gpgme.h;
++			path = @PREFIX@/include/gpgme.h;
+ 			refType = 0;
+ 			sourceTree = "<absolute>";
+ 		};
+@@ -420,7 +420,7 @@
+ 			isa = PBXFileReference;
+ 			lastKnownFileType = sourcecode.c.h;
+ 			name = "gpg-error.h";
+-			path = "/usr/local/include/gpg-error.h";
++			path = "@PREFIX@/include/gpg-error.h";
+ 			refType = 0;
+ 			sourceTree = "<absolute>";
+ 		};
+@@ -537,7 +537,7 @@
+ 				FRAMEWORK_SEARCH_PATHS = "";
+ 				FRAMEWORK_VERSION = 1.0.2;
+ 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+-				GCC_PREFIX_HEADER = /usr/local/include/gpgme.h;
++				GCC_PREFIX_HEADER = @PREFIX@/include/gpgme.h;
+ 				GCC_PREPROCESSOR_DEFINITIONS = BUILDINGGPGME;
+ 				HEADER_SEARCH_PATHS = "";
+ 				INFOPLIST_FILE = "Info-GPGME.plist";
+@@ -1102,16 +1102,16 @@
+ 		555E7F6D07A3114C00B1F725 = {
+ 			isa = PBXFileReference;
+ 			lastKnownFileType = archive.ar;
+-			name = "libgpg-error.a";
+-			path = "/usr/local/lib/libgpg-error.a";
++			name = "libgpg-error.dylib";
++			path = "@PREFIX@/lib/libgpg-error.dylib";
+ 			refType = 0;
+ 			sourceTree = "<absolute>";
+ 		};
+ 		555E7F6E07A3114C00B1F725 = {
+ 			isa = PBXFileReference;
+ 			lastKnownFileType = archive.ar;
+-			name = "libgpgme-pthread.a";
+-			path = "/usr/local/lib/libgpgme-pthread.a";
++			name = "libgpgme-pthread.dylib";
++			path = "@PREFIX@/lib/libgpgme-pthread.dylib";
+ 			refType = 0;
+ 			sourceTree = "<absolute>";
+ 		};
+@@ -1282,9 +1282,7 @@
+ 		F550BC470201F10201A80016 = {
+ 			buildSettings = {
+ 				COPY_PHASE_STRIP = NO;
+-				INSTALL_PATH = "@executable_path/../Frameworks";
+ 				OPTIMIZATION_CFLAGS = "-O0";
+-				SKIP_INSTALL = YES;
+ 			};
+ 			isa = PBXBuildStyle;
+ 			name = EmbDevelopment;
+@@ -1293,9 +1291,7 @@
+ 			buildSettings = {
+ 				COPY_PHASE_STRIP = YES;
+ 				DEBUGGING_SYMBOLS = NO;
+-				INSTALL_PATH = "@executable_path/../Frameworks";
+ 				OPTIMIZATION_CFLAGS = "-Os";
+-				SKIP_INSTALL = YES;
+ 			};
+ 			isa = PBXBuildStyle;
+ 			name = EmbDeployment;
Index: Portfile
===================================================================
--- Portfile	(révision 42166)
+++ Portfile	(copie de travail)
@@ -1,44 +1,40 @@
 # $Id$
 
 PortSystem 1.0
+PortGroup xcode 1.0
+
 name		gpgme-objc
 set rname	GPGME
 version		1.0.2
-revision	3
+revision	4
 categories	devel security
 maintainers	waqar@macports.org
 description	GnuPG Made Easy is an Objective-C framework wrapping libgpgme
 long_description	\
-	GnuPG Made Easy (GPGME) is an Objective-C framework wrapping 	\
-	libgpgme, a C language library, that allows to add support 	\
-	for cryptography to a program. It is designed to make access 	\
-	to crypto engines like GnuPG or GpgSM easier for applications. 	\
-	GPGME provides a high-level crypto API for encryption, 		\
+	GnuPG Made Easy (GPGME) is an Objective-C framework wrapping	\
+	libgpgme, a C language library, that allows to add support	\
+	for cryptography to a program. It is designed to make access	\
+	to crypto engines like GnuPG or GpgSM easier for applications.	\
+	GPGME provides a high-level crypto API for encryption,		\
 	decryption, signing, signature verification and key management.
 homepage	http://macgpg.sourceforge.net
-platforms	macosx
 master_sites	sourceforge:macgpg
 extract.suffix	.tgz
 distname	${rname}-${version}
 dist_subdir	macgpg
 checksums	md5 9f6fc9eb6d36c298c045178703041314			\
 		sha1 ff02efeac01253c9df797ec314ef0e4fc537964e
-depends_lib	port:gpgme
-patch	{
-	cd ${worksrcpath}
-	reinplace "s|/usr/local|${prefix}|g" 	\
-		${rname}.xcode/project.pbxproj	\
-		${rname}.pbproj/project.pbxproj
-}
-use_configure	no
-build.type 	pbx
-build.target	-target ${rname}
-build.args	build -project ${rname}.xcode -buildstyle EmbDevelopment
 
-destroot 	{
-	cd ${worksrcpath}
-	system "${build.cmd} install INSTALL_MODE_FLAG=go-w,a+rX 	\
-		INSTALL_PATH=${prefix}/Library/Frameworks 		\
-		DSTROOT=${destroot} ${build.target} 			\
-		-project ${rname}.xcode"
+patchfiles	patch-GPGME.xcode-project.pbxproj.diff
+
+post-patch {
+	reinplace s|@PREFIX@|${prefix}|g ${worksrcpath}/GPGME.xcode/project.pbxproj
 }
+
+depends_lib	port:gpgme \
+			port:libgpg-error
+
+xcode.project		${rname}.xcode
+xcode.target		${rname}
+xcode.configuration	EmbDeployment
+xcode.destroot.type	framework
