[packages/tk] - up to 8.6.1; drop patches that look ancient
arekm
arekm at pld-linux.org
Sat May 31 20:52:22 CEST 2014
commit 454f92dc3225688741b58257e42369b18a0c67f8
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat May 31 20:52:19 2014 +0200
- up to 8.6.1; drop patches that look ancient
tk-aa-cairo.patch | 446 --------------------------------------------
tk-ieee.patch | 15 --
tk-lib64.patch | 31 ---
tk-link.patch | 14 +-
tk-norpath.patch | 11 +-
tk-opt_flags_pass_fix.patch | 35 +++-
tk-pil.patch | 123 ------------
tk-unix-3d-borders.patch | 123 ------------
tk-unix-scrollbars.patch | 242 ------------------------
tk.spec | 39 ++--
10 files changed, 54 insertions(+), 1025 deletions(-)
---
diff --git a/tk.spec b/tk.spec
index 064c2ee..768a813 100644
--- a/tk.spec
+++ b/tk.spec
@@ -6,28 +6,20 @@ Summary(ru.UTF-8): Tk GUI toolkit для Tcl
Summary(tr.UTF-8): Tk, Tcl için grafik kullanıcı arabirimi araç takımıdır
Summary(uk.UTF-8): Tk GUI toolkit для Tcl
Name: tk
-%define major 8.5
-%define minor 15
+%define major 8.6
+%define minor 1
Version: %{major}.%{minor}
-Release: 2
+Release: 1
License: BSD
Group: Development/Languages/Tcl
Source0: http://downloads.sourceforge.net/tcl/%{name}%{version}-src.tar.gz
-# Source0-md5: 55b8e33f903210a4e1c8bce0f820657f
-Patch0: %{name}-ieee.patch
-Patch1: %{name}-manlnk.patch
-Patch2: %{name}-pil.patch
-Patch3: %{name}-opt_flags_pass_fix.patch
-Patch4: %{name}-soname_fix.patch
-Patch5: %{name}-norpath.patch
-# http://www.tclsource.org/?page=tk
-Patch6: %{name}-aa-cairo.patch
-Patch7: %{name}-unix-scrollbars.patch
-Patch8: %{name}-unix-3d-borders.patch
-Patch9: %{name}-lib64.patch
-
-Patch11: %{name}-no_tcl_stub.patch
-Patch12: %{name}-link.patch
+# Source0-md5: 63f21c3a0e0cefbd854b4eb29b129ac6
+Patch0: %{name}-manlnk.patch
+Patch1: %{name}-opt_flags_pass_fix.patch
+Patch2: %{name}-norpath.patch
+Patch3: %{name}-no_tcl_stub.patch
+Patch4: %{name}-link.patch
+Patch5: %{name}-soname_fix.patch
URL: http://www.tcl.tk/
BuildRequires: autoconf >= 2.59
BuildRequires: pkgconfig
@@ -132,13 +124,6 @@ Narzędzia Tk GUI - programy demonstracyjne.
%patch3 -p1
%patch4 -p1
%patch5 -p1
-#%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-
-%patch11 -p1
-%patch12 -p1
%build
cd unix
@@ -179,7 +164,8 @@ ln -sf libtk%{major}.so.0.0 $RPM_BUILD_ROOT%{_libdir}/libtk%{major}.so.0
mv -f $RPM_BUILD_ROOT%{_bindir}/wish%{major} $RPM_BUILD_ROOT%{_bindir}/wish
if [ "%{_libdir}" != "%{_ulibdir}" ] ; then
- mv $RPM_BUILD_ROOT%{_libdir}/tk* $RPM_BUILD_ROOT%{_ulibdir}
+ mv $RPM_BUILD_ROOT%{_libdir}/tkConfig.sh $RPM_BUILD_ROOT%{_ulibdir}
+ mv $RPM_BUILD_ROOT%{_libdir}/tk%{major}/pkgIndex.tcl $RPM_BUILD_ROOT%{_ulibdir}/tk%{major}
fi
install generic/tkInt.h $RPM_BUILD_ROOT%{_includedir}
@@ -226,6 +212,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libtk%{major}.so
%attr(755,root,root) %{_libdir}/libtk.so
%{_libdir}/libtkstub%{major}.a
+%{_pkgconfigdir}/tk.pc
%{_includedir}/tk*.h
%{_includedir}/tk-private
%{_mandir}/man3/Tk_*.3*
diff --git a/tk-aa-cairo.patch b/tk-aa-cairo.patch
deleted file mode 100644
index 278c9e8..0000000
--- a/tk-aa-cairo.patch
+++ /dev/null
@@ -1,446 +0,0 @@
---- tk/generic/tkCanvLine.c 2003-02-09 01:48:22.000000000 -0600
-+++ tk-working/generic/tkCanvLine.c 2003-08-12 08:27:24.000000000 -0500
-@@ -924,8 +924,48 @@
- Tk_CanvasSetOffset(canvas, linePtr->arrowGC, &linePtr->outline.tsoffset);
- }
- if (numPoints>1) {
-+#ifdef HAVE_CAIRO
-+ if (linePtr->outline.stipple == None) {
-+ XGCValues gc;
-+ cairo_t *cr = ((TkCanvas *) canvas)->cairo;
-+ int i;
-+
-+ XGetGCValues(display, linePtr->outline.gc, GCJoinStyle|GCCapStyle|GCLineWidth, &gc);
-+
-+ cairo_set_target_drawable(cr, display, drawable);
-+ cairo_set_line_width(cr, (double) linePtr->outline.width);
-+ cairo_set_rgb_color(cr,
-+ (double) linePtr->outline.color->red / 65535,
-+ (double) linePtr->outline.color->green / 65535,
-+ (double) linePtr->outline.color->blue / 65535);
-+
-+ switch (gc.cap_style) {
-+ case CapButt: cairo_set_line_cap(cr, CAIRO_LINE_CAP_BUTT); break;
-+ case CapRound: cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); break;
-+ }
-+
-+ switch (gc.join_style) {
-+ case JoinRound: cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND); break;
-+ case JoinBevel: cairo_set_line_join(cr, CAIRO_LINE_JOIN_BEVEL); break;
-+ default: cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER);
-+ }
-+
-+ cairo_new_path(cr);
-+ cairo_move_to (cr, (double) pointPtr[0].x, (double) pointPtr[0].y);
-+
-+ for(i = 0; i < numPoints; i++) {
-+ cairo_line_to (cr, (double) pointPtr[i].x, (double) pointPtr[i].y);
-+ }
-+
-+ cairo_stroke(cr);
-+ } else {
-+ XDrawLines(display, drawable, linePtr->outline.gc, pointPtr, numPoints,
-+ CoordModeOrigin);
-+ }
-+#else
- XDrawLines(display, drawable, linePtr->outline.gc, pointPtr, numPoints,
- CoordModeOrigin);
-+#endif
- } else {
- int intwidth = (int) (linewidth + 0.5);
- if (intwidth<1) {
-diff --ignore-matching-lines=RCS --exclude=CVS -ru tk/generic/tkCanvPoly.c tk-working/generic/tkCanvPoly.c
---- tk/generic/tkCanvPoly.c 2003-05-10 19:52:41.000000000 -0500
-+++ tk-working/generic/tkCanvPoly.c 2003-08-12 08:27:24.000000000 -0500
-@@ -846,12 +846,79 @@
- */
-
- if (gc != None && numPoints>3) {
-+#ifdef HAVE_CAIRO
-+ XGCValues lgc;
-+ XColor fg;
-+ cairo_t *cr = ((TkCanvas *) canvas)->cairo;
-+ int i;
-+
-+ XGetGCValues(display, gc, GCStipple|GCForeground|GCLineWidth, &lgc);
-+
-+ if (lgc.stipple == None) {
-+ fg.pixel = lgc.foreground;
-+
-+ XQueryColor(display,
-+ XDefaultColormapOfScreen(XDefaultScreenOfDisplay(display)),
-+ &fg);
-+
-+ cairo_set_target_drawable(cr, display, drawable);
-+ cairo_set_line_width(cr, (double) lgc.line_width);
-+ cairo_set_rgb_color(cr,
-+ (double) fg.red / 65535,
-+ (double) fg.green / 65535,
-+ (double) fg.blue / 65535);
-+
-+ cairo_new_path(cr);
-+ cairo_move_to (cr, (double) pointPtr[0].x, (double) pointPtr[0].y);
-+
-+ for(i = 0; i < numPoints; i++) {
-+ cairo_line_to (cr, (double) pointPtr[i].x, (double) pointPtr[i].y);
-+ }
-+
-+ cairo_fill(cr);
-+ } else {
-+ XFillPolygon(display, drawable, gc, pointPtr, numPoints, Complex,
-+ CoordModeOrigin);
-+ }
-+#else
- XFillPolygon(display, drawable, gc, pointPtr, numPoints, Complex,
- CoordModeOrigin);
-+#endif
- }
- if (outlineGC != None) {
-+#ifdef HAVE_CAIRO
-+ XGCValues lgc;
-+ XColor fg;
-+ cairo_t *cr = ((TkCanvas *) canvas)->cairo;
-+ int i;
-+
-+ XGetGCValues(display, outlineGC, GCForeground|GCLineWidth, &lgc);
-+
-+ fg.pixel = lgc.foreground;
-+
-+ XQueryColor(display,
-+ XDefaultColormapOfScreen(XDefaultScreenOfDisplay(display)),
-+ &fg);
-+
-+ cairo_set_target_drawable(cr, display, drawable);
-+ cairo_set_line_width(cr, (double) lgc.line_width);
-+ cairo_set_rgb_color(cr,
-+ (double) fg.red / 65535,
-+ (double) fg.green / 65535,
-+ (double) fg.blue / 65535);
-+
-+ cairo_new_path(cr);
-+ cairo_move_to (cr, (double) pointPtr[0].x, (double) pointPtr[0].y);
-+
-+ for(i = 0; i < numPoints; i++) {
-+ cairo_line_to (cr, (double) pointPtr[i].x, (double) pointPtr[i].y);
-+ }
-+
-+ cairo_stroke(cr);
-+#else
- XDrawLines(display, drawable, outlineGC, pointPtr,
- numPoints, CoordModeOrigin);
-+#endif
- }
- if (pointPtr != staticPoints) {
- ckfree((char *) pointPtr);
-@@ -984,12 +1051,65 @@
- polyPtr->numPoints, polyPtr->splineSteps, pointPtr,
- (double *) NULL);
- if (polyPtr->fillGC != None) {
-+#ifdef HAVE_CAIRO
-+ XGCValues gc;
-+ cairo_t *cr = ((TkCanvas *) canvas)->cairo;
-+ int i;
-+
-+ XGetGCValues(display, polyPtr->fillGC, GCLineWidth, &gc);
-+
-+ cairo_set_target_drawable(cr, display, drawable);
-+ cairo_set_line_width(cr, (double) gc.line_width);
-+ cairo_set_rgb_color(cr,
-+ (double) polyPtr->fillColor->red / 65535,
-+ (double) polyPtr->fillColor->green / 65535,
-+ (double) polyPtr->fillColor->blue / 65535);
-+
-+ cairo_new_path(cr);
-+ cairo_move_to (cr, (double) pointPtr[0].x, (double) pointPtr[0].y);
-+
-+ for(i = 0; i < numPoints; i++) {
-+ cairo_line_to (cr, (double) pointPtr[i].x, (double) pointPtr[i].y);
-+ }
-+
-+ cairo_fill(cr);
-+#else
- XFillPolygon(display, drawable, polyPtr->fillGC, pointPtr,
- numPoints, Complex, CoordModeOrigin);
-+#endif
- }
- if (polyPtr->outline.gc != None) {
-+#ifdef HAVE_CAIRO
-+ if (polyPtr->outline.stipple == None) {
-+ XGCValues gc;
-+ cairo_t *cr = ((TkCanvas *) canvas)->cairo;
-+ int i;
-+
-+ XGetGCValues(display, polyPtr->outline.gc, GCLineWidth, &gc);
-+
-+ cairo_set_target_drawable(cr, display, drawable);
-+ cairo_set_line_width(cr, (double) gc.line_width);
-+ cairo_set_rgb_color(cr,
-+ (double) polyPtr->outline.color->red / 65535,
-+ (double) polyPtr->outline.color->green / 65535,
-+ (double) polyPtr->outline.color->blue / 65535);
-+
-+ cairo_new_path(cr);
-+ cairo_move_to (cr, (double) pointPtr[0].x, (double) pointPtr[0].y);
-+
-+ for(i = 0; i < numPoints; i++) {
-+ cairo_line_to (cr, (double) pointPtr[i].x, (double) pointPtr[i].y);
-+ }
-+
-+ cairo_stroke(cr);
-+ } else {
-+ XDrawLines(display, drawable, polyPtr->outline.gc, pointPtr,
-+ numPoints, CoordModeOrigin);
-+ }
-+#else
- XDrawLines(display, drawable, polyPtr->outline.gc, pointPtr,
- numPoints, CoordModeOrigin);
-+#endif
- }
- if (pointPtr != staticPoints) {
- ckfree((char *) pointPtr);
-diff --ignore-matching-lines=RCS --exclude=CVS -ru tk/generic/tkCanvas.c tk-working/generic/tkCanvas.c
---- tk/generic/tkCanvas.c 2003-05-19 08:04:23.000000000 -0500
-+++ tk-working/generic/tkCanvas.c 2003-08-12 07:23:58.000000000 -0500
-@@ -462,6 +462,9 @@
- #ifndef USE_OLD_TAG_SEARCH
- canvasPtr->bindTagExprs = NULL;
- #endif
-+#ifdef HAVE_CAIRO
-+ canvasPtr->cairo = cairo_create();
-+#endif
- Tcl_InitHashTable(&canvasPtr->idTable, TCL_ONE_WORD_KEYS);
-
- Tk_SetClass(canvasPtr->tkwin, "Canvas");
-@@ -1973,6 +1976,9 @@
- expr = next;
- }
- #endif
-+#ifdef HAVE_CAIRO
-+ cairo_destroy(canvasPtr->cairo);
-+#endif
- Tcl_DeleteTimerHandler(canvasPtr->insertBlinkHandler);
- if (canvasPtr->bindingTable != NULL) {
- Tk_DeleteBindingTable(canvasPtr->bindingTable);
-diff --ignore-matching-lines=RCS --exclude=CVS -ru tk/generic/tkCanvas.h tk-working/generic/tkCanvas.h
---- tk/generic/tkCanvas.h 2003-01-08 17:02:33.000000000 -0600
-+++ tk-working/generic/tkCanvas.h 2003-08-12 07:24:00.000000000 -0500
-@@ -21,6 +21,10 @@
- #include "tk.h"
- #endif
-
-+#ifdef HAVE_CAIRO
-+#include <cairo.h>
-+#endif
-+
- #ifndef USE_OLD_TAG_SEARCH
- typedef struct TagSearchExpr_s TagSearchExpr;
-
-@@ -235,6 +239,9 @@
- #ifndef USE_OLD_TAG_SEARCH
- TagSearchExpr *bindTagExprs; /* linked list of tag expressions used in bindings */
- #endif
-+#ifdef HAVE_CAIRO
-+ cairo_t *cairo; /* Cairo drawable */
-+#endif
- } TkCanvas;
-
- /*
-diff --ignore-matching-lines=RCS --exclude=CVS -ru tk/generic/tkRectOval.c tk-working/generic/tkRectOval.c
---- tk/generic/tkRectOval.c 2003-02-09 01:48:22.000000000 -0600
-+++ tk-working/generic/tkRectOval.c 2003-08-12 07:23:58.000000000 -0500
-@@ -805,9 +805,41 @@
- XFillRectangle(display, drawable, rectOvalPtr->fillGC,
- x1, y1, (unsigned int) (x2-x1), (unsigned int) (y2-y1));
- } else {
-+#ifdef HAVE_CAIRO
-+#define ARC_MAGIC ((double) 0.5522847498)
-+ cairo_t *cr = ((TkCanvas *) canvas)->cairo;
-+ double cx, cy, rx, ry;
-+ XGCValues gc;
-+
-+ XGetGCValues(display, rectOvalPtr->fillGC, GCLineWidth, &gc);
-+
-+ cx = ((x2-x1)/2)+x1;
-+ cy = ((y2-y1)/2)+y1;
-+ rx = (x2-x1)/2;
-+ ry = (y2-y1)/2;
-+
-+ cairo_set_target_drawable (cr, display, drawable);
-+ cairo_set_rgb_color(cr,
-+ (double) rectOvalPtr->fillColor->red / 65535,
-+ (double) rectOvalPtr->fillColor->green / 65535,
-+ (double) rectOvalPtr->fillColor->blue / 65535);
-+ cairo_set_line_width(cr, (double) gc.line_width);
-+
-+ cairo_new_path(cr);
-+ cairo_move_to (cr, cx + rx, cy);
-+
-+ cairo_curve_to (cr, cx + rx, cy + ry * ARC_MAGIC, cx + rx * ARC_MAGIC, cy + ry, cx, cy + ry);
-+ cairo_curve_to (cr, cx - rx * ARC_MAGIC, cy + ry, cx - rx, cy + ry * ARC_MAGIC, cx - rx, cy);
-+ cairo_curve_to (cr, cx - rx, cy - ry * ARC_MAGIC, cx - rx * ARC_MAGIC, cy - ry, cx, cy - ry);
-+ cairo_curve_to (cr, cx + rx * ARC_MAGIC, cy - ry, cx + rx, cy - ry * ARC_MAGIC, cx + rx, cy);
-+
-+ cairo_fill(cr);
-+ cairo_stroke(cr);
-+#else
- XFillArc(display, drawable, rectOvalPtr->fillGC,
- x1, y1, (unsigned) (x2-x1), (unsigned) (y2-y1),
- 0, 360*64);
-+#endif
- }
- if (fillStipple != None) {
- XSetTSOrigin(display, rectOvalPtr->fillGC, 0, 0);
-@@ -819,8 +851,38 @@
- XDrawRectangle(display, drawable, rectOvalPtr->outline.gc,
- x1, y1, (unsigned) (x2-x1), (unsigned) (y2-y1));
- } else {
-+#ifdef HAVE_CAIRO
-+ cairo_t *cr = ((TkCanvas *) canvas)->cairo;
-+ double cx, cy, rx, ry;
-+ XGCValues gc;
-+
-+ XGetGCValues(display, rectOvalPtr->outline.gc, GCLineWidth, &gc);
-+
-+ cx = ((x2-x1)/2)+x1;
-+ cy = ((y2-y1)/2)+y1;
-+ rx = (x2-x1)/2;
-+ ry = (y2-y1)/2;
-+
-+ cairo_set_target_drawable (cr, display, drawable);
-+ cairo_set_rgb_color(cr,
-+ (double) rectOvalPtr->outline.color->red / 65535,
-+ (double) rectOvalPtr->outline.color->green / 65535,
-+ (double) rectOvalPtr->outline.color->blue / 65535);
-+ cairo_set_line_width(cr, (double) gc.line_width);
-+
-+ cairo_new_path(cr);
-+ cairo_move_to (cr, cx + rx, cy);
-+
-+ cairo_curve_to (cr, cx + rx, cy + ry * ARC_MAGIC, cx + rx * ARC_MAGIC, cy + ry, cx, cy + ry);
-+ cairo_curve_to (cr, cx - rx * ARC_MAGIC, cy + ry, cx - rx, cy + ry * ARC_MAGIC, cx - rx, cy);
-+ cairo_curve_to (cr, cx - rx, cy - ry * ARC_MAGIC, cx - rx * ARC_MAGIC, cy - ry, cx, cy - ry);
-+ cairo_curve_to (cr, cx + rx * ARC_MAGIC, cy - ry, cx + rx, cy - ry * ARC_MAGIC, cx + rx, cy);
-+
-+ cairo_stroke(cr);
-+#else
- XDrawArc(display, drawable, rectOvalPtr->outline.gc,
- x1, y1, (unsigned) (x2-x1), (unsigned) (y2-y1), 0, 360*64);
-+#endif
- }
- Tk_ResetOutlineGC(canvas, itemPtr, &(rectOvalPtr->outline));
- }
-diff --ignore-matching-lines=RCS --exclude=CVS -ru tk/unix/Makefile.in tk-working/unix/Makefile.in
---- tk/unix/Makefile.in 2003-05-31 13:32:20.000000000 -0500
-+++ tk-working/unix/Makefile.in 2003-08-12 07:23:56.000000000 -0500
-@@ -129,7 +129,7 @@
- # Linker switch(es) to use to link with the X11 library archive (the
- # configure script will try to set this value automatically, but you
- # can override it).
--X11_LIB_SWITCHES = @XLIBSW@ $(XFT_LIBS)
-+X11_LIB_SWITCHES = @XLIBSW@ $(XFT_LIBS) $(CAIRO_LIBS)
-
-
- # To turn off the security checks that disallow incoming sends when
-@@ -251,6 +251,10 @@
- XFT_CFLAGS = @XFT_CFLAGS@
- XFT_LIBS = @XFT_LIBS@
-
-+# support for Cairo:
-+CAIRO_CFLAGS = @CAIRO_CFLAGS@
-+CAIRO_LIBS = @CAIRO_LIBS@
-+
- #----------------------------------------------------------------
- # The information below is modified by the configure script when
- # Makefile is generated from Makefile.in. You shouldn't normally
-@@ -836,40 +840,40 @@
- $(CC) -c $(CC_SWITCHES_NO_STUBS) $(GENERIC_DIR)/tkSquare.c
-
- tkCanvas.o: $(GENERIC_DIR)/tkCanvas.c
-- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvas.c
-+ $(CC) -c $(CC_SWITCHES) $(CAIRO_CFLAGS) $(GENERIC_DIR)/tkCanvas.c
-
- tkCanvArc.o: $(GENERIC_DIR)/tkCanvArc.c
-- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvArc.c
-+ $(CC) -c $(CC_SWITCHES) $(CAIRO_CFLAGS) $(GENERIC_DIR)/tkCanvArc.c
-
- tkCanvBmap.o: $(GENERIC_DIR)/tkCanvBmap.c
-- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvBmap.c
-+ $(CC) -c $(CC_SWITCHES) $(CAIRO_CFLAGS) $(GENERIC_DIR)/tkCanvBmap.c
-
- tkCanvImg.o: $(GENERIC_DIR)/tkCanvImg.c
-- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvImg.c
-+ $(CC) -c $(CC_SWITCHES) $(CAIRO_CFLAGS) $(GENERIC_DIR)/tkCanvImg.c
-
- tkCanvLine.o: $(GENERIC_DIR)/tkCanvLine.c
-- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvLine.c
-+ $(CC) -c $(CC_SWITCHES) $(CAIRO_CFLAGS) $(GENERIC_DIR)/tkCanvLine.c
-
- tkCanvPoly.o: $(GENERIC_DIR)/tkCanvPoly.c
-- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvPoly.c
-+ $(CC) -c $(CC_SWITCHES) $(CAIRO_CFLAGS) $(GENERIC_DIR)/tkCanvPoly.c
-
- tkCanvPs.o: $(GENERIC_DIR)/tkCanvPs.c
-- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvPs.c
-+ $(CC) -c $(CC_SWITCHES) $(CAIRO_CFLAGS) $(GENERIC_DIR)/tkCanvPs.c
-
- tkCanvText.o: $(GENERIC_DIR)/tkCanvText.c
-- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvText.c
-+ $(CC) -c $(CC_SWITCHES) $(CAIRO_CFLAGS) $(GENERIC_DIR)/tkCanvText.c
-
- tkCanvUtil.o: $(GENERIC_DIR)/tkCanvUtil.c
-- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvUtil.c
-+ $(CC) -c $(CC_SWITCHES) $(CAIRO_CFLAGS) $(GENERIC_DIR)/tkCanvUtil.c
-
- tkCanvWind.o: $(GENERIC_DIR)/tkCanvWind.c
-- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvWind.c
-+ $(CC) -c $(CC_SWITCHES) $(CAIRO_CFLAGS) $(GENERIC_DIR)/tkCanvWind.c
-
- tkRectOval.o: $(GENERIC_DIR)/tkRectOval.c
-- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkRectOval.c
-+ $(CC) -c $(CC_SWITCHES) $(CAIRO_CFLAGS) $(GENERIC_DIR)/tkRectOval.c
-
- tkTrig.o: $(GENERIC_DIR)/tkTrig.c
-- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTrig.c
-+ $(CC) -c $(CC_SWITCHES) $(CAIRO_CFLAGS) $(GENERIC_DIR)/tkTrig.c
-
- tkImage.o: $(GENERIC_DIR)/tkImage.c
- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImage.c
-diff --ignore-matching-lines=RCS --exclude=CVS -ru tk/unix/configure.in tk-working/unix/configure.in
---- tk/unix/configure.in 2003-06-02 11:13:13.000000000 -0500
-+++ tk-working/unix/configure.in 2003-08-12 07:23:56.000000000 -0500
-@@ -282,6 +282,35 @@
- fi
-
- #--------------------------------------------------------------------
-+# Check for cairo
-+#--------------------------------------------------------------------
-+AC_ARG_ENABLE(cairo,
-+ [ --enable-cairo Use cairo [--disable-cairo]],
-+ [enable_cairo=$enableval],
-+ [enable_cairo="no"])
-+
-+CAIRO_CFLAGS=""
-+CAIRO_LIBS=""
-+
-+if test "$enable_cairo" = "yes" ; then
-+ AC_MSG_CHECKING([for cairo configuration])
-+ CAIRO_CFLAGS=`pkg-config --cflags cairo` || enable_cairo="no"
-+ CAIRO_LIBS=`pkg-config --libs cairo` || enable_cairo="no"
-+ if test "$enable_cairo" = "yes" ; then
-+ AC_MSG_RESULT([ok])
-+ else
-+ AC_MSG_WARN([Can't find cairo configuration])
-+ fi
-+fi
-+
-+if test $enable_cairo = "yes" ; then
-+ AC_DEFINE(HAVE_CAIRO)
-+fi
-+
-+AC_SUBST(CAIRO_CFLAGS)
-+AC_SUBST(CAIRO_LIBS)
-+
-+#--------------------------------------------------------------------
- # Check for freetype / fontconfig / Xft support.
- #--------------------------------------------------------------------
-
diff --git a/tk-ieee.patch b/tk-ieee.patch
deleted file mode 100644
index a50ff34..0000000
--- a/tk-ieee.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- tk8.5a2/unix/tcl.m4.orig 2005-04-05 21:33:01.645942000 +0200
-+++ tk8.5a2/unix/tcl.m4 2005-06-18 21:09:27.278392960 +0200
-@@ -2397,12 +2397,9 @@
- #--------------------------------------------------------------------
- # On a few very rare systems, all of the libm.a stuff is
- # already in libc.a. Set compiler flags accordingly.
-- # Also, Linux requires the "ieee" library for math to work
-- # right (and it must appear before "-lm").
- #--------------------------------------------------------------------
-
- AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
-- AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
-
- #--------------------------------------------------------------------
- # Interactive UNIX requires -linet instead of -lsocket, plus it
diff --git a/tk-lib64.patch b/tk-lib64.patch
deleted file mode 100644
index 8a1c3a0..0000000
--- a/tk-lib64.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -urN tk8.5a3.org/unix/Makefile.in tk8.5a3/unix/Makefile.in
---- tk8.5a3.org/unix/Makefile.in 2005-06-04 23:00:25.000000000 +0200
-+++ tk8.5a3/unix/Makefile.in 2005-06-17 23:59:45.195045312 +0200
-@@ -47,7 +47,7 @@
- # Directory from which applications will reference the library of Tcl
- # scripts (note: you can set the TK_LIBRARY environment variable at
- # run-time to override the compiled-in location):
--TK_LIBRARY = @TK_LIBRARY@
-+TK_LIBRARY = $(libdir)/tk$(VERSION)
-
- # Path to use at runtime to refer to LIB_INSTALL_DIR:
- LIB_RUNTIME_DIR = $(libdir)
-@@ -701,17 +701,7 @@
- rm -f "$(PKG_INDEX)"; \
- (\
- echo "if {[catch {package present Tcl 8.5.0}]} return";\
-- relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\
-- if test "x$(DLL_INSTALL_DIR)" != "x$(BIN_INSTALL_DIR)"; then \
-- echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}$(TK_LIB_FILE)]] Tk]";\
-- else \
-- echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\
-- echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\
-- echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)]] Tk]";\
-- echo "} else {";\
-- echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll]] Tk]";\
-- echo "}";\
-- fi \
-+ echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load $(DLL_INSTALL_DIR)/$(TK_LIB_FILE) Tk]";\
- ) > "$(PKG_INDEX)"; \
- fi
- @echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/"
diff --git a/tk-link.patch b/tk-link.patch
index be3eaf9..c80c583 100644
--- a/tk-link.patch
+++ b/tk-link.patch
@@ -1,11 +1,15 @@
---- tk8.5.10/unix/configure.in.orig 2011-06-29 20:07:08.254526698 +0200
-+++ tk8.5.10/unix/configure.in 2011-06-29 20:17:19.254547155 +0200
-@@ -529,7 +529,7 @@
+diff --git a/unix/configure.in b/unix/configure.in
+index e7bf023..7d12f41 100755
+--- a/unix/configure.in
++++ b/unix/configure.in
+@@ -485,8 +485,8 @@ if test $tk_aqua = no; then
+ XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no"
if test "$found_xft" = "no" ; then
found_xft=yes
- XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no"
+- XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no"
- XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || found_xft="no"
-+ XFT_LIBS=`pkg-config --libs xft fontconfig 2>/dev/null` || found_xft="no"
++ XFT_CFLAGS=`pkg-config --cflags xft fontconfig freetype2 2>/dev/null` || found_xft="no"
++ XFT_LIBS=`pkg-config --libs xft fontconfig freetype2 2>/dev/null` || found_xft="no"
fi
AC_MSG_RESULT([$found_xft])
dnl make sure that compiling against Xft header file doesn't bomb
diff --git a/tk-norpath.patch b/tk-norpath.patch
index f0005ba..f8221fe 100644
--- a/tk-norpath.patch
+++ b/tk-norpath.patch
@@ -12,14 +12,15 @@
# support for embedded libraries on Darwin / Mac OS X
DYLIB_INSTALL_DIR = ${LIB_RUNTIME_DIR}
---- tk8.5.13/unix/tcl.m4.orig 2012-11-28 21:37:18.227295408 +0100
-+++ tk8.5.13/unix/tcl.m4 2012-11-28 21:38:22.233962299 +0100
-@@ -2103,7 +2103,7 @@
+--- tcl8.5.13/unix/tcl.m4.orig 2012-11-28 21:29:42.223960573 +0100
++++ tcl8.5.13/unix/tcl.m4 2012-11-28 21:31:03.440627511 +0100
+@@ -2050,7 +2050,7 @@
AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [
LIB_SUFFIX=${SHARED_LIB_SUFFIX}
-- MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
-+ MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS}'
+- MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${TCL_SHLIB_LD_EXTRAS} ${SHLIB_LD_LIBS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
++ MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${TCL_SHLIB_LD_EXTRAS} ${SHLIB_LD_LIBS} ${TK_SHLIB_LD_EXTRAS}'
AS_IF([test "${SHLIB_SUFFIX}" = ".dll"], [
INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)"'
DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)"
+
diff --git a/tk-opt_flags_pass_fix.patch b/tk-opt_flags_pass_fix.patch
index 6b1c2a3..1534f40 100644
--- a/tk-opt_flags_pass_fix.patch
+++ b/tk-opt_flags_pass_fix.patch
@@ -1,12 +1,29 @@
-diff -Nru tk8.3.2/unix/tcl.m4 tk8.3.2.new/unix/tcl.m4
---- tk8.3.2/unix/tcl.m4 Tue Aug 8 21:19:32 2000
-+++ tk8.3.2.new/unix/tcl.m4 Thu Nov 16 22:01:37 2000
-@@ -587,7 +587,7 @@
- ECHO_VERSION='`echo ${VERSION}`'
+--- tcl8.6.1/unix/tcl.m4~ 2013-09-19 22:17:13.000000000 +0200
++++ tcl8.6.1/unix/tcl.m4 2014-05-31 19:44:20.670186134 +0200
+@@ -1114,7 +1114,7 @@
TCL_LIB_VERSIONS_OK=ok
CFLAGS_DEBUG=-g
-- CFLAGS_OPTIMIZE=-O
-+ CFLAGS_OPTIMIZE="${CFLAGS}"
AS_IF([test "$GCC" = yes], [
- CFLAGS_WARNING="-Wall -Wno-implicit-int"
- ], [CFLAGS_WARNING=""])
+- CFLAGS_OPTIMIZE=-O2
++ CFLAGS_OPTIMIZE=${OPTFLAGS}
+ CFLAGS_WARNING="-Wall"
+ ], [
+ CFLAGS_OPTIMIZE=-O
+@@ -1409,7 +1409,7 @@
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_SUFFIX=".so"
+
+- CFLAGS_OPTIMIZE="-O2"
++ CFLAGS_OPTIMIZE="${OPTFLAGS}"
+ # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
+ # when you inline the string and math operations. Turn this off to
+ # get rid of the warnings.
+@@ -1507,7 +1507,7 @@
+ CFLAGS_OPTIMIZE="-O0"
+ ;;
+ *)
+- CFLAGS_OPTIMIZE="-O2"
++ CFLAGS_OPTIMIZE="${OPTFLAGS}"
+ ;;
+ esac
+ AS_IF([test "${TCL_THREADS}" = "1"], [
diff --git a/tk-pil.patch b/tk-pil.patch
deleted file mode 100644
index fa2e3b3..0000000
--- a/tk-pil.patch
+++ /dev/null
@@ -1,123 +0,0 @@
---- tk8.5a4/generic/tkImgBmap.c.orig 2006-02-27 11:36:08.000000000 +0100
-+++ tk8.5a4/generic/tkImgBmap.c 2006-05-24 01:18:02.354822500 +0200
-@@ -491,6 +491,21 @@
- char *data = NULL;
- Tcl_DString buffer;
-
-+/* ==================================================================== */
-+/* The pilbitmap booster patch -- patch section */
-+/* ==================================================================== */
-+
-+ char *PILGetBitmapData();
-+
-+ if (string) {
-+ /* Is this a PIL bitmap reference? */
-+ data = PILGetBitmapData(string, widthPtr, heightPtr, hotXPtr, hotYPtr);
-+ if (data)
-+ return data;
-+ }
-+
-+/* ==================================================================== */
-+
- pi.string = string;
- if (string == NULL) {
- if ((interp != NULL) && Tcl_IsSafe(interp)) {
-@@ -1081,6 +1096,98 @@
- }
- }
-
-+/* ==================================================================== */
-+/* The pilbitmap booster patch -- code section */
-+/* ==================================================================== */
-+
-+/* Imaging declaration boldly copied from Imaging.h (!) */
-+
-+typedef struct ImagingInstance *Imaging; /* a.k.a. ImagingImage :-) */
-+
-+typedef unsigned char UINT8;
-+/*typedef int INT32;*/
-+
-+struct ImagingInstance {
-+
-+ /* Format */
-+ char mode[4+1]; /* Band names ("1", "L", "P", "RGB", "RGBA", "CMYK") */
-+ int type; /* Always 0 in this version */
-+ int depth; /* Always 8 in this version */
-+ int bands; /* Number of bands (1, 3, or 4) */
-+ int xsize; /* Image dimension. */
-+ int ysize;
-+
-+ /* Colour palette (for "P" images only) */
-+ void* palette;
-+
-+ /* Data pointers */
-+ UINT8 **image8; /* Set for 8-bit image (pixelsize=1). */
-+ INT32 **image32; /* Set for 32-bit image (pixelsize=4). */
-+
-+ /* Internals */
-+ char **image; /* Actual raster data. */
-+ char *block; /* Set if data is allocated in a single block. */
-+
-+ int pixelsize; /* Size of a pixel, in bytes (1 or 4) */
-+ int linesize; /* Size of a line, in bytes (xsize * pixelsize) */
-+
-+ /* Virtual methods */
-+ void (*im_delete)(Imaging *);
-+
-+};
-+
-+/* The pilbitmap booster patch allows you to pass PIL images to the
-+ Tk bitmap decoder. Passing images this way is much more efficient
-+ than using the "tobitmap" method. */
-+
-+char *
-+PILGetBitmapData(string, widthPtr, heightPtr, hotXPtr, hotYPtr)
-+ char *string;
-+ int *widthPtr, *heightPtr;
-+ int *hotXPtr, *hotYPtr;
-+{
-+ char* data;
-+ char* p;
-+ int y;
-+ Imaging im;
-+
-+ if (strncmp(string, "PIL:", 4) != 0)
-+ return NULL;
-+
-+ im = (Imaging) atol(string + 4);
-+
-+ if (strcmp(im->mode, "1") != 0 && strcmp(im->mode, "L") != 0)
-+ return NULL;
-+
-+ data = p = (char *) ckalloc((unsigned) ((im->xsize+7)/8) * im->ysize);
-+
-+ for (y = 0; y < im->ysize; y++) {
-+ char* in = im->image8[y];
-+ int i, m, b;
-+ b = 0; m = 1;
-+ for (i = 0; i < im->xsize; i++) {
-+ if (in[i] != 0)
-+ b |= m;
-+ m <<= 1;
-+ if (m == 256){
-+ *p++ = b;
-+ b = 0; m = 1;
-+ }
-+ }
-+ if (m != 1)
-+ *p++ = b;
-+ }
-+
-+ *widthPtr = im->xsize;
-+ *heightPtr = im->ysize;
-+ *hotXPtr = -1;
-+ *hotYPtr = -1;
-+
-+ return data;
-+}
-+
-+/* ==================================================================== */
-+
-
- /*
- *----------------------------------------------------------------------
diff --git a/tk-unix-3d-borders.patch b/tk-unix-3d-borders.patch
deleted file mode 100644
index 07b6a0a..0000000
--- a/tk-unix-3d-borders.patch
+++ /dev/null
@@ -1,123 +0,0 @@
---- tk8.5a4/unix/tkUnix3d.c.orig 2005-11-13 22:00:17.000000000 +0100
-+++ tk8.5a4/unix/tkUnix3d.c 2006-05-24 01:21:30.399824500 +0200
-@@ -26,6 +26,7 @@
- typedef struct {
- TkBorder info;
- GC solidGC; /* Used to draw solid relief. */
-+ GC blackGC; /* Used to draw more rounded 3d border. */
- } UnixBorder;
-
- /*
-@@ -49,6 +50,7 @@
- {
- UnixBorder *borderPtr = (UnixBorder *) ckalloc(sizeof(UnixBorder));
- borderPtr->solidGC = None;
-+ borderPtr->blackGC = None;
- return (TkBorder *) borderPtr;
- }
-
-@@ -79,6 +81,9 @@
- if (unixBorderPtr->solidGC != None) {
- Tk_FreeGC(display, unixBorderPtr->solidGC);
- }
-+ if (unixBorderPtr->blackGC != None) {
-+ Tk_FreeGC(display, unixBorderPtr->blackGC);
-+ }
- }
- /*
- *--------------------------------------------------------------
-@@ -121,6 +126,7 @@
- * should appear higher than exterior. */
- {
- TkBorder *borderPtr = (TkBorder *) border;
-+ UnixBorder *unixBorderPtr = ((UnixBorder *)borderPtr);
- GC left, right;
- Display *display = Tk_Display(tkwin);
-
-@@ -129,13 +135,34 @@
- }
-
- if (relief == TK_RELIEF_RAISED) {
-+ int half;
-+
-+ half = width/2;
-+ if (!leftBevel && (width & 1)) {
-+ half++;
-+ }
-+
- XFillRectangle(display, drawable,
- (leftBevel) ? borderPtr->lightGC : borderPtr->darkGC,
- x, y, (unsigned) width, (unsigned) height);
-+ XFillRectangle(display, drawable,
-+ (leftBevel) ? borderPtr->bgGC :
-+ unixBorderPtr->blackGC,
-+ x+half, y, (unsigned) (width-half), (unsigned) height);
- } else if (relief == TK_RELIEF_SUNKEN) {
-+ int half;
-+
-+ half = width/2;
-+ if (leftBevel && (width & 1)) {
-+ half++;
-+ }
-+
- XFillRectangle(display, drawable,
-- (leftBevel) ? borderPtr->darkGC : borderPtr->lightGC,
-+ (leftBevel) ? borderPtr->darkGC : borderPtr->bgGC,
- x, y, (unsigned) width, (unsigned) height);
-+ XFillRectangle(display, drawable,
-+ (leftBevel) ? unixBorderPtr->blackGC : borderPtr->lightGC,
-+ x+half, y, (unsigned) (width-half), (unsigned) height);
- } else if (relief == TK_RELIEF_RIDGE) {
- int half;
-
-@@ -239,7 +266,8 @@
- bottomGC = borderPtr->lightGC;
- break;
- case TK_RELIEF_RAISED:
-- topGC = bottomGC = (topBevel? borderPtr->lightGC : borderPtr->darkGC);
-+ topGC = (topBevel) ? borderPtr->lightGC : borderPtr->darkGC,
-+ bottomGC = (topBevel) ? borderPtr->bgGC : unixBorderPtr->blackGC;
- break;
- case TK_RELIEF_RIDGE:
- topGC = borderPtr->lightGC;
-@@ -256,7 +284,9 @@
- (unsigned) width, (unsigned) height);
- return;
- case TK_RELIEF_SUNKEN:
-- topGC = bottomGC = (topBevel? borderPtr->darkGC : borderPtr->lightGC);
-+ bottomGC = (topBevel) ? unixBorderPtr->blackGC : borderPtr->lightGC;
-+ topGC = (topBevel) ? borderPtr->darkGC
-+ : borderPtr->bgGC;
- break;
- }
-
-@@ -275,7 +305,10 @@
- x1Delta = (leftIn) ? 1 : -1;
- x2Delta = (rightIn) ? -1 : 1;
- halfway = y + height/2;
-- if (!topBevel && (height & 1)) {
-+ if (((relief == TK_RELIEF_SUNKEN) || (relief == TK_RELIEF_RAISED)) &&
-+ topBevel && (height & 1)) {
-+ halfway++;
-+ } else if (!topBevel && (height & 1)) {
- halfway++;
- }
- bottom = y + height;
-@@ -403,6 +436,9 @@
- gcValues.foreground = borderPtr->darkColorPtr->pixel;
- borderPtr->darkGC = Tk_GetGC(tkwin, GCForeground, &gcValues);
-
-+ gcValues.foreground = BlackPixelOfScreen(borderPtr->screen);
-+ ((UnixBorder *)borderPtr)->blackGC = Tk_GetGC(tkwin, GCForeground, &gcValues);
-+
- /*
- * Compute the light shadow color
- */
-@@ -439,6 +475,7 @@
- borderPtr->lightColorPtr = Tk_GetColorByValue(tkwin, &lightColor);
- gcValues.foreground = borderPtr->lightColorPtr->pixel;
- borderPtr->lightGC = Tk_GetGC(tkwin, GCForeground, &gcValues);
-+
- return;
- }
-
diff --git a/tk-unix-scrollbars.patch b/tk-unix-scrollbars.patch
deleted file mode 100644
index 96b5a89..0000000
--- a/tk-unix-scrollbars.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-diff -ru tk/unix/tkUnixScrlbr.c tk-scrollbars/unix/tkUnixScrlbr.c
---- tk/unix/tkUnixScrlbr.c 2000-11-21 19:49:38.000000000 -0600
-+++ tk-scrollbars/unix/tkUnixScrlbr.c 2003-08-17 20:29:40.043125688 -0500
-@@ -101,6 +101,8 @@
- Tk_3DBorder border;
- int relief, width, elementBorderWidth;
- Pixmap pixmap;
-+ XColor *black;
-+ GC blackGC;
-
- if ((scrollPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) {
- goto done;
-@@ -115,6 +117,7 @@
- if (elementBorderWidth < 0) {
- elementBorderWidth = scrollPtr->borderWidth;
- }
-+ elementBorderWidth = 1;
-
- /*
- * In order to avoid screen flashes, this procedure redraws
-@@ -126,6 +129,9 @@
- pixmap = Tk_GetPixmap(scrollPtr->display, Tk_WindowId(tkwin),
- Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin));
-
-+ black = Tk_GetColor(NULL, tkwin, "Black");
-+ blackGC = Tk_GCForColor(black, pixmap);
-+
- if (scrollPtr->highlightWidth != 0) {
- GC gc;
-
-@@ -140,7 +146,7 @@
- scrollPtr->highlightWidth, scrollPtr->highlightWidth,
- Tk_Width(tkwin) - 2*scrollPtr->highlightWidth,
- Tk_Height(tkwin) - 2*scrollPtr->highlightWidth,
-- scrollPtr->borderWidth, scrollPtr->relief);
-+ 1, scrollPtr->relief);
- XFillRectangle(scrollPtr->display, pixmap,
- ((UnixScrollbar*)scrollPtr)->troughGC,
- scrollPtr->inset, scrollPtr->inset,
-@@ -163,24 +169,42 @@
- border = scrollPtr->bgBorder;
- relief = TK_RELIEF_RAISED;
- }
-+
-+ XFillRectangle(scrollPtr->display, pixmap, blackGC,
-+ scrollPtr->inset, scrollPtr->inset,
-+ width, scrollPtr->arrowLength);
-+
-+ Tk_Fill3DRectangle(tkwin, pixmap, border,
-+ scrollPtr->inset, scrollPtr->inset,
-+ width - 1, scrollPtr->arrowLength - 1,
-+ elementBorderWidth, relief);
-+
- if (scrollPtr->vertical) {
-- points[0].x = scrollPtr->inset - 1;
-- points[0].y = scrollPtr->arrowLength + scrollPtr->inset - 1;
-- points[1].x = width + scrollPtr->inset;
-+ int centerX = (width-1)/2 + scrollPtr->inset;
-+ int centerY = 8;
-+
-+ points[0].x = centerX - 4;
-+ points[0].y = centerY + 2;
-+ points[1].x = centerX + 4;
- points[1].y = points[0].y;
-- points[2].x = width/2 + scrollPtr->inset;
-- points[2].y = scrollPtr->inset - 1;
-- Tk_Fill3DPolygon(tkwin, pixmap, border, points, 3,
-- elementBorderWidth, relief);
-+ points[2].x = centerX;
-+ points[2].y = centerY - 3;
-+
-+ XFillPolygon(scrollPtr->display, pixmap, blackGC, points, 3,
-+ Convex, CoordModeOrigin);
- } else {
-- points[0].x = scrollPtr->arrowLength + scrollPtr->inset - 1;
-- points[0].y = scrollPtr->inset - 1;
-- points[1].x = scrollPtr->inset;
-- points[1].y = width/2 + scrollPtr->inset;
-- points[2].x = points[0].x;
-- points[2].y = width + scrollPtr->inset;
-- Tk_Fill3DPolygon(tkwin, pixmap, border, points, 3,
-- elementBorderWidth, relief);
-+ int centerX = 8;
-+ int centerY = (width-1)/2 + scrollPtr->inset;
-+
-+ points[0].x = centerX + 2;
-+ points[0].y = centerY - 4;
-+ points[1].x = points[0].x;
-+ points[1].y = centerY + 4;
-+ points[2].x = centerX - 2;
-+ points[2].y = centerY;
-+
-+ XFillPolygon(scrollPtr->display, pixmap, blackGC, points, 3,
-+ Convex, CoordModeOrigin);
- }
-
- /*
-@@ -195,26 +219,57 @@
- border = scrollPtr->bgBorder;
- relief = TK_RELIEF_RAISED;
- }
-+
- if (scrollPtr->vertical) {
-- points[0].x = scrollPtr->inset;
-- points[0].y = Tk_Height(tkwin) - scrollPtr->arrowLength
-- - scrollPtr->inset + 1;
-- points[1].x = width/2 + scrollPtr->inset;
-- points[1].y = Tk_Height(tkwin) - scrollPtr->inset;
-- points[2].x = width + scrollPtr->inset;
-- points[2].y = points[0].y;
-- Tk_Fill3DPolygon(tkwin, pixmap, border,
-- points, 3, elementBorderWidth, relief);
-+ int centerX = (width-1)/2 + scrollPtr->inset;
-+ int centerY = Tk_Height(tkwin) - 8 - scrollPtr->inset;
-+
-+ XFillRectangle(scrollPtr->display, pixmap, blackGC,
-+ scrollPtr->inset,
-+ Tk_Height(tkwin) - scrollPtr->arrowLength - scrollPtr->inset,
-+ width, scrollPtr->arrowLength);
-+
-+ Tk_Fill3DRectangle(tkwin, pixmap, border,
-+ scrollPtr->inset,
-+ Tk_Height(tkwin) - scrollPtr->arrowLength - scrollPtr->inset,
-+ width - 1,
-+ scrollPtr->arrowLength - 1,
-+ elementBorderWidth, relief);
-+
-+ points[0].x = centerX - 3;
-+ points[0].y = centerY - 2;
-+ points[1].x = centerX + 4;
-+ points[1].y = points[0].y;
-+ points[2].x = centerX;
-+ points[2].y = centerY + 2;
-+
-+ XFillPolygon(scrollPtr->display, pixmap, blackGC, points, 3,
-+ Convex, CoordModeOrigin);
- } else {
-- points[0].x = Tk_Width(tkwin) - scrollPtr->arrowLength
-- - scrollPtr->inset + 1;
-- points[0].y = scrollPtr->inset - 1;
-+ int centerX = Tk_Width(tkwin) - 7 - scrollPtr->inset;
-+ int centerY = (width-1)/2 + scrollPtr->inset;
-+
-+ XFillRectangle(scrollPtr->display, pixmap, blackGC,
-+ Tk_Width(tkwin) - scrollPtr->arrowLength - scrollPtr->inset,
-+ scrollPtr->inset,
-+ width, scrollPtr->arrowLength);
-+
-+ Tk_Fill3DRectangle(tkwin, pixmap, border,
-+ Tk_Width(tkwin) - scrollPtr->arrowLength - scrollPtr->inset,
-+ scrollPtr->inset,
-+ width - 1,
-+ scrollPtr->arrowLength - 1,
-+ elementBorderWidth, relief);
-+
-+ points[0].x = centerX - 2;
-+ points[0].y = centerY + 4;
- points[1].x = points[0].x;
-- points[1].y = width + scrollPtr->inset;
-- points[2].x = Tk_Width(tkwin) - scrollPtr->inset;
-- points[2].y = width/2 + scrollPtr->inset;
-- Tk_Fill3DPolygon(tkwin, pixmap, border,
-- points, 3, elementBorderWidth, relief);
-+ points[1].y = centerY - 4;
-+ points[2].x = centerX + 2;
-+ points[2].y = centerY;
-+
-+ XFillPolygon(scrollPtr->display, pixmap, blackGC, points, 3,
-+ Convex, CoordModeOrigin);
- }
-
- /*
-@@ -223,22 +278,25 @@
-
- if (scrollPtr->activeField == SLIDER) {
- border = scrollPtr->activeBorder;
-- relief = scrollPtr->activeField == SLIDER ? scrollPtr->activeRelief
-- : TK_RELIEF_RAISED;
- } else {
- border = scrollPtr->bgBorder;
-- relief = TK_RELIEF_RAISED;
- }
- if (scrollPtr->vertical) {
-+ XFillRectangle(scrollPtr->display, pixmap, blackGC,
-+ scrollPtr->inset, scrollPtr->sliderFirst,
-+ width, scrollPtr->sliderLast - scrollPtr->sliderFirst);
- Tk_Fill3DRectangle(tkwin, pixmap, border,
- scrollPtr->inset, scrollPtr->sliderFirst,
-- width, scrollPtr->sliderLast - scrollPtr->sliderFirst,
-- elementBorderWidth, relief);
-+ width - 1, scrollPtr->sliderLast - scrollPtr->sliderFirst - 1,
-+ elementBorderWidth, TK_RELIEF_RAISED);
- } else {
-+ XFillRectangle(scrollPtr->display, pixmap, blackGC,
-+ scrollPtr->sliderFirst, scrollPtr->inset,
-+ scrollPtr->sliderLast - scrollPtr->sliderFirst, width);
- Tk_Fill3DRectangle(tkwin, pixmap, border,
- scrollPtr->sliderFirst, scrollPtr->inset,
-- scrollPtr->sliderLast - scrollPtr->sliderFirst, width,
-- elementBorderWidth, relief);
-+ scrollPtr->sliderLast - scrollPtr->sliderFirst - 1, width - 1,
-+ elementBorderWidth, TK_RELIEF_RAISED);
- }
-
- /*
-@@ -250,6 +308,8 @@
- ((UnixScrollbar*)scrollPtr)->copyGC, 0, 0,
- (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin), 0, 0);
- Tk_FreePixmap(scrollPtr->display, pixmap);
-+
-+ Tk_FreeColor(black);
-
- done:
- scrollPtr->flags &= ~REDRAW_PENDING;
-@@ -286,7 +346,7 @@
- scrollPtr->inset = scrollPtr->highlightWidth + scrollPtr->borderWidth;
- width = (scrollPtr->vertical) ? Tk_Width(scrollPtr->tkwin)
- : Tk_Height(scrollPtr->tkwin);
-- scrollPtr->arrowLength = width - 2*scrollPtr->inset + 1;
-+ scrollPtr->arrowLength = 14;
- fieldLength = (scrollPtr->vertical ? Tk_Height(scrollPtr->tkwin)
- : Tk_Width(scrollPtr->tkwin))
- - 2*(scrollPtr->arrowLength + scrollPtr->inset);
-@@ -409,6 +469,18 @@
- unixScrollPtr->copyGC = Tk_GetGC(scrollPtr->tkwin, GCGraphicsExposures,
- &gcValues);
- }
-+
-+ /*
-+ * Borders are always 1 pixel wide now.
-+ */
-+ scrollPtr->elementBorderWidth = 1;
-+ scrollPtr->borderWidth = 1;
-+
-+ if (scrollPtr->width % 2 == 0)
-+ scrollPtr->width--;
-+
-+ if (scrollPtr->width < 14)
-+ scrollPtr->width = 14;
- }
-
- /*
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/tk.git/commitdiff/454f92dc3225688741b58257e42369b18a0c67f8
More information about the pld-cvs-commit
mailing list