File mingw64-texlive.spec of Package mingw64-texlive
#
# spec file for package mingw64-texlive
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: mingw64-texlive
Version: 20230311
Release: 0
Summary: MinGW Windows TeXLive
License: GPL-2.0-or-later and LPPL-1.3c
Group: Development/Libraries
Url: http://www.tug.org/texlive
Source: ftp://tug.org/texlive/historic/2011/texlive-%{version}-source.tar.xz
Patch0: texlive-20230311-gcc13-compile-fix.patch
BuildRequires: autoconf >= 2.68
#BuildRequires: mingw64-libicu-devel
BuildRequires: gcc-c++
# for libs/luajit/native
%ifarch x86_64
BuildRequires: gcc-c++-32bit
%endif
#!BuildIgnore: post-build-checks
BuildRequires: mingw64-cross-gcc-c++
BuildRequires: mingw64-cross-pkg-config
BuildRequires: mingw64-fontconfig-devel
BuildRequires: mingw64-freetype-devel
BuildRequires: mingw64-libgs-devel
BuildRequires: mingw64-libpng-devel
BuildRequires: mingw64-libpoppler-devel
BuildRequires: mingw64-zlib-devel
BuildRequires: texlive-devel
BuildRequires: texlive-omegaware-bin
BuildRequires: time
BuildRequires: wine-binfmt-standalone
BuildRequires: xz
%_mingw64_package_header_debug
BuildArch: noarch
%if 0%{?suse_version} >= 1230
BuildRequires: texlive-tie-bin
%endif
%description
TeX Live is an easy way to get up and running with the TeX document
production system. It provides a comprehensive TeX system with binaries
for most flavors of Unix, including GNU/Linux, and also Windows.
It includes all the major TeX-related programs, macro packages, and fonts
that are free software, including support for many languages around the
world.
%package devel
Summary: The headers and library of the Kpathsea tools
Group: Development/Libraries
%description devel
This package provides include files and libraries to compile and link
applications against libkpathsea and libtexenc.
This package is not required for the use of TeX or LaTeX.
# debug package
%_mingw64_debug_package
%prep
%autosetup -p1 -n texlive-%{version}-source
# /usr/bin/install: cannot stat '../../../../texk/texlive/windows_mingw_wrapper/runscript.exe': No such file or directory
ln -s ../windows_wrapper/runscript.exe texk/texlive/windows_mingw_wrapper/runscript.exe
ln -s ../windows_wrapper/runscript.dll texk/texlive/windows_mingw_wrapper/runscript.dll
%build
autoconf -f -i
cd texk/web2c && autoconf -f -i && cd ../..
build_options=""
# Cross compile options
build_options+=" --host=%{_mingw64_host}"
build_options+=" --build=%{_build}"
# This seems to be the right thing to do according to README.config
build_options+=" --disable-native-texlive-build"
# We always do this in the windows:mingw project
build_options+=" --disable-static"
build_options+=" --enable-shared"
# We do not have (mingw64-)ncurses yet, which is required to build dialog
build_options+=" --disable-dialog"
# Use system libraries
#build_options+=" --with-system-libgs"
#build_options+=" --with-system-freetype2"
#build_options+=" --with-system-poppler"
#build_options+=" --with-system-libpng"
#build_options+=" --with-system-zlib"
##build_options+=" --with-system-icu"
# TODO: Use more system libraries
# e.g.
#build_options+=" --with-system-teckit"
#build_options+=" --with-system-graphite"
#build_options+=" --with-system-zziplib"
#build_options+=" --with-system-xpdf"
#build_options+=" --with-system-gd"
#build_options+=" --with-system-freetype"
#build_options+=" --with-system-t1lib"
TL_TARGET="all" \
TL_INSTALL_DEST="%{_mingw64_prefix}" \
TL_BUILD_ENV="CFLAGS='%{_mingw64_cflags} -Wno-return-type' LDFLAGS='%{_mingw64_ldflags}' CXXFLAGS='%{_mingw64_cflags}'" \
./Build $build_options
%install
cd Work && make DESTDIR=%{buildroot} install
# fix warning using invalid shebang
find %{buildroot}%{_mingw64_datadir}/texmf-dist/scripts -type f -exec chmod a-x {} \;
find %{buildroot}%{_mingw64_bindir} -type f -name '*.bat' -exec chmod a-x {} \;
%files
%defattr(-,root,root)
%{_mingw64_prefix}
%exclude %{_mingw64_libdir}/libkpathsea.dll.a
%exclude %{_mingw64_includedir}/kpathsea
%exclude %{_mingw64_libdir}/libptexenc.dll.a
%exclude %{_mingw64_includedir}/ptexenc
%files devel
%defattr(-,root,root)
%{_mingw64_libdir}/libkpathsea.dll.a
%{_mingw64_includedir}/kpathsea
%{_mingw64_libdir}/libptexenc.dll.a
%{_mingw64_includedir}/ptexenc
%changelog