xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-multimedia/id3lib/id3lib_3.8.3.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Library for interacting with ID3 tags"
2*4882a593SmuzhiyunSECTION = "libs/multimedia"
3*4882a593SmuzhiyunLICENSE = "LGPL-2.0-or-later"
4*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
5*4882a593SmuzhiyunDEPENDS = "zlib"
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunPR = "r1"
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunSRC_URI = "${SOURCEFORGE_MIRROR}/id3lib/id3lib-${PV}.tar.gz;name=archive \
10*4882a593Smuzhiyun           ${DEBIAN_MIRROR}/main/i/id3lib3.8.3/id3lib3.8.3_3.8.3-16.2.debian.tar.xz;name=patch;subdir=${BP} \
11*4882a593Smuzhiyun           file://acdefine.patch \
12*4882a593Smuzhiyun"
13*4882a593SmuzhiyunSRC_URI[archive.md5sum] = "19f27ddd2dda4b2d26a559a4f0f402a7"
14*4882a593SmuzhiyunSRC_URI[archive.sha256sum] = "2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b68702230e26c7d079"
15*4882a593SmuzhiyunSRC_URI[patch.md5sum] = "997c764d3be11c9a51779d93facf1118"
16*4882a593SmuzhiyunSRC_URI[patch.sha256sum] = "ac2ee23ec89ba2af51d2c6dd5b1b6bf9f8a9f813de251bc182941439a4053176"
17*4882a593Smuzhiyun
18*4882a593Smuzhiyuninherit autotools
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun# Unlike other Debian packages, id3lib*.diff.gz contains another series of
21*4882a593Smuzhiyun# patches maintained by quilt. So manually apply them before applying other local
22*4882a593Smuzhiyun# patches. Also remove all temp files before leaving, because do_patch() will pop
23*4882a593Smuzhiyun# up all previously applied patches in the start
24*4882a593Smuzhiyundo_patch[depends] += "quilt-native:do_populate_sysroot"
25*4882a593Smuzhiyunid3lib_do_patch() {
26*4882a593Smuzhiyun    cd ${S}
27*4882a593Smuzhiyun    # it's important that we only pop the existing patches when they've
28*4882a593Smuzhiyun    # been applied, otherwise quilt will climb the directory tree
29*4882a593Smuzhiyun    # and reverse out some completely different set of patches
30*4882a593Smuzhiyun    if [ -d ${S}/patches ]; then
31*4882a593Smuzhiyun        # whilst this is the default directory, doing it like this
32*4882a593Smuzhiyun        # defeats the directory climbing that quilt will otherwise
33*4882a593Smuzhiyun        # do; note the directory must exist to defeat this, hence
34*4882a593Smuzhiyun        # the test inside which we operate
35*4882a593Smuzhiyun        QUILT_PATCHES=${S}/patches quilt pop -a
36*4882a593Smuzhiyun    fi
37*4882a593Smuzhiyun    if [ -d ${S}/.pc-${BPN} ]; then
38*4882a593Smuzhiyun        rm -rf ${S}/.pc
39*4882a593Smuzhiyun        mv ${S}/.pc-${BPN} ${S}/.pc
40*4882a593Smuzhiyun        QUILT_PATCHES=${S}/debian/patches quilt pop -a
41*4882a593Smuzhiyun        rm -rf ${S}/.pc ${S}/debian
42*4882a593Smuzhiyun    fi
43*4882a593Smuzhiyun    QUILT_PATCHES=${S}/debian/patches quilt push -a
44*4882a593Smuzhiyun    mv ${S}/.pc ${S}/.pc-${BPN}
45*4882a593Smuzhiyun}
46*4882a593Smuzhiyun
47*4882a593Smuzhiyundo_unpack[cleandirs] += "${S}"
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun# We invoke base do_patch at end, to incorporate any local patch
50*4882a593Smuzhiyunpython do_patch() {
51*4882a593Smuzhiyun    bb.build.exec_func('id3lib_do_patch', d)
52*4882a593Smuzhiyun    bb.build.exec_func('patch_do_patch', d)
53*4882a593Smuzhiyun}
54