[144735] trunk/dports/science/esorepo/Portfile

cal at macports.org cal at macports.org
Sat Jan 16 13:01:12 PST 2016


Revision: 144735
          https://trac.macports.org/changeset/144735
Author:   cal at macports.org
Date:     2016-01-16 13:01:12 -0800 (Sat, 16 Jan 2016)
Log Message:
-----------
esorepo: whitespace only, conform to modeline

See https://lists.macosforge.org/pipermail/macports-dev/2016-January/032290.html

Modified Paths:
--------------
    trunk/dports/science/esorepo/Portfile

Modified: trunk/dports/science/esorepo/Portfile
===================================================================
--- trunk/dports/science/esorepo/Portfile	2016-01-16 20:59:30 UTC (rev 144734)
+++ trunk/dports/science/esorepo/Portfile	2016-01-16 21:01:12 UTC (rev 144735)
@@ -30,76 +30,76 @@
 build {}
 
 destroot {
-  xinstall -m 755 -d ${destroot}${prefix}/share/${name}
-  xinstall -m 644 ${filespath}/eso-pubkey.pem ${destroot}${prefix}/share/${name}/eso-pubkey.pem
+    xinstall -m 755 -d ${destroot}${prefix}/share/${name}
+    xinstall -m 644 ${filespath}/eso-pubkey.pem ${destroot}${prefix}/share/${name}/eso-pubkey.pem
 }
 
 pre-activate {
-  set config_file [open ${prefix}/etc/macports/sources.conf r]
-  set config_data [read ${config_file}]
-  close ${config_file}
-  set already_in_sources 0
-  if {[regexp -line {^ftp://ftp\.eso\.org/pub/dfs/pipelines/repositories/macports/ports\.tar$} ${config_data}]} {
-    set already_in_sources 1
-    ui_error "${prefix}/etc/macports/sources.conf already contains a reference to ftp://ftp.eso.org/pub/dfs/pipelines/repositories/macports/ports.tar."
-  }
-  set config_file [open ${prefix}/etc/macports/archive_sites.conf r]
-  set config_data [read ${config_file}]
-  close ${config_file}
-  set already_in_archive_sites 0
-  if {[regexp -line {^urls\s+ftp://ftp\.eso\.org/pub/dfs/pipelines/repositories/macports/packages$} ${config_data}]} {
-    set already_in_archive_sites 1
-    ui_error "${prefix}/etc/macports/archive_sites.conf already contains a reference to ftp://ftp.eso.org/pub/dfs/pipelines/repositories/macports/packages."
-  }
-  set config_file [open ${prefix}/etc/macports/pubkeys.conf r]
-  set config_data [read ${config_file}]
-  close ${config_file}
-  set already_in_pubkeys 0
-  # Check for the public key reference with a loop rather than regexp, since ${prefix} may contain one of '[](){}?.\'
-  foreach line [split ${config_data} "\n"] {
-    if {"${line}" == "${prefix}/share/${name}/eso-pubkey.pem"} {
-      set already_in_pubkeys 1
-      ui_error "${prefix}/etc/macports/pubkeys.conf already contains a reference to ${prefix}/share/${name}/eso-pubkey.pem."
-      break
+    set config_file [open ${prefix}/etc/macports/sources.conf r]
+    set config_data [read ${config_file}]
+    close ${config_file}
+    set already_in_sources 0
+    if {[regexp -line {^ftp://ftp\.eso\.org/pub/dfs/pipelines/repositories/macports/ports\.tar$} ${config_data}]} {
+        set already_in_sources 1
+        ui_error "${prefix}/etc/macports/sources.conf already contains a reference to ftp://ftp.eso.org/pub/dfs/pipelines/repositories/macports/ports.tar."
     }
-  }
-  if {${already_in_sources} || ${already_in_archive_sites} || ${already_in_pubkeys}} {
-    ui_error "A number of references to the ESO repository have already been configured."
-    ui_error "Thus, either the repository is already accessible, in which case this port is"
-    ui_error "not necessary, or the configuration is not complete."
-    ui_error "If you want to add the ESO repository to MacPorts with this port then remove"
-    ui_error "all references mentioned above and try install this port again."
-    return -code error "ESO repository might have already been configured manually."
-  }
-  set config_file [open ${prefix}/etc/macports/sources.conf a]
-  puts ${config_file} "# ESO MacPorts Portfile source repository (automatically added by ${name})."
-  puts ${config_file} "ftp://ftp.eso.org/pub/dfs/pipelines/repositories/macports/ports.tar"
-  close ${config_file}
-  set config_file [open ${prefix}/etc/macports/archive_sites.conf a]
-  puts ${config_file} "# ESO MacPorts binary package repository (automatically added by ${name})."
-  puts ${config_file} "name             ESO repository"
-  puts ${config_file} "type             tbz2"
-  puts ${config_file} "prefix           /opt/local"
-  puts ${config_file} "applications_dir /Applications/MacPorts"
-  puts ${config_file} "frameworks_dir   /opt/local/Library/Frameworks"
-  puts ${config_file} "urls             ftp://ftp.eso.org/pub/dfs/pipelines/repositories/macports/packages"
-  close ${config_file}
-  set config_file [open ${prefix}/etc/macports/pubkeys.conf a]
-  puts ${config_file} "# ESO RSA public signature key (automatically added by ${name})."
-  puts ${config_file} "${prefix}/share/${name}/eso-pubkey.pem"
-  close ${config_file}
+    set config_file [open ${prefix}/etc/macports/archive_sites.conf r]
+    set config_data [read ${config_file}]
+    close ${config_file}
+    set already_in_archive_sites 0
+    if {[regexp -line {^urls\s+ftp://ftp\.eso\.org/pub/dfs/pipelines/repositories/macports/packages$} ${config_data}]} {
+        set already_in_archive_sites 1
+        ui_error "${prefix}/etc/macports/archive_sites.conf already contains a reference to ftp://ftp.eso.org/pub/dfs/pipelines/repositories/macports/packages."
+    }
+    set config_file [open ${prefix}/etc/macports/pubkeys.conf r]
+    set config_data [read ${config_file}]
+    close ${config_file}
+    set already_in_pubkeys 0
+    # Check for the public key reference with a loop rather than regexp, since ${prefix} may contain one of '[](){}?.\'
+    foreach line [split ${config_data} "\n"] {
+        if {"${line}" == "${prefix}/share/${name}/eso-pubkey.pem"} {
+            set already_in_pubkeys 1
+            ui_error "${prefix}/etc/macports/pubkeys.conf already contains a reference to ${prefix}/share/${name}/eso-pubkey.pem."
+            break
+        }
+    }
+    if {${already_in_sources} || ${already_in_archive_sites} || ${already_in_pubkeys}} {
+        ui_error "A number of references to the ESO repository have already been configured."
+        ui_error "Thus, either the repository is already accessible, in which case this port is"
+        ui_error "not necessary, or the configuration is not complete."
+        ui_error "If you want to add the ESO repository to MacPorts with this port then remove"
+        ui_error "all references mentioned above and try install this port again."
+        return -code error "ESO repository might have already been configured manually."
+    }
+    set config_file [open ${prefix}/etc/macports/sources.conf a]
+    puts ${config_file} "# ESO MacPorts Portfile source repository (automatically added by ${name})."
+    puts ${config_file} "ftp://ftp.eso.org/pub/dfs/pipelines/repositories/macports/ports.tar"
+    close ${config_file}
+    set config_file [open ${prefix}/etc/macports/archive_sites.conf a]
+    puts ${config_file} "# ESO MacPorts binary package repository (automatically added by ${name})."
+    puts ${config_file} "name             ESO repository"
+    puts ${config_file} "type             tbz2"
+    puts ${config_file} "prefix           /opt/local"
+    puts ${config_file} "applications_dir /Applications/MacPorts"
+    puts ${config_file} "frameworks_dir   /opt/local/Library/Frameworks"
+    puts ${config_file} "urls             ftp://ftp.eso.org/pub/dfs/pipelines/repositories/macports/packages"
+    close ${config_file}
+    set config_file [open ${prefix}/etc/macports/pubkeys.conf a]
+    puts ${config_file} "# ESO RSA public signature key (automatically added by ${name})."
+    puts ${config_file} "${prefix}/share/${name}/eso-pubkey.pem"
+    close ${config_file}
 }
 
 post-deactivate {
-  reinplace -E "/^# ESO MacPorts Portfile source repository \\(automatically added by ${name}\\)\\.\[\[:space:]]*$/{ \
-    N;/\\nftp:\\/\\/ftp\\.eso\\.org\\/pub\\/dfs\\/pipelines\\/repositories\\/macports\\/ports\\.tar\[\[:space:]]*$/d;}" \
-    ${prefix}/etc/macports/sources.conf
-  reinplace -E "/^# ESO MacPorts binary package repository \\(automatically added by ${name}\\)\\.\[\[:space:]]*$/{ \
-    N;N;N;N;N;N;/\\nurls \[\[:space:]]*ftp:\\/\\/ftp\\.eso\\.org\\/pub\\/dfs\\/pipelines\\/repositories\\/macports\\/packages\[\[:space:]]*$/d;}" \
-    ${prefix}/etc/macports/archive_sites.conf
-  reinplace -E "/^# ESO RSA public signature key \\(automatically added by ${name}\\)\\.\[\[:space:]]*$/{ \
-    N;/\\n\[^#]*\\/share\\/${name}\\/eso-pubkey\\.pem\[\[:space:]]*$/d;}" \
-    ${prefix}/etc/macports/pubkeys.conf
+    reinplace -E "/^# ESO MacPorts Portfile source repository \\(automatically added by ${name}\\)\\.\[\[:space:]]*$/{ \
+        N;/\\nftp:\\/\\/ftp\\.eso\\.org\\/pub\\/dfs\\/pipelines\\/repositories\\/macports\\/ports\\.tar\[\[:space:]]*$/d;}" \
+        ${prefix}/etc/macports/sources.conf
+    reinplace -E "/^# ESO MacPorts binary package repository \\(automatically added by ${name}\\)\\.\[\[:space:]]*$/{ \
+        N;N;N;N;N;N;/\\nurls \[\[:space:]]*ftp:\\/\\/ftp\\.eso\\.org\\/pub\\/dfs\\/pipelines\\/repositories\\/macports\\/packages\[\[:space:]]*$/d;}" \
+        ${prefix}/etc/macports/archive_sites.conf
+    reinplace -E "/^# ESO RSA public signature key \\(automatically added by ${name}\\)\\.\[\[:space:]]*$/{ \
+        N;/\\n\[^#]*\\/share\\/${name}\\/eso-pubkey\\.pem\[\[:space:]]*$/d;}" \
+        ${prefix}/etc/macports/pubkeys.conf
 }
 
 notes "\
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160116/864cc653/attachment-0001.html>


More information about the macports-changes mailing list