From 12055fbcb833e0d3c6dc1eec1e88f22f3d811aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 17 Aug 2025 06:11:33 +0700 Subject: [PATCH] povray: fix musl build --- srcpkgs/povray/patches/musl.patch | 41 +++++++++++++++++++++++++++++-- srcpkgs/povray/template | 2 ++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/srcpkgs/povray/patches/musl.patch b/srcpkgs/povray/patches/musl.patch index 1abf7472a9c..78972db5f13 100644 --- a/srcpkgs/povray/patches/musl.patch +++ b/srcpkgs/povray/patches/musl.patch @@ -1,5 +1,5 @@ ---- a/vfe/vfesession.h 2019-01-30 18:47:18.816545460 +0100 -+++ b/vfe/vfesession.h 2019-01-30 18:47:18.816545460 +0100 +--- a/vfe/vfesession.h ++++ b/vfe/vfesession.h @@ -40,6 +40,8 @@ #include "base/image/colourspace.h" @@ -9,3 +9,40 @@ namespace vfe { using namespace pov_frontend; +--- a/source/base/image/image.cpp ++++ b/source/base/image/image.cpp +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + + // configbase.h must always be the first POV file included within base *.cpp files +@@ -2829,7 +2830,7 @@ class FileBackedPixelContainer + meta[0] = sizeof(pixel_type); + meta[1] = m_Width; + meta[2] = m_Height; +- if (lseek64(m_File, pos, SEEK_SET) != pos) ++ if (lseek(m_File, pos, SEEK_SET) != pos) + throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file write/seek failed at creation."); + if (write(m_File, &meta[0], (int) sizeof(size_type)*3) != (sizeof(size_type)*3)) + throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file write failed at creation."); +@@ -3000,7 +3001,7 @@ class FileBackedPixelContainer + #endif + pos = block * sizeof(pixel_type) * m_Blocksize; + int chunk = sizeof(pixel_type) * m_Blocksize; +- if (lseek64(m_File, pos, SEEK_SET) != pos) ++ if (lseek(m_File, pos, SEEK_SET) != pos) + throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file read/seek failed."); + int bytes = read(m_File, &m_Buffer[0], chunk); + if (bytes != (sizeof(pixel_type) * m_Blocksize)) +@@ -3023,7 +3024,7 @@ class FileBackedPixelContainer + + if (m_Dirty) { + pos = m_CurrentBlock * sizeof(pixel_type) * m_Blocksize; +- if (lseek64(m_File, pos, SEEK_SET) != pos) ++ if (lseek(m_File, pos, SEEK_SET) != pos) + throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file write/seek failed."); + if (write(m_File, &m_Buffer[0], (int) sizeof(pixel_type) * m_Blocksize) != (sizeof(pixel_type) * m_Blocksize)) + throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file write failed."); diff --git a/srcpkgs/povray/template b/srcpkgs/povray/template index a1d9943c5a0..958fb8a3401 100644 --- a/srcpkgs/povray/template +++ b/srcpkgs/povray/template @@ -21,6 +21,8 @@ checksum=53d11ebd2972fc452af168a00eb83aefb61387662c10784e81b63e44aa575de4 nocross="Builds fail on ARM architectures Logs are at https://travis-ci.org/void-linux/void-packages/builds/412583835." LDFLAGS+=" -Wl,-z,stack-size=1048576" +CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" pre_configure() { cd $wrksrc/unix