wok-6.x rev 25365
cpige: apply gibor patch (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jul 28 15:03:09 2022 +0000 (2022-07-28) |
parents | c6c2c42e733e |
children | ca6fa52862c9 |
files | cpige/receipt cpige/stuff/cpige.patch |
line diff
1.1 --- a/cpige/receipt Thu Jul 28 14:38:50 2022 +0000 1.2 +++ b/cpige/receipt Thu Jul 28 15:03:09 2022 +0000 1.3 @@ -25,8 +25,6 @@ 1.4 # Rules to configure and make the package. 1.5 compile_rules() 1.6 { 1.7 - sed -i 's|-static ||' Makefile 1.8 - 1.9 patch -p1 < $stuff/cpige.patch 1.10 1.11 # build CLI program
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/cpige/stuff/cpige.patch Thu Jul 28 15:03:09 2022 +0000 2.3 @@ -0,0 +1,225 @@ 2.4 +diff -ur cpigeorig/gui/callbacks.c cpige/gui/callbacks.c 2.5 +--- cpigeorig/gui/callbacks.c 2022-07-21 22:11:29.000000000 +0200 2.6 ++++ cpige/gui/callbacks.c 2022-07-28 08:43:22.000000000 +0200 2.7 +@@ -310,10 +310,10 @@ 2.8 + idx = gtk_combo_box_get_active(combobox); 2.9 + if (idx == 0) /* Hour */ 2.10 + { 2.11 +- gtk_spin_button_set_adjustment(spinButton, GTK_ADJUSTMENT(gtk_adjustment_new (1, 1, 12, 1, 1, 1))); 2.12 ++ gtk_spin_button_set_adjustment(spinButton, GTK_ADJUSTMENT(gtk_adjustment_new (1, 1, 12, 1, 1, 0))); 2.13 + gtk_spin_button_set_value(spinButton, 1); 2.14 + } else if (idx == 1) { /* Minute */ 2.15 +- gtk_spin_button_set_adjustment(spinButton, GTK_ADJUSTMENT(gtk_adjustment_new (10, 10, 30, 10, 10, 10))); 2.16 ++ gtk_spin_button_set_adjustment(spinButton, GTK_ADJUSTMENT(gtk_adjustment_new (10, 10, 30, 10, 10, 0))); 2.17 + gtk_spin_button_set_value(spinButton, 10); 2.18 + } else { 2.19 + g_printf("Unknown interval type (%d)\n", idx); 2.20 +@@ -592,7 +592,7 @@ 2.21 + { 2.22 + int percentage, hour, min, sec, left_sec; 2.23 + gchar statusText[100]; 2.24 +- memset(statusText, 0, 100); 2.25 ++ 2.26 + 2.27 + left_sec = atoi(left); 2.28 + hour = left_sec / 3600; 2.29 +@@ -605,7 +605,7 @@ 2.30 + } 2.31 + } 2.32 + 2.33 +- g_free(line); 2.34 ++ 2.35 + 2.36 + } else if (condition & G_IO_HUP) { 2.37 + if (g_object_get_data(G_OBJECT(mainWindow), "stopping") != NULL) 2.38 +diff -ur cpigeorig/gui/configlib.c cpige/gui/configlib.c 2.39 +--- cpigeorig/gui/configlib.c 2022-07-21 22:11:29.000000000 +0200 2.40 ++++ cpige/gui/configlib.c 2022-07-28 08:43:22.000000000 +0200 2.41 +@@ -68,7 +68,7 @@ 2.42 + buf[i++] = c; 2.43 + } 2.44 + } 2.45 +- free(buf); /* Thx dunky */ 2.46 ++ /* Thx dunky */ 2.47 + return config; 2.48 + } 2.49 + 2.50 +@@ -145,8 +145,8 @@ 2.51 + if (j == 0) 2.52 + { 2.53 + fprintf(stderr, "CONFIG ERROR: Incorrect Line. Should not start with '='\n"); 2.54 +- free(confObj); 2.55 +- free(buf); 2.56 ++ 2.57 ++ 2.58 + return NULL; 2.59 + } 2.60 + 2.61 +@@ -181,8 +181,6 @@ 2.62 + if ((j == 0) || (confObj->var == NULL)) 2.63 + { 2.64 + fprintf(stderr, "Invalid entry: variable defined, but without val.\n"); 2.65 +- free(confObj); 2.66 +- free(buf); 2.67 + return NULL; 2.68 + } 2.69 + 2.70 +@@ -202,7 +200,6 @@ 2.71 + 2.72 + confObj->val = strdup(buf); 2.73 + 2.74 +- free(ptr); 2.75 + 2.76 + return confObj; 2.77 + } 2.78 +@@ -310,17 +307,10 @@ 2.79 + while (start != NULL) 2.80 + { 2.81 + if (start->conf != NULL) 2.82 +- { 2.83 +- if (start->conf->var != NULL) 2.84 +- free(start->conf->var); 2.85 +- if (start->conf->val != NULL) 2.86 +- free(start->conf->val); 2.87 + 2.88 +- free(start->conf); 2.89 +- } 2.90 + old = start; 2.91 + start = start->next; 2.92 +- free(old); 2.93 ++ 2.94 + } 2.95 + } 2.96 + 2.97 +@@ -385,7 +375,7 @@ 2.98 + } 2.99 + } else { 2.100 + *value = atoi(tmp); 2.101 +- free(tmp); 2.102 ++ 2.103 + } 2.104 + } 2.105 + 2.106 +@@ -407,6 +397,5 @@ 2.107 + *value = atoi(tmp); 2.108 + if ( (*value) != 1) 2.109 + *value = 0; 2.110 +- free(tmp); 2.111 + } 2.112 + } 2.113 +diff -ur cpigeorig/gui/interface.c cpige/gui/interface.c 2.114 +--- cpigeorig/gui/interface.c 2022-07-21 22:11:29.000000000 +0200 2.115 ++++ cpige/gui/interface.c 2022-07-28 08:43:22.000000000 +0200 2.116 +@@ -118,7 +118,7 @@ 2.117 + 2.118 + mainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); 2.119 + gtk_widget_set_name (mainWindow, "mainWindow"); 2.120 +- gtk_window_set_title (GTK_WINDOW (mainWindow), gettext("cPige Configurator by Laurent Coustet")); 2.121 ++ gtk_window_set_title (GTK_WINDOW (mainWindow), gettext("cPige Configurator by Laurent Coustet (SliTaz-Version)")); 2.122 + gtk_window_set_icon_name (GTK_WINDOW (mainWindow), "gtk-media-record"); 2.123 + 2.124 + vbox1 = gtk_vbox_new (FALSE, 0); 2.125 +@@ -131,7 +131,7 @@ 2.126 + gtk_widget_show (menubar1); 2.127 + gtk_box_pack_start (GTK_BOX (vbox1), menubar1, FALSE, FALSE, 0); 2.128 + 2.129 +- menuitem13 = gtk_menu_item_new_with_mnemonic ("_Fichier"); 2.130 ++ menuitem13 = gtk_menu_item_new_with_mnemonic ("_File"); 2.131 + gtk_widget_set_name (menuitem13, "menuitem13"); 2.132 + gtk_widget_show (menuitem13); 2.133 + gtk_container_add (GTK_CONTAINER (menubar1), menuitem13); 2.134 +@@ -356,7 +356,7 @@ 2.135 + gtk_widget_show (label17); 2.136 + gtk_box_pack_start (GTK_BOX (hbox11), label17, FALSE, FALSE, 0); 2.137 + 2.138 +- IntervalDelaySpinButton_adj = gtk_adjustment_new (10, 10, 30, 10, 10, 10); 2.139 ++ IntervalDelaySpinButton_adj = gtk_adjustment_new (10, 10, 30, 10, 10, 0); 2.140 + IntervalDelaySpinButton = gtk_spin_button_new (GTK_ADJUSTMENT (IntervalDelaySpinButton_adj), 1, 0); 2.141 + gtk_widget_set_name (IntervalDelaySpinButton, "IntervalDelaySpinButton"); 2.142 + gtk_widget_show (IntervalDelaySpinButton); 2.143 +@@ -377,7 +377,7 @@ 2.144 + gtk_frame_set_label_widget (GTK_FRAME (PigeModeFrame), label16); 2.145 + gtk_label_set_use_markup (GTK_LABEL (label16), TRUE); 2.146 + 2.147 +- MandatoryParametersLabel = gtk_label_new (gettext("<b>Mandatory parameters</b>")); 2.148 ++ MandatoryParametersLabel = gtk_label_new (gettext("<b>URL Streaming</b>")); 2.149 + gtk_widget_set_name (MandatoryParametersLabel, "MandatoryParametersLabel"); 2.150 + gtk_widget_show (MandatoryParametersLabel); 2.151 + gtk_frame_set_label_widget (GTK_FRAME (ParametersFrame), MandatoryParametersLabel); 2.152 +@@ -459,7 +459,7 @@ 2.153 + gtk_tooltips_set_tip (tooltips, useNumbersButton, gettext("Should cPige prefix songs with a unique number ? (UNIX only, with pige mode Disabled)"), NULL); 2.154 + gtk_button_set_focus_on_click (GTK_BUTTON (useNumbersButton), FALSE); 2.155 + 2.156 +- spinbutton2_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10); 2.157 ++ spinbutton2_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 0); 2.158 + spinbutton2 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton2_adj), 1, 0); 2.159 + gtk_widget_set_name (spinbutton2, "skipSongsSpin"); 2.160 + gtk_widget_show (spinbutton2); 2.161 +diff -ur cpigeorig/gui/main.c cpige/gui/main.c 2.162 +--- cpigeorig/gui/main.c 2022-07-21 22:11:29.000000000 +0200 2.163 ++++ cpige/gui/main.c 2022-07-28 08:43:22.000000000 +0200 2.164 +@@ -230,7 +230,7 @@ 2.165 + if (retval == FALSE) 2.166 + return retval; 2.167 + } else { 2.168 +- free(val); 2.169 ++ 2.170 + } 2.171 + 2.172 + /* Setup savedirectory */ 2.173 +@@ -398,7 +398,7 @@ 2.174 + 0 2.175 + ); 2.176 + 2.177 +- free(val); 2.178 ++ 2.179 + 2.180 + gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), (gdouble)(intval)); 2.181 + 2.182 +@@ -449,7 +449,7 @@ 2.183 + { 2.184 + gtk_tree_model_get(model, &iter, 0, &val, -1); 2.185 + conf_setValue(&conf, "url", val); 2.186 +- g_free(val); 2.187 ++ 2.188 + } while ( gtk_tree_model_iter_next(model, &iter) == TRUE); 2.189 + } 2.190 + 2.191 +@@ -458,7 +458,7 @@ 2.192 + val = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget)); 2.193 + 2.194 + conf_setValue(&conf, "savedirectory", val); 2.195 +- g_free(val); 2.196 ++ 2.197 + 2.198 + /* Retreiving weekbackup */ 2.199 + widget = lookup_widget(mainWindow, "WeekBackupButton"); 2.200 +@@ -515,7 +515,7 @@ 2.201 + val = (gchar *)g_malloc(8); 2.202 + snprintf(val, 8, "%d", intval); 2.203 + conf_setValue(&conf, "skipsongs", val); 2.204 +- g_free(val); 2.205 ++ 2.206 + 2.207 + /* Retreiving next title */ 2.208 + widget = lookup_widget(mainWindow, "NextTitleEntry"); 2.209 +@@ -536,7 +536,7 @@ 2.210 + val = (gchar *)g_malloc(8); 2.211 + snprintf(val, 8, "%d", intval); 2.212 + conf_setValue(&conf, "cutdelay", val); 2.213 +- g_free(val); 2.214 ++ 2.215 + 2.216 + /* Retreiving logfile */ 2.217 + widget = lookup_widget(mainWindow, "LogfileEntry"); 2.218 +diff -ur cpigeorig/Makefile cpige/Makefile 2.219 +--- cpigeorig/Makefile 2022-07-21 22:11:29.000000000 +0200 2.220 ++++ cpige/Makefile 2022-07-28 08:43:22.000000000 +0200 2.221 +@@ -16,6 +16,6 @@ 2.222 + docker run --rm -it -v $(shell pwd):$(shell pwd) -w $(shell pwd) alpine:latest ./build_alpine.sh 2.223 + 2.224 + cpige: $(OBJS) 2.225 +- $(CC) $(CFLAGS) $(CLIBS) $(OBJS) -static -o cpige 2.226 ++ $(CC) $(CFLAGS) $(CLIBS) $(OBJS) -o cpige 2.227 + 2.228 +