Control: tags 933471 + patch Andreas Tille writes: > Would you be able to propose a patch?
Attached. I checked this builds and that the resultant binary package debdiff against the version in unstable looks sensible, but I haven't attempted to test running the result as I don't know anything about computed tomography. I suspect the configure probes could be simplified further by unifying the handling for wxWin too so wx-config is used for that too (then the wx_gtk and wx_mac variables could probably go away) but I resisting touching that. Cheers, Olly
diff -Nru ctsim-6.0.2/debian/changelog ctsim-6.0.2/debian/changelog --- ctsim-6.0.2/debian/changelog 2018-04-26 02:44:10.000000000 +1200 +++ ctsim-6.0.2/debian/changelog 2019-08-01 12:44:48.000000000 +1200 @@ -1,3 +1,11 @@ +ctsim (6.0.2-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Build against GTK+3 flavour of wxWidgets (Closes: #933471) + + New patch: improve-configure-wx-probes.patch + + -- Olly Betts <o...@survex.com> Thu, 01 Aug 2019 12:44:48 +1200 + ctsim (6.0.2-2) unstable; urgency=medium * cme fix dpkg-control diff -Nru ctsim-6.0.2/debian/control ctsim-6.0.2/debian/control --- ctsim-6.0.2/debian/control 2018-04-26 02:44:10.000000000 +1200 +++ ctsim-6.0.2/debian/control 2019-08-01 11:34:29.000000000 +1200 @@ -9,7 +9,7 @@ libreadline-dev, libgl1-mesa-dev, libglu1-mesa-dev, - libwxgtk3.0-dev, + libwxgtk3.0-gtk3-dev, ctn-dev, libpng-dev Standards-Version: 4.1.4 diff -Nru ctsim-6.0.2/debian/patches/improve-configure-wx-probes.patch ctsim-6.0.2/debian/patches/improve-configure-wx-probes.patch --- ctsim-6.0.2/debian/patches/improve-configure-wx-probes.patch 1970-01-01 12:00:00.000000000 +1200 +++ ctsim-6.0.2/debian/patches/improve-configure-wx-probes.patch 2019-08-01 12:44:48.000000000 +1200 @@ -0,0 +1,74 @@ +Description: Improve configure probes related to wxWidgets + Determine wxGTK vs wxMac by looking at output of wx-config --cppflags + rather than probing for particular libraries, the names of which can + vary (for example, depending on the GTK+ major version in use). + . + Don't hard code --version=3.0 in wx-config arguments. That way the + user can specify a different version via alternatives or explicitly on the + configure command line, e.g.: + . + ./configure wxconfig='/usr/bin/wx-config --version=3.1' + . + Remove probes for GTK and glib, which don't seem to be needed. +Author: Olly Betts <o...@survex.com> +Bug-Debian: https://bugs.debian.org/933471 +Forwarded: no +Last-Update: 2019-08-01 + +--- a/configure.ac ++++ b/configure.ac +@@ -71,21 +71,15 @@ + AC_CHECK_LIB(readline, main, [readline=true; + AC_DEFINE([HAVE_READLINE],1,[Readline library])], + [readline=false], [-lcurses]) +-wxwin=false +-AC_CHECK_LIB(gtk-x11-2.0, main, [hasx11gtk2=true], []) +-if test "x$hasx11gtk2" = "x" ; then +- AC_MSG_NOTICE([Does not have X11 GTK2]) +- AC_DEFUN([AM_PATH_GLIB_2_0], []) +- AC_DEFUN([AM_PATH_GTK_2_0], []) +-fi +-if test "$hasx11gtk2" = "true" ; then +- AM_PATH_GLIB_2_0(2.0.0,,AC_MSG_ERROR(You should get glib 2.0.0 or better.)) +- AM_PATH_GTK_2_0(2.0.0,havegtk_am=yes,havegtk_am=no) +- CFLAGS="${CFLAGS} ${g76GTK_CFLAGS} ${GLIB_CFLAGS}" ++wxwin=true ++case `$wxconfig --cppflags 2> /dev/null` in ++ *-D__WXGTK__*) wx_gtk=true ;; ++ *-D__WXMAC__*) wx_mac=true ;; ++ "") wxwin=false ;; ++esac ++if test "$wxwin" = true ; then ++ AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library]) + fi +- +-AC_CHECK_LIB(wx_gtk2u_core-3.0, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library])], [], [-L/usr/lib64 -L/usr/lib ${GTK_LIBS} ${GLIB_LIBS} ]) +-AC_CHECK_LIB(wx_mac_core-3.0, main, [wxwin=true; wx_mac=true; AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library])]) + AC_CHECK_LIB(fftw3, fftw_malloc, [fftw=true; AC_DEFINE(HAVE_FFTW,1,[FFTW library])], [fftw=false], [-L/usr/lib64 -L/usr/lib]) + AC_CHECK_LIB(GL, main, [libgl=true], [libgl=false], [-L/usr/X11R6/lib -L/usr/X11R6/lib64]) + AC_CHECK_LIB(pthread, main, [pthread=true], [pthread=false]) +@@ -384,12 +378,7 @@ + if test "$debug" = "true"; then + wxdebug="--debug" + fi +- if test "x$wx_gtk" != "x" ; then +- ctlib_graphics="$ctlib_graphics `$wxconfig $wxdebug --version=3.0 --libs std,gl` ${GTK_LIBS} ${GLIB_LIBS}" +- +- elif test "x$wx_mac" != "x" ; then +- ctlib_graphics="$ctlib_graphics `$wxconfig $wxdebug --version=3.0 --libs std,gl`" +- fi ++ ctlib_graphics="$ctlib_graphics `$wxconfig $wxdebug --libs std,gl`" + fi + fi + if test "$wxwin" = "true" ; then +@@ -462,8 +451,8 @@ + + if test "$wxwin" = "true" ; then + if test "$wx_gtk" = "true" -o "$wx_mac" = "true" ; then +- wxcflags=`$wxconfig $wxdebug --cxxflags --version=3.0` +- #wxlibs=`$wxconfig --libs` ++ wxcflags=`$wxconfig $wxdebug --cxxflags` ++ wxlibs=`$wxconfig --libs` + else + wxcflags="-D__WXMSW__ -D__WIN32__ -D__GNUWIN32__" + wxlibs="-lwx -lglui -ljpeg -lxpm -lzlib -ltiff" diff -Nru ctsim-6.0.2/debian/patches/series ctsim-6.0.2/debian/patches/series --- ctsim-6.0.2/debian/patches/series 2018-04-26 02:44:10.000000000 +1200 +++ ctsim-6.0.2/debian/patches/series 2019-08-01 12:44:48.000000000 +1200 @@ -1 +1,2 @@ drop_incorrect_cppflags.patch +improve-configure-wx-probes.patch