* [PATCH] ffmpeg: moved to native staging
@ 2010-03-17 17:38 Enrico Scholz
2010-03-18 16:04 ` Koen Kooi
0 siblings, 1 reply; 2+ messages in thread
From: Enrico Scholz @ 2010-03-17 17:38 UTC (permalink / raw)
To: openembedded-devel; +Cc: Enrico Scholz, Enrico Scholz
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Old .inc file listed every single header which was to be staged. This
causes problems when upgrading to recent 0.5.1 version or when using
older versions because headers might not exist there resp. new ones
need to be installed.
This patch converts the .inc file to new native staging method and
which calls two new functions:
* ffmpeg_create_compat_links:
- this creates symlinks to all installed headers into the ffmpeg/
directory. E.g.
adler32.h -> ../libavutil/adler32.h
- it should be probably checked whether these links are really
needed (they are not provided by ffmpeg and other programs might
get confused when they see new and old headers). For now; I kept
them.
* ffmpeg_stage_cleanup:
- this removes data and plugin files
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
recipes/ffmpeg/ffmpeg.inc | 57 +++++++++++++++------------------------------
1 files changed, 19 insertions(+), 38 deletions(-)
diff --git a/recipes/ffmpeg/ffmpeg.inc b/recipes/ffmpeg/ffmpeg.inc
index 857dad5..c855877 100644
--- a/recipes/ffmpeg/ffmpeg.inc
+++ b/recipes/ffmpeg/ffmpeg.inc
@@ -10,7 +10,7 @@ ARM_INSTRUCTION_SET = "arm"
DEPENDS = "zlib libogg libvorbis libtheora faac faad2 ${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'lame liba52', d)}"
RSUGGESTS = "mplayer"
-INC_PR = "r12"
+INC_PR = "r13"
inherit autotools pkgconfig
@@ -30,45 +30,26 @@ EXTRA_OECONF = "\
\
"
-do_stage() {
- for lib in libavcodec libavdevice libavformat \
- libavutil libpostproc libswscale
- do
- oe_libinstall -a -so -C $lib $lib ${STAGING_LIBDIR} || true
- install -d ${STAGING_INCDIR}/$lib
- done
-
- install -d ${STAGING_INCDIR}/ffmpeg
-
- install -m 0644 ${S}/libavcodec/avcodec.h ${STAGING_INCDIR}/ffmpeg/avcodec.h
- install -m 0644 ${S}/libavcodec/opt.h ${STAGING_INCDIR}/ffmpeg/opt.h
- install -m 0644 ${S}/libavcodec/avcodec.h ${STAGING_INCDIR}/libavcodec/avcodec.h
- install -m 0644 ${S}/libavcodec/opt.h ${STAGING_INCDIR}/libavcodec/opt.h
-
- install -m 0644 ${S}/libavdevice/avdevice.h ${STAGING_INCDIR}/ffmpeg/avdevice.h
-
- for h in avformat.h avio.h rtp.h rtsp.h rtspcodes.h
- do
- install -m 0644 ${S}/libavformat/$h ${STAGING_INCDIR}/ffmpeg/$h
- install -m 0644 ${S}/libavformat/$h ${STAGING_INCDIR}/libavformat/$h
- done
-
- for h in adler32.h aes.h attributes.h avstring.h avutil.h base64.h bswap.h common.h crc_data.h crc.h des.h error.h fifo.h integer.h internal.h intfloat_readwrite.h intmath.h intreadwrite.h lfg.h libm.h lls.h log.h lzo.h mathematics.h md5.h mem.h pca.h pixdesc.h pixfmt.h random_seed.h rational.h rc4.h sha1.h sha.h softfloat.h timer.h tree.h x86_cpu.h
- do
- install -m 0644 ${S}/libavutil/$h ${STAGING_INCDIR}/ffmpeg/$h
- install -m 0644 ${S}/libavutil/$h ${STAGING_INCDIR}/libavutil/$h
- done
- install -m 0644 ${B}/libavutil/avconfig.h ${STAGING_INCDIR}/ffmpeg/
- install -m 0644 ${B}/libavutil/avconfig.h ${STAGING_INCDIR}/libavutil/
+FFMPEG_LIBS = "libavcodec libavdevice libavformat \
+ libavutil libpostproc libswscale"
+
+SYSROOT_PREPROCESS_FUNCS = " \
+ ffmpeg_stage_cleanup \
+ ffmpeg_create_compat_links"
+
+ffmpeg_create_compat_links() {
+ rm -rf ${SYSROOT_DESTDIR}${STAGING_INCDIR}/ffmpeg
+ mkdir -m 0755 ${SYSROOT_DESTDIR}${STAGING_INCDIR}/ffmpeg
+ cd ${SYSROOT_DESTDIR}${STAGING_INCDIR}/ffmpeg
- install -d ${STAGING_INCDIR}/libswscale/
- install -m 0644 ${S}/libswscale/*.h ${STAGING_INCDIR}/ffmpeg/
- install -m 0644 ${S}/libswscale/*.h ${STAGING_INCDIR}/libswscale/
+ for lib in ${FFMPEG_LIBS}; do
+ ln -s ../$lib/*.h '.'
+ done
+}
- install -d ${STAGING_INCDIR}/libpostproc
- install -d ${STAGING_INCDIR}/postproc
- install -m 0644 ${S}/libpostproc/postprocess.h ${STAGING_INCDIR}/libpostproc/postprocess.h
- install -m 0644 ${S}/libpostproc/postprocess.h ${STAGING_INCDIR}/postproc/postprocess.h
+ffmpeg_stage_cleanup() {
+ rm -rf ${SYSROOT_DESTDIR}${STAGING_LIBDIR}/vhook \
+ ${SYSROOT_DESTDIR}${STAGING_DATADIR}
}
--
1.6.6.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ffmpeg: moved to native staging
2010-03-17 17:38 [PATCH] ffmpeg: moved to native staging Enrico Scholz
@ 2010-03-18 16:04 ` Koen Kooi
0 siblings, 0 replies; 2+ messages in thread
From: Koen Kooi @ 2010-03-18 16:04 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thanks, applied
On 17-03-10 18:38, Enrico Scholz wrote:
> From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
>
> Old .inc file listed every single header which was to be staged. This
> causes problems when upgrading to recent 0.5.1 version or when using
> older versions because headers might not exist there resp. new ones
> need to be installed.
>
> This patch converts the .inc file to new native staging method and
> which calls two new functions:
>
> * ffmpeg_create_compat_links:
> - this creates symlinks to all installed headers into the ffmpeg/
> directory. E.g.
>
> adler32.h -> ../libavutil/adler32.h
>
> - it should be probably checked whether these links are really
> needed (they are not provided by ffmpeg and other programs might
> get confused when they see new and old headers). For now; I kept
> them.
>
> * ffmpeg_stage_cleanup:
> - this removes data and plugin files
>
> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> ---
> recipes/ffmpeg/ffmpeg.inc | 57 +++++++++++++++------------------------------
> 1 files changed, 19 insertions(+), 38 deletions(-)
>
> diff --git a/recipes/ffmpeg/ffmpeg.inc b/recipes/ffmpeg/ffmpeg.inc
> index 857dad5..c855877 100644
> --- a/recipes/ffmpeg/ffmpeg.inc
> +++ b/recipes/ffmpeg/ffmpeg.inc
> @@ -10,7 +10,7 @@ ARM_INSTRUCTION_SET = "arm"
> DEPENDS = "zlib libogg libvorbis libtheora faac faad2 ${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'lame liba52', d)}"
> RSUGGESTS = "mplayer"
>
> -INC_PR = "r12"
> +INC_PR = "r13"
>
> inherit autotools pkgconfig
>
> @@ -30,45 +30,26 @@ EXTRA_OECONF = "\
> \
> "
>
> -do_stage() {
> - for lib in libavcodec libavdevice libavformat \
> - libavutil libpostproc libswscale
> - do
> - oe_libinstall -a -so -C $lib $lib ${STAGING_LIBDIR} || true
> - install -d ${STAGING_INCDIR}/$lib
> - done
> -
> - install -d ${STAGING_INCDIR}/ffmpeg
> -
> - install -m 0644 ${S}/libavcodec/avcodec.h ${STAGING_INCDIR}/ffmpeg/avcodec.h
> - install -m 0644 ${S}/libavcodec/opt.h ${STAGING_INCDIR}/ffmpeg/opt.h
> - install -m 0644 ${S}/libavcodec/avcodec.h ${STAGING_INCDIR}/libavcodec/avcodec.h
> - install -m 0644 ${S}/libavcodec/opt.h ${STAGING_INCDIR}/libavcodec/opt.h
> -
> - install -m 0644 ${S}/libavdevice/avdevice.h ${STAGING_INCDIR}/ffmpeg/avdevice.h
> -
> - for h in avformat.h avio.h rtp.h rtsp.h rtspcodes.h
> - do
> - install -m 0644 ${S}/libavformat/$h ${STAGING_INCDIR}/ffmpeg/$h
> - install -m 0644 ${S}/libavformat/$h ${STAGING_INCDIR}/libavformat/$h
> - done
> -
> - for h in adler32.h aes.h attributes.h avstring.h avutil.h base64.h bswap.h common.h crc_data.h crc.h des.h error.h fifo.h integer.h internal.h intfloat_readwrite.h intmath.h intreadwrite.h lfg.h libm.h lls.h log.h lzo.h mathematics.h md5.h mem.h pca.h pixdesc.h pixfmt.h random_seed.h rational.h rc4.h sha1.h sha.h softfloat.h timer.h tree.h x86_cpu.h
> - do
> - install -m 0644 ${S}/libavutil/$h ${STAGING_INCDIR}/ffmpeg/$h
> - install -m 0644 ${S}/libavutil/$h ${STAGING_INCDIR}/libavutil/$h
> - done
> - install -m 0644 ${B}/libavutil/avconfig.h ${STAGING_INCDIR}/ffmpeg/
> - install -m 0644 ${B}/libavutil/avconfig.h ${STAGING_INCDIR}/libavutil/
> +FFMPEG_LIBS = "libavcodec libavdevice libavformat \
> + libavutil libpostproc libswscale"
> +
> +SYSROOT_PREPROCESS_FUNCS = " \
> + ffmpeg_stage_cleanup \
> + ffmpeg_create_compat_links"
> +
> +ffmpeg_create_compat_links() {
> + rm -rf ${SYSROOT_DESTDIR}${STAGING_INCDIR}/ffmpeg
> + mkdir -m 0755 ${SYSROOT_DESTDIR}${STAGING_INCDIR}/ffmpeg
> + cd ${SYSROOT_DESTDIR}${STAGING_INCDIR}/ffmpeg
>
> - install -d ${STAGING_INCDIR}/libswscale/
> - install -m 0644 ${S}/libswscale/*.h ${STAGING_INCDIR}/ffmpeg/
> - install -m 0644 ${S}/libswscale/*.h ${STAGING_INCDIR}/libswscale/
> + for lib in ${FFMPEG_LIBS}; do
> + ln -s ../$lib/*.h '.'
> + done
> +}
>
> - install -d ${STAGING_INCDIR}/libpostproc
> - install -d ${STAGING_INCDIR}/postproc
> - install -m 0644 ${S}/libpostproc/postprocess.h ${STAGING_INCDIR}/libpostproc/postprocess.h
> - install -m 0644 ${S}/libpostproc/postprocess.h ${STAGING_INCDIR}/postproc/postprocess.h
> +ffmpeg_stage_cleanup() {
> + rm -rf ${SYSROOT_DESTDIR}${STAGING_LIBDIR}/vhook \
> + ${SYSROOT_DESTDIR}${STAGING_DATADIR}
> }
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFLok8XMkyGM64RGpERAuVDAKCacLzuFZZeIyGa7mhOfLUvLHvjIgCdGK1l
C0E3K5dM/TGX5KgsE2zPDXo=
=fPgB
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-18 16:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-17 17:38 [PATCH] ffmpeg: moved to native staging Enrico Scholz
2010-03-18 16:04 ` Koen Kooi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.