from spack import *

class Libpng(Package):
    """libpng graphics file format"""
    homepage = "http://www.libpng.org/pub/png/libpng.html"
    url      = "http://sourceforge.net/projects/libpng/files/libpng16/1.6.14/libpng-1.6.14.tar.gz/download"

    version('1.6.14', '2101b3de1d5f348925990f9aa8405660')

    def install(self, spec, prefix):
        configure("--prefix=%s" % prefix)

        make()
        make("install")

from spack import *

class Libpng(Package):
    """libpng graphics file format"""
    homepage = "http://www.libpng.org/pub/png/libpng.html"
    url      = "http://download.sourceforge.net/libpng/libpng-1.6.16.tar.gz"

    version('1.6.14', '2101b3de1d5f348925990f9aa8405660')
    version('1.6.15', '829a256f3de9307731d4f52dc071916d')
    version('1.6.16', '1a4ad377919ab15b54f6cb6a3ae2622d')

    def install(self, spec, prefix):
        configure("--prefix=%s" % prefix)
        make()
        make("install")

Fix libpng to use a better URL
Fix libpng to use a better URL

Sourceforge URLs like this eventually die when the libpng version is bumped:
    http://sourceforge.net/projects/libpng/files/libpng16/1.6.14/libpng-1.6.14.tar.gz/download

But ones like this give you a "permanently moved", which curl -L will follow:
    http://download.sourceforge.net/libpng/libpng-1.6.16.tar.gz
