diff options
author | Dmitriy Morozov | 2021-06-16 11:13:54 -0700 |
---|---|---|
committer | Dmitriy Morozov | 2021-06-16 11:14:03 -0700 |
commit | 16715bff8f37a26c328ee60d81a354b6f249904f (patch) | |
tree | f8b2ea2897fbdcbfbeafc4765d1ae9aa848fd5ce | |
parent | 85563d864d150cb311a6922b976720b344aed4af (diff) | |
download | aur-16715bff8f37a26c328ee60d81a354b6f249904f.tar.gz |
Add issue396.patch + bump to pkgrel 3
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | issue396.patch | 294 |
3 files changed, 305 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = ipe pkgdesc = The extensible drawing editor pkgver = 7.2.24 - pkgrel = 2 + pkgrel = 3 url = http://ipe.otfried.org/ arch = i686 arch = x86_64 @@ -20,10 +20,11 @@ pkgbase = ipe source = ipe.bash-completion source = config.patch source = ipe.desktop + source = issue396.patch md5sums = 79a9e7d1fc0cca08e250c3043333fe18 md5sums = 694f0d5402655901be385647e5d8d6e3 md5sums = d4e289bce01302a8b76a0df294c7de40 md5sums = 19fd2cac2564125afa0149105d00d3dd + md5sums = 1ccc2c144f39b9fa424ed2e9bb8b162e pkgname = ipe - @@ -3,7 +3,7 @@ pkgname=ipe _dirver=7.2 pkgver=7.2.24 -pkgrel=2 +pkgrel=3 pkgdesc="The extensible drawing editor" url="http://ipe.otfried.org/" depends=('lua53' 'qt5-base' 'qt5-svg' 'freetype2' 'zlib' 'poppler' 'hicolor-icon-theme' 'gsl' 'libspiro') @@ -14,6 +14,7 @@ source=("https://github.com/otfried/$pkgname/releases/download/v$pkgver/$pkgname "ipe.bash-completion" "config.patch" "ipe.desktop" + "issue396.patch" ) prepare() { @@ -24,9 +25,12 @@ prepare() { sed -i -e 's/"ipefonts.h"/<ipefonts.h>/' ipepresenter/ipepresenter.h sed -i -e 's/"ipethumbs.h"/<ipethumbs.h>/' ipepresenter/ipepresenter_qt.cpp - # https://github.com/otfried/ipe-issues/issues/392 # TODO: remove after 7.2.25 + # https://github.com/otfried/ipe-issues/issues/392 sed -i -e 's/(\*ui)->setBookmarks(no, &bm\[0\]);/(*ui)->setBookmarks(no, bm.data());/' ipe/uilua.cpp + + # https://github.com/otfried/ipe-issues/issues/396 + patch -p2 -l < "$srcdir/issue396.patch" } build() { @@ -71,4 +75,5 @@ package() { md5sums=('79a9e7d1fc0cca08e250c3043333fe18' '694f0d5402655901be385647e5d8d6e3' 'd4e289bce01302a8b76a0df294c7de40' - '19fd2cac2564125afa0149105d00d3dd') + '19fd2cac2564125afa0149105d00d3dd' + '1ccc2c144f39b9fa424ed2e9bb8b162e') diff --git a/issue396.patch b/issue396.patch new file mode 100644 index 000000000000..c31fa1489ebd --- /dev/null +++ b/issue396.patch @@ -0,0 +1,294 @@ +diff --git a/src/ipe/appui_qt.cpp b/src/ipe/appui_qt.cpp +index 3ffe128..4cb0674 100644 +--- a/src/ipe/appui_qt.cpp ++++ b/src/ipe/appui_qt.cpp +@@ -894,7 +894,7 @@ static const char * const aboutText = + void AppUi::aboutIpe() + { + std::vector<char> buf(strlen(aboutText) + 100); +- sprintf(&buf[0], aboutText, ++ sprintf(buf.data(), aboutText, + IPELIB_VERSION / 10000, + (IPELIB_VERSION / 100) % 100, + IPELIB_VERSION % 100, +@@ -903,7 +903,7 @@ void AppUi::aboutIpe() + QMessageBox msgBox(this); + msgBox.setWindowTitle("About Ipe"); + msgBox.setWindowIcon(prefsIcon("ipe")); +- msgBox.setInformativeText(&buf[0]); ++ msgBox.setInformativeText(buf.data()); + msgBox.setIconPixmap(prefsPixmap("ipe")); + msgBox.setStandardButtons(QMessageBox::Ok); + msgBox.exec(); +diff --git a/src/ipe/appui_win.cpp b/src/ipe/appui_win.cpp +index 4ddc912..41aa2ed 100644 +--- a/src/ipe/appui_win.cpp ++++ b/src/ipe/appui_win.cpp +@@ -1334,13 +1334,13 @@ static const char * const aboutText = + void AppUi::aboutIpe() + { + std::vector<char> buf(strlen(aboutText) + 100); +- sprintf(&buf[0], aboutText, ++ sprintf(buf.data(), aboutText, + IPELIB_VERSION / 10000, + (IPELIB_VERSION / 100) % 100, + IPELIB_VERSION % 100, + COPYRIGHT_YEAR); + +- WString wbuf(&buf[0]); ++ WString wbuf(buf.data()); + MessageBoxW(hwnd, wbuf.data(), L"About Ipe", + MB_OK | MB_ICONINFORMATION | MB_APPLMODAL); + } +diff --git a/src/ipe/main_win.cpp b/src/ipe/main_win.cpp +index 36eb58e..f32161f 100644 +--- a/src/ipe/main_win.cpp ++++ b/src/ipe/main_win.cpp +@@ -98,7 +98,7 @@ static HACCEL makeAccel(lua_State *L, int arg) + lua_pop(L, 2); + } + +- HACCEL hAccel = CreateAcceleratorTable(&accel[0], accel.size()); ++ HACCEL hAccel = CreateAcceleratorTable(accel.data(), accel.size()); + return hAccel; + } + +diff --git a/src/ipe/pagesorter_win.cpp b/src/ipe/pagesorter_win.cpp +index 74c2d68..05af4a0 100644 +--- a/src/ipe/pagesorter_win.cpp ++++ b/src/ipe/pagesorter_win.cpp +@@ -360,7 +360,7 @@ int AppUi::pageSorter(lua_State *L, Document *doc, int pno, + + + int res = +- DialogBoxIndirectParamW(nullptr, (LPCDLGTEMPLATE) &t[0], ++ DialogBoxIndirectParamW(nullptr, (LPCDLGTEMPLATE) t.data(), + nullptr, dialogProc, (LPARAM) &sData); + + if (res == 1) { +diff --git a/src/ipecairo/ipecairopainter.cpp b/src/ipecairo/ipecairopainter.cpp +index 9b913e3..f029575 100644 +--- a/src/ipecairo/ipecairopainter.cpp ++++ b/src/ipecairo/ipecairopainter.cpp +@@ -547,7 +547,7 @@ void CairoPainter::doDrawPath(TPathMode mode) + std::vector<double> dashes; + double offset; + dashStyle(dashes, offset); +- cairo_set_dash(iCairo, &dashes[0], dashes.size(), offset); ++ cairo_set_dash(iCairo, dashes.data(), dashes.size(), offset); + } + cairo_stroke(iCairo); + } +@@ -936,7 +936,7 @@ void CairoPainter::opd() + dashes.emplace_back(obj->number()->value()); + } + double offset = iArgs[1]->number()->value(); +- cairo_set_dash(iCairo, &dashes[0], dashes.size(), offset); ++ cairo_set_dash(iCairo, dashes.data(), dashes.size(), offset); + } + + void CairoPainter::opi() +@@ -1420,7 +1420,7 @@ void CairoPainter::drawGlyphs(std::vector<cairo_glyph_t> &glyphs) + 0.5); + cairo_save(iCairo); + cairo_set_font_matrix(iCairo, &matrix); +- cairo_show_glyphs(iCairo, &glyphs[0], glyphs.size()); ++ cairo_show_glyphs(iCairo, glyphs.data(), glyphs.size()); + cairo_restore(iCairo); + double s = ps.iFontSize; + cairo_set_font_size(iCairo, 0.23 * s); +@@ -1442,7 +1442,7 @@ void CairoPainter::drawGlyphs(std::vector<cairo_glyph_t> &glyphs) + cairo_set_source_rgba(iCairo, + ps.iFillRgb[0], ps.iFillRgb[1], ps.iFillRgb[2], + ps.iFillOpacity); +- cairo_show_glyphs(iCairo, &glyphs[0], glyphs.size()); ++ cairo_show_glyphs(iCairo, glyphs.data(), glyphs.size()); + cairo_restore(iCairo); + } + } +diff --git a/src/ipecanvas/ipeselector_win.cpp b/src/ipecanvas/ipeselector_win.cpp +index af3b9d7..d09781d 100644 +--- a/src/ipecanvas/ipeselector_win.cpp ++++ b/src/ipecanvas/ipeselector_win.cpp +@@ -145,7 +145,7 @@ int showPageSelectDialog(int width, int height, const char * title, + t.push_back(0); + t.push_back(0); + +- int res = DialogBoxIndirectParamW(nullptr, (LPCDLGTEMPLATE) &t[0], ++ int res = DialogBoxIndirectParamW(nullptr, (LPCDLGTEMPLATE) t.data(), + nullptr, dialogProc, (LPARAM) &sData); + return res; + } +diff --git a/src/ipelib/ipeplatform.cpp b/src/ipelib/ipeplatform.cpp +index 1639831..4a9ec31 100755 +--- a/src/ipelib/ipeplatform.cpp ++++ b/src/ipelib/ipeplatform.cpp +@@ -616,7 +616,7 @@ std::wstring String::w() const noexcept + return L"\0"; + int rw = MultiByteToWideChar(CP_UTF8, 0, data(), size(), nullptr, 0); + std::wstring result(rw + 1, wchar_t(0)); +- MultiByteToWideChar(CP_UTF8, 0, data(), size(), &result[0], rw); ++ MultiByteToWideChar(CP_UTF8, 0, data(), size(), result.data(), rw); + return result; + } + +diff --git a/src/ipelua/ipelib.cpp b/src/ipelua/ipelib.cpp +index 8c2226b..a2a3879 100644 +--- a/src/ipelua/ipelib.cpp ++++ b/src/ipelua/ipelib.cpp +@@ -517,7 +517,7 @@ static int ipe_splinetobeziers(lua_State *L) + bool closed = lua_toboolean(L, 2); + std::vector<Bezier> result; + if (closed) { +- Bezier::closedSpline(v.size(), &v[0], result); ++ Bezier::closedSpline(v.size(), v.data(), result); + } else { + // get spline type + lua_getfield(L, 1, "type"); +@@ -529,21 +529,21 @@ static int ipe_splinetobeziers(lua_State *L) + lua_pop(L, 1); // pop type + switch (type) { + case CurveSegment::ESpline: +- Bezier::spline(v.size(), &v[0], result); ++ Bezier::spline(v.size(), v.data(), result); + break; + case CurveSegment::EOldSpline: +- Bezier::oldSpline(v.size(), &v[0], result); ++ Bezier::oldSpline(v.size(), v.data(), result); + break; + case CurveSegment::ECardinalSpline: { + lua_getfield(L, 1, "tension"); + if (!lua_isnumber(L, -1)) + luaL_error(L, "spline has no tension"); + float tension = lua_tonumberx(L, -1, nullptr); +- Bezier::cardinalSpline(v.size(), &v[0], tension, result); ++ Bezier::cardinalSpline(v.size(), v.data(), tension, result); + lua_pop(L, 1); // tension + break; } + case CurveSegment::ESpiroSpline: +- Bezier::spiroSpline(v.size(), &v[0], result); ++ Bezier::spiroSpline(v.size(), v.data(), result); + break; + default: + break; +diff --git a/src/ipepresenter/ipepresenter_qt.cpp b/src/ipepresenter/ipepresenter_qt.cpp +index b7551aa..9ed4bb1 100644 +--- a/src/ipepresenter/ipepresenter_qt.cpp ++++ b/src/ipepresenter/ipepresenter_qt.cpp +@@ -406,14 +406,14 @@ static const char * const aboutText = + void MainWindow::aboutIpePresenter() + { + std::vector<char> buf(strlen(aboutText) + 100); +- sprintf(&buf[0], aboutText, ++ sprintf(buf.data(), aboutText, + IPELIB_VERSION / 10000, + (IPELIB_VERSION / 100) % 100, + IPELIB_VERSION % 100); + + QMessageBox msgBox(this); + msgBox.setWindowTitle("About IpePresenter"); +- msgBox.setInformativeText(&buf[0]); ++ msgBox.setInformativeText(buf.data()); + msgBox.setStandardButtons(QMessageBox::Ok); + msgBox.exec(); + } +diff --git a/src/ipepresenter/ipepresenter_win.cpp b/src/ipepresenter/ipepresenter_win.cpp +index 7ce1475..fe984f6 100644 +--- a/src/ipepresenter/ipepresenter_win.cpp ++++ b/src/ipepresenter/ipepresenter_win.cpp +@@ -27,7 +27,7 @@ BOOL setWindowText(HWND h, const char *s) + { + int rw = MultiByteToWideChar(CP_UTF8, 0, s, -1, nullptr, 0); + std::vector<wchar_t> ws(rw); +- MultiByteToWideChar(CP_UTF8, 0, s, -1, &ws[0], rw); ++ MultiByteToWideChar(CP_UTF8, 0, s, -1, ws.data(), rw); + std::vector<wchar_t> w; + for (auto ch : ws) { + if (ch != '\r') { +@@ -37,7 +37,7 @@ BOOL setWindowText(HWND h, const char *s) + } + } + w.push_back(0); +- return SetWindowTextW(h, &w[0]); ++ return SetWindowTextW(h, w.data()); + } + + // -------------------------------------------------------------------- +@@ -520,7 +520,7 @@ static const char * const aboutText = + void AppUi::aboutIpePresenter() + { + std::vector<char> buf(strlen(aboutText) + 100); +- sprintf(&buf[0], aboutText, ++ sprintf(buf.data(), aboutText, + IPELIB_VERSION / 10000, + (IPELIB_VERSION / 100) % 100, + IPELIB_VERSION % 100); +diff --git a/src/ipeui/ipeui_win.cpp b/src/ipeui/ipeui_win.cpp +index 5134dfd..2d3996b 100644 +--- a/src/ipeui/ipeui_win.cpp ++++ b/src/ipeui/ipeui_win.cpp +@@ -38,7 +38,7 @@ BOOL setWindowText(HWND h, const char *s) + } + } + w.push_back(0); +- return SetWindowTextW(h, &w[0]); ++ return SetWindowTextW(h, w.data()); + } + + void sendMessage(HWND h, UINT code, const char *t, WPARAM wParam) +@@ -51,8 +51,8 @@ static std::string wideToUtf8(const wchar_t *wbuf) + { + int rm = WideCharToMultiByte(CP_UTF8, 0, wbuf, -1, nullptr, 0, nullptr, nullptr); + std::vector<char> multi(rm); +- WideCharToMultiByte(CP_UTF8, 0, wbuf, -1, &multi[0], rm, nullptr, nullptr); +- return std::string(&multi[0]); ++ WideCharToMultiByte(CP_UTF8, 0, wbuf, -1, multi.data(), rm, nullptr, nullptr); ++ return std::string(multi.data()); + } + + static void buildFlags(std::vector<short> &t, DWORD flags) +@@ -249,7 +249,7 @@ static std::string getEditText(HWND h) + w.push_back(ch); + } + w.push_back(0); +- return wideToUtf8(&w[0]); ++ return wideToUtf8(w.data()); + } + + void PDialog::retrieveValues() +@@ -509,7 +509,7 @@ bool PDialog::buildAndRun(int w, int h) + int res = + DialogBoxIndirectParamW((HINSTANCE) GetWindowLongPtr(iParent, + GWLP_HINSTANCE), +- (LPCDLGTEMPLATE) &t[0], ++ (LPCDLGTEMPLATE) t.data(), + iParent, (DLGPROC) dialogProc, (LPARAM) this); + // retrieveValues() has been called before EndDialog! + hDialog = nullptr; // already destroyed by Windows +@@ -1014,7 +1014,7 @@ static int ipeui_fileDialog(lua_State *L) + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = hwnd; + +- ofn.lpstrFilter = &filters[0]; ++ ofn.lpstrFilter = filters.data(); + ofn.nFilterIndex = selected; + + ofn.lpstrFile = szFileName; +@@ -1242,7 +1242,7 @@ static int ipeui_wait(lua_State *L) + INFINITE, WT_EXECUTEINWAITTHREAD|WT_EXECUTEONLYONCE); + + DialogBoxIndirectParamW((HINSTANCE) GetWindowLongPtr(parent, GWLP_HINSTANCE), +- (LPCDLGTEMPLATE) &t[0], ++ (LPCDLGTEMPLATE) t.data(), + parent, (DLGPROC) waitDialogProc, + (LPARAM) &dialogHandle); + +@@ -1263,7 +1263,7 @@ static int ipeui_wait(lua_State *L) + lua_pushvalue(L, 2); + + DialogBoxIndirectParamW((HINSTANCE) GetWindowLongPtr(parent, GWLP_HINSTANCE), +- (LPCDLGTEMPLATE) &t[0], ++ (LPCDLGTEMPLATE) t.data(), + parent, (DLGPROC) waitDialogProc, + (LPARAM) &dialogHandle); + UnregisterWait(waitHandle); |