diff options
-rw-r--r-- | PKGBUILD | 30 | ||||
-rw-r--r-- | x265-4.0.patch | 31 |
2 files changed, 50 insertions, 11 deletions
@@ -18,8 +18,16 @@ options=('lto') depends=(gd lua minizip qt5-base sdl2) makedepends=(cmake glu mesa-libgl ninja) optdepends=('ffmpeg: for recording') -source=(fceux-${pkgver}.tar.gz::"https://github.com/TASEmulators/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz") -b2sums=('4d7779af0afc5fa12d3734d282f92b105757d204c69091b4e3574e4ced6179c5e202b752225f412d68331c9866c63b626703b014835d398ca1262deeb0d32654') +source=(fceux-${pkgver}.tar.gz::"https://github.com/TASEmulators/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz" + x265-4.0.patch) +b2sums=('4d7779af0afc5fa12d3734d282f92b105757d204c69091b4e3574e4ced6179c5e202b752225f412d68331c9866c63b626703b014835d398ca1262deeb0d32654' + 'cba322a2d9aa02c1440dad5f91dfff219778b79f1373716f4f32b55a98198242ff191e43239d6bff2d9bcc52161b6e7b08356b11ee02c1c599578dc18ec7f8b2') + +prepare() { + cd ${pkgname}-${pkgver} + + patch -p1 -i ../x265-4.0.patch # Fix build with x265 4.0 +} build() { cd ${pkgname}-${pkgver} @@ -28,20 +36,20 @@ build() { export CFLAGS="$CFLAGS -O3 -fPIC" export CXXFLAGS="$CXXFLAGS -O3 -fPIC" - mkdir -p build - cd build - - cmake .. \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -G Ninja - ninja "$MAKEFLAGS" + cmake \ + -B build \ + -D CMAKE_INSTALL_PREFIX=/usr \ + -G Ninja \ + -S fceux + ninja -C build "$MAKEFLAGS" } package() { cd ${pkgname}-${pkgver} + DESTDIR="$pkgdir" ninja -C build install - install -d "${pkgdir}/usr/share/doc/${pkgname}" - cp -r ${srcdir}/${pkgname}-${pkgver}/documentation/* "${pkgdir}/usr/share/doc/${pkgname}/" + install -d "$pkgdir/usr/share/doc/${pkgname}" + cp -r ${srcdir}/${pkgname}-${pkgver}/documentation/* "$pkgdir/usr/share/doc/${pkgname}/" install -Dm644 ${srcdir}/${pkgname}-${pkgver}/changelog.txt \ "$pkgdir/usr/share/doc/$pkgname/changelog.txt" } diff --git a/x265-4.0.patch b/x265-4.0.patch new file mode 100644 index 0000000..64cdd44 --- /dev/null +++ b/x265-4.0.patch @@ -0,0 +1,31 @@ +diff --git a/src/drivers/Qt/AviRecord.cpp b/src/drivers/Qt/AviRecord.cpp +index e6a695d9..0b7d4c25 100644 +--- a/src/drivers/Qt/AviRecord.cpp ++++ b/src/drivers/Qt/AviRecord.cpp +@@ -388,7 +388,7 @@ namespace X265 + { + static x265_param *param = NULL; + static x265_picture *pic = NULL; +-static x265_picture pic_out; ++static x265_picture *pic_out; + static x265_encoder *hdl = NULL; + static x265_nal *nal = NULL; + static unsigned int i_nal = 0; +@@ -471,7 +471,7 @@ static int encode_frame( unsigned char *inBuf, int width, int height ) + flags = 0; + totalPayload = 0; + +- if ( IS_X265_TYPE_I(pic_out.sliceType) ) ++ if ( IS_X265_TYPE_I(pic_out->sliceType) ) + { + flags |= gwavi_t::IF_KEYFRAME; + } +@@ -504,7 +504,7 @@ static int close(void) + totalPayload = 0; + flags = 0; + +- if ( IS_X265_TYPE_I(pic_out.sliceType) ) ++ if ( IS_X265_TYPE_I(pic_out->sliceType) ) + { + flags |= gwavi_t::IF_KEYFRAME; + } |