<pre style='margin:0'>
Herby Gillot (herbygillot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/773c5aaa1c104f2744bbc9d2d7263a8799e07f64">https://github.com/macports/macports-ports/commit/773c5aaa1c104f2744bbc9d2d7263a8799e07f64</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 773c5aaa1c104f2744bbc9d2d7263a8799e07f64
</span>Author: Sergey Fedorov <vital.had@gmail.com>
AuthorDate: Mon Jan 9 22:00:13 2023 +0700
<span style='display:block; white-space:pre;color:#404040;'> fortran-1.0: new PG
</span>---
_resources/port1.0/group/fortran-1.0.tcl | 84 ++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/fortran-1.0.tcl b/_resources/port1.0/group/fortran-1.0.tcl
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..0ccfe34961c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/fortran-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,84 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# This PortGroup provides support for building Fortran packages.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Usage:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# PortGroup fortran 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup compiler_blacklist_versions 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup compilers 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup github 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default categories "fortran"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_build-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:fpm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.blacklist-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *gcc-4.*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+global os.platform os.arch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platform darwin powerpc {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiler.blacklist-append *clang*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compilers.choose fc f90
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compilers.setup require_fortran -g95
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# For now, avoid universal:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default universal_variant no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+use_configure no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-build {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Make gfortran symbolic link
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0755 -d ${workpath}/bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ln -s ${configure.fc} ${workpath}/bin/gfortran
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.env-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PATH=$env(PATH):${workpath}/bin \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FC=${configure.fc}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.cmd ${prefix}/bin/fpm install
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+options fortran.profile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+global prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default profile release
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.cmd-append --prefix="${workpath}${prefix}" --profile="${profile}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+global name
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set bindir ${workpath}${prefix}/bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists ${bindir}] && [file isdirectory ${bindir}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${destroot}${prefix}/bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fs-traverse exe ${bindir} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists ${exe}] && [file isfile ${exe}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0755 ${exe} ${destroot}${prefix}/bin/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set incdir ${workpath}${prefix}/include
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists ${incdir}] && [file isdirectory ${incdir}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${destroot}${prefix}/include/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fs-traverse inc ${incdir} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists ${inc}] && [file isfile ${inc}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && ([string match "*.h" ${inc}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || [string match "*.mod" ${inc}])} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0644 ${inc} ${destroot}${prefix}/include/${name}/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set libdir ${workpath}${prefix}/lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists ${libdir}] && [file isdirectory ${libdir}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${destroot}${prefix}/lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fs-traverse lib ${libdir} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists ${lib}] && [file isfile ${lib}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && ([string match "*.a" ${lib}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || [string match "*.dylib" ${lib}])} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0644 ${lib} ${destroot}${prefix}/lib/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span></pre><pre style='margin:0'>
</pre>