libpng-1.6.55

#### Gaming Linux® From Scratch - Version 13.0

### Chapter 8. Basic X11 Software

- Prev

  Which-2.23 and Alternatives

- Next

  FreeType-2.14.1

- Up
- Home

# libpng-1.6.55

## Introduction to libpng

The libpng package contains libraries used by other programs for reading and writing PNG files. The PNG format was designed as a replacement for GIF and, to a lesser extent, TIFF, with many improvements and extensions and lack of patent problems.

- Download: https://downloads.sourceforge.net/libpng/libpng-1.6.55.tar.xz

### Additional Downloads

- Recommended patch to include animated png functionality in libpng (required to use the system libpng in Firefox, Seamonkey, and Thunderbird): https://downloads.sourceforge.net/sourceforge/libpng-apng/libpng-1.6.54-apng.patch.gz

## Installation of libpng

If you want to patch libpng to support apng files, do so now:

    gzip -cd ../libpng-1.6.54-apng.patch.gz | patch -p1

Install libpng by running the following commands:

    ./configure --prefix=/usr --disable-static &&
    make

Now, as the `root` user:

    make install &&
    mkdir -v /usr/share/doc/libpng-1.6.55 &&
    cp -v README libpng-manual.txt /usr/share/doc/libpng-1.6.55

## lib32 Installation of libpng

Install lib32-libpng by running the following commands:

    make distclean &&
    CC="gcc -m32" CXX="g++ -m32"         \
    PKG_CONFIG_PATH=/usr/lib32/pkgconfig \
    ./configure --prefix=/usr            \
                --libdir=/usr/lib32      \
                --host=i686-pc-linux-gnu \
                --disable-static &&

    make

Now, as the `root` user:

    make DESTDIR=$PWD/DESTDIR install     &&
    cp -vr DESTDIR/usr/lib32/* /usr/lib32 &&
    rm -rf DESTDIR                        &&
    ldconfig

## Command Explanations

### Note

Run ./configure --help for a full list of options.

`--disable-static`: This switch prevents installation of static versions of the libraries.

## Contents

Installed Programs: libpng-config (symlink), libpng16-config, pngfix, and png-fix-itxt
Installed Libraries: libpng
Installed Directories: /usr/include/libpng16 and /usr/share/doc/libpng-1.6.55

### Short Descriptions

pngfix | tests, optimizes and optionally fixes the zlib header in PNG files. Optionally, when fixing, strips ancillary chunks from the file
png-fix-itxt | fixes PNG files that have an incorrect length field in the iTXt chunks
libpng-config | is a shell script that provides configuration information for applications wanting to use libpng
`libpng` | contain routines used to create and manipulate PNG format graphics files

- Prev

  Which-2.23 and Alternatives

- Next

  FreeType-2.14.1

- Up
- Home