Upx version 3.04 - How to Download and Install on Mac OS X
Saturday the 7th of November, 2009

    version 3.04

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


      The upx Portfile 59075 2009-10-09 11:10:01Z jmr macports.org $

      PortSystem 1.0

      Name: upx
      Version: 3.04
      Revision: 1
      Category: archivers
      Maintainers: gmail.com:cedric.luthi
      Description: compress or expand executable files
      Long Description: UPX is a free, portable, extendable, high-performance executable packer for several different executable formats
      Homepage: http://upx.sourceforge.net/
      Platform: darwin
      Master Sites: ${homepage}/download/

      distname ${name}-${version}-src
      use_bzip2 yes
      Checksums: [suffix ${distname}] md5 68d662b1f831335460f9bfdbf632c6ce sha1 76e509efb52e1b891e929601f7cb8acbe349445e rmd160 066103c97aa3a624af2903f3e23fb0fe952bffb7

      Patch Files: patch-p_mach.cpp

      universal_variant no
      use_configure no
      build.env CPPFLAGS="-I${prefix}/include" LDFLAGS="-L${prefix}/lib"

      depends_lib port:ucl port:zlib

      # pod2man, pod2text, and pod2html are used to generate documentation
      depends_build bin:pod2man:perl5 bin:pod2text:perl5 bin:pod2html:perl5

      post-configure {
      # Ensure that the correct compiler is used
      reinplace "s|CXX = .*|CXX = ${configure.cxx}|" ${worksrcpath}/src/Makefile
      }

      destroot {
      xinstall -m 755 ${worksrcpath}/src/upx.out ${destroot}${prefix}/bin/upx

      xinstall -m 644 ${worksrcpath}/doc/upx.1 ${destroot}${prefix}/share/man/man1

      xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
      xinstall -m 644 -W ${worksrcpath}/doc upx.doc upx.html ${destroot}${prefix}/share/doc/${name}
      xinstall -m 644 -W ${worksrcpath} BUGS COPYING LICENSE NEWS PROJECTS README README.1ST README.SRC THANKS TODO ${destroot}${prefix}/share/doc/${name}
      }

      Variant: lzma description {Support LZMA compression} {
      set lzma-distfile [suffix lzma465]
      master_sites-append sourceforge:sevenzip:lzma
      distfiles-append ${lzma-distfile}:lzma
      checksums-append ${lzma-distfile} md5 29d5ffd03a5a3e51aef6a74e9eafb759 sha1 5ec1c4606fec88c770a9712073e83916f8aed173 rmd160 70953d4ee8542addf566953e0ed62e9c75a016b5
      build.env-append UPX_LZMADIR=${workpath}
      }

      livecheck.type regex
      livecheck.url ${homepage}
      livecheck.regex Version (\\d(\\.\\d+)*)

    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/upx
      % sudo port install upx
      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 upx
      ---> Verifying checksum for upx
      ---> Extracting upx
      ---> Configuring upx
      ---> Building upx with target all
      ---> Staging upx into destroot
      ---> Installing upx
    - 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 upx with these commands:
      %  man upx
      % apropos upx
      % which upx
      % locate upx

     Where to find more information:

    Darwin Ports



    Lightbox this page.