[SCM] an open source computer algebra system branch, debian, updated. 20595a196a1f5269285adde9b2a2b48ee55e3c92

Bernhard R. Link brlink at debian.org
Sun Feb 26 13:54:47 UTC 2012


The following commit has been merged in the debian branch:
commit 20595a196a1f5269285adde9b2a2b48ee55e3c92
Author: Bernhard R. Link <brlink at debian.org>
Date:   Sun Feb 26 14:52:45 2012 +0100

    add patch to link binary against dynamic library and to only link the
    binary against readline

diff --git a/debian/.git-dpm b/debian/.git-dpm
index 631f4d9..adfd737 100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@ -1,5 +1,5 @@
 # see git-dpm(1) from git-dpm package
-7bf259b5aa0ebeacd6b29da8199a95bba5343100
+1b52f95906305b903b6a49c2861c147de37ac7d3
 1b52f95906305b903b6a49c2861c147de37ac7d3
 af80c455bead480e8e21703ac28b5a5965265887
 af80c455bead480e8e21703ac28b5a5965265887
diff --git a/debian/patches/0010-librariesmove-libreadline-to-main-binary.patch b/debian/patches/0010-librariesmove-libreadline-to-main-binary.patch
new file mode 100644
index 0000000..af56154
--- /dev/null
+++ b/debian/patches/0010-librariesmove-libreadline-to-main-binary.patch
@@ -0,0 +1,217 @@
+From 1b52f95906305b903b6a49c2861c147de37ac7d3 Mon Sep 17 00:00:00 2001
+From: "Bernhard R. Link" <brlink at debian.org>
+Date: Sun, 26 Feb 2012 13:38:14 +0100
+Subject: librariesmove libreadline to main binary
+
+and link Singular binary against libsingular instead of carrying a copy
+of everything.
+---
+ Singular/Makefile.in |    8 +++++---
+ kernel/Makefile.in   |   17 +++++++++--------
+ kernel/febase.cc     |   41 +++++++++++++++++++++++++++++++++++++++++
+ kernel/feread.cc     |   27 +--------------------------
+ 4 files changed, 56 insertions(+), 37 deletions(-)
+
+diff --git a/Singular/Makefile.in b/Singular/Makefile.in
+index 588d981..2304b65 100644
+--- a/Singular/Makefile.in
++++ b/Singular/Makefile.in
+@@ -132,7 +132,7 @@ HAVE_MPSR       = @HAVE_MPSR@
+ #
+ # Handle libSINGULAR stuff
+ #
+-LIBSINGULAR_LIBS =-lsingfac -lsingcf -lntl -lreadline -lgmp -lomalloc
++LIBSINGULAR_LIBS =-lsingfac -lsingcf -lntl -lgmp -lomalloc -ldl
+ 
+ SO_SUFFIX = so
+ 
+@@ -379,12 +379,14 @@ Singular-static: version.h
+ 	${MAKE} LD_STATIC=1 S_EXT="-static" Singular-static
+ 	echo "#undef HAVE_STATIC" > static.h
+ 
++SINGULAR_DYNAMIC = $(LIBSINGULAR_NAME) ../kernel/feread.o ../kernel/fereadl.o
++
+ Singular${S_EXT}: mod2.h Makefile version.h $(WIN_LIBS) scanner.cc  ${OBJS} \
+-          iparith.o tesths.cc libparse.cc claptmpl.o mpsr_Tok.o $(DL_LIBS) 
++          iparith.o tesths.cc libparse.cc claptmpl.o mpsr_Tok.o $(DL_LIBS) $(SINGULAR_DYNAMIC)
+ 	${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} \
+ 	  -o Singular${S_EXT} \
+ 	  tesths.cc iparith.o mpsr_Tok.o claptmpl.o\
+-	  ${OBJS} ${LDFLAGS} ${LIBS} ${LD_DYN_FLAGS} ../kernel/mmalloc.o
++	  ${OBJS} $(SINGULAR_DYNAMIC) ${LDFLAGS} ${LIBS} ${LD_DYN_FLAGS} ../kernel/mmalloc.o
+ 
+ libsingular: ${LIBSINGULAR_NAME}
+ 
+diff --git a/kernel/Makefile.in b/kernel/Makefile.in
+index 33fb6d9..edc1e63 100644
+--- a/kernel/Makefile.in
++++ b/kernel/Makefile.in
+@@ -91,7 +91,7 @@ endif
+ # normal C++ source files
+ CXXSOURCES=clapconv.cc \
+     clapsing.cc \
+-    febase.cc feread.cc feResource.cc \
++    febase.cc feResource.cc \
+     ffields.cc hdegree.cc hilb.cc hutil.cc \
+     sca.cc gring.cc gr_kstd2.cc summator.cc ncSAMult.cc ncSAFormula.cc \
+     ideals.cc intvec.cc int64vec.cc \
+@@ -119,7 +119,7 @@ CXXSOURCES=clapconv.cc \
+ CXXSOURCES2	= SingularBuilder.cpp
+ 
+ # normal C source files
+-CSOURCES=weight0.c fegetopt.c fereadl.c dError.c mmstd.c
++CSOURCES=weight0.c fegetopt.c dError.c mmstd.c
+ 
+ # C++ sources which are used if part of the kernel are dynamically linked
+ ifeq ($(DL_KERNEL),1)
+@@ -137,7 +137,8 @@ STATIC_SOURCES=p_Procs_Static.cc
+ 
+ # special C++ source files (need extra compiling and/or linking), for which
+ # dependencies should be generated
+-ESOURCES=mmalloc.cc $(DL_KERNEL_SOURCES) $(DL_LIB_SOURCES) $(STATIC_SOURCES)
++ESOURCES=mmalloc.cc $(DL_KERNEL_SOURCES) $(DL_LIB_SOURCES) $(STATIC_SOURCES) feread.cc
++ECSOURCES=fereadl.c
+ 
+ SOURCES=${CSOURCES} ${CXXSOURCES} \
+ 	prCopyTemplate.cc \
+@@ -177,13 +178,13 @@ HEADERS=hutil.h idrec.h stairc.h ideals.h \
+ 	p_Procs_Dynamic.h p_Procs_Impl.h p_Procs_Set.h \
+ 	p_Procs.h p_Procs_Static.h p_Mult_q.h gfan.h
+ 
+-DISTFILES=${SOURCES} ${HEADERS} ${ESOURCES} \
++DISTFILES=${SOURCES} ${HEADERS} ${ESOURCES} ${ECSOURCES} \
+         Makefile.in \
+ 	mod2.h.in testgh install-sh mkinstalldirs \
+ 	prCopy.pl
+ 
+ OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o) #$(CXXSOURCES2:.cpp=.o)
+-OBJS2 := $(ESOURCES:.cc=.o)
++OBJS2 := $(ESOURCES:.cc=.o) $(ECSOURCES:.c=.o)
+ OBJSG2 := $(ESOURCES:.cc=.og)
+ OBJSP2 := $(ESOURCES:.cc=.op)
+ 
+@@ -338,8 +339,8 @@ maintainer-clean: distclean srcclean
+ ## miscellanous targets
+ ##
+ 
+-TAGS:   ${SOURCES} ${ESOURCES} ${HEADERS} 
+-	etags ${SOURCES} ${ESOURCES} ${HEADERS}
++TAGS:   ${SOURCES} ${ESOURCES} ${ECSOURCES} ${HEADERS} 
++	etags ${SOURCES} ${ESOURCES} ${ECSOURCES} ${HEADERS}
+ 
+ tags:   
+ 	ctags *.c *.h *.cc *.inc
+@@ -447,7 +448,7 @@ libkernel_p.a: ${OBJP} ${DL_LIBSP} ${OBJSP2}
+ 	echo $(@:.d=.og) $(@:.d=.op) " " \\ > $@
+ 	$(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@
+ 
+-depend:   $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(CSOURCES:.c=.d)
++depend:   $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(ECSOURCES:.c=.d) $(CSOURCES:.c=.d)
+ 	cat *.d *.dd >depend
+ 
+ ifeq (depend,$(wildcard depend))
+diff --git a/kernel/febase.cc b/kernel/febase.cc
+index 6d1bbd4..466a07c 100644
+--- a/kernel/febase.cc
++++ b/kernel/febase.cc
+@@ -27,6 +27,47 @@
+ #include <kernel/dError.h>
+ #include <kernel/options.h>
+ 
++/* some stuff move here from feread.cc: */
++
++/* ===================================================================*/
++/* =                      batch mode                                = */
++/* ===================================================================*/
++/* dummy (for batch mode): */
++char * fe_fgets_dummy(const char *pr,char *s, int size)
++{
++  return NULL;
++}
++
++/* ===================================================================*/
++/* =                        fgets                                   = */
++/* ===================================================================*/
++char * fe_fgets(const char *pr,char *s, int size)
++{
++  if (BVERBOSE(V_PROMPT))
++  {
++    fprintf(stdout,"%s",pr);
++  }
++  mflush();
++  return fgets(s,size,stdin);
++}
++
++char * fe_fgets_stdin_init(const char *pr,char *s, int size) __attribute__((weak));
++char * fe_fgets_stdin_init(const char *pr,char *s, int size) {
++	Werror("No method to read from stdin loaded!\n");
++	return NULL;
++}
++extern "C" {
++void fe_reset_input_mode (void) __attribute__((weak));
++void fe_reset_input_mode (void)
++{
++}
++}
++
++char * (*fe_fgets_stdin)(const char *pr,char *s, int size)
++ = fe_fgets_stdin_init;
++
++/* end of some stuff move here from feread.cc */
++
+ #define fePutChar(c) fputc((unsigned char)(c),stdout)
+ /*0 implementation */
+ 
+diff --git a/kernel/feread.cc b/kernel/feread.cc
+index f3e7f12..0b34d0e 100644
+--- a/kernel/feread.cc
++++ b/kernel/feread.cc
+@@ -36,10 +36,6 @@
+ #include <unistd.h>
+ #endif
+ 
+-static char * fe_fgets_stdin_init(const char *pr,char *s, int size);
+-char * (*fe_fgets_stdin)(const char *pr,char *s, int size)
+- = fe_fgets_stdin_init;
+-
+ extern char *iiArithGetCmd(int);
+ 
+ /* ===================================================================*/
+@@ -295,23 +291,11 @@ char * fe_fgets_stdin_drl(const char *pr,char *s, int size)
+ }
+ #endif
+ 
+-/* ===================================================================*/
+-/* =                        fgets                                   = */
+-/* ===================================================================*/
+-char * fe_fgets(const char *pr,char *s, int size)
+-{
+-  if (BVERBOSE(V_PROMPT))
+-  {
+-    fprintf(stdout,"%s",pr);
+-  }
+-  mflush();
+-  return fgets(s,size,stdin);
+-}
+ 
+ /* ===================================================================*/
+ /* =       init for static rl, dyn. rl, emu. rl                     = */
+ /* ===================================================================*/
+-static char * fe_fgets_stdin_init(const char *pr,char *s, int size)
++char * fe_fgets_stdin_init(const char *pr,char *s, int size)
+ {
+ #if (defined(HAVE_READLINE) || defined(HAVE_LIBREADLINE)) && !defined(HAVE_DYN_RL) && !defined(HAVE_FEREAD)
+   /* Allow conditional parsing of the ~/.inputrc file. */
+@@ -399,12 +383,3 @@ static char * fe_fgets_stdin_init(const char *pr,char *s, int size)
+ #endif
+ }
+ 
+-/* ===================================================================*/
+-/* =                      batch mode                                = */
+-/* ===================================================================*/
+-/* dummy (for batch mode): */
+-char * fe_fgets_dummy(const char *pr,char *s, int size)
+-{
+-  return NULL;
+-}
+-
diff --git a/debian/patches/series b/debian/patches/series
index 80d1d36..b25b4ed 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@
 0007-miscellaneous-Makefile-template-patches.patch
 0008-assert-needs-to-be-defined-after-include-assert.h.patch
 0009-keep-mod2.h-in-Singular.patch
+0010-librariesmove-libreadline-to-main-binary.patch

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list