1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
|
#!/usr/bin/make -f
# debian/rules file for texlive-bin
export SHELL=/bin/bash
export CONFIG_SHELL=/bin/sh
#
# the configure code already checks a lot, but it does not catch
# all cases. We have now two ways to test for where to build.
# One by disabling on the other platforms, one by whitelisting
# and building only on some platforms.
LUAJIT_GOOD_ARCHS := amd64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 powerpc
# In case one wants to build with old automake (<< 1.13.1), the following
# variable has to be set. By default the debian/control requires high
# enough versions of automake and friends
#export AM_V_P=false
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
ifeq ($(DEB_HOST_ARCH), alpha)
export LDFLAGS = -Wl,--no-relax
endif
#
#
# architectures where icu related programs (xetex) have problems
# and core dump etc. Possible fix, but sub-optimal because slowing down
# programs
# TODO should be checked whether this still happens!
BROKEN_ICU_ARCHS := sparc64
ifneq (,$(findstring $(DEB_HOST_ARCH), $(BROKEN_ICU_ARCHS)))
export CFLAGS += -DU_IS_BIG_ENDIAN=0
export CXXFLAGS += -DU_IS_BIG_ENDIAN=0
else
endif
# for whitelisting good archs
ifeq (,$(filter $(DEB_HOST_ARCH), $(LUAJIT_GOOD_ARCHS)))
# it is not in the list of good archs -> disable luajittex
BUILDLUAJITTEX=--disable-luajittex --disable-mfluajit
WITHLUAJIT=no
else
# not necessary, but for completeness
BUILDLUAJITTEX=--enable-luajittex --enable-mfluajit
WITHLUAJIT=yes
endif
#
# it seems that ARM metafont segfaults due to a problem with armhf's malloc
# see Debian bug #678604
# Building in arm mode helps
#
ifeq ($(DEB_HOST_ARCH), armhf)
export CFLAGS += -marm
endif
# warning: if the --with autoreconf is removed then
# the patch debian/patches/debian-no-linked-scripts
# must be adapted to also patch the Makefile.in!
%:
dh $@ --with autoreconf --builddirectory Work
override_dh_autoreconf:
dh_autoreconf --as-needed
#
# poppler is used two times in TeX Live:
# once for pdftex/xetex
# once for luatex
# - the pdftex/xetex version is controlled via --with-system-xpdf
# - the luatex version is controlled via --with-system-poppler
# As poppler in Debian is too old for luatex, we need to use
# --without-system-poppler
# but keep build-dep on poppler and use
# --with-system-xpdf
# so that as much as possible is built from system libs.
#
# 20160222: retry with current poppler (Debian 0.38)
# 20160409: - libpng16 has entered unstable, try to build everything
# with system libraries
# - do not use system teckit as there is no response from
# the maintainer about schedule for upload to unstable
# --with-system-teckit \
#
# disable-largefile seems to break omegafonts, as they core dump
# leave it as is for now and see what else pops up
# --disable-largefile \
override_dh_auto_configure:
# we have to make sure that the mendex test case that is added
# by a patch is executable
chmod 0755 texk/mendexk/tests/mendex.test
# run out configure script
dh_auto_configure -- -C --prefix=/usr \
--datarootdir=/usr/share/texlive \
--disable-native-texlive-build \
--disable-missing \
--disable-linked-scripts \
--with-banner-add=/Debian \
--enable-shared \
--with-system-zlib \
--with-system-zzlib \
--with-system-potrace \
--with-system-graphite2 \
--with-system-harfbuzz \
--with-system-libgs \
--with-system-pixman \
--with-system-libpaper \
--with-system-zziplib \
--with-system-icu \
--with-system-gmp \
--with-system-mpfr \
--with-system-poppler \
--with-system-xpdf \
--with-system-freetype2 \
--with-freetype2-include=/usr/include/freetype2 \
--with-system-libpng \
--with-system-gd \
--with-system-cairo \
--with-x \
--with-mf-x-toolkit \
--with-xdvi-x-toolkit=xaw \
$(BUILDLUAJITTEX) \
--disable-lcdf-typetools \
--disable-biber \
--disable-dvipng \
--disable-ps2eps \
--disable-psutils \
--disable-t1utils \
--disable-cjkutils \
--disable-chktex \
--disable-dvidvi \
--disable-lacheck \
--disable-texdoctk \
--disable-ttf2pk \
--enable-ttf2pk2 \
--enable-ipc
override_dh_auto_build:
dh_auto_build
# build the java classes for tex4ht
mkdir -p Work/tex4ht-java
cd texk/tex4htk/java ; javac *.java */*.java */*/*.java -d ../../../Work/tex4ht-java
cd Work/tex4ht-java ; jar cvf ../tex4ht.jar .
override_dh_auto_install:
dh_auto_install -- DESTDIR=$(CURDIR)/debian/tmp
override_dh_install:
# remove .la files which we do not install, so that dh_install
# can work with --fail-missing
rm -f debian/tmp/usr/lib/*.la debian/tmp/usr/lib/*/*.la
# mv c-auto.h into arch-dependent include path
mkdir -p debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/kpathsea
mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/kpathsea/c-auto.h \
debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/kpathsea/
rmdir debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/kpathsea
dh_install --fail-missing --sourcedir=$(CURDIR)/debian/tmp
# replace xdvi wrapper shell script with perl variant to
# allow for opening of gz etc files
rm debian/texlive-binaries/usr/bin/xdvi
install -m 0755 debian/xdvi-pl debian/texlive-binaries/usr/bin/xdvi
# remove texlive directories, they should not be shipped here
rm -rf debian/texlive-binaries/usr/share/texlive
# but we ship the tex4ht.jar file here ...
# install tex4ht.jar
mkdir -p $(CURDIR)/debian/texlive-binaries/usr/share/texlive/texmf-dist/tex4ht/bin/
cp Work/tex4ht.jar $(CURDIR)/debian/texlive-binaries/usr/share/texlive/texmf-dist/tex4ht/bin/tex4ht.jar
# remove wrongly added info/dir.gz
rm -f debian/texlive-binaries/usr/share/info/dir*
# remove tlbuild info document, not needed
rm debian/texlive-binaries/usr/share/info/tlbuild.info*
rm debian/texlive-binaries/usr/share/man/man1/latex.1*
rm debian/texlive-binaries/usr/share/man/man1/pdflatex.1*
rm debian/texlive-binaries/usr/share/man/man1/lamed.1*
rm debian/texlive-binaries/usr/share/man/man1/amstex.1*
#
# remove tex4ht links, they are shipped with tl-htmlxml
for i in ht htcontext htlatex htmex httex httexi htxelatex htxetex mk4ht ; do \
rm debian/texlive-binaries/usr/bin/$$i ; \
done
# for alternatives treatment we rename usr/bin/bibtex to
# usr/bin/bibtex.original
mv debian/texlive-binaries/usr/bin/bibtex \
debian/texlive-binaries/usr/bin/bibtex.original
mv debian/texlive-binaries/usr/share/man/man1/bibtex.1 \
debian/texlive-binaries/usr/share/man/man1/bibtex.original.1
# find dangling symlinks in /usr/bin and error out if found
err=0 ; for i in `find debian/texlive-binaries/usr/bin -type l` ; do \
f=`realpath $$i` ; \
if [ ! -r "$$f" ] ; then \
echo "ERROR: dangling symbolic link $$f" ; \
err=1 ; \
fi ; \
done ; if [ $$err = 1 ] ; then exit 1 ; fi
override_dh_installdocs:
dh_installdocs
dh_installdocs -plibptexenc1 -plibptexenc-dev \
texk/ptexenc/COPYRIGHT texk/ptexenc/README
dh_installdocs -plibkpathsea6 -plibkpathsea-dev \
texk/kpathsea/AUTHORS \
texk/kpathsea/NEWS texk/kpathsea/PROJECTS \
texk/kpathsea/README
dh_installdocs -plibsynctex1 -plibsynctex-dev \
texk/web2c/synctexdir/README.txt \
texk/web2c/synctexdir/synctex_parser_readme.txt
#dh_installdocs -plibtexlua52 -plibtexlua52-dev \
# NOTHING TO INSTALL
ifeq ($(WITHLUAJIT), yes)
dh_installdocs -plibtexluajit2 -plibtexluajit-dev
endif
override_dh_installchangelogs:
dh_installchangelogs
dh_installchangelogs -plibkpathsea6 -plibkpathsea-dev \
texk/kpathsea/ChangeLog
dh_installchangelogs -plibptexenc1 -plibptexenc-dev \
texk/ptexenc/ChangeLog
dh_installchangelogs -plibsynctex1 -plibsynctex-dev \
texk/web2c/synctexdir/ChangeLog
dh_installchangelogs -plibtexlua52 -plibtexlua52-dev \
libs/lua52/lua52-PATCHES/ChangeLog
ifeq ($(WITHLUAJIT), yes)
dh_installchangelogs -plibtexluajit2 -plibtexluajit-dev \
libs/luajit/LuaJIT-PATCHES/ChangeLog
endif
override_dh_compress:
dh_compress -X.pdf
override_dh_makeshlibs:
dh_makeshlibs -plibkpathsea6
dh_makeshlibs -plibptexenc1
dh_makeshlibs -plibsynctex1
dh_makeshlibs -plibtexlua52
ifeq ($(WITHLUAJIT), yes)
dh_makeshlibs -plibtexluajit2
endif
SHLIBDEPS = -l debian/libkpathsea6/usr/lib/* \
-l debian/libptexenc1/usr/lib/* \
-l debian/libsynctex1/usr/lib/* \
-l debian/libtexlua52/usr/lib/*
ifeq ($(WITHLUAJIT), yes)
SHLIBDEPS += -l debian/libtexluajit2/usr/lib/*
endif
override_dh_shlibdeps:
dh_shlibdeps $(SHLIBDEPS)
override_dh_clean:
dh_clean -X.orig
|