* Force linking with libatomic.
[dgit import unpatched luametatex 2.10.08+ds-1+rpi1]
--- /dev/null
--- /dev/null
++luametatex for Debian
++--------------------
++
++I've patched upstreams CMakeLists.txt file to link dynamically with
++libmimalloc in Debian. The libcerf in the source package is patched
++by the luametatex maintainers, hence I use that instead of the
++Debian package.
++
++ -- Hilmar Preusse <hille42@web.de> Mon, 17 Apr 2023 09:33:47 +0200
--- /dev/null
--- /dev/null
++luametatex (2.10.08+ds-1+rpi1) trixie-staging; urgency=medium
++
++ * Force linking with libatomic.
++
++ -- Peter Michael Green <plugwash@raspbian.org> Fri, 22 Dec 2023 07:01:10 +0000
++
++luametatex (2.10.08+ds-1) unstable; urgency=medium
++
++ * Initial release. (Closes: #1034501)
++
++ -- Hilmar Preusse <hille42@web.de> Tue, 18 Jul 2023 00:02:20 +0200
--- /dev/null
--- /dev/null
++Source: luametatex
++Section: tex
++Priority: optional
++Maintainer: Debian TeX Task Force <debian-tex-maint@lists.debian.org>
++Uploaders: Hilmar Preusse <hille42@web.de>
++Rules-Requires-Root: no
++Build-Depends:
++ debhelper-compat (= 13),
++ cmake,
++ libmimalloc-dev
++Standards-Version: 4.6.2
++Homepage: https://github.com/contextgarden/luametatex
++Vcs-Browser: https://github.com/debian-tex/luametatex
++Vcs-Git: https://github.com/debian-tex/luametatex.git
++
++Package: luametatex
++Architecture: any
++Depends:
++ ${shlibs:Depends},
++ ${misc:Depends},
++Description: Next generation ConTeXt processing engine
++ The LuaMetaTeX program is a light weight variant of LuaTeX. This
++ program finds its origin in parts of TeX (the original program, eTeX
++ (some extensions), pdfTeX (more extensions) Aleph (based on Omega,
++ directions) and of course LuaTeX (lots of things).
++ .
++ This is a follow up on the LuaTeX project. The source is considered
++ part of the ConTeXt distribution and managed by the ConTeXt development
++ team and the ConTeXt user group. That way it can be guaranteed that the
++ engine and this TeX macro package work together as expected. The idea
++ is that users can easily compile the source themselves and that way
++ have a guaranteed long term (minimal) TeX based installation. Because
++ the management scripts are in Lua, only one binary is needed to serve
++ the ConTeXt distribution.
++ .
++ In the source code it was tried to stay close to the ancestors, LuaTeX,
++ pdfTeX, eTeX and TeX, but in the meantime due to additions there is
++ quite some diverge. There are new primitives and submechanisms, there
++ is more control over the inner workings, font handling is mostly
++ delegated to Lua and there is no built-in backend. The code base is
++ all-inclusive and has no (nor will have) dependencies on external
++ libraries. Performance and memory consumption have been optimized and
++ the additions (compared to LuaTeX) don’t have a negative impact.
--- /dev/null
--- /dev/null
++Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
++Source: https://github.com/contextgarden/luametatex
++Upstream-Name: luametatex
++Upstream-Contact: Hans Hagen <pragma@wxs.nl>
++Files-Excluded:
++ source/libraries/softposit/build/Linux-x86_64-GCC/softposit_test.a
++
++Files:
++ *
++Copyright:
++ 19xx - 2023 tex: Donald Knuth
++ 19xx - 20xx etex: Peter Breitenlohner, Phil Taylor and friends
++ 19xx - 20xx pdftex: Han The Thanh and friends
++ 1991 - 20xx omega: John Plaice and Yannis Haralambous
++ 19xx - 20xx aleph: Giuseppe Bilotta
++ 1994 - 20xx metapost: John Hobby, Taco Hoekwater, Luigi Scarso, Hans Hagen
++ 2018 - 2023 Hans Hagen <j.hagen@xs4all.nl>
++ 2018 - 2023 Wolfgang Schuster
++ 2018 - 2023 Mojca Miklavec
++ 2018 - 2023 Alan Braslau
++License: GPL-2+
++
++Files: debian/*
++Copyright: 2023 Hilmar Preusse <hille42@web.de>
++License: GPL-2+
++
++Files: source/libraries/avl/*
++Copyright: 2002 - 2012 Richard McGraw <dasnar@fastmail.fm>
++License: GPL-2+
++
++Files: source/libraries/decnumber/*
++Copyright: 2000 - 2009 Mike Cowlishaw <mfc@uk.ibm.com>
++License: ICU
++
++Files: source/libraries/hnj/*
++Copyright:
++ 1998 Raph Levien
++ 2001 ALTLinux, Moscow (http://www.alt-linux.org)
++ 2001 Peter Novodvorsky (nidd@cs.msu.su)
++License: GPL-2+
++
++Files: source/libraries/libcerf/*
++Copyright:
++ 2012 Steven G. Johnson
++ 2013 Joachim Wuttke
++License: MIT
++
++Files: source/libraries/mimalloc/*
++Copyright:
++ 2018 - 2021 Microsoft Corporation, Daan Leijen
++License: MIT
++
++Files: source/libraries/miniz/*
++Copyright:
++ 2013 - 2014 RAD Game Tools and Valve Software
++ 2010 - 2014 Rich Geldreich and Tenacious Software LLC
++License: MIT
++
++Files: source/libraries/pplib/*
++Copyright:
++ 2019 Paweł Jackowski <p.jackowski@gust.org.pl>
++License: PD
++
++Files: source/libraries/softposit/*
++Copyright:
++ 2017 - 2018 A*STAR.
++License: BSD-3
++
++Files: source/lua/*
++Copyright:
++ Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo
++License: GPL-2+
++
++Files: source/luacore/lua54/*
++Copyright:
++ 2007 - 2019 Lua.org, PUC-Rio, Brazil (http://www.lua.org)
++License: MIT
++
++Files: source/luacore/luapeg/*
++Copyright:
++ 2007 - 2019 Lua.org, PUC-Rio, Brazil (http://www.lua.org)
++ 2007 - 2019 Roberto Ierusalimschy
++License: MIT
++
++Files: source/luacore/luasocket/*
++Copyright:
++ 2004 - 2013 Diego Nehab
++License: MIT
++
++License: GPL-2+
++ This package is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++ .
++ This package is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++ .
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <https://www.gnu.org/licenses/>
++Comment:
++ On Debian systems, the complete text of the GNU General
++ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
++
++License: PD
++ Public domain software, produced as part of work done by the
++ United States Government & not subject to copyright in the US.
++ .
++ To the extent that any copyright protections may be considered to be held by
++ the authors of this software in some jurisdiction outside the United States,
++ the authors hereby waive those copyright protections and dedicate the
++ software to the public domain. Thus, this license may be considered
++ equivalent to Creative Commons 0: ”No Rights Reserved”.
++ .
++ Note that, according to Gnu.org, public domain is compatible with GPL.
++
++License: ICU
++ Permission is hereby granted, free of charge, to any person obtaining a
++ copy of this software and associated documentation files (the "Software"),
++ to deal in the Software without restriction, including without limitation
++ the rights to use, copy, modify, merge, publish, distribute, and/or sell
++ copies of the Software, and to permit persons to whom the Software is
++ furnished to do so, provided that the above copyright notice(s) and this
++ permission notice appear in all copies of the Software and that both the
++ above copyright notice(s) and this permission notice appear in supporting
++ documentation.
++ .
++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
++ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE
++ LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR
++ ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
++ IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
++ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ .
++ Except as contained in this notice, the name of a copyright holder shall not
++ be used in advertising or otherwise to promote the sale, use or other
++ dealings in this Software without prior written authorization of the
++ copyright holder.
++
++License: MIT
++ Permission is hereby granted, free of charge, to any person obtaining a copy
++ of this software and associated documentation files (the "Software"), to deal
++ in the Software without restriction, including without limitation the rights
++ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ copies of the Software, and to permit persons to whom the Software is
++ furnished to do so, subject to the following conditions:
++ .
++ The above copyright notice and this permission notice shall be included in all
++ copies or substantial portions of the Software.
++ .
++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ SOFTWARE.
++
++License: BSD-3
++ Copyright (c) The Regents of the University of California.
++ All rights reserved.
++ .
++ Redistribution and use in source and binary forms, with or without
++ modification, are permitted provided that the following conditions
++ are met:
++ 1. Redistributions of source code must retain the above copyright
++ notice, this list of conditions and the following disclaimer.
++ 2. Redistributions in binary form must reproduce the above copyright
++ notice, this list of conditions and the following disclaimer in the
++ documentation and/or other materials provided with the distribution.
++ 3. Neither the name of the University nor the names of its contributors
++ may be used to endorse or promote products derived from this software
++ without specific prior written permission.
++ .
++ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ SUCH DAMAGE.
--- /dev/null
--- /dev/null
++README.adoc
++luametatex.svg
--- /dev/null
--- /dev/null
++[import-orig]
++pristine-tar = True
++
++[push]
++pristine-tar = True
--- /dev/null
--- /dev/null
++.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
++.TH LuaMetaTeX "1" "April 2023" "LuaMetaTeX" "User Commands"
++.SH NAME
++luametatex \- Next generation ConTeXt procession engine.
++.SH SYNOPSIS
++.B luametatex
++\fI\,--lua=FILE \/\fR[\fI\,OPTION\/\fR]... [\fI\,TEXNAME\/\fR[\fI\,.tex\/\fR]] [\fI\,COMMANDS\/\fR]
++.br
++.B luametatex
++\fI\,--lua=FILE \/\fR[\fI\,OPTION\/\fR]... \fI\,\FIRST-LINE\/\fR
++.br
++.B luametatex
++\fI\,--lua=FILE \/\fR[\fI\,OPTION\/\fR]... \fI\,&FMT ARGS\/\fR
++.SH DESCRIPTION
++Run LuaMetaTeX on TEXNAME, usually creating TEXNAME.pdf. Any remaining COMMANDS are processed as luatex input, after TEXNAME is read.
++.PP
++Alternatively, if the first non\-option argument begins with a backslash,
++LuaMetaTeX interprets all non\-option arguments as an input line.
++.PP
++Alternatively, if the first non\-option argument begins with a &, the next word
++is taken as the FMT to read, overriding all else. Any remaining arguments are
++processed as above.
++.PP
++If no arguments or options are specified, prompt for input.
++.PP
++The following regular options are understood:
++.TP
++\fB\-\-credits\fR
++display credits and exit
++.TP
++\fB\-\-fmt\fR=\fI\,FORMAT\/\fR
++load the format file FORMAT
++.TP
++\fB\-\-help\fR
++display help and exit
++.TP
++\fB\-\-ini\fR
++be iniluametatex, for dumping formats
++.TP
++\fB\-\-jobname\fR=\fI\,STRING\/\fR
++set the job name to STRING
++.TP
++\fB\-\-lua\fR=\fI\,FILE\/\fR
++load and execute a lua initialization script
++.TP
++\fB\-\-version\fR
++display version and exit
++.PP
++Alternate behaviour models can be obtained by special switches
++.TP
++\fB\-\-luaonly\fR
++run a lua file, then exit
++.PP
++Loading libraries from Lua is blocked unless one explicitly permits it:
++.TP
++\fB\-\-permitloadlib\fR
++permit loading of external libraries (coming)
++.PP
++See the reference manual for more information about the startup process.
++.SH "REPORTING BUGS"
++Email bug reports to dev\-context@ntg.nl.
++.PP
++.br
++Execute 'luametatex \fB\-\-credits\fR' for credits and version details.
++.PP
++.br
++There is NO warranty. Redistribution of this software is covered by the terms
++of the GNU General Public License, version 2 or (at your option) any later
++version. For more information about these matters, see the file named COPYING
++and the LuaMetaTeX source.
++.PP
++.br
++Functionality : level 20230310
++.br
++Support : context@ntg.nl
++.br
++Copyright : The Lua(Meta)TeX Team(s) (2005\-2023+)
++.PP
++.br
++The LuaMetaTeX project is related to ConTeXt development. This macro package
++tightly integrates TeX and MetaPost in close cooperation with Lua. Updates will
++happen in sync with ConTeXt and when needed. Don't be fooled by unchanged dates:
++long term stability is the objective.
--- /dev/null
--- /dev/null
++debian/luametatex.1
--- /dev/null
--- /dev/null
++Description: Do not build mimalloc as static lib
++Author: Hilmar Preusse <hille42@web.de>
++Last-Update: 2023-04-17
++Forward: Patch is specific to Debian
++
++--- luametatex-2.10.07.orig/CMakeLists.txt
+++++ luametatex-2.10.07/CMakeLists.txt
++@@ -245,7 +245,7 @@
++ add_definitions(-DLUAMETATEX_USE_MIMALLOC=1)
++ # add_definitions(-DMIMALLOC_RESET_DELAY=250)
++ # set(luametatex_use_mimalloc 1)
++- include(cmake/mimalloc.cmake)
+++ #include(cmake/mimalloc.cmake)
++ endif()
++
++ include(cmake/tex.cmake)
--- /dev/null
--- /dev/null
++Description: Force linking with libatomic.
++Author: Peter Michael Green <plugwash@raspbian.org>
++
++--- luametatex-2.10.08+ds.orig/source/libraries/mimalloc/CMakeLists.txt
+++++ luametatex-2.10.08+ds/source/libraries/mimalloc/CMakeLists.txt
++@@ -31,7 +31,7 @@ option(MI_NO_PADDING "Force no us
++ # deprecated options
++ option(MI_CHECK_FULL "Use full internal invariant checking in DEBUG mode (deprecated, use MI_DEBUG_FULL instead)" OFF)
++ option(MI_INSTALL_TOPLEVEL "Install directly into $CMAKE_INSTALL_PREFIX instead of PREFIX/lib/mimalloc-version (deprecated)" OFF)
++-option(MI_USE_LIBATOMIC "Explicitly link with -latomic (on older systems) (deprecated and detected automatically)" OFF)
+++option(MI_USE_LIBATOMIC "Explicitly link with -latomic (on older systems) (deprecated and detected automatically)" ON)
++
++ include(CheckIncludeFiles)
++ include(GNUInstallDirs)
--- /dev/null
--- /dev/null
++Description: Do not strip binary after build.
++Author: Hilmar Preusse <hille42@web.de>
++Last-Update: 2023-04-17
++Forward: Patch is specific to Debian
++
++--- luametatex-2.10.07.orig/cmake/luametatex.cmake
+++++ luametatex-2.10.07/cmake/luametatex.cmake
++@@ -75,14 +75,3 @@
++ resolv
++ )
++ endif()
++-
++-if (DEFINED LMT_OPTIMIZE)
++- # we strip anyway
++-elseif (CMAKE_HOST_SOLARIS)
++- # no strip
++-elseif (CMAKE_C_COMPILER_ID MATCHES "GNU")
++- # -g -S -d : remove all debugging symbols & sections
++- # -x : remove all non-global symbols
++- # -X : remove any compiler-generated symbols
++- add_custom_command(TARGET luametatex POST_BUILD COMMAND ${CMAKE_STRIP} -g -S -d -x luametatex${CMAKE_EXECUTABLE_SUFFIX})
++-endif()
--- /dev/null
--- /dev/null
++#dynamic_linking.diff
++no_strip.diff
++force-libatomic.patch
--- /dev/null
--- /dev/null
++#!/usr/bin/make -f
++
++# See debhelper(7) (uncomment to enable).
++# Output every command that modifies files on the build system.
++#export DH_VERBOSE = 1
++
++
++# See FEATURE AREAS in dpkg-buildflags(1).
++#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
++
++# See ENVIRONMENT in dpkg-buildflags(1).
++# Package maintainers to append CFLAGS.
++#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
++# Package maintainers to append LDFLAGS.
++#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
++
++
++%:
++ dh $@
++
++
++#override_dh_auto_configure:
++# dh_auto_configure -- \
++# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
--- /dev/null
--- /dev/null
++3.0 (quilt)
--- /dev/null
--- /dev/null
++Bug-Database: https://github.com/contextgarden/luametatex/issues
++Bug-Submit: https://github.com/contextgarden/luametatex/issues/new
++Repository-Browse: https://github.com/contextgarden/luametatex
++Repository: https://github.com/contextgarden/luametatex.git
--- /dev/null
--- /dev/null
++# See uscan(1) for format.
++
++# Compulsory line, this is a version 4 file.
++version=4
++
++# PGP signature mangle, so foo.tar.gz has foo.tar.gz.sig.
++#opts="pgpsigurlmangle=s%$%.sig%"
++
++# HTTP site (basic).
++#http://example.com/downloads.html \
++# files/luametatex-([\d\.]+)\.tar\.gz
++
++# Uncomment to examine an FTP server.
++#ftp://ftp.example.com/pub/luametatex-(.*)\.tar\.gz
++
++# SourceForge hosted projects.
++#http://sf.net/luametatex/ luametatex-(.*)\.tar\.gz
++
++# GitHub hosted projects.
++#opts="filenamemangle=s%(?:.*?)?v?(@ANY_VERSION@@ARCHIVE_EXT@)%@PACKAGE@-$1%" \
++# https://github.com/contextgarden/luametatex/tags \
++# (?:.*?/)v?@ANY_VERSION@@ARCHIVE_EXT@
++opts=repack,repacksuffix=+ds,compression=gz,dversionmangle=s/\+ds// \
++ https://github.com/contextgarden/luametatex/tags \
++ (?:.*?/)v?@ANY_VERSION@@ARCHIVE_EXT@
++
++# PyPI.
++#https://pypi.debian.net/luametatex/luametatex-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
++
++# Direct Git.
++#opts="mode=git" http://git.example.com/luametatex.git \
++# refs/tags/v([\d\.]+)