Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-04-22 21:56:44 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-04-22 21:56:44 (GMT)
commit87fa887b66eba93fc00092f8a9bd39c3e2a20ed4 (patch)
tree300215a1f08f98dbd0dc5ad8297774f8defc5795
parent5094fda272faa6363fe7e74896ff97e3469a9176 (diff)
Original icon-slicer spec
-rw-r--r--deps/icon-slicer/SOURCES/icon-slicer-0.3-attachpoints.patch69
-rw-r--r--deps/icon-slicer/SPECS/icon-slicer.spec40
2 files changed, 109 insertions, 0 deletions
diff --git a/deps/icon-slicer/SOURCES/icon-slicer-0.3-attachpoints.patch b/deps/icon-slicer/SOURCES/icon-slicer-0.3-attachpoints.patch
new file mode 100644
index 0000000..5638add
--- /dev/null
+++ b/deps/icon-slicer/SOURCES/icon-slicer-0.3-attachpoints.patch
@@ -0,0 +1,69 @@
+diff -ur icon-slicer-0.3/src/main.c icon-slicer-0.3-attachpoints/src/main.c
+--- icon-slicer-0.3/src/main.c 2003-06-25 22:17:32.000000000 +0200
++++ icon-slicer-0.3-attachpoints/src/main.c 2004-09-30 10:16:43.884414198 +0200
+@@ -363,6 +363,35 @@
+ }
+ }
+
++struct AttachPointCompare {
++ int rowstride;
++ const guchar *pixels;
++};
++
++static gint
++compare_attach_points (gconstpointer a,
++ gconstpointer b,
++ gpointer user_data)
++{
++ const ThemePoint *attach_point_a, *attach_point_b;
++ struct AttachPointCompare *compare;
++ guint8 red_a, red_b;
++
++ attach_point_a = a;
++ attach_point_b = b;
++ compare = user_data;
++
++ red_a = compare->pixels[compare->rowstride * attach_point_a->y + 4*attach_point_a->x];
++ red_b = compare->pixels[compare->rowstride * attach_point_b->y + 4*attach_point_b->x];
++
++ if (red_a > red_b)
++ return -1;
++ if (red_a == red_b)
++ return 0;
++ return 1;
++}
++
++
+ static void
+ icon_fetch_attach_points (ThemeIcon *icon,
+ ThemeIconInstance *instance,
+@@ -375,7 +404,8 @@
+
+ const guchar *pixels;
+ int rowstride;
+-
++ struct AttachPointCompare compare;
++
+ theme_source_location_start (source, &icon->location, &start_x, &start_y);
+ image = theme_source_find_image (source, THEME_SOURCE_USE_ATTACH_POINTS);
+ if (!image)
+@@ -390,6 +420,8 @@
+
+ rowstride = gdk_pixbuf_get_rowstride (image->image);
+ pixels = gdk_pixbuf_get_pixels (image->image) + start_y * rowstride + start_x * 4;
++ compare.pixels = pixels;
++ compare.rowstride = rowstride;
+
+ for (j = 0; j < source->gridsize; j++)
+ {
+@@ -407,6 +439,10 @@
+
+ pixels += rowstride;
+ }
++
++ instance->attach_points = g_slist_sort_with_data (instance->attach_points,
++ compare_attach_points,
++ &compare);
+ }
+
+ static gboolean
diff --git a/deps/icon-slicer/SPECS/icon-slicer.spec b/deps/icon-slicer/SPECS/icon-slicer.spec
new file mode 100644
index 0000000..24fb028
--- /dev/null
+++ b/deps/icon-slicer/SPECS/icon-slicer.spec
@@ -0,0 +1,40 @@
+
+
+Summary: Utility for icon theme generation
+Name: icon-slicer
+Version: 0.3
+Release: 3.2
+License: MIT
+Group: Development/Tools
+Source: icon-slicer-%{version}.tar.gz
+Patch1: icon-slicer-0.3-attachpoints.patch
+BuildRequires: gtk2-devel
+BuildRequires: popt-devel
+BuildRoot: %{_tmppath}/build-%{name}-root
+
+%description
+icon-slicer is a utility for generating icon themes and libXcursor cursor
+themes
+
+%prep
+%setup -q
+%patch1 -p1 -b .attachpoints
+
+%build
+%configure
+make %{?jobs:-j%jobs}
+
+%install
+%makeinstall
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc README
+%{_bindir}/icon-slicer
+
+%changelog
+* Fri Jan 16 2009 cyberorg@opensuse.org
+- Import package from fedora