Sync from SUSE:SLFO:Main snobol4 revision 9eca687b52df6ae31353d03066e29e94

This commit is contained in:
Adrian Schröter 2024-05-04 00:43:08 +02:00
commit 1b281a0873
6 changed files with 217 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

53
reproducible.patch Normal file
View File

@ -0,0 +1,53 @@
Author: Bernhard M. Wiedemann <bwiedemann suse de>
To: Phil Budne <phil@regressive.org>
CC: <fred_weigel@hotmail.com>
Subject: [Patch] PoC reproducible builds
Allow for bit-identical binaries to be created
See https://reproducible-builds.org/ for why.
This patch was done while working on reproducible builds for openSUSE.
Index: snobol4-2.3.1/snolib/setuputil.sno
===================================================================
--- snobol4-2.3.1.orig/snolib/setuputil.sno
+++ snobol4-2.3.1/snolib/setuputil.sno
@@ -194,7 +194,7 @@ setup.makeinclude
+ ou = IO_FINDUNIT()
of = setup.sno(t)
OUTPUT(.out, ou,, of) :f(freturn)
- out = "* Generated by setuputil.sno setup.makeinclude() " DATE()
+ out = "* Generated by setuputil.sno setup.makeinclude() "
modname = REPLACE(t['module'], &LCASE, &UCASE) '_DL'
out = setup.t modname ' = "' t['module'] '"'
iu = IO_FINDUNIT()
Index: snobol4-2.3.1/configure
===================================================================
--- snobol4-2.3.1.orig/configure
+++ snobol4-2.3.1/configure
@@ -45,6 +45,10 @@ DATE=`date`
# run hostname from subshell to redirect shell "not found message"
HOST=`(hostname) 2>/dev/null || uname -n`
+if [ -n "$SOURCE_DATE_EPOCH" ] ; then
+ DATE='reproducible'
+ HOST='reproducible'
+fi
VERSION_H=version.h.tmp
CONFIG_H=config.h.tmp
Index: snobol4-2.3.1/Makefile2.m4
===================================================================
--- snobol4-2.3.1.orig/Makefile2.m4
+++ snobol4-2.3.1/Makefile2.m4
@@ -260,8 +260,8 @@ build.o: always
echo '/* MACHINE GENERATED. EDITING IS FUTILE */' > build.c
echo '#include "h.h"' >> build.c
echo 'const char build_files[] = "'$(SRCS)'";' >> build.c
- echo 'const char build_date[] = "'`date`'";' >> build.c
- echo 'const char build_dir[] = "'`pwd`'";' >> build.c
+ echo 'const char build_date[] = "'nodate'";' >> build.c
+ echo 'const char build_dir[] = "'reproducible'";' >> build.c
$(CC) $(CFLAGS) -c build.c
changequote([,])dnl

View File

@ -0,0 +1,12 @@
diff -up snobol4-2.3.1/configure.noopt snobol4-2.3.1/configure
--- snobol4-2.3.1/configure.noopt 2023-03-26 13:12:22.826650002 -0400
+++ snobol4-2.3.1/configure 2023-03-26 13:12:33.679794072 -0400
@@ -453,7 +453,7 @@ gcc|clang|icc)
CCVERS=-v
# was -M: -MM existed in gcc 3.4
echo 'CCM=$(CC) -MM' >> $CONFIG_M4
- OPT=-O3
+ # OPT=-O3
# on by default in clang??
echo 'ADD_CFLAGS([-Wall])' >> $CONFIG_M4

BIN
snobol4-2.3.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

19
snobol4.changes Normal file
View File

@ -0,0 +1,19 @@
-------------------------------------------------------------------
Mon May 29 14:29:04 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add reproducible.patch to drop build date (boo#1047218)
-------------------------------------------------------------------
Tue Apr 4 08:29:44 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
- Fix build: also package /usr/bin/snobol4-%{version}
-------------------------------------------------------------------
Mon Mar 27 22:18:08 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Port to openSUSE
-------------------------------------------------------------------
Sun Mar 26 00:00:00 UTC 2023 - Tom Callaway <spot@fedoraproject.org>
- initial package

107
snobol4.spec Normal file
View File

@ -0,0 +1,107 @@
#
# spec file for package snobol4
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global _smp_mflags -j1
%global optflags %{optflags} -Wno-error=unused-result -Wno-error=unused-but-set-variable -Wno-error=restrict -Wno-error=unused-variable -Wno-error=maybe-uninitialized -Wno-error=uninitialized
Name: snobol4
Version: 2.3.1
Release: 0
Summary: A port of Macro SNOBOL4
License: BSD-2-Clause
URL: https://www.regressive.org/snobol4/csnobol4/curr/
Source0: https://ftp.regressive.org/snobol4/%{name}-%{version}.tar.gz
# Do not hardcode -O3.
Patch1: snobol4-2.3.1-configure-no-opt.patch
Patch2: reproducible.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gdbm-devel
BuildRequires: libbz2-devel
BuildRequires: libedit-devel
BuildRequires: m4
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: readline-devel
BuildRequires: sqlite-devel
BuildRequires: tcl-devel
BuildRequires: xz-devel
BuildRequires: zlib-devel
%description
This is a free port of the original SIL (SNOBOL4 Implementation
Language) "macro" version of SNOBOL4 (developed at Bell Labs) with the
`C' language as a target.
SNOBOL4, while known primarily as a string language excels at any task
involving symbolic manipulations. It provides dynamic typing, garbage
collection, user data types, on the fly compilation.
%package devel
Summary: Development files for snobol4
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files for snobol4.
%prep
%autosetup -p1
# Remove version control files
rm -r doc/CVS doc/.cvsignore
%build
# This isn't a real configure script, hence, no macro.
./configure --add-cflags="%{optflags}" --add-cppflags="%{optflags}" --prefix=%{_prefix} --mandir=%{_mandir} --snolibdir=%{_libdir}/snobol4 --with-tcl=%{_libdir}/tclConfig.sh
%make_build
%install
%make_install
# all in libdir? What is this, 1985? Oh wait, this is SNOBOL, so maybe 1969.
mkdir -p %{buildroot}%{_includedir}/snobol4
mv %{buildroot}%{_libdir}/%{name}/%{version}/include/* %{buildroot}%{_includedir}/snobol4
pushd %{buildroot}%{_libdir}/%{name}/%{version}/
rm -rf include
ln -s ../../../include/snobol4 include
popd
# We rather install doc/ ourselves
rm -rf %{buildroot}%{_datadir}/doc/%{name}-%{version}
rm -rf %{buildroot}%{_libdir}/%{name}/%{version}/CHANGES %{buildroot}%{_libdir}/%{name}/%{version}/README
%files
%doc CHANGES README doc/
%license COPYRIGHT
%{_bindir}/sdb*
%{_bindir}/snobol4
%{_bindir}/snobol4-%{version}
%{_bindir}/snopea*
%{_libdir}/snobol4/
%exclude %{_libdir}/snobol4/%{version}/include
%{_mandir}/man1/sdb.1%{?ext_man}
%{_mandir}/man1/snobol4*.1%{?ext_man}
%{_mandir}/man1/snopea.1%{?ext_man}
%{_mandir}/man3/snolib.3%{?ext_man}
%{_mandir}/man3/snobol4*.3%{?ext_man}
%{_mandir}/man7/snopea.7%{?ext_man}
%files devel
%{_includedir}/%{name}
%{_libdir}/snobol4/%{version}/include
%changelog