Update ffmpeg package and its requirements
Also make use of new build feature rules.
This commit is contained in:
parent
e97e4b74a0
commit
14d5e307b4
@ -335,120 +335,53 @@ if $(TARGET_ARCH) = x86 {
|
||||
local ffmpegBaseURL = $(baseURL)/lib ;
|
||||
if $(TARGET_ARCH) = x86 {
|
||||
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
HAIKU_FFMPEG_FILE = ffmpeg-0.10.2-r1a4-x86-gcc4-2012-09-02.zip ;
|
||||
HAIKU_SPEEX_FILE = speex-1.2rc1-r1a4-x86-gcc4-2012-09-02.zip ;
|
||||
HAIKU_LIBTHEORA_FILE = libtheora-1.1.1-r1a4-x86-gcc4-2012-09-02.zip ;
|
||||
HAIKU_LIBVORBIS_FILE = libvorbis-1.3.2-r1a4-x86-gcc4-2012-09-02.zip ;
|
||||
HAIKU_LIBOGG_FILE = libogg-1.3.0-r1a4-x86-gcc4-2012-09-02.zip ;
|
||||
HAIKU_LIBVPX_FILE = libvpx-1.0.0-r1a4-x86-gcc4-2012-09-02.zip ;
|
||||
# TODO:...
|
||||
HAIKU_FFMPEG_PACKAGE = ffmpeg-0.10.2-r1a4-x86-gcc4-2012-09-02.zip ;
|
||||
HAIKU_SPEEX_PACKAGE = speex-1.2rc1-r1a4-x86-gcc4-2012-09-02.zip ;
|
||||
HAIKU_LIBTHEORA_PACKAGE = libtheora-1.1.1-r1a4-x86-gcc4-2012-09-02.zip ;
|
||||
HAIKU_LIBVORBIS_PACKAGE = libvorbis-1.3.2-r1a4-x86-gcc4-2012-09-02.zip ;
|
||||
HAIKU_LIBOGG_PACKAGE = libogg-1.3.0-r1a4-x86-gcc4-2012-09-02.zip ;
|
||||
HAIKU_LIBVPX_PACKAGE = libvpx-1.0.0-r1a4-x86-gcc4-2012-09-02.zip ;
|
||||
} else {
|
||||
HAIKU_FFMPEG_FILE = ffmpeg-0.10.2-r1a4-x86-gcc2-2012-08-30.zip ;
|
||||
HAIKU_SPEEX_FILE = speex-1.2rc1-r1a4-x86-gcc2-2012-08-29.zip ;
|
||||
HAIKU_LIBTHEORA_FILE = libtheora-1.1.1-r1a4-x86-gcc2-2012-08-29.zip ;
|
||||
HAIKU_LIBVORBIS_FILE = libvorbis-1.3.2-r1a4-x86-gcc2-2012-08-29.zip ;
|
||||
HAIKU_LIBOGG_FILE = libogg-1.3.0-r1a4-x86-gcc2-2012-08-29.zip ;
|
||||
HAIKU_LIBVPX_FILE = libvpx-1.0.0-r1a4-x86-gcc2-2012-08-29.zip ;
|
||||
HAIKU_FFMPEG_PACKAGE = ffmpeg-0.10.2-1-x86_gcc2.hpkg ;
|
||||
HAIKU_FFMPEG_DEVEL_PACKAGE = ffmpeg_devel-0.10.2-1-x86_gcc2.hpkg ;
|
||||
HAIKU_SPEEX_PACKAGE = speex-1.2~rc1-1-x86_gcc2.hpkg ;
|
||||
HAIKU_SPEEX_DEVEL_PACKAGE = speex_devel-1.2~rc1-1-x86_gcc2.hpkg ;
|
||||
HAIKU_LIBTHEORA_PACKAGE = libtheora-1.1.1-1-x86_gcc2.hpkg ;
|
||||
HAIKU_LIBTHEORA_DEVEL_PACKAGE = libtheora_devel-1.1.1-1-x86_gcc2.hpkg ;
|
||||
HAIKU_LIBVORBIS_PACKAGE = libvorbis-1.3.2-1-x86_gcc2.hpkg ;
|
||||
HAIKU_LIBVORBIS_DEVEL_PACKAGE = libvorbis_devel-1.3.2-1-x86_gcc2.hpkg ;
|
||||
HAIKU_LIBOGG_PACKAGE = libogg-1.3.0-1-x86_gcc2.hpkg ;
|
||||
HAIKU_LIBOGG_DEVEL_PACKAGE = libogg_devel-1.3.0-1-x86_gcc2.hpkg ;
|
||||
HAIKU_LIBVPX_PACKAGE = libvpx-1.0.0-1-x86_gcc2.hpkg ;
|
||||
HAIKU_LIBVPX_DEVEL_PACKAGE = libvpx_devel-1.0.0-1-x86_gcc2.hpkg ;
|
||||
}
|
||||
|
||||
local ffmpegZipFile = [ DownloadFile $(HAIKU_FFMPEG_FILE)
|
||||
: $(ffmpegBaseURL)/$(HAIKU_FFMPEG_FILE) ] ;
|
||||
local speexZipFile = [ DownloadFile $(HAIKU_SPEEX_FILE)
|
||||
: $(ffmpegBaseURL)/$(HAIKU_SPEEX_FILE) ] ;
|
||||
local libtheoraZipFile = [ DownloadFile $(HAIKU_LIBTHEORA_FILE)
|
||||
: $(ffmpegBaseURL)/$(HAIKU_LIBTHEORA_FILE) ] ;
|
||||
local libvorbisZipFile = [ DownloadFile $(HAIKU_LIBVORBIS_FILE)
|
||||
: $(ffmpegBaseURL)/$(HAIKU_LIBVORBIS_FILE) ] ;
|
||||
local liboggZipFile = [ DownloadFile $(HAIKU_LIBOGG_FILE)
|
||||
: $(ffmpegBaseURL)/$(HAIKU_LIBOGG_FILE) ] ;
|
||||
local libvpxZipFile = [ DownloadFile $(HAIKU_LIBVPX_FILE)
|
||||
: $(ffmpegBaseURL)/$(HAIKU_LIBVPX_FILE) ] ;
|
||||
local ffmpegLibs = libavformat.so libavcodec.so libavdevice.so
|
||||
libavfilter.so libswscale.so libavutil.so ;
|
||||
local speexLibs = libspeex.so ;
|
||||
local libtheoraLibs = libtheora.so libtheoradec.so libtheoraenc.so ;
|
||||
local libvorbisLibs = libvorbis.so libvorbisenc.so ;
|
||||
local liboggLibs = libogg.so ;
|
||||
local libvpxLibs = libvpx.so ;
|
||||
|
||||
HAIKU_FFMPEG_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
|
||||
$(HAIKU_FFMPEG_FILE:B) ] ;
|
||||
HAIKU_SPEEX_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
|
||||
$(HAIKU_SPEEX_FILE:B) ] ;
|
||||
HAIKU_LIBTHEORA_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
|
||||
$(HAIKU_LIBTHEORA_FILE:B) ] ;
|
||||
HAIKU_LIBVORBIS_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
|
||||
$(HAIKU_LIBVORBIS_FILE:B) ] ;
|
||||
HAIKU_LIBOGG_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
|
||||
$(HAIKU_LIBOGG_FILE:B) ] ;
|
||||
HAIKU_LIBVPX_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
|
||||
$(HAIKU_LIBVPX_FILE:B) ] ;
|
||||
local feature ;
|
||||
for feature in ffmpeg speex libtheora libvorbis libogg libvpx {
|
||||
HAIKU_$(feature:U)_URL = $(hpkgBaseURL)/$(HAIKU_$(feature:U)_PACKAGE) ;
|
||||
HAIKU_$(feature:U)_DEVEL_URL
|
||||
= $(hpkgBaseURL)/$(HAIKU_$(feature:U)_DEVEL_PACKAGE) ;
|
||||
|
||||
HAIKU_FFMPEG_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_FFMPEG_DIR)
|
||||
: common/include/ : $(ffmpegZipFile) : extracted-ffmpeg ] ;
|
||||
HAIKU_SPEEX_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_SPEEX_DIR)
|
||||
: common/include/ : $(speexZipFile) : extracted-speex ] ;
|
||||
HAIKU_LIBTHEORA_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_LIBTHEORA_DIR)
|
||||
: common/include/ : $(libtheoraZipFile) : extracted-libtheora ] ;
|
||||
HAIKU_LIBVORBIS_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_LIBVORBIS_DIR)
|
||||
: common/include/ : $(libvorbisZipFile) : extracted-libvorbis ] ;
|
||||
HAIKU_LIBOGG_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_LIBOGG_DIR)
|
||||
: common/include/ : $(liboggZipFile) : extracted-libogg ] ;
|
||||
HAIKU_LIBVPX_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_LIBVPX_DIR)
|
||||
: common/include/ : $(libvpxZipFile) : extracted-libvpx ] ;
|
||||
ExtractBuildFeatureArchives $(feature) :
|
||||
file: base $(HAIKU_$(feature:U)_URL)
|
||||
runtime: lib
|
||||
file: devel $(HAIKU_$(feature:U)_DEVEL_URL)
|
||||
depends: base
|
||||
libraries: develop/lib/$($(feature)Libs)
|
||||
headers: develop/headers
|
||||
;
|
||||
|
||||
HAIKU_FFMPEG_LIBS = [ ExtractArchive $(HAIKU_FFMPEG_DIR)
|
||||
:
|
||||
common/lib/libavformat.a
|
||||
common/lib/libavcodec.a
|
||||
common/lib/libavdevice.a
|
||||
common/lib/libavfilter.a
|
||||
common/lib/libswscale.a
|
||||
common/lib/libavutil.a
|
||||
: $(ffmpegZipFile)
|
||||
: extracted-ffmpeg ] ;
|
||||
Depends $(HAIKU_FFMPEG_LIBS) : $(HAIKU_FFMPEG_HEADERS_DEPENDENCY) ;
|
||||
|
||||
HAIKU_SPEEX_LIBS = [ ExtractArchive $(HAIKU_SPEEX_DIR)
|
||||
:
|
||||
common/lib/libspeex.a
|
||||
: $(speexZipFile)
|
||||
: extracted-speex ] ;
|
||||
Depends $(HAIKU_SPEEX_LIBS) : $(HAIKU_SPEEX_HEADERS_DEPENDENCY) ;
|
||||
|
||||
HAIKU_LIBTHEORA_LIBS = [ ExtractArchive $(HAIKU_LIBTHEORA_DIR)
|
||||
:
|
||||
common/lib/libtheora.a
|
||||
common/lib/libtheoradec.a
|
||||
common/lib/libtheoraenc.a
|
||||
: $(libtheoraZipFile)
|
||||
: extracted-libtheora ] ;
|
||||
Depends $(HAIKU_LIBTHEORA_LIBS) : $(HAIKU_LIBTHEORA_HEADERS_DEPENDENCY) ;
|
||||
|
||||
|
||||
HAIKU_LIBVORBIS_LIBS = [ ExtractArchive $(HAIKU_LIBVORBIS_DIR)
|
||||
:
|
||||
common/lib/libvorbis.a
|
||||
common/lib/libvorbisenc.a
|
||||
: $(libvorbisZipFile)
|
||||
: extracted-libvorbis ] ;
|
||||
Depends $(HAIKU_LIBVORBIS_LIBS) : $(HAIKU_LIBVORBIS_HEADERS_DEPENDENCY) ;
|
||||
|
||||
|
||||
HAIKU_LIBOGG_LIBS = [ ExtractArchive $(HAIKU_LIBOGG_DIR)
|
||||
:
|
||||
common/lib/libogg.a
|
||||
: $(liboggZipFile)
|
||||
: extracted-libogg ] ;
|
||||
Depends $(HAIKU_LIBOGG_LIBS) : $(HAIKU_LIBOGG_HEADERS_DEPENDENCY) ;
|
||||
|
||||
HAIKU_LIBVPX_LIBS = [ ExtractArchive $(HAIKU_LIBVPX_DIR)
|
||||
:
|
||||
common/lib/libvpx.a
|
||||
: $(libvpxZipFile)
|
||||
: extracted-libvpx ] ;
|
||||
Depends $(HAIKU_LIBVPX_LIBS) : $(HAIKU_LIBVPX_HEADERS_DEPENDENCY) ;
|
||||
|
||||
HAIKU_FFMPEG_HEADERS = [ FDirName $(HAIKU_FFMPEG_DIR) common include ] ;
|
||||
HAIKU_SPEEX_HEADERS = [ FDirName $(HAIKU_SPEEX_DIR) common include ] ;
|
||||
HAIKU_LIBTHEORA_HEADERS = [ FDirName $(HAIKU_LIBTHEORA_DIR) common include ] ;
|
||||
HAIKU_LIBVORBIS_HEADERS = [ FDirName $(HAIKU_LIBVORBIS_DIR) common include ] ;
|
||||
HAIKU_LIBOGG_HEADERS = [ FDirName $(HAIKU_LIBOGG_DIR) common include ] ;
|
||||
HAIKU_LIBVPX_HEADERS = [ FDirName $(HAIKU_LIBVPX_DIR) common include ] ;
|
||||
|
||||
EnableBuildFeatures ffmpeg ;
|
||||
EnableBuildFeatures $(feature) ;
|
||||
}
|
||||
} else {
|
||||
Echo "FFMpeg support not available on $(TARGET_ARCH)" ;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ OptionalPackageDependencies CDRecord : GetTextLibintl LibIconv ;
|
||||
OptionalPackageDependencies Curl : OpenSSL ;
|
||||
OptionalPackageDependencies DevelopmentBase : CDRecord DevelopmentMin Yasm ;
|
||||
OptionalPackageDependencies Development
|
||||
: DevelopmentBase GLU-devel Perl Zlib-devel ;
|
||||
: DevelopmentBase FFMpeg-devel GLU-devel Perl Zlib-devel ;
|
||||
OptionalPackageDependencies DevelopmentPowerPC : DevelopmentMin ;
|
||||
OptionalPackageDependencies GetText : GetTextLibintl ;
|
||||
OptionalPackageDependencies GetTextLibintl : LibIconv ;
|
||||
@ -46,4 +46,4 @@ OptionalPackageDependencies XZ-Utils : Tar ;
|
||||
OptionalPackageDependencies Zlib-devel : Zlib ;
|
||||
|
||||
OptionalPackageDependencies MandatoryPackages
|
||||
: Bzip Ctags GLU Grep ICU LibSolv Mesa Sed Tar Zlib ;
|
||||
: Bzip Ctags FFMpeg GLU Grep ICU LibSolv Mesa Sed Tar Zlib ;
|
||||
|
@ -44,6 +44,8 @@
|
||||
# Droid - Font family from Google's Android project
|
||||
# Expat - XML parsing libraries
|
||||
# Fastdep - fast dependency generator for C/C++ files
|
||||
# FFMpeg - audio/video library
|
||||
# FFMpeg-devel - FFMpeg development files
|
||||
# friss - RSS/ATOM/... feeds reader
|
||||
# GetText - a framework to help produce multi-lingual messages.
|
||||
# GetTextLibintl - GetText's libintl
|
||||
@ -858,6 +860,34 @@ if [ IsOptionalHaikuImagePackageAdded Fastdep ] {
|
||||
}
|
||||
|
||||
|
||||
# FFMpeg
|
||||
if [ IsOptionalHaikuImagePackageAdded FFMpeg ] {
|
||||
if $(TARGET_ARCH) = x86 {
|
||||
local feature ;
|
||||
for feature in ffmpeg speex libtheora libvorbis libogg libvpx {
|
||||
InstallOptionalHaikuImagePackage $(HAIKU_$(feature:U)_URL)
|
||||
: system ;
|
||||
}
|
||||
} else {
|
||||
Echo "No optional package FFMpeg available for $(TARGET_ARCH)" ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# FFMpeg-devel
|
||||
if [ IsOptionalHaikuImagePackageAdded FFMpeg-devel ] {
|
||||
if $(TARGET_ARCH) = x86 {
|
||||
local feature ;
|
||||
for feature in ffmpeg speex libtheora libvorbis libogg libvpx {
|
||||
InstallOptionalHaikuImagePackage $(HAIKU_$(feature:U)_DEVEL_URL)
|
||||
: system ;
|
||||
}
|
||||
} else {
|
||||
Echo "No optional package FFMpeg-devel available for $(TARGET_ARCH)" ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# friss
|
||||
if [ IsOptionalHaikuImagePackageAdded friss ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
|
@ -2,10 +2,11 @@ SubDir HAIKU_TOP src add-ons media media-add-ons dvb ;
|
||||
|
||||
UsePrivateHeaders drivers ;
|
||||
|
||||
UseHeaders [ FDirName $(HAIKU_FFMPEG_HEADERS) ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_FFMPEG_HEADERS) libavcodec ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_FFMPEG_HEADERS) libavformat ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_FFMPEG_HEADERS) libavutil ] ;
|
||||
local ffmpegHeaders = [ BuildFeatureAttribute ffmpeg : headers : path ] ;
|
||||
UseHeaders $(ffmpegHeaders) ;
|
||||
UseHeaders [ FDirName $(ffmpegHeaders) libavcodec ] ;
|
||||
UseHeaders [ FDirName $(ffmpegHeaders) libavformat ] ;
|
||||
UseHeaders [ FDirName $(ffmpegHeaders) libavutil ] ;
|
||||
|
||||
|
||||
Addon dvb.media_addon :
|
||||
@ -21,5 +22,5 @@ Addon dvb.media_addon :
|
||||
: be media $(TARGET_LIBSUPC++)
|
||||
;
|
||||
|
||||
Includes [ FGristFiles MediaFormat.cpp ] : $(HAIKU_FFMPEG_HEADERS_DEPENDENCY) ;
|
||||
|
||||
Includes [ FGristFiles MediaFormat.cpp ]
|
||||
: [ BuildFeatureAttribute ffmpeg : headers ] ;
|
||||
|
@ -25,16 +25,18 @@ local sources =
|
||||
;
|
||||
|
||||
|
||||
SubDirSysHdrs $(HAIKU_FFMPEG_HEADERS) ;
|
||||
Includes [ FGristFiles $(sources) ] : $(HAIKU_FFMPEG_HEADERS_DEPENDENCY) ;
|
||||
UseBuildFeatureHeaders ffmpeg ;
|
||||
Includes [ FGristFiles $(sources) ]
|
||||
: [ BuildFeatureAttribute ffmpeg : headers ] ;
|
||||
|
||||
UseHeaders [ FDirName $(HAIKU_FFMPEG_HEADERS) ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_FFMPEG_HEADERS) libavcodec ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_FFMPEG_HEADERS) libavdevice ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_FFMPEG_HEADERS) libavfilter ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_FFMPEG_HEADERS) libavformat ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_FFMPEG_HEADERS) libavutil ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_FFMPEG_HEADERS) libswscale ] ;
|
||||
local ffmpegHeaders = [ BuildFeatureAttribute ffmpeg : headers : path ] ;
|
||||
UseHeaders $(ffmpegHeaders) ;
|
||||
UseHeaders [ FDirName $(ffmpegHeaders) libavcodec ] ;
|
||||
UseHeaders [ FDirName $(ffmpegHeaders) libavdevice ] ;
|
||||
UseHeaders [ FDirName $(ffmpegHeaders) libavfilter ] ;
|
||||
UseHeaders [ FDirName $(ffmpegHeaders) libavformat ] ;
|
||||
UseHeaders [ FDirName $(ffmpegHeaders) libavutil ] ;
|
||||
UseHeaders [ FDirName $(ffmpegHeaders) libswscale ] ;
|
||||
|
||||
Addon ffmpeg :
|
||||
$(sources)
|
||||
@ -45,13 +47,13 @@ Addon ffmpeg :
|
||||
:
|
||||
|
||||
# FFmpeg libraries (from FFmpeg optional package):
|
||||
$(HAIKU_FFMPEG_LIBS)
|
||||
[ BuildFeatureAttribute ffmpeg : libraries ]
|
||||
|
||||
$(HAIKU_SPEEX_LIBS)
|
||||
$(HAIKU_LIBTHEORA_LIBS)
|
||||
$(HAIKU_LIBVORBIS_LIBS)
|
||||
$(HAIKU_LIBOGG_LIBS)
|
||||
$(HAIKU_LIBVPX_LIBS)
|
||||
[ BuildFeatureAttribute speex : libraries ]
|
||||
[ BuildFeatureAttribute libtheora : libraries ]
|
||||
[ BuildFeatureAttribute libvorbis : libraries ]
|
||||
[ BuildFeatureAttribute libogg : libraries ]
|
||||
[ BuildFeatureAttribute libvpx : libraries ]
|
||||
libbz2_ffmpeg.a
|
||||
|
||||
be
|
||||
|
Loading…
Reference in New Issue
Block a user