From 07312d764db836206feca35ba67e2b9c57ac95be2f229d3f32aa38fcd4039217 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 22 Aug 2023 09:36:47 +0000 Subject: [PATCH] osc copypac from project:devel:languages:haskell:ghc-9.4.x package:texmath revision:12, using keep-link OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/texmath?expand=0&rev=146 --- texmath.cabal | 182 ++++++++++++++++++++++++++++++++++++++++++++++++ texmath.changes | 6 ++ texmath.spec | 2 + 3 files changed, 190 insertions(+) create mode 100644 texmath.cabal diff --git a/texmath.cabal b/texmath.cabal new file mode 100644 index 0000000..c4d36b0 --- /dev/null +++ b/texmath.cabal @@ -0,0 +1,182 @@ +Name: texmath +Version: 0.12.8 +x-revision: 1 +Cabal-Version: >= 1.10 +Build-type: Simple +Synopsis: Conversion between math formats. +Description: The texmath library provides functions to read + and write TeX math, presentation MathML, and OMML (Office + Math Markup Language, used in Microsoft Office). Support is also + included for converting math formats to Gnu eqn, typst, and pandoc's + native format (allowing conversion, via pandoc, to a variety of + different markup formats). The TeX reader supports basic LaTeX + and AMS extensions, and it can parse and apply LaTeX macros. + (See for a live demo of + bidirectional conversion between LaTeX and MathML.) + . + The package also includes several utility modules which may be + useful for anyone looking to manipulate either TeX math or + MathML. For example, a copy of the MathML operator dictionary is + included. + . + Use the @executable@ flag to install a standalone + executable, @texmath@, that converts formulas from one + format to another. (Use the @--help@ flag for a description of all + functionality). + . + Use the @server@ flag to install a web server, @texmath-server@, + that exposes a JSON API allowing conversion of individual + formulas and batches of formulas. + +Category: Text +Stability: Experimental +License: GPL-2 +License-File: LICENSE +Author: John MacFarlane, Matthew Pickering +Maintainer: jgm@berkeley.edu +Homepage: http://github.com/jgm/texmath +Extra-source-files: README.markdown + changelog + man/texmath.1.md + man/Makefile + man/man1/texmath.1 + server/texmath.html + test/writer/mml/*.test + test/writer/omml/*.test + test/writer/tex/*.test + test/writer/typst/*.test + test/writer/eqn/*.test + test/reader/mml/*.test + test/reader/tex/*.test + test/reader/omml/*.test + test/regression/*.test + test/roundtrip/*.native + lib/totexmath/unicodetotex.hs + lib/totexmath/unimathsymbols.txt + lib/totexmath/Makefile + lib/mmldict/operatorDictionary.xsl + lib/mmldict/generateMMLDict.hs + lib/mmldict/Makefile + lib/tounicode/mkUnicodeTable.hs + lib/tounicode/Makefile + +Source-repository head + type: git + location: git://github.com/jgm/texmath.git + +Flag executable + description: Compile test executable. + default: False + +Flag server + description: Compile webserver. + default: False + +Library + Build-depends: base >= 4.11 && < 5, + syb >= 0.4.2 && < 0.8, + xml, + parsec >= 3, + containers, + pandoc-types >= 1.20 && < 1.24, + mtl >= 2.2.1, + text, + typst-symbols == 0.1.2, + split + + Exposed-modules: Text.TeXMath, + Text.TeXMath.Types, + Text.TeXMath.TeX, + Text.TeXMath.Readers.TeX, + Text.TeXMath.Readers.TeX.Macros, + Text.TeXMath.Readers.MathML, + Text.TeXMath.Readers.MathML.MMLDict, + Text.TeXMath.Readers.MathML.EntityMap, + Text.TeXMath.Readers.OMML, + Text.TeXMath.Writers.MathML, + Text.TeXMath.Writers.OMML, + Text.TeXMath.Writers.Pandoc, + Text.TeXMath.Writers.TeX, + Text.TeXMath.Writers.Typst, + Text.TeXMath.Writers.Eqn, + Text.TeXMath.Unicode.ToUnicode, + Text.TeXMath.Unicode.ToTeX, + Text.TeXMath.Unicode.Fonts + Text.TeXMath.Shared + Other-modules: Text.TeXMath.Readers.TeX.Commands + Paths_texmath + if impl(ghc >= 6.12) + Ghc-Options: -Wall -fno-warn-unused-do-bind + else + Ghc-Options: -Wall + Ghc-Prof-Options: -fprof-auto-exported + Default-Language: Haskell2010 + Hs-Source-Dirs: src + +Executable texmath + Default-Language: Haskell2010 + Main-is: texmath.hs + Other-Modules: Paths_texmath + Hs-Source-Dirs: extra + if impl(ghc >= 6.12) + Ghc-Options: -Wall -fno-warn-unused-do-bind + else + Ghc-Options: -Wall + Ghc-Prof-Options: -fprof-auto-exported + if flag(executable) + Buildable: True + Build-Depends: base >= 4.11 && < 5, + texmath, + xml, + pandoc-types >= 1.20 && < 1.24, + aeson, + bytestring, + text, + pretty-show, + network-uri >= 2.6 + else + Buildable: False + +Executable texmath-server + Default-Language: Haskell2010 + Main-is: Main.hs + Hs-Source-Dirs: server + if impl(ghc >= 6.12) + Ghc-Options: -Wall -threaded -fno-warn-unused-do-bind + else + Ghc-Options: -Wall -threaded + Ghc-Prof-Options: -fprof-auto-exported + if flag(server) + Buildable: True + Build-Depends: base >= 4.8 && < 5 + , texmath + , aeson + , text + , xml + , servant-server + , wai + , wai-logger + , warp + , optparse-applicative + , safe + + else + Buildable: False + +Test-Suite test-texmath + Type: exitcode-stdio-1.0 + Main-Is: test-texmath.hs + Hs-Source-Dirs: test + Build-Depends: base >= 4.11 && < 5, + texmath, + directory > 1.2.5, + filepath, + pretty-show, + bytestring, + xml, + text, + tasty, + tasty-golden, + tagged + Default-Language: Haskell2010 + Ghc-Options: -Wall -threaded diff --git a/texmath.changes b/texmath.changes index 1185278..b3f935e 100644 --- a/texmath.changes +++ b/texmath.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Aug 19 16:30:11 UTC 2023 - Peter Simons + +- Update texmath to version 0.12.8 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + ------------------------------------------------------------------- Mon Jun 5 23:38:20 UTC 2023 - Peter Simons diff --git a/texmath.spec b/texmath.spec index cffdeb1..e40f2ef 100644 --- a/texmath.spec +++ b/texmath.spec @@ -26,6 +26,7 @@ Summary: Conversion between math formats License: GPL-2.0-or-later URL: https://hackage.haskell.org/package/%{name} Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz +Source1: https://hackage.haskell.org/package/%{name}-%{version}/revision/1.cabal#/%{name}.cabal BuildRequires: chrpath BuildRequires: ghc-Cabal-devel BuildRequires: ghc-aeson-devel @@ -126,6 +127,7 @@ This package provides the Haskell %{pkg_name} profiling library. %prep %autosetup +cp -p %{SOURCE1} %{name}.cabal %build %define cabal_configure_options -fexecutable