File mingw32-texlive.spec of Package mingw32-texlive
#
# spec file for package mingw32-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: mingw32-texlive
Version: 20110705
Release: 0
Summary: MinGW Windows TeXLive
License: GPL-2.0+ and LPPL-1.3c
Group: Development/Libraries
Url: http://www.tug.org/texlive
Source: ftp://tug.org/texlive/historic/2011/texlive-20110705-source.tar.xz
Patch0: texlive-20110705-source-ctype.patch
Patch1: texlive-20110705-source-INPUT.patch
Patch2: texlive-20110705-source-header.patch
Patch3: texlive-20110705-source-texlinks.patch
Patch4: texlive-20110705-source-ft-install.patch
Patch5: texlive-20110705-source-getopt.patch
Patch6: texlive-20110705-source-ptexenc.patch
Patch7: texlive-20110705-source-freetypeconfig.patch
Patch8: c24218.patch
Patch9: texlive-20110705-source-offset.patch
#Patch10: texlive-20110705-source-icuconfig.patch
Patch11: texlive-20110705-source-icu.patch
Patch12: texlive-20110705-source-icu-win32.patch
Patch13: texlive-20110705-source-lcdf-typetools.patch
Patch14: texlive-20110705-source-gcc6.patch
Patch1000: texlive-20091011-source-wix.patch
BuildRequires: autoconf >= 2.68
#BuildRequires: mingw32-libicu-devel
BuildRequires: gcc-c++
#!BuildIgnore: post-build-checks
BuildRequires: mingw32-cross-gcc
BuildRequires: mingw32-cross-gcc-c++
BuildRequires: mingw32-cross-pkg-config
BuildRequires: mingw32-filesystem >= 25
BuildRequires: mingw32-fontconfig-devel
BuildRequires: mingw32-freetype-devel
BuildRequires: mingw32-libgs-devel
BuildRequires: mingw32-libpng-devel
BuildRequires: mingw32-libpoppler-devel
BuildRequires: mingw32-zlib-devel
BuildRequires: texlive-devel
BuildRequires: texlive-omegaware-bin
BuildRequires: time
BuildRequires: wixwine
BuildRequires: xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%_mingw32_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
%_mingw32_debug_package
%prep
%setup -q -n texlive-%{version}-source
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
#%%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch1000 -p1 -b .wix
%build
autoconf -f -i
cd texk/web2c && autoconf -f -i && cd ../..
build_options=""
# Cross compile options
build_options+=" --host=%{_mingw32_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 (mingw32-)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="%{_mingw32_prefix}" \
TL_BUILD_ENV="CFLAGS='%{_mingw32_cflags}' LDFLAGS='%{_mingw32_ldflags}' CXXFLAGS='%{_mingw32_cflags}'" \
./Build $build_options
cd Work
echo "Name: libkpathsea" > libkpathsea.pc
echo "Description: TeX path search library" >> libkpathsea.pc
echo "Version: %{version}" >> libkpathsea.pc
echo "" >> libkpathsea.pc
echo "prefix=%{_mingw32_prefix}" >> libkpathsea.pc
echo "Libs: -lkpathsea" >> libkpathsea.pc
echo "Cflags: -L%{_mingw32_bindir}" >> libkpathsea.pc
echo "Wixlibs=%{_mingw32_datadir}/wixlib/libkpathsea.wixlib" >> libkpathsea.pc
echo "Fualflags=-C libkpathsea -D libkpathsea" >> libkpathsea.pc
candle -o libkpathsea.wixobj ../libkpathsea.wxs
lit -o libkpathsea.wixlib -bf libkpathsea.wixobj
%install
cd Work && make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}%{_mingw32_libdir}/pkgconfig
cp libkpathsea.pc %{buildroot}%{_mingw32_libdir}/pkgconfig/libkpathsea.pc
mkdir -p %{buildroot}%{_mingw32_datadir}/wixlib
cp libkpathsea.wixlib %{buildroot}%{_mingw32_datadir}/wixlib/libkpathsea.wixlib
%files
%defattr(-,root,root)
%{_mingw32_prefix}
%exclude %{_mingw32_libdir}/libkpathsea.dll.a
%exclude %{_mingw32_includedir}/kpathsea
%exclude %{_mingw32_libdir}/libptexenc.dll.a
%exclude %{_mingw32_includedir}/ptexenc
%files devel
%defattr(-,root,root)
%{_mingw32_libdir}/libkpathsea.dll.a
%{_mingw32_includedir}/kpathsea
%{_mingw32_libdir}/libptexenc.dll.a
%{_mingw32_includedir}/ptexenc
%{_mingw32_libdir}/pkgconfig/libkpathsea.pc
%{_mingw32_datadir}/wixlib/libkpathsea.wixlib
%changelog