From nobody Sat May 06 09:01:46 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 4QD1l02zZ8z49Jsf; Sat, 6 May 2023 09:01:48 +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 4QD1kz0KkYz3mBn; Sat, 6 May 2023 09:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683363707; 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=m0E8UN5Orc0vk2E/BneyyHvSqEOlLHlpiHTTA5uSUkg=; b=lLxKdXVnyDF7HGaq17qm02lNavnhiAVFlCNkillhH4MGE2yL8n+J/XiKq7H0S7cDuK+MLQ 9GwB7Z2Wxem5gp3sr3lNM2o7hoRhpNAIlTzihrXiUlHp+nO3SI3QN6iLzzrjvqqnVi0zfq M9PgSFUyTisBc5H10D5SiHooz0SA6Kz2JVP5Sat/2MH9B/q1IyLyQ++MRHwHHoCtQunHhy Kmdc9aW3qkMwUnNQd1p+AiurJq0jDni7HltrwgnIe0hJD6S1CRwp8LR09QSGobTc/LNuwy iOnxIUtevk/arFXtTAq7jBiFVis55jw6C34lcQnAfBAFnu9YN4BPFqz0EV5ttg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683363707; 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=m0E8UN5Orc0vk2E/BneyyHvSqEOlLHlpiHTTA5uSUkg=; b=EuCNJwpqrT/KPSsYl10WVmwm75zS0qEya/RkB4hWToFNKEW6VSALAsdb7GEMDlUXj3CyzA Th3slRip18N+J8WIdhqJYk8esgZRZUgl/EAOpJDmduKyP2WqWakM/q1Bv1o/jnzHffFpWN Gamj/pFHB/bTJe3dcEwxb71BHrpepHFNhmKZxCrcvmMzy2I1kHXn8k4mc7gpK7oyN7E0Qm Q6IOv6GtgvoZ3CSrt8BUScnbeKAnMCsNfIT3P5Uy7lnPryCu/OgP64/kszlZcKBQIF/MkH teIRrrxZfzbN/MLJH3NSiGyX5wOiQ/zWYmGkG42u1/RbW/2O+K0tbiaUVL9j/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683363707; a=rsa-sha256; cv=none; b=k7Z/CsH2+ty0aeyR4sX5Kl3Q0MRE2nAwpKM/JOIlbUFcqc1rHHusz2heKU/kTV+v+hnbUF 9CN6oMBEtPjT3YfzuEBBmAOS7PVdgD8H8TYR4w5IkcU7/V2TM2ys/7elehg4Dl8xyMDHWi 0jo3adsTj4fQnnYflmWAGO/j2rgvjAG/O05R/2LHG5sRIpLgYdw5Fv91+U3naXLGaT5BGM 7ciOwD0UvsXA30BsFU517mpdNj4EdUWbqTYGZK/VSZjQOs/YsLXFq7n3hJxiewwebQ5Ke5 V5dwTATaihmFIutU3tz/YXUwKda1ZJLwy4GglfSKeMMvmb+AwkPjS2owLXZ1dg== 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 4QD1ky6KCdzVtJ; Sat, 6 May 2023 09:01:46 +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 34691kVN059909; Sat, 6 May 2023 09:01:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34691kp0059908; Sat, 6 May 2023 09:01:46 GMT (envelope-from git) Date: Sat, 6 May 2023 09:01:46 GMT Message-Id: <202305060901.34691kp0059908@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 6dc548efbea2 - main - x11/habak: New port: Background changing app 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: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6dc548efbea2a67c4274f4efd5e6c16f71572f40 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=6dc548efbea2a67c4274f4efd5e6c16f71572f40 commit 6dc548efbea2a67c4274f4efd5e6c16f71572f40 Author: JesĂşs Daniel Colmenares Oviedo AuthorDate: 2023-05-01 12:18:02 +0000 Commit: Robert Clausecker CommitDate: 2023-05-06 08:58:38 +0000 x11/habak: New port: Background changing app habak is a background changing app. habak uses layered model. Lowermost layer is just black screen. You can put other objects on it and these objects are called habaks. There are three kinds of habaks: graphic files (images), texts and "internal objects". Final background image consists of one or more habaks positioned on the black screen. The order of habaks in the command line is also the order of displaying them on screen. So last habak would be drawn on the top of previous. WWW: https://sourceforge.net/projects/fvwm-crystal/ PR: 266120 --- x11/Makefile | 1 + x11/habak/Makefile | 23 +++++++++++++++++ x11/habak/distinfo | 3 +++ x11/habak/files/patch-Makefile | 8 ++++++ x11/habak/files/patch-src_Makefile | 32 +++++++++++++++++++++++ x11/habak/files/patch-src_habak.c | 47 +++++++++++++++++++++++++++++++++ x11/habak/files/patch-src_random.c | 53 ++++++++++++++++++++++++++++++++++++++ x11/habak/pkg-descr | 9 +++++++ 8 files changed, 176 insertions(+) diff --git a/x11/Makefile b/x11/Makefile index daaa5d9c6d31..4d3da6fe76d0 100644 --- a/x11/Makefile +++ b/x11/Makefile @@ -112,6 +112,7 @@ SUBDIR += gtkterm2 SUBDIR += guake SUBDIR += gxkb + SUBDIR += habak SUBDIR += hamclock SUBDIR += hhpc SUBDIR += hs-xmobar diff --git a/x11/habak/Makefile b/x11/habak/Makefile new file mode 100644 index 000000000000..80b5ca447b47 --- /dev/null +++ b/x11/habak/Makefile @@ -0,0 +1,23 @@ +PORTNAME= habak +DISTVERSION= 0.2.5 +CATEGORIES= x11 +MASTER_SITES= SF/fvwm-crystal/habak/${DISTVERSION} + +MAINTAINER= DtxdF@disroot.org +COMMENT= Background changing app +WWW= https://sourceforge.net/projects/fvwm-crystal/ + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +LIB_DEPENDS+= libImlib2.so:graphics/imlib2 \ + libX11.so:x11/libX11 + +USES= localbase:ldflags + +PLIST_FILES= bin/${PORTNAME} + +do-install: + (cd ${WRKSRC}/src && ${INSTALL_PROGRAM} ${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}) + +.include diff --git a/x11/habak/distinfo b/x11/habak/distinfo new file mode 100644 index 000000000000..9d2b705f547f --- /dev/null +++ b/x11/habak/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1661854392 +SHA256 (habak-0.2.5.tar.gz) = a996ddca6c99bbeb343c2ad584ccd4f51723dece90e828abee99398cd402f509 +SIZE (habak-0.2.5.tar.gz) = 28747 diff --git a/x11/habak/files/patch-Makefile b/x11/habak/files/patch-Makefile new file mode 100644 index 000000000000..9b8970b4bfd2 --- /dev/null +++ b/x11/habak/files/patch-Makefile @@ -0,0 +1,8 @@ +--- Makefile.orig 2022-08-30 10:17:30 UTC ++++ Makefile +@@ -3,5 +3,3 @@ all: + + clean: + make -C src clean +- rm habak +- diff --git a/x11/habak/files/patch-src_Makefile b/x11/habak/files/patch-src_Makefile new file mode 100644 index 000000000000..d669b462c5f4 --- /dev/null +++ b/x11/habak/files/patch-src_Makefile @@ -0,0 +1,32 @@ +--- src/Makefile.orig 2022-08-30 10:14:57 UTC ++++ src/Makefile +@@ -1,23 +1,22 @@ + #CFLAGS = -I/usr/X11R6/include -Wall -g -ggdb + #LDFLAGS = -L/usr/X11R6/lib -lImlib2 -lm -g -ggdb + +-CFLAGS += -I/usr/X11R6/include -Wall +-LDFLAGS += -L/usr/X11R6/lib -lImlib2 -lm ++CFLAGS+= -Wall ++LDFLAGS+= -lX11 -lImlib2 -lm + + all: habak +- ln -f habak ../habak + + habak: xcore.o random.o habak.o +- gcc $(LDFLAGS) -o habak xcore.o random.o habak.o ++ ${CC} $(LDFLAGS) -o habak xcore.o random.o habak.o + + habak.o: habak.c types.h defaults.h proto.h +- gcc $(CFLAGS) -c habak.c -o habak.o ++ ${CC} $(CFLAGS) -c habak.c -o habak.o + + random.o: random.c proto.h +- gcc $(CFLAGS) -c random.c -o random.o ++ ${CC} $(CFLAGS) -c random.c -o random.o + + xcore.o: xcore.c +- gcc $(CFLAGS) -c xcore.c -o xcore.o ++ ${CC} $(CFLAGS) -c xcore.c -o xcore.o + + clean: + rm habak *.o diff --git a/x11/habak/files/patch-src_habak.c b/x11/habak/files/patch-src_habak.c new file mode 100644 index 000000000000..ca83b018d51d --- /dev/null +++ b/x11/habak/files/patch-src_habak.c @@ -0,0 +1,47 @@ +--- src/habak.c.orig 2022-08-30 10:28:37 UTC ++++ src/habak.c +@@ -22,7 +22,7 @@ struct stat file_info; + double xco,yco; + DATA32 *raw_data; + +-int i, multy; ++int multy; + Imlib_Image workspace; + habak_t template_habak; + +@@ -197,7 +197,7 @@ template_habak.text=DEFAULT_TEXT; + + if (argc==1) {print_help(0);} + +-for (i=1;idata.type) { + imlib_context_set_image(current_list_item->data.image); + imlib_image_set_has_alpha(1); + imlib_context_set_color(current_list_item->data.red,current_list_item->data.green,current_list_item->data.blue,current_list_item->data.alpha); +- for (i=0;iheight;i+=2) { ++ for (int i=0;iheight;i+=2) { + imlib_image_draw_line(0,i,current_list_item->data.width,i,0); + } + /* OK, mamy gotowy obraz. Ponieważ jest to teraz tak naprawdę _obraz_, to +@@ -533,7 +533,7 @@ switch (current_list_item->data.type) { + imlib_context_set_image(current_list_item->data.image); + imlib_image_set_has_alpha(1); + imlib_context_set_color(current_list_item->data.red,current_list_item->data.green,current_list_item->data.blue,current_list_item->data.alpha); +- for (i=1;iheight;i+=2) {imlib_image_draw_line(0,i,current_list_item->data.width,i,0);} ++ for (int i=1;iheight;i+=2) {imlib_image_draw_line(0,i,current_list_item->data.width,i,0);} + /* OK, mamy gotowy obraz. Ponieważ jest to teraz tak naprawdę _obraz_, to + * można zmienić jego typ na "IMAGE_HABAK" + */ +@@ -561,7 +561,7 @@ switch (current_list_item->data.type) { + imlib_context_set_font(current_list_item->data.font); + multxt=current_list_item->data.text; + multy=current_list_item->data.y; +- while (multxt10=strchr(multxt,10)) { ++ while ((multxt10=strchr(multxt,10))) { + *multxt10=0; + imlib_text_draw(current_list_item->data.x,multy,multxt); + *multxt10=10; diff --git a/x11/habak/files/patch-src_random.c b/x11/habak/files/patch-src_random.c new file mode 100644 index 000000000000..bfb07973dd4b --- /dev/null +++ b/x11/habak/files/patch-src_random.c @@ -0,0 +1,53 @@ +--- src/random.c.orig 2004-12-09 17:01:43 UTC ++++ src/random.c +@@ -13,7 +13,7 @@ int syserr; + + #define ALLOC_STEP 1000 + regex_t regexp; +-int size_files=0, used_files=0, i=0; ++int size_files=0, used_files=0; + char **files, *wyjscie; + regmatch_t matchpos; + +@@ -70,9 +70,9 @@ return; + + char *randomly_select_font(const char *wejscie){ + +-files=NULL;wyjscie=NULL;size_files=0;used_files=0;i=0; ++files=NULL;wyjscie=NULL;size_files=0;used_files=0;; + +-regcomp(®exp,"^.*\\.ttf$",REG_ICASE||REG_NOSUB); ++regcomp(®exp,"^.*\\.ttf$",REG_ICASE|REG_NOSUB); + + add_file(wejscie); + +@@ -80,7 +80,7 @@ if (used_files==0) { + return NULL; + } + +-i=rand()%used_files; ++int i=rand()%used_files; + wyjscie=malloc(strlen(files[i])+1); + strcpy(wyjscie,files[i]); + +@@ -92,9 +92,9 @@ return wyjscie; + + char *randomly_select_image(const char *wejscie){ + +-files=NULL;wyjscie=NULL;size_files=0;used_files=0;i=0; ++files=NULL;wyjscie=NULL;size_files=0;used_files=0;; + +-regcomp(®exp,"^.*\\.(bmp|jpg|jpeg|png|tiff|tif|tga|gif|pcx|xpm|pnm|ppm|xbm)$",REG_ICASE||REG_NOSUB); ++regcomp(®exp,"^.*\\.(bmp|jpg|jpeg|png|tiff|tif|tga|gif|pcx|xpm|pnm|ppm|xbm)$",REG_ICASE|REG_NOSUB); + + add_file(wejscie); + +@@ -102,7 +102,7 @@ if (used_files==0) { + return NULL; + } + +-i=rand()%used_files; ++int i=rand()%used_files; + wyjscie=malloc(strlen(files[i])+1); + strcpy(wyjscie,files[i]); + diff --git a/x11/habak/pkg-descr b/x11/habak/pkg-descr new file mode 100644 index 000000000000..2b520a63ca3b --- /dev/null +++ b/x11/habak/pkg-descr @@ -0,0 +1,9 @@ +habak is a background changing app. + +habak uses layered model. Lowermost layer is just black screen. You +can put other objects on it and these objects are called habaks. +There are three kinds of habaks: graphic files (images), texts and +"internal objects". Final background image consists of one or more +habaks positioned on the black screen. The order of habaks in the +command line is also the order of displaying them on screen. So +last habak would be drawn on the top of previous.