diff -Nru lazarus-0.9.30.2/debian/changelog lazarus-0.9.30.2/debian/changelog --- lazarus-0.9.30.2/debian/changelog 2011-11-23 16:55:04.000000000 +0000 +++ lazarus-0.9.30.2/debian/changelog 2012-02-09 17:29:59.000000000 +0000 @@ -1,3 +1,14 @@ +lazarus (0.9.30.2-2) unstable; urgency=low + + * Set priority according to version so that newer version is automatically + selected. (Closes: Bug#656913) + * Fix target specific compiler flags causing FPC-2.6.0 to abort compilation. + (Closes: Bug#656251) + * Fix hang on IDE and LCL applications on startup when using glib >= 2.31. + (Closes: Bug#659209) + + -- Abou Al Montacir Tue, 09 Feb 2012 16:28:00 +0100 + lazarus (0.9.30.2-1) unstable; urgency=low * New upstream release many fixes and new features. diff -Nru lazarus-0.9.30.2/debian/fixdeb lazarus-0.9.30.2/debian/fixdeb --- lazarus-0.9.30.2/debian/fixdeb 2011-01-21 17:40:31.000000000 +0000 +++ lazarus-0.9.30.2/debian/fixdeb 2012-02-07 17:15:39.000000000 +0000 @@ -2,13 +2,13 @@ # # Create debian files from *.in files # -# $1 = path to debian files -# $2 = fpc target (i386-linux) -# $3 = ppcXXX binary name (ppc386) -# + #set -x if [ $# != 2 ]; then - echo 'Usage : fixdeb ' + echo 'Usage : fixdeb [priority]' + echo ' = path to debian files' + echo ' = fpc target (i386-linux)' + echo ' [priority] = package priority in alternative system' exit 1 fi @@ -18,6 +18,7 @@ DEB_SUBST_SVNPATH=`echo $DEB_SUBST_VERSION | awk -F '.' '{ print "release_"$1"_"$2"_"$3 }'` DEB_SUBST_TARGET="$2" DEB_SUBST_PACKAGESUFFIX=${PACKAGESUFFIX} +DEB_SUBST_PRIORITY=${3:-$(($(echo ${DEB_SUBST_VERSION}.0.0.0.0 | sed -e 's@\([0-9]\)\+\.\([0-9]\)\+\.\([0-9]\+\)\.\([0-9]\+\).*@((\1*100+\2)*100+\3)*100+\4@')))} SUBST_CMD=`set | sed -n -e 's/^DEB_SUBST_\([A-Z_]\+\)=\(.*\)/-e s@\${\1}@\2@g/p'` diff -Nru lazarus-0.9.30.2/debian/lazarus-ide.postinst.in lazarus-0.9.30.2/debian/lazarus-ide.postinst.in --- lazarus-0.9.30.2/debian/lazarus-ide.postinst.in 2010-12-11 15:39:02.000000000 +0000 +++ lazarus-0.9.30.2/debian/lazarus-ide.postinst.in 2012-02-07 17:15:39.000000000 +0000 @@ -6,7 +6,7 @@ # Add alternatives update-alternatives \ - --install /usr/bin/lazarus-ide lazarus-ide ${LAZARUS_DIR}/startlazarus 20 \ + --install /usr/bin/lazarus-ide lazarus-ide ${LAZARUS_DIR}/startlazarus ${PRIORITY} \ --slave /usr/bin/startlazarus startlazarus ${LAZARUS_DIR}/startlazarus \ --slave /usr/share/pixmaps/lazarus.xpm lazarus.xpm /usr/share/pixmaps/lazarus-${VERSION}.xpm diff -Nru lazarus-0.9.30.2/debian/patches/compiler-target-specific-switches.diff lazarus-0.9.30.2/debian/patches/compiler-target-specific-switches.diff --- lazarus-0.9.30.2/debian/patches/compiler-target-specific-switches.diff 1970-01-01 00:00:00.000000000 +0000 +++ lazarus-0.9.30.2/debian/patches/compiler-target-specific-switches.diff 2012-02-07 17:15:39.000000000 +0000 @@ -0,0 +1,72 @@ +This patch fixes compilation abort caused by new FPC 2.6.0 does not like when +we pass -WG compiler flag on targets not supporting GUI application types. + +--- lazarus-0.9.30.2~/ide/compileroptions.pp 2011-11-23 17:14:31.000000000 +0100 ++++ lazarus-0.9.30.2/ide/compileroptions.pp 2012-02-07 12:37:23.000000000 +0100 +@@ -2242,6 +2242,10 @@ + CurCustomOptions: String; + OptimizeSwitches: String; + LinkerAddition: String; ++ Vars: TCTCfgScriptVariables; ++ CurTargetOS: String; ++ CurTargetCPU: String; ++ CurSrcOS: String; + begin + CurMainSrcFile:=MainSourceFileName; + if CurMainSrcFile='' then +@@ -2533,26 +2537,26 @@ + if TargetProcessor<>'' then + Switches:=Switches+' -Op'+UpperCase(TargetProcessor); + ++ CurTargetOS:=''; ++ CurTargetCPU:=''; + if not (ccloNoMacroParams in Flags) then + begin +- { Target OS +- GO32V1 = DOS and version 1 of the DJ DELORIE extender (no longer maintained). +- GO32V2 = DOS and version 2 of the DJ DELORIE extender. +- LINUX = LINUX. +- OS2 = OS/2 (2.x) using the EMX extender. +- WIN32 = Windows 32 bit. +- ... } +- { Target OS } +- if (Globals<>nil) and (Globals.TargetOS<>'') then +- switches := switches + ' -T' + Globals.TargetOS +- else if (TargetOS<>'') then +- switches := switches + ' -T' + TargetOS; +- { Target CPU } +- if (Globals<>nil) and (Globals.TargetCPU<>'') then +- switches := switches + ' -P' + Globals.TargetCPU +- else if (TargetCPU<>'') then +- switches := switches + ' -P' + TargetCPU; ++ Vars:=GetBuildMacroValues(Self,true); ++ if Vars<>nil then ++ begin ++ { Target OS } ++ CurTargetOS:=GetFPCTargetOS(Vars.Values['TargetOS']); ++ if (CurTargetOS<>'') ++ and ((TargetOS<>'') or (CurTargetOS<>GetDefaultTargetOS)) then ++ switches := switches + ' -T' + CurTargetOS; ++ { Target CPU } ++ CurTargetCPU:=GetFPCTargetCPU(Vars.Values['TargetCPU']); ++ if (CurTargetCPU<>'') ++ and ((TargetCPU<>'') or (CurTargetCPU<>GetDefaultTargetCPU)) then ++ switches := switches + ' -P' + CurTargetCPU; ++ end; + end; ++ CurSrcOS:=GetDefaultSrcOSForTargetOS(CurTargetOS); + + { --------------- Linking Tab ------------------- } + +@@ -2616,8 +2620,9 @@ + if LinkerAddition <> '' then + switches := switches + ' ' + LinkerAddition; + end; +- +- if Win32GraphicApp then ++ ++ if Win32GraphicApp ++ and ((CurSrcOS='win') or (CurTargetOS='macos') or (CurTargetOS='os2')) then + switches := switches + ' -WG'; + + { ---------------- Other Tab -------------------- } diff -Nru lazarus-0.9.30.2/debian/patches/fix-hang-when-using-new-glib.diff lazarus-0.9.30.2/debian/patches/fix-hang-when-using-new-glib.diff --- lazarus-0.9.30.2/debian/patches/fix-hang-when-using-new-glib.diff 1970-01-01 00:00:00.000000000 +0000 +++ lazarus-0.9.30.2/debian/patches/fix-hang-when-using-new-glib.diff 2012-02-09 17:29:59.000000000 +0000 @@ -0,0 +1,23 @@ +--- trunk/lcl/interfaces/gtk2/gtk2widgetset.inc 2012/01/07 17:12:12 34639 ++++ trunk/lcl/interfaces/gtk2/gtk2widgetset.inc 2012/01/31 07:12:20 35051 +@@ -1479,8 +1479,10 @@ + if GetThreadManager(TM) and Assigned(TM.InitManager) and g_thread_supported then + begin + g_thread_init(nil); ++ {$IFDEF USE_GTK_MAIN_OLD_ITERATION} + gdk_threads_init; + gdk_threads_enter; ++ {$ENDIF} + fMultiThreadingEnabled := True; + end; + {$ELSE} +@@ -1847,7 +1849,9 @@ + if MultiThreadingEnabled then + begin + {$IFNDEF Win32} ++ {$IFDEF USE_GTK_MAIN_OLD_ITERATION} + gdk_threads_leave; ++ {$ENDIF} + {$ENDIF} + fMultiThreadingEnabled := False; + end; diff -Nru lazarus-0.9.30.2/debian/patches/series lazarus-0.9.30.2/debian/patches/series --- lazarus-0.9.30.2/debian/patches/series 2011-11-23 16:55:37.000000000 +0000 +++ lazarus-0.9.30.2/debian/patches/series 2012-02-09 17:29:59.000000000 +0000 @@ -1,3 +1,5 @@ 01_topmakefile.diff 02_components.diff default_config.diff +compiler-target-specific-switches.diff +fix-hang-when-using-new-glib.diff