From nobody Tue Dec 19 06:31:51 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SvRgC6FJzz54lSf; Tue, 19 Dec 2023 06:31:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SvRgC4Mxzz3c71; Tue, 19 Dec 2023 06:31:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702967511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=guGzWamOBe0Axr1PMgaTtfm2aGGgDDYT4YRY2WSTpG8=; b=biU/pszE+zZAJiYJNsHJ6EIjm71iIpZv0xCEDsJcUu8mvewUTCM2TLewnq8c4lJoGgy821 BZ0K3fU1veglGm4CXxN/1WruI723bEtyHA3naIbMpJdJoeBruJJI1qRKW/CHVtkHNOVw/3 6JRZAwVfdF3S7bi5jvUreZp6cJ1npNxeKvdf47Kpjer+I1eQREvG4w0Mn4xwOG1ieRdLm9 qr39PBbdjW+V1OH7zPbop9znRNwf4PVowV/uABAk/XYB5dTPCHfPfdnElpYf4VP+7M6toI bcOmL5KqH2xZotH02M4DzuiHhSLjJ69pJ20k3febXsg4+HPwDI2OIyPk1DvHFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702967511; a=rsa-sha256; cv=none; b=jR7EoB/dek2d1T1sTuUPv+h9NsLseA+LhLlxvpFdjB8d7xBRXIU956qDuYxD3tnf2Ei5tF PdXRqzJ10267I0U2LPyxhihH4Xrxjd1Mp8V/t9hzBblfJ3XHuq9i0ijHa3LUjxHaSb38GX 4ONRQPD7pW9bMXixWl3IRdjs3FfmKjCZ3kJd0NFUcs6Zn2MR0WjZiYlqWPTKxHd7vZY9c9 ctknJMBQu4vVxuNFOqqeS94CeCPDfKoTPKG1pQkFRWG64h/eCYOSzfCzEDIVuhOpLvKEW8 VZMuG92crMDKmCMlAuCOo5tx2wsLu/h0PujKX9melsNg07bpurG7+dws1Gsnbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702967511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=guGzWamOBe0Axr1PMgaTtfm2aGGgDDYT4YRY2WSTpG8=; b=jE+wIO634aP4lIYhjgL0Y8FgJr8Ol/+K38n1EdOH387RiRWXE81qfVekTCIjIBxs0q6TrY D80R/Gl10+iiQbCGfhYANIblfBoIGvCpUX4wlJluMnd6HsbJPxtUw452TLRU9w/j0Q0T3P lhJLPcyZ/s9ba12XU4BRTLesAMYZISXBrUq5gACHuG4+2nLzV6sK8wRQ+k6VaiPOLXcyLz oFuqkfakSlQZfhaQ1LZhxMUb60QmcSbwfYxympYeQoz3zN+s4MGZwHBImNrzZDwOMK/3a1 oGUchQH61FpAZvLL5IVUaV8eBoG7Z/8IztPR87k1f6lsPT4L6oFaKCGiR7/lMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SvRgC3SqtzthL; Tue, 19 Dec 2023 06:31:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BJ6VpSn026338; Tue, 19 Dec 2023 06:31:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BJ6VpQ2026335; Tue, 19 Dec 2023 06:31:51 GMT (envelope-from git) Date: Tue, 19 Dec 2023 06:31:51 GMT Message-Id: <202312190631.3BJ6VpQ2026335@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: 6b15ccae94be - main - x11-wm/obpager: modernize, undeprecate, take maintainership List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b15ccae94be4fb9d2dfd14f4546f2e65d6e4ab9 Auto-Submitted: auto-generated The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=6b15ccae94be4fb9d2dfd14f4546f2e65d6e4ab9 commit 6b15ccae94be4fb9d2dfd14f4546f2e65d6e4ab9 Author: Alexey Dokuchaev AuthorDate: 2023-12-19 06:31:00 +0000 Commit: Alexey Dokuchaev CommitDate: 2023-12-19 06:31:00 +0000 x11-wm/obpager: modernize, undeprecate, take maintainership - Avoid C++11 narrowing issue altogether by not truncating displayed workspace numbers so long they fit 4-char buffer - Convert GNU sed(1) to more standard extended regex syntax - Clean up the Makefile patch; nuke ugly `post-patch' target - Adjust LICENSE (GPLv2 or later), unfold description text --- x11-wm/obpager/Makefile | 25 ++++--------------------- x11-wm/obpager/files/patch-Makefile | 30 ++++++++++++++++++------------ x11-wm/obpager/files/patch-src_OBPager.cc | 19 +++++++++++++++++++ x11-wm/obpager/pkg-descr | 11 ++++------- 4 files changed, 45 insertions(+), 40 deletions(-) diff --git a/x11-wm/obpager/Makefile b/x11-wm/obpager/Makefile index a401a9d7c676..2bdbd7c7db39 100644 --- a/x11-wm/obpager/Makefile +++ b/x11-wm/obpager/Makefile @@ -3,35 +3,18 @@ PORTVERSION= 1.8 CATEGORIES= x11-wm MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} -MAINTAINER= ports@FreeBSD.org -COMMENT= Lightweight pager for netwm compatible window managers +MAINTAINER= danfe@FreeBSD.org +COMMENT= Lightweight pager for NetWM-compliant window managers WWW= https://obpager.sourceforge.net/ -LICENSE= GPLv2 +LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -DEPRECATED= Last upstream release was in 2004 -EXPIRATION_DATE= 2024-01-18 - -BUILD_DEPENDS= gsed:textproc/gsed - -USES= compiler gmake xorg -USE_CXXSTD= c++14 +USES= gmake xorg USE_XORG= x11 xext -MAKE_ARGS= CDEFS="${CXXFLAGS}" - -CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}} -CXXFLAGS_clang= -Wno-c++11-narrowing - PLIST_FILES= bin/${PORTNAME} -post-patch: - ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g; \ - s|%%LOCALBASE%%|${LOCALBASE}|g; \ - s|%%CXX%%|${CXX}|g; \ - s|sed|gsed|g' ${WRKSRC}/Makefile - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin diff --git a/x11-wm/obpager/files/patch-Makefile b/x11-wm/obpager/files/patch-Makefile index 1aa3adfe8db6..19d2332a52ef 100644 --- a/x11-wm/obpager/files/patch-Makefile +++ b/x11-wm/obpager/files/patch-Makefile @@ -1,25 +1,31 @@ --- Makefile.orig 2004-09-01 14:23:44 UTC +++ Makefile -@@ -7,18 +7,18 @@ DEPDIR = ./deps - - - # Set the install directory for the executable --INSTALLDIR = /usr/local/bin -+INSTALLDIR = %%PREFIX%%/bin +@@ -11,14 +11,13 @@ INSTALLDIR = /usr/local/bin # Set the compilation flags and such -CXX = g++ -+CXX = %%CXX%% - CDEFS = -D_REENTRANT - CPPFLAGS = -ggdb -Wall - #CPPFLAGS = -ggdb -Wall -O2 +-CDEFS = -D_REENTRANT +-CPPFLAGS = -ggdb -Wall +-#CPPFLAGS = -ggdb -Wall -O2 -INCLUDES = -I/usr/X11R6/include/X11 -I/usr/X11R6/include/X11/extensions -I./src -+INCLUDES = -I%%LOCALBASE%%/include -I%%LOCALBASE%%/include/X11 -I%%LOCALBASE%%/include/X11/extensions -I./src ++CXX ?= g++ ++CDEFS = $(CXXFLAGS) ++CPPFLAGS = -D_REENTRANT ++INCLUDES = -I$(LOCALBASE)/include -I$(LOCALBASE)/include/X11 -I$(LOCALBASE)/include/X11/extensions COMPILE = $(CXX) $(CDEFS) $(INCLUDES) $(CPPFLAGS) LINK = $(CXX) $(LDFLAGS) $(LDLIBS) -LDLIBS = -L/usr/X11R6/lib -lX11 -lXext -+LDLIBS = -L%%LOCALBASE%%/lib -lX11 -lXext ++LDLIBS = -L$(LOCALBASE)/lib -lX11 -lXext + +@@ -89,7 +88,7 @@ $(OBJDIR)/%.o : %.cc + mkdir $(DEPDIR) 2>/dev/null ; mkdir $(DEPDIR)/src 2>/dev/null ; \ + $(COMPILE) -MMD -o $@ -c $< ; \ + cp $(OBJDIR)/$*.d $(DEPDIR)/$*.d ; \ +- sed -s -e 's/^[^:]\+: *//' -e 's/ *\\$$//' -e 's/^ *//' -e 's/ \+/ :\n/g' -e 's/$$/ :/' < $(OBJDIR)/$*.d >> $(DEPDIR)/$*.d ; \ ++ sed -E -e 's/^[^:]+: *//' -e 's/ *\\$$//' -e 's/^ *//' -e 's/ +/ :\n/g' -e 's/$$/ :/' < $(OBJDIR)/$*.d >> $(DEPDIR)/$*.d ; \ + rm -f $(OBJDIR)/$*.d + diff --git a/x11-wm/obpager/files/patch-src_OBPager.cc b/x11-wm/obpager/files/patch-src_OBPager.cc index 1d74eab310fb..e77791561181 100644 --- a/x11-wm/obpager/files/patch-src_OBPager.cc +++ b/x11-wm/obpager/files/patch-src_OBPager.cc @@ -18,3 +18,22 @@ unsigned long borderColour = BlackPixel(mDisplay(), mScreenNum); unsigned long backgroundColour = BlackPixel(mDisplay(), mScreenNum); +@@ -397,7 +397,7 @@ void OBPager::createShowWindow() + + // First, get the mask as an XBM, and hold it in an auto_ptr so it gets disposed when we exit this block + +- std::auto_ptr pixmaskBits(getRectangularXBMMask(width, height, APPLET_MARGIN_WIDTH)); ++ std::unique_ptr pixmaskBits(getRectangularXBMMask(width, height, APPLET_MARGIN_WIDTH)); + + // Next, create the pixmap using the XBM mask + +@@ -934,7 +934,8 @@ void OBPager::redrawWindow() + + // Draw the desktop number using the appropriate font + +- char text[2] = { (mDesktopNum % 9) + '1', '\0' }; ++ char text[4]; ++ snprintf(text, sizeof text, "%d", mDesktopNum + 1); + int textLength = strlen(text); + int textWidth, textHeight; + int direction, ascent, descent; diff --git a/x11-wm/obpager/pkg-descr b/x11-wm/obpager/pkg-descr index 5a21880c46e9..efe85ef995f3 100644 --- a/x11-wm/obpager/pkg-descr +++ b/x11-wm/obpager/pkg-descr @@ -1,8 +1,5 @@ -OBPager is a lightweight pager designed -to be used with NetWM-compliant window -managers like OpenBox. +OBPager is a lightweight pager designed to be used with NetWM-compliant +window managers like Openbox. -Unlike many other pagers out there, -OBPager has very few dependencies, -requiring only Xlib and glibc++ -(no Gnome or KDE necessary). +Unlike many other pagers out there, OBPager has very few dependencies, +requiring only Xlib and glibc++ (no Gnome or KDE necessary).