]> git.pld-linux.org Git - packages/bison.git/commitdiff
- bcond R: libtextstyle too, disable looking for libtexstyle if
authorMarcin Krol <hawk@tld-linux.org>
Sun, 28 Aug 2022 10:42:41 +0000 (12:42 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Sun, 28 Aug 2022 10:42:41 +0000 (12:42 +0200)
  no libtextyle was requested

bison.spec
no_libtextstyle.patch [new file with mode: 0644]

index 928384dd282744b9aa38a267e8699ea25321883e..8723b893f2db267ad3e7c7fa3dd21e81ce445f95 100644 (file)
@@ -17,6 +17,7 @@ Source0:      https://ftp.gnu.org/gnu/bison/%{name}-%{version}.tar.lz
 # Source0-md5: 26e76218c2a50a0dd307286d42eb0af9
 Source1:       %{name}.1.pl
 Patch0:                %{name}-info.patch
+Patch1:                no_libtextstyle.patch
 URL:           http://www.gnu.org/software/bison/
 BuildRequires: flex
 BuildRequires: gcc >= 5:3.2
@@ -31,7 +32,7 @@ BuildRequires:        rpmbuild(find_lang) >= 1.31
 BuildRequires: tar >= 1:1.22
 BuildRequires: texinfo >= 4.0
 Requires:      %{name}-runtime = %{version}-%{release}
-Requires:      libtextstyle >= 0.20.5
+%{?with_libtextstyle:Requires: libtextstyle >= 0.20.5}
 Requires:      m4 >= 1.4.6
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -107,10 +108,15 @@ zawierajacych parsery wygenerowane przez bisona.
 %prep
 %setup -q
 %patch0 -p1
+%{!?with_libtextstyle:%patch1 -p1}
 
 %{__rm} po/stamp-po
 
 %build
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure \
        --disable-silent-rules
 %{__make}
diff --git a/no_libtextstyle.patch b/no_libtextstyle.patch
new file mode 100644 (file)
index 0000000..d5aa64b
--- /dev/null
@@ -0,0 +1,21 @@
+diff -ur bison-3.8.2.orig/m4/libtextstyle-optional.m4 bison-3.8.2/m4/libtextstyle-optional.m4
+--- bison-3.8.2.orig/m4/libtextstyle-optional.m4       2021-03-10 06:41:25.000000000 +0100
++++ bison-3.8.2/m4/libtextstyle-optional.m4    2022-08-28 12:38:58.097300031 +0200
+@@ -21,14 +21,9 @@
+ AC_DEFUN([gl_LIBTEXTSTYLE_OPTIONAL],
+ [
+-  gl_LIBTEXTSTYLE([$1])
+-  if test $HAVE_LIBTEXTSTYLE = yes; then
+-    TEXTSTYLE_H=
+-  else
+-    TEXTSTYLE_H=textstyle.h
+-    AC_REQUIRE([AC_C_INLINE])
+-    AC_CHECK_FUNCS_ONCE([tcdrain])
+-  fi
++  TEXTSTYLE_H=textstyle.h
++  AC_REQUIRE([AC_C_INLINE])
++  AC_CHECK_FUNCS_ONCE([tcdrain])
+   AC_SUBST([TEXTSTYLE_H])
+   AM_CONDITIONAL([GL_GENERATE_TEXTSTYLE_H], [test -n "$TEXTSTYLE_H"])
+ ])
This page took 0.110578 seconds and 4 git commands to generate.