[MacPorts] #51303: netcdf: Request: Add static library libnetcdf.a to build

MacPorts noreply at macports.org
Wed May 4 02:35:57 PDT 2016


#51303: netcdf: Request: Add static library libnetcdf.a to build
----------------------------+--------------------------------
 Reporter:  andy.nowacki@…  |      Owner:  macports-tickets@…
     Type:  enhancement     |     Status:  new
 Priority:  Normal          |  Milestone:
Component:  ports           |    Version:  2.3.4
 Keywords:                  |       Port:  netcdf
----------------------------+--------------------------------
 The majority of library ports that I have installed, but admittedly not
 all, seem to build and install both a static and dynamic version of the
 library.  This is based on:

 {{{
 $ ls /opt/local/lib/lib*.{a,dylib} |
     awk -F. '!/lib.*\..*\.dylib/ {lib[$1]++}
     END {for (l in lib) if (lib[l] > 1) {
         print l, "yes"; n++
     } else {
         print l, "no"; m++
     }
     print "\n"n, "of", n+m, "have static libraries"}'
 }}}

 Quite a few codes that I use, one example being SEATREE
 (http://geosys.usc.edu/projects/seatree/wiki/), seem to want to enforce
 static linking (presumably for executable portability or 'performance'),
 and so will not use a dynamic library.  Would it be possible for the
 NetCDF port to create a static library?

 I apologise for not offering a patch for this, but my brain is not big
 enough to deal with CMake.  I understand this is probably low priority,
 but I for one would find building a static library very useful, and it
 hopefully would be fairly trivial.  I note that the `netcdf-fortran` port
 ''does'' build the static library, as does `hdf5`, which prompted me to
 believe the suggestion might be feasible.  Please let me know if I can
 help in any way.

-- 
Ticket URL: <https://trac.macports.org/ticket/51303>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list