Why not use sed instead of Perl? — Antoine
> On 26 Jul 2021, at 11:06, Charlene Wendling <juliana...@posteo.jp> wrote: > > On Mon, 26 Jul 2021 09:04:47 +0200 > Matthieu Herrb <matth...@openbsd.org> wrote: > >>> On Sun, Jul 25, 2021 at 06:16:05PM +0200, Matthieu Herrb wrote: >>> On Fri, Jul 16, 2021 at 10:47:39AM -0600, Denis Fondras wrote: >>>> CVSROOT: /cvs >>>> Module name: ports >>>> Changes by: de...@cvs.openbsd.org 2021/07/16 >>>> 10:47:39 >>>> >>>> Modified files: >>>> graphics/flameshot: Makefile distinfo >>>> graphics/flameshot/pkg: PLIST >>>> Added files: >>>> graphics/flameshot/patches: patch-src_CMakeLists_txt >>>> >>>> Log message: >>>> Update to 0.10.0 >>>> >>>> Patch by Stefan Hagen <sh+openbsd-ports codevoid de> >>>> Help and OK sthen@ >>> >>> Hi, >>> >>> >>> Looks like this broke the .desktop file >>> (/usr/local/share/applications/org.flameshot.Flameshot.desktop). >>> It now contains: >>> >>> Exec=/usr/bin/flameshot >>> >>> Which obviously doesn't work. >>> >> >> Possible fix: >> >> Index: Makefile >> =================================================================== >> RCS file: /cvs/OpenBSD/ports/graphics/flameshot/Makefile,v >> retrieving revision 1.5 >> diff -u -p -u -r1.5 Makefile >> --- Makefile 16 Jul 2021 16:47:38 -0000 1.5 >> +++ Makefile 26 Jul 2021 05:41:37 -0000 >> @@ -1,6 +1,7 @@ >> # $OpenBSD: Makefile,v 1.5 2021/07/16 16:47:38 denis Exp $ >> >> COMMENT = powerful yet simple to use screenshot software >> +REVISION = 0 >> CATEGORIES = graphics x11 >> >> GH_ACCOUNT = flameshot-org >> @@ -25,6 +26,10 @@ RUN_DEPENDS = devel/desktop-file-utils \ >> x11/gtk+3,-guic >> >> CONFIGURE_ARGS += -DENABLE_CACHE=OFF >> + >> +post-patch: >> + perl -pi -e 's,/usr/bin/,${LOCALBASE}/bin/,' \ >> + $ >> {WRKSRC}/data/desktopEntry/package/org.flameshot.Flameshot.desktop >> NO_TEST = Yes >> >> >> -- >> Matthieu Herrb >> > > By the way, while running configure i hit this: > > -- Found Git: /usr/local/bin/git (found version "2.32.0") > git found: /usr/local/bin/git in version 2.32.0 > fatal: not a git repository (or any parent up to mount point /) > Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not > set). > FLAMESHOT_GIT_HASH: > > I have disabled git for the build in the below diff. > > I don't know if using ${SUBST_CMD} with a patched .desktop file is > preferable or not (i would have done it that way). > > OK cwen@ either way. > > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/graphics/flameshot/Makefile,v > retrieving revision 1.5 > diff -u -p -u -p -r1.5 Makefile > --- Makefile 16 Jul 2021 16:47:38 -0000 1.5 > +++ Makefile 26 Jul 2021 08:54:25 -0000 > @@ -1,6 +1,7 @@ > # $OpenBSD: Makefile,v 1.5 2021/07/16 16:47:38 denis Exp $ > > COMMENT = powerful yet simple to use screenshot software > +REVISION = 0 > CATEGORIES = graphics x11 > > GH_ACCOUNT = flameshot-org > @@ -24,7 +25,12 @@ LIB_DEPENDS = x11/qt5/qtsvg > RUN_DEPENDS = devel/desktop-file-utils \ > x11/gtk+3,-guic > > -CONFIGURE_ARGS += -DENABLE_CACHE=OFF > +CONFIGURE_ARGS += -DENABLE_CACHE=OFF \ > + -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE > + > +post-patch: > + perl -pi -e 's,/usr/bin/,${LOCALBASE}/bin/,' \ > + ${WRKSRC}/data/desktopEntry/package/org.flameshot.Flameshot.desktop > > NO_TEST = Yes > > >