]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/netpbm/netpbm_10.28.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / netpbm / netpbm_10.28.bb
1 # bitbake configuration file for NetPBM, a command line image (sampled
2 # data) processing package derived from PBMPlus
3 #
4 # For documentation see: http://netpbm.sourceforge.net/doc/
5 LICENSE = "GPL MIT Artistic" 
6 # NOTE: individual command line utilities are covered by different
7 # licenses.  The compiled and linked command line utilties are
8 # subject to the licenses of the libraries they use too - including
9 # libpng libz, IJG, and libtiff licenses
10
11 SECTION = "console/utils" 
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 HOMEPAGE = "http://netpbm.sourceforge.net" 
29 DESCRIPTION = "Netpbm is a toolkit for manipulation of graphic images, including\
30 conversion of images between a variety of different formats.  There\
31 are over 220 separate tools in the package including converters for\
32 about 100 graphics formats."
33 PR = "r3"
34
35 SRC_URI = "${SOURCEFORGE_MIRROR}/netpbm/netpbm-${PV}.tgz \
36            file://ppmtojpeg.patch;patch=42 \
37            file://Makefile.config \
38            file://oeendiangen" 
39
40 EXTRA_OEMAKE = "ENDIANGEN=${S}/buildtools/oeendiangen TARGET_LD=${LD}"
41
42 do_configure() { 
43         install -c -m 644 ../Makefile.config .
44         # The following stops the host endiangen program being run and uses
45         # the target endian.h header instead.
46         install -c -m 755 ../oeendiangen buildtools
47 }
48
49 do_compile() {
50         # need all to get the static library too
51         oe_runmake all default
52 }
53             
54 do_install() { 
55         # netpbm makes its own installation package, which must then be
56         # installed to form the dummy installation for ipkg
57         rm -rf ${WORKDIR}/netpbm-package
58         oe_runmake package pkgdir=${WORKDIR}/netpbm-package
59         # now install the stuff from the package into ${D}
60         for d in ${WORKDIR}/netpbm-package/*
61         do
62                 # following will cause an error if used
63                 case "$d" in
64                 */README)       ;;
65                 */VERSION)      ;;
66                 */pkginfo)      ;;
67                 */bin)          install -d ${D}${bindir}
68                                 cp -pPR "$d"/* ${D}${bindir}
69                                 rm ${D}${bindir}/doc.url;;
70                 */include)      install -d ${D}${includedir}
71                                 cp -pPR "$d"/* ${D}${includedir};;
72                 */link|*/lib)   install -d ${D}${libdir}
73                                 cp -pPR "$d"/* ${D}${libdir};;
74                 */man)          install -d ${D}${mandir}
75                                 cp -pPR "$d"/* ${D}${mandir};;
76                 */misc)         install -d ${D}${datadir}/netpbm
77                                 cp -pPR "$d"/* ${D}${datadir}/netpbm;;
78                 */config_template)
79                                 install -d ${D}${bindir}
80                                 sed "/^@/d
81                                         s!@VERSION@!$(<'${WORKDIR}/netpbm-package/VERSION')!
82                                         s!@DATADIR@!${datadir}/netpbm!
83                                         s!@LIBDIR@!${libdir}!
84                                         s!@LINKDIR@!${libdir}!
85                                         s!@INCLUDEDIR@!${includedir}!
86                                         s!@BINDIR@!${bindir}!
87                                         " "$d" >${D}${bindir}/netpbm-config
88                                 chmod 755 ${D}${bindir}/netpbm-config;;
89                 *)              echo "netpbm-package/$d: unknown item" >&2
90                                 exit 1;;
91                 esac
92         done
93