From cf40c8bc7afac2fe5bdc95e7e1935df8be6eb0fe Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Oct 24 2018 01:04:57 +0000 Subject: Patch for invalid pointer cast on 64bit systems Remove old scriptlets --- diff --git a/swami-gpointer-int-size.patch b/swami-gpointer-int-size.patch new file mode 100644 index 0000000..197b09a --- /dev/null +++ b/swami-gpointer-int-size.patch @@ -0,0 +1,84 @@ +diff -rupN swami-2.0.0.org/src/libswami/SwamiObject.c swami-2.0.0/src/libswami/SwamiObject.c +--- swami-2.0.0.org/src/libswami/SwamiObject.c 2010-10-25 13:04:05.000000000 -0400 ++++ swami-2.0.0/src/libswami/SwamiObject.c 2018-10-22 20:14:01.612230765 -0400 +@@ -299,7 +299,7 @@ swami_type_get_children (GType group_typ + ap = retarray = g_malloc ((g_list_length (sortlist) + 1) * sizeof (GType)); + while (tp) + { +- *ap = GPOINTER_TO_INT (tp->data); /* store GType into array element */ ++ *ap = GPOINTER_TO_SIZE (tp->data); /* store GType into array element */ + ap++; + tp = g_list_delete_link (tp, tp); /* delete and iterate */ + } +diff -rupN swami-2.0.0.org/src/swamigui/SwamiguiItemMenu.c swami-2.0.0/src/swamigui/SwamiguiItemMenu.c +--- swami-2.0.0.org/src/swamigui/SwamiguiItemMenu.c 2010-10-25 13:04:05.000000000 -0400 ++++ swami-2.0.0/src/swamigui/SwamiguiItemMenu.c 2018-10-22 20:14:52.385099697 -0400 +@@ -312,7 +312,7 @@ swamigui_item_menu_add (SwamiguiItemMenu + /* find insert position from order info parameter */ + for (p = list, index = 0; p; p = p->next, index++) + { +- order = GPOINTER_TO_INT (g_object_get_data (p->data, "_order")); ++ order = GPOINTER_TO_SIZE (g_object_get_data (p->data, "_order")); + if (info->order < order) break; + } + +diff -rupN swami-2.0.0.org/src/swamigui/SwamiguiModEdit.c swami-2.0.0/src/swamigui/SwamiguiModEdit.c +--- swami-2.0.0.org/src/swamigui/SwamiguiModEdit.c 2010-10-25 13:04:05.000000000 -0400 ++++ swami-2.0.0/src/swamigui/SwamiguiModEdit.c 2018-10-22 20:14:52.382099704 -0400 +@@ -1017,7 +1017,7 @@ swamigui_mod_edit_cb_combo_list_select ( + src = &newmod.src; + else src = &newmod.amtsrc; + +- ctrl = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (litem), "ctrlnum")); ++ ctrl = GPOINTER_TO_SIZE (g_object_get_data (G_OBJECT (litem), "ctrlnum")); + *src &= ~(IPATCH_SF2_MOD_MASK_CONTROL | IPATCH_SF2_MOD_MASK_CC); + *src |= ctrl; + +diff -rupN swami-2.0.0.org/src/swamigui/SwamiguiPref.c swami-2.0.0/src/swamigui/SwamiguiPref.c +--- swami-2.0.0.org/src/swamigui/SwamiguiPref.c 2010-10-25 13:04:05.000000000 -0400 ++++ swami-2.0.0/src/swamigui/SwamiguiPref.c 2018-10-22 20:14:52.383099701 -0400 +@@ -431,7 +431,7 @@ keybindings_set_bind_mode (GtkWidget *pr + GtkWidget *lbl; + + /* Check if requested mode is already set */ +- if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (prefwidg), "bind-mode")) == mode) ++ if (GPOINTER_TO_SIZE (g_object_get_data (G_OBJECT (prefwidg), "bind-mode")) == mode) + return; + + lbl = swamigui_util_glade_lookup (prefwidg, "LabelKeyBind"); +diff -rupN swami-2.0.0.org/src/swamigui/patch_funcs.c swami-2.0.0/src/swamigui/patch_funcs.c +--- swami-2.0.0.org/src/swamigui/patch_funcs.c 2010-10-25 13:04:05.000000000 -0400 ++++ swami-2.0.0/src/swamigui/patch_funcs.c 2018-10-22 20:14:52.390099685 -0400 +@@ -822,7 +822,7 @@ swamigui_cb_export_samples_response (Gtk + } + + samples = IPATCH_LIST (g_object_get_data (G_OBJECT (dialog), "samples")); +- multi = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (dialog), "multi")); ++ multi = GPOINTER_TO_SIZE (g_object_get_data (G_OBJECT (dialog), "multi")); + combo = GTK_WIDGET (g_object_get_data (G_OBJECT (dialog), "combo")); + + filepath = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); +diff -rupN swami-2.0.0.org/src/swamigui/widgets/combo-box.c swami-2.0.0/src/swamigui/widgets/combo-box.c +--- swami-2.0.0.org/src/swamigui/widgets/combo-box.c 2004-12-15 01:14:40.000000000 -0500 ++++ swami-2.0.0/src/swamigui/widgets/combo-box.c 2018-10-22 20:14:52.387099692 -0400 +@@ -508,7 +508,7 @@ static gboolean + cb_tearable_enter_leave (GtkWidget * w, GdkEventCrossing * event, + gpointer data) + { +- gboolean const flag = GPOINTER_TO_INT (data); ++ gboolean const flag = GPOINTER_TO_SIZE (data); + gtk_widget_set_state (w, flag ? GTK_STATE_PRELIGHT : GTK_STATE_NORMAL); + return FALSE; + } +diff -rupN swami-2.0.0.org/src/swamigui/widgets/icon-combo.c swami-2.0.0/src/swamigui/widgets/icon-combo.c +--- swami-2.0.0.org/src/swamigui/widgets/icon-combo.c 2003-06-24 15:53:52.000000000 -0400 ++++ swami-2.0.0/src/swamigui/widgets/icon-combo.c 2018-10-22 20:14:52.388099690 -0400 +@@ -109,7 +109,7 @@ emit_change (GtkWidget *button, IconComb + static void + icon_clicked (GtkWidget *button, IconCombo *ic) + { +- int index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "index")); ++ int index = GPOINTER_TO_SIZE (g_object_get_data (G_OBJECT (button), "index")); + icon_combo_select_icon_index (ic, index); + emit_change (button, ic); + combo_box_popup_hide (COMBO_BOX (ic)); diff --git a/swami.spec b/swami.spec index 2c6a2cf..019aa92 100644 --- a/swami.spec +++ b/swami.spec @@ -1,6 +1,6 @@ Name: swami Version: 2.0.0 -Release: 17.20110806svn386%{?dist} +Release: 18.20110806svn386%{?dist} Summary: MIDI instrument and sound editor Group: Applications/Multimedia License: GPLv2 @@ -11,6 +11,7 @@ URL: http://www.swamiproject.org/ Source0: swami-2.0.0-svn386.tar.bz2 # To fetch the sources Source1: swami-snapshot.sh +Patch0: swami-gpointer-int-size.patch BuildRequires: cmake BuildRequires: desktop-file-utils @@ -48,6 +49,7 @@ Musical Instruments. %prep %setup -q +%patch0 -p1 -b .gpointer_int_size %build mkdir -p %{_target_platform} @@ -69,10 +71,6 @@ desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications \ %{buildroot}/%{_datadir}/applications/%{name}.desktop -%post libs -p /sbin/ldconfig - -%postun libs -p /sbin/ldconfig - %files %doc AUTHORS ChangeLog NEWS README %{_libdir}/%{name}/ @@ -83,7 +81,7 @@ desktop-file-install \ %{_datadir}/mime/packages/%{name}.xml %files libs -%doc COPYING +%license COPYING %{_libdir}/lib%{name}*.so.* %files devel @@ -93,6 +91,10 @@ desktop-file-install \ %changelog +* Tue Oct 23 2018 Orcan Ogetbil - 2.0.0-18.20110806svn386 +- Patch for invalid pointer cast on 64bit systems +- Remove old scriptlets + * Sat Jul 14 2018 Fedora Release Engineering - 2.0.0-17.20110806svn386 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild