From 0d6f4a9f2c6daf31167a1be062c84f78e909e61be4351ae2d590295a577a7025 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 9 Feb 2021 09:33:58 +0000 Subject: [PATCH] pcre2 OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=530 --- ncurses.changes | 5 +++++ ncurses.spec | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/ncurses.changes b/ncurses.changes index e65b19c..c7f22ce 100644 --- a/ncurses.changes +++ b/ncurses.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 9 09:33:11 UTC 2021 - Dr. Werner Fink + +- For (lib)pcre2 support the devel package has to require this + ------------------------------------------------------------------- Mon Feb 8 08:46:27 UTC 2021 - Dr. Werner Fink diff --git a/ncurses.spec b/ncurses.spec index 46e1bad..e6debbe 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -25,6 +25,7 @@ %bcond_with memleakck %bcond_without onlytinfo %bcond_with libbsd +%bcond_without usepcre2 %if %{with onlytinfo} %global soname_tinfo tinfo @@ -47,7 +48,9 @@ BuildRequires: pkg-config BuildRequires: pkgconfig(libbsd) %endif BuildRequires: screen +%if %{with usepcre2} BuildRequires: pkgconfig(libpcre2-8) +%endif %if 0%{?suse_version} > 1130 BuildRequires: gpm-devel %else @@ -214,6 +217,9 @@ Provides: ncurses:%{_incdir}/ncurses.h Requires: %{_bindir}/tack Requires: libncurses6 = %{version}-%{release} Requires: ncurses = %{version}-%{release} +%if %{with usepcre2} +Requires: pkgconfig(libpcre2-8) +%endif # bug437293 %ifarch ppc64 Obsoletes: ncurses-devel-64bit @@ -495,7 +501,9 @@ mv tack-* tack --with-default-terminfo-dir=%{_datadir}/terminfo \ --with-terminfo-dirs=%{_sysconfdir}/terminfo:%{_datadir}/terminfo \ --with-xterm-kbs=del \ +%if %{with usepcre2} --with-pcre2 \ +%endif --disable-stripping \ --disable-root-environ \ --disable-termcap \ @@ -665,8 +673,13 @@ mv tack-* tack LIBS="$LDFLAGS" \ ./configure --with-ncursesw --enable-widec --prefix=$PWD LD_LIBRARY_PATH=%{root}%{_libdir} \ +%if %{with usepcre2} make %{?_smp_mflags} TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed' TEST_LIBS='-lutil -lpthread -lpcre2-posix -lpcre2-8' make install TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed' TEST_LIBS='-lutil -lpthread -lpcre2-posix -lpcre2-8' +%else + make %{?_smp_mflags} TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed' TEST_LIBS='-lutil -lpthread' + make install TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed' TEST_LIBS='-lutil -lpthread' +%endif mv bin binw make distclean popd @@ -800,8 +813,13 @@ includedir5=%{_incdir}/ncurses5' "$pc" LIBS="$LDFLAGS" \ ./configure --with-ncurses --disable-widec --prefix=$PWD LD_LIBRARY_PATH=%{root}%{_libdir} \ +%if %{with usepcre2} make %{?_smp_mflags} TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed' TEST_LIBS='-lutil -lpthread -lpcre2-posix -lpcre2-8' make install TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed' TEST_LIBS='-lutil -lpthread -lpcre2-posix -lpcre2-8' +%else + make %{?_smp_mflags} TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed' TEST_LIBS='-lutil -lpthread' + make install TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed' TEST_LIBS='-lutil -lpthread' +%endif make distclean popd %endif