Difference between revisions of "Netpbm"

From CBLFS
Jump to navigationJump to search
(cleanup)
Line 2: Line 2:
 
|-
 
|-
 
!Download Source:
 
!Download Source:
| http://prdownloads.sourceforge.net/sourceforge/netpbm/netpbm-10.26.42.tgz
+
|http://prdownloads.sourceforge.net/sourceforge/netpbm/netpbm-{{Netpbm-Version}}.tgz
|-
 
 
|}
 
|}
  
Line 11: Line 10:
  
 
== Dependencies ==
 
== Dependencies ==
 
{{Note|This package is highly modulular; the dependencies vary.  There are newer versions of netpbm available; this is the considered the stable version}}
 
  
 
=== Required ===
 
=== Required ===
 
* [[libjpeg]]
 
* [[libjpeg]]
* [[svgalib]] (version 1.9.25+) ...enjoy the build...
+
* [[svgalib]] >= 1.9.25
 
* [[pkg-config]]
 
* [[pkg-config]]
  
 
=== Recommended ===
 
=== Recommended ===
* [[libtiff]]
+
* [[LibTIFF]]
* [[zlib]]
 
 
* [[ghostscript]]
 
* [[ghostscript]]
 
* [[libpng]]
 
* [[libpng]]
 
=== Optional ===
 
* [[?]]
 
* [[?]]
 
  
 
== Configuration Information ==
 
== Configuration Information ==
Line 33: Line 25:
 
{|
 
{|
 
|-
 
|-
|''make --keep-going:'' Useful if the build fails on an unnecessary tool.
+
|<i>make --keep-going:</i> causes Make to make anything it can rather than quitting as soon as something goes wrong.
 
|-
 
|-
 
|}
 
|}
  
== Non-Multilib ==
+
=== Creating a Makefile.config ===
 +
 
 +
The Makefile.config is sourced by the Makefile in each build directory.  This file contains configuration information specific to your environment.  Refer to the Makefile.config.in file for detailed discussions of many of these options.
  
Setup the environment:
+
cat >> Makefile.config << "EOF"
   
+
DEFAULT_TARGET = merge
  bash
+
BUILD_FIASCO = N
 +
CC = gcc
 +
LD = \$(CC)
 +
LINKERISCOMPILER=Y
 +
LINKER_CAN_DO_EXPLICIT_LIBRARY=Y
 +
INTTYPES_H = <inttypes.h>
 +
CC_FOR_BUILD = \$(CC)
 +
LD_FOR_BUILD = \$(LD)
 +
INSTALL = install
 +
STRIPFLAG = -s
 +
SYMLINK = ln -s
 +
AR = ar
 +
RANLIB = ranlib
 +
LEX = flex
 +
LDSHLIB = -shared -Wl,-soname,\$(SONAME)
 +
LDRELOC = ld -r
 +
CFLAGS_SHLIB = -fpic
 +
SHLIB_CLIB = -lc
 +
NEED_RUNTIME_PATH = Y
 +
RPATHOPTNAME = -rpath
 +
NETPBMLIB_RUNTIME_PATH = \${NETPBM_PREFIX}/lib/netpbm
 +
TIFFLIB = libtiff.so
 +
TIFFHDR_DIR = /usr/include
 +
TIFFLIB_NEEDS_JPEG = Y
 +
TIFFLIB_NEEDS_Z = Y
 +
JPEGLIB = libjpeg.so
 +
JPEGHDR_DIR = /usr/include
 +
PNGLIB = libpng.so
 +
PNGHDR_DIR = `pkg-config --variable=includedir libpng`
 +
PNGVER = {{Libpng-Version}}
 +
ZLIB = libz.so
 +
ZHDR_DIR = /usr/include
 +
JBIGLIB = \$(BUILDDIR)/converter/other/jbig/libjbig.a
 +
JBIGHDR_DIR = \$(SRCDIR)/converter/other/jbig
 +
JASPERLIB = \$(INTERNAL_JASPERLIB)
 +
JASPERHDR_DIR = \$(INTERNAL_JASPERHDR_DIR)
 +
URTLIB = \$(BUILDDIR)/urt/librle.a
 +
URTHDR_DIR = \$(SRCDIR)/urt
 +
LINUXSVGALIB = libvga.so
 +
LINUXSVGAHDR_DIR = /usr/include
 +
OMIT_NETWORK = Y
 +
PKGDIR_DEFAULT = \$(SRCDIR)/tmp/netpbm
 +
INSTALL_PERM_BIN =  755
 +
INSTALL_PERM_LIBD = 755
 +
INSTALL_PERM_LIBS = 644
 +
INSTALL_PERM_HDR =  644
 +
INSTALL_PERM_MAN =  644
 +
INSTALL_PERM_DATA = 644
 +
SUFFIXMANUALS1 = 1
 +
SUFFIXMANUALS3 = 3
 +
SUFFIXMANUALS5 = 5
 +
NETPBMLIBTYPE = unixshared
 +
NETPBMLIBSUFFIX = so
 +
STATICLIB_TOO = n
 +
SHLIBPREFIXLIST = lib
 +
NETPBMSHLIBPREFIX = \$(firstword $(SHLIBPREFIXLIST))
 +
  NETPBM_DOCURL = file:\${NETPBM_PREFIX}/share/doc/netpbm
 +
  EOF
  
export NETPBM_PREFIX=/usr
+
== Non-Multilib ==
  
 
Compile the package:
 
Compile the package:
  
  cp Makefile.config{.in,} &&
+
  export NETPBM_PREFIX=/usr &&
sed -i 's@DEFAULT_TARGET \= nonmerge@DEFAULT_TARGET \= merge@g' Makefile.config &&
 
sed -i 's@INSTALL \= \$\(SRCDIR\)/buildtools/install\.sh@INSTALL \= install@g' Makefile.config &&
 
sed -i 's@LDRELOC \= NONE@LDRELOC \= ld \-r@g' Makefile.config &&
 
sed -i 's@CFLAGS_SHLIB \=@CFLAGS_SHLIB \= \-fpic@g' Makefile.config &&
 
sed -i 's@NEED_RUNTIME_PATH \= N@NEED_RUNTIME_PATH \= Y@g' Makefile.config &&
 
sed -i 's@NETPBMLIB_RUNTIME_PATH \=@@g' Makefile.config &&
 
sed -i 's@TIFFLIB \= NONE@TIFFLIB \= libtiff\.so@g' Makefile.config &&
 
sed -i 's@TIFFHDR_DIR \=@TIFFHDR_DIR \= /usr/include@g' Makefile.config &&
 
sed -i 's@JPEGLIB \= NONE@JPEGLIB \= libjpeg\.so@g' Makefile.config &&
 
sed -i 's@JPEGHDR_DIR \=@JPEGHDR_DIR \= /usr/include@g' Makefile.config &&
 
sed -i 's@PNGLIB \= NONE@PNGLIB \= libpng\.so@g' Makefile.config &&
 
sed -i 's@PNGHDR_DIR \=@@g' Makefile.config &&
 
sed -i 's@ZLIB \= NONE@ZLIB \= libz\.so@g' Makefile.config &&
 
sed -i 's@ZHDR_DIR \=@ZHDR_DIR \= /usr/include@g' Makefile.config &&
 
sed -i 's@LINUXSVGALIB \= NONE@LINUXSVGALIB \= libvga\.so @g' Makefile.config &&
 
sed -i 's@LINUXSVGAHDR_DIR \=@LINUXSVGAHDR_DIR \= /usr/include@g' Makefile.config &&
 
sed -i 's@OMIT_NETWORK \=@OMIT_NETWORK \= Y@g' Makefile.config &&
 
sed -i 's@STATICLIB_TOO \= y@STATICLIB_TOO \= n@g' Makefile.config &&
 
sed -i 's@NETPBM_DOCURL \= http\://netpbm\.sourceforge\.net/doc/@@g' Makefile.config &&
 
echo "PNGHDR_DIR = `pkg-config --variable=includedir libpng`" >> Makefile.config &&
 
echo "NETPBMLIB_RUNTIME_PATH = ${NETPBM_PREFIX}/lib" >> Makefile.config &&
 
echo "NETPBM_DOCURL = file:${NETPBM_PREFIX}/share/doc/netpbm" >> Makefile.config &&
 
 
  sed -i 's@/usr/local/netpbm@/usr@g' buildtools/installnetpbm.pl &&
 
  sed -i 's@/usr/local/netpbm@/usr@g' buildtools/installnetpbm.pl &&
 
  make &&
 
  make &&
Line 76: Line 105:
 
Install the package:
 
Install the package:
  
  ./installnetpbm
+
  ./installnetpbm &&
 
+
  unset NETPBM_PREFIX
Exit the environment:
 
 
 
  exit
 
  
 
== Multilib ==
 
== Multilib ==
  
=== 32Bit ===  
+
=== 32Bit ===
 
 
(The following needs to be refined... specifically the INTTYPES_H var)
 
  
Setup the environment:
+
Use the following command to append your Makefile.config with 32bit specific flags:
 
bash
 
  
  export NETPBM_PREFIX=/usr
+
  echo CFLAGS = ${BUILD32} >> Makefile.config
  
 
Compile the package:
 
Compile the package:
  
  cp Makefile.config{.in,} &&
+
  export NETPBM_PREFIX=/usr &&
sed -i 's@DEFAULT_TARGET \= nonmerge@DEFAULT_TARGET \= merge@g' Makefile.config &&
 
sed -i 's@INSTALL \= \$\(SRCDIR\)/buildtools/install\.sh@INSTALL \= install@g' Makefile.config &&
 
sed -i 's@LDRELOC \= NONE@LDRELOC \= ld \-r@g' Makefile.config &&
 
sed -i 's@CFLAGS_SHLIB \=@CFLAGS_SHLIB \= \-fpic@g' Makefile.config &&
 
sed -i 's@NEED_RUNTIME_PATH \= N@NEED_RUNTIME_PATH \= Y@g' Makefile.config &&
 
sed -i 's@NETPBMLIB_RUNTIME_PATH \=@@g' Makefile.config &&
 
sed -i 's@TIFFLIB \= NONE@TIFFLIB \= libtiff\.so@g' Makefile.config &&
 
sed -i 's@TIFFHDR_DIR \=@TIFFHDR_DIR \= /usr/include@g' Makefile.config &&
 
sed -i 's@JPEGLIB \= NONE@JPEGLIB \= libjpeg\.so@g' Makefile.config &&
 
sed -i 's@JPEGHDR_DIR \=@JPEGHDR_DIR \= /usr/include@g' Makefile.config &&
 
sed -i 's@PNGLIB \= NONE@PNGLIB \= libpng\.so@g' Makefile.config &&
 
sed -i 's@PNGHDR_DIR \=@@g' Makefile.config &&
 
sed -i 's@ZLIB \= NONE@ZLIB \= libz\.so@g' Makefile.config &&
 
sed -i 's@ZHDR_DIR \=@ZHDR_DIR \= /usr/include@g' Makefile.config &&
 
sed -i 's@LINUXSVGALIB \= NONE@LINUXSVGALIB \= libvga\.so @g' Makefile.config &&
 
sed -i 's@LINUXSVGAHDR_DIR \=@LINUXSVGAHDR_DIR \= /usr/include@g' Makefile.config &&
 
sed -i 's@OMIT_NETWORK \=@OMIT_NETWORK \= Y@g' Makefile.config &&
 
sed -i 's@STATICLIB_TOO \= y@STATICLIB_TOO \= n@g' Makefile.config &&
 
sed -i 's@NETPBM_DOCURL \= http\://netpbm\.sourceforge\.net/doc/@@g' Makefile.config &&
 
echo "PNGHDR_DIR = `pkg-config --variable=includedir libpng`" >> Makefile.config &&
 
echo "NETPBMLIB_RUNTIME_PATH = ${NETPBM_PREFIX}/lib" >> Makefile.config &&
 
echo "NETPBM_DOCURL = file:${NETPBM_PREFIX}/share/doc/netpbm" >> Makefile.config &&
 
 
  sed -i 's@/usr/local/netpbm@/usr@g' buildtools/installnetpbm.pl &&
 
  sed -i 's@/usr/local/netpbm@/usr@g' buildtools/installnetpbm.pl &&
 
  make &&
 
  make &&
Line 125: Line 125:
 
Install the package:
 
Install the package:
  
  ./installnetpbm
+
  ./installnetpbm &&
 
+
unset NETPBM_PREFIX
Exit the environment:
 
  
exit
+
=== N32 ===
  
=== 64Bit ===
 
  
(The following needs to be refined... specifically the INTTYPES_H var)
+
=== 64Bit ===
  
Setup the environment:
+
Use the following command to append your Makefile.config with 64bit specific flags:
 
bash
 
  
  export NETPBM_PREFIX=/usr
+
  echo CFLAGS = ${BUILD64} >> Makefile.config &&
 +
sed -i 's@/lib/@/lib64/@g' Makefile.config
  
Compile the package:
+
Compile the pacakge:
  
  cp Makefile.config{.in,} &&
+
  export NETPBM_PREFIX=/usr &&
sed -i 's@DEFAULT_TARGET \= nonmerge@DEFAULT_TARGET \= merge@g' Makefile.config &&
 
sed -i 's@INSTALL \= \$\(SRCDIR\)/buildtools/install\.sh@INSTALL \= install@g' Makefile.config &&
 
sed -i 's@LDRELOC \= NONE@LDRELOC \= ld \-r@g' Makefile.config &&
 
sed -i 's@CFLAGS_SHLIB \=@CFLAGS_SHLIB \= \-fpic@g' Makefile.config &&
 
sed -i 's@NEED_RUNTIME_PATH \= N@NEED_RUNTIME_PATH \= Y@g' Makefile.config &&
 
sed -i 's@NETPBMLIB_RUNTIME_PATH \=@@g' Makefile.config &&
 
sed -i 's@TIFFLIB \= NONE@TIFFLIB \= libtiff\.so@g' Makefile.config &&
 
sed -i 's@TIFFHDR_DIR \=@TIFFHDR_DIR \= /usr/include@g' Makefile.config &&
 
sed -i 's@JPEGLIB \= NONE@JPEGLIB \= libjpeg\.so@g' Makefile.config &&
 
sed -i 's@JPEGHDR_DIR \=@JPEGHDR_DIR \= /usr/include@g' Makefile.config &&
 
sed -i 's@PNGLIB \= NONE@PNGLIB \= libpng\.so@g' Makefile.config &&
 
sed -i 's@PNGHDR_DIR \=@@g' Makefile.config &&
 
sed -i 's@ZLIB \= NONE@ZLIB \= libz\.so@g' Makefile.config &&
 
sed -i 's@ZHDR_DIR \=@ZHDR_DIR \= /usr/include@g' Makefile.config &&
 
sed -i 's@LINUXSVGALIB \= NONE@LINUXSVGALIB \= libvga\.so @g' Makefile.config &&
 
sed -i 's@LINUXSVGAHDR_DIR \=@LINUXSVGAHDR_DIR \= /usr/include@g' Makefile.config &&
 
sed -i 's@OMIT_NETWORK \=@OMIT_NETWORK \= Y@g' Makefile.config &&
 
sed -i 's@STATICLIB_TOO \= y@STATICLIB_TOO \= n@g' Makefile.config &&
 
sed -i 's@NETPBM_DOCURL \= http\://netpbm\.sourceforge\.net/doc/@@g' Makefile.config &&
 
echo "PNGHDR_DIR = `pkg-config --variable=includedir libpng`" >> Makefile.config &&
 
echo "NETPBMLIB_RUNTIME_PATH = ${NETPBM_PREFIX}/lib" >> Makefile.config &&
 
echo "NETPBM_DOCURL = file:${NETPBM_PREFIX}/share/doc/netpbm" >> Makefile.config &&
 
 
  sed -i 's@/usr/local/netpbm@/usr@g' buildtools/installnetpbm.pl &&
 
  sed -i 's@/usr/local/netpbm@/usr@g' buildtools/installnetpbm.pl &&
 
  make &&
 
  make &&
Line 172: Line 147:
 
Install the package:
 
Install the package:
  
  ./installnetpbm
+
  ./installnetpbm &&
 
+
  unset NETPBM_PREFIX
Exit the environment:
 
 
 
  exit
 
 
 
== Configuring ==
 
 
 
(The following needs to be refined...)
 
  
You may want to setup /etc/manweb.conf; in the meantime:
+
== Configuring ==
  
 
  sed -i 's@webdir=/usr/man/web@\#webdir=/usr/man/web@g' /etc/manweb.conf &&
 
  sed -i 's@webdir=/usr/man/web@\#webdir=/usr/man/web@g' /etc/manweb.conf &&
 
  echo "webdir=/dev/null" >> /etc/manweb.conf
 
  echo "webdir=/dev/null" >> /etc/manweb.conf
 
== Contents ==
 
  
(The following needs to be refined...)
+
== Contents ==
  
 
{| style="text-align: left;"
 
{| style="text-align: left;"
 
|-valign="top"
 
|-valign="top"
 
!Installed Directories:
 
!Installed Directories:
|/path/to/dir
+
|
 
|-valign="top"
 
|-valign="top"
 
!Installed Programs:
 
!Installed Programs:
|Program 1, Program 2
+
|
 
|-valign="top"
 
|-valign="top"
 
!Installed Libraries:
 
!Installed Libraries:
|library1.{a,so}, library2.{a,so}
+
|
 
|}
 
|}
  
 
=== Short Descriptions ===
 
=== Short Descriptions ===
 
(The following needs to be refined...)
 
  
 
{| style="text-align: left;"
 
{| style="text-align: left;"
 
|-valign="top"
 
|-valign="top"
!Program 1
+
!
|is a program that converts pennies to dollars.
+
|
 
|-valign="top"
 
|-valign="top"
!Program 2
+
!
|is a program that converts dollars to pennies.
+
|
 
|-valign="top"
 
|-valign="top"
!library1.{so,a}
+
!
|is a library that contains functions necessary to convert from dollars to pennies and vice versa.
+
|
 
|}
 
|}

Revision as of 07:07, 8 June 2007

Download Source: http://prdownloads.sourceforge.net/sourceforge/netpbm/netpbm-10.26.46.tgz

Introduction to Netpbm

Netpbm is a toolkit comprised of over 220 tools for manipulating graphics, including conversion of images between a variety of different formats.

Project Homepage: http://netpbm.sourceforge.net/

Dependencies

Required

Recommended

Configuration Information

make --keep-going: causes Make to make anything it can rather than quitting as soon as something goes wrong.

Creating a Makefile.config

The Makefile.config is sourced by the Makefile in each build directory. This file contains configuration information specific to your environment. Refer to the Makefile.config.in file for detailed discussions of many of these options.

cat >> Makefile.config << "EOF"
DEFAULT_TARGET = merge
BUILD_FIASCO = N
CC = gcc
LD = \$(CC)
LINKERISCOMPILER=Y
LINKER_CAN_DO_EXPLICIT_LIBRARY=Y
INTTYPES_H = <inttypes.h>
CC_FOR_BUILD = \$(CC)
LD_FOR_BUILD = \$(LD)
INSTALL = install
STRIPFLAG = -s
SYMLINK = ln -s
AR = ar
RANLIB = ranlib
LEX = flex
LDSHLIB = -shared -Wl,-soname,\$(SONAME)
LDRELOC = ld -r
CFLAGS_SHLIB = -fpic
SHLIB_CLIB = -lc
NEED_RUNTIME_PATH = Y
RPATHOPTNAME = -rpath
NETPBMLIB_RUNTIME_PATH = \${NETPBM_PREFIX}/lib/netpbm
TIFFLIB = libtiff.so
TIFFHDR_DIR = /usr/include
TIFFLIB_NEEDS_JPEG = Y
TIFFLIB_NEEDS_Z = Y
JPEGLIB = libjpeg.so
JPEGHDR_DIR = /usr/include
PNGLIB = libpng.so
PNGHDR_DIR = `pkg-config --variable=includedir libpng`
PNGVER = 1.6.12
ZLIB = libz.so
ZHDR_DIR = /usr/include
JBIGLIB = \$(BUILDDIR)/converter/other/jbig/libjbig.a
JBIGHDR_DIR = \$(SRCDIR)/converter/other/jbig
JASPERLIB = \$(INTERNAL_JASPERLIB)
JASPERHDR_DIR = \$(INTERNAL_JASPERHDR_DIR)
URTLIB = \$(BUILDDIR)/urt/librle.a
URTHDR_DIR = \$(SRCDIR)/urt
LINUXSVGALIB = libvga.so
LINUXSVGAHDR_DIR = /usr/include
OMIT_NETWORK = Y
PKGDIR_DEFAULT = \$(SRCDIR)/tmp/netpbm
INSTALL_PERM_BIN =  755
INSTALL_PERM_LIBD = 755
INSTALL_PERM_LIBS = 644
INSTALL_PERM_HDR =  644
INSTALL_PERM_MAN =  644
INSTALL_PERM_DATA = 644
SUFFIXMANUALS1 = 1
SUFFIXMANUALS3 = 3
SUFFIXMANUALS5 = 5
NETPBMLIBTYPE = unixshared
NETPBMLIBSUFFIX = so
STATICLIB_TOO = n
SHLIBPREFIXLIST = lib
NETPBMSHLIBPREFIX = \$(firstword $(SHLIBPREFIXLIST))
NETPBM_DOCURL = file:\${NETPBM_PREFIX}/share/doc/netpbm
EOF

Non-Multilib

Compile the package:

export NETPBM_PREFIX=/usr &&
sed -i 's@/usr/local/netpbm@/usr@g' buildtools/installnetpbm.pl &&
make &&
make package

Install the package:

./installnetpbm &&
unset NETPBM_PREFIX

Multilib

32Bit

Use the following command to append your Makefile.config with 32bit specific flags:

echo CFLAGS = ${BUILD32} >> Makefile.config

Compile the package:

export NETPBM_PREFIX=/usr &&
sed -i 's@/usr/local/netpbm@/usr@g' buildtools/installnetpbm.pl &&
make &&
make package

Install the package:

./installnetpbm &&
unset NETPBM_PREFIX

N32

64Bit

Use the following command to append your Makefile.config with 64bit specific flags:

echo CFLAGS = ${BUILD64} >> Makefile.config &&
sed -i 's@/lib/@/lib64/@g' Makefile.config

Compile the pacakge:

export NETPBM_PREFIX=/usr &&
sed -i 's@/usr/local/netpbm@/usr@g' buildtools/installnetpbm.pl &&
make &&
make package

Install the package:

./installnetpbm &&
unset NETPBM_PREFIX

Configuring

sed -i 's@webdir=/usr/man/web@\#webdir=/usr/man/web@g' /etc/manweb.conf &&
echo "webdir=/dev/null" >> /etc/manweb.conf

Contents

Installed Directories:
Installed Programs:
Installed Libraries:

Short Descriptions

Retrieved from "?title=Netpbm&oldid=10202"