From d7e9134d42d95d6ffe0606ab9c81d462d01ab21a Mon Sep 17 00:00:00 2001
From: Denis Davydov <davydden@gmail.com>
Date: Fri, 9 Dec 2016 19:58:08 +0100
Subject: [PATCH] astyle: do not set user/group when installing on macOS
 (#2542)

* astyle: do not set user/group when installing on macOS

* astyle: add new version
---
 var/spack/repos/builtin/packages/astyle/package.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py
index 31e1efb591..181b9dd31c 100644
--- a/var/spack/repos/builtin/packages/astyle/package.py
+++ b/var/spack/repos/builtin/packages/astyle/package.py
@@ -23,6 +23,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 ##############################################################################
 from spack import *
+import sys
 
 
 class Astyle(MakefilePackage):
@@ -33,6 +34,7 @@ class Astyle(MakefilePackage):
     homepage = "http://astyle.sourceforge.net/"
     url = "http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz"
 
+    version('2.05.1', '4142d178047d7040da3e0e2f1b030a1a')
     version('2.04', '30b1193a758b0909d06e7ee8dd9627f6')
 
     parallel = False
@@ -43,6 +45,9 @@ def build_directory(self):
     def edit(self, spec, prefix):
         makefile = join_path(self.build_directory(), 'Makefile')
         filter_file(r'^CXX\s*=.*', 'CXX=%s' % spack_cxx, makefile)
+        # strangely enough install -o $(USER) -g $(USER) stoped working on OSX
+        if sys.platform == 'darwin':
+            filter_file(r'^INSTALL=.*', 'INSTALL=install', makefile)
 
     def install_args(self):
         return ['prefix={0}'.format(prefix)]
-- 
GitLab