diff options
author | Matteo Bernardini | 2018-04-26 16:12:21 +0200 |
---|---|---|
committer | Matteo Bernardini | 2018-06-09 07:54:05 +0200 |
commit | 243d3f32e2e7f9a803527f02393904f2ec608a0f (patch) | |
tree | 12c448bade2b16de1c70e913215fd50e93d99dce | |
parent | 81c344443219574587ae3d6bccb8f19c1bd346af (diff) | |
download | old.slackbuilds-gambas3.tar.gz |
development/gambas: Updated for version 3.10.0.gambas3
Patched for the newer popplers and to avoid using
fluidsynth (thanks to USUARIONUEVO)
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r-- | development/gambas3/adapt-to-poppler-0.58.patch | 105 | ||||
-rw-r--r-- | development/gambas3/gambas-poppler-0.64.patch | 115 | ||||
-rw-r--r-- | development/gambas3/gambas3.SlackBuild | 15 | ||||
-rw-r--r-- | development/gambas3/gambas3.info | 6 | ||||
-rw-r--r-- | development/gambas3/qt5-5.7.patch | 45 | ||||
-rw-r--r-- | development/gambas3/qt5-ext-5.7.patch | 41 | ||||
-rw-r--r-- | development/gambas3/qt5-webkit-5.7.patch | 30 | ||||
-rw-r--r-- | development/gambas3/sdl2_mixer.diff | 11 |
8 files changed, 242 insertions, 126 deletions
diff --git a/development/gambas3/adapt-to-poppler-0.58.patch b/development/gambas3/adapt-to-poppler-0.58.patch new file mode 100644 index 0000000000..b2819da569 --- /dev/null +++ b/development/gambas3/adapt-to-poppler-0.58.patch @@ -0,0 +1,105 @@ +From 6a4adabfd7e02e6fef99049e8e2373b12b559e69 Mon Sep 17 00:00:00 2001 +From: David Tardon <dtardon@redhat.com> +Date: Wed, 6 Sep 2017 12:58:12 +0200 +Subject: [PATCH] adapt to poppler 0.58 + +--- + gb.pdf/configure.ac | 2 ++ + gb.pdf/src/CPdfDocument.cpp | 24 ++++++++++++++++++++++++ + 2 files changed, 26 insertions(+) + +diff --git a/gb.pdf/configure.ac b/gb.pdf/configure.ac +index 25b344a9a..be4bf9557 100644 +--- a/gb.pdf/configure.ac ++++ b/gb.pdf/configure.ac +@@ -29,6 +29,8 @@ if test "$have_poppler" = "yes"; then + AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_17, $((1-$?)), Poppler version >= 0.17) + pkg-config --atleast-version=0.20.0 poppler + AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_20, $((1-$?)), Poppler version >= 0.20) ++ pkg-config --atleast-version=0.58.0 poppler ++ AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_58, $((1-$?)), Poppler version >= 0.58) + fi + + AC_OUTPUT( \ +diff --git a/gb.pdf/src/CPdfDocument.cpp b/gb.pdf/src/CPdfDocument.cpp +index 43802c77b..80d2d97c5 100644 +--- a/gb.pdf/src/CPdfDocument.cpp ++++ b/gb.pdf/src/CPdfDocument.cpp +@@ -132,11 +132,19 @@ static void aux_return_string_info(void *_object, const char *key) + Dict *info_dict; + char *tmpstr; + ++ #if POPPLER_VERSION_0_58 ++ obj = THIS->doc->getDocInfo (); ++ #else + THIS->doc->getDocInfo (&obj); ++ #endif + if (!obj.isDict()) { GB.ReturnNewZeroString(""); return; } + + info_dict=obj.getDict(); ++ #if POPPLER_VERSION_0_58 ++ dst = info_dict->lookup ((char *)key); ++ #else + info_dict->lookup ((char *)key, &dst); ++ #endif + if (!dst.isString ()) { GB.ReturnNewZeroString(""); } + else { + goo_value = dst.getString(); +@@ -149,8 +157,10 @@ static void aux_return_string_info(void *_object, const char *key) + else + GB.ReturnNewString(goo_value->getCString(),goo_value->getLength()); + } ++ #if ! POPPLER_VERSION_0_58 + dst.free(); + obj.free(); ++ #endif + } + + static void aux_return_date_info(void *_object, const char *key) +@@ -167,11 +177,19 @@ static void aux_return_date_info(void *_object, const char *key) + + GB.ReturnDate(NULL); + ++ #if POPPLER_VERSION_0_58 ++ obj = THIS->doc->getDocInfo (); ++ #else + THIS->doc->getDocInfo (&obj); ++ #endif + if (!obj.isDict()) return; + + info_dict=obj.getDict(); ++ #if POPPLER_VERSION_0_58 ++ dst = info_dict->lookup ((char *)key); ++ #else + info_dict->lookup ((char *)key, &dst); ++ #endif + if (dst.isString ()) + { + goo = dst.getString(); +@@ -197,8 +215,10 @@ static void aux_return_date_info(void *_object, const char *key) + } + + if (tofree) GB.FreeString(&tofree); ++ #if ! POPPLER_VERSION_0_58 + dst.free(); + obj.free(); ++ #endif + } + + static LinkDest *get_dest(LinkAction *act) +@@ -426,8 +446,12 @@ int32_t open_document (void *_object, char *sfile, int32_t lfile) + + if ( GB.LoadFile(sfile,lfile,&buf,&len) ) return -1; + ++ #if POPPLER_VERSION_0_58 ++ stream=new MemStream(buf,0,(Guint)len,std::move(obj)); ++ #else + obj.initNull(); + stream=new MemStream(buf,0,(Guint)len,&obj); ++ #endif + test=new PDFDoc (stream,0,0); + + if (!test->isOk()) +-- +2.13.5 + diff --git a/development/gambas3/gambas-poppler-0.64.patch b/development/gambas3/gambas-poppler-0.64.patch new file mode 100644 index 0000000000..cb8f34fd55 --- /dev/null +++ b/development/gambas3/gambas-poppler-0.64.patch @@ -0,0 +1,115 @@ +diff --git a/gb.pdf/src/CPdfDocument.cpp b/gb.pdf/src/CPdfDocument.cpp +index 80d2d97c5..7e44ebe98 100644 +--- a/gb.pdf/src/CPdfDocument.cpp ++++ b/gb.pdf/src/CPdfDocument.cpp +@@ -99,7 +99,7 @@ END_PROPERTY + + ****************************************************************************/ + +-static void return_unicode_string(Unicode *unicode, int len) ++static void return_unicode_string(const Unicode *unicode, int len) + { + static UnicodeMap *uMap = NULL; + +@@ -128,7 +128,7 @@ static void aux_return_string_info(void *_object, const char *key) + { + Object obj; + Object dst; +- GooString *goo_value; ++ const GooString *goo_value; + Dict *info_dict; + char *tmpstr; + +@@ -170,7 +170,7 @@ static void aux_return_date_info(void *_object, const char *key) + GB_DATE ret; + Object obj; + Object dst; +- GooString *goo; ++ const GooString *goo; + Dict *info_dict; + char *datestr=NULL,*tofree=NULL; + int nnum; +@@ -221,7 +221,7 @@ static void aux_return_date_info(void *_object, const char *key) + #endif + } + +-static LinkDest *get_dest(LinkAction *act) ++static const LinkDest *get_dest(LinkAction *act) + { + if (!act) + return 0; +@@ -237,9 +237,9 @@ static LinkDest *get_dest(LinkAction *act) + static uint32_t aux_get_page_from_action(void *_object, LinkAction *act) + { + Ref pref; +- LinkDest *dest = get_dest(act); ++ const LinkDest *dest = get_dest(act); + #if POPPLER_VERSION_0_6 +- GooString *name; ++ const GooString *name; + #else + UGooString *name; + #endif +@@ -272,7 +272,7 @@ static uint32_t aux_get_page_from_action(void *_object, LinkAction *act) + + static void aux_get_dimensions_from_action(LinkAction *act, CPDFRECT *rect) + { +- LinkDest *dest = get_dest(act); ++ const LinkDest *dest = get_dest(act); + if (!dest) + return; + +@@ -284,7 +284,7 @@ static void aux_get_dimensions_from_action(LinkAction *act, CPDFRECT *rect) + + static double aux_get_zoom_from_action(LinkAction *act) + { +- LinkDest *dest = get_dest(act); ++ const LinkDest *dest = get_dest(act); + if (dest) + return dest->getZoom(); + else +@@ -295,7 +295,7 @@ static char* aux_get_target_from_action(LinkAction *act) + { + char *vl=NULL; + char *uni=NULL; +- GooString *tmp=NULL; ++ const GooString *tmp=NULL; + + switch (act->getKind()) + { +@@ -480,7 +480,7 @@ int32_t open_document (void *_object, char *sfile, int32_t lfile) + #endif + + outline=THIS->doc->getOutline(); +- if (outline) THIS->index=outline->getItems(); ++ if (outline) THIS->index=(GooList*)outline->getItems(); + + //if (THIS->index) + // if (!THIS->index->getLength()) THIS->index=NULL; +@@ -715,7 +715,7 @@ BEGIN_PROPERTY(PDFDOCUMENT_index) + + if (!THIS->index) { GB.ReturnNull(); return; } + +- THIS->action=((OutlineItem*)THIS->index->get(THIS->currindex))->getAction(); ++ THIS->action=(LinkAction*)((OutlineItem*)THIS->index->get(THIS->currindex))->getAction(); + RETURN_SELF(); + + END_PROPERTY +@@ -764,7 +764,7 @@ BEGIN_METHOD_VOID(PDFINDEX_root) + Outline *outline; + + outline=THIS->doc->getOutline(); +- if (outline) THIS->index=outline->getItems(); ++ if (outline) THIS->index=(GooList*)outline->getItems(); + THIS->currindex=0; + if (THIS->pindex) { GB.FreeArray(POINTER(&THIS->pindex)); THIS->pindex=NULL; } + if (THIS->oldindex) { GB.FreeArray(POINTER(&THIS->oldindex)); THIS->oldindex=NULL; } +@@ -812,7 +812,7 @@ BEGIN_METHOD_VOID(PDFINDEX_child) + if (!item->isOpen()) item->open(); + THIS->pindex[GB.Count(POINTER(THIS->pindex))-1]=(void*)THIS->index; + THIS->oldindex[GB.Count(POINTER(THIS->pindex))-1]=THIS->currindex; +- THIS->index=item->getKids(); ++ THIS->index=(GooList*)item->getKids(); + THIS->currindex=0; + + GB.ReturnBoolean(false); diff --git a/development/gambas3/gambas3.SlackBuild b/development/gambas3/gambas3.SlackBuild index 7bcb9d319c..5d024aad1f 100644 --- a/development/gambas3/gambas3.SlackBuild +++ b/development/gambas3/gambas3.SlackBuild @@ -23,8 +23,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=gambas3 -VERSION=${VERSION:-3.9.1} -BUILD=${BUILD:-2} +VERSION=${VERSION:-3.10.0} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} SHORT_PRGNAM=${PRGNAM%$(cut -d . -f 1 <<< $VERSION)} @@ -66,11 +66,12 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION chown -R root:root . -# Fix building against qt5 >= 5.7.0 -# https://sourceforge.net/p/gambas/mailman/message/35618038/ -patch -p3 < $CWD/qt5-ext-5.7.patch -patch -p3 < $CWD/qt5-5.7.patch -patch -p3 < $CWD/qt5-webkit-5.7.patch +# Build against fluidsynth breaks, so patch it out +patch -p1 < $CWD/sdl2_mixer.diff + +# Fix for the newer popplers +patch -p1 < $CWD/adapt-to-poppler-0.58.patch +patch -p1 < $CWD/gambas-poppler-0.64.patch ./reconf-all diff --git a/development/gambas3/gambas3.info b/development/gambas3/gambas3.info index 6ef0bb7ca8..4b52c594c1 100644 --- a/development/gambas3/gambas3.info +++ b/development/gambas3/gambas3.info @@ -1,8 +1,8 @@ PRGNAM="gambas3" -VERSION="3.9.1" +VERSION="3.10.0" HOMEPAGE="http://gambas.sourceforge.net" -DOWNLOAD="http://downloads.sourceforge.net/gambas/gambas3-3.9.1.tar.bz2" -MD5SUM="68949413f2ffc523e5b88ebaf3e3944a" +DOWNLOAD="http://ponce.cc/slackware/sources/repo/gambas3-3.10.0.tar.bz2" +MD5SUM="ae64adfc8fb05ae894d1e319a8365e59" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/gambas3/qt5-5.7.patch b/development/gambas3/qt5-5.7.patch deleted file mode 100644 index ffdb37485d..0000000000 --- a/development/gambas3/qt5-5.7.patch +++ /dev/null @@ -1,45 +0,0 @@ -[GB.QT5] -* BUG: The component now should compile correctly with C++11. -Authored by: gambas 2017-01-09 -Browse code at this revision -Parent: [r8048] -Child: [r8050] -changed /gambas/trunk/gb.qt4/src/CMenu.cpp -changed /gambas/trunk/gb.qt4/src/CWidget.cpp -changed /gambas/trunk/gb.qt5/src/Makefile.am -/gambas/trunk/gb.qt4/src/CMenu.cpp Diff Switch to side-by-side view ---- a/gambas/trunk/gb.qt4/src/CMenu.cpp -+++ b/gambas/trunk/gb.qt4/src/CMenu.cpp -@@ -59,7 +59,7 @@ - - #define HANDLE_PROXY(_ob) \ - while (EXT(_ob) && EXT(_ob)->proxy) \ -- _ob = (typeof _ob)(EXT(_ob)->proxy); -+ _ob = (__typeof__ _ob)(EXT(_ob)->proxy); - - static CMENU_EXT *alloc_ext(CMENU *_object) - { -/gambas/trunk/gb.qt4/src/CWidget.cpp Diff Switch to side-by-side view ---- a/gambas/trunk/gb.qt4/src/CWidget.cpp -+++ b/gambas/trunk/gb.qt4/src/CWidget.cpp -@@ -96,7 +96,7 @@ - - #define HANDLE_PROXY(_ob) \ - while (EXT(_ob) && EXT(_ob)->proxy) \ -- _ob = (typeof _ob)(EXT(_ob)->proxy); -+ _ob = (__typeof__ _ob)(EXT(_ob)->proxy); - - static CWIDGET_EXT *alloc_ext(CWIDGET *_object) - { -/gambas/trunk/gb.qt5/src/Makefile.am Diff Switch to side-by-side view ---- a/gambas/trunk/gb.qt5/src/Makefile.am -+++ b/gambas/trunk/gb.qt5/src/Makefile.am -@@ -8,7 +8,7 @@ - - gb_qt5_la_LIBADD = @THREAD_LIB@ @QT5_LIB@ - gb_qt5_la_LDFLAGS = -module @LD_FLAGS@ @QT5_LDFLAGS@ --gb_qt5_la_CXXFLAGS = @THREAD_INC@ -DGB_QT_COMPONENT $(AM_CXXFLAGS) -+gb_qt5_la_CXXFLAGS = @THREAD_INC@ -DGB_QT_COMPONENT $(AM_CXXFLAGS) -std=c++11 - gb_qt5_la_CPPFLAGS = @QT5_INC@ -I$(top_srcdir)/share/ - - gb_qt5_la_SOURCES = \ diff --git a/development/gambas3/qt5-ext-5.7.patch b/development/gambas3/qt5-ext-5.7.patch deleted file mode 100644 index 662a3edcd5..0000000000 --- a/development/gambas3/qt5-ext-5.7.patch +++ /dev/null @@ -1,41 +0,0 @@ -Commit [r8061] Maximize History - -[GB.QT5.EXT] -* BUG: The component now should compile correctly with C++11. -Authored by: gambas 3 days ago -Browse code at this revision -Parent: [r8060] -changed /gambas/trunk/gb.qt5/configure.ac -changed /gambas/trunk/gb.qt5/src/ext/Makefile.am -/gambas/trunk/gb.qt5/configure.ac Diff Switch to side-by-side view ---- a/gambas/trunk/gb.qt5/configure.ac -+++ b/gambas/trunk/gb.qt5/configure.ac -@@ -14,11 +14,6 @@ - qt5, QT5, gb.qt5, [src], - 'Qt5Core >= 5.3.0' Qt5Gui Qt5Widgets Qt5Svg Qt5PrintSupport Qt5X11Extras x11 - ) -- --## GB_COMPONENT_PKG_CONFIG( --## qt5ext, QT5EXT, gb.qt5.ext, [ext], --## 'Qt5Core >= 5.4.0' Qt5Gui Qt5Widgets --## ) - - GB_COMPONENT_PKG_CONFIG( - qt5webkit, QT5WEBKIT, gb.qt5.webkit, [webkit], -@@ -55,6 +50,4 @@ - src/ext/Makefile \ - ) - --## src/ext/Makefile \ -- - GB_PRINT_MESSAGES ---- a/gambas/trunk/gb.qt5/src/ext/Makefile.am -+++ b/gambas/trunk/gb.qt5/src/ext/Makefile.am -@@ -6,6 +6,7 @@ - - gb_qt5_ext_la_LIBADD = @QT5EXT_LIB@ - gb_qt5_ext_la_LDFLAGS = -module @LD_FLAGS@ @QT5EXT_LDFLAGS@ -+gb_qt5_ext_la_CXXFLAGS = @THREAD_INC@ $(AM_CXXFLAGS) -std=c++11 - gb_qt5_ext_la_CPPFLAGS = @QT5EXT_INC@ -I$(top_srcdir)/share -I$(top_srcdir)/src/share - - gb_qt5_ext_la_SOURCES = \ diff --git a/development/gambas3/qt5-webkit-5.7.patch b/development/gambas3/qt5-webkit-5.7.patch deleted file mode 100644 index 01a74260e9..0000000000 --- a/development/gambas3/qt5-webkit-5.7.patch +++ /dev/null @@ -1,30 +0,0 @@ -[GB.QT5.WEBKIT] -* BUG: The component now should compile correctly with C++11. -Authored by: gambas 2017-01-09 -Browse code at this revision -Parent: [r8049] -Child: [r8051] -changed /gambas/trunk/gb.qt5/src/opengl/Makefile.am -changed /gambas/trunk/gb.qt5/src/webkit/Makefile.am -/gambas/trunk/gb.qt5/src/opengl/Makefile.am Diff Switch to side-by-side view ---- a/gambas/trunk/gb.qt5/src/opengl/Makefile.am -+++ b/gambas/trunk/gb.qt5/src/opengl/Makefile.am -@@ -6,6 +6,7 @@ - - gb_qt5_opengl_la_LIBADD = @QT5OPENGL_LIB@ @QT5OPENGL_LIB@ - gb_qt5_opengl_la_LDFLAGS = -module @LD_FLAGS@ @QT5OPENGL_LDFLAGS@ -+gb_qt5_opengl_la_CXXFLAGS = @THREAD_INC@ $(AM_CXXFLAGS) -std=c++11 - gb_qt5_opengl_la_CPPFLAGS = @QT5OPENGL_INC@ - - gb_qt5_opengl_la_SOURCES = main.h main.cpp -/gambas/trunk/gb.qt5/src/webkit/Makefile.am Diff Switch to side-by-side view ---- a/gambas/trunk/gb.qt5/src/webkit/Makefile.am -+++ b/gambas/trunk/gb.qt5/src/webkit/Makefile.am -@@ -6,6 +6,7 @@ - - gb_qt5_webkit_la_LIBADD = @QT5WEBKIT_LIB@ - gb_qt5_webkit_la_LDFLAGS = -module @LD_FLAGS@ @QT5WEBKIT_LDFLAGS@ -+gb_qt5_webkit_la_CXXFLAGS = @THREAD_INC@ $(AM_CXXFLAGS) -std=c++11 - gb_qt5_webkit_la_CPPFLAGS = @QT5WEBKIT_INC@ -I$(top_srcdir)/share -I$(top_srcdir)/src/share - - gb_qt5_webkit_la_SOURCES = \ diff --git a/development/gambas3/sdl2_mixer.diff b/development/gambas3/sdl2_mixer.diff new file mode 100644 index 0000000000..1e71a0ffa2 --- /dev/null +++ b/development/gambas3/sdl2_mixer.diff @@ -0,0 +1,11 @@ +--- a/gb.sdl2/src/audio/main.c 2017-07-18 17:48:44.000000000 +0200 ++++ b/gb.sdl2/src/audio/main.c.new 2017-11-09 21:33:11.442013948 +0100 +@@ -58,7 +58,7 @@ + init_mixer(MIX_INIT_OGG, "OGG"); + init_mixer(MIX_INIT_MOD, "MOD"); + init_mixer(MIX_INIT_FLAC, "FLAC"); +- init_mixer(MIX_INIT_FLUIDSYNTH, "FLUIDSYNTH"); ++ init_mixer(MIX_INIT_MID, "MID"); + + if (Mix_OpenAudio(AUDIO_frequency, MIX_DEFAULT_FORMAT, 2, AUDIO_buffer_size)) + { |