# figure out why --debugger:native does not work with *-debuginfo packets %define __nim_common_opts -d:release %define __nim_harden_config() \ for file in %*; do \ echo "gcc.options.always %= \\"\\${gcc.options.always} ${CFLAGS:-%optflags}\\"" >> $file; \ echo "gcc.options.linker %= \\"\\${gcc.options.linker} ${LDFLAGS:-%__global_ldflags}\\"" >> $file; \ done %global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) %global bashcomproot %(dirname %{bashcompdir} 2>/dev/null) %global rev 2.g4164ec4f8 Name: nim Version: 0.18.0 Release: %{rev}%{?dist} Summary: Statically typed, imperative programming language # compiler is MIT, nimble package manager is BSD License: MIT and BSD URL: https://nim-lang.org ExclusiveArch: %{nim_arches} Source0: https://avsej.fedorapeople.org/nim.src/%{version}-%{rev}/nim-%{version}.tar.xz Source1: nim.1 Source2: nimgrep.1 Source3: nimble.1 Source4: nimsuggest.1 Patch0: 0001-allow-to-override-directories-in-install-script.patch Patch1: 0002-use-_datadir-for-platform-independent-library-path.patch Patch6: 0006-use-versioned-source-links-in-docs.patch # https://github.com/nim-lang/Nim/issues/6747 Patch7: 0007-fix-floats-in-tests.patch Patch8: 0008-fix-compiler-binary-lookup-in-docgen.patch Patch9: 0009-allow-to-pass-extra-compiler-options-for-tools.patch # Default gcc options in nim.conf include hardened specs Requires: redhat-rpm-config # Currently compiler uses C sources as intermediate representation Requires: gcc BuildRequires: nim-srpm-macros BuildRequires: gcc openssl-devel BuildRequires: pkgconfig(bash-completion) # test dependencies BuildRequires: nodejs-devel BuildRequires: gc-devel # doc dependencies BuildRequires: tex(latex) BuildRequires: tex(geometry.sty) BuildRequires: tex(inputenc.sty) BuildRequires: tex(fontenc.sty) BuildRequires: tex(graphicx.sty) BuildRequires: tex(lmodern.sty) BuildRequires: tex(courier.sty) BuildRequires: tex(lmodern.sty) BuildRequires: tex(tabularx.sty) BuildRequires: tex(hyperref.sty) %if ! (0%{?rhel} && 0%{?rhel} <= 7) Recommends: %{name}-tools%{_isa} = %{version}-%{release} # for using --gc:boehm Suggests: gc-devel Suggests: %{name}-docs = %{version}-%{release} %endif %description Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority). %package tools Summary: Tools for Nim programming language %description tools Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority). This package provides various tools, which help Nim programmers. %package doc Summary: Documentation for Nim programming language BuildArch: noarch %description doc Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority). This package provides documentation and reference manual for the language and its standard library. %prep %autosetup -p1 %build # build bootstrap compiler ./build.sh %__nim_harden_config compiler/nim.cfg %__nim_harden_config config/nim.cfg # build the koch management tool ./bin/nim compile %{__nim_common_opts} koch # build a new version of the compiler ./koch boot %{__nim_common_opts} -d:useLinenoise # build tools ./koch tools %{__nim_common_opts} # generate documentation ./koch web --onlyDocs sed -i '/ - 0.18.0-2.g4164ec4f8 - Update development package * Wed Jan 3 2018 Sergey Avseyev - 0.17.2-5 - Revert back to makefile for bootstrap compiler. * Wed Jan 3 2018 Sergey Avseyev - 0.17.2-4 - Update runtime dependencies, and use build.sh instead of makefile to build bootstrap compiler. * Fri Dec 1 2017 Sergey Avseyev - 0.17.2-3 - Do not load remote fonts in local HTML documentation * Sat Nov 18 2017 Sergey Avseyev - 0.17.2-2 - Generate and install PDF documentation * Tue Sep 26 2017 Sergey Avseyev - 0.17.2-1 - Initial package