Gmp version 4.3.1 - How to Download and Install on Mac OS X
Saturday the 21st of November, 2009

    version 4.3.1

      View the most recent changes for the gmp port at: gmp.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for gmp.
      The raw portfile for gmp 4.3.1 is located here:
      http://gmp.darwinports.com/dports/devel/gmp/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/gmp


      # -*- 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
      The gmp Portfile 57676 2009-09-14 21:01:51Z toby macports.org $

      PortSystem 1.0
      PortGroup muniversal 1.0

      Name: gmp
      Version: 4.3.1
      Revision: 1
      Category: devel math
      Maintainers: mcalhoun openmaintainer
      Platform: darwin
      Description: GNU multiple precision arithmetic library
      Long Description: GNU MP is a library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. It has a rich set of functions, and the functions have a regular interface. GNU MP is designed to be as fast as possible, both for small operands and for huge operands. The speed is achieved by using fullwords as the basic arithmetic type, by using fast algorithms, by carefully optimized assembly code for the most common inner loops for a lots of CPUs, and by a general emphasis on speed (instead of simplicity or elegance).

      Homepage: http://gmplib.org/
      Master Sites: gnu

      Checksums: md5 26cec15a90885042dd4a15c4003b08ae sha1 acbd1edc61230b1457e9742136994110e4f381b2 rmd160 f325d809dde1f87816eea3697bcfe00f3ec8f10d

      use_bzip2 yes
      use_parallel_build yes

      # See http://trac.macports.org/ticket/16634
      Patch Files: patch-gmp-h.in.diff

      configure.args --infodir=${prefix}/share/info --enable-cxx

      # if CFLAGS and CXXFLAGS are undefined, configure script tries to build fastest library for build machine.
      # On PowerPC machines, CFLAGS must be empty to get -force_cpusubtype_ALL.
      pre-configure {
      # Set in pre-configure so any universal flags are removed as well.
      configure.build_arch
      configure.cflags
      configure.cxxflags
      }
      configure.pipe no

      # Since CFLAGS and CXXFLAGS must be empty, append -arch ... to CC and CXX.
      merger_arch_compiler yes

      test.run yes
      test.cmd make
      test.target check

      if {![variant_isset universal]} {
      if {[info exists build_arch] && ${build_arch} == "x86_64"} {
      configure.env ABI=64
      } else {
      configure.env ABI=32
      }
      } else {
      # Keep configure.cflags and configure.cxxflags empty.
      set merger_arch_flag no

      array set merger_configure_env {
      ppc ABI=32
      i386 ABI=32
      ppc64 ABI=mode64
      x86_64 ABI=64
      }

      # universal_archs_to_use might not be set before pre-fetch.
      pre-destroot {
      global merger_dont_diff merger_configure_env

      # PortGroup muniversal has difficulty merging three files.
      if { [llength ${universal_archs_to_use}] == 3 } {
      set merger_dont_diff "${prefix}/include/gmp.h"
      }
      }

      # For cross-compiling, set C compiler and pre-precessor.
      if { ${os.arch}=="i386" } {
      if { ${os.major} >= 10 } {
      lappend merger_configure_env(ppc) CC_FOR_BUILD=${configure.cc} CPP_FOR_BUILD=${configure.cpp}
      }
      lappend merger_configure_env(ppc64) CC_FOR_BUILD=${configure.cc} CPP_FOR_BUILD=${configure.cpp}
      } else {
      lappend merger_configure_env(i386) CC_FOR_BUILD=${configure.cc} CPP_FOR_BUILD=${configure.cpp}
      lappend merger_configure_env(x86_64) CC_FOR_BUILD=${configure.cc} CPP_FOR_BUILD=${configure.cpp}
      }
      }

      platform powerpc {
      # See http://trac.macports.org/ticket/9053
      patchfiles-append patch-config.guess.diff
      }

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/gmp
      % sudo port install gmp
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching gmp
      ---> Verifying checksum for gmp
      ---> Extracting gmp
      ---> Configuring gmp
      ---> Building gmp with target all
      ---> Staging gmp into destroot
      ---> Installing gmp
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using gmp with these commands:
      %  man gmp
      % apropos gmp
      % which gmp
      % locate gmp

     Where to find more information:

    Darwin Ports



    Lightbox this page.