Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / packages / netpbm / netpbm_10.28.bb
1 DESCRIPTION = "Netpbm is a toolkit for manipulation of graphic images, including\
2 conversion of images between a variety of different formats.  There\
3 are over 220 separate tools in the package including converters for\
4 about 100 graphics formats."
5 HOMEPAGE = "http://netpbm.sourceforge.net"
6 SECTION = "console/utils"
7 LICENSE = "GPL MIT Artistic"
8 # NOTE: individual command line utilities are covered by different
9 # licenses.  The compiled and linked command line utilties are
10 # subject to the licenses of the libraries they use too - including
11 # libpng libz, IJG, and libtiff licenses
12 DEPENDS = "jpeg zlib libpng tiff install-native flex-native"
13 RDEPENDS = "perl\
14         perl-module-cwd\
15         perl-module-english\
16         perl-module-fcntl\
17         perl-module-file-basename\
18         perl-module-file-spec\
19         perl-module-getopt-long\
20         perl-module-strict\
21         "
22
23 # these should not be required, they are here because the perl
24 # module dependencies are currently incorrect:
25 RDEPENDS += "perl-module-exporter-heavy"
26 RDEPENDS += "perl-module-file-spec-unix"
27
28 FILE_PR = "r5"
29
30 SRC_URI = "${SOURCEFORGE_MIRROR}/netpbm/netpbm-${PV}.tgz \
31            file://ppmtojpeg.patch;patch=42 \
32            file://Makefile.config \
33            file://oeendiangen"
34
35 PARALLEL_MAKE = ""
36
37 EXTRA_OEMAKE = "ENDIANGEN=${S}/buildtools/oeendiangen TARGET_LD=${LD}"
38
39 do_configure() {
40         install -c -m 644 ../Makefile.config .
41         # The following stops the host endiangen program being run and uses
42         # the target endian.h header instead.
43         install -c -m 755 ../oeendiangen buildtools
44 }
45
46 do_compile() {
47         # need all to get the static library too
48         oe_runmake all default
49 }
50
51 do_install() {
52         # netpbm makes its own installation package, which must then be
53         # installed to form the dummy installation for ipkg
54         rm -rf ${WORKDIR}/netpbm-package
55         oe_runmake package pkgdir=${WORKDIR}/netpbm-package
56         # now install the stuff from the package into ${D}
57         for d in ${WORKDIR}/netpbm-package/*
58         do
59                 # following will cause an error if used
60                 case "$d" in
61                 */README)       ;;
62                 */VERSION)      ;;
63                 */pkginfo)      ;;
64                 */bin)          install -d ${D}${bindir}
65                                 cp -pPR "$d"/* ${D}${bindir}
66                                 rm ${D}${bindir}/doc.url;;
67                 */include)      install -d ${D}${includedir}
68                                 cp -pPR "$d"/* ${D}${includedir};;
69                 */link|*/lib)   install -d ${D}${libdir}
70                                 cp -pPR "$d"/* ${D}${libdir};;
71                 */man)          install -d ${D}${mandir}
72                                 cp -pPR "$d"/* ${D}${mandir};;
73                 */misc)         install -d ${D}${datadir}/netpbm
74                                 cp -pPR "$d"/* ${D}${datadir}/netpbm;;
75                 */config_template)
76                                 install -d ${D}${bindir}
77                                 sed "/^@/d
78                                         s!@VERSION@!$(<'${WORKDIR}/netpbm-package/VERSION')!
79                                         s!@DATADIR@!${datadir}/netpbm!
80                                         s!@LIBDIR@!${libdir}!
81                                         s!@LINKDIR@!${libdir}!
82                                         s!@INCLUDEDIR@!${includedir}!
83                                         s!@BINDIR@!${bindir}!
84                                         " "$d" >${D}${bindir}/netpbm-config
85                                 chmod 755 ${D}${bindir}/netpbm-config;;
86                 *)              echo "netpbm-package/$d: unknown item" >&2
87                                 exit 1;;
88                 esac
89         done
90 }