[packages/flex] Up to 2.7.11
arekm
arekm at pld-linux.org
Fri Nov 27 21:30:06 CET 2026
commit c47f8ff60d2abb04df1e1d464574704c2089e23e
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Nov 27 14:33:37 2026 +0100
Up to 2.7.11
flex-build.patch | 10 ----------
flex-rh1389575.patch | 39 ---------------------------------------
flex.spec | 50 +++++++++++++++++---------------------------------
3 files changed, 17 insertions(+), 82 deletions(-)
---
diff --git a/flex.spec b/flex.spec
index 013d931..b257530 100644
--- a/flex.spec
+++ b/flex.spec
@@ -4,6 +4,10 @@
# so it would require large cleanup of other projects;
# - when some code wants yywrap(), but no main(), using shared libfl is NOT POSSIBLE.
# Thus, shared libfl would be of little use.
+#
+# Conditional build:
+%bcond_without tests # build without tests
+#
Summary: GNU fast lexical analyzer generator
Summary(de.UTF-8): GNU - schneller lexikalischer Analysegenerator
Summary(es.UTF-8): Generador rápido de analizadores léxicos de la GNU
@@ -14,36 +18,21 @@ Summary(ru.UTF-8): Быстрый генератор лексических ан
Summary(tr.UTF-8): GNU sözdizim çözümleyici
Summary(uk.UTF-8): Швидкий генератор лексичних аналізаторів GNU
Name: flex
-Version: 2.6.4
-Release: 2
+Version: 2.7.11
+Release: 1
License: BSD-like
Group: Development/Tools
#Source0Download: https://github.com/westes/flex/releases
-# TODO: when upgrading, switch to
-#Source0: https://github.com/westes/flex/releases/download/v%{version}/%{name}-%{version}.tar.lz
-Source0: https://github.com/westes/flex/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 96828d1e36d18545b71a027caa6478dd
+Source0: https://github.com/westes/flex/releases/download/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 5a8c813c08de6879fb110c2251f0fd2a
Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
# Source1-md5: fd79ee2834b290e74c626f0bbfc8942f
Patch0: %{name}-info.patch
-Patch1: %{name}-build.patch
-Patch2: %{name}-rh1389575.patch
URL: https://github.com/westes/flex
-BuildRequires: autoconf >= 2.54
-BuildRequires: automake >= 1:1.14.1
-BuildRequires: bison
-# to rebuild scan.c from scan.l (m4-quotes patch)
-#BuildRequires: flex
-BuildRequires: gettext-tools >= 0.19
-BuildRequires: help2man
-BuildRequires: libtool >= 2:2
-# to rebuild skel.c from patched flex.skl
+%{?with_tests:BuildRequires: bison}
BuildRequires: m4
BuildRequires: tar >= 1:1.22
BuildRequires: texinfo
-BuildRequires: texinfo-texi2dvi
-BuildRequires: texlive-fonts-cmsuper
-BuildRequires: texlive-pdftex
BuildRequires: util-linux
BuildRequires: xz
Requires: m4
@@ -137,24 +126,15 @@ Przykłady dla fleksa.
%prep
%setup -q
%patch -P0 -p1
-%patch -P1 -p1
-%patch -P2 -p1
-
-# force regeneration (just in case make didn't want to)
-%{__rm} -f src/skel.c
%build
-%{__gettextize}
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
%configure \
--disable-shared
%{__make}
+%{?with_tests:%{__make} check}
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
@@ -175,6 +155,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+# docs are packaged with %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
+
# no external dependencies
%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
@@ -193,8 +176,8 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc AUTHORS COPYING NEWS README.md THANKS
%attr(755,root,root) %{_bindir}/flex
-%attr(755,root,root) %{_bindir}/flex++
-%attr(755,root,root) %{_bindir}/lex
+%{_bindir}/flex++
+%{_bindir}/lex
%{_mandir}/man1/flex.1*
%{_mandir}/man1/flex++.1*
%{_mandir}/man1/lex.1*
@@ -203,6 +186,7 @@ rm -rf $RPM_BUILD_ROOT
%lang(pl) %{_mandir}/pl/man1/*
%{_infodir}/flex.info*
%{_libdir}/libfl.a
+%{_pkgconfigdir}/libfl.pc
%{_includedir}/FlexLexer.h
%if 0
diff --git a/flex-build.patch b/flex-build.patch
deleted file mode 100644
index df6abbe..0000000
--- a/flex-build.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/configure.ac~ 2016-10-25 00:29:36.000000000 +0200
-+++ b/configure.ac 2016-12-18 14:55:43.302082497 +0100
-@@ -151,7 +151,6 @@ examples/Makefile
- examples/Makefile
- examples/fastwc/Makefile
- examples/manual/Makefile
--po/Makefile.in
- src/Makefile
- tools/Makefile
- tests/Makefile
diff --git a/flex-rh1389575.patch b/flex-rh1389575.patch
deleted file mode 100644
index 9095626..0000000
--- a/flex-rh1389575.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-This patch fixes a flex-2.6.4 build failure on x86_64 and possibly other
-architectures where `size_t' is larger than `int'. The failure occurs as
-follows:
-
-A missing `reallocarray' prototype during compilation means that the
-compiler assumes an `int' return type. When compiling with `-pie' (standard
-for Fedora), addresses on the heap can be larger than `int' can store. Thus,
-pointers returned from `reallocarray' are truncated and any read/write to
-them leads to a SIGSEGV.
-
-From 24fd0551333e7eded87b64dd36062da3df2f6380 Mon Sep 17 00:00:00 2001
-From: Explorer09 <explorer09 at gmail.com>
-Date: Mon, 4 Sep 2017 10:47:33 +0800
-Subject: [PATCH] build: AC_USE_SYSTEM_EXTENSIONS in configure.ac.
-
-This would, e.g. define _GNU_SOURCE in config.h, enabling the
-reallocarray() prototype in glibc 2.26+ on Linux systems with that
-version of glibc.
-
-Fixes #241.
----
- configure.ac | 2 ++
- 1 file changed, 2 insertions(+)
-
-Index: b/configure.ac
-===================================================================
---- a/configure.ac
-+++ b/configure.ac
-@@ -25,8 +25,10 @@
- # autoconf requirements and initialization
-
- AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help at lists.sourceforge.net],[flex])
-+AC_PREREQ([2.60])
- AC_CONFIG_SRCDIR([src/scan.l])
- AC_CONFIG_AUX_DIR([build-aux])
-+AC_USE_SYSTEM_EXTENSIONS
- LT_INIT
- AM_INIT_AUTOMAKE([1.11.3 -Wno-portability foreign check-news std-options dist-lzip parallel-tests subdir-objects])
- AC_CONFIG_HEADER([src/config.h])
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/flex.git/commitdiff/c47f8ff60d2abb04df1e1d464574704c2089e23e
More information about the pld-cvs-commit
mailing list