<div dir="ltr">Unfortunately needed on some hosts. OK by me.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 14, 2022 at 2:02 AM <<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Chris Johns <<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>><br>
<br>
Updates #2300<br>
---<br>
bare/config/textproc/gsed-4.8.cfg | 12 +++<br>
bare/config/textproc/gsed-internal.bset | 12 +++<br>
bare/config/textproc/gsed.bset | 4 +<br>
bare/config/textproc/gsed.cfg | 8 ++<br>
source-builder/config/gsed-1.cfg | 108 ++++++++++++++++++++++++<br>
5 files changed, 144 insertions(+)<br>
create mode 100644 bare/config/textproc/gsed-4.8.cfg<br>
create mode 100644 bare/config/textproc/gsed-internal.bset<br>
create mode 100644 bare/config/textproc/gsed.bset<br>
create mode 100644 bare/config/textproc/gsed.cfg<br>
create mode 100644 source-builder/config/gsed-1.cfg<br>
<br>
diff --git a/bare/config/textproc/gsed-4.8.cfg b/bare/config/textproc/gsed-4.8.cfg<br>
new file mode 100644<br>
index 0000000..8806bef<br>
--- /dev/null<br>
+++ b/bare/config/textproc/gsed-4.8.cfg<br>
@@ -0,0 +1,12 @@<br>
+#<br>
+# GNU sed 4.8<br>
+#<br>
+<br>
+%include %{_configdir}/base.cfg<br>
+<br>
+%define gsed_version 4.8<br>
+<br>
+%hash sha512 sed-%{gsed_version}.tar.gz \<br>
+ C94KIhaOMQCwIUKTsTu6CEzM5F/7WGtsV1OPUY52akRDn/vyR4mPK7j1BtBTHTbynAp7cIhJVbqTz8/YhjG/eQ==<br>
+<br>
+%include %{_configdir}/gsed-1.cfg<br>
diff --git a/bare/config/textproc/gsed-internal.bset b/bare/config/textproc/gsed-internal.bset<br>
new file mode 100644<br>
index 0000000..e93e1a5<br>
--- /dev/null<br>
+++ b/bare/config/textproc/gsed-internal.bset<br>
@@ -0,0 +1,12 @@<br>
+#<br>
+# Internal GNU sed<br>
+#<br>
+<br>
+%define _internal_gsed yes<br>
+%define _internal_gsed_path %{_tmppath}/sb-%{_uid}/${SB_PREFIX_CLEAN}<br>
+%define _disable_collecting yes<br>
+%define _disable_packaging yes<br>
+%define _disable_reporting yes<br>
+%define _disable_installing yes<br>
+<br>
+%include textproc/gsed.bset<br>
diff --git a/bare/config/textproc/gsed.bset b/bare/config/textproc/gsed.bset<br>
new file mode 100644<br>
index 0000000..68f2e13<br>
--- /dev/null<br>
+++ b/bare/config/textproc/gsed.bset<br>
@@ -0,0 +1,4 @@<br>
+#<br>
+# GNU sed<br>
+#<br>
+textproc/gsed.cfg<br>
diff --git a/bare/config/textproc/gsed.cfg b/bare/config/textproc/gsed.cfg<br>
new file mode 100644<br>
index 0000000..8287c74<br>
--- /dev/null<br>
+++ b/bare/config/textproc/gsed.cfg<br>
@@ -0,0 +1,8 @@<br>
+#<br>
+# GNU sed has a version option, check for it.<br>
+# If not found build it.<br>
+#<br>
+%define has_gnu_sed %(sed --version > /dev/null 2>&1; echo $?)<br>
+%if %{has_gnu_sed} != 0<br>
+ %include %{_configdir}/textproc/gsed-4.8.cfg<br>
+%endif<br>
diff --git a/source-builder/config/gsed-1.cfg b/source-builder/config/gsed-1.cfg<br>
new file mode 100644<br>
index 0000000..828da50<br>
--- /dev/null<br>
+++ b/source-builder/config/gsed-1.cfg<br>
@@ -0,0 +1,108 @@<br>
+#<br>
+# GNU sed 1.xx Version 1.<br>
+#<br>
+# This configuration file configure's, make's and install's GNU's sed<br>
+#<br>
+<br>
+%if %{release} == %{nil}<br>
+ %define release 1<br>
+%endif<br>
+<br>
+%ifn %{defined _internal_gsed}<br>
+ %define _internal_gsed no<br>
+%endif<br>
+%ifn %{defined _internal_gsed_path}<br>
+ %define _internal_gsed_path %{_prefix}<br>
+%endif<br>
+<br>
+Name: gsed-%{gsed_version}-%{_host}-%{release}<br>
+Summary: GNU sed v%{gsed_version} for host %{_host}<br>
+Version: %{gsed_version}<br>
+Release: %{release}<br>
+URL: <a href="https://www.gnu.org/software/sed/" rel="noreferrer" target="_blank">https://www.gnu.org/software/sed/</a><br>
+<br>
+#<br>
+# Source<br>
+#<br>
+%source set gsed <a href="https://ftp.gnu.org/gnu/sed/sed-%%7Bgsed_version%7D.tar.gz" rel="noreferrer" target="_blank">https://ftp.gnu.org/gnu/sed/sed-%{gsed_version}.tar.gz</a><br>
+<br>
+#<br>
+# Remap the install paths if it is an internal build<br>
+#<br>
+%if %{_internal_gsed} == yes<br>
+ %define gsed_prefix %{_internal_gsed_path}<br>
+%else<br>
+ %define gsed_prefix %{_prefix}<br>
+%endif<br>
+<br>
+%define gsed_exec_prefix %{gsed_prefix}<br>
+%define gsed_bindir %{gsed_exec_prefix}/bin<br>
+%define gsed_sbindir %{gsed_exec_prefix}/sbin<br>
+%define gsed_libexecdir %{gsed_exec_prefix}/libexec<br>
+%define gsed_datarootdir %{gsed_prefix}/share<br>
+%define gsed_datadir %{gsed_datarootdir}<br>
+%define gsed_sysconfdir %{gsed_prefix}/etc<br>
+%define gsed_sharedstatedir %{gsed_prefix}/com<br>
+%define gsed_localstatedir %{gsed_prefix}/var<br>
+%define gsed_includedir %{gsed_prefix}/include<br>
+%define gsed_libdir %{gsed_exec_prefix}/%{_lib}<br>
+%define gsed_mandir %{gsed_datarootdir}/man<br>
+%define gsed_infodir %{gsed_datarootdir}/info<br>
+%define gsed_localedir %{gsed_datarootdir}/locale<br>
+<br>
+#<br>
+# Prepare the source code.<br>
+#<br>
+%prep<br>
+ build_top=$(pwd)<br>
+<br>
+ source_dir_gsed="sed-%{gsed_version}"<br>
+ %source setup gsed -q -n sed-%{gsed_version}<br>
+ %patch setup gsed -p1<br>
+<br>
+ cd ${build_top}<br>
+<br>
+%build<br>
+ build_top=$(pwd)<br>
+<br>
+ %if %{defined _internal_gsed_path}<br>
+ export PATH="%{_internal_gsed_path}/bin:${PATH}"<br>
+ %endif<br>
+<br>
+ %{build_directory}<br>
+<br>
+ mkdir -p ${build_dir}<br>
+ cd ${build_dir}<br>
+<br>
+ %{host_build_flags}<br>
+<br>
+ ../${source_dir_gsed}/configure \<br>
+ --prefix=%{gsed_prefix} \<br>
+ --bindir=%{gsed_bindir} \<br>
+ --exec_prefix=%{gsed_exec_prefix} \<br>
+ --includedir=%{gsed_includedir} \<br>
+ --libdir=%{gsed_libdir} \<br>
+ --libexecdir=%{gsed_libexecdir} \<br>
+ --mandir=%{gsed_mandir} \<br>
+ --infodir=%{gsed_infodir} \<br>
+ --datadir=%{gsed_datadir} \<br>
+ --build=%{_build} --host=%{_host}<br>
+<br>
+ %{__make} %{?_smp_mflags} all<br>
+<br>
+ cd ${build_top}<br>
+<br>
+%install<br>
+ build_top=$(pwd)<br>
+<br>
+ %{__rmdir} $SB_BUILD_ROOT<br>
+<br>
+ cd ${build_dir}<br>
+<br>
+ %if %{_internal_gsed} == yes<br>
+ %{__make} install<br>
+ %else<br>
+ %{__make} DESTDIR=$SB_BUILD_ROOT install<br>
+ %endif<br>
+<br>
+ cd ${build_top}<br>
-- <br>
2.37.1<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>