xf.li | aa4d92f | 2023-09-13 00:18:58 -0700 | [diff] [blame^] | 1 | DESCRIPTION = "ffmpeg" |
| 2 | DEPENDS = "fdk-aac-master vo-amrwbenc opencore-amr" |
| 3 | SECTION = "lib" |
| 4 | LICENSE = "zte" |
| 5 | PV = "3.2.14" |
| 6 | PR = "r0" |
| 7 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808" |
| 8 | |
| 9 | #配置code路径信息。 |
| 10 | #FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}/platform:" |
| 11 | #SRC_URI = " \ |
| 12 | # file://ffmpeg-${PV} \ |
| 13 | # " |
| 14 | SRC_URI = " \ |
| 15 | https://www.ffmpeg.org/releases/ffmpeg-${PV}.tar.gz \ |
| 16 | file://0001-fix-for-sanchips-device.patch \ |
| 17 | " |
| 18 | |
| 19 | SRC_URI[md5sum] = "e0568845434f6fdeb67f4c3a67717e5b" |
| 20 | SRC_URI[sha256sum] = "d611182010c8cba1b63deade32467810af905e0f265e4683fbfb22fcbc165bb6" |
| 21 | |
| 22 | S = "${WORKDIR}" |
| 23 | #引用公用头文件和编译选项。 |
| 24 | include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc |
| 25 | |
| 26 | do_configure () { |
| 27 | cd ffmpeg-${PV} && ./build_sc_phone.sh |
| 28 | } |
| 29 | #编译 |
| 30 | #do_compile () { |
| 31 | #} |
| 32 | |
| 33 | #库和头文件的安装 |
| 34 | do_install () { |
| 35 | install -d ${D}${libdir}/ |
| 36 | |
| 37 | install -d ${D}/usr/include |
| 38 | install -d ${D}/usr/include/libavcodec |
| 39 | install -d ${D}/usr/include/libavformat |
| 40 | install -d ${D}/usr/include/libavutil |
| 41 | |
| 42 | install -m 0755 ${S}/ffmpeg-3.2.14/pkgs/*.a ${D}${libdir}/ |
| 43 | |
| 44 | install -m 0644 ${S}/ffmpeg-3.2.14/pkgs/include/libavcodec/*.h ${D}/usr/include/libavcodec |
| 45 | install -m 0644 ${S}/ffmpeg-3.2.14/pkgs/include/libavformat/*.h ${D}/usr/include/libavformat |
| 46 | install -m 0644 ${S}/ffmpeg-3.2.14/pkgs/include/libavutil/*.h ${D}/usr/include/libavutil |
| 47 | |
| 48 | #install elfs |
| 49 | install -d ${ELFS-PATH}/ |
| 50 | install -m 0755 ${S}/ffmpeg-3.2.14/pkgs/*.a ${ELFS-PATH}/ |
| 51 | |
| 52 | } |
| 53 | |
| 54 | #清库 |
| 55 | do_cleanlibs () { |
| 56 | rm -fr ${ELFS-PATH}/libavcodec.a |
| 57 | rm -fr ${ELFS-PATH}/libavformat.a |
| 58 | rm -fr ${ELFS-PATH}/libavutil.a |
| 59 | } |
| 60 | |
| 61 | #rootfs包含的文件 |
| 62 | FILES_${PN} += "${libdir}/*.so" |
| 63 | FILES_${PN}-dbg += "${libdir}/.debug" |
| 64 | FILES_SOLIBSDEV = "" |
| 65 | INSANE_SKIP_${PN} = "dev-so" |
| 66 | |