From fdc345358ec50498365017eb5c1f43e93617c0dd Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 8 Jul 2003 20:09:40 +0000 Subject: [PATCH] updated build fpc rpm script git-svn-id: trunk@4387 - --- lcl/interfaces/gtk/gtkwinapi.inc | 52 ++++++++++++++++++++++---------- tools/install/build_fpc_rpm.sh | 10 ++++-- 2 files changed, 43 insertions(+), 19 deletions(-) diff --git a/lcl/interfaces/gtk/gtkwinapi.inc b/lcl/interfaces/gtk/gtkwinapi.inc index b8ef778f5d..d7b5385f91 100644 --- a/lcl/interfaces/gtk/gtkwinapi.inc +++ b/lcl/interfaces/gtk/gtkwinapi.inc @@ -8186,48 +8186,65 @@ var //---------- function NoDrawableToNoDrawable: Boolean; - const // FROM TO + {const // FROM TO BLT_MATRIX: array[TGDIBitmapType, TGDIBitmapType] of TBltFunction = ( (@DrawableToDrawable, @BitmapToPixmap, @BitmapToImage), (@PixmapToBitmap, @DrawableToDrawable, @PixmapToImage), (@ImageToBitmap, @ImageToDrawable, @ImageToImage) - ); + );} begin If (TDeviceContext(SrcDC).CurrentBitmap <> nil) and (TDeviceContext(DestDC).CurrentBitmap <> nil) then - Result := BLT_MATRIX[ - TDeviceContext(SrcDC).CurrentBitmap^.GDIBitmapType, - TDeviceContext(DestDC).CurrentBitmap^.GDIBitmapType - ]() + case TDeviceContext(SrcDC).CurrentBitmap^.GDIBitmapType of + gbBitmap: case TDeviceContext(DestDC).CurrentBitmap^.GDIBitmapType of + gbBitmap: Result:=DrawableToDrawable; + gbPixmap: Result:=BitmapToPixmap; + gbImage: Result:=BitmapToImage; + end; + gbPixmap: case TDeviceContext(DestDC).CurrentBitmap^.GDIBitmapType of + gbBitmap: Result:=PixmapToBitmap; + gbPixmap: Result:=DrawableToDrawable; + gbImage: Result:=PixmapToImage; + end; + gbImage: case TDeviceContext(DestDC).CurrentBitmap^.GDIBitmapType of + gbBitmap: Result:=ImageToBitmap; + gbPixmap: Result:=ImageToDrawable; + gbImage: Result:=ImageToImage; + end; + end else Result := Unsupported; end; function NoDrawableToDrawable: Boolean; - const + {const BLT_FUNCTION: array[TGDIBitmapType] of TBltFunction = ( @PixmapToDrawable, @PixmapToDrawable, @ImageToDrawable - ); + );} begin If TDeviceContext(SrcDC).CurrentBitmap <> nil then - Result := BLT_FUNCTION[ - TDeviceContext(SrcDC).CurrentBitmap^.GDIBitmapType - ]() + case TDeviceContext(SrcDC).CurrentBitmap^.GDIBitmapType of + gbBitmap: Result:=PixmapToDrawable; + gbPixmap: Result:=PixmapToDrawable; + gbImage: Result:=ImageToDrawable; + end else Result := Unsupported; end; function DrawableToNoDrawable: Boolean; - const + {const BLT_FUNCTION: array[TGDIBitmapType] of TBltFunction = ( @Unsupported, @Unsupported, @Unsupported - ); + );} begin If TDeviceContext(DestDC).CurrentBitmap <> nil then - Result := BLT_FUNCTION[ - TDeviceContext(DestDC).CurrentBitmap^.GDIBitmapType - ]() + case TDeviceContext(DestDC).CurrentBitmap^.GDIBitmapType of + gbBitmap: Result:=Unsupported; + gbPixmap: Result:=Unsupported; + gbImage: Result:=Unsupported; + end else Result := Unsupported; end; @@ -8589,6 +8606,9 @@ end; { ============================================================================= $Log$ + Revision 1.262 2003/07/08 20:09:40 mattias + updated build fpc rpm script + Revision 1.261 2003/07/07 07:59:34 mattias made Size_SourceIsInterface a flag diff --git a/tools/install/build_fpc_rpm.sh b/tools/install/build_fpc_rpm.sh index 4571a24212..f530395ed7 100644 --- a/tools/install/build_fpc_rpm.sh +++ b/tools/install/build_fpc_rpm.sh @@ -54,7 +54,10 @@ VersionFile="$TmpDir/compiler/version.pas" CompilerVersion=`cat $VersionFile | grep ' *version_nr *=.*;' | sed -e 's/[^0-9]//g'` CompilerRelease=`cat $VersionFile | grep ' *release_nr *=.*;' | sed -e 's/[^0-9]//g'` CompilerPatch=`cat $VersionFile | grep ' *patch_nr *=.*;' | sed -e 's/[^0-9]//g'` -LazVersion="$CompilerVersion.$CompilerRelease.$CompilerPatch" +LazVersion="$CompilerVersion.$CompilerRelease" +if [ "$CompilerPatch" != "0" ]; then + LazVersion="$LazVersion.$CompilerPatch" +fi SpecFile=$TmpDir/install/fpc.spec @@ -80,11 +83,12 @@ fi # change Makefile for new rpmbuild, if not already done cd $TmpDir -grep rpmbuild Makefile \ -|| cat Makefile | \ +if [ -n `grep rpmbuild Makefile` ]; then + cat Makefile | \ sed -e 's/rpm\( --nodeps -ba .*\)$/rpm\1 || rpmbuild\1/g' \ > New.Makefile mv New.Makefile Makefile +fi cd - #------------------------------------------------------------------------------