# The hardened build breaks bigloo's plugin architecture. %undefine _hardened_build # With LTO enabled, we get errors of this form while building BDE: # lib/alloc.c:1138:1: error: variable '____make_va_procedure' redeclared as function # 1138 | WRAPPER( make_va_procedure, PROCEDURE_TYPE_NUM, (obj_t (*e)(), int a, int s), ((void *(*)())e, a, s) ) # | ^ # lib/init.c:103:9: note: previously declared here # 103 | void *(*____make_va_procedure)( void *(*)(), int, int ); # | ^ # # The WRAPPER macro uses its first argument to create the name of a function. # Hence, in this case, the function has name "make_va_procedure" and the # variable has name "____make_va_procedure", yet LTO thinks they are the same # symbol. Until this can be resolved, disable LTO. %global _lto_cflags %{nil} # Bigloo uses the terminology "release" for what Fedora calls version, # and "version" for a sub-version revision. # patch_suffix is defined to be empty when patch_ver is not defined, # so that when updating, the Source and %%setup lines do not have to be # changed, only the Version and patch_ver %global patch_ver 2 %global patch_suffix %{?patch_ver:-%{patch_ver}} # prerelease #%%global prerel 20151208beta #%%global ver_suffix -beta08Dec15 # For Emacs subpackages %global pkg %{name} %global pkgname Bigloo # Bigloo has a customized copy of gc %bcond_without customgc %global bundledgc 8.0.4 Name: bigloo Version: 4.4c Release: 3%{?patch_ver:.%{patch_ver}}%{?prerel:.%{prerel}}%{?dist} Summary: A compiler for the Scheme programming language License: GPLv2+ URL: https://www-sop.inria.fr/mimosa/fp/Bigloo Source0: ftp://ftp-sop.inria.fr/indes/fp/Bigloo/%{name}-%{version}%{?patch_suffix}%{?ver_suffix}.tar.gz # Not yet sent upstream: fix some bugs in the Emacs interface, and also # modernizes the code somewhat. Patch0: %{name}-emacs.patch # Not yet sent upstream. Support 64-bit stat on 32-bit platforms. Patch1: %{name}-stat64.patch # Not yet sent upstream: add some noreturn attributes Patch2: %{name}-noreturn.patch # Fix reading past the limits of a stack buffer Patch3: %{name}-memread.patch # Make type declarations match, silences LTO warning Patch4: %{name}-lto-type.patch # Make the test suite fail if individual tests fail Patch5: %{name}-test.patch # Round top of stack to a multiple of 1024. Fixes stack overflow on s390x. Patch6: %{name}-callcc.patch # Adapt to Java 11 Patch7: %{name}-javac.patch # Add some missing return statements Patch8: %{name}-return.patch # Fix signal numbers in the Java code Patch9: %{name}-java-signum.patch BuildRequires: emacs BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gmp-devel BuildRequires: indent BuildRequires: java-devel BuildRequires: javapackages-tools BuildRequires: libtool BuildRequires: libunistring-devel BuildRequires: make BuildRequires: pkgconfig BuildRequires: pkgconfig(alsa) %if %{with customgc} BuildRequires: pkgconfig(atomic_ops) %endif BuildRequires: pkgconfig(avahi-client) %if %{without customgc} BuildRequires: pkgconfig(bdw-gc) %endif BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(gstreamer-1.0) BuildRequires: pkgconfig(gstreamer-audio-1.0) BuildRequires: pkgconfig(libmpg123) BuildRequires: pkgconfig(libpcre) BuildRequires: pkgconfig(libphidget21) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libuv) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(sqlite3) BuildRequires: texinfo-tex BuildRequires: texi2html BuildRequires: zip Requires: bigloo-libs%{?_isa} = %{version}-%{release} Requires: emacs-filesystem >= %{?_emacs_version}%{!?_emacs_version:0} Requires: javapackages-filesystem Requires: indent Requires: gmp-devel%{?_isa} %if %{without customgc} Requires: gc-devel%{?_isa} %endif Requires: gcc Requires: glibc-devel%{?_isa} %if %{with customgc} Requires: libatomic_ops-devel%{?_isa} %endif Requires: libgcc%{?_isa} Requires: libunistring-devel%{?_isa} Requires: libuv-devel%{?_isa} %if %{with customgc} Provides: bundled(gc) = %{bundledgc} %endif %description Bigloo is a Scheme implementation devoted to one goal: enabling a Scheme based programming style where C(++) is usually required. Bigloo attempts to make Scheme practical by offering features usually presented by traditional programming languages but not offered by Scheme and functional programming. Bigloo compiles Scheme modules. It delivers small and fast standalone binary executables. Bigloo enables full connections between Scheme and C programs. %package libs Summary: Bigloo runtime libraries %description libs Runtime libraries for Bigloo compiled programs. %package doc Summary: Bigloo documentation BuildArch: noarch %description doc Documentation for the Bigloo compiler and integrated development environment. %prep %autosetup -p0 -n %{name}-%{version}%{?patch_suffix} # encoding fixes for f in README.md examples/Socket/socket.scm; do iconv -f ISO8859-1 -t UTF8 $f | sed 's/=ISO-8859-1/=UTF-8/' > $f.utf8 touch -r $f $f.utf8 mv -f $f.utf8 $f done # correct examples Makefiles for installation find examples -name Makefile -print0 | xargs -0 \ sed -i 's|include.*Makefile.config|include %{_libdir}/bigloo/%{version}/Makefile.config|g' # fix missing linkage %if %{without customgc} sed -i 's/^extralibs="-lm -lc"/extralibs="-lgc -lm -lc"/' configure sed -i 's/LDOPTS=\"/&-Wl,--as-needed -lgc /' Makefile.misc %endif # Keep generated files for debuginfo sed -i 's/fcfa-arithmetic/& -rm/' configure sed -i 's/no-hello/& -rm/' bdb/bdb/Makefile sed -i 's/-O2/& -rm/' cigloo/Makefile %build %define inplace $PWD/inplace # Large stack needed to build ulimit -s unlimited # Enable UTF-8 filename support export LOCALE="C.utf8" export CFLAGS="%{optflags} -fwrapv -Wno-unused" %if 0%{?__isa_bits} == 32 CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64" %endif export LDFLAGS="-Wl,-z,relro -Wl,--as-needed" ./configure \ --prefix=%{_prefix} \ --bindir=%{_bindir} \ --libdir=%{_libdir} \ --mandir=%{_mandir}/man1 \ --infodir=%{_infodir} \ --docdir=%{_docdir} \ --lispdir=%{_emacs_sitelispdir}/bigloo \ --jvm=yes \ --javaprefix=%{_jvmdir}/java/bin \ --bee=full \ %if %{with customgc} --customgc=yes \ %else --customgc=no \ %endif --coflags="$CFLAGS" \ --cpicflags="-fPIC" \ --sharedbde=yes \ --sharedcompiler=yes \ --native-default-backend \ --customgmp=no \ --customlibuv=no \ --strip=no \ --configureinfo=yes # Remove extraneous rpath sed -i '/^RPATH=/s,\$(DESTDIR).*:,,' Makefile.config # _smp_mflags breaks the build env LD_LIBRARY_PATH=$PWD/lib/bigloo/%{version} make env LD_LIBRARY_PATH=$PWD/lib/bigloo/%{version} \ BIGLOOLIB=%{inplace}%{_libdir}/bigloo/%{version} \ make DESTDIR=%{inplace} install env LD_LIBRARY_PATH=$PWD/lib/bigloo/%{version} \ PATH=$PWD/bin:$PATH \ BIGLOOLIB=%{inplace}%{_libdir}/bigloo/%{version} \ make compile-bee # Other permissions are missing from a lot of files chmod -R o+r . %install mkdir -p %{buildroot}%{_emacs_sitelispdir}/bigloo env LD_LIBRARY_PATH=$PWD/lib/bigloo/%{version} %make_install env LD_LIBRARY_PATH=$PWD/lib/bigloo/%{version} \ make DESTDIR=%{buildroot} EMACSDIR=%{_emacs_sitelispdir}/bigloo install-bee make -C manuals DESTDIR=%{buildroot} install-bee # Remove empty directory rmdir %{buildroot}%{_libdir}/pkgconfig # fix permissions chmod 755 %{buildroot}%{_bindir}/* find %{buildroot}%{_libdir} -name \*.so -exec chmod 755 {} \+ # move jigloo to the proper place mkdir %{buildroot}%{_javadir} mv %{buildroot}%{_bindir}/jigloo.class %{buildroot}%{_javadir} # Remove references to the build root sed -e 's|^BOOTDIR=.*|BOOTDIR=%{_prefix}|g' \ -e 's|^BOOTBINDIR=.*|BOOTBINDIR=%{_bindir}|g' \ -e 's|^BOOTLIBDIR=.*|BOOTLIBDIR=%{_libdir}/bigloo/%{version}|g' \ -e 's|^BGLBUILDBINDIR=.*|BGLBUILDBINDIR=%{_bindir}|g' \ -e 's|^BGLBUILDLIBDIR=.*|BGLBUILDLIBDIR=%{_libdir}/bigloo/%{version}|g' \ -e 's|^\(BIGLOO=.*\)\.sh|\1|' \ -e 's|^\(BGL.*=.*\)\.sh|\1|' \ -i %{buildroot}%{_libdir}/bigloo/%{version}/Makefile.config sed -e 's|%{buildroot}||g' -i %{buildroot}%{_bindir}/*.sh rm -fr %{buildroot}%{_infodir}/dir %{buildroot}%{_datadir}/doc # emacs mkdir -p %{buildroot}%{_emacs_sitestartdir} cat > %{buildroot}%{_emacs_sitestartdir}/bigloo.el < - 4.4c-3.2 - Rebuilt for java-17-openjdk as system jdk * Wed Jan 19 2022 Fedora Release Engineering - 4.4c-2.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Dec 29 2021 Jerry James - 4.4c-1.2 - Version 4.4c-2 - Drop obsolete -div-by-zero patch - Disable LTO again due to symbol collision errors - Reenable tests on s390x * Tue Nov 9 2021 Jerry James - 4.4b-4 - Drop XEmacs support * Tue Sep 14 2021 Sahana Prasad - 4.4b-3 - Rebuilt with OpenSSL 3.0.0 * Wed Jul 21 2021 Fedora Release Engineering - 4.4b-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Feb 5 2021 Jerry James - 4.4b-1 - Version 4.4b - Drop $date-is-gmt workaround - Add -div-by-zero patch to work around test failures - Disable tests on s390x until a Java mutex problem can be diagnosed * Tue Jan 26 2021 Fedora Release Engineering - 4.4a-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sat Jan 23 2021 Jerry James - 4.4a-1 - Version 4.4a - Drop upstreamed -format, -params, -sigtrap, and -underlink patches - Add -lto-type patch to silence LTO warnings - Install libraries with upstream's choice of names and places * Wed Oct 21 2020 Jerry James - 4.3h-8 - Re-enable LTO on aarch64 and ppc64le - Improve the -emacs patch - Fix LTO warnings about mismatched types by adding to the -params patch - Add the -return, -java-signum, and -sigtrap patches - Drop division by zero workaround, fixed with the -sigtrap patch - Move license files to -libs and -doc subpackages * Fri Oct 09 2020 Jeff Law - 4.3h-7 - Re-enable LTO except on aarch64 and ppc64le * Sat Aug 01 2020 Fedora Release Engineering - 4.3h-6 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Mon Jul 27 2020 Fedora Release Engineering - 4.3h-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jul 21 2020 Jerry James - 4.3h-4 - Support Java 11 * Mon Jul 13 2020 Jeff Law - 4.3h-3 - Disable LTO * Fri Jul 10 2020 Jiri Vanek - 4.3h-2 - Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 * Thu May 14 2020 Jerry James - 4.3h-1 - Update to 4.3h - Drop upstreamed -gstreamer1 and -return patches * Wed Mar 4 2020 Jerry James - 4.3g-2 - Fix the library sonames * Fri Feb 28 2020 Jerry James - 4.3g-1 - Update to 4.3g - Use the bundled gc again for performance reasons * Tue Jan 28 2020 Fedora Release Engineering - 4.3f-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Nov 21 2019 Jerry James - 4.3f-3 - Fix underlinked plugins - Port gstreamer plugin to 1.0 (gstreamer1) - Move the jigloo class to the Java directory - Go back to the system gc; the bundled version is too buggy * Wed Jul 24 2019 Fedora Release Engineering - 4.3f-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri Jul 5 2019 Jerry James - 4.3f-1 - Update to 4.3f - Drop dbus-devel BR; the dbus module is not yet buildable * Thu Jan 31 2019 Fedora Release Engineering - 4.3e-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Wed Jan 30 2019 Jerry James - 4.3e-1 - Update to 4.3e - Build with custom GC for performance reasons - Add -return, -memread, and -params patches to fix runtime issues - Add -test patch to make %%check exit on test failure (bz 1663605) - Unlimit stack usage in the check script for s390x * Sat Jan 5 2019 Tim Landscheidt - 4.3c-2 - Do not set LD_LIBRARY_PATH in %%check * Fri Jan 4 2019 Tim Landscheidt - 4.3c-2 - Fix setting compiling user for XEmacs byte-compiled files * Sat Sep 15 2018 Jerry James - 4.3c-1 - Update to 4.3c * Thu Jul 12 2018 Fedora Release Engineering - 4.3b-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Sat Jun 16 2018 Jerry James - 4.3b-1 - Update to 4.3b - Drop upstreamed -endian patch - Add -noreturn patch to silence compiler warnings - Remove scriptlets that call install-info - Use ldconfig_scriptlets * Wed Feb 07 2018 Fedora Release Engineering - 4.3a-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Aug 17 2017 Jerry James - 4.3a-3 - Add -endian patch to fix s390x build - Build for ppc64 as well, since the -endian patch fixed that too * Wed Aug 02 2017 Fedora Release Engineering - 4.3a-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 4.3a-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Jul 22 2017 Jerry James - 4.3a-1 - Update to 4.3a - Drop upstreamed -nameser, -openssl11, and -emacs25 patches - Add -fwrapv to CFLAGS to address overflow in the Unicode code - Enable pulseaudio and mpg123 support * Fri Feb 10 2017 Fedora Release Engineering - 4.2c-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Wed Feb 03 2016 Fedora Release Engineering - 4.2c-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Dec 23 2015 Jerry James - 4.2c-1 - Update to 4.2c (bz 1264055) * Tue Oct 27 2015 Jerry James - 4.2b-1 - Update to 4.2b (bz 1264055) * Wed Jun 17 2015 Fedora Release Engineering - 4.1a-9.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Apr 11 2015 Jerry James - 4.1a-8.2 - Adapt to new (X)Emacs packaging guidelines - Do not link with -z now, breaks the configure script and module loading * Mon Feb 9 2015 Jerry James - 4.1a-7.2 - Fix build failure due to lack of -fPIC - Use license macro * Tue Sep 2 2014 Jerry James - 4.1a-6.2 - Rebuild for libunistring soname bump * Fri Aug 15 2014 Fedora Release Engineering - 4.1a-5.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Thu Jun 26 2014 Jerry James - 4.1a-4.2 - Library renaming must be done in the version-specific directory too * Sat Jun 07 2014 Fedora Release Engineering - 4.1a-3.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Mon Mar 3 2014 Jerry James - 4.1a-2.2 - Update to 4.1a-2 bug fix release * Mon Feb 24 2014 Jerry James - 4.1a-2 - Main package now Requires libunistring-devel * Thu Feb 20 2014 Jerry James - 4.1a-1 - Update to 4.1a - Add libunistring-devel BR - Set LOCALE when configuring for UTF-8 filename support * Fri Aug 2 2013 Jerry James - 4.0b-1 - Update to 4.0b - Add -stat64 patch and build with -D_FILE_OFFSET_BITS=64 - Fix the xemacs version of bmacs-config.el * Wed Feb 6 2013 Jerry James - 4.0a-1 - Update to 4.0a - Add texinfo-tex and texi2html BRs for documentation * Mon Nov 19 2012 Michel Salim - 3.9b-0.1.20121118alpha - Update to 3.9b snapshot * Tue Oct 23 2012 Jerry James - 3.9a-1 - Update to 3.9a - Don't require a multilib gcc, but rather multilib libgcc and glibc - Enable libphidget and pcre support - Don't define BIGLOOLIB while compiling; it breaks the build * Wed Jul 18 2012 Fedora Release Engineering - 3.8c-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon Jul 2 2012 Michel Salim - 3.8c-1 - Update to 3.8c * Thu May 3 2012 Jerry James - 3.8b-1 - Update to 3.8b - Drop upstreamed JDK 1.7 patch * Fri Mar 30 2012 Jerry James - 3.8a-1.2 - Update to 3.8a-2 - Drop upstreamed java SSL patch - Create (X)Emacs install dirs to avoid occasional build failure * Fri Mar 23 2012 Jerry James - 3.8a-1 - Update to 3.8a - Drop upstreamed patches - Add avahi-devel BR for new API * Mon Jan 9 2012 Jerry James - 3.7a-3 - Rebuild for GCC 4.7 - Drop unnecessary BRs * Wed Nov 23 2011 Jerry James - 3.7a-2 - Fix (X)Emacs installations (bz 754592) - Refresh sendfile patch to match upstream's version * Thu Oct 20 2011 Marcela Mašláňová - 3.7a-1.2 - rebuild with new gmp without compat lib * Mon Oct 10 2011 Peter Schiffer - 3.7a-1.1 - rebuild with new gmp * Mon Sep 26 2011 Jerry James - 3.7a-1 - Update to 3.7a - New source URL - Drop unnecessary spec file elements (BuildRoot, defattr, etc.) - Reenable XEmacs subpackages - Fix more files with non-UTF-8 encodings - Four patches to fix problems encountered with the new version - Add alsa-lib-devel, dbus-devel, and flac-devel BRs for new APIs - The obsoletes were needed for now EOL Fedora releases; remove them - Add check script * Mon Feb 14 2011 Gérard Milmeister - 3.6a-1 - Update to 3.6a * Mon Feb 07 2011 Fedora Release Engineering - 3.4a-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Fri Jul 2 2010 Michel Salim - 3.4a-1 - Update to 3.4a * Fri Jul 2 2010 Michel Salim - 3.3a-2.5 - Now complies with Emacs packaging guidelines - Disable broken XEmacs subpackages * Sun May 9 2010 Michel Salim - 3.3a-1.5 - Update to 3.3a-5 * Fri Aug 21 2009 Tomas Mraz - 3.2b-3 - rebuilt with new openssl * Sun Aug 16 2009 Gerard Milmeister - 3.2b-2 - added requires gc-devel * Sun Aug 9 2009 Gerard Milmeister - 3.2b-1 - new release 3.2b * Fri Jul 24 2009 Fedora Release Engineering - 3.1b-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Mon Feb 23 2009 Fedora Release Engineering - 3.1b-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Thu Jan 15 2009 Tomas Mraz - 3.1b-4 - rebuild with new openssl * Tue Sep 30 2008 Gerard Milmeister - 3.1b-3 - add BR openssl-devel - add missing Req. gmp-devel * Thu Sep 18 2008 Gerard Milmeister - 3.1b-1 - new release 3.1b * Sat May 31 2008 Gerard Milmeister - 3.1a-1 - new release 3.1a * Mon Apr 14 2008 Gerard Milmeister - 3.0c-4.1 - new release 3.0c-4 * Mon Feb 18 2008 Fedora Release Engineering - 3.0b-2 - Autorebuild for GCC 4.3 * Tue Sep 11 2007 Gerard Milmeister - 3.0b-1 - new release 3.0b * Sat Jun 2 2007 Gerard Milmeister - 3.0a-4 - exclude ppc64 * Fri Jun 1 2007 Gerard Milmeister - 3.0a-3 - remove java ssl since it does not build with libgcj * Fri Jun 1 2007 Gerard Milmeister - 3.0a-1 - new version 3.0a * Wed Mar 28 2007 Thomas Fitzsimmons - 2.9a-3 - Patch method calls for Java 1.5. * Tue Mar 27 2007 Thomas Fitzsimmons - 2.9a-2 - Require java-1.5.0-gcj-devel for build. * Thu Dec 28 2006 Gerard Milmeister - 2.9a-1 - new version 2.9a * Wed Sep 13 2006 Gerard Milmeister - 2.8c-5 - final version 2.8c * Tue Sep 5 2006 Gerard Milmeister - 2.8c-4 - reenable hard links * Fri Sep 1 2006 Gerard Milmeister - 2.8c-2 - updated to 2.8c-beta01Sep06 * Mon Aug 28 2006 Gerard Milmeister - 2.8b-3 - Rebuild for FE6 * Thu Jun 22 2006 Gerard Milmeister - 2.8b-1 - new version 2.8b * Thu Jun 1 2006 Gerard Milmeister - 2.8a-2 - final 2.8a release * Tue Mar 21 2006 Gerard Milmeister - 2.8a-1.20060322 - new version 2.8a-20060322 * Mon Mar 13 2006 Gerard Milmeister - 2.8a-1.20060313 - new version 2.8a-20060313 * Mon Nov 28 2005 Gerard Milmeister - 2.7a-2 - disable bmem, causes link problems * Sun Nov 27 2005 Gerard Milmeister - 2.7a-1 - New Version 2.7a * Tue Sep 27 2005 Gerard Milmeister - 2.6f-3 - Removed --arch * Fri Feb 18 2005 Gerard Milmeister - 0:2.6f-1 - New Version 2.6f * Sun Feb 13 2005 Gerard Milmeister - 0:2.6e-1 - New Version 2.6e * Tue Mar 16 2004 Gerard Milmeister - 0:2.6-0.fdr.1.c - New Version 2.6c - Separated Emacs and XEmacs packages * Tue Dec 16 2003 Gerard Milmeister - 0:2.6-0.fdr.1.b - New Version 2.6b * Thu Nov 27 2003 Gerard Milmeister - 0:2.6-0.fdr.1.a - First Fedora release