File 0001-build-adequate-SO-versioning-for-shipped-libraries.patch of Package singular
From 33c8141335fa5e8aba28a56e42f9ac5fc279bd8c Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Thu, 6 Dec 2012 04:14:03 +0100
Subject: [PATCH] build: adequate SO versioning for shipped libraries
There seems to be no agenda for shared library ABI version management,
so just add "-release" to all to make sure the names are unique in a
system.
---
Singular/Makefile.am | 3 +++
findexec/Makefile.am | 3 +++
kernel/Makefile.am | 3 +++
libpolys/coeffs/Makefile.am | 3 +++
libpolys/misc/Makefile.am | 3 +++
libpolys/polys/Makefile.am | 2 ++
libpolys/reporter/Makefile.am | 2 ++
numeric/Makefile.am | 3 +++
omalloc/Makefile.am | 3 +++
9 files changed, 25 insertions(+)
diff --git a/Singular/Makefile.am b/Singular/Makefile.am
index 6e1daa6..040e84d 100644
--- a/Singular/Makefile.am
+++ b/Singular/Makefile.am
@@ -39,6 +39,9 @@ libSingular_g_la_CXXFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE} $(
libSingular_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DLIBSINGULAR
libSingular_g_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DLIBSINGULAR
+libSingular_la_LDFLAGS = -release ${PACKAGE_VERSION}
+libSingular_g_la_LDFLAGS = ${libSingular_la_LDFLAGS}
+
SOURCES = Minor.cc\
MinorInterface.cc\
MinorProcessor.cc\
diff --git a/findexec/Makefile.am b/findexec/Makefile.am
index 1561c3c..1ec0bae 100644
--- a/findexec/Makefile.am
+++ b/findexec/Makefile.am
@@ -25,6 +25,9 @@ AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir}
libfindexec_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
libfindexec_g_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
+libfindexec_la_LDFLAGS = -release ${PACKAGE_VERSION}
+libfindexec_g_la_LDFLAGS = ${libfindexec_la_LDFLAGS}
+
SOURCES = omFindExec.c feResource.cc feFopen.cc
libfindexec_la_SOURCES = $(SOURCES)
libfindexec_g_la_SOURCES = $(SOURCES)
diff --git a/kernel/Makefile.am b/kernel/Makefile.am
index ff5f2b1..9619e0c 100644
--- a/kernel/Makefile.am
+++ b/kernel/Makefile.am
@@ -20,6 +20,9 @@ endif
libkernel_LTLIBRARIES = libkernel.la ${LIB_G}
libkerneldir = $(libdir)/singular
+libkernel_la_LDFLAGS = -release ${PACKAGE_VERSION}
+libkernel_g_la_LDFLAGS = ${libkernel_la_LDFLAGS}
+
libkernel_la_CFLAGS = -O3 -fomit-frame-pointer -Wextra -Wall -Wno-long-long ${PIPE}
libkernel_g_la_CFLAGS = -g -Wextra -Wall -Wno-long-long -pedantic ${PIPE}
## -pedantic
diff --git a/libpolys/coeffs/Makefile.am b/libpolys/coeffs/Makefile.am
index 5cc6f6a..2ecc018 100644
--- a/libpolys/coeffs/Makefile.am
+++ b/libpolys/coeffs/Makefile.am
@@ -22,6 +22,9 @@ libcoeffs_g_la_CXXFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE} ${CX
libcoeffs_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
libcoeffs_g_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
+libcoeffs_la_LDFLAGS = -release ${PACKAGE_VERSION}
+libcoeffs_g_la_LDFLAGS = ${libcoeffs_la_LDFLAGS}
+
# noinst_HEADERS= \
# gnumpc.h gnumpfl.h longrat.h modulop.h ffields.h \
diff --git a/libpolys/misc/Makefile.am b/libpolys/misc/Makefile.am
index a641f4d..88d1956 100644
--- a/libpolys/misc/Makefile.am
+++ b/libpolys/misc/Makefile.am
@@ -22,6 +22,9 @@ libmisc_g_la_CXXFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE} ${CXXT
libmisc_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
libmisc_g_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
+libmisc_la_LDFLAGS = -release ${PACKAGE_VERSION}
+libmisc_g_la_LDFLAGS = ${libmisc_la_LDFLAGS}
+
SOURCES = intvec.cc int64vec.cc options.c
libmisc_la_SOURCES = $(SOURCES)
libmisc_g_la_SOURCES = $(SOURCES)
diff --git a/libpolys/polys/Makefile.am b/libpolys/polys/Makefile.am
index ae314ad..8397ee9 100644
--- a/libpolys/polys/Makefile.am
+++ b/libpolys/polys/Makefile.am
@@ -139,6 +139,8 @@ EXTRA_libpolys_la_SOURCES = templates/p_Procs_Static.cc templates/p_Procs_Dynami
libpolys_g_la_CXXFLAGS = ${DEBUGCXXFLAGS}
libpolys_la_CPPFLAGS = ${NODEBUGDEFS} ${AM_CPPFLAGS}
+libpolys_la_LDFLAGS = -release ${PACKAGE_VERSION}
+libpolys_g_la_LDFLAGS = ${libpolys_la_LDFLAGS}
diff --git a/libpolys/reporter/Makefile.am b/libpolys/reporter/Makefile.am
index 8bc4b3f..1801c69 100644
--- a/libpolys/reporter/Makefile.am
+++ b/libpolys/reporter/Makefile.am
@@ -22,6 +22,8 @@ libreporter_g_la_CXXFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE} ${
libreporter_la_CPPFLAGS = ${AM_CPPFLAGS} -DNDEBUG -DOM_NDEBUG -DHAVE_CONFIG_H
libreporter_g_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
+libreporter_la_LDFLAGS = -release ${PACKAGE_VERSION}
+libreporter_g_la_LDFLAGS = ${libreporter_la_LDFLAGS}
SOURCES = dError.cc reporter.cc
libreporter_la_SOURCES = $(SOURCES)
diff --git a/numeric/Makefile.am b/numeric/Makefile.am
index 6cc205c..1431f7d 100644
--- a/numeric/Makefile.am
+++ b/numeric/Makefile.am
@@ -9,6 +9,9 @@ libnumericdir = $(libdir)/singular
CXXTEMPLFLAGS =-ftrapv ## -fno-implicit-templates
+libnumeric_la_LDFLAGS = -release ${PACKAGE_VERSION}
+libnumeric_g_la_LDFLAGS = ${libnumeric_la_LDFLAGS}
+
libnumeric_la_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
libnumeric_g_la_CFLAGS = ${PIPE}
diff --git a/omalloc/Makefile.am b/omalloc/Makefile.am
index 318a2ba..ebfb466 100644
--- a/omalloc/Makefile.am
+++ b/omalloc/Makefile.am
@@ -48,6 +48,9 @@ nodist_libomalloc_include_HEADERS = omConfig.h mylimits.h omTables.h
libomalloc_la_CPPFLAGS = ${AM_CPPFLAGS} -DOM_ALLOC_INTERNAL -DHAVE_CONFIG_H
libomalloc_g_la_CPPFLAGS= ${AM_CPPFLAGS} -DOM_ALLOC_INTERNAL -DHAVE_CONFIG_H
+libomalloc_la_LDFLAGS = -release ${PACKAGE_VERSION}
+libomalloc_g_la_LDFLAGS = ${libomalloc_la_LDFLAGS}
+
BUILT_SOURCES = omTables.inc omTables.h
omTables.inc: omTables omalloc.h
--
1.7.10.4