<div dir="ltr">Additionally, the dependency port:xorg-libX11 does not seem necessary: I don&#39;t see any evidence in the build log that it is used, and the build succeeds without it being active.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 16, 2016 at 5:23 PM, David Strubbe <span dir="ltr">&lt;<a href="mailto:dstrubbe@macports.org" target="_blank">dstrubbe@macports.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Let me add a few comments.</div><div>- The dependency for BLAS is wrong: the port OpenBLAS provides a library -lopenblas not -lblas. Apparently the &quot;lapack&quot; port includes BLAS anyway. To be simpler and more flexible, I suggest use of the linear algebra port group I created to handle all this and also provide choices of different optimized implementations (ATLAS, Accelerate, or OpenBLAS -- the port has lapack included). See patch below.</div><div>- You are installing a lot of Makefiles and C source files -- is this on purpose? It is somewhat unusual.</div><div>- You are putting everything in the lib directory. This should be reserved for libraries. Headers should go in include; documentation or miscellaneous things should go in share; etc.</div><div>- Since there are tests apparently available, you should create a test phase rather than install their files, so that users can run &quot;port test&quot;.</div><div><br></div><div>David</div><div><br></div><div><div>Index: Portfile</div><div>==============================<wbr>==============================<wbr>=======</div><div>--- Portfile    (revision 153958)</div><div>+++ Portfile    (working copy)</div><div>@@ -3,6 +3,7 @@</div><div> </div><div> PortSystem      1.0</div><div> PortGroup       compilers 1.0</div><div>+PortGroup       linear_algebra 1.0</div><div> </div><div> cvs.date           20160908</div><div> </div><div>@@ -29,9 +30,7 @@</div><div>                     sha256  <wbr>ef797abc51ed8ae27c200f5b71fd0a<wbr>3824d1fa310392dac57067de2e4232<wbr>22ed</div><div> worksrcdir             ${distname}-${version}+dfsg</div><div> </div><div>-depends_lib            port:OpenBLAS \</div><div>-                    port:lapack \</div><div>-                    port:gsl \</div><div>+depends_lib            port:gsl \</div><div>                     port:fftw-3 \</div><div>                     port:pgplot \</div><div>                     port:xorg-libX11</div><div>@@ -47,6 +46,7 @@</div><span class=""><div>     reinplace -W ${worksrcpath} &quot;s|@FFLAGS@|${configure.<wbr>fflags}|g&quot; local_settings</div></span><span class=""><div>     reinplace -W ${worksrcpath} &quot;s|@LDFLAGS@|${configure.<wbr>ldflags}|g&quot; local_settings</div></span><span class=""><div>     reinplace -W ${worksrcpath} &quot;s|@LIB_FORTRAN@|${compilers.<wbr>libfortran}|g&quot; local_settings</div></span><div>+    reinplace -W ${worksrcpath} &quot;s|@LIB_LAPACK@|${linalglib}|<wbr>g&quot; local_settings</div><div> }</div><div> </div><div> build.env-append    HOME_LORENE=${worksrcpath}</div><div>Index: files/local_settings</div><div>==============================<wbr>==============================<wbr>=======</div><div>--- files/local_settings        (revision 153958)</div><div>+++ files/local_settings        (working copy)</div><div>@@ -74,7 +74,7 @@</div><span class=""><div> </div><div> # Linear Algebra Package (LAPACK) library</div></span><div> # ------------------------------<wbr>---------</div><div>-LIB_LAPACK = -llapack -lblas</div><div>+LIB_LAPACK = @LIB_LAPACK</div><span class=""><div> </div><div> # Graphical libraries: PGPLOT, PNG and X11</div></span><div> # ------------------------------<wbr>----------</div></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 16, 2016 at 1:27 PM, Ryan Schmidt <span dir="ltr">&lt;<a href="mailto:ryandesign@macports.org" target="_blank">ryandesign@macports.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
&gt; On Oct 16, 2016, at 12:41 PM, <a href="mailto:thibaut@macports.org" target="_blank">thibaut@macports.org</a> wrote:<br>
&gt;<br>
&gt; Revision<br>
&gt; 153943<br>
&gt; Author<br>
&gt; <a href="mailto:thibaut@macports.org" target="_blank">thibaut@macports.org</a><br>
&gt; Date<br>
&gt; 2016-10-16 10:41:08 -0700 (Sun, 16 Oct 2016)<br>
&gt; Log Message<br>
&gt;<br>
&gt; New port: LORENE<br>
&gt; Added Paths<br>
&gt;<br>
&gt;       • trunk/dports/science/LORENE/<br>
&gt;       • trunk/dports/science/LORENE/Po<wbr>rtfile<br>
&gt;       • trunk/dports/science/LORENE/fi<wbr>les/<br>
&gt;       • trunk/dports/science/LORENE/fi<wbr>les/local_settings<br>
&gt; Diff<br>
&gt;<br>
&gt; Added: trunk/dports/science/LORENE/Po<wbr>rtfile (0 =&gt; 153943)<br>
&gt;<br>
&gt; --- trunk/dports/science/LORENE/Po<wbr>rtfile                              (rev 0)<br>
&gt; +++ trunk/dports/science/LORENE/Po<wbr>rtfile      2016-10-16 17:41:08 UTC (rev 153943)<br>
&gt; @@ -0,0 +1,67 @@<br>
&gt; +# -*- 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:<wbr>ts=4:sts=4<br>
&gt; +# $Id$<br>
<br>
The whitespace of this portfile does not conform to this modeline. Tabs should be replaced with spaces.<br>
<br>
<br>
&gt; +PortSystem      1.0<br>
&gt; +PortGroup       compilers 1.0<br>
&gt; +<br>
&gt; +cvs.date         20160908<br>
&gt; +<br>
&gt; +name                 LORENE<br>
&gt; +version                      0.0.0~cvs${cvs.date}<br>
&gt; +<br>
&gt; +categories           science<br>
&gt; +maintainers          thibaut openmaintainer<br>
&gt; +description          Langage Objet pour la RElativité NumériquE<br>
&gt; +long_description    LORENE is a set of C++ classes to solve various problems \<br>
&gt; +                    arising in numerical relativity, and more generally in \<br>
&gt; +                    computational astrophysics. It provides tools to solve \<br>
&gt; +                    partial differential equations by means of multi-domain \<br>
&gt; +                    spectral methods.<br>
&gt; +<br>
&gt; +license             gpl-2+<br>
&gt; +platforms            darwin<br>
&gt; +<br>
&gt; +homepage             <a href="http://www.lorene.obspm.fr/" rel="noreferrer" target="_blank">http://www.lorene.obspm.fr/</a><br>
&gt; +master_sites     <a href="https://people.debian.org/~thibaut/debian/pool/main/l/lorene/" rel="noreferrer" target="_blank">https://people.debian.org/~th<wbr>ibaut/debian/pool/main/l/loren<wbr>e/</a><br>
&gt; +distname             lorene<br>
&gt; +distfiles            ${distname}_${version}+dfsg.or<wbr>ig.tar.xz<br>
<br>
Because this is not a tar.gz file but a tar.xz file, you must use &quot;use_xz yes&quot; to tell MacPorts how to decompress it. (Mavericks (?) and later can figure it out automatically, but our policy is not to rely on that, and to specify it correctly in the Portfile.)<br>
<br>
<br>
&gt; +checksums           rmd160  36346f8d7a50acee20a5b81051af2e<wbr>7fe5f188c1 \<br>
&gt; +                    sha256  ef797abc51ed8ae27c200f5b71fd0a<wbr>3824d1fa310392dac57067de2e4232<wbr>22ed<br>
&gt; +worksrcdir           ${distname}-${version}+dfsg<br>
&gt; +<br>
&gt; +depends_lib          port:OpenBLAS \<br>
&gt; +                    port:lapack \<br>
&gt; +                    port:gsl \<br>
&gt; +                    port:fftw-3 \<br>
&gt; +                    port:pgplot \<br>
&gt; +                    port:xorg-libX11<br>
&gt; +<br>
&gt; +compilers.choose    cxx f77<br>
&gt; +compilers.setup     require_fortran<br>
&gt; +<br>
&gt; +configure        {<br>
&gt; +    file copy ${filespath}/local_settings ${worksrcpath}/<br>
&gt; +    reinplace -W ${worksrcpath} &quot;s|@CXX@|${configure.cxx}|g&quot; local_settings<br>
&gt; +    reinplace -W ${worksrcpath} &quot;s|@F77@| ${configure.f77} |g&quot; local_settings<br>
&gt; +    reinplace -W ${worksrcpath} &quot;s|@CXXFLAGS@|${configure.cxxf<wbr>lags}|g&quot; local_settings<br>
&gt; +    reinplace -W ${worksrcpath} &quot;s|@FFLAGS@|${configure.fflags<wbr>}|g&quot; local_settings<br>
&gt; +    reinplace -W ${worksrcpath} &quot;s|@LDFLAGS@|${configure.ldfla<wbr>gs}|g&quot; local_settings<br>
&gt; +    reinplace -W ${worksrcpath} &quot;s|@LIB_FORTRAN@|${compilers.l<wbr>ibfortran}|g&quot; local_settings<br>
&gt; +}<br>
<br>
I don&#39;t see anywhere in this Portfile that arranges for the correct -arch (or, in the case of fortran, -m32/-m64) flags to be used. ([get_canonical_archflags ...])<br>
<br>
The universal variant fails and should probably be disabled because:<br>
<br>
Error: Cannot install LORENE for the archs &#39;i386 x86_64&#39; because<br>
Error: its dependency pgplot does not build for the required archs by default<br>
Error: and does not have a universal variant.<br>
<br>
<br>
&gt; +build.env-append    HOME_LORENE=${worksrcpath}<br>
&gt; +build.target        cpp fortran export<br>
&gt; +use_parallel_build  no<br>
&gt; +<br>
&gt; +destroot            {<br>
&gt; +    xinstall -d ${destroot}${prefix}/lib/loren<wbr>e/Lib<br>
&gt; +    xinstall {*}[glob ${worksrcpath}/Lib/*.a] ${destroot}${prefix}/lib/loren<wbr>e/Lib/<br>
&gt; +    xinstall -d ${destroot}${prefix}/lib/loren<wbr>e/C++/Include<br>
&gt; +    xinstall {*}[glob ${worksrcpath}/C++/Include/*.h<wbr>] ${destroot}${prefix}/lib/loren<wbr>e/C++/Include/<br>
&gt; +    xinstall -d ${destroot}${prefix}/lib/loren<wbr>e/C++/Include/Template<br>
&gt; +    xinstall {*}[glob ${worksrcpath}/C++/Include/Tem<wbr>plate/*] ${destroot}${prefix}/lib/loren<wbr>e/C++/Include/Template/<br>
&gt; +    xinstall ${worksrcpath}/local_settings ${destroot}${prefix}/lib/loren<wbr>e/<br>
&gt; +    xinstall -d ${destroot}${prefix}/lib/loren<wbr>e/Devel<br>
&gt; +    xinstall {*}[glob ${worksrcpath}/Devel/*] ${destroot}${prefix}/lib/loren<wbr>e/Devel/<br>
&gt; +    exec cp -a ${worksrcpath}/Codes ${destroot}${prefix}/lib/loren<wbr>e/<br>
&gt; +}<br>
<br>
Why &quot;exec cp -a&quot; instead of &quot;copy&quot;?<br>
<br>
<br>
&gt; --- trunk/dports/science/LORENE/fi<wbr>les/local_settings                          (rev 0)<br>
&gt; +++ trunk/dports/science/LORENE/fi<wbr>les/local_settings  2016-10-16 17:41:08 UTC (rev 153943)<br>
&gt; @@ -0,0 +1,89 @@<br>
&gt; +     #############################<wbr>##############################<wbr>####<br>
&gt; +#<br>
<br>
Should there be this indentation on the first line?<br>
<br>
<br>
&gt; +#  Edit the following lines according to your implementation.<br>
&gt; +#<br>
&gt; +#  The environment variable HOME_LORENE (root directory for the<br>
&gt; +#   Lorene implementation) must be have been already defined.<br>
&gt; +#<br>
&gt; +#############################<wbr>##############################<wbr>####<br>
&gt; +<br>
&gt; +#============================<wbr>===#<br>
&gt; +#           COMPILERS                #<br>
&gt; +#============================<wbr>===#<br>
&gt; +<br>
&gt; +# C++ compiler:<br>
&gt; +# ------------<br>
&gt; +CXX   = @CXX@<br>
&gt; +<br>
&gt; +# Options for the C++ compiler to produce the optimized library:<br>
&gt; +# ------------------------------<wbr>------------------------------<wbr>-<br>
&gt; +CXXFLAGS = @CXXFLAGS@ -DNDEBUG -fPIC<br>
&gt; +<br>
&gt; +# Options for the C++ compiler to produce the library for debugging:<br>
&gt; +# ------------------------------<wbr>------------------------------<wbr>-----<br>
&gt; +CXXFLAGS_G = -g -fPIC<br>
&gt; +<br>
&gt; +# Path for the include files:<br>
&gt; +# --------------------------<br>
&gt; +INC  = -I$(HOME_LORENE)/C++/Include<br>
&gt; +<br>
&gt; +# Converting archives to random libraries (if required, otherwise just ls)<br>
&gt; +# ------------------------------<wbr>------------------------------<wbr>------------<br>
&gt; +RANLIB = ls<br>
&gt; +<br>
&gt; +# Fortran 77 compiler:<br>
&gt; +# -------------------<br>
&gt; +F77   = @F77@<br>
&gt; +<br>
&gt; +# Options for the Fortran 77 compiler to produce the optimized library:<br>
&gt; +# ------------------------------<wbr>------------------------------<wbr>---------<br>
&gt; +F77FLAGS =  @FFLAGS@ -ffixed-form -ffixed-line-length-none -fPIC<br>
&gt; +<br>
&gt; +# Options for the Fortran 77 compiler to produce the library for debugging:<br>
&gt; +# ------------------------------<wbr>------------------------------<wbr>------------<br>
&gt; +F77FLAGS_G = -ffixed-form -ffixed-line-length-none -g -fPIC<br>
&gt; +<br>
&gt; +#============================<wbr>===#<br>
&gt; +#           MAKEDEPEND               #<br>
&gt; +#============================<wbr>===#<br>
&gt; +<br>
&gt; +# First line uses the C precompiler (usually called cpp)<br>
&gt; +# if yours does not support the -M option try to figure out<br>
&gt; +# how to output dependencies file, or use makedepend (2nd line)<br>
&gt; +#----------------------------<wbr>------------------------------<wbr>----<br>
&gt; +MAKEDEPEND = @CXX@ $(INC) -M &gt;&gt; $(df).d $&lt;<br>
&gt; +#MAKEDEPEND = touch $(df).d &amp;&amp; makedepend $(INC) -f $(df).d $&lt;<br>
&gt; +DEPDIR = .deps<br>
&gt; +<br>
&gt; +#============================<wbr>===#<br>
&gt; +#      SYSTEM LIBRARIES              #<br>
&gt; +#============================<wbr>===#<br>
&gt; +<br>
&gt; +# FFT library: FFT991 in Fortran coming with Lorene<br>
&gt; +#              FFTW3 library (must be installed separately)<br>
&gt; +# ------------------------------<wbr>------------------------------<wbr>-------<br>
&gt; +FFT_DIR = FFTW3<br>
&gt; +<br>
&gt; +# C, C++ library, mathematical library and Fortran library<br>
&gt; +# ------------------------------<wbr>---------------------------<br>
&gt; +ifeq ($(FFT_DIR),FFTW3)<br>
&gt; +LIB_CXX = @LDFLAGS@ -lfftw3 @LIB_FORTRAN@ -lstdc++ -lm<br>
&gt; +else<br>
&gt; +LIB_CXX = @LDFLAGS -lgfortran -lstdc++ -lm<br>
&gt; +endif<br>
<br>
On the second LIB_CXX line, did you mean to use &quot;@LIB_FORTRAN@&quot; again instead of &quot;-lgfortran&quot;? You probably also meant &quot;@LDFLAGS@&quot; instead of &quot;@LDFLAGS&quot;.<br>
<br>
<br>
&gt; +<br>
&gt; +# Linear Algebra Package (LAPACK) library<br>
&gt; +# ------------------------------<wbr>---------<br>
&gt; +LIB_LAPACK = -llapack -lblas<br>
&gt; +<br>
&gt; +# Graphical libraries: PGPLOT, PNG and X11<br>
&gt; +# ------------------------------<wbr>----------<br>
&gt; +LIB_PGPLOT = -lcpgplot -lpgplot -lX11<br>
&gt; +<br>
&gt; +# GNU scientific library<br>
&gt; +# ------------------------------<wbr>-----<br>
&gt; +LIB_GSL = -lgsl -lgslcblas<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
macports-dev mailing list<br>
<a href="mailto:macports-dev@lists.macosforge.org" target="_blank">macports-dev@lists.macosforge.<wbr>org</a><br>
<a href="https://lists.macosforge.org/mailman/listinfo/macports-dev" rel="noreferrer" target="_blank">https://lists.macosforge.org/m<wbr>ailman/listinfo/macports-dev</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>