diff --git a/graphics/lazpaint/Makefile b/graphics/lazpaint/Makefile index 3ed06ed432e0..0dac79bd6a85 100644 --- a/graphics/lazpaint/Makefile +++ b/graphics/lazpaint/Makefile @@ -1,58 +1,58 @@ PORTNAME= lazpaint PORTVERSION= 7.3 DISTVERSIONPREFIX= v -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= graphics PKGNAMESUFFIX= ${LAZARUS_PKGNAMESUFFIX} MAINTAINER= acm@FreeBSD.org COMMENT= Image editor written in Lazarus WWW= https://wiki.freepascal.org/LazPaint LICENSE= GPLv3 -ONLY_FOR_ARCHS= amd64 i386 +ONLY_FOR_ARCHS= aarch64 amd64 i386 gtk2_CONFLICTS_INSTALL= ${PORTNAME}-qt5 ${PORTNAME}-qt6 qt5_CONFLICTS_INSTALL= ${PORTNAME}-gtk2 ${PORTNAME}-qt6 qt6_CONFLICTS_INSTALL= ${PORTNAME}-gtk2 ${PORTNAME}-qt5 USES= desktop-file-utils dos2unix fpc gnome lazarus:flavors xorg USE_XORG= x11 -DOS2UNIX_REGEX= .*\.([txt]|pas|lpi|txt) +DOS2UNIX_REGEX= .*\.([txt]|pas|lpi|txt|inc) USE_GITHUB= yes GH_TAGNAME= a11930b GH_ACCOUNT= bgrabitmap GH_TUPLE= bgrabitmap:bgracontrols:20dbed8:bgracontrols/bgracontrols \ bgrabitmap:bgrabitmap:6ada359:bgrabitmap/bgrabitmapnew USE_GNOME_gtk2= cairo USE_GNOME+= ${USE_GNOME_${FLAVOR}} DESKTOP_ENTRIES="LazPaint" \ "Image editor written in Lazarus" \ "lazpaint" \ "${PREFIX}/bin/lazpaint" \ "Graphics;" \ ${TRUE} LAZARUS_PROJECT_FILES= bgrabitmapnew/bgrabitmap/bgrabitmappack.lpk LAZARUS_PROJECT_FILES+= bgracontrols/bgracontrols.lpk LAZARUS_PROJECT_FILES+= lazpaintcontrols/lazpaintcontrols.lpk LAZARUS_PROJECT_FILES+= lazpaint/lazpaint.lpi LAZBUILD_ARGS= -d --bm=Release post-patch: ${REINPLACE_CMD} 's|%%DATADIR%%|${DATADIR}|g' ${WRKSRC}/lazpaint/utranslation.pas do-install: ${INSTALL_PROGRAM} ${WRKSRC}/lazpaint/release/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} . for RESO in 128 16 24 256 32 48 512 64 96 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${RESO}x${RESO}/apps ${INSTALL_DATA} ${WRKSRC}/resources/icon/${RESO}x${RESO}.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/${RESO}x${RESO}/apps/${PORTNAME}.png . endfor @${MKDIR} ${STAGEDIR}${DATADIR} cd ${WRKSRC}/lazpaint/release/bin && ${COPYTREE_SHARE} "i18n models" ${STAGEDIR}${DATADIR} .include diff --git a/graphics/lazpaint/files/patch-lazpaint_getfilesindir.inc b/graphics/lazpaint/files/patch-lazpaint_getfilesindir.inc new file mode 100644 index 000000000000..85a3e394168e --- /dev/null +++ b/graphics/lazpaint/files/patch-lazpaint_getfilesindir.inc @@ -0,0 +1,29 @@ +--- lazpaint/getfilesindir.inc.orig 2026-08-18 21:04:48 UTC ++++ lazpaint/getfilesindir.inc +@@ -56,7 +56,7 @@ var + MaskList: TMaskList = nil; + Files: TList; + FileItem: TFileItem; +- MaskOptions: TMaskOptions; ++ MaskOptions: TMaskOpCodes; + {$if defined(windows) and not defined(wince)} + ErrMode : LongWord; + {$endif} +@@ -86,15 +86,8 @@ begin + //this behaviour would be incompatible with the situation if no MaskList was used + //and it would break backwards compatibilty and could raise unexpected EConvertError where it did not in the past. + //If you need sets in the MaskList, use the OnAddItem event for that. (BB) +- MaskOptions := [moDisableSets]; +- {$ifdef NotLiteralFilenames} +- if (ACaseSensitivity = mcsCaseSensitive) then +- MaskOptions := [moDisableSets, moCaseSensitive]; +- {$else} +- if (ACaseSensitivity <> mcsCaseInsensitive) then +- MaskOptions := [moDisableSets, moCaseSensitive]; +- {$endif} +- MaskList := TMaskList.Create(AMask, ';', MaskOptions); //False by default ++ MaskOptions := MaskOpCodesDisableRange; ++ MaskList := TMaskList.Create(AMask, ';', True, MaskOptions); //False by default + end; + + try diff --git a/graphics/lazpaint/files/patch-lazpaint_uconfig.pas b/graphics/lazpaint/files/patch-lazpaint_uconfig.pas new file mode 100644 index 000000000000..44816329992c --- /dev/null +++ b/graphics/lazpaint/files/patch-lazpaint_uconfig.pas @@ -0,0 +1,20 @@ +--- lazpaint/uconfig.pas.orig 2026-08-18 19:34:32 UTC ++++ lazpaint/uconfig.pas +@@ -371,7 +371,7 @@ implementation + + implementation + +-uses uparse, LCLProc, BGRAUTF8, LazFileUtils, UFileSystem, UDarkTheme; ++uses uparse, LCLProc, BGRAUTF8, LazFileUtils, UFileSystem, UDarkTheme, GraphMath; + + const maxRecentFiles = 10; + maxRecentDirectories = 10; +@@ -1841,7 +1841,7 @@ begin + begin + currentScreenSize := rect(0,0,screen.Width,screen.Height); + previousScreenSize := DefaultScreenSize; +- if not CompareRect(@previousScreenSize,@currentScreenSize.left) then ++ if not SameRect(@previousScreenSize,@currentScreenSize.left) then + begin + SetDefaultScreenSize(currentScreenSize); + result := true; diff --git a/graphics/lazpaint/files/patch-lazpaint_ugraph.pas b/graphics/lazpaint/files/patch-lazpaint_ugraph.pas index 14726d6d64ad..79f8fe662150 100644 --- a/graphics/lazpaint/files/patch-lazpaint_ugraph.pas +++ b/graphics/lazpaint/files/patch-lazpaint_ugraph.pas @@ -1,11 +1,11 @@ ---- lazpaint/ugraph.pas 2025-06-03 00:14:12.239399000 -0700 -+++ lazpaint/ugraph.pas 2025-06-03 00:14:45.095187000 -0700 -@@ -1206,7 +1206,7 @@ +--- lazpaint/ugraph.pas.orig 2026-08-18 19:05:41 UTC ++++ lazpaint/ugraph.pas +@@ -1206,7 +1206,7 @@ begin w := FramePenWidth*ACanvasScale/10 / 2 + 1; rF := EmptyRectF; for pt in APoints do - rF := rF.Union(RectF(pt + PointF(0.5, 0.5) - PointF(w, w), + rF := rF.Union(BGRABitmapTypes.RectF(pt + PointF(0.5, 0.5) - PointF(w, w), pt + PointF(0.5, 0.5) + PointF(w, w))); result := rect(floor(rF.Left), floor(rF.Top), ceil(rF.Right), ceil(rF.Bottom)); diff --git a/graphics/lazpaint/files/patch-lazpaint_utranslation.pas b/graphics/lazpaint/files/patch-lazpaint_utranslation.pas index fffd78029ac3..57c01249eb94 100644 --- a/graphics/lazpaint/files/patch-lazpaint_utranslation.pas +++ b/graphics/lazpaint/files/patch-lazpaint_utranslation.pas @@ -1,15 +1,31 @@ ---- lazpaint/utranslation.pas 2021-02-18 08:49:03.053438000 -0500 -+++ lazpatin/utranslation.pas 2021-02-18 09:04:38.021589000 -0500 -@@ -85,7 +85,11 @@ +--- lazpaint/utranslation.pas.orig 2026-08-18 19:05:41 UTC ++++ lazpaint/utranslation.pas +@@ -85,7 +85,11 @@ begin else {$ENDIF} {$ENDIF} - result:=ExtractFilePath(Application.ExeName)+AResource+PathDelim; + {$IFDEF FREEBSD} + result:='%%DATADIR%%'+PathDelim+AResource+PathDelim; + {$ELSE} + result:=ExtractFilePath(Application.ExeName)+AResource+PathDelim; + {$ENDIF} {$ENDIF} end; +@@ -164,12 +168,10 @@ function FallbackLanguage: string; + end; + + function FallbackLanguage: string; +-var Lang,FallbackLang: string; ++var LanguageInfo: TLanguageID; + begin +- Lang:=''; +- FallbackLang:=''; +- LazGetLanguageIDs(Lang,FallbackLang); +- result := FallbackLang; ++ LanguageInfo := GetLanguageID; ++ result := LanguageInfo.LanguageCode; + end; + + //translate program