diff --git a/srcpkgs/solvespace/patches/char_width.patch b/srcpkgs/solvespace/patches/char_width.patch new file mode 100644 index 00000000000..c754e1d8da5 --- /dev/null +++ b/srcpkgs/solvespace/patches/char_width.patch @@ -0,0 +1,91 @@ +--- src/textwin.cpp 2017-04-16 04:00:21.000000000 -0500 ++++ src/textwin.cpp 2019-02-01 00:47:55.270922800 -0600 +@@ -85,7 +85,7 @@ + editControl.halfRow = halfRow; + editControl.col = col; + +- int x = LEFT_MARGIN + CHAR_WIDTH*col; ++ int x = LEFT_MARGIN + CHAR_WIDTH_*col; + int y = (halfRow - SS.TW.scrollPos)*(LINE_HEIGHT/2); + + ShowTextEditControl(x, y + 18, str); +@@ -447,7 +447,7 @@ + double ox = oldMousePos.x, oy = oldMousePos.y - LINE_HEIGHT; + ox += 3; + oy -= 3; +- int tw = (str.length() + 1)*(CHAR_WIDTH - 1); ++ int tw = (str.length() + 1)*(CHAR_WIDTH_ - 1); + ox = min(ox, (double) (width - 25) - tw); + oy = max(oy, 5.0); + +@@ -583,7 +583,7 @@ + int width, height; + GetTextWindowSize(&width, &height); + +- int px = LEFT_MARGIN + CHAR_WIDTH*editControl.col; ++ int px = LEFT_MARGIN + CHAR_WIDTH_*editControl.col; + int py = (editControl.halfRow - SS.TW.scrollPos)*(LINE_HEIGHT/2); + + py += LINE_HEIGHT + 5; +@@ -842,8 +842,8 @@ + if(ltop < (scrollPos-1)) continue; + if(ltop > scrollPos+halfRows) break; + +- for(c = 0; c < min((width/CHAR_WIDTH)+1, (int) MAX_COLS); c++) { +- int x = LEFT_MARGIN + c*CHAR_WIDTH; ++ for(c = 0; c < min((width/CHAR_WIDTH_)+1, (int) MAX_COLS); c++) { ++ int x = LEFT_MARGIN + c*CHAR_WIDTH_; + int y = (ltop-scrollPos)*(LINE_HEIGHT/2) + 4; + + int fg = meta[r][c].fg; +@@ -866,7 +866,7 @@ + // Move the quad down a bit, so that the descenders + // still have the correct background. + y += adj; +- ssglAxisAlignedQuad(x, x + CHAR_WIDTH, y, y + bh, false); ++ ssglAxisAlignedQuad(x, x + CHAR_WIDTH_, y, y + bh, false); + y -= adj; + } + } else if(a == 1) { +@@ -912,8 +912,8 @@ + glLineWidth(1); + glBegin(GL_LINES); + int yp = y + CHAR_HEIGHT; +- glVertex2d(LEFT_MARGIN + cs*CHAR_WIDTH, yp); +- glVertex2d(LEFT_MARGIN + cf*CHAR_WIDTH, yp); ++ glVertex2d(LEFT_MARGIN + cs*CHAR_WIDTH_, yp); ++ glVertex2d(LEFT_MARGIN + cf*CHAR_WIDTH_, yp); + glEnd(); + + glEnable(GL_TEXTURE_2D); +@@ -979,7 +979,7 @@ + hoveredCol = 0; + + // Find the corresponding character in the text buffer +- int c = (int)((x - LEFT_MARGIN) / CHAR_WIDTH); ++ int c = (int)((x - LEFT_MARGIN) / CHAR_WIDTH_); + int hh = (LINE_HEIGHT)/2; + y += scrollPos*hh; + int r; +--- src/toolbar.cpp 2017-04-16 03:56:19.000000000 -0500 ++++ src/toolbar.cpp 2019-02-01 00:47:55.270922800 -0600 +@@ -218,7 +218,7 @@ + } + } + +- int tw = str.length() * (SS.TW.CHAR_WIDTH - 1) + 10, ++ int tw = str.length() * (SS.TW.CHAR_WIDTH_ - 1) + 10, + th = SS.TW.LINE_HEIGHT + 2; + + double ox = toolbarMouseX + 3, oy = toolbarMouseY + 3; +--- src/ui.h 2017-04-16 04:00:07.000000000 -0500 ++++ src/ui.h 2019-02-01 00:47:55.270922800 -0600 +@@ -27,7 +27,7 @@ + float fgColorTable[256*3]; + + enum { +- CHAR_WIDTH = 9, ++ CHAR_WIDTH_ = 9, + CHAR_HEIGHT = 16, + LINE_HEIGHT = 20, + LEFT_MARGIN = 6, diff --git a/srcpkgs/solvespace/template b/srcpkgs/solvespace/template new file mode 100644 index 00000000000..974f2f073b0 --- /dev/null +++ b/srcpkgs/solvespace/template @@ -0,0 +1,15 @@ +# Template file for 'solvespace' +pkgname=solvespace +version=2.3 +revision=1 +wrksrc=solvespace +build_style=cmake +hostmakedepends="pkg-config" +makedepends="glew-devel gtkmm2-devel json-c-devel" +short_desc="Parametric 2d/3d CAD" +maintainer="Robert Lowry " +license="GPL-3.0-or-later" +homepage="https://solvespace.com/index.pl" +distfiles="https://github.com/solvespace/solvespace/releases/download/v${version}/solvespace-source.tar.gz" +checksum=0be0b2100c0b01eddded2a4dc60455d61cf67816189905af0e73082bfef96000 +nocross="https://travis-ci.org/bobertlo/void-packages/jobs/487251265"