10 Star 0 Fork 2

src-openEuler / podofo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
podofo.spec 5.61 KB
一键复制 编辑 原始数据 按行查看 历史
misaka00251 提交于 2024-03-04 14:13 . Init package
%define _debugsource_template %{nil}
# We don't have mingw yet
%bcond_without mingw
#global pre rc1
Name: podofo
Version: 0.10.3
Release: 1
Summary: Tools and libraries to work with the PDF file format
License: LGPL-2.0-or-later
URL: https://github.com/podofo/podofo
Source0: https://github.com/podofo/podofo/archive/%{version}%{?pre:-%pre}/%{name}-%{version}%{?pre:-%pre}.tar.gz
# Fix header case
Patch0: podofo-case.patch
# Downstream patch for CVE-2019-20093
# https://sourceforge.net/p/podofo/tickets/75/
Patch1: podofo_CVE-2019-20093.patch
# We need to customize CMAKE_INSTALL_FULL_LIBDIR
# Otherwize it will install to /usr/local/%{_lib}
Patch5000: fix-build-on-openEuler.patch
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: cppunit-devel
BuildRequires: doxygen
BuildRequires: fontconfig-devel
BuildRequires: freetype-devel
BuildRequires: ghostscript
BuildRequires: libidn-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libxml2-devel
BuildRequires: lua-devel
BuildRequires: openssl-devel
BuildRequires: texlive-epstopdf-bin
BuildRequires: zlib-devel
%if %{without mingw}
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc-c++
BuildRequires: mingw32-fontconfig
BuildRequires: mingw32-freetype
BuildRequires: mingw32-libidn
BuildRequires: mingw32-libjpeg
BuildRequires: mingw32-libpng
BuildRequires: mingw32-libtiff
BuildRequires: mingw32-libxml2
BuildRequires: mingw32-openssl
BuildRequires: mingw32-zlib
BuildRequires: mingw64-filesystem >= 95
BuildRequires: mingw64-gcc-c++
BuildRequires: mingw64-fontconfig
BuildRequires: mingw64-freetype
BuildRequires: mingw64-libidn
BuildRequires: mingw64-libjpeg
BuildRequires: mingw64-libpng
BuildRequires: mingw64-libtiff
BuildRequires: mingw64-libxml2
BuildRequires: mingw64-openssl
BuildRequires: mingw64-zlib
%endif
Obsoletes: %{name}-libs < 0.10.0-1
Provides: %{name} < 0.10.0-1
Provides: %{name}-libs = %{version}-%{release}
%description
PoDoFo is a library to work with the PDF file format. The name comes from
the first letter of PDF (Portable Document Format). A few tools to work
with PDF files are already included in the PoDoFo package.
The PoDoFo library is a free, portable C++ library which includes classes
to parse PDF files and modify their contents into memory. The changes can be
written back to disk easily. The parser can also be used to extract
information from a PDF file (for example the parser could be used in a PDF
viewer). Besides parsing PoDoFo includes also very simple classes to create
your own PDF files. All classes are documented so it is easy to start writing
your own application using PoDoFo.
%package devel
Summary: Development files for %{name} library
Requires: openssl-devel%{?_isa}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files and documentation for the %{name} library.
%if %{without mingw}
%package -n mingw32-%{name}
Summary: MinGW Windows %{name} library
BuildArch: noarch
%description -n mingw32-%{name}
MinGW Windows %{name} library.
%package -n mingw32-%{name}-tools
Summary: Tools for the MinGW Windows %{name} library
BuildArch: noarch
Obsoletes: mingw32-%{name}-tools < 0.10.0-1
Provides: mingw32-%{name}-tools = %{version}-%{release}
%description -n mingw32-%{name}-tools
Tools for the MinGW Windows %{name} library.
%package -n mingw64-%{name}
Summary: MinGW Windows %{name} library
BuildArch: noarch
Obsoletes: mingw64-%{name}-tools < 0.10.0-1
Provides: mingw64-%{name}-tools = %{version}-%{release}
%description -n mingw64-%{name}
MinGW Windows %{name} library.
%package -n mingw64-%{name}-tools
Summary: Tools for the MinGW Windows %{name} library
BuildArch: noarch
%description -n mingw64-%{name}-tools
Tools for the MinGW Windows %{name} library.
%{?mingw_debug_package}
%endif
%prep
%autosetup -p1 -n %{name}-%{version}%{?pre:-%pre}
# disable timestamps in docs
echo "HTML_TIMESTAMP = NO" >> Doxyfile
%build
# Natve build
mkdir %{_target_platform}
pushd %{_target_platform}
cmake .. \
-DPODOFO_ENABLE_TOOLS=1
popd
cmake --build %{_target_platform} %{?_smp_mflags} -v
%if %{without mingw}
# MinGW build
%mingw_cmake -DPODOFO_ENABLE_TOOLS=1
%mingw_make_build
%endif
# Doc build
doxygen
# set timestamps on generated files to some constant
find doc/html -exec touch -r %{SOURCE0} {} \;
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%if %{without mingw}
%mingw_make_install
rm -rf %{buildroot}%{mingw32_datadir}
rm -rf %{buildroot}%{mingw64_datadir}
%mingw_debug_install_post
%endif
# Move incorrectly installed files
#mkdir -p %{buildroot}%{_libdir}/cmake/podofo/
#mv %{buildroot}%{_datadir}/podofo/*.cmake %{buildroot}%{_libdir}/cmake/podofo/
#rmdir %{buildroot}%{_datadir}/podofo/
%check
ctest
%files
%doc AUTHORS.md CHANGELOG.md README.md TODO.md
%license COPYING
%{_libdir}/*.so.0.10.3
%{_libdir}/*.so.2
%files devel
%doc doc/html examples
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/cmake/%{name}/
%{_libdir}/pkgconfig/lib%{name}.pc
%if %{without mingw}
%files -n mingw32-%{name}
%license COPYING
%{mingw32_bindir}/libpodofo.dll
%{mingw32_libdir}/libpodofo.dll.a
%{mingw32_libdir}/pkgconfig/libpodofo.pc
%{mingw32_includedir}/podofo/
%files -n mingw64-%{name}
%license COPYING
%{mingw64_bindir}/libpodofo.dll
%{mingw64_libdir}/libpodofo.dll.a
%{mingw64_libdir}/pkgconfig/libpodofo.pc
%{mingw64_includedir}/podofo/
%endif
%changelog
* Mon Mar 04 2024 misaka00251 <liuxin@iscas.ac.cn> - 0.10.3-1
- Init package
1
https://gitee.com/src-openeuler/podofo.git
git@gitee.com:src-openeuler/podofo.git
src-openeuler
podofo
podofo
master

搜索帮助