From: Rafael Laboissière Date: Fri, 7 Jan 2022 16:32:46 +0000 (-0300) Subject: d/p/libs-version-soversion.patch: New patch X-Git-Tag: archive/raspbian/8.0.1-1+rpi1^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=750a6637f9aeb8ebf07d69480465e6a6f4868d59;p=mathgl.git d/p/libs-version-soversion.patch: New patch --- diff --git a/debian/patches/libs-version-soversion.patch b/debian/patches/libs-version-soversion.patch new file mode 100644 index 0000000..4d5ae95 --- /dev/null +++ b/debian/patches/libs-version-soversion.patch @@ -0,0 +1,147 @@ +Description: Set soversions and versions for each library separately +Author: Rafael Laboissière +Forwarded: https://groups.google.com/g/mathgl/c/aCPIFMmKDSs/m/dIX8lfIdDQAJ +Last-Update: 2022-01-06 + +--- mathgl-8.0.orig/CMakeLists.txt ++++ mathgl-8.0/CMakeLists.txt +@@ -29,7 +29,6 @@ set(MathGL_VERSION_MAJOR 8) + set(MathGL_VERSION_MINOR 0) + set(MathGL_PATCH_VERSION 0) + set(MathGL_VERSION ${MathGL_VERSION_MAJOR}.${MathGL_VERSION_MINOR}.${MathGL_PATCH_VERSION}) +-set(MathGL_SOVERSION 8.0) + string(TIMESTAMP MathGL_DATE UTC) + + if(CMAKE_BUILD_TYPE STREQUAL "Debug") +@@ -79,10 +80,13 @@ function(mgl_add_lib mgl_tmp_lib) + set(mgllib2 mgl2-${mgl_tmp_lib}) + endif(${mgl_tmp_lib} MATCHES mgl) + set(mgl_src_lst ${ARGV}) +- list(REMOVE_AT mgl_src_lst 0) ++ list(GET mgl_src_lst 1 soversion) ++ list(GET mgl_src_lst 2 version) ++ list(REMOVE_AT mgl_src_lst 0 1 2) + add_library(${mgllib} SHARED ${mgl_src_lst}) + add_library(${mgllib}-static STATIC ${mgl_src_lst}) +- set_target_properties(${mgllib} PROPERTIES SOVERSION ${MathGL_SOVERSION}) ++ set_target_properties(${mgllib} PROPERTIES SOVERSION ${soversion}) ++ set_target_properties(${mgllib} PROPERTIES VERSION ${version}) + set_target_properties(${mgllib} PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS") + set_target_properties(${mgllib} PROPERTIES C_VISIBILITY_PRESET hidden) + set_target_properties(${mgllib} PROPERTIES CXX_VISIBILITY_PRESET hidden) +--- mathgl-8.0.orig/src/CMakeLists.txt ++++ mathgl-8.0/src/CMakeLists.txt +@@ -47,7 +47,9 @@ if(MGL_HAVE_OPENGL) + endif(MGL_HAVE_OPENGL) + + include(GenerateExportHeader) +-mgl_add_lib(mgl ${mgl_src} ${mgl_hdr}) ++set(mgl_lib_SOVERSION 8) ++set(mgl_lib_VERSION 8.0.0) ++mgl_add_lib(mgl ${mgl_lib_SOVERSION} ${mgl_lib_VERSION} ${mgl_src} ${mgl_hdr}) + generate_export_header(mgl EXPORT_FILE_NAME ../include/mgl2/dllexport.h) + + target_link_libraries(mgl ${MGL_DEP_LIBS}) +@@ -56,7 +56,9 @@ target_link_libraries(mgl-static ${MGL_D + mgl_po_src(${mgl_src} ${mgl_hdr}) + + if(MGL_HAVE_MPI) +- mgl_add_lib(mpi mpi.cpp ../include/mgl2/mpi.h) ++ set(mgl_mpi_SOVERSION 8) ++ set(mgl_mpi_VERSION 8.0.0) ++ mgl_add_lib(mpi ${mgl_mpi_SOVERSION} ${mgl_mpi_VERSION} mpi.cpp ../include/mgl2/mpi.h) + target_link_libraries(mgl-mpi ${MPI_LIBRARIES} ) + target_link_libraries(mgl-mpi-static ${MPI_LIBRARIES} ) + target_include_directories(mgl-mpi SYSTEM PUBLIC ${MPI_CXX_INCLUDE_PATH}) +--- mathgl-8.0.orig/widgets/CMakeLists.txt ++++ mathgl-8.0/widgets/CMakeLists.txt +@@ -5,7 +5,9 @@ if(MSVC) + endif(MSVC) + + if(MGL_HAVE_FLTK) +- mgl_add_lib(fltk fltk.cpp image.cpp image.h ../include/mgl2/fltk.h ../include/mgl2/Fl_MathGL.h) ++ set(mgl_fltk_SOVERSION 8) ++ set(mgl_fltk_VERSION 8.0.0) ++ mgl_add_lib(fltk ${mgl_fltk_SOVERSION} ${mgl_fltk_VERSION} fltk.cpp image.cpp image.h ../include/mgl2/fltk.h ../include/mgl2/Fl_MathGL.h) + target_include_directories(mgl-fltk SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) + target_include_directories(mgl-fltk-static SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) + target_link_libraries(mgl-fltk mgl ${FLTK_LIBRARIES}) +@@ -13,7 +15,9 @@ if(MGL_HAVE_FLTK) + endif(MGL_HAVE_FLTK) + + if(MGL_HAVE_GLUT) +- mgl_add_lib(glut glut.cpp ../include/mgl2/glut.h) ++ set(mgl_glut_SOVERSION 8) ++ set(mgl_glut_VERSION 8.0.0) ++ mgl_add_lib(glut ${mgl_glut_SOVERSION} ${mgl_glut_VERSION} glut.cpp ../include/mgl2/glut.h) + target_include_directories(mgl-glut SYSTEM PUBLIC ${GLUT_INCLUDE_DIR}) + target_include_directories(mgl-glut-static SYSTEM PUBLIC ${GLUT_INCLUDE_DIR}) + target_link_libraries(mgl-glut mgl ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES}) +@@ -21,7 +25,9 @@ if(MGL_HAVE_GLUT) + endif(MGL_HAVE_GLUT) + + if(MGL_HAVE_WX) +- mgl_add_lib(wx wx.cpp ../include/mgl2/wx.h) ++ set(mgl_wx_SOVERSION 8) ++ set(mgl_wx_VERSION 8.0.0) ++ mgl_add_lib(wx ${mgl_wx_SOVERSION} ${mgl_wx_VERSION} wx.cpp ../include/mgl2/wx.h) + include(${wxWidgets_USE_FILE}) + target_link_libraries(mgl-wx mgl ${wxWidgets_LIBRARIES}) + target_link_libraries(mgl-wx-static mgl-static ${wxWidgets_LIBRARIES}) +--- mathgl-8.0.orig/widgets/qt4/CMakeLists.txt ++++ mathgl-8.0/widgets/qt4/CMakeLists.txt +@@ -3,17 +3,23 @@ include(GenerateExportHeader) + if(enable-qt4) + include(../../scripts/qt4.cmake) + set(MGL_QT4_FILES ../qt.cpp ../../include/mgl2/qt.h ../../include/mgl2/qmathgl.h) +- mgl_add_lib(qt4 ${MGL_QT4_FILES}) ++ set(mgl_qt4_SOVERSION 8) ++ set(mgl_qt4_VERSION 8.0.0) ++ mgl_add_lib(qt4 $(mgl_qt4_SOVERSION) $(mgl_qt4_VERSION) ${MGL_QT4_FILES}) + target_link_libraries(mgl-qt4 mgl ${MGL_QT4_LIBS}) + target_link_libraries(mgl-qt4-static mgl-static ${MGL_QT4_LIBS}) + if(enable-qt4asqt) +- mgl_add_lib(qt ${MGL_QT4_FILES}) ++ set(mgl_qt_SOVERSION 8) ++ set(mgl_qt_VERSION 8.0.0) ++ mgl_add_lib(mgl_qt $(mgl_qt4_SOVERSION) $(mgl_qt4_VERSION) ${MGL_QT4_FILES}) + target_link_libraries(mgl-qt mgl ${MGL_QT4_LIBS}) + target_link_libraries(mgl-qt-static mgl-static ${MGL_QT4_LIBS}) + endif(enable-qt4asqt) + + if(MGL_HAVE_FLTK AND NOT enable-qt5) +- mgl_add_lib(wnd ${MGL_QT4_FILES} ../fltk.cpp ../../include/mgl2/fltk.h ../image.cpp ../image.h) ++ set(mgl_wnd_SOVERSION 8) ++ set(mgl_wnd_VERSION 8.0.0) ++ mgl_add_lib(wnd $(mgl_wnd_SOVERSION) $(mgl_wnd_VERSION) ${MGL_QT4_FILES} ../fltk.cpp ../../include/mgl2/fltk.h ../image.cpp ../image.h) + target_include_directories(mgl-wnd SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) + target_include_directories(mgl-wnd-static SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) + target_link_libraries(mgl-wnd mgl ${FLTK_LIBRARIES} ${MGL_QT4_LIBS}) +--- mathgl-8.0.orig/widgets/qt5/CMakeLists.txt ++++ mathgl-8.0/widgets/qt5/CMakeLists.txt +@@ -3,16 +3,22 @@ include(GenerateExportHeader) + if(enable-qt5) + include(../../scripts/qt5.cmake) + set(MGL_QT5_FILES ../qt.cpp ../../include/mgl2/qt.h ../../include/mgl2/qmathgl.h) +- mgl_add_lib(qt5 ${MGL_QT5_FILES}) ++ set(mgl_qt5_SOVERSION 8) ++ set(mgl_qt5_VERSION 8.0.0) ++ mgl_add_lib(qt5 ${mgl_qt5_SOVERSION} ${mgl_qt5_VERSION} ${MGL_QT5_FILES}) + target_link_libraries(mgl-qt5 mgl ${MGL_QT5_LIBS}) + target_link_libraries(mgl-qt5-static mgl-static ${MGL_QT5_LIBS}) + if(enable-qt5asqt) +- mgl_add_lib(qt ${MGL_QT5_FILES}) ++ set(mgl_qt_SOVERSION 8) ++ set(mgl_qt_VERSION 8.0.0) ++ mgl_add_lib(qt ${mgl_qt_SOVERSION} ${mgl_qt_VERSION} ${MGL_QT5_FILES}) + target_link_libraries(mgl-qt mgl ${MGL_QT5_LIBS}) + target_link_libraries(mgl-qt-static mgl-static ${MGL_QT5_LIBS}) + endif(enable-qt5asqt) + if(MGL_HAVE_FLTK) +- mgl_add_lib(wnd ${MGL_QT5_FILES} ../fltk.cpp ../../include/mgl2/fltk.h ../image.cpp ../image.h) ++ set(mgl_wnd_SOVERSION 8) ++ set(mgl_wnd_VERSION 8.0.0) ++ mgl_add_lib(wnd ${mgl_wnd_SOVERSION} ${mgl_wnd_VERSION} ${MGL_QT5_FILES} ../fltk.cpp ../../include/mgl2/fltk.h ../image.cpp ../image.h) + target_include_directories(mgl-wnd SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) + target_include_directories(mgl-wnd-static SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) + target_link_libraries(mgl-wnd mgl ${FLTK_LIBRARIES} ${MGL_QT5_LIBS}) diff --git a/debian/patches/series b/debian/patches/series index 38edaa7..0816c81 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ spelling-errors.patch +libs-version-soversion.patch