From 6bd15f003948929cd1333450d266dc352f458909 Mon Sep 17 00:00:00 2001 From: Jeroen Date: Thu, 26 Oct 2017 16:45:00 +0200 Subject: [PATCH 1/5] New Cask: gfortran 6.1 --- Casks/gfortran.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Casks/gfortran.rb diff --git a/Casks/gfortran.rb b/Casks/gfortran.rb new file mode 100644 index 000000000000..c20bcbd97124 --- /dev/null +++ b/Casks/gfortran.rb @@ -0,0 +1,22 @@ +cask 'gfortran' do + version '6.1' + sha256 'eb817bce64bf9032595e09166bdaaf740c83bf7258f900b79cd6786437bacbf4' + + # coudert.name/software was verified as official when first introduced to the cask + url "http://coudert.name/software/gfortran-#{version}-ElCapitan.dmg" + name 'gfortran' + homepage 'https://gcc.gnu.org/wiki/GFortranBinaries' + + depends_on macos: '>= :el_capitan' + + pkg 'gfortran-6.1-ElCapitan/gfortran.pkg' + + uninstall delete: [ + '/usr/local/gfortran', + '/usr/local/bin/gfortran', + ] + + caveats do + files_in_usr_local + end +end From bd933ffeb2f6ed768f86003dcad7bbff599e3dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Galv=C3=A3o?= Date: Thu, 26 Oct 2017 17:17:57 +0100 Subject: [PATCH 2/5] Update gfortran.rb --- Casks/gfortran.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Casks/gfortran.rb b/Casks/gfortran.rb index c20bcbd97124..7578be62931c 100644 --- a/Casks/gfortran.rb +++ b/Casks/gfortran.rb @@ -9,7 +9,7 @@ depends_on macos: '>= :el_capitan' - pkg 'gfortran-6.1-ElCapitan/gfortran.pkg' + pkg "gfortran-#{version}-ElCapitan/gfortran.pkg" uninstall delete: [ '/usr/local/gfortran', From 36dd3e560674b4125dcda89df07cbe61faaaa1bd Mon Sep 17 00:00:00 2001 From: Jeroen Date: Fri, 27 Oct 2017 14:14:26 +0200 Subject: [PATCH 3/5] add conflicts_with and pkgutil uninstaller --- Casks/gfortran.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Casks/gfortran.rb b/Casks/gfortran.rb index 7578be62931c..a450d6297df0 100644 --- a/Casks/gfortran.rb +++ b/Casks/gfortran.rb @@ -7,14 +7,16 @@ name 'gfortran' homepage 'https://gcc.gnu.org/wiki/GFortranBinaries' + conflicts_with formula: 'gcc' depends_on macos: '>= :el_capitan' pkg "gfortran-#{version}-ElCapitan/gfortran.pkg" - uninstall delete: [ - '/usr/local/gfortran', - '/usr/local/bin/gfortran', - ] + uninstall delete: [ + '/usr/local/gfortran', + '/usr/local/bin/gfortran', + ], + pkgutil: 'com.gnu.gfortran' caveats do files_in_usr_local From c90cd8a6b4d2b7c542b6d4ffa9a29d9bb9722803 Mon Sep 17 00:00:00 2001 From: Jeroen Date: Fri, 27 Oct 2017 14:27:38 +0200 Subject: [PATCH 4/5] install Sierra build on Sierra and up --- Casks/gfortran.rb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Casks/gfortran.rb b/Casks/gfortran.rb index a450d6297df0..5bdaa9968448 100644 --- a/Casks/gfortran.rb +++ b/Casks/gfortran.rb @@ -1,17 +1,23 @@ cask 'gfortran' do - version '6.1' - sha256 'eb817bce64bf9032595e09166bdaaf740c83bf7258f900b79cd6786437bacbf4' - # coudert.name/software was verified as official when first introduced to the cask - url "http://coudert.name/software/gfortran-#{version}-ElCapitan.dmg" + if MacOS.version == :el_capitan + version '6.1' + sha256 'eb817bce64bf9032595e09166bdaaf740c83bf7258f900b79cd6786437bacbf4' + url "http://coudert.name/software/gfortran-#{version}-ElCapitan.dmg" + pkg "gfortran-#{version}-ElCapitan/gfortran.pkg" + else + version '6.3' + sha256 '38b81bc878dba41cfdbb0c335aec5a97554a5d1766fb3e3ca6be7da0df9e8e09' + url "http://coudert.name/software/gfortran-#{version}-Sierra.dmg" + pkg 'gfortran.pkg' + end + name 'gfortran' homepage 'https://gcc.gnu.org/wiki/GFortranBinaries' conflicts_with formula: 'gcc' depends_on macos: '>= :el_capitan' - pkg "gfortran-#{version}-ElCapitan/gfortran.pkg" - uninstall delete: [ '/usr/local/gfortran', '/usr/local/bin/gfortran', From ba584eb96fa95e36c1b038e0e629741151df5645 Mon Sep 17 00:00:00 2001 From: Jeroen Date: Fri, 27 Oct 2017 14:35:54 +0200 Subject: [PATCH 5/5] repeat the url comment --- Casks/gfortran.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Casks/gfortran.rb b/Casks/gfortran.rb index 5bdaa9968448..f1f93bcf45f5 100644 --- a/Casks/gfortran.rb +++ b/Casks/gfortran.rb @@ -1,13 +1,16 @@ cask 'gfortran' do - # coudert.name/software was verified as official when first introduced to the cask if MacOS.version == :el_capitan version '6.1' sha256 'eb817bce64bf9032595e09166bdaaf740c83bf7258f900b79cd6786437bacbf4' + + # coudert.name/software was verified as official when first introduced to the cask url "http://coudert.name/software/gfortran-#{version}-ElCapitan.dmg" pkg "gfortran-#{version}-ElCapitan/gfortran.pkg" else version '6.3' sha256 '38b81bc878dba41cfdbb0c335aec5a97554a5d1766fb3e3ca6be7da0df9e8e09' + + # coudert.name/software was verified as official when first introduced to the cask url "http://coudert.name/software/gfortran-#{version}-Sierra.dmg" pkg 'gfortran.pkg' end