Wednesday, August 30, 2023

Re: UPDATE: x11/fvwm3 to 1.0.7

Stuart Henderson wrote (2023-08-30 10:45 CEST):
> > > manually for now. Further some *.adoc files required setting the correct
> > > absolute path in the include statement which is what the sed run in
> ...
> > If you don't set SEPARATE_BUILD=yes, then the manpage generation happens
> > as intended and the mess goes away :)
>
> yes this is a classic case of the problems often caused by
> SEPARATE_BUILD. (another classic is tests failing).
>
> I would not normally recommend SEPARATE_BUILD unless a port takes so
> long to extract that "make clean=build" actually saves much real time
> compared to "make clean;make patch"..
>
> > There's no good way to handle a conflict that's introduced with an
> > update. So what we would do is to move the manpages into the install
> > directory. (thanks to espie@ for the suggestion)
> >
> > You'll then get a nice little info to add this path to your man path
> > when the package is installed:
> >
> > --- +fvwm3-1.0.7 -------------------
> > You may wish to add /usr/local/share/fvwm3/man to /etc/man.conf
>
> This does make sense for the manpages for libexec files. However
> I think it might be nice to keep the non-conflicting manuals in
> the old location, which is in the default search path, so that
> commands like "man fvwm3" work out of the box.
>
> i.e. mv man1/fvwm3*.1 and man1/FvwmCommand3.1 to prefix/man/man1.

We can do either an ugly roundtrip move:

mv ${WRKINST}/${TRUEPREFIX}/man/man1/* \
${WRKINST}/${TRUEPREFIX}/share/fvwm3/man/man1/
mv ${WRKINST}/${TRUEPREFIX}/share/fvwm3/man/man1/{fvwm3,FvwmCom}* \
${WRKINST}/${TRUEPREFIX}/man/man1/

Or some ugly globbing:

mv ${WRKINST}/${TRUEPREFIX}/man/man1/Fvwm{A,B,Con,E,F,I,M,P,R,S}* \
${WRKINST}/${TRUEPREFIX}/share/fvwm3/man/man1/

Patch below with the globbing solution.

I'll look further if I can make --mandir work. But this can be done in
tree as well.

OK/Comments for this patch?

- Stefan

Index: x11/fvwm3/Makefile
===================================================================
RCS file: /cvs/ports/x11/fvwm3/Makefile,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 Makefile
--- x11/fvwm3/Makefile 24 Jan 2023 18:05:35 -0000 1.8
+++ x11/fvwm3/Makefile 30 Aug 2023 17:29:54 -0000
@@ -1,6 +1,6 @@
COMMENT= multiple virtual desktop window manager

-VERSION= 1.0.6a
+VERSION= 1.0.7
DISTNAME= fvwm3-${VERSION}

CATEGORIES= x11
@@ -20,13 +20,14 @@ WANTLIB += readline rsvg-2 event_core ev

MASTER_SITES= https://github.com/fvwmorg/fvwm3/releases/download/${VERSION}/

+BUILD_DEPENDS+= textproc/asciidoctor
+
LIB_DEPENDS+= graphics/png \
x11/gnome/librsvg \
devel/libevent2

SUBST_VARS= VERSION

-SEPARATE_BUILD= Yes
CONFIGURE_STYLE= gnu

CONFIGURE_ARGS+= --enable-mandoc \
@@ -39,7 +40,13 @@ CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -

DEBUG_PACKAGES = ${BUILD_PACKAGES}

+USE_GMAKE = yes
+
post-install:
+ ${INSTALL_DATA_DIR} ${WRKINST}/${TRUEPREFIX}/share/fvwm3/man/man1
+ mv ${WRKINST}/${TRUEPREFIX}/man/man1/Fvwm{A,B,Con,E,F,I,M,P,R,S}* \
+ ${WRKINST}/${TRUEPREFIX}/share/fvwm3/man/man1/
+ mv ${WRKINST}/${TRUEPREFIX}/man/man1/FvwmCommand{,3}.1
mv ${WRKINST}/${TRUEPREFIX}/bin/FvwmCommand{,3}
mv ${WRKINST}/${TRUEPREFIX}/share/FvwmScript-* \
${WRKINST}/${TRUEPREFIX}/share/fvwm3/
Index: x11/fvwm3/distinfo
===================================================================
RCS file: /cvs/ports/x11/fvwm3/distinfo,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 distinfo
--- x11/fvwm3/distinfo 22 Jan 2023 12:11:26 -0000 1.3
+++ x11/fvwm3/distinfo 30 Aug 2023 17:29:54 -0000
@@ -1,2 +1,2 @@
-SHA256 (fvwm3-1.0.6a.tar.gz) = RmWmYTPgcLeRkXsHlMxt9rdUZ56+kTBxhCfbZHm7W2g=
-SIZE (fvwm3-1.0.6a.tar.gz) = 4538100
+SHA256 (fvwm3-1.0.7.tar.gz) = OqzXz+/2DbG82cdzMtxXX+dxHS0wbwR5UlN43G2z0x4=
+SIZE (fvwm3-1.0.7.tar.gz) = 4512128
Index: x11/fvwm3/patches/patch-configure
===================================================================
RCS file: /cvs/ports/x11/fvwm3/patches/patch-configure,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-configure
--- x11/fvwm3/patches/patch-configure 13 Oct 2022 16:00:45 -0000 1.3
+++ x11/fvwm3/patches/patch-configure 30 Aug 2023 17:29:54 -0000
@@ -1,7 +1,7 @@
Index: configure
--- configure.orig
+++ configure
-@@ -11779,7 +11779,7 @@ then :
+@@ -11726,7 +11726,7 @@ then :
else $as_nop

with_intl=maybe
Index: x11/fvwm3/patches/patch-default-config_Makefile_in
===================================================================
RCS file: /cvs/ports/x11/fvwm3/patches/patch-default-config_Makefile_in,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-default-config_Makefile_in
--- x11/fvwm3/patches/patch-default-config_Makefile_in 13 Oct 2022 16:00:45 -0000 1.3
+++ x11/fvwm3/patches/patch-default-config_Makefile_in 30 Aug 2023 17:29:54 -0000
@@ -1,7 +1,7 @@
Index: default-config/Makefile.in
--- default-config/Makefile.in.orig
+++ default-config/Makefile.in
-@@ -593,9 +593,10 @@ uninstall-am: uninstall-configDATA
+@@ -574,9 +574,10 @@ uninstall-am: uninstall-configDATA

install-data-hook:
cp -r $(srcdir)/images $(inst_location)/default-config
Index: x11/fvwm3/patches/patch-fvwm_ewmh_c
===================================================================
RCS file: x11/fvwm3/patches/patch-fvwm_ewmh_c
diff -N x11/fvwm3/patches/patch-fvwm_ewmh_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ x11/fvwm3/patches/patch-fvwm_ewmh_c 30 Aug 2023 17:29:54 -0000
@@ -0,0 +1,24 @@
+https://github.com/fvwmorg/fvwm3/commit/4d5a697fac3282af18cacebb6d061c92db410f1a
+Fixes https://github.com/fvwmorg/fvwm3/issues/873
+
+Index: fvwm/ewmh.c
+--- fvwm/ewmh.c.orig
++++ fvwm/ewmh.c
+@@ -458,7 +458,7 @@ void *atom_get(Window win, Atom to_get, Atom type, int
+ int asize;
+
+ asize = atom_size(format_ret);
+- data = fxmalloc(num_ret * asize);
++ data = fxmalloc(num_ret * asize + 1);
+ if (format_ret == 32 && asize * 8 != format_ret)
+ {
+ int i;
+@@ -472,7 +472,7 @@ void *atom_get(Window win, Atom to_get, Atom type, int
+ {
+ if (data)
+ {
+- memcpy(data, retval, num_ret * asize);
++ memcpy(data, retval, num_ret * asize + 1);
+ }
+ }
+ XFree(retval);
Index: x11/fvwm3/pkg/PLIST
===================================================================
RCS file: /cvs/ports/x11/fvwm3/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 PLIST
--- x11/fvwm3/pkg/PLIST 22 Jan 2023 12:11:26 -0000 1.3
+++ x11/fvwm3/pkg/PLIST 30 Aug 2023 17:29:54 -0000
@@ -25,9 +25,18 @@ libexec/fvwm3/${VERSION}/FvwmPerl
@bin libexec/fvwm3/${VERSION}/FvwmRearrange
@bin libexec/fvwm3/${VERSION}/FvwmScript
libexec/fvwm3/${VERSION}/FvwmTalk
+@man man/man1/FvwmCommand3.1
+@man man/man1/fvwm3-convert-2.6.1
+@man man/man1/fvwm3-menu-desktop.1
@man man/man1/fvwm3-menu-directory.1
@man man/man1/fvwm3-menu-xlock.1
@man man/man1/fvwm3-perllib.1
+@man man/man1/fvwm3-root.1
+@man man/man1/fvwm3.1
+@man man/man1/fvwm3all.1
+@man man/man1/fvwm3commands.1
+@man man/man1/fvwm3menus.1
+@man man/man1/fvwm3styles.1
share/fvwm3/
share/fvwm3/ConfigFvwmBacker
share/fvwm3/ConfigFvwmButtons
@@ -139,6 +148,23 @@ share/fvwm3/locale/zh_CN/
share/fvwm3/locale/zh_CN/LC_MESSAGES/
share/fvwm3/locale/zh_CN/LC_MESSAGES/FvwmScript.mo
share/fvwm3/locale/zh_CN/LC_MESSAGES/fvwm.mo
+@mandir share/fvwm3/man/
+share/fvwm3/man/man1/
+@man share/fvwm3/man/man1/FvwmAnimate.1
+@man share/fvwm3/man/man1/FvwmAuto.1
+@man share/fvwm3/man/man1/FvwmBacker.1
+@man share/fvwm3/man/man1/FvwmButtons.1
+@man share/fvwm3/man/man1/FvwmConsole.1
+@man share/fvwm3/man/man1/FvwmEvent.1
+@man share/fvwm3/man/man1/FvwmForm.1
+@man share/fvwm3/man/man1/FvwmIconMan.1
+@man share/fvwm3/man/man1/FvwmIdent.1
+@man share/fvwm3/man/man1/FvwmMFL.1
+@man share/fvwm3/man/man1/FvwmPager.1
+@man share/fvwm3/man/man1/FvwmPerl.1
+@man share/fvwm3/man/man1/FvwmPrompt.1
+@man share/fvwm3/man/man1/FvwmRearrange.1
+@man share/fvwm3/man/man1/FvwmScript.1
share/fvwm3/perllib/
share/fvwm3/perllib/FVWM/
share/fvwm3/perllib/FVWM/Commands.pm

No comments:

Post a Comment