Merge A. McKinstry's 2.4.2.1-3 upload changes
authorDimitrios Eftaxiopoulos <eftaxi12@otenet.gr>
Sun, 25 Nov 2018 18:58:39 +0000 (20:58 +0200)
committerDimitrios Eftaxiopoulos <eftaxi12@otenet.gr>
Sun, 25 Nov 2018 18:58:39 +0000 (20:58 +0200)
debian/changelog
debian/copyright
debian/patches/python2_and_python3.patch
debian/rules
debian/source/local-options [deleted file]

index 543ae3e6dd5050c27be7e9a0303be78fa75efded..d571e7834c044783498f8648496eac2b0c5b571b 100644 (file)
@@ -1,9 +1,8 @@
-mathgl (2.4.2.1-3) UNRELEASED; urgency=medium
+mathgl (2.4.2.1-3) unstable; urgency=medium
 
-  * Trim trailing whitespace.
-  * Use secure copyright file specification URI.
+  * Fix FTBFS wiht python3.7. Closes: #912590
 
- -- Jelmer Vernooij <jelmer@debian.org>  Wed, 24 Oct 2018 23:14:23 +0000
+ -- Alastair McKinstry <mckinstry@debian.org>  Thu, 01 Nov 2018 17:17:49 +0000
 
 mathgl (2.4.2.1-2) unstable; urgency=medium
 
index 00e0ac10d1f3589fc08dce1d3852c8bb3a2979cf..8e7b039397e1c51022bfe262f9bac9cd2647a5cf 100644 (file)
@@ -1,4 +1,4 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: MathGL
 Upstream-Contact: Alexey Balakin <mathgl.abalakin@gmail.com>
 Source: http://mathgl.sourceforge.net/
index d626181895473fa3cada2d3b1c4314a4d8971640..945ce0d2bcbbd3dabd0ec43725c23ca9e314a5c9 100644 (file)
@@ -1,6 +1,8 @@
 Provide support for both python2 and python3 interfaces
+Index: mathgl-2.4.2.1/lang/python2/CMakeLists.txt
+===================================================================
 --- /dev/null
-+++ b/lang/python2/CMakeLists.txt
++++ mathgl-2.4.2.1/lang/python2/CMakeLists.txt
 @@ -0,0 +1,60 @@
 +set(src_imp_dep
 +../../include/mgl2/type.h
@@ -62,8 +64,10 @@ Provide support for both python2 and python3 interfaces
 +endif(enable-python)
 +
 +set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${mgl_clean_files}")
+Index: mathgl-2.4.2.1/lang/python3/CMakeLists.txt
+===================================================================
 --- /dev/null
-+++ b/lang/python3/CMakeLists.txt
++++ mathgl-2.4.2.1/lang/python3/CMakeLists.txt
 @@ -0,0 +1,70 @@
 +set(src_imp_dep
 +../../include/mgl2/type.h
@@ -79,10 +83,10 @@ Provide support for both python2 and python3 interfaces
 +SET_SOURCE_FILES_PROPERTIES(../mathgl.i ../numpy.i PROPERTIES CPLUSPLUS ON)
 +
 +if(enable-python)
-+      set(Python_ADDITIONAL_VERSIONS 3.6)
++      set(Python_ADDITIONAL_VERSIONS ${PY3VERSION_DOTTED})
 +      unset(PYTHONINTERP_FOUND)
 +      unset(PYTHON_EXECUTABLE CACHE)
-+      FIND_PACKAGE(PythonInterp 3.6 REQUIRED)
++      FIND_PACKAGE(PythonInterp ${PY3VERSION_DOTTED} REQUIRED)
 +      if(NOT PYTHONINTERP_FOUND)
 +              message(SEND_ERROR "Couldn't find python interpreter.")
 +      endif(NOT PYTHONINTERP_FOUND)
@@ -94,7 +98,7 @@ Provide support for both python2 and python3 interfaces
 +      unset(PYTHONLIBS_VERSION_STRING CACHE)
 +      unset(PYTHON_LIBRARY CACHE)
 +      unset(PYTHON_INCLUDE_DIR CACHE)
-+      FIND_PACKAGE(PythonLibs 3.6 REQUIRED)
++      FIND_PACKAGE(PythonLibs ${PY3VERSION_DOTTED} REQUIRED)
 +      if(NOT PYTHONLIBS_FOUND)
 +              message(SEND_ERROR "Couldn't find python development libraries.")
 +      endif(NOT PYTHONLIBS_FOUND)
@@ -129,14 +133,16 @@ Provide support for both python2 and python3 interfaces
 +      )
 +      add_custom_target(mglp3_python_module ALL DEPENDS _mathglp3 mathgl.pyc)
 +
-+      install(FILES ${MathGL2_BINARY_DIR}/lang/python3/mathgl.py ${MathGL2_BINARY_DIR}/lang/python3/__pycache__/mathgl.cpython-36.pyc DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/__pycache__)
++      install(FILES ${MathGL2_BINARY_DIR}/lang/python3/mathgl.py ${MathGL2_BINARY_DIR}/lang/python3/__pycache__/mathgl.cpython-${PY3VERSION_NODOT}.pyc DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/__pycache__)
 +      install (TARGETS _mathglp3 LIBRARY DESTINATION ${MGL_PYTHON_SITE_PACKAGES})
 +      set(mgl_clean_files ${mgl_clean_files} mathgl.py)
 +endif(enable-python)
 +
 +set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${mgl_clean_files}")
---- a/lang/numpy.i
-+++ b/lang/numpy.i
+Index: mathgl-2.4.2.1/lang/numpy.i
+===================================================================
+--- mathgl-2.4.2.1.orig/lang/numpy.i
++++ mathgl-2.4.2.1/lang/numpy.i
 @@ -107,11 +107,12 @@
      if (PyDict_Check(    py_obj)) return "dict"        ;
      if (PyList_Check(    py_obj)) return "list"        ;
@@ -154,9 +160,11 @@ Provide support for both python2 and python3 interfaces
    }
  
    /* Given a NumPy typecode, return a string describing the type.
---- a/lang/CMakeLists.txt
-+++ b/lang/CMakeLists.txt
-@@ -17,52 +17,6 @@
+Index: mathgl-2.4.2.1/lang/CMakeLists.txt
+===================================================================
+--- mathgl-2.4.2.1.orig/lang/CMakeLists.txt
++++ mathgl-2.4.2.1/lang/CMakeLists.txt
+@@ -17,52 +17,6 @@ if(NOT SWIG_FOUND)
  endif(NOT SWIG_FOUND)
  INCLUDE(${SWIG_USE_FILE})
  
@@ -209,7 +217,7 @@ Provide support for both python2 and python3 interfaces
  if(enable-lua)
        INCLUDE(FindLua51)
        if(NOT LUA51_FOUND)
-@@ -145,4 +99,8 @@
+@@ -145,4 +99,8 @@ message(STATUS "${oct_prog} ${oct_host}
        endif(enable-octave-install)
        set(mgl_clean_files ${mgl_clean_files} mathgl)
  endif(enable-octave)
@@ -218,3 +226,18 @@ Provide support for both python2 and python3 interfaces
 +add_subdirectory( python3 )
 +
  set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${mgl_clean_files}")
+Index: mathgl-2.4.2.1/CMakeLists.txt
+===================================================================
+--- mathgl-2.4.2.1.orig/CMakeLists.txt
++++ mathgl-2.4.2.1/CMakeLists.txt
+@@ -9,6 +9,10 @@ set(mgl_clean_files )
+ set(MGL_DEP_LIBS)
+ add_definitions(-DMGL_SRC)
++# Set these on command-line
++# set(PY3VERSION_DOTTED 3.6)
++# set(PY3VERSION_NODOT  36)
++
+ #add_definitions(-DZLIB_WINAPI)
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${MathGL2_SOURCE_DIR}/scripts)
index 3ceb32f61d7ef234428033af2132e006ab190aac..64beed8bb53af73f9785f4ca26adb5f542cdd1a5 100755 (executable)
 export DH_VERBOSE=1
 export DH_OPTIONS=-v
 
+DOTTED:=`py3versions -d  |  sed 's/python//' `
+NODOT:=`py3versions -d | sed 's/\.//' | sed 's/python//' `
+
 %:
        dh $@ --buildsystem=cmake --with python2,python3
 
+
+override_dh_auto_configure:
+       dh_auto_configure -- \
+               -DPY3VERSION_DOTTED=$(DOTTED) -DPY3VERSION_NODOT=$(NODOT)       
+
 override_dh_python2:
        dh_numpy
        
diff --git a/debian/source/local-options b/debian/source/local-options
deleted file mode 100644 (file)
index d4bb316..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-unapply-patches