diff options
author | Petar Petrov <ppetrov@paju.oulu.fi> | 2011-10-21 14:08:25 -0200 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-10-21 15:59:21 -0200 |
commit | 9034e05f4e08af3be1f451e8974d79e24a57cb40 (patch) | |
tree | e3d3d0f3ff23003b391510ad1e4f29d5ae7c0e99 /office/gbgoffice | |
parent | af348d087fe2bbc34592caf807982b6d4f8948a2 (diff) | |
download | slackbuilds-9034e05f4e08af3be1f451e8974d79e24a57cb40.tar.gz |
office/gbgoffice: Added (Bgoffice dictionary frontend)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'office/gbgoffice')
-rw-r--r-- | office/gbgoffice/06_const-chars.patch | 289 | ||||
-rw-r--r-- | office/gbgoffice/07_gcc4.3.patch | 14 | ||||
-rw-r--r-- | office/gbgoffice/08_fix_const_conversion.patch | 17 | ||||
-rw-r--r-- | office/gbgoffice/09_deprecated_SigC.patch | 41 | ||||
-rw-r--r-- | office/gbgoffice/10_workhelper-buttonbox.patch | 16 | ||||
-rw-r--r-- | office/gbgoffice/README | 14 | ||||
-rw-r--r-- | office/gbgoffice/doinst.sh | 3 | ||||
-rw-r--r-- | office/gbgoffice/gbgoffice.SlackBuild | 103 | ||||
-rw-r--r-- | office/gbgoffice/gbgoffice.desktop | 11 | ||||
-rw-r--r-- | office/gbgoffice/gbgoffice.info | 10 | ||||
-rw-r--r-- | office/gbgoffice/slack-desc | 19 |
11 files changed, 537 insertions, 0 deletions
diff --git a/office/gbgoffice/06_const-chars.patch b/office/gbgoffice/06_const-chars.patch new file mode 100644 index 0000000000..419a9ff4ae --- /dev/null +++ b/office/gbgoffice/06_const-chars.patch @@ -0,0 +1,289 @@ +# Author: Damyan Ivanov <dmn@debian.org> +# Description: declare inline strings as constants +# Modern GCC (rightfully) complain otherwise +--- a/src/language_tools.h ++++ b/src/language_tools.h +@@ -27,19 +27,19 @@ + #define LT_(x) true == lang ? Glib::convert(x[1], "UTF-8", "CP1251"): x[0] + + +-static char *HELP_MESSAGE[] = { ++static const char *HELP_MESSAGE[] = { + "Type a word (bulgarian or english) in entry box above", + "Напишете дума (на български или английски) в полето по-горе" + }; + + +-static char *WELLCOME_MESSAGE[] = { ++static const char *WELLCOME_MESSAGE[] = { + "Wellcome to GTK BG Office!", + "Добре дошли в GTK БГ Офис. Приятно използване!" + }; + + +-static char *ABOUT_MESSAGE[] = { ++static const char *ABOUT_MESSAGE[] = { + "GTK BG Office assistant - version 1.4 \n" + "Official webpage - http://gbgoffice.info\n\n" + "(C) 2004-2006 Miroslav Yordanov <mironcho@linux-bg.org>\n" +@@ -52,7 +52,7 @@ static char *ABOUT_MESSAGE[] = { + }; + + +-static char *CONFIG_ERROR[] = { ++static const char *CONFIG_ERROR[] = { + "The configuration could not be initialized\n" + "This is fatal error and gbgoffice now will exit!", + +@@ -61,7 +61,7 @@ static char *CONFIG_ERROR[] = { + }; + + +-static char *ERROR_INIT_TRAYICON[] = { ++static const char *ERROR_INIT_TRAYICON[] = { + "Error initializing trayicon module.\n" + "This is fatal error and gbgoffice now will exit!", + +@@ -70,7 +70,7 @@ static char *ERROR_INIT_TRAYICON[] = { + }; + + +-static char *DATA_MISSING[] = { ++static const char *DATA_MISSING[] = { + "Dicionary files are missing.\n" + "Please check that you have installed them\n" + "and if they are missing, visit\n" +@@ -86,7 +86,7 @@ static char *DATA_MISSING[] = { + }; + + +-static char *DATA_MISSING_FEDORA[] = { ++static const char *DATA_MISSING_FEDORA[] = { + "Dicionary files are missing.\n" + "Please check that you have installed them\n" + "and if they are missing, please use the supplied \n" +@@ -105,190 +105,190 @@ static char *DATA_MISSING_FEDORA[] = { + + + +-static char *GUI_CURRENT_DICT[] = { ++static const char *GUI_CURRENT_DICT[] = { + "Current dictionary - ", + "Текущ речник - " + }; + + +-static char *GUI_NEXT_WORDS[] = { ++static const char *GUI_NEXT_WORDS[] = { + "next words", + "следващи думи" + }; + + +-static char *GUI_MENU_FILE[] = { ++static const char *GUI_MENU_FILE[] = { + "_File", + "_Файл" + }; + + +-static char *GUI_MENU_EDIT[] = { ++static const char *GUI_MENU_EDIT[] = { + "_Edit", + "Р_едактиране" + }; + + +-static char *GUI_MENU_DICTS[] = { ++static const char *GUI_MENU_DICTS[] = { + "_Dictionaries", + "_Речници" + }; + + +-static char *GUI_MENU_SETTINGS[] = { ++static const char *GUI_MENU_SETTINGS[] = { + "_Settings", + "_Настройки" + }; + + +-static char *GUI_MENU_HELP[] = { ++static const char *GUI_MENU_HELP[] = { + "_Help", + "_Помощ" + }; + + +-static char *GUI_VIEW_HISTORY[] = { ++static const char *GUI_VIEW_HISTORY[] = { + "View history", + "Показва историята" + }; + + +-static char *GUI_PREFS_NUM_WORDS[] = { ++static const char *GUI_PREFS_NUM_WORDS[] = { + " Number of words in list", + " Брой думи в списъка" + }; + + +-static char *GUI_PREFS_USE_CLIPBOARD[] = { ++static const char *GUI_PREFS_USE_CLIPBOARD[] = { + " Watch clipboard for new words", + " Наблюдавай клипборда за нови думи" + }; + + +-static char *GUI_PREFS_TAB_GENERAL[] = { ++static const char *GUI_PREFS_TAB_GENERAL[] = { + "General", + "Основни" + }; + + +-static char *GUI_PREFS_TAB_TRAY[] = { ++static const char *GUI_PREFS_TAB_TRAY[] = { + "Trayicon", + "Trayicon" + }; + + +-static char *GUI_PREFS_TAB_TRAY_HELP[] = { ++static const char *GUI_PREFS_TAB_TRAY_HELP[] = { + "<b>You must restart gbgoffice \nbefore these settings take effect</b>", + "<b>Трябва да рестартирате gbgoffice \nза да влязат в сила тези настройки</b>" + }; + + +-static char *GUI_PREFS_USE_TRAYICON[] = { ++static const char *GUI_PREFS_USE_TRAYICON[] = { + " Use trayicon", + " Използва trayicon" + }; + + +-static char *GUI_PREFS_USE_TRAYICON_CLOSE[] = { ++static const char *GUI_PREFS_USE_TRAYICON_CLOSE[] = { + " Closing main window,\n quits application", + " Затварянето на основния прозорец,\n спира програмата" + }; + +-static char *GUI_PREFS_TRAYICON_HIDE_ON_START[] = { ++static const char *GUI_PREFS_TRAYICON_HIDE_ON_START[] = { + " Hide main window on startup", + " Скрива основния прозорец при стартиране" + }; + + +-static char *GUI_PREFS_USE_WH[] = { ++static const char *GUI_PREFS_USE_WH[] = { + " Use helper", + " Използва помощника" + }; + + +-static char *GUI_PREFS_WH_SECONDS[] = { ++static const char *GUI_PREFS_WH_SECONDS[] = { + " time for showing helper\n (in seconds)", + " време за показване на помощника\n (в секунди)" + }; + + +-static char *GUI_EXAM_MENU[] = { ++static const char *GUI_EXAM_MENU[] = { + "Make a test", + "Проверка на знанията" + }; + + +-static char *GUI_EXAM_CORRECT[] = { ++static const char *GUI_EXAM_CORRECT[] = { + "correct", + "правилно" + }; + +-static char *GUI_EXAM_INCORRECT[] = { ++static const char *GUI_EXAM_INCORRECT[] = { + "incorrect", + "грешно" + }; + +-static char *GUI_EXAM_NEWTEST[] = { ++static const char *GUI_EXAM_NEWTEST[] = { + "Press button \"New\" for new test.", + "Натиснете бутона \"Нов\" за нов тест." + }; + +-static char *GUI_EXAM_NEW_LEVEL1[] = { ++static const char *GUI_EXAM_NEW_LEVEL1[] = { + "Novice", + "Начално" + }; + +-static char *GUI_EXAM_NEW_LEVEL2[] = { ++static const char *GUI_EXAM_NEW_LEVEL2[] = { + "Beginner", + "Лесно" + }; + +-static char *GUI_EXAM_NEW_LEVEL3[] = { ++static const char *GUI_EXAM_NEW_LEVEL3[] = { + "Intermediate", + "Средно" + }; + +-static char *GUI_EXAM_NEW_LEVEL4[] = { ++static const char *GUI_EXAM_NEW_LEVEL4[] = { + "Specialist", + "Трудно" + }; + +-static char *GUI_EXAM_NEW_LEVEL5[] = { ++static const char *GUI_EXAM_NEW_LEVEL5[] = { + "Expert", + "Експертно" + }; + +-static char *GUI_EXAM_TRANSLATION[] = { ++static const char *GUI_EXAM_TRANSLATION[] = { + "Translation: ", + "Превод: " + }; + +-static char *GUI_EXAM_DIFFICULTY[] = { ++static const char *GUI_EXAM_DIFFICULTY[] = { + "Difficulty: ", + "Ниво: " + }; + +-static char *GUI_EXAM_NUMTEST[] = { ++static const char *GUI_EXAM_NUMTEST[] = { + "Test (0 = random): ", + "Тест (0 = произволен): " + }; + +-static char *GUI_EXAM_NUMQUEST[] = { ++static const char *GUI_EXAM_NUMQUEST[] = { + "Num of questions: ", + "Брой въпроси: " + }; + +-static char *GUI_EXAM_ENDOFTEST[] = { ++static const char *GUI_EXAM_ENDOFTEST[] = { + "End of test.", + "Край на теста." + }; + +-static char *GUI_EXAM_TESTNOTSTARTED[] = { ++static const char *GUI_EXAM_TESTNOTSTARTED[] = { + "Test not started.", + "Не е започнат тест." + }; + +-static char *GUI_EXAM_CORRECT_ANSWERS[] = { ++static const char *GUI_EXAM_CORRECT_ANSWERS[] = { + "correct", + "правилни" + }; diff --git a/office/gbgoffice/07_gcc4.3.patch b/office/gbgoffice/07_gcc4.3.patch new file mode 100644 index 0000000000..8b620cd623 --- /dev/null +++ b/office/gbgoffice/07_gcc4.3.patch @@ -0,0 +1,14 @@ +# Author: Damyan Ivanov <dmn@debian.org> +# Description: include the right header file +# GCC 4.3 has stricter rules about inclusion propagation +--- a/src/translator_manager.cpp ++++ b/src/translator_manager.cpp +@@ -22,7 +22,7 @@ + + #include <sys/types.h> + #include <dirent.h> +-#include <string> ++#include <cstring> + #include <iostream> + #include <algorithm> + diff --git a/office/gbgoffice/08_fix_const_conversion.patch b/office/gbgoffice/08_fix_const_conversion.patch new file mode 100644 index 0000000000..0aa6c54fcf --- /dev/null +++ b/office/gbgoffice/08_fix_const_conversion.patch @@ -0,0 +1,17 @@ +# Description: Since a constant is passed into strchr(), pu must also be const +# to keep the compiler from generating an error. +# Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gbgoffice/+bug/445624 +# Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550115 +# +--- a/src/translator.cpp ++++ b/src/translator.cpp +@@ -315,7 +315,8 @@ bool Translator::findWord(const char *wo + + char *Translator::transformResult(const char *result) { + int j, i, m, n, u; +- char *b, *pu; ++ const char *pu; ++ char *b; + char c; + strcpy(dataBuffer2, result); + if ((advancedSearchState) && (advancedSearchHighlight)) { diff --git a/office/gbgoffice/09_deprecated_SigC.patch b/office/gbgoffice/09_deprecated_SigC.patch new file mode 100644 index 0000000000..3b6151c902 --- /dev/null +++ b/office/gbgoffice/09_deprecated_SigC.patch @@ -0,0 +1,41 @@ +# Description: fix compilation with gcc-4.5 (and corresponding libstdc++) +# Some deprecated typedefs are finaly removed +# Constructors need not be explicitly named +# Author: George Danchev <danchev@debian.org> +# Forwarded: no +# Debian-Bug: #564991 +--- a/src/dictgui.cpp ++++ b/src/dictgui.cpp +@@ -63,7 +63,7 @@ DictGui::DictGui(int argc, char **argv, + splash->show_now(); // show splash window NOW + splash->flush_queue(); // needed only once + +- history = new History::History(CONF_WORDS_IN_HISTORY, CONF_MAX_WORD_LEN); ++ history = new History(CONF_WORDS_IN_HISTORY, CONF_MAX_WORD_LEN); + + splash->set_step(0.2); + #endif +--- a/src/dictgui.h ++++ b/src/dictgui.h +@@ -147,8 +147,8 @@ protected: + + Glib::RefPtr<Gtk::TextBuffer> tbuf; + +- SigC::Connection con_entry; +- SigC::Connection con_timer; ++ sigc::connection con_entry; ++ sigc::connection con_timer; + + Glib::RefPtr<Gtk::Clipboard> clp; + +--- a/src/workhelper.h ++++ b/src/workhelper.h +@@ -59,7 +59,7 @@ private: + Gtk::TextView textarea; + Gtk::ScrolledWindow scwin; + Gtk::VScrollbar *vs; +- SigC::Connection con_wait; ++ sigc::connection con_wait; + + unsigned int hide_timeout; + unsigned int sizex, sizey; diff --git a/office/gbgoffice/10_workhelper-buttonbox.patch b/office/gbgoffice/10_workhelper-buttonbox.patch new file mode 100644 index 0000000000..d8d77a8dee --- /dev/null +++ b/office/gbgoffice/10_workhelper-buttonbox.patch @@ -0,0 +1,16 @@ +# Description: fix hba declaration to match get_action_area return type +# Gtk::Dialog 2.18 now defines this as a generic ButtonBox +# Forwarded: no +# Bug-Debian: 577371 +# Author: Damyan Ivanov <dmn@debian.org> +--- a/src/workhelper.cpp ++++ b/src/workhelper.cpp +@@ -39,7 +39,7 @@ WorkHelper::WorkHelper() + //set_resize_mode(Gtk::RESIZE_PARENT); + set_reallocate_redraws(true); + +- Gtk::HButtonBox *hba = get_action_area(); ++ Gtk::ButtonBox *hba = get_action_area(); + + add_events(Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK); + diff --git a/office/gbgoffice/README b/office/gbgoffice/README new file mode 100644 index 0000000000..9a00391c27 --- /dev/null +++ b/office/gbgoffice/README @@ -0,0 +1,14 @@ +GBGoffice provides an easy to use GTK interface for the dictionaries +from the Bulgarian Office project. It supports all five of them: + +- English <=> Bulgarian +- Polytechnical +- Computer Terms +- Thesaurus +- Dialect + +If you are using KDE, you might want to try kbgoffice (QT4 interface), +instead. + +This requires libsigc++ and gtkmm. As a runtime dependency, full-pack +is needed (dictionaries data).
\ No newline at end of file diff --git a/office/gbgoffice/doinst.sh b/office/gbgoffice/doinst.sh new file mode 100644 index 0000000000..01ca62b341 --- /dev/null +++ b/office/gbgoffice/doinst.sh @@ -0,0 +1,3 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi
\ No newline at end of file diff --git a/office/gbgoffice/gbgoffice.SlackBuild b/office/gbgoffice/gbgoffice.SlackBuild new file mode 100644 index 0000000000..c4726e69e8 --- /dev/null +++ b/office/gbgoffice/gbgoffice.SlackBuild @@ -0,0 +1,103 @@ +#!/bin/sh + +# Slackware build script for gbgoffice +# Written by Petar Petrov, <ppetrov@paju.oulu.fi> and +# hereby submitted to the public domain + +# Based on the gbgoffice PKGBUILD from Archlinux AUR +# (http://aur.archlinux.org/packages.php?ID=45316). +# PKGBUILD submitter and maintainer is phible. Patches +# are from Debian. Thank you! + +# THIS SLACKBUILD IS DISTRIBUTETD IN THE HOPE OF BEING +# USEFUL BUT WITHOUT ANY WARRANTY. THE AUTHOR IS _NOT_ +# RESPONSIBLE FOR ANY DAMAGE OR DATA LOSS CAUSED BY IT. + +PRGNAM=gbgoffice +VERSION=${VERSION:-1.4} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + *) export ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Apply the Debian patches. Thank you Debian! +patch -p1 -i $CWD/06_const-chars.patch +patch -p1 -i $CWD/07_gcc4.3.patch +patch -p1 -i $CWD/08_fix_const_conversion.patch +patch -p1 -i $CWD/09_deprecated_SigC.patch +patch -p1 -i $CWD/10_workhelper-buttonbox.patch + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + ChangeLog COPYING COPYING.BULGARIAN README TODO THANKS \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/usr/share/applications +cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/office/gbgoffice/gbgoffice.desktop b/office/gbgoffice/gbgoffice.desktop new file mode 100644 index 0000000000..f27d1e04d1 --- /dev/null +++ b/office/gbgoffice/gbgoffice.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=GBGOffice +Name[bg]=ГБГОфис +GenericName=BG Office Assistant +GenericName[bg]=БГ Офис помощник +Exec=gbgoffice +Icon=/usr/share/bgoffice/gbgoffice-icon.png +Categories=Office; +Terminal=false
\ No newline at end of file diff --git a/office/gbgoffice/gbgoffice.info b/office/gbgoffice/gbgoffice.info new file mode 100644 index 0000000000..7ec8989109 --- /dev/null +++ b/office/gbgoffice/gbgoffice.info @@ -0,0 +1,10 @@ +PRGNAM="gbgoffice" +VERSION="1.4" +HOMEPAGE="http://gbgoffice.info/" +DOWNLOAD="http://openfmi.net/frs/download.php/341/gbgoffice-1.4.tar.gz" +MD5SUM="d747bc284f90317fcf4256891a9df381" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Petar Petrov" +EMAIL="ppetrov@paju.oulu.fi" +APPROVED="Niels Horn" diff --git a/office/gbgoffice/slack-desc b/office/gbgoffice/slack-desc new file mode 100644 index 0000000000..862bd70bbb --- /dev/null +++ b/office/gbgoffice/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +gbgoffice: gbgoffice (Bgoffice dictionary frontend) +gbgoffice: +gbgoffice: gbgoffice provides an easy to use GTK interface for the dictionaries +gbgoffice: from the Bulgarian Office project. +gbgoffice: +gbgoffice: +gbgoffice: +gbgoffice: +gbgoffice: +gbgoffice: +gbgoffice: Home: http://gbgoffice.info/
\ No newline at end of file |