diff options
| author | Nikhil R <nikhilar2410@gmail.com> | 2023-07-06 10:22:28 +0530 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-07-21 06:27:34 -1000 |
| commit | 67c4196ac17e891b00535603002a5fc73e9581ab (patch) | |
| tree | be0cfdd38151ea686f2b358e5800d41b8ef20bf5 /meta | |
| parent | 934cbbc48e7bafb49ab63f162a65951b088d5413 (diff) | |
| download | poky-67c4196ac17e891b00535603002a5fc73e9581ab.tar.gz | |
libpng: Add ptest for libpng
libpng is a platform-independent library which
supports all PNG features.
This ptest executes the below binaries, parses
the png image and prints the image features.
1. pngfix - provides information about PNG image
copyrights details.
2. pngtest - tests, optimizes and optionally fixes
the zlib header in PNG files.
3. pngstest - verifies the integrity of PNG image by
dumping chunk level information.
4. timepng - provides details about PNG image chunks.
(From OE-Core rev: 2d58b38185ca7eed5d885b8d00ca549b57138554)
Signed-off-by: Nikhil R <nikhil.r@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/conf/distro/include/ptest-packagelists.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-multimedia/libpng/files/run-ptest | 29 | ||||
| -rw-r--r-- | meta/recipes-multimedia/libpng/libpng_1.6.39.bb | 16 |
3 files changed, 44 insertions, 2 deletions
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 5bcff83093..5c6a30635f 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc | |||
| @@ -29,6 +29,7 @@ PTESTS_FAST = "\ | |||
| 29 | libnl-ptest \ | 29 | libnl-ptest \ |
| 30 | libmodule-build-perl-ptest \ | 30 | libmodule-build-perl-ptest \ |
| 31 | libpcre-ptest \ | 31 | libpcre-ptest \ |
| 32 | libpng-ptest \ | ||
| 32 | libssh2-ptest \ | 33 | libssh2-ptest \ |
| 33 | libtimedate-perl-ptest \ | 34 | libtimedate-perl-ptest \ |
| 34 | libtest-needs-perl-ptest \ | 35 | libtest-needs-perl-ptest \ |
diff --git a/meta/recipes-multimedia/libpng/files/run-ptest b/meta/recipes-multimedia/libpng/files/run-ptest new file mode 100644 index 0000000000..9ab5d0c1f4 --- /dev/null +++ b/meta/recipes-multimedia/libpng/files/run-ptest | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | set -eux | ||
| 4 | |||
| 5 | ./pngfix pngtest.png &> log.txt 2>&1 | ||
| 6 | |||
| 7 | if grep -i "OK" log.txt 2>&1 ; then | ||
| 8 | echo "PASS: pngfix passed" | ||
| 9 | else | ||
| 10 | echo "FAIL: pngfix failed" | ||
| 11 | fi | ||
| 12 | rm -f log.txt | ||
| 13 | |||
| 14 | ./pngtest pngtest.png &> log.txt 2>&1 | ||
| 15 | |||
| 16 | if grep -i "PASS" log.txt 2>&1 ; then | ||
| 17 | echo "PASS: pngtest passed" | ||
| 18 | else | ||
| 19 | echo "FAIL: pngtest failed" | ||
| 20 | fi | ||
| 21 | rm -f log.txt | ||
| 22 | |||
| 23 | for i in pngstest timepng; do | ||
| 24 | if "./${i}" pngtest.png 2>&1; then | ||
| 25 | echo "PASS: $i" | ||
| 26 | else | ||
| 27 | echo "FAIL: $i" | ||
| 28 | fi | ||
| 29 | done | ||
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.39.bb b/meta/recipes-multimedia/libpng/libpng_1.6.39.bb index d9dcf379e9..94db1d3f6b 100644 --- a/meta/recipes-multimedia/libpng/libpng_1.6.39.bb +++ b/meta/recipes-multimedia/libpng/libpng_1.6.39.bb | |||
| @@ -10,7 +10,11 @@ DEPENDS = "zlib" | |||
| 10 | 10 | ||
| 11 | LIBV = "16" | 11 | LIBV = "16" |
| 12 | 12 | ||
| 13 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz" | 13 | SRC_URI = "\ |
| 14 | ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz \ | ||
| 15 | file://run-ptest \ | ||
| 16 | " | ||
| 17 | |||
| 14 | SRC_URI[sha256sum] = "1f4696ce70b4ee5f85f1e1623dc1229b210029fa4b7aee573df3e2ba7b036937" | 18 | SRC_URI[sha256sum] = "1f4696ce70b4ee5f85f1e1623dc1229b210029fa4b7aee573df3e2ba7b036937" |
| 15 | 19 | ||
| 16 | MIRRORS += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/older-releases/" | 20 | MIRRORS += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/older-releases/" |
| @@ -19,7 +23,7 @@ UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html" | |||
| 19 | 23 | ||
| 20 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" | 24 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" |
| 21 | 25 | ||
| 22 | inherit autotools binconfig-disabled pkgconfig | 26 | inherit autotools binconfig-disabled pkgconfig ptest |
| 23 | 27 | ||
| 24 | # Work around missing symbols | 28 | # Work around missing symbols |
| 25 | EXTRA_OECONF:append:class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}" | 29 | EXTRA_OECONF:append:class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}" |
| @@ -32,3 +36,11 @@ BBCLASSEXTEND = "native nativesdk" | |||
| 32 | 36 | ||
| 33 | # CVE-2019-17371 is actually a memory leak in gif2png 2.x | 37 | # CVE-2019-17371 is actually a memory leak in gif2png 2.x |
| 34 | CVE_CHECK_IGNORE += "CVE-2019-17371" | 38 | CVE_CHECK_IGNORE += "CVE-2019-17371" |
| 39 | |||
| 40 | do_install_ptest() { | ||
| 41 | install -m644 "${S}/pngtest.png" "${D}${PTEST_PATH}" | ||
| 42 | install -m755 "${B}/.libs/pngfix" "${D}${PTEST_PATH}" | ||
| 43 | install -m755 "${B}/.libs/pngtest" "${D}${PTEST_PATH}" | ||
| 44 | install -m755 "${B}/.libs/pngstest" "${D}${PTEST_PATH}" | ||
| 45 | install -m755 "${B}/.libs/timepng" "${D}${PTEST_PATH}" | ||
| 46 | } | ||
