From b23b4550d06be749b589d27ea565b45d28df365d Mon Sep 17 00:00:00 2001
From: Mikhail Glushenkov <mikhail.glushenkov@gmail.com>
Date: Thu, 30 Jul 2015 01:34:44 +0200
Subject: [PATCH] Revert "Merge pull request #2739 from bgamari/osx-frameworks"

This reverts commit bd7bbd700a93482c8bb6cbf60b880aaf2cef23b1, reversing
changes made to d8fa46181c523ece152bd3aa7a31a29e21929a5b.
---
 Cabal/Distribution/Simple/GHC/Internal.hs | 11 ++---------
 Cabal/Distribution/Simple/PreProcess.hs   |  3 ---
 Cabal/changelog                           |  1 -
 3 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/Cabal/Distribution/Simple/GHC/Internal.hs b/Cabal/Distribution/Simple/GHC/Internal.hs
index 0dc5caa886..b53da0e629 100644
--- a/Cabal/Distribution/Simple/GHC/Internal.hs
+++ b/Cabal/Distribution/Simple/GHC/Internal.hs
@@ -346,9 +346,7 @@ componentCcGhcOptions verbosity implInfo lbi bi clbi pref filename =
       ghcOptInputFiles     = toNubListR [filename],
 
       ghcOptCppIncludePath = toNubListR $ [autogenModulesDir lbi, odir]
-                                          ++ PD.includeDirs bi
-                                          ++ ["/System/Library/Frameworks/"++fw++"/Headers"
-                                              | isOSX, fw <- PD.frameworks bi ],
+                                          ++ PD.includeDirs bi,
       ghcOptPackageDBs     = withPackageDB lbi,
       ghcOptPackages       = toNubListR $ mkGhcOptPackages clbi,
       ghcOptCcOptions      = toNubListR $
@@ -364,7 +362,6 @@ componentCcGhcOptions verbosity implInfo lbi bi clbi pref filename =
       ghcOptObjDir         = toFlag odir
     }
   where
-    isOSX = case buildOS of OSX -> True; _ -> False
     odir | hasCcOdirBug implInfo = pref </> takeDirectory filename
          | otherwise             = pref
          -- ghc 6.4.0 had a bug in -odir handling for C compilations.
@@ -388,9 +385,7 @@ componentGhcOptions verbosity lbi bi clbi odir =
       ghcOptSourcePath      = toNubListR $ [odir] ++ (hsSourceDirs bi)
                                            ++ [autogenModulesDir lbi],
       ghcOptCppIncludePath  = toNubListR $ [autogenModulesDir lbi, odir]
-                                           ++ PD.includeDirs bi
-                                           ++ ["/System/Library/Frameworks/"++fw++"/Headers"
-                                               | isOSX, fw <- PD.frameworks bi ],
+                                           ++ PD.includeDirs bi,
       ghcOptCppOptions      = toNubListR $ cppOptions bi,
       ghcOptCppIncludes     = toNubListR $
                               [autogenModulesDir lbi </> cppHeaderName],
@@ -408,8 +403,6 @@ componentGhcOptions verbosity lbi bi clbi odir =
       ghcOptExtensionMap    = M.fromList . compilerExtensions $ (compiler lbi)
     }
   where
-    isOSX = case buildOS of OSX -> True; _ -> False
-
     toGhcOptimisation NoOptimisation      = mempty --TODO perhaps override?
     toGhcOptimisation NormalOptimisation  = toFlag GhcNormalOptimisation
     toGhcOptimisation MaximumOptimisation = toFlag GhcMaximumOptimisation
diff --git a/Cabal/Distribution/Simple/PreProcess.hs b/Cabal/Distribution/Simple/PreProcess.hs
index 81fa5e9e5d..eadb148ff0 100644
--- a/Cabal/Distribution/Simple/PreProcess.hs
+++ b/Cabal/Distribution/Simple/PreProcess.hs
@@ -410,9 +410,6 @@ ppHsc2hs bi lbi =
           | isOSX
           , opt <- nub (concatMap Installed.frameworkDirs pkgs)
           , what <- ["--cflag", "--lflag"] ]
-       ++ [ "--cflag=-I/System/Library/Frameworks/" ++ opt ++ "/Headers"
-          | isOSX
-          , opt <- nub (concatMap Installed.frameworks pkgs) ]
        ++ [ "--lflag=" ++ arg
           | isOSX
           , opt <- PD.frameworks bi ++ concatMap Installed.frameworks pkgs
diff --git a/Cabal/changelog b/Cabal/changelog
index 7c846d20da..a5f18920ef 100644
--- a/Cabal/changelog
+++ b/Cabal/changelog
@@ -10,7 +10,6 @@
 	  respetively (GHC's '-fprof-auto-{exported,top}' flags) (#193).
 	* New 'custom-setup' stanza to specify setup deps. Setup is also built
 	  with the cabal_macros.h style macros, for conditional compilation.
-	* Include Mac OS X framework headers in include path
 
 1.22.0.0 Johan Tibell <johan.tibell@gmail.com> January 2015
 	* Support GHC 7.10.
-- 
GitLab