From owner-dev-commits-ports-all@freebsd.org Tue Jul 13 07:39:54 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 022B065377F; Tue, 13 Jul 2021 07:39:54 +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 4GPCG16Jxpz3Dgk; Tue, 13 Jul 2021 07:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C0D6A1E66B; Tue, 13 Jul 2021 07:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16D7drLT081827; Tue, 13 Jul 2021 07:39:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16D7drl4081826; Tue, 13 Jul 2021 07:39:53 GMT (envelope-from git) Date: Tue, 13 Jul 2021 07:39:53 GMT Message-Id: <202107130739.16D7drl4081826@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: 5669ed84d8fe - main - sysutils/batterycat: new port had been added (+) 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: 5669ed84d8fea5a9f7cc27021117f3fea252dded Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2021 07:39:54 -0000 The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=5669ed84d8fea5a9f7cc27021117f3fea252dded commit 5669ed84d8fea5a9f7cc27021117f3fea252dded Author: Alexey Dokuchaev AuthorDate: 2021-07-13 07:35:12 +0000 Commit: Alexey Dokuchaev CommitDate: 2021-07-13 07:35:53 +0000 sysutils/batterycat: new port had been added (+) BatteryCat is a laptop battery monitoring and health tool: it monitors the current charging state as well as the long-term degradation of the laptop's battery by keeping history. WWW: https://sourceforge.net/projects/batterycat/ --- sysutils/Makefile | 1 + sysutils/batterycat/Makefile | 33 ++++++++++++++++++ sysutils/batterycat/distinfo | 3 ++ sysutils/batterycat/files/patch-Makefile | 60 ++++++++++++++++++++++++++++++++ sysutils/batterycat/pkg-descr | 5 +++ 5 files changed, 102 insertions(+) diff --git a/sysutils/Makefile b/sysutils/Makefile index 70116e27277a..dcb1339ff931 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -107,6 +107,7 @@ SUBDIR += bashtop SUBDIR += bastille SUBDIR += batmon + SUBDIR += batterycat SUBDIR += battmond SUBDIR += battray SUBDIR += bchunk diff --git a/sysutils/batterycat/Makefile b/sysutils/batterycat/Makefile new file mode 100644 index 000000000000..e3b17e9f7483 --- /dev/null +++ b/sysutils/batterycat/Makefile @@ -0,0 +1,33 @@ +# Created by: Alexey Dokuchaev + +PORTNAME= batterycat +PORTVERSION= 1.6 +CATEGORIES= sysutils +MASTER_SITES= SF/${PORTNAME}/source_tarball +DISTNAME= ${PORTNAME}_${PORTVERSION} + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Graphical battery monitoring tool + +LICENSE= GPLv2+ + +USES= gmake gnome pkgconfig +USE_GNOME= cairo gdkpixbuf2 gtk20 + +PLIST_FILES= bin/batterycat share/applications/batterycat.desktop \ + ${DATADIR_REL}/batterycat.html \ + ${DATADIR_REL}/batterycat_128.xpm \ + ${DATADIR_REL}/batterycat_32.xpm + +OPTIONS_DEFINE= NLS + +NLS_USES= gettext-tools +NLS_MAKE_ENV= WITH_NLS=yes +NLS_PLIST_FILES= share/locale/de/LC_MESSAGES/batterycat.mo \ + share/locale/fr/LC_MESSAGES/batterycat.mo + +post-patch: + @${REINPLACE_CMD} -e 's,^struct BATTERY_DATA,extern &,' \ + ${WRKSRC}/history.c + +.include diff --git a/sysutils/batterycat/distinfo b/sysutils/batterycat/distinfo new file mode 100644 index 000000000000..1d738455fc73 --- /dev/null +++ b/sysutils/batterycat/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1549281701 +SHA256 (batterycat_1.6.tar.gz) = bf0525bfbf78bc20e8925058d396c95fdd4ec1f4755ba563f52c2ee5cf99383b +SIZE (batterycat_1.6.tar.gz) = 3167776 diff --git a/sysutils/batterycat/files/patch-Makefile b/sysutils/batterycat/files/patch-Makefile new file mode 100644 index 000000000000..862ef16d6b1f --- /dev/null +++ b/sysutils/batterycat/files/patch-Makefile @@ -0,0 +1,60 @@ +--- Makefile.orig 2017-07-28 18:13:56 UTC ++++ Makefile +@@ -1,16 +1,16 @@ + + PROJECT = batterycat +-CC = gcc +-PREFIX = /usr/local ++CC ?= gcc ++PREFIX ?= /usr/local + + OBJ_DIR = obj + TARGET = batterycat + C_INCLUDE_DIRS = +-C_PREPROC = -DENABLE_NLS -DPACKAGE=\"$(PROJECT)\" -DLOCALE_DIR=\"$(PREFIX)/share/locale\" +-CFLAGS = -pipe `pkg-config --cflags gtk+-2.0` -Wall -g0 -O2 -DPREFIX=\"$(PREFIX)\" -Wno-deprecated-declarations ++C_PREPROC = -DPACKAGE=\"$(PROJECT)\" -DLOCALE_DIR=\"$(PREFIX)/share/locale\" ++CFLAGS += $(shell pkg-config --cflags gtk+-2.0) -Wall -DPREFIX=\"$(PREFIX)\" -Wno-deprecated-declarations + LIB_DIRS = + LIBS = +-LDFLAGS = -pipe -s `pkg-config --libs gtk+-2.0` ++LDFLAGS += $(shell pkg-config --libs gtk+-2.0) + + SRC_OBJS = \ + $(OBJ_DIR)/config.o \ +@@ -24,21 +24,27 @@ SRC_OBJS = \ + $(OBJ_DIR)/help_about.o \ + $(OBJ_DIR)/batterycat-icon.o + +-all: $(TARGET) nls ++all: $(TARGET) + + $(TARGET): $(OBJ_DIR) $(SRC_OBJS) + $(CC) -o $(TARGET) $(SRC_OBJS) $(LIB_DIRS) $(LIBS) $(LDFLAGS) $(FW) + + nls: +- cd po; make all ++ $(MAKE) -C po all + + install: $(TARGET) +- cp $(TARGET) $(PREFIX)/bin/. +- mkdir -p $(PREFIX)/share/$(TARGET) +- cp $(TARGET)*.xpm $(PREFIX)/share/$(TARGET)/. +- cp $(TARGET).html $(PREFIX)/share/$(TARGET)/. +- cp $(TARGET).desktop /usr/share/applications/. +- cd po; make install ++ $(BSD_INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(PREFIX)/bin/. ++ mkdir -p $(DESTDIR)$(PREFIX)/share/$(TARGET) ++ $(BSD_INSTALL_DATA) $(TARGET)*.xpm $(DESTDIR)$(PREFIX)/share/$(TARGET)/. ++ $(BSD_INSTALL_DATA) $(TARGET).html $(DESTDIR)$(PREFIX)/share/$(TARGET)/. ++ $(BSD_INSTALL_DATA) $(TARGET).desktop $(DESTDIR)$(PREFIX)/share/applications/. ++ifeq ($(WITH_NLS),yes) ++ for lang in $(notdir $(basename $(wildcard po/*.gmo))); do \ ++ $(BSD_INSTALL_DATA) po/$$lang.gmo $(DESTDIR)$(PREFIX)/share/locale/$$lang/LC_MESSAGES/batterycat.mo ; done ++ ++C_PREPROC += -DENABLE_NLS ++all: nls ++endif + + uninstall: + rm -f $(PREFIX)/bin/$(TARGET) diff --git a/sysutils/batterycat/pkg-descr b/sysutils/batterycat/pkg-descr new file mode 100644 index 000000000000..5589f08b0092 --- /dev/null +++ b/sysutils/batterycat/pkg-descr @@ -0,0 +1,5 @@ +BatteryCat is a laptop battery monitoring and health tool: it monitors +the current charging state as well as the long-term degradation of the +laptop's battery by keeping history. + +WWW: https://sourceforge.net/projects/batterycat/