hedgewars: update to 0.9.23
This commit is contained in:
parent
984e41ddfa
commit
e9013414d0
2 changed files with 10 additions and 89 deletions
|
@ -1,76 +0,0 @@
|
||||||
Description: Replace deprecated FFmpeg API
|
|
||||||
Author: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
|
|
||||||
Last-Update: <2015-11-02>
|
|
||||||
|
|
||||||
--- QTfrontend/util/LibavInteraction.cpp
|
|
||||||
+++ QTfrontend/util/LibavInteraction.cpp
|
|
||||||
@@ -106,8 +106,8 @@ LibavInteraction::LibavInteraction() : Q
|
|
||||||
if (!pCodec->pix_fmts)
|
|
||||||
continue;
|
|
||||||
bool yuv420Supported = false;
|
|
||||||
- for (const PixelFormat* pfmt = pCodec->pix_fmts; *pfmt != -1; pfmt++)
|
|
||||||
- if (*pfmt == PIX_FMT_YUV420P)
|
|
||||||
+ for (const AVPixelFormat* pfmt = pCodec->pix_fmts; *pfmt != -1; pfmt++)
|
|
||||||
+ if (*pfmt == AV_PIX_FMT_YUV420P)
|
|
||||||
{
|
|
||||||
yuv420Supported = true;
|
|
||||||
break;
|
|
||||||
--- hedgewars/avwrapper/avwrapper.c
|
|
||||||
+++ hedgewars/avwrapper/avwrapper.c
|
|
||||||
@@ -158,7 +158,7 @@ static void AddAudioStream()
|
|
||||||
else
|
|
||||||
g_NumSamples = g_pAudio->frame_size;
|
|
||||||
g_pSamples = (int16_t*)av_malloc(g_NumSamples*g_Channels*sizeof(int16_t));
|
|
||||||
- g_pAFrame = avcodec_alloc_frame();
|
|
||||||
+ g_pAFrame = av_frame_alloc();
|
|
||||||
if (!g_pAFrame)
|
|
||||||
{
|
|
||||||
Log("Could not allocate frame\n");
|
|
||||||
@@ -241,7 +241,7 @@ static int AddVideoStream()
|
|
||||||
g_pVideo->time_base.den = g_Framerate.num;
|
|
||||||
g_pVideo->time_base.num = g_Framerate.den;
|
|
||||||
//g_pVideo->gop_size = 12; /* emit one intra frame every twelve frames at most */
|
|
||||||
- g_pVideo->pix_fmt = PIX_FMT_YUV420P;
|
|
||||||
+ g_pVideo->pix_fmt = AV_PIX_FMT_YUV420P;
|
|
||||||
|
|
||||||
// set quality
|
|
||||||
if (g_VQuality > 100)
|
|
||||||
@@ -299,7 +299,7 @@ static int AddVideoStream()
|
|
||||||
#endif
|
|
||||||
return FatalError("Could not open video codec %s", g_pVCodec->long_name);
|
|
||||||
|
|
||||||
- g_pVFrame = avcodec_alloc_frame();
|
|
||||||
+ g_pVFrame = av_frame_alloc();
|
|
||||||
if (!g_pVFrame)
|
|
||||||
return FatalError("Could not allocate frame");
|
|
||||||
|
|
||||||
@@ -317,10 +317,10 @@ static int WriteFrame(AVFrame* pFrame)
|
|
||||||
// write interleaved audio frame
|
|
||||||
if (g_pAStream)
|
|
||||||
{
|
|
||||||
- VideoTime = (double)g_pVStream->pts.val*g_pVStream->time_base.num/g_pVStream->time_base.den;
|
|
||||||
+ VideoTime = (double)av_stream_get_end_pts(g_pVStream)*g_pVStream->time_base.num/g_pVStream->time_base.den;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
- AudioTime = (double)g_pAStream->pts.val*g_pAStream->time_base.num/g_pAStream->time_base.den;
|
|
||||||
+ AudioTime = (double)av_stream_get_end_pts(g_pAStream)*g_pAStream->time_base.num/g_pAStream->time_base.den;
|
|
||||||
ret = WriteAudioFrame();
|
|
||||||
}
|
|
||||||
while (AudioTime < VideoTime && ret);
|
|
||||||
@@ -526,14 +526,14 @@ AVWRAP_DECL int AVWrapper_Close()
|
|
||||||
avcodec_close(g_pVideo);
|
|
||||||
av_free(g_pVideo);
|
|
||||||
av_free(g_pVStream);
|
|
||||||
- av_free(g_pVFrame);
|
|
||||||
+ av_frame_free(&g_pVFrame);
|
|
||||||
}
|
|
||||||
if (g_pAStream)
|
|
||||||
{
|
|
||||||
avcodec_close(g_pAudio);
|
|
||||||
av_free(g_pAudio);
|
|
||||||
av_free(g_pAStream);
|
|
||||||
- av_free(g_pAFrame);
|
|
||||||
+ av_frame_free(&g_pAFrame);
|
|
||||||
av_free(g_pSamples);
|
|
||||||
fclose(g_pSoundFile);
|
|
||||||
}
|
|
|
@ -1,29 +1,26 @@
|
||||||
# Template file for 'hedgewars'
|
# Template file for 'hedgewars'
|
||||||
pkgname=hedgewars
|
pkgname=hedgewars
|
||||||
version=0.9.22
|
version=0.9.23
|
||||||
revision=5
|
revision=1
|
||||||
wrksrc="${pkgname}-src-${version}"
|
wrksrc="${pkgname}-src-${version}"
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DNOSERVER=1 -DDATA_INSTALL_DIR=/usr/share/${pkgname}
|
configure_args="-DNOSERVER=1 -DDATA_INSTALL_DIR=/usr/share/${pkgname}
|
||||||
-DPHYSFS_SYSTEM=1 -DCMAKE_VERBOSE_MAKEFILE=1 -DMINIMAL_FLAGS=1"
|
-DPHYSFS_SYSTEM=1 -DCMAKE_VERBOSE_MAKEFILE=1 -DMINIMAL_FLAGS=1"
|
||||||
hostmakedepends="lua51 pkg-config fpc qt-qmake"
|
hostmakedepends="lua51 pkg-config fpc qt-qmake qt-host-tools"
|
||||||
makedepends="qt-devel SDL_net-devel SDL_mixer-devel SDL_image-devel SDL_ttf-devel
|
makedepends="qt-devel SDL2_net-devel SDL2_mixer-devel SDL2_image-devel SDL2_ttf-devel
|
||||||
lua51-devel physfs-devel libpng-devel ffmpeg-devel libfreeglut-devel"
|
lua51-devel physfs-devel libpng-devel ffmpeg-devel libfreeglut-devel"
|
||||||
depends="hedgewars-data>=${version}_${revision} libfreeglut"
|
depends="hedgewars-data>=${version}_${revision} libfreeglut"
|
||||||
short_desc="Funny turn-based artillery game, featuring fighting Hedgehogs!"
|
short_desc="Funny turn-based artillery game, featuring fighting Hedgehogs!"
|
||||||
maintainer="Jakub Skrzypnik <jot.skrzyp@gmail.com>"
|
maintainer="Jakub Skrzypnik <jot.skrzyp@gmail.com>"
|
||||||
license="GPL-2"
|
license="GPL-2"
|
||||||
homepage="http://hedgewars.org"
|
homepage="http://www.hedgewars.org/"
|
||||||
distfiles="http://download.gna.org/hedgewars/hedgewars-src-${version}.tar.bz2"
|
distfiles="https://hedgewars.org/download/releases/hedgewars-src-${version}.tar.bz2"
|
||||||
checksum=b699c8971ff420c3edd6533527ae2e99040f1e79207c9140826945bcf0e62192
|
checksum=da2e4908042be56d1c0f3cb80a355bde7f0a49f675b050a03228cc3fb22aae89
|
||||||
nopie=yes
|
nopie_files="/usr/bin/hwengine"
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
nocross="Needs investigation: fails to link hwengine"
|
||||||
*-musl) broken="see fpc" ;;
|
|
||||||
armv7hf*) broken="https://build.voidlinux.eu/builders/armv7l_builder/builds/5994/steps/shell_3/logs/stdio" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -n "$CROSS_BUILD" ]; then
|
if [ -n "$CROSS_BUILD" ]; then
|
||||||
hostmakedepends+=" qt-host-tools qt-devel"
|
hostmakedepends+=" qt-devel"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue