From f8be87697a4a03057cd420446b8af7796e379ec4 Mon Sep 17 00:00:00 2001 From: guoxiaoqi Date: Mon, 13 Jan 2020 22:26:31 +0800 Subject: [PATCH] build without documentation --- ...-Remove-invalid-pure_func-qualifiers.patch | 27 ----------------- nasm.spec | 29 +++++++++++++++---- 2 files changed, 23 insertions(+), 33 deletions(-) delete mode 100644 0001-Remove-invalid-pure_func-qualifiers.patch diff --git a/0001-Remove-invalid-pure_func-qualifiers.patch b/0001-Remove-invalid-pure_func-qualifiers.patch deleted file mode 100644 index 87ec601..0000000 --- a/0001-Remove-invalid-pure_func-qualifiers.patch +++ /dev/null @@ -1,27 +0,0 @@ -From d0dabb46a821b2506681f882af0d5696d2c2bade Mon Sep 17 00:00:00 2001 -From: Michael Simacek -Date: Thu, 8 Feb 2018 14:47:08 +0100 -Subject: [PATCH] Remove invalid pure_func qualifiers - ---- - include/nasmlib.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/nasmlib.h b/include/nasmlib.h -index 79e866b..c93cef0 100644 ---- a/include/nasmlib.h -+++ b/include/nasmlib.h -@@ -191,8 +191,8 @@ int64_t readstrnum(char *str, int length, bool *warn); - * seg_init: Initialise the segment-number allocator. - * seg_alloc: allocate a hitherto unused segment number. - */ --void pure_func seg_init(void); --int32_t pure_func seg_alloc(void); -+void seg_init(void); -+int32_t seg_alloc(void); - - /* - * many output formats will be able to make use of this: a standard --- -2.14.3 - diff --git a/nasm.spec b/nasm.spec index 51eabbb..a2555d7 100644 --- a/nasm.spec +++ b/nasm.spec @@ -1,14 +1,20 @@ +%global _module_build 1 + +%if 0%{?_module_build} +%bcond_with documentation +%else +%bcond_without documentation +%endif + Name: nasm Version: 2.13.03 -Release: 3 +Release: 4 Summary: The Netwide Assembler, a portable x86 assembler with Intel-like syntax License: BSD URL: http://www.nasm.us Source0: http://www.nasm.us/pub/nasm/releasebuilds/%{version}/%{name}-%{version}.tar.bz2 Source1: http://www.nasm.us/pub/nasm/releasebuilds/%{version}/%{name}-%{version}-xdoc.tar.bz2 -Patch1: 0001-Remove-invalid-pure_func-qualifiers.patch - BuildRequires: perl(Env) autoconf asciidoc xmlto gcc make git Provides: %{name}-rdoff @@ -22,13 +28,15 @@ format, includes linker, library manager, loader, and information dump. %package help Summary: Help files for NASM -BuildRequires: perl(Font::TTF::Font) perl(Sort::Versions) perl(File::Spec) +%if %{with documentation} +BuildRequires: perl(Font::TTF::Font) perl(File::Spec) +BuildRequires: perl(Sort::Versions) BuildRequires: adobe-source-sans-pro-fonts adobe-source-code-pro-fonts BuildRequires: ghostscript -BuildArch: noarch - Provides: %{name}-doc Obsoletes: %{name}-doc +%endif +BuildArch: noarch %description help Help files for %{name}, includes documentation in HTML, PDF, PostScript, @@ -40,8 +48,12 @@ and text formats. %build autoreconf %configure +%if %{with documentation} %make_build everything gzip -9f doc/nasmdoc.{ps,txt} +%else +make all %{?_smp_mflags} +%endif %install make INSTALLROOT=%{buildroot} install install_rdf @@ -62,12 +74,17 @@ make INSTALLROOT=%{buildroot} install install_rdf %{_bindir}/rdf2srec %files help +%if %{with documentation} %doc doc/html doc/nasmdoc.txt.gz doc/nasmdoc.ps.gz doc/nasmdoc.pdf +%endif %{_mandir}/man1/nasm* %{_mandir}/man1/ndisasm* %{_mandir}/man1/rd* %{_mandir}/man1/ld* %changelog +* Mon Jan 13 2020 openEuler BuildTeam - 2.13.03-4 +- build without documentation + * Mon Dec 09 2019 openEuler BuildTeam - 2.13.03-3 - Package Init -- Gitee