Changeset: 2b63ce318788 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2b63ce318788
Modified Files:
        Makefile.ag
        MonetDB.spec
        buildtools/autogen/autogen/am.py
        clients/mapilib/Makefile.ag
        clients/odbc/driver/Makefile.ag
        clients/odbc/setup/Makefile.ag
        common/stream/Makefile.ag
        configure.ag
        debian/control
        debian/libmonetdb-client-odbc.install
        debian/libmonetdb-client-odbc.postinst
        debian/libmonetdb-client-odbc.postrm
        debian/libmonetdb-client-odbc1.postinst
        debian/libmonetdb-client-odbc1.postrm
        debian/libmonetdb-client-odbc11.install
        debian/libmonetdb-client11.install
        debian/libmonetdb-client2.install
        debian/libmonetdb-stream11.install
        debian/libmonetdb-stream2.install
        debian/libmonetdb11.install
        debian/libmonetdb2.install
        debian/libmonetdb4-server-geom.install
        debian/libmonetdb4-server-geom11.install
        debian/libmonetdb4-xquery.install
        debian/libmonetdb4-xquery11.install
        debian/libmonetdb5-server-geom.install
        debian/libmonetdb5-server-geom11.install
        debian/libpf-ferry0.install
        debian/libpf-ferry11.install
        debian/monetdb4-server.install
        debian/monetdb5-server.install
        debian/monetdb5-sql.install
        gdk/Makefile.ag
        geom/monetdb4/Makefile.ag
        geom/monetdb5/Makefile.ag
        libversions
        monetdb4/modules/calibrator/Makefile.ag
        monetdb4/modules/contrib/Makefile.ag
        monetdb4/modules/mapi/Makefile.ag
        monetdb4/modules/mnetcdf/Makefile.ag
        monetdb4/modules/plain/Makefile.ag
        monetdb5/extras/compiler/Makefile.ag
        monetdb5/extras/crackers/Makefile.ag
        monetdb5/extras/rdf/Makefile.ag
        monetdb5/extras/sphinx/Makefile.ag
        monetdb5/extras/xml/Makefile.ag
        monetdb5/tools/Makefile.ag
        pathfinder/compiler/Makefile.ag
        pathfinder/modules/geoxml/Makefile.ag
        pathfinder/modules/pftijah/Makefile.ag
        pathfinder/modules/probxml/Makefile.ag
        pathfinder/runtime/Makefile.ag
        pathfinder/runtime5/Makefile.ag
        sql/backends/monet5/Makefile.ag
        sql/backends/monet5/vaults/Makefile.ag
        template/src/monetdb4/Makefile.ag
        template/src/monetdb5/Makefile.ag
Branch: Mar2011
Log Message:

Use libtool version numbers the way they were intended.

Libraries (the four that are installed in /usr/lib(64)) now have
version numbers which are *independent* of the package version
number.  The library version numbers are stored in the file
`libversions'.
Also, dynamically loaded modules (the .so files in
/usr/lib(64)/monetdb{4,5}/lib) now don't have a version number
anymore.

There are two new flags available in the LIB and LIBS sections of
Makefile.ag: VERSION is the libtool version number (filled in by
configure), and MODULE, when present, says that the library being
produced is, in fact, a module, and hence should not have a version
number.

The ODBC driver is also a type of module, so doesn't have a version
number, even though it is installed in /usr/lib(64).

Note that for Windows nothing changes.


diffs (truncated from 972 to 300 lines):

diff --git a/Makefile.ag b/Makefile.ag
--- a/Makefile.ag
+++ b/Makefile.ag
@@ -25,7 +25,7 @@
        HAVE_JAVA?java \
        HAVE_TESTING?testing \
 
-EXTRA_DIST = bootstrap configure configure.ac configure.ag \
+EXTRA_DIST = bootstrap configure configure.ac configure.ag libversions \
                         MonetDB.spec rpm.mk.in COPYING README license.txt 
HowToStart.rst
 
 EXTRA_DIST_DIR = NT debian template
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -194,8 +194,8 @@
 
 %files client-odbc
 %defattr(-,root,root)
-%{_libdir}/libMonetODBC.*
-%{_libdir}/libMonetODBCs.*
+%{_libdir}/libMonetODBC.so
+%{_libdir}/libMonetODBCs.so
 
 %package client-php
 Summary: MonetDB php interface
@@ -323,7 +323,7 @@
 %files geom-MonetDB4
 %defattr(-,root,root)
 %{_libdir}/monetdb4/geom.mil
-%{_libdir}/monetdb4/lib/lib_geom.so*
+%{_libdir}/monetdb4/lib/lib_geom.so
 
 %package geom-MonetDB5
 Summary: MonetDB5 SQL GIS support module
@@ -346,7 +346,7 @@
 %{_libdir}/monetdb5/autoload/*_geom.mal
 %{_libdir}/monetdb5/createdb/*_geom.sql
 %{_libdir}/monetdb5/geom.mal
-%{_libdir}/monetdb5/lib/lib_geom.so*
+%{_libdir}/monetdb5/lib/lib_geom.so
 
 %package -n MonetDB4-server
 Summary: MonetDB - Monet Database Management System
@@ -395,19 +395,19 @@
 %dir %{_libdir}/monetdb4
 %dir %{_libdir}/monetdb4/lib
 %if %{?_with_netcdf:1}%{!?_with_netcdf:0}
-%exclude %{_libdir}/monetdb4/lib/lib_mnetcdf.so*
+%exclude %{_libdir}/monetdb4/lib/lib_mnetcdf.so
 %exclude %{_libdir}/monetdb4/mnetcdf.mil
 %endif
 %{_libdir}/libmonet.so.*
 %{_libdir}/libbat4.so.*
 %{_libdir}/libstream4.so.*
 %{_libdir}/libmapi4.so.*
-%exclude %{_libdir}/monetdb4/lib/lib_geom.so*
-%exclude %{_libdir}/monetdb4/lib/lib_pathfinder*
+%exclude %{_libdir}/monetdb4/lib/lib_geom.so
+%exclude %{_libdir}/monetdb4/lib/lib_pathfinder.so
 %exclude %{_libdir}/monetdb4/lib/lib_pf*
-%exclude %{_libdir}/monetdb4/lib/lib_probxml*
+%exclude %{_libdir}/monetdb4/lib/lib_probxml.so
 %exclude %{_libdir}/monetdb4/lib/lib_xrpc*
-%{_libdir}/monetdb4/lib/*.so*
+%{_libdir}/monetdb4/lib/*.so
 %exclude %{_libdir}/monetdb4/geom.mil
 %exclude %{_libdir}/monetdb4/pathfinder.mil
 %exclude %{_libdir}/monetdb4/pf*.mil
@@ -434,7 +434,7 @@
 
 %files -n MonetDB4-server-netcdf
 %defattr(-,root,root)
-%{_libdir}/monetdb4/lib/lib_mnetcdf.so*
+%{_libdir}/monetdb4/lib/lib_mnetcdf.so
 %{_libdir}/monetdb4/mnetcdf.mil
 %endif
 
@@ -495,10 +495,10 @@
 %{_libdir}/monetdb5/autoload/*_fits.mal
 %{_libdir}/monetdb5/autoload/*_vault.mal
 %{_libdir}/monetdb5/autoload/*_xml.mal
-%exclude %{_libdir}/monetdb5/lib/lib_geom.*
-# %exclude %{_libdir}/monetdb5/lib/lib_rdf.*
-%exclude %{_libdir}/monetdb5/lib/lib_sql.*
-%{_libdir}/monetdb5/lib/*.so*
+%exclude %{_libdir}/monetdb5/lib/lib_geom.so
+# %exclude %{_libdir}/monetdb5/lib/lib_rdf.so
+%exclude %{_libdir}/monetdb5/lib/lib_sql.so
+%{_libdir}/monetdb5/lib/*.so
 %doc %{_mandir}/man5/monetdb5.conf.5.gz
 
 # %package -n MonetDB5-server-rdf
@@ -517,7 +517,7 @@
 # %files -n MonetDB5-server-rdf
 # %defattr(-,root,root)
 # %{_libdir}/monetdb5/autoload/*_rdf.mal
-# %{_libdir}/monetdb5/lib/lib_rdf.so*
+# %{_libdir}/monetdb5/lib/lib_rdf.so
 # %{_libdir}/monetdb5/rdf.mal
 # %{_libdir}/monetdb5/createdb/*_rdf.sql
 
@@ -544,7 +544,7 @@
 %dir %attr(775,monetdb,monetdb) %{_localstatedir}/log/monetdb
 %dir %attr(775,monetdb,monetdb) %{_localstatedir}/run/monetdb
 %{_libdir}/monetdb5/autoload/*_sql.mal
-%{_libdir}/monetdb5/lib/lib_sql.so*
+%{_libdir}/monetdb5/lib/lib_sql.so
 %{_libdir}/monetdb5/*.sql
 %dir %{_libdir}/monetdb5/createdb
 %exclude %{_libdir}/monetdb5/createdb/*_geom.sql
@@ -585,9 +585,9 @@
 %{_datadir}/monetdb/xrpc/admin/*
 %{_datadir}/monetdb/xrpc/demo/*
 %{_datadir}/monetdb/xrpc/export/*
-%{_libdir}/monetdb4/lib/lib_pathfinder*
+%{_libdir}/monetdb4/lib/lib_pathfinder.so
 %{_libdir}/monetdb4/lib/lib_pf*
-%{_libdir}/monetdb4/lib/lib_probxml*
+%{_libdir}/monetdb4/lib/lib_probxml.so
 %{_libdir}/monetdb4/lib/lib_xrpc*
 %{_libdir}/monetdb4/pathfinder.mil
 %{_libdir}/monetdb4/pf*.mil
diff --git a/buildtools/autogen/autogen/am.py b/buildtools/autogen/autogen/am.py
--- a/buildtools/autogen/autogen/am.py
+++ b/buildtools/autogen/autogen/am.py
@@ -615,6 +615,8 @@
     else:
         ldflags = []
     ldflags.append('-export-dynamic')
+    if binmap.has_key('NOINST'):
+        ldflags.append('-no-install')
     fd.write(am_additional_flags(norm_binname, "", "BIN", ldflags, am))
 
     for src in binmap['SOURCES']:
@@ -706,6 +708,8 @@
         else:
             ldflags = []
         ldflags.append('-export-dynamic')
+        if binsmap.has_key('NOINST'):
+            ldflags.append('-no-install')
         fd.write(am_additional_flags(bin, "", "BIN", ldflags, am))
 
         nsrcs = "nodist_"+am_normalize(bin)+"_SOURCES ="
@@ -825,14 +829,15 @@
         fd.write(am_additional_install_libs(libname, sep, libmap["LIBS"], am))
 
     ldflags = []
-    if sep == '_' and pref == '':
+    if libmap.has_key('MODULE'):
         ldflags.append('-module')
+        ldflags.append('-avoid-version')
     if libmap.has_key("LDFLAGS"):
         for x in libmap["LDFLAGS"]:
             ldflags.append(x)
-    if not libmap.has_key('NOINST'):
-        ldflags.append('-version-number')
-        ldflags.append('$(subst .,:,$(VERSION))')
+    if libmap.has_key('VERSION'):
+        ldflags.append('-version-info')
+        ldflags.append(libmap['VERSION'][0])
 
     for src in libmap['SOURCES']:
         base, ext = split_filename(src)
@@ -931,11 +936,15 @@
             _libs += libsmap["LIBS"]
         if libsmap.has_key("LDFLAGS"):
             _libs += libsmap["LDFLAGS"]
-        fd.write(am_additional_flags(libname, sep, "LIB", 
['-version-number','$(subst .,:,$(VERSION))'], am))
+        if libsmap.has_key('VERSION'):
+            version = ['-version-info', libsmap['VERSION'][0]]
+        elif libsmap.has_key('MODULE'):
+            version = ['-module', '-avoid-version']
+        else:
+            version = []
+        fd.write(am_additional_flags(libname, sep, "LIB", version, am))
         if len(_libs) > 0:
             fd.write(am_additional_libs(libname, sep, "LIB", _libs, am))
-##        if sep == '_':
-##            fd.write(am_additional_flags(libname, sep, "LIB", ['-module'], 
am))
 
         fullpref = "lib"+sep+libname+'_la'
         nsrcs = "nodist_"+fullpref+"_SOURCES ="
diff --git a/clients/mapilib/Makefile.ag b/clients/mapilib/Makefile.ag
--- a/clients/mapilib/Makefile.ag
+++ b/clients/mapilib/Makefile.ag
@@ -20,12 +20,14 @@
 INCLUDES = ../../common/options ../../common/stream $(openssl_CFLAGS)
 
 lib_mapi = {
+       VERSION = $(MAPI_VERSION)
        SOURCES = mapi.mx mapi.rc
        LIBS = $(SOCKET_LIBS) ../../common/stream/libstream \
                ../../common/options/libmoptions $(openssl_LIBS)
 }
 
 lib_mapi4 = {
+       VERSION = $(MAPI_VERSION)
        COND = HAVE_MONETDB4
        SOURCES = mapi.mx mapi.rc
        LIBS = $(SOCKET_LIBS) ../../common/stream/libstream4 \
diff --git a/clients/odbc/driver/Makefile.ag b/clients/odbc/driver/Makefile.ag
--- a/clients/odbc/driver/Makefile.ag
+++ b/clients/odbc/driver/Makefile.ag
@@ -23,6 +23,7 @@
 DEFS = @DEFS@
 
 lib_MonetODBC = {
+       MODULE
        SOURCES = \
        ODBCConvert.c \
        ODBCDbc.c \
diff --git a/clients/odbc/setup/Makefile.ag b/clients/odbc/setup/Makefile.ag
--- a/clients/odbc/setup/Makefile.ag
+++ b/clients/odbc/setup/Makefile.ag
@@ -20,5 +20,6 @@
 DEFS = @DEFS@
 
 lib_MonetODBCs = {
+       MODULE
        SOURCES = drvcfg.c drvcfg.h
 }
diff --git a/common/stream/Makefile.ag b/common/stream/Makefile.ag
--- a/common/stream/Makefile.ag
+++ b/common/stream/Makefile.ag
@@ -29,6 +29,7 @@
 
 lib_stream  =  {
        SOURCES = stream.c stream.h
+       VERSION = $(STREAM_VERSION)
        LIBS = $(SOCKET_LIBS) \
                   $(zlib_LIBS) \
                   $(BZ_LIBS) \
@@ -40,6 +41,7 @@
 lib_stream4  =  {
        COND = HAVE_MONETDB4
        SOURCES = stream.c stream.h
+       VERSION = $(STREAM_VERSION)
        LIBS = $(SOCKET_LIBS) \
                   $(zlib_LIBS) \
                   $(BZ_LIBS) \
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -62,6 +62,12 @@
 SOURCE=[`(cd $srcdir && pwd)`]
 AC_SUBST(SOURCE)
 
+. $srcdir/libversions
+AC_SUBST(GDK_VERSION)
+AC_SUBST(MAPI_VERSION)
+AC_SUBST(MONETDB5_VERSION)
+AC_SUBST(STREAM_VERSION)
+
 # if no --prefix option, we must set Qprefix to the default value
 # the problem is that prefix is set very late in the process if it
 # wasn't set by --prefix
diff --git a/debian/control b/debian/control
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@
 # Build-Depends: libraptor1-dev
 Standards-Version: 3.8.0
 
-Package: libmonetdb11
+Package: libmonetdb2
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Conflicts: libmonetdb1, libmonetdb-dev
@@ -24,7 +24,7 @@
  single shared library.  If you want to use MonetDB, you will certainly
  need this package, but you will also need one of the server packages.
 
-Package: libmonetdb-stream11
+Package: libmonetdb-stream2
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: MonetDB stream library
@@ -48,7 +48,7 @@
  This package contains the files to develop with the
  libmonetdb-stream1 library.
 
-Package: libmonetdb-client11
+Package: libmonetdb-client2
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Conflicts: libmonetdb-client1
@@ -88,7 +88,7 @@
  database so that it can be loaded back later.  If you want to use
  MonetDB, you will very likely need this package.
 
-Package: libmonetdb-client-odbc11
+Package: libmonetdb-client-odbc
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Conflicts: libmonetdb-client-odbc1, libmonetdb-client-odbc-dev
@@ -153,7 +153,7 @@
  MonetDB packages.  You probably don't need this, unless you are a
  developer.
 
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to