[131236] trunk/dports/perl/p5-mac-carbon

larryv at macports.org larryv at macports.org
Tue Jan 6 21:28:41 PST 2015


Revision: 131236
          https://trac.macports.org/changeset/131236
Author:   larryv at macports.org
Date:     2015-01-06 21:28:41 -0800 (Tue, 06 Jan 2015)
Log Message:
-----------
p5-mac-carbon: Don't use Carbon headers directly (#46411)

The source code assumes that `/Developer/Headers/FlatCarbon` exists,
which is false for Xcode 4 and later. Fix it to use the appropriate
framework headers instead.

Modified Paths:
--------------
    trunk/dports/perl/p5-mac-carbon/Portfile

Added Paths:
-----------
    trunk/dports/perl/p5-mac-carbon/files/
    trunk/dports/perl/p5-mac-carbon/files/avoid-FlatCarbon-headers.patch

Modified: trunk/dports/perl/p5-mac-carbon/Portfile
===================================================================
--- trunk/dports/perl/p5-mac-carbon/Portfile	2015-01-07 05:28:38 UTC (rev 131235)
+++ trunk/dports/perl/p5-mac-carbon/Portfile	2015-01-07 05:28:41 UTC (rev 131236)
@@ -23,5 +23,6 @@
 
 if {${perl5.major} != ""} {
     supported_archs     i386 ppc
+    patchfiles          avoid-FlatCarbon-headers.patch
     configure.post_args TRY_ANYWAY=1
 }

Added: trunk/dports/perl/p5-mac-carbon/files/avoid-FlatCarbon-headers.patch
===================================================================
--- trunk/dports/perl/p5-mac-carbon/files/avoid-FlatCarbon-headers.patch	                        (rev 0)
+++ trunk/dports/perl/p5-mac-carbon/files/avoid-FlatCarbon-headers.patch	2015-01-07 05:28:41 UTC (rev 131236)
@@ -0,0 +1,610 @@
+Index: Carbon.h
+===================================================================
+--- Carbon.h.orig
++++ Carbon.h
+@@ -84,11 +84,8 @@
+ #undef Move
+ #undef I_POLL
+ #undef DEBUG
+-#include <Events.h>
+-#include <Dialogs.h>
+-#include <Files.h>
+-#include <Types.h>
+-#include <ConditionalMacros.h>
++#include <Carbon/Carbon.h>
++#include <CoreServices/CoreServices.h>
+ 
+ typedef OSErr	MacOSRet;
+ typedef Handle	HandleRet;
+Index: AppleEvents/PerlAEUtils.h
+===================================================================
+--- AppleEvents/PerlAEUtils.h.orig
++++ AppleEvents/PerlAEUtils.h
+@@ -30,13 +30,13 @@ Synchronized with MacPerl 5.1.4a1
+ #undef I_POLL
+ #undef DEBUG
+ #endif
+-#include <AppleEvents.h>
++#include <ApplicationServices/ApplicationServices.h>
+ #ifdef MACOS_TRADITIONAL
+ #include <AEBuild.h>
+ #include <AEStream.h>
+ #include <AESubDescs.h>
+ #endif
+-#include <OSA.h>
++#include <Carbon/Carbon.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+Index: AppleEvents/AppleEvents.xs
+===================================================================
+--- AppleEvents/AppleEvents.xs.orig
++++ AppleEvents/AppleEvents.xs
+@@ -64,9 +64,8 @@
+ #include "CarbonAE.h"
+ #endif
+ #include <stdarg.h>
+-#include <Types.h>
+-#include <Memory.h>
+-#include <AppleEvents.h>
++#include <CoreServices/CoreServices.h>
++#include <ApplicationServices/ApplicationServices.h>
+ #include "PerlAEUtils.h"
+ #ifdef MACOS_TRADITIONAL
+ #include "SubLaunch.h"
+Index: Components/Components.xs
+===================================================================
+--- Components/Components.xs.orig
++++ Components/Components.xs
+@@ -40,9 +40,8 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Types.h>
+-#include <Memory.h>
+-#include <Components.h>
++#include <CoreServices/CoreServices.h>
++#include <ApplicationServices/ApplicationServices.h>
+ 
+ static ComponentDescription * MakeComponentDesc(
+ 	SV *				componentType,
+Index: Files/Files.xs
+===================================================================
+--- Files/Files.xs.orig
++++ Files/Files.xs
+@@ -59,14 +59,10 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Folders.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ #ifdef MACOS_TRADITIONAL
+ #include <GUSIFileSpec.h>
+ #endif
+-#include <Script.h>
+-#include <Errors.h>
+-#include <Aliases.h>
+ 
+ #define MACPERL_CATINFO	'MpCI'
+ 
+Index: Gestalt/Gestalt.xs
+===================================================================
+--- Gestalt/Gestalt.xs.orig
++++ Gestalt/Gestalt.xs
+@@ -31,7 +31,7 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Gestalt.h>
++#include <CoreServices/CoreServices.h>
+ 
+ MODULE = Mac::Gestalt	PACKAGE = Mac::Gestalt
+ 
+Index: MacPerl/MacPerl.xs
+===================================================================
+--- MacPerl/MacPerl.xs.orig
++++ MacPerl/MacPerl.xs
+@@ -52,18 +52,12 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Types.h>
+-#include <Quickdraw.h>
+-#include <Dialogs.h>
+-#include <Lists.h>
++#include <CoreServices/CoreServices.h>
++#include <ApplicationServices/ApplicationServices.h>
++#include <Carbon/Carbon.h>
+ #ifdef MACOS_TRADITIONAL
+ #include <GUSIFileSpec.h>
+ #endif
+-#include <PLStringFuncs.h>
+-#include <Files.h>
+-#include <Fonts.h>
+-#include <Resources.h>
+-#include <LowMem.h>
+ 
+ 
+ /* Shamelessly borrowed from Apple's includes. Sorry */
+Index: OSA/OSA.xs
+===================================================================
+--- OSA/OSA.xs.orig
++++ OSA/OSA.xs
+@@ -67,11 +67,8 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Types.h>
+-#include <Memory.h>
+-#include <OSA.h>
+-#include <OSAGeneric.h>
+-#include <ASDebugging.h>
++#include <CoreServices/CoreServices.h>
++#include <Carbon/Carbon.h>
+ 
+ MODULE = Mac::OSA	PACKAGE = Mac::OSA
+ 
+Index: MacPerl/OSA.xs
+===================================================================
+--- MacPerl/OSA.xs.orig
++++ MacPerl/OSA.xs
+@@ -34,12 +34,9 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Types.h>
+-#include <Components.h>
+-#include <AppleEvents.h>
+-#include <AppleScript.h>
+-#include <OSA.h>
+-#include <Gestalt.h>
++#include <CoreServices/CoreServices.h>
++#include <ApplicationServices/ApplicationServices.h>
++#include <Carbon/Carbon.h>
+ 
+ ComponentInstance gScriptingComponent;
+ 
+Index: Memory/Memory.xs
+===================================================================
+--- Memory/Memory.xs.orig
++++ Memory/Memory.xs
+@@ -61,9 +61,7 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Types.h>
+-#include <Memory.h>
+-#include <TextUtils.h>
++#include <CoreServices/CoreServices.h>
+ 
+ typedef int	SysRet;
+ 
+Index: MoreFiles/MoreFilesSrc/DirectoryCopy.c
+===================================================================
+--- MoreFiles/MoreFilesSrc/DirectoryCopy.c.orig
++++ MoreFiles/MoreFilesSrc/DirectoryCopy.c
+@@ -19,12 +19,7 @@
+ **	descended from Apple Sample Code, but that you've made changes.
+ */
+ 
+-#include <Types.h>
+-#include <Errors.h>
+-#include <Memory.h>
+-#include <Files.h>
+-#include <Script.h>
+-#include <Math64.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #define	__COMPILINGMOREFILES
+ 
+Index: MoreFiles/MoreFilesSrc/MoreFiles.h
+===================================================================
+--- MoreFiles/MoreFilesSrc/MoreFiles.h.orig
++++ MoreFiles/MoreFilesSrc/MoreFiles.h
+@@ -22,8 +22,7 @@
+ #ifndef __MOREFILES__
+ #define __MOREFILES__
+ 
+-#include <Types.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #include "Optimization.h"
+ 
+Index: MoreFiles/MoreFilesSrc/MoreFilesExtras.h
+===================================================================
+--- MoreFiles/MoreFilesSrc/MoreFilesExtras.h.orig
++++ MoreFiles/MoreFilesSrc/MoreFilesExtras.h
+@@ -22,8 +22,7 @@
+ #ifndef __MOREFILESEXTRAS__
+ #define __MOREFILESEXTRAS__
+ 
+-#include <Types.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #include "Optimization.h"
+ 
+Index: MoreFiles/MoreFilesSrc/MoreDesktopMgr.h
+===================================================================
+--- MoreFiles/MoreFilesSrc/MoreDesktopMgr.h.orig
++++ MoreFiles/MoreFilesSrc/MoreDesktopMgr.h
+@@ -26,8 +26,7 @@
+ #ifndef __MOREDESKTOPMGR__
+ #define __MOREDESKTOPMGR__
+ 
+-#include <Types.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #include "Optimization.h"
+ 
+Index: MoreFiles/MoreFilesSrc/FileCopy.h
+===================================================================
+--- MoreFiles/MoreFilesSrc/FileCopy.h.orig
++++ MoreFiles/MoreFilesSrc/FileCopy.h
+@@ -22,8 +22,7 @@
+ #ifndef __FILECOPY__
+ #define __FILECOPY__
+ 
+-#include <Types.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #include "Optimization.h"
+ 
+Index: MoreFiles/MoreFilesSrc/DirectoryCopy.h
+===================================================================
+--- MoreFiles/MoreFilesSrc/DirectoryCopy.h.orig
++++ MoreFiles/MoreFilesSrc/DirectoryCopy.h
+@@ -22,8 +22,7 @@
+ #ifndef __DIRECTORYCOPY__
+ #define __DIRECTORYCOPY__
+ 
+-#include <Types.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #include "Optimization.h"
+ 
+Index: MoreFiles/MoreFilesSrc/FSpCompat.c
+===================================================================
+--- MoreFiles/MoreFilesSrc/FSpCompat.c.orig
++++ MoreFiles/MoreFilesSrc/FSpCompat.c
+@@ -28,12 +28,7 @@
+ #define GENERATENODATA 0
+ #endif
+ 
+-#include <Types.h>
+-#include <Errors.h>
+-#include <LowMem.h>
+-#include <Gestalt.h>
+-#include <Resources.h>
+-#include <Script.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #define	__COMPILINGMOREFILES
+ 
+Index: MoreFiles/MoreFilesSrc/FSpCompat.h
+===================================================================
+--- MoreFiles/MoreFilesSrc/FSpCompat.h.orig
++++ MoreFiles/MoreFilesSrc/FSpCompat.h
+@@ -22,8 +22,7 @@
+ #ifndef __FSPCOMPAT__
+ #define __FSPCOMPAT__
+ 
+-#include <Types.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #include "Optimization.h"
+ 
+Index: MoreFiles/MoreFilesSrc/FileCopy.c
+===================================================================
+--- MoreFiles/MoreFilesSrc/FileCopy.c.orig
++++ MoreFiles/MoreFilesSrc/FileCopy.c
+@@ -19,11 +19,7 @@
+ **	descended from Apple Sample Code, but that you've made changes.
+ */
+ 
+-#include <Types.h>
+-#include <Errors.h>
+-#include <Memory.h>
+-#include <Files.h>
+-#include <Math64.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #define	__COMPILINGMOREFILES
+ 
+Index: MoreFiles/MoreFilesSrc/FullPath.c
+===================================================================
+--- MoreFiles/MoreFilesSrc/FullPath.c.orig
++++ MoreFiles/MoreFilesSrc/FullPath.c
+@@ -19,12 +19,7 @@
+ **	descended from Apple Sample Code, but that you've made changes.
+ */
+ 
+-#include <Types.h>
+-#include <Errors.h>
+-#include <Memory.h>
+-#include <Files.h>
+-#include <TextUtils.h>
+-#include <Aliases.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #define	__COMPILINGMOREFILES
+ 
+Index: MoreFiles/MoreFilesSrc/FullPath.h
+===================================================================
+--- MoreFiles/MoreFilesSrc/FullPath.h.orig
++++ MoreFiles/MoreFilesSrc/FullPath.h
+@@ -22,8 +22,7 @@
+ #ifndef __FULLPATH__
+ #define __FULLPATH__
+ 
+-#include <Types.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #include "Optimization.h"
+ 
+@@ -240,4 +239,4 @@ pascal OSErr LocationFromFullPath(short 
+ 
+ #include "OptimizationEnd.h"
+ 
+-#endif	/* __FULLPATH__ */
+\ No newline at end of file
++#endif	/* __FULLPATH__ */
+Index: MoreFiles/MoreFilesSrc/IterateDirectory.c
+===================================================================
+--- MoreFiles/MoreFilesSrc/IterateDirectory.c.orig
++++ MoreFiles/MoreFilesSrc/IterateDirectory.c
+@@ -16,9 +16,7 @@
+ **	library I wrote while in Apple Developer Technical Support
+ */
+ 
+-#include <Types.h>
+-#include <Errors.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #define	__COMPILINGMOREFILES
+ 
+Index: MoreFiles/MoreFilesSrc/IterateDirectory.h
+===================================================================
+--- MoreFiles/MoreFilesSrc/IterateDirectory.h.orig
++++ MoreFiles/MoreFilesSrc/IterateDirectory.h
+@@ -19,8 +19,7 @@
+ #ifndef __ITERATEDIRECTORY__
+ #define __ITERATEDIRECTORY__
+ 
+-#include <Types.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #include "Optimization.h"
+ 
+Index: MoreFiles/MF.xs
+===================================================================
+--- MoreFiles/MF.xs.orig
++++ MoreFiles/MF.xs
+@@ -44,9 +44,7 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Types.h>
+-#include <Memory.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ #ifdef MACOS_TRADITIONAL
+ #include <GUSIFileSpec.h>
+ #endif
+Index: MoreFiles/MoreFilesSrc/MoreDesktopMgr.c
+===================================================================
+--- MoreFiles/MoreFilesSrc/MoreDesktopMgr.c.orig
++++ MoreFiles/MoreFilesSrc/MoreDesktopMgr.c
+@@ -23,12 +23,8 @@
+ **	descended from Apple Sample Code, but that you've made changes.
+ */
+ 
+-#include <Types.h>
+-#include <Errors.h>
+-#include <Memory.h>
+-#include <Files.h>
+-#include <Resources.h>
+-#include <Icons.h>
++#include <CoreServices/CoreServices.h>
++#include <ApplicationServices/ApplicationServices.h>
+ 
+ #define	__COMPILINGMOREFILES
+ 
+Index: MoreFiles/MoreFilesSrc/Search.h
+===================================================================
+--- MoreFiles/MoreFilesSrc/Search.h.orig
++++ MoreFiles/MoreFilesSrc/Search.h
+@@ -22,8 +22,7 @@
+ #ifndef __SEARCH__
+ #define __SEARCH__
+ 
+-#include <Types.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #include "Optimization.h"
+ 
+Index: MoreFiles/MoreFilesSrc/MoreFiles.c
+===================================================================
+--- MoreFiles/MoreFilesSrc/MoreFiles.c.orig
++++ MoreFiles/MoreFilesSrc/MoreFiles.c
+@@ -19,9 +19,7 @@
+ **	descended from Apple Sample Code, but that you've made changes.
+ */
+ 
+-#include <Types.h>
+-#include <Errors.h>
+-#include <Files.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #define	__COMPILINGMOREFILES
+ 
+Index: MoreFiles/MoreFilesSrc/MoreFilesExtras.c
+===================================================================
+--- MoreFiles/MoreFilesSrc/MoreFilesExtras.c.orig
++++ MoreFiles/MoreFilesSrc/MoreFilesExtras.c
+@@ -19,21 +19,10 @@
+ **	descended from Apple Sample Code, but that you've made changes.
+ */
+ 
+-#include <Types.h>
++#include <CoreServices/CoreServices.h>
+ //#include <Traps.h>
+-#include <OSUtils.h>
+-#include <Errors.h>
+-#include <Files.h>
+-#include <Devices.h>
+-#include <Finder.h>
+-#include <Folders.h>
+ //#include <FSM.h>
+ //#include <Disks.h>
+-#include <Gestalt.h>
+-#include <TextUtils.h>
+-#include <Script.h>
+-#include <Math64.h>
+-#include <CodeFragments.h>
+ #include <stddef.h>
+ 
+ #define	__COMPILINGMOREFILES
+Index: MoreFiles/MoreFilesSrc/Search.c
+===================================================================
+--- MoreFiles/MoreFilesSrc/Search.c.orig
++++ MoreFiles/MoreFilesSrc/Search.c
+@@ -19,13 +19,7 @@
+ **	descended from Apple Sample Code, but that you've made changes.
+ */
+ 
+-#include <Types.h>
+-#include <Gestalt.h>
+-#include <Timer.h>
+-#include <Errors.h>
+-#include <Memory.h>
+-#include <Files.h>
+-#include <TextUtils.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #define	__COMPILINGMOREFILES
+ 
+Index: Notification/Notification.xs
+===================================================================
+--- Notification/Notification.xs.orig
++++ Notification/Notification.xs
+@@ -20,11 +20,9 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Types.h>
+-#include <Notification.h>
+-#include <Quickdraw.h>
+-#include <Resources.h>
+-#include <Icons.h>
++#include <CoreServices/CoreServices.h>
++#include <Carbon/Carbon.h>
++#include <ApplicationServices/ApplicationServices.h>
+ 
+ typedef struct {
+ 	NMRec	nm;
+Index: Processes/Processes.xs
+===================================================================
+--- Processes/Processes.xs.orig
++++ Processes/Processes.xs
+@@ -74,9 +74,8 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Types.h>
+-#include <Memory.h>
+-#include <Processes.h>
++#include <CoreServices/CoreServices.h>
++#include <ApplicationServices/ApplicationServices.h>
+ #ifdef MACOS_TRADITIONAL
+ #include <GUSIFileSpec.h>
+ #endif
+Index: Resources/Resources.xs
+===================================================================
+--- Resources/Resources.xs.orig
++++ Resources/Resources.xs
+@@ -47,9 +47,7 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Types.h>
+-#include <Memory.h>
+-#include <Resources.h>
++#include <CoreServices/CoreServices.h>
+ 
+ #define ResErrorReturn	\
+ 	if (gMacPerl_OSErr = ResError()) {	\
+Index: Sound/Sound.xs
+===================================================================
+--- Sound/Sound.xs.orig
++++ Sound/Sound.xs
+@@ -20,12 +20,10 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Types.h>
+-#include <Sound.h>
++#include <CoreServices/CoreServices.h>
++#include <Carbon/Carbon.h>
+ 
+-#ifndef __CFM68K__
+-#include <FixMath.h>
+-#else
++#ifdef __CFM68K__
+ #define fixed1				((Fixed) 0x00010000L)
+ #define fract1				((Fract) 0x40000000L)
+ #define positiveInfinity	((long)  0x7FFFFFFFL)
+Index: Speech/Speech.xs
+===================================================================
+--- Speech/Speech.xs.orig
++++ Speech/Speech.xs
+@@ -65,13 +65,10 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Types.h>
+-#include <Memory.h>
+-#include <Speech.h>
++#include <CoreServices/CoreServices.h>
++#include <ApplicationServices/ApplicationServices.h>
+ 
+-#ifndef __CFM68K__
+-#include <FixMath.h>
+-#else
++#ifdef __CFM68K__
+ #define fixed1				((Fixed) 0x00010000L)
+ #define fract1				((Fract) 0x40000000L)
+ #define positiveInfinity	((long)  0x7FFFFFFFL)
+@@ -81,9 +78,6 @@ extern pascal long double Frac2X(Fract x
+ extern pascal long double Fix2X(Fixed x) = 0xA843;
+ extern pascal Fixed X2Fix(long double x) = 0xA844;
+ extern pascal Fract X2Frac(long double x) = 0xA846;
+-#endif
+-
+-#ifdef __CFM68K__
+ 
+ #undef FOURWORDINLINE
+ #define FOURWORDINLINE(w1,w2,w3,w4)  = {w1,w2,w3,w4}
+Index: Types/Types.xs
+===================================================================
+--- Types/Types.xs.orig
++++ Types/Types.xs
+@@ -34,7 +34,7 @@
+ #ifndef MACOS_TRADITIONAL
+ #include "../Carbon.h"
+ #endif
+-#include <Types.h>
++#include <CoreServices/CoreServices.h>
+ 
+ MODULE = Mac::Types	PACKAGE = Mac::Types
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150106/cc141ec6/attachment.html>


More information about the macports-changes mailing list