Difference between revisions of "Netpbm"
Aurushibata (talk | contribs) (Merge build changed to non-merge. Data directory changed.) |
|||
Line 12: | Line 12: | ||
=== Required === | === Required === | ||
− | |||
− | |||
* [[pkg-config]] | * [[pkg-config]] | ||
=== Recommended === | === Recommended === | ||
+ | * [[libjpeg]] | ||
* [[LibTIFF]] | * [[LibTIFF]] | ||
* [[ghostscript]] | * [[ghostscript]] | ||
* [[libpng]] | * [[libpng]] | ||
+ | |||
+ | === Optional === | ||
+ | * [[SVGAlib]] >= 1.9.25 | ||
+ | |||
+ | See "Netpbm Library Prerequisites" http://netpbm.sourceforge.net/prereq.html | ||
+ | for detailed information on dependencies. | ||
+ | |||
== Configuration Information == | == Configuration Information == | ||
Line 34: | Line 40: | ||
cat > Makefile.config << "EOF" | cat > Makefile.config << "EOF" | ||
− | DEFAULT_TARGET = | + | DEFAULT_TARGET = nonmerge |
BUILD_FIASCO = N | BUILD_FIASCO = N | ||
CC = gcc | CC = gcc | ||
Line 46: | Line 52: | ||
STRIPFLAG = -s | STRIPFLAG = -s | ||
SYMLINK = ln -s | SYMLINK = ln -s | ||
+ | MANPAGE_FORMAT = nroff | ||
AR = ar | AR = ar | ||
RANLIB = ranlib | RANLIB = ranlib | ||
LEX = flex | LEX = flex | ||
− | LDSHLIB = -shared -Wl,-soname, | + | LDSHLIB = -shared -Wl,-soname,$(SONAME) |
LDRELOC = ld -r | LDRELOC = ld -r | ||
SHLIB_CLIB = -lc | SHLIB_CLIB = -lc | ||
NEED_RUNTIME_PATH = Y | NEED_RUNTIME_PATH = Y | ||
RPATHOPTNAME = -rpath | RPATHOPTNAME = -rpath | ||
− | NETPBMLIB_RUNTIME_PATH = | + | NETPBMLIB_RUNTIME_PATH = ${NETPBM_PREFIX}/lib/netpbm |
TIFFLIB = libtiff.so | TIFFLIB = libtiff.so | ||
TIFFHDR_DIR = /usr/include | TIFFHDR_DIR = /usr/include | ||
Line 63: | Line 70: | ||
PNGLIB = libpng.so | PNGLIB = libpng.so | ||
PNGHDR_DIR = `pkg-config --variable=includedir libpng` | PNGHDR_DIR = `pkg-config --variable=includedir libpng` | ||
− | PNGVER = | + | PNGVER = 1.2.42 |
ZLIB = libz.so | ZLIB = libz.so | ||
ZHDR_DIR = /usr/include | ZHDR_DIR = /usr/include | ||
− | JBIGLIB = | + | JBIGLIB = $(BUILDDIR)/converter/other/jbig/libjbig.a |
− | JBIGHDR_DIR = | + | JBIGHDR_DIR = $(SRCDIR)/converter/other/jbig |
− | JASPERLIB = | + | JASPERLIB = $(INTERNAL_JASPERLIB) |
− | JASPERHDR_DIR = | + | JASPERHDR_DIR = $(INTERNAL_JASPERHDR_DIR) |
− | URTLIB = | + | URTLIB = $(BUILDDIR)/urt/librle.a |
− | URTHDR_DIR = | + | URTHDR_DIR = $(SRCDIR)/urt |
LINUXSVGALIB = libvga.so | LINUXSVGALIB = libvga.so | ||
LINUXSVGAHDR_DIR = /usr/include | LINUXSVGAHDR_DIR = /usr/include | ||
OMIT_NETWORK = Y | OMIT_NETWORK = Y | ||
− | PKGDIR_DEFAULT = | + | PKGDIR_DEFAULT = /tmp/netpbm |
INSTALL_PERM_BIN = 755 | INSTALL_PERM_BIN = 755 | ||
INSTALL_PERM_LIBD = 755 | INSTALL_PERM_LIBD = 755 | ||
Line 89: | Line 96: | ||
STATICLIB_TOO = n | STATICLIB_TOO = n | ||
SHLIBPREFIXLIST = lib | SHLIBPREFIXLIST = lib | ||
− | NETPBMSHLIBPREFIX = | + | NETPBMSHLIBPREFIX = $(firstword $(SHLIBPREFIXLIST)) |
− | NETPBM_DOCURL = file: | + | NETPBM_DOCURL = file:${NETPBM_PREFIX}/share/doc/netpbm |
+ | CFLAGS = -O3 -ffast-math | ||
EOF | EOF | ||
+ | |||
+ | If you do not want to link SVGAlib, change the LINUXSVGALIB line to: | ||
+ | |||
+ | LINUXSVGALIB = NONE | ||
== Non-Multilib == | == Non-Multilib == | ||
Line 98: | Line 110: | ||
export NETPBM_PREFIX=/usr && | export NETPBM_PREFIX=/usr && | ||
− | sed -i 's@/usr/local/netpbm@/usr@ | + | sed -i.bak 's@/usr/openwin/lib/rgb.txt@/etc/netpbm/rgb.txt@' pm_config.in.h |
− | make && | + | sed -i.bak -e 's@/usr/local/netpbm@/usr@' \ |
+ | -e '/\$dataDir/,+1s@\$prefix/lib@/etc/netpbm@' \ | ||
+ | -e 's@\$prefix/lib@$prefix/lib64@' \ | ||
+ | buildtools/installnetpbm.pl && | ||
+ | make CFLAGS_SHLIB=-fPIC && | ||
make package | make package | ||
Line 105: | Line 121: | ||
./installnetpbm && | ./installnetpbm && | ||
+ | rm -rf /tmp/netpbm && | ||
unset NETPBM_PREFIX | unset NETPBM_PREFIX | ||
Line 111: | Line 128: | ||
=== 32Bit === | === 32Bit === | ||
− | + | (1) Install the binaries and library: | |
− | |||
− | |||
− | |||
Compile the package: | Compile the package: | ||
export NETPBM_PREFIX=/usr && | export NETPBM_PREFIX=/usr && | ||
− | sed -i 's@/usr/local/netpbm@/usr@ | + | sed -i.bak 's@/usr/openwin/lib/rgb.txt@/etc/netpbm/rgb.txt@' pm_config.in.h |
− | make && | + | sed -i.bak -e 's@/usr/local/netpbm@/usr@' \ |
+ | -e '/\$dataDir/,+1s@\$prefix/lib@/etc/netpbm@' \ | ||
+ | buildtools/installnetpbm.pl && | ||
+ | make CC="gcc ${BUILD32}" CFLAGS_SHLIB=-fpic && | ||
make package | make package | ||
Line 126: | Line 143: | ||
./installnetpbm && | ./installnetpbm && | ||
+ | rm -rf /tmp/netpbm | ||
unset NETPBM_PREFIX | unset NETPBM_PREFIX | ||
+ | |||
+ | (2) Alternately, install just the library: | ||
+ | |||
+ | cd lib && | ||
+ | make CC="gcc ${BUILD32}" CFLAGS_SHLIB=-fpic && | ||
+ | cp -fv libnetpbm.so* /usr/lib && | ||
+ | cd .. | ||
=== N32 === | === N32 === | ||
Line 135: | Line 160: | ||
Use the following command to append your Makefile.config with 64bit specific flags: | Use the following command to append your Makefile.config with 64bit specific flags: | ||
− | |||
− | |||
sed -i 's@/lib/@/lib64/@g' Makefile.config | sed -i 's@/lib/@/lib64/@g' Makefile.config | ||
Line 142: | Line 165: | ||
export NETPBM_PREFIX=/usr && | export NETPBM_PREFIX=/usr && | ||
− | sed -i 's@/usr/local/netpbm@/usr@ | + | sed -i.bak 's@/usr/openwin/lib/rgb.txt@/etc/netpbm/rgb.txt@' pm_config.in.h |
− | make && | + | sed -i.bak -e 's@/usr/local/netpbm@/usr@' \ |
+ | -e '/\$dataDir/,+1s@\$prefix/lib@/etc/netpbm@' \ | ||
+ | -e 's@\$prefix/lib@$prefix/lib64@' \ | ||
+ | buildtools/installnetpbm.pl && | ||
+ | make CC="gcc ${BUILD64}" CFLAGS_SHLIB=-fPIC && | ||
make package | make package | ||
Line 149: | Line 176: | ||
./installnetpbm && | ./installnetpbm && | ||
+ | rm -rf /tmp/netpbm && | ||
unset NETPBM_PREFIX | unset NETPBM_PREFIX | ||
Latest revision as of 19:02, 23 May 2011
Download Source: | http://prdownloads.sourceforge.net/sourceforge/netpbm/netpbm-10.26.46.tgz |
---|
Contents
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
Optional
- SVGAlib >= 1.9.25
See "Netpbm Library Prerequisites" http://netpbm.sourceforge.net/prereq.html for detailed information on dependencies.
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 = nonmerge 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 MANPAGE_FORMAT = nroff AR = ar RANLIB = ranlib LEX = flex LDSHLIB = -shared -Wl,-soname,$(SONAME) LDRELOC = ld -r 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.2.42 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 = /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 CFLAGS = -O3 -ffast-math EOF
If you do not want to link SVGAlib, change the LINUXSVGALIB line to:
LINUXSVGALIB = NONE
Non-Multilib
Compile the package:
export NETPBM_PREFIX=/usr && sed -i.bak 's@/usr/openwin/lib/rgb.txt@/etc/netpbm/rgb.txt@' pm_config.in.h sed -i.bak -e 's@/usr/local/netpbm@/usr@' \ -e '/\$dataDir/,+1s@\$prefix/lib@/etc/netpbm@' \ -e 's@\$prefix/lib@$prefix/lib64@' \ buildtools/installnetpbm.pl && make CFLAGS_SHLIB=-fPIC && make package
Install the package:
./installnetpbm && rm -rf /tmp/netpbm && unset NETPBM_PREFIX
Multilib
32Bit
(1) Install the binaries and library:
Compile the package:
export NETPBM_PREFIX=/usr && sed -i.bak 's@/usr/openwin/lib/rgb.txt@/etc/netpbm/rgb.txt@' pm_config.in.h sed -i.bak -e 's@/usr/local/netpbm@/usr@' \ -e '/\$dataDir/,+1s@\$prefix/lib@/etc/netpbm@' \ buildtools/installnetpbm.pl && make CC="gcc ${BUILD32}" CFLAGS_SHLIB=-fpic && make package
Install the package:
./installnetpbm && rm -rf /tmp/netpbm unset NETPBM_PREFIX
(2) Alternately, install just the library:
cd lib && make CC="gcc ${BUILD32}" CFLAGS_SHLIB=-fpic && cp -fv libnetpbm.so* /usr/lib && cd ..
N32
64Bit
Use the following command to append your Makefile.config with 64bit specific flags:
sed -i 's@/lib/@/lib64/@g' Makefile.config
Compile the pacakge:
export NETPBM_PREFIX=/usr && sed -i.bak 's@/usr/openwin/lib/rgb.txt@/etc/netpbm/rgb.txt@' pm_config.in.h sed -i.bak -e 's@/usr/local/netpbm@/usr@' \ -e '/\$dataDir/,+1s@\$prefix/lib@/etc/netpbm@' \ -e 's@\$prefix/lib@$prefix/lib64@' \ buildtools/installnetpbm.pl && make CC="gcc ${BUILD64}" CFLAGS_SHLIB=-fPIC && make package
Install the package:
./installnetpbm && rm -rf /tmp/netpbm && 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: |