[packages/scm] - added make patch + some hacks to workaround build issues - compile with runtime IMPLPATH, adjust /

qboosh qboosh at pld-linux.org
Fri Jul 29 18:57:27 CEST 2016


commit 7ef8592f544f7a654cbfa07c92b10ad56e6b6277
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jul 29 18:58:03 2016 +0200

    - added make patch + some hacks to workaround build issues
    - compile with runtime IMPLPATH, adjust /lib/ paths in .scm files (should fix x86_64,x32)
    - release 2

 scm-make.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 scm.spec       | 15 +++++++++++++--
 2 files changed, 59 insertions(+), 2 deletions(-)
---
diff --git a/scm.spec b/scm.spec
index cf61012..c61bffc 100644
--- a/scm.spec
+++ b/scm.spec
@@ -3,7 +3,7 @@ Summary:	Scheme implementation
 Summary(pl.UTF-8):	Implementacja Scheme
 Name:		scm
 Version:	5f2
-Release:	1
+Release:	2
 License:	LGPL v3+
 Group:		Development/Languages/Scheme
 Source0:	http://groups.csail.mit.edu/mac/ftpdir/scm/%{name}-%{version}.zip
@@ -15,6 +15,7 @@ Patch1:		%{name}-install.patch
 Patch2:		%{name}-texinfo.patch
 Patch3:		x32.patch
 Patch4:		%{name}-bigrecy.patch
+Patch5:		%{name}-make.patch
 URL:		http://people.csail.mit.edu/jaffer/SCM
 BuildRequires:	sed >= 4.0
 BuildRequires:	texinfo
@@ -38,11 +39,14 @@ IEEE P1178.
 %patch2 -p0
 %patch3 -p0
 %patch4 -p0
+%patch5 -p0
 
 ln -s slib-%{slib_ver} slib
 
 %{__sed} -i -e 's/install-lib install-infoz /install-lib install-info /' scm/Makefile
 
+%{__sed} -i -e 's,/lib/,/%{_lib}/,g' scm/{Link,build,mkimpcat}.scm
+
 %build
 cd scm
 # not autoconf-generated
@@ -50,11 +54,18 @@ cd scm
 	--prefix=%{_prefix} \
 	--libdir=%{_libdir}
 
-%{__make} scm.info Xlibscm.info hobbit.info
+%{__make} -j1 scmflags
+# hack to avoid remaking scmflags.h
+touch scmflags
 
 %{__make} scmlit \
 	CC="%{__cc} %{rpmcflags}" \
 	LD="%{__cc} %{rpmldflags} %{rpmcflags}"
+
+# call just after making scmlit, before making scm
+# (requires built scmlit, but "make all" makes existing scmlit outdated to make)
+%{__make} -j1 scm.info Xlibscm.info hobbit.info
+
 %{__make} all \
 	CC="%{__cc} %{rpmcflags}" \
 	LD="%{__cc} %{rpmldflags} %{rpmcflags}"
diff --git a/scm-make.patch b/scm-make.patch
new file mode 100644
index 0000000..1654b49
--- /dev/null
+++ b/scm-make.patch
@@ -0,0 +1,46 @@
+--- scm/Makefile.orig	2016-07-29 17:01:47.090099218 +0200
++++ scm/Makefile	2016-07-29 17:20:44.712755102 +0200
+@@ -81,7 +81,7 @@
+ 
+ # directory where COPYING and InitXXX.scm reside.
+ #IMPLPATH = `pwd`/
+-IMPLPATH=$(srcdir)
++IMPLPATH=$(libscmdir)
+ include patchlvl.h
+ IMPLINIT = $(IMPLPATH)Init$(VERSION).scm
+ 
+@@ -390,6 +390,7 @@
+ scm4.opt:
+ 	echo "-F cautious bignums arrays inexact" >> scm4.opt
+ 	echo "-F engineering-notation dynamic-linking" >> scm4.opt
++	echo "--compiler-options=\"$(CFLAGS)\"" >> scm4.opt
+ #	if type gcc; then echo "--compiler-options=\"-fno-guess-branch-probability\"" >> scm4.opt; fi
+ scm4:	$(cfiles) $(hfiles) build.scm build scm4.opt
+ 	$(BUILD) -f scm4.opt -o scm -s $(IMPLPATH)
+@@ -401,6 +402,7 @@
+ 	echo "-F cautious bignums arrays inexact" >> scm5.opt
+ 	echo "-F engineering-notation dynamic-linking" >> scm5.opt
+ 	echo "-F macro" >> scm5.opt
++	echo "--compiler-options=\"$(CFLAGS)\"" >> scm5.opt
+ #	if type gcc; then echo "--compiler-options=\"-fno-guess-branch-probability\"" >> scm5.opt; fi
+ scm5:	$(cfiles) $(hfiles) build.scm build scm5.opt
+ 	$(BUILD) -f scm5.opt -o scm -s $(IMPLPATH)
+@@ -488,6 +490,7 @@
+ 	echo "-F cautious bignums arrays inexact" >> libscm.opt
+ 	echo "-F engineering-notation" >> libscm.opt
+ 	echo "-F dynamic-linking" >> libscm.opt
++	echo "--compiler-options=\"$(CFLAGS)\"" >> libscm.opt
+ libscm.a:	libscm.opt scm.h scmfig.h
+ 	$(BUILD) -t lib -f libscm.opt
+ libtest:	libscm.a libtest.c
+@@ -496,8 +499,8 @@
+ 
+ # DLLs for dynamic linking
+ dlls.opt:
+-	echo "--compiler-options=-Wall" >> dlls.opt
+-	echo "--linker-options=-Wall" >> dlls.opt
++	echo "--compiler-options=\"-Wall $(CFLAGS)\"" >> dlls.opt
++	echo "--linker-options=-Wall" >> dlls.opt
+ dlls:	dlls.opt
+ 	$(BUILD) -t dll -f dlls.opt -F rev2-procedures	#-c sc2.c
+ 	$(BUILD) -t dll -f dlls.opt -F byte	      	#-c byte.c
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/scm.git/commitdiff/7ef8592f544f7a654cbfa07c92b10ad56e6b6277



More information about the pld-cvs-commit mailing list