pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/wm/emwm-utils



Module Name:    pkgsrc
Committed By:   vins
Date:           Sun Dec  8 15:09:54 UTC 2024

Modified Files:
        pkgsrc/wm/emwm-utils: Makefile PLIST distinfo
        pkgsrc/wm/emwm-utils/patches: patch-src_smconf.h
Added Files:
        pkgsrc/wm/emwm-utils/patches: patch-Makefile patch-mf_Makefile.pkgsrc
            patch-src_common.mf

Log Message:
wm/emwm: few enhancements

* Switch to a unified makefile, replacing per-platform makefiles.
* Standardise build environment.
* Install system-wide configuration at the right location.

Revision bumped.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 pkgsrc/wm/emwm-utils/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/wm/emwm-utils/PLIST
cvs rdiff -u -r1.4 -r1.5 pkgsrc/wm/emwm-utils/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/wm/emwm-utils/patches/patch-Makefile \
    pkgsrc/wm/emwm-utils/patches/patch-mf_Makefile.pkgsrc \
    pkgsrc/wm/emwm-utils/patches/patch-src_common.mf
cvs rdiff -u -r1.1 -r1.2 pkgsrc/wm/emwm-utils/patches/patch-src_smconf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/wm/emwm-utils/Makefile
diff -u pkgsrc/wm/emwm-utils/Makefile:1.6 pkgsrc/wm/emwm-utils/Makefile:1.7
--- pkgsrc/wm/emwm-utils/Makefile:1.6   Sun Feb 11 11:24:43 2024
+++ pkgsrc/wm/emwm-utils/Makefile       Sun Dec  8 15:09:54 2024
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.6 2024/02/11 11:24:43 vins Exp $
+# $NetBSD: Makefile,v 1.7 2024/12/08 15:09:54 vins Exp $
 
 DISTNAME=      emwm-utils-src-1.2
 PKGNAME=       ${DISTNAME:S,-src,,}
+PKGREVISION=   1
 CATEGORIES=    wm x11
 MASTER_SITES=  https://fastestcode.org/dl/
 EXTRACT_SUFX=  .tar.xz
@@ -11,40 +12,25 @@ HOMEPAGE=   https://fastestcode.org/emwm.h
 COMMENT=       Companion utilies for EMWM
 LICENSE=       mit
 
-MAKEFLAGS+=    PREFIX=${PREFIX}
+USE_TOOLS+=            sed
+USE_BSD_MAKEFILE=      yes
 
-.include "../../mk/bsd.prefs.mk"
+RCDIR=         ${PREFIX}/lib/X11
 
-.if ${OPSYS} != "NetBSD"
-USE_TOOLS+=    gmake
-.endif
-
-INSTALLATION_DIRS=     bin ${PKGMANDIR}/man1
-INSTALLATION_DIRS+=    share/examples/${PKGBASE}
-INSTALLATION_DIRS+=    lib/X11/app-defaults
+SUBST_CLASSES+=                pkgsrc
+SUBST_STAGE.pkgsrc=    pre-configure
+SUBST_FILES.pkgsrc=    mf/Makefile.pkgsrc
+SUBST_VARS.pkgsrc=     PREFIX PKGMANDIR RCDIR
+SUBST_MESSAGE.pkgsrc=  Replacing pkgsrc placeholders
+
+MAKE_FLAGS+=   CC=${CC:Q}
+MAKE_FLAGS+=   SED=${SED:Q}
+MAKE_FLAGS+=   CFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+=   LDFLAGS=${LDFLAGS:Q}
 
 SETUID_ROOT_PERMS?=    ${REAL_ROOT_USER} ${BINGRP} 4755
 SPECIAL_PERMS+=                bin/xmsm ${SETUID_ROOT_PERMS}
 
-do-install:
-.for p in xmtoolbox xmsm
-       ${INSTALL_PROGRAM} ${WRKSRC}/src/${p} \
-       ${DESTDIR}${PREFIX}/bin
-.endfor
-.for m in xmtoolbox xmsm
-       ${INSTALL_MAN} ${WRKSRC}/src/${m}.1 \
-       ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
-.endfor
-       ${INSTALL_SCRIPT} ${WRKSRC}/src/xmsession ${DESTDIR}${PREFIX}/bin
-
-post-install:
-.for f in XmSm XmToolbox
-       ${INSTALL_DATA} ${WRKSRC}/src/${f}.ad \
-       ${DESTDIR}${PREFIX}/lib/X11/app-defaults/${f}
-.endfor
-       ${INSTALL_DATA} ${WRKSRC}/src/toolboxrc \
-       ${DESTDIR}${PREFIX}/share/examples/${PKGBASE}
-
 .include "../../x11/libXScrnSaver/buildlink3.mk"
 .include "../../x11/libXrandr/buildlink3.mk"
 .include "../../x11/libXinerama/buildlink3.mk"

Index: pkgsrc/wm/emwm-utils/PLIST
diff -u pkgsrc/wm/emwm-utils/PLIST:1.1 pkgsrc/wm/emwm-utils/PLIST:1.2
--- pkgsrc/wm/emwm-utils/PLIST:1.1      Mon Jul  4 20:20:56 2022
+++ pkgsrc/wm/emwm-utils/PLIST  Sun Dec  8 15:09:54 2024
@@ -1,9 +1,9 @@
-@comment $NetBSD: PLIST,v 1.1 2022/07/04 20:20:56 pin Exp $
+@comment $NetBSD: PLIST,v 1.2 2024/12/08 15:09:54 vins Exp $
 bin/xmsession
 bin/xmsm
 bin/xmtoolbox
 lib/X11/app-defaults/XmSm
 lib/X11/app-defaults/XmToolbox
+lib/X11/toolboxrc
 man/man1/xmsm.1
 man/man1/xmtoolbox.1
-share/examples/emwm-utils/toolboxrc

Index: pkgsrc/wm/emwm-utils/distinfo
diff -u pkgsrc/wm/emwm-utils/distinfo:1.4 pkgsrc/wm/emwm-utils/distinfo:1.5
--- pkgsrc/wm/emwm-utils/distinfo:1.4   Sun Feb 11 11:24:43 2024
+++ pkgsrc/wm/emwm-utils/distinfo       Sun Dec  8 15:09:54 2024
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.4 2024/02/11 11:24:43 vins Exp $
+$NetBSD: distinfo,v 1.5 2024/12/08 15:09:54 vins Exp $
 
 BLAKE2s (emwm-utils-src-1.2.tar.xz) = dba390087d0be17ac03c7490e72e9c4f464d7feb9d3490c01e595d7f5baeb5bb
 SHA512 (emwm-utils-src-1.2.tar.xz) = ed63c1e21d367114e3543c752d8b0937c331377a8b07bf050aea557007de7e697a11d1bb94d6e217a20be0608b42f841f425c7f98e42b66150fe7ad2a0f6376d
 Size (emwm-utils-src-1.2.tar.xz) = 28072 bytes
-SHA1 (patch-src_smconf.h) = 73536d4c118cf112b9df7108b25734f69a49358a
+SHA1 (patch-Makefile) = 1316be75730b7823d5f0f00adb243bc5b9100f26
+SHA1 (patch-mf_Makefile.pkgsrc) = 26f8fa4ee7d57d1c1ed0bfea46c19302d4e1e5fd
+SHA1 (patch-src_common.mf) = b913975cad546897c73383e08d01bdc3ca051666
+SHA1 (patch-src_smconf.h) = 5d13a8334e89bff3dbb7fe998869d75378d9aadd

Index: pkgsrc/wm/emwm-utils/patches/patch-src_smconf.h
diff -u pkgsrc/wm/emwm-utils/patches/patch-src_smconf.h:1.1 pkgsrc/wm/emwm-utils/patches/patch-src_smconf.h:1.2
--- pkgsrc/wm/emwm-utils/patches/patch-src_smconf.h:1.1 Mon Jul  4 20:20:56 2022
+++ pkgsrc/wm/emwm-utils/patches/patch-src_smconf.h     Sun Dec  8 15:09:54 2024
@@ -1,15 +1,36 @@
-$NetBSD: patch-src_smconf.h,v 1.1 2022/07/04 20:20:56 pin Exp $
+$NetBSD: patch-src_smconf.h,v 1.2 2024/12/08 15:09:54 vins Exp $
 
-Enable suspending from xmsm(1) on NetBSD.
+* Enable suspending from xmsm(1) on NetBSD.
+* Support session management on SunOS. 
 
---- src/smconf.h.orig  2022-04-12 15:12:11.000000000 +0000
+--- src/smconf.h.orig  2024-01-03 16:20:35.000000000 +0000
 +++ src/smconf.h
-@@ -39,6 +39,8 @@
+@@ -27,18 +27,28 @@
+ #ifndef SHUTDOWN_CMD
+ #ifdef __linux__
+ #define SHUTDOWN_CMD    "/sbin/poweroff"
++#elif __sun
++#define SHUTDOWN_CMD  "/usr/sbin/poweroff"
+ #else
+ #define SHUTDOWN_CMD    "/sbin/shutdown -p now"
+ #endif
+ #endif /* SHUTDOWN_CMD */
+ 
+ #ifndef REBOOT_CMD
++#ifdef __sun
++#define REBOOT_CMD    "/usr/sbin/reboot"
++#else
+ #define REBOOT_CMD      "/sbin/reboot"
+ #endif
++#endif /* REBOOT_CMD */
+ 
  #ifndef SUSPEND_CMD
  #ifdef __linux__
  #define SUSPEND_CMD     "/usr/sbin/pm-suspend"
 +#elif __NetBSD__
 +#define SUSPEND_CMD     "/sbin/sysctl -w hw.acpi.sleep.state=3"
++#elif __sun
++#define SUSPEND_CMD   "/usr/bin/sys-suspend -x"
  #else /* BSD */
  #define SUSPEND_CMD     "/usr/sbin/zzz"
  #endif /* _linux_ */

Added files:

Index: pkgsrc/wm/emwm-utils/patches/patch-Makefile
diff -u /dev/null pkgsrc/wm/emwm-utils/patches/patch-Makefile:1.1
--- /dev/null   Sun Dec  8 15:09:54 2024
+++ pkgsrc/wm/emwm-utils/patches/patch-Makefile Sun Dec  8 15:09:54 2024
@@ -0,0 +1,18 @@
+$NetBSD: patch-Makefile,v 1.1 2024/12/08 15:09:54 vins Exp $
+
+Prefer pkgsrc Makefile.
+
+--- Makefile.orig      2024-12-08 10:46:59.443489899 +0000
++++ Makefile
+@@ -2,7 +2,10 @@ all:
+       @if [ -e src/Makefile ]; then \
+               $(MAKE) -C src $(MAKEFLAGS); \
+       else \
+-              if [ -e mf/Makefile.$$(uname) ]; then \
++               if [ -e mf/Makefile.pkgsrc ]; then \
++                      ln -s ../mf/Makefile.pkgsrc src/Makefile && \
++                      $(MAKE) -C src $(MAKEFLAGS); \
++              elif [ -e mf/Makefile.$$(uname) ]; then \
+                       ln -s ../mf/Makefile.$$(uname) src/Makefile && \
+                       $(MAKE) -C src $(MAKEFLAGS); \
+               else \
Index: pkgsrc/wm/emwm-utils/patches/patch-mf_Makefile.pkgsrc
diff -u /dev/null pkgsrc/wm/emwm-utils/patches/patch-mf_Makefile.pkgsrc:1.1
--- /dev/null   Sun Dec  8 15:09:54 2024
+++ pkgsrc/wm/emwm-utils/patches/patch-mf_Makefile.pkgsrc       Sun Dec  8 15:09:54 2024
@@ -0,0 +1,25 @@
+$NetBSD: patch-mf_Makefile.pkgsrc,v 1.1 2024/12/08 15:09:54 vins Exp $
+
+Add custom Makefile for pkgsrc.
+
+--- mf/Makefile.pkgsrc.orig    2024-12-08 14:52:35.378535425 +0000
++++ mf/Makefile.pkgsrc
+@@ -0,0 +1,18 @@
++# EMWM pkgsrc Makefile
++
++PREFIX = @PREFIX@
++BINDIR = @PREFIX@/bin
++MANDIR = @PREFIX@/@PKGMANDIR@
++RCDIR = @RCDIR@
++APPLRESDIR = $(RCDIR)/app-defaults
++
++DEFINES = -DPREFIX='"$(PREFIX)"' -DRCDIR='"$(RCDIR)"'
++
++SYSLIBS = -lcrypt
++
++.include "common.mf"
++
++.c.o:
++      $(CC) $(CFLAGS) $(DEFINES) -c -o $(<:.c=.o) $>
++
++install: common_install
Index: pkgsrc/wm/emwm-utils/patches/patch-src_common.mf
diff -u /dev/null pkgsrc/wm/emwm-utils/patches/patch-src_common.mf:1.1
--- /dev/null   Sun Dec  8 15:09:54 2024
+++ pkgsrc/wm/emwm-utils/patches/patch-src_common.mf    Sun Dec  8 15:09:54 2024
@@ -0,0 +1,79 @@
+$NetBSD: patch-src_common.mf,v 1.1 2024/12/08 15:09:54 vins Exp $
+
+* Use standard CFLAGS and LDFLAGS.
+* Provide a pkgsrc-compliant install target.
+
+--- src/common.mf.orig 2024-01-03 16:20:35.000000000 +0000
++++ src/common.mf
+@@ -1,6 +1,5 @@
+ # Common Makefile part, included by platform specific makefiles
+ 
+-CFLAGS += -DPREFIX='"$(PREFIX)"' -DRCDIR='"$(RCDIR)"' $(INCDIRS)
+ toolbox_libs =  -lXm -lXt -lX11
+ xmsm_libs = -lXm -lXt -lXss -lXrandr -lXinerama -lX11 $(SYSLIBS)
+ 
+@@ -15,49 +14,37 @@ executables = xmsm xmtoolbox xmsession
+ all: $(executables) $(app_defaults) 
+ 
+ xmtoolbox: $(toolbox_objs) $(common_objs)
+-      $(CC) -o $@ $(LDFLAGS) $(LIBDIRS) $(toolbox_objs) $(common_objs) $(toolbox_libs)
++      $(CC) -o $@ $(LDFLAGS) $(toolbox_objs) $(common_objs) $(toolbox_libs)
+ 
+ xmsm: $(xmsm_objs) $(common_objs)
+-      $(CC) -o $@ $(LDFLAGS) $(LIBDIRS) $(xmsm_objs) $(common_objs) $(xmsm_libs)
++      $(CC) -o $@ $(LDFLAGS) $(xmsm_objs) $(common_objs) $(xmsm_libs)
+ 
+ xmsession: xmsession.src
+-      sed s%PREFIX%$(PREFIX)%g xmsession.src > $@
++      $(SED) s%PREFIX%$(PREFIX)%g xmsession.src > $@
+       chmod 775 $@
+ 
+ XmSm.ad: XmSm.ad.src
+-      sed s%PREFIX%$(PREFIX)%g XmSm.ad.src > $@
++      $(SED) s%PREFIX%$(PREFIX)%g XmSm.ad.src > $@
+ 
+ XmToolbox.ad: XmToolbox.ad.src
+-      sed s%PREFIX%$(PREFIX)%g XmToolbox.ad.src > $@
++      $(SED) s%PREFIX%$(PREFIX)%g XmToolbox.ad.src > $@
+ 
+ .PHONY: clean install common_install
+ 
+ common_install:
+-      install -m775 xmsession $(PREFIX)/bin/xmsession
+-      install -m775 xmtoolbox $(PREFIX)/bin/xmtoolbox
+-      install -m4775 xmsm $(PREFIX)/bin/xmsm
+-      install -m775 -d $(MANDIR)/man1
+-      install -m664 xmtoolbox.1 $(MANDIR)/man1/xmtoolbox.1
+-      install -m664 xmsm.1 $(MANDIR)/man1/xmsm.1
+-      install -m775 -d $(APPLRESDIR)
+-      install -m664 XmSm.ad $(APPLRESDIR)/XmSm
+-      install -m664 XmToolbox.ad $(APPLRESDIR)/XmToolbox
+-      install -m664 toolboxrc $(RCDIR)/toolboxrc
+-
+-uninstall:
+-      rm -f $(PREFIX)/bin/xmsm
+-      rm -f $(PREFIX)/bin/xmsession
+-      rm -f $(PREFIX)/bin/xmtoolbox
+-      rm -f $(MANDIR)/man1/xmtoolbox.1
+-      rm -f $(MANDIR)/man1/xmtoolbox.1
+-      rm -f $(APPLRESDIR)/XmSm
+-      rm -f $(APPLRESDIR)/XmToolbox
+-      rm -f $(RCDIR)/toolboxrc
+-      rmdir $(RCDIR)
++      $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(BINDIR)
++      $(BSD_INSTALL_PROGRAM) xmsm xmtoolbox $(DESTDIR)$(BINDIR)
++      $(BSD_INSTALL_SCRIPT) xmsession $(DESTDIR)$(BINDIR)
++      $(BSD_INSTALL_MAN_DIR) $(DESTDIR)$(MANDIR)/man1
++      $(BSD_INSTALL_MAN) xmtoolbox.1 xmsm.1 $(DESTDIR)$(MANDIR)/man1
++      $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(RCDIR) $(DESTDIR)$(APPLRESDIR)
++      $(BSD_INSTALL_DATA) toolboxrc $(DESTDIR)$(RCDIR)/toolboxrc
++      $(BSD_INSTALL_DATA) XmSm.ad $(DESTDIR)$(APPLRESDIR)/XmSm
++      $(BSD_INSTALL_DATA) XmToolbox.ad $(DESTDIR)$(APPLRESDIR)/XmToolbox
+ 
+ clean:
+       -rm $(toolbox_objs) $(xmsm_objs) $(common_objs) $(executables) $(app_defaults)
+       -rm .depend
+ 
+ .depend:
+-      $(CC) -MM $(INCDIRS) $(toolbox_objs:.o=.c) $(xmsm_objs:.o=.c) $(common_objs:.o=.c) > $@
++      $(CC) -MM $(CFLAGS) $(DEFINES) $(toolbox_objs:.o=.c) $(xmsm_objs:.o=.c) $(common_objs:.o=.c) > $@



Home | Main Index | Thread Index | Old Index