diff options
Diffstat (limited to 'meta/packages/libpng')
-rw-r--r-- | meta/packages/libpng/libpng-native_1.2.8.bb | 14 | ||||
-rw-r--r-- | meta/packages/libpng/libpng_1.2.8.bb | 57 |
2 files changed, 71 insertions, 0 deletions
diff --git a/meta/packages/libpng/libpng-native_1.2.8.bb b/meta/packages/libpng/libpng-native_1.2.8.bb new file mode 100644 index 0000000000..b03056f08d --- /dev/null +++ b/meta/packages/libpng/libpng-native_1.2.8.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | include libpng_${PV}.bb | ||
2 | inherit native | ||
3 | FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libpng-${PV}" | ||
4 | DEPENDS = "zlib-native" | ||
5 | |||
6 | INHIBIT_NATIVE_STAGE_INSTALL = "1" | ||
7 | |||
8 | do_stage_append() { | ||
9 | cp libpng.pc libpng12.pc | ||
10 | install -m 644 png.h ${STAGING_INCDIR}/png.h | ||
11 | install -m 644 pngconf.h ${STAGING_INCDIR}/pngconf.h | ||
12 | oe_libinstall -so libpng12 ${STAGING_LIBDIR}/ | ||
13 | ln -sf libpng12.so ${STAGING_LIBDIR}/libpng.so | ||
14 | } | ||
diff --git a/meta/packages/libpng/libpng_1.2.8.bb b/meta/packages/libpng/libpng_1.2.8.bb new file mode 100644 index 0000000000..81274dc762 --- /dev/null +++ b/meta/packages/libpng/libpng_1.2.8.bb | |||
@@ -0,0 +1,57 @@ | |||
1 | DESCRIPTION = "PNG Library" | ||
2 | HOMEPAGE = "http://www.libpng.org/" | ||
3 | LICENSE = "libpng" | ||
4 | SECTION = "libs" | ||
5 | PRIORITY = "required" | ||
6 | MAINTAINER = "Chris Larson <kergoth@handhelds.org>" | ||
7 | |||
8 | DEPENDS = "zlib" | ||
9 | |||
10 | PACKAGES =+ "${PN}12 ${PN}12-dev" | ||
11 | |||
12 | FILES_${PN}12 = ${libdir}/libpng12.so.* | ||
13 | FILES_${PN}12-dev = ${libdir}/libpng12.* ${includedir}/libpng12 ${libdir}/pkgconfig/libpng12.pc | ||
14 | FILES_${PN} = ${libdir}/lib*.so.* | ||
15 | FILES_${PN}-dev = ${includedir} ${libdir}/lib*.so ${libdir}/*.la \ | ||
16 | ${libdir}/*.a ${libdir}/pkgconfig \ | ||
17 | ${datadir}/aclocal ${bindir} ${sbindir} | ||
18 | |||
19 | SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/libpng-${PV}.tar.bz2" | ||
20 | S = "${WORKDIR}/libpng-${PV}" | ||
21 | |||
22 | inherit pkgconfig binconfig | ||
23 | |||
24 | EXTRA_OEMAKE_append = " ZLIBINC=${STAGING_INCDIR} ZLIBLIB=${STAGING_LIBDIR}" | ||
25 | |||
26 | do_compile() { | ||
27 | sed < scripts/makefile.linux > makefile -e 's/^ZLIBINC.*//' -e 's/^ZLIBLIB.*//' | ||
28 | unset LDFLAGS | ||
29 | oe_runmake 'CC=${CC}' 'LD=${LD}' 'CFLAGS=${CFLAGS}' \ | ||
30 | 'ZLIBINC=${STAGING_INCDIR}' \ | ||
31 | 'ZLIBLIB=${STAGING_LIBDIR}' | ||
32 | } | ||
33 | |||
34 | do_stage() { | ||
35 | cp libpng.pc libpng12.pc | ||
36 | install -m 644 png.h ${STAGING_INCDIR}/png.h | ||
37 | install -m 644 pngconf.h ${STAGING_INCDIR}/pngconf.h | ||
38 | oe_libinstall -so libpng12 ${STAGING_LIBDIR}/ | ||
39 | ln -sf libpng12.so ${STAGING_LIBDIR}/libpng.so | ||
40 | } | ||
41 | |||
42 | do_install() { | ||
43 | install -d ${D}${bindir} ${D}${mandir} \ | ||
44 | ${D}${libdir} ${D}${includedir} | ||
45 | unset LDFLAGS | ||
46 | oe_runmake 'prefix=${prefix}' 'DESTDIR=${D}' \ | ||
47 | 'DB=${D}${bindir}' 'DI=${D}${includedir}' \ | ||
48 | 'DL=${D}${libdir}' 'DM=${D}${mandir}' \ | ||
49 | install | ||
50 | } | ||
51 | |||
52 | python do_package() { | ||
53 | if bb.data.getVar('DEBIAN_NAMES', d, 1): | ||
54 | bb.data.setVar('PKG_${PN}', 'libpng12', d) | ||
55 | bb.build.exec_func('package_do_package', d) | ||
56 | } | ||
57 | |||