%define _binary_payload w9.gzdio %define _source_payload w9.gzdio # need to bootstrap first # - xindy need clisp in main # - let asymptote be packaged separately, as the generated one is known # to not be fully functional %define enable_asymptote 0 %define enable_xindy 0 # in its own package %define enable_xdvik 0 %define enable_dvi2tty 0 %define with_system_poppler 1 %define with_system_dialog 1 %define with_system_icu 1 %define with_system_lcdf 0 %define with_system_psutils 1 %define with_system_t1lib 1 %define with_system_tex4ht 0 %define with_system_teckit 0 %define enable_shared 1 %define texmfbindir %{_bindir} %define texmfdir %{_datadir}/texmf %define texmfdistdir %{_datadir}/texmf-dist %define texmflocaldir %{_datadir}/texmf-local %define texmfextradir %{_datadir}/texmf-extra %define texmffontsdir %{_datadir}/texmf-fonts %define texmfprojectdir %{_datadir}/texmf-project %define texmfvardir %{_localstatedir}/lib/texmf %define texmfconfdir %{_sysconfdir}/texmf #----------------------------------------------------------------------- Name: texlive Version: 20120701 Release: %mkrel 6 Summary: The TeX formatting system Group: Publishing License: http://www.tug.org/texlive/LICENSE.TL URL: http://tug.org/texlive/ Source0: ftp://tug.org/historic/systems/texlive/2012/%{name}-%{version}-source.tar.xz Source1: ftp://tug.org/historic/systems/texlive/2012/%{name}-%{version}-source.tar.xz.sha256 Provides: tetex = %{version}-%{release} Provides: context = %{version}-%{release} Provides: dvipdfm = %{version}-%{release} Provides: dvips = %{version}-%{release} Provides: mfwin = %{version}-%{release} Provides: usrlocal = %{version}-%{release} %if %{enable_xdvik} Obsoletes: tetex-xdvi <= 3.1 Provides: xdvi = %{version}-%{release} Obsoletes: xdvi <= 22.86 Obsoletes: texlive-xdvi <= 2007 %endif Provides: afm = %{version}-%{release} Provides: dvilj = %{version}-%{release} Provides: dvipdfm = %{version}-%{release} Provides: tetex-dvips = %{version}-%{release} Provides: dviutils = %{version}-%{release} Provides: tetex-latex = %{version}-%{release} Provides: latex = %{version}-%{release} Obsoletes: kpathsea <= 2007 Obsoletes: pdfjam <= 1.21 Obsoletes: tetex <= 3.1 Obsoletes: tetex-context <= 3.1 Obsoletes: tetex-devel <= 3.1 Obsoletes: tetex-dvipdfm <= 3.1 Obsoletes: tetex-dvips <= 3.1 Obsoletes: tetex-dvips <= 3.1 Obsoletes: tetex-dvilj <= 3.0 Obsoletes: tetex-latex <= 3.1 Obsoletes: tetex-mfwin <= 3.1 Obsoletes: tetex-usrlocal <= 3.1 Obsoletes: texlive-afm <= 2007 Obsoletes: texlive-context <= 2007 Obsoletes: texlive-dvilj <= 2007 Obsoletes: texlive-dvipdfm <= 2007 Obsoletes: texlive-dvips <= 2007 Obsoletes: texlive-dviutils <= 2007 Obsoletes: texlive-latex <= 2007 Obsoletes: texlive-mfwin <= 2007 Obsoletes: texlive-fonts <= 2007 #----------------------------------------------------------------------- %if %{with_system_dialog} Requires: cdialog %endif Requires: ghostscript %if %{enable_asymptote} Requires: gv Requires: tkinter %endif %if %{with_system_lcdf} Requires: lcdf-typetoools %else Provides: lcdf-typetools = %{version} Obsoletes: lcdf-typetools <= 2.59-5 %endif %if %{with_system_psutils} Requires: psutils %endif %if %{with_system_teckit} Requires: teckit %endif %if %{with_system_tex4ht} Requires: tex4ht %else Provides: tex4ht = %{version} Obsoletes: tex4ht <= 1:1.0.2008_02_28_2058 %endif Conflicts: texlive-texmf < %{version} Requires(post): texlive-texmf = %{version} Requires: ruby #----------------------------------------------------------------------- BuildRequires: bison %if %{enable_xindy} BuildRequires: clisp BuildRequires: ffcall-devel %endif %if %{enable_asymptote} BuildRequires: fftw-devel BuildRequires: flex %endif BuildRequires: freetype-devel BuildRequires: fontconfig-devel BuildRequires: gd-devel %if %{enable_asymptote} BuildRequires: libgc-devel BuildRequires: libsigsegv-devel BuildRequires: ghostscript-dvipdf BuildRequires: gsl-devel BuildRequires: GL-devel %endif BuildRequires: libgd-devel %if %{with_system_poppler} BuildRequires: pkgconfig(poppler) %endif BuildRequires: libxaw-devel %if !%{with_system_dialog} BuildRequires: ncurses-devel %endif BuildRequires: png-devel %if %{with_system_t1lib} BuildRequires: t1lib-devel %endif %if %{with_system_teckit} BuildRequires: teckit-devel %endif %if %{with_system_icu} BuildRequires: icu-devel %endif %if %{enable_xindy} BuildRequires: texlive %endif %if %{enable_asymptote} BuildRequires: texinfo %endif BuildRequires: zziplib-devel #----------------------------------------------------------------------- Patch1: texlive-20110312-asymptote.patch Patch2: texlive-20110312-xdvi.patch Patch3: texlive-20120701-format-string.patch #----------------------------------------------------------------------- %description TeX Live is an easy way to get up and running with the TeX document production system. It provides a comprehensive TeX system. It includes all the major TeX-related programs, macro packages, and fonts that are free software, including support for many languages around the world. %files %defattr(-,root,root,-) %{texmfbindir}/* %dir %{texmfvardir} %dir %{texmfconfdir} #----------------------------------------------------------------------- %if %{enable_shared} ######################################################################## %define kpathsea_major 6 %define kpathsea %{mklibname kpathsea %{kpathsea_major}} %package -n %{kpathsea} Summary: Path searching library for TeX-related files Group: System/Libraries Provides: kpathsea = %{version}-%{release} %description -n %{kpathsea} Kpathsea implements generic path searching, configuration, and TeX-specific file searching. %files -n %{kpathsea} %defattr(-,root,root,-) %{_libdir}/libkpathsea.so.%{kpathsea_major} %{_libdir}/libkpathsea.so.%{kpathsea_major}.* #----------------------------------------------------------------------- %define kpathsea_devel %{mklibname -d kpathsea} %package -n %{kpathsea_devel} Summary: Kpathsea development files Group: Development/C Requires: kpathsea = %{version}-%{release} Provides: kpathsea-devel = %{version}-%{release} %description -n %{kpathsea_devel} Kpathsea implements generic path searching, configuration, and TeX-specific file searching. This package includes the kpathsea development files. %files -n %{kpathsea_devel} %defattr(-,root,root,-) %{_includedir}/kpathsea %{_libdir}/libkpathsea.la %{_libdir}/libkpathsea.so #----------------------------------------------------------------------- %define kpathsea_static_devel %{mklibname -d -s kpathsea} %package -n %{kpathsea_static_devel} Summary: Kpathsea development files Group: Development/C Requires: kpathsea-devel = %{version}-%{release} Provides: kpathsea-devel-static = %{version}-%{release} %description -n %{kpathsea_static_devel} Kpathsea implements generic path searching, configuration, and TeX-specific file searching. This package includes the static kpathsea library. %files -n %{kpathsea_static_devel} %defattr(-,root,root,-) %{_libdir}/libkpathsea.a #----------------------------------------------------------------------- %define ptexenc_major 1 %define ptexenc %{mklibname ptexenc %{ptexenc_major}} %package -n %{ptexenc} Summary: Library for Japanese pTeX Group: System/Libraries Provides: ptexenc = %{version}-%{release} %description -n %{ptexenc} ptexenc is a useful library for Japanese pTeX (which stands for publishing TeX, and is an extension of TeX by ASCII Co.) and its surrounding tools. %files -n %{ptexenc} %defattr(-,root,root,-) %{_libdir}/libptexenc.so.%{ptexenc_major} %{_libdir}/libptexenc.so.%{ptexenc_major}.* #----------------------------------------------------------------------- %define ptexenc_devel %{mklibname -d ptexenc} %package -n %{ptexenc_devel} Summary: Library for Japanese pTeX Group: Development/C Requires: ptexenc = %{version}-%{release} Provides: ptexenc-devel = %{version}-%{release} %description -n %{ptexenc_devel} ptexenc is a useful library for Japanese pTeX (which stands for publishing TeX, and is an extension of TeX by ASCII Co.) and its surrounding tools. This package includes the ptexenc development files. %files -n %{ptexenc_devel} %defattr(-,root,root,-) %{_includedir}/ptexenc %{_libdir}/libptexenc.la %{_libdir}/libptexenc.so #----------------------------------------------------------------------- %define ptexenc_static_devel %{mklibname -d -s ptexenc} %package -n %{ptexenc_static_devel} Summary: Library for Japanese pTeX Group: Development/C Requires: ptexenc-devel = %{version}-%{release} Provides: ptexenc-devel-static = %{version}-%{release} %description -n %{ptexenc_static_devel} ptexenc is a useful library for Japanese pTeX (which stands for publishing TeX, and is an extension of TeX by ASCII Co.) and its surrounding tools. This package includes the static ptexenc library. %files -n %{ptexenc_static_devel} %defattr(-,root,root,-) %{_libdir}/libptexenc.a ######################################################################## # enable_shared %endif #----------------------------------------------------------------------- %prep %setup -q -n %{name}-%{version}-source %if %{enable_asymptote} %patch1 -p1 %endif %patch2 -p1 %patch3 -p1 # setup default builtin values, added to paths.h from texmf.cnf perl -pi -e 's%^(TEXMFMAIN\s+= ).*%$1%{texmfdir}%;' \ -e 's%^(TEXMFDIST\s+= ).*%$1%{texmfdistdir}%;' \ -e 's%^(TEXMFLOCAL\s+= ).*%$1%{texmflocaldir}%;' \ -e 's%^(TEXMFSYSVAR\s+= ).*%$1%{texmfvardir}%;' \ -e 's%^(TEXMFSYSCONFIG\s+= ).*%$1%{texmfconfdir}%;' \ -e 's%^(TEXMFHOME\s+= ).*%$1\$HOME/texmf%;' \ -e 's%^(TEXMFVAR\s+= ).*%$1\$HOME/.texlive2011/texmf-var%;' \ -e 's%^(TEXMFCONFIG\s+= ).*%$1\$HOME/.texlive2011/texmf-config%;'\ -e 's%^(OSFONTDIR\s+= ).*%$1%{_datadir}/fonts%;' \ texk/kpathsea/texmf.cnf #----------------------------------------------------------------------- %build [ -d Work ] || mkdir Work pushd Work ln -sf ../configure . %configure2_5x \ --with-banner-add="/Mageia" \ --disable-native-texlive-build \ --enable-missing \ %if %{enable_shared} --enable-shared \ %else --disable-shared \ %endif %if %{enable_xindy} --enable-xindy \ %else --disable-xindy \ %endif %if %{enable_xdvik} --enable-xdvik \ %else --disable-xdvik \ %endif %if %{enable_dvi2tty} --enable-dvi2tty \ %else --disable-dvi2tty \ %endif --with-system-freetype \ --with-freetype-includes=%{_includedir}/freetype \ --with-system-freetype2 \ --with-freetype2-includes=%{_includedir}/freetype2 \ %if %{with_system_dialog} --disable-dialog \ %else --enable-dialog \ %endif %if %{with_system_psutils} --disable-psutils \ %else --enable-psutils \ %endif --with-system-gd \ %if %{with_system_lcdf} --disable-lcdf-typetools \ %endif --with-system-png \ %if %{with_system_t1lib} --with-system-t1lib \ --disable-t1utils \ %endif %if %{with_system_teckit} --disable-teckit \ --with-teckit-includes=%{_includedir}/teckit \ %endif %if %{with_system_tex4ht} --disable-tex4htk \ %endif %if %{with_system_icu} --with-system-icu \ %else --without-system-icu \ %endif %if %{with_system_poppler} --with-system-xpdf \ %else --without-system-xpdf \ %endif --with-system-zziplib %make popd %if %{enable_asymptote} pushd utils/asymptote %configure2_5x \ --enable-gc=system \ --enable-texlive-build \ --datadir=%{texmfdir} %make popd %endif #----------------------------------------------------------------------- %install pushd Work %makeinstall_std popd %if %{enable_asymptote} pushd utils/asymptote %makeinstall_std popd %endif mkdir -p %{buildroot}%{_datadir} for dir in texmf texmf-dist; do if [ -d %{buildroot}%{_prefix}/$dir ]; then rm -fr %{buildroot}%{_datadir}/$dir mv %{buildroot}%{_prefix}/$dir %{buildroot}%{_datadir} fi done mkdir -p %{buildroot}%{texmfvardir} mkdir -p %{buildroot}%{texmfconfdir} %if %{with_system_lcdf} # stray directory left rm -fr %{buildroot}%{_datadir}/lcdf-typetools-for-tex-live %else # openmpi has a program with the same name if [ -f %{buildroot}%{texmfbindir}/otfinfo ]; then mv -f %{buildroot}%{texmfbindir}/otfinfo{,-texlive} fi %endif pushd %{buildroot}%{texmfbindir} # missing symbolic links ln -sf aleph lamed ln -sf luatex dvilualatex ln -sf luatex lualatex ln -sf luatex dviluatex ln -sf pdftex amstex ln -sf pdftex cslatex ln -sf pdftex csplain ln -sf pdftex eplain ln -sf pdftex etex ln -sf pdftex latex ln -sf pdftex mex ln -sf pdftex mltex ln -sf pdftex mllatex ln -sf pdftex pdfcslatex ln -sf pdftex pdfcsplain ln -sf pdftex pdfetex ln -sf pdftex pdflatex ln -sf pdftex pdfmex ln -sf pdftex physe ln -sf pdftex phyzzx ln -sf pdftex utf8mex ln -sf pdftex texsis ln -sf ptex platex ln -sf mpost metafun ln -sf mpost mfplain ln -sf xetex xelatex # correct symlinks for file in *; do link=`readlink $file` || : if [ "x$link" != "x" ]; then ln -sf `echo $link | \ sed -e 's|\.\./.*texmf-dist/|%{texmfdistdir}/|' \ -e 's|\.\./.*texmf/|%{texmfdir}/|'` \ $file fi done %if %{with_system_dialog} ln -sf %{_bindir}/dialog tcdialog %endif %if %{enable_asymptote} ln -sf %{texmfdir}/asymptote/GUI/xasy.py xasy %endif # install scripts from texlive-texmf rm -f a2ping afm2afm arlatex authorindex autoinst bibexport \ bundledoc cachepic cmap2enc de-macro dviasm ebong e2pall \ epspdf epspdftk epstopdf fig4latex findhyph font2afm \ fragmaster ht htcontext htlatex htmex httex httexi htxelatex \ htxetex latex2man latexdiff latexdiff-vc latexmk latexrevise \ listings-ext.sh makeglossaries mathspic mk4ht mkgrkindex \ mkjobtexmf mkluatexfontdb mkt1font mptopdf ot2kpx pdf180 \ pdf270 pdf90 pdfannotextractor pdfatfi pdfbook pdfcrop \ pdfflip pdfjam pdfjam-pocketmod pdfjam-slides3up \ pdfjam-slides6up pdfjoin pdfnup pdfpun pdfthumb perltex \ pfm2kpx pkfix pkfix-helper ppower4 ps4pdf pst2pdf purifyeps \ repstopdf rpdfcrop rungs showglyphs simpdftex splitindex \ svn-multi texcount texdiff texdirflatten texdoc texdoctk \ texloganalyser thumbpdf tlmgr ulqda updmap vpe vpl2ovp \ vpl2vpl popd # use texmf data rm -fr %{buildroot}%{texmfdir} %{buildroot}%{texmfdistdir} # install manual pages and info files from texlive-texmf tarball rm -fr %{buildroot}%{_mandir} %{buildroot}%{_infodir} %if !%{enable_shared} # do not generate dynamic libraries and do not install static ones rm -fr %{buildroot}%{_libdir} rm -fr %{buildroot}%{_includedir} %endif #----------------------------------------------------------------------- %posttrans rm -f %{texmfdir}/ls-R %{texmfdistdir}/ls-R %{texmfbindir}/mktexlsr %{texmfdir} %{texmfdistdir} > /dev/null %{texmfbindir}/updmap-sys --syncwithtrees > /dev/null %{texmfbindir}/texconfig-sys init > /dev/null %{texmfbindir}/mtxrun --generate > /dev/null