Difference between revisions of "Libjpeg"

From CBLFS
Jump to navigationJump to search
(Added DESTDIR patch)
Line 9: Line 9:
 
!Required Patch for PowerPC:
 
!Required Patch for PowerPC:
 
| http://svn.cross-lfs.org/svn/repos/patches/jpeg/jpeg-{{Libjpeg-Version}}-ppc-1.patch
 
| http://svn.cross-lfs.org/svn/repos/patches/jpeg/jpeg-{{Libjpeg-Version}}-ppc-1.patch
 +
|-valign="top"
 +
!Optional Patch:
 +
|http://svn.cross-lfs.org/svn/repos/patches/jpeg/jpeg-{{Libjpeg-Version}}-destdir-1.patch
 
|}
 
|}
  
Line 17: Line 20:
 
== Dependencies ==
 
== Dependencies ==
  
== Note to DESTDIR Fans ==
+
== Configuration Information ==
  
Unfortunately, Libjpeg ignores DESTDIR and has no equivalent, so you're going to have to either edit the Makefile, or you have to call '''make install''' as follows:
+
{{Note|If you wish to use ''DESTDIR'' when installing libjpeg, the optional patch above must be applied.}}
  
make bindir=<DESTDIR>/usr/bin \
+
== Non-Multilib ==
mandir=<DESTDIR>/usr/man/man1 \
 
libdir=<DESTDIR>/usr/lib \
 
includedir=<DESTDIR>/usr/include install
 
  
Of course <DESTDIR> is whatever path that you'd normally set DESTDIR to, and if you're installing the N32 or 64Bit versions, you need to change libdir to /usr/lib32 or /usr/lib64 as appropriate.
+
Apply the optional, ''DESTDIR'', patch:
  
You also have to create the target directories before running '''make install''' since it won't create them for you:
+
patch -Np1 -i ../jpeg-{{Libjpeg-Version}}-destdir-1.patch
 
 
  install -dv <DESTDIR>/usr/bin
 
  install -dv <DESTDIR>/usr/man/man1
 
  install -dv <DESTDIR>/usr/lib (or lib{32} or lib{64})
 
  install -dv <DESTDIR>/usr/include
 
 
 
== Non-Multilib ==
 
  
 
Compile the package:
 
Compile the package:
Line 54: Line 47:
  
 
=== 32Bit ===
 
=== 32Bit ===
 +
 +
Apply the optional, ''DESTDIR'', patch:
 +
 +
patch -Np1 -i ../jpeg-{{Libjpeg-Version}}-destdir-1.patch
  
 
Compile the package:
 
Compile the package:
Line 66: Line 63:
  
 
=== N32 ===
 
=== N32 ===
 +
 +
Apply the optional, ''DESTDIR'', patch:
 +
 +
patch -Np1 -i ../jpeg-{{Libjpeg-Version}}-destdir-1.patch
  
 
Compile the package:
 
Compile the package:
Line 79: Line 80:
  
 
=== 64Bit ===
 
=== 64Bit ===
 +
 +
Apply the optional, ''DESTDIR'', patch:
 +
 +
patch -Np1 -i ../jpeg-{{Libjpeg-Version}}-destdir-1.patch
  
 
Compile the package:
 
Compile the package:

Revision as of 10:27, 18 February 2008

Download Source: http://www.ijg.org/files/jpegsrc.v8d.tar.gz
Required Patch: http://svn.cross-lfs.org/svn/repos/patches/jpeg/jpeg-8d-config_update-1.patch
Required Patch for PowerPC: http://svn.cross-lfs.org/svn/repos/patches/jpeg/jpeg-8d-ppc-1.patch
Optional Patch: http://svn.cross-lfs.org/svn/repos/patches/jpeg/jpeg-8d-destdir-1.patch

Introduction to Libjpeg

Libjpeg is a library developed by the Independent JPEG Group for JPEG image compression.

Project Homepage: http://www.ijg.org/

Dependencies

Configuration Information

Caution.png

Note

If you wish to use DESTDIR when installing libjpeg, the optional patch above must be applied.

Non-Multilib

Apply the optional, DESTDIR, patch:

patch -Np1 -i ../jpeg-8d-destdir-1.patch

Compile the package:

patch -Np1 -i ../jpeg-8d-config_update-1.patch &&
./configure --prefix=/usr --enable-static --enable-shared &&
make

Install the package

make install

Command Explanations

--enable-static --enable-shared: These switches tell libjpeg to build both shared and static libraries.

Multilib

32Bit

Apply the optional, DESTDIR, patch:

patch -Np1 -i ../jpeg-8d-destdir-1.patch

Compile the package:

patch -Np1 -i ../jpeg-8d-config_update-1.patch &&
CC="gcc ${BUILD32}" ./configure --prefix=/usr --enable-static --enable-shared &&
make

Install the package

make install

N32

Apply the optional, DESTDIR, patch:

patch -Np1 -i ../jpeg-8d-destdir-1.patch

Compile the package:

patch -Np1 -i ../jpeg-8d-config_update-1.patch &&
CC="gcc ${BUILDN32}" ./configure --prefix=/usr --libdir=/usr/lib32 \
    --enable-static --enable-shared &&
make libdir=/usr/lib32

Install the package

make libdir=/usr/lib32 install

64Bit

Apply the optional, DESTDIR, patch:

patch -Np1 -i ../jpeg-8d-destdir-1.patch

Compile the package:

patch -Np1 -i ../jpeg-8d-config_update-1.patch &&
CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 \
    --enable-static --enable-shared &&
make libdir=/usr/lib64

Install the package

make libdir=/usr/lib64 install

Contents

Installed Programs: cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom
Installed Libraries: libjpeg.{a,la,so}
Installed Directories: None

Short Descriptions

cjpeg compresses image files to produce a JPEG/JFIF file on the standard output. Currently supported input file formats are: PPM (PBMPLUS color format), PGM (PBMPLUS gray-scale format), BMP, and Targa.
djpeg decompresses image files from JPEG/JFIF format to either PPM (PBMPLUS color format), PGM (PBMPLUS gray-scale format), BMP, or Targa format.
jpegtran is used for lossless transformation of JPEG files.
rdjpgcom displays text comments from within a JPEG file.
wrjpgcom inserts text comments into a JPEG file.
libjpeg.{so,a} library is used by many programs for reading and writing JPEG format files.