FreeBSD Bugzilla – Attachment 241855 Details for
Bug 266120
[NEW PORT] x11/habak: Background changing app
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
habak-0.2.5.patch
0001-sysutils-habak-New-port-Background-changing-app.patch (text/plain), 8.41 KB, created by
Jesús Daniel Colmenares Oviedo
on 2023-04-29 14:25:59 UTC
(
hide
)
Description:
habak-0.2.5.patch
Filename:
MIME Type:
Creator:
Jesús Daniel Colmenares Oviedo
Created:
2023-04-29 14:25:59 UTC
Size:
8.41 KB
patch
obsolete
>From 4e3654c4709f563d24c30857b88238da90c816cc Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Jes=C3=BAs=20Daniel=20Colmenares=20Oviedo?= > <DtxdF@disroot.org> >Date: Sat, 29 Apr 2023 10:23:56 -0400 >Subject: [PATCH] sysutils/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/ >--- > sysutils/habak/Makefile | 23 +++++++++++ > sysutils/habak/distinfo | 3 ++ > sysutils/habak/files/patch-Makefile | 8 ++++ > sysutils/habak/files/patch-src_Makefile | 32 +++++++++++++++ > sysutils/habak/files/patch-src_habak.c | 47 ++++++++++++++++++++++ > sysutils/habak/files/patch-src_random.c | 53 +++++++++++++++++++++++++ > sysutils/habak/pkg-descr | 9 +++++ > 7 files changed, 175 insertions(+) > create mode 100644 sysutils/habak/Makefile > create mode 100644 sysutils/habak/distinfo > create mode 100644 sysutils/habak/files/patch-Makefile > create mode 100644 sysutils/habak/files/patch-src_Makefile > create mode 100644 sysutils/habak/files/patch-src_habak.c > create mode 100644 sysutils/habak/files/patch-src_random.c > create mode 100644 sysutils/habak/pkg-descr > >diff --git a/sysutils/habak/Makefile b/sysutils/habak/Makefile >new file mode 100644 >index 0000000000..40046bd898 >--- /dev/null >+++ b/sysutils/habak/Makefile >@@ -0,0 +1,23 @@ >+PORTNAME= habak >+DISTVERSION= 0.2.5 >+CATEGORIES= sysutils >+MASTER_SITES= SF/fvwm-crystal >+ >+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= ${PREFIX}/bin/${PORTNAME} >+ >+do-install: >+ (cd ${WRKSRC}/src && ${INSTALL_PROGRAM} ${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}) >+ >+.include <bsd.port.mk> >diff --git a/sysutils/habak/distinfo b/sysutils/habak/distinfo >new file mode 100644 >index 0000000000..9d2b705f54 >--- /dev/null >+++ b/sysutils/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/sysutils/habak/files/patch-Makefile b/sysutils/habak/files/patch-Makefile >new file mode 100644 >index 0000000000..9b8970b4bf >--- /dev/null >+++ b/sysutils/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/sysutils/habak/files/patch-src_Makefile b/sysutils/habak/files/patch-src_Makefile >new file mode 100644 >index 0000000000..d669b462c5 >--- /dev/null >+++ b/sysutils/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/sysutils/habak/files/patch-src_habak.c b/sysutils/habak/files/patch-src_habak.c >new file mode 100644 >index 0000000000..ca83b018d5 >--- /dev/null >+++ b/sysutils/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;i<argc;i++) { >++for (int i=1;i<argc;i++) { >+ if (!strcmp(argv[i],"-mC")) { >+ d("parse center"); >+ template_habak.center=MOD_CENTER; >+@@ -515,7 +515,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=0;i<scr->height;i+=2) { >++ for (int i=0;i<scr->height;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;i<scr->height;i+=2) {imlib_image_draw_line(0,i,current_list_item->data.width,i,0);} >++ for (int i=1;i<scr->height;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/sysutils/habak/files/patch-src_random.c b/sysutils/habak/files/patch-src_random.c >new file mode 100644 >index 0000000000..bfb07973dd >--- /dev/null >+++ b/sysutils/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/sysutils/habak/pkg-descr b/sysutils/habak/pkg-descr >new file mode 100644 >index 0000000000..2b520a63ca >--- /dev/null >+++ b/sysutils/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. >-- >2.38.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
DtxdF
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 266120
:
236250
|
236304
|
240448
|
241855
|
241903