podofo: update to 0.10.4

This commit is contained in:
Maksim Bondarenkov 2024-11-12 11:53:43 +03:00 committed by GitHub
parent 247dbb16e9
commit 3a1db7aacb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 17 additions and 58 deletions

1
mingw-w64-podofo/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/mingw-build-tools.patch

View File

@ -4,7 +4,7 @@ _realname=podofo
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
$([[ $MINGW_PACKAGE_PREFIX == *-clang-* ]] && echo "${MINGW_PACKAGE_PREFIX}-${_realname}-tools"))
pkgver=0.10.3
pkgver=0.10.4
pkgrel=1
pkgdesc="A C++ library to work with the PDF file format (mingw-w64)"
arch=('any')
@ -29,20 +29,18 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-pkgconf")
source=("https://github.com/podofo/podofo/archive/${pkgver}/${_realname}-${pkgver}.tar.gz"
"fix-export.patch"
"fix-redefinitions.patch"
"mingw-build-tools.patch")
sha256sums=('4be2232643f9e9dd7fbb02894d5a0394c3ca2826aab179654c2cc751074825ec'
'5d418a1978ee43f384cb11dad2f6010ee0fec8c5b9987d1bfc659e72e3527b3b'
'98a936f042c1a5ba9a3c8c89c4384444fc6bf47a7c5ce59de551cce225eac719'
'21b55c4abef4466354c85207235e94f0ce1de7caf6a76a88650cfc80580550a0')
"mingw-build-tools.patch::https://github.com/podofo/podofo/pull/155.patch"
"fix-redefinitions.patch")
sha256sums=('6b1b13cdfb2ba5e8bbc549df507023dd4873bc946211bc6942183b8496986904'
'dd85ee9e8b89fabfdad745d67e97bab4bed4734e3535ad1753361a35c32681ab'
'98a936f042c1a5ba9a3c8c89c4384444fc6bf47a7c5ce59de551cce225eac719')
prepare() {
cd "${_realname}-${pkgver}"
patch -p1 -i "${srcdir}/fix-export.patch"
# https://github.com/podofo/podofo/issues/152
patch -p1 -i "${srcdir}/fix-redefinitions.patch"
# https://github.com/podofo/podofo/pull/155
patch -p1 -i "${srcdir}/mingw-build-tools.patch"
}
@ -70,33 +68,28 @@ build() {
export CFLAGS+=" -Wno-deprecated-declarations"
export CXXFLAGS+=" -Wno-deprecated-declarations"
mkdir -p "${srcdir}/build-${MSYSTEM}-static" && cd "${srcdir}/build-${MSYSTEM}-static"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake.exe \
"${_cmake_opts[@]}" \
-DPODOFO_BUILD_STATIC=ON \
../${_realname}-${pkgver}
-S ${_realname}-${pkgver} \
-B "build-${MSYSTEM}-static"
${MINGW_PREFIX}/bin/cmake --build .
mkdir -p "${srcdir}/build-${MSYSTEM}-shared" && cd "${srcdir}/build-${MSYSTEM}-shared"
${MINGW_PREFIX}/bin/cmake --build "build-${MSYSTEM}-static"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake.exe \
"${_cmake_opts[@]}" \
-DPODOFO_BUILD_STATIC=OFF \
../${_realname}-${pkgver}
-S ${_realname}-${pkgver} \
-B "build-${MSYSTEM}-shared"
${MINGW_PREFIX}/bin/cmake --build .
${MINGW_PREFIX}/bin/cmake --build "build-${MSYSTEM}-shared"
}
package_podofo() {
cd "${srcdir}/build-${MSYSTEM}-static"
DESTDIR=${pkgdir} ${MINGW_PREFIX}/bin/cmake --install .
cd "${srcdir}/build-${MSYSTEM}-shared"
DESTDIR=${pkgdir} ${MINGW_PREFIX}/bin/cmake --install .
DESTDIR=${pkgdir} ${MINGW_PREFIX}/bin/cmake --install "build-${MSYSTEM}-static"
DESTDIR=${pkgdir} ${MINGW_PREFIX}/bin/cmake --install "build-${MSYSTEM}-shared"
if [[ $MINGW_PACKAGE_PREFIX == *-clang-* ]]; then
mkdir -p "dest${MINGW_PREFIX}/bin"
@ -105,13 +98,11 @@ package_podofo() {
}
package_podofo-tools() {
cd "${srcdir}/build-${MSYSTEM}-shared"
pkgdesc+=" (Tools)"
depends=("${MINGW_PACKAGE_PREFIX}-podofo=${pkgver}-${pkgrel}")
mv dest/* "${pkgdir}"
install -Dm644 -t "${pkgdir}${MINGW_PREFIX}/share/man/man1/" "${srcdir}/${_realname}-${pkgver}"/man/*.1
install -Dm644 -t "${pkgdir}${MINGW_PREFIX}/share/man/man1/" "${_realname}-${pkgver}"/man/*.1
}
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;

View File

@ -1,22 +0,0 @@
--- a/src/podofo/main/PdfXRef.h
+++ b/src/podofo/main/PdfXRef.h
@@ -22,7 +22,7 @@ class OutputStreamDevice;
*
* This is an internal class of PoDoFo used by PdfWriter.
*/
-class PdfXRef
+class PODOFO_API PdfXRef
{
protected:
struct XRefItem
--- a/src/podofo/main/PdfXRefStream.h
+++ b/src/podofo/main/PdfXRefStream.h
@@ -23,7 +23,7 @@ class PdfIndirectObjectList;
*
* This is an internal class of PoDoFo used by PdfWriter.
*/
-class PdfXRefStream : public PdfXRef
+class PODOFO_API PdfXRefStream : public PdfXRef
{
public:
/** Create a new XRef table

View File

@ -1,11 +0,0 @@
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -9,6 +9,8 @@ add_subdirectory(private)
if (MSVC)
# Force requirement for unicode entry point
add_link_options(/ENTRY:wmainCRTStartup)
+elseif (MINGW)
+ add_link_options(-municode)
else()
# TODO: Remove me when all the tools are cleaned of use of C functions
add_compile_options(-Wno-deprecated-declarations)