1 |
commit: cacaab1e23f5bfd4b429298564074828c614cb0d |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 5 10:13:50 2017 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 5 10:21:38 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cacaab1e |
7 |
|
8 |
app-text/bibus: Use wxpython-3.0 with Debian patch (#601094) |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
11 |
|
12 |
app-text/bibus/bibus-1.5.2-r3.ebuild | 86 +++++++++++++++ |
13 |
app-text/bibus/files/bibus-1.5.2-wx30.patch | 158 ++++++++++++++++++++++++++++ |
14 |
2 files changed, 244 insertions(+) |
15 |
|
16 |
diff --git a/app-text/bibus/bibus-1.5.2-r3.ebuild b/app-text/bibus/bibus-1.5.2-r3.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..712ed76b631 |
19 |
--- /dev/null |
20 |
+++ b/app-text/bibus/bibus-1.5.2-r3.ebuild |
21 |
@@ -0,0 +1,86 @@ |
22 |
+# Copyright 1999-2017 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=6 |
26 |
+PYTHON_COMPAT=( python2_7 ) |
27 |
+PYTHON_REQ_USE="sqlite" |
28 |
+ |
29 |
+inherit fdo-mime python-r1 versionator |
30 |
+ |
31 |
+DESCRIPTION="Bibliographic and reference management software, integrates with LO and MS Word" |
32 |
+HOMEPAGE="http://bibus-biblio.sourceforge.net/" |
33 |
+SRC_URI=" |
34 |
+ mirror://sourceforge/${PN}-biblio/${PN}_${PV}.orig.tar.gz |
35 |
+ https://dev.gentoo.org/~jlec/distfiles/${P}-lo-4.patch.xz |
36 |
+ " |
37 |
+ |
38 |
+LICENSE="GPL-2" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~x86" |
41 |
+ |
42 |
+IUSE="mysql" |
43 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
44 |
+ |
45 |
+# Most of this mess is designed to give the choice of sqlite or mysql |
46 |
+# but prefer sqlite. We also need to default to sqlite if neither is requested. |
47 |
+# Cannot depend on virtual/ooo |
48 |
+# bibus fails to start with app-office/openoffice-bin (bug #288232). |
49 |
+RDEPEND=" |
50 |
+ ${PYTHON_DEPS} |
51 |
+ app-office/libreoffice |
52 |
+ dev-python/wxpython:3.0[${PYTHON_USEDEP}] |
53 |
+ dev-db/sqliteodbc |
54 |
+ dev-db/unixODBC |
55 |
+ mysql? ( |
56 |
+ dev-python/mysql-python[${PYTHON_USEDEP}] |
57 |
+ dev-db/myodbc |
58 |
+ ) |
59 |
+" |
60 |
+DEPEND="${RDEPEND}" |
61 |
+ |
62 |
+PATCHES=( |
63 |
+ "${FILESDIR}"/${P}-install.patch |
64 |
+ "${FILESDIR}"/${P}-bibus.cfg.patch |
65 |
+ "${WORKDIR}"/${P}-lo-4.patch |
66 |
+ "${FILESDIR}"/${P}-wx30.patch |
67 |
+) |
68 |
+ |
69 |
+pkg_setup() { |
70 |
+ if [[ -d "/usr/$(get_libdir)/openoffice" ]] ; then |
71 |
+ OFFICESUITE="/usr/$(get_libdir)/openoffice" |
72 |
+ else |
73 |
+ OFFICESUITE="/usr/$(get_libdir)/libreoffice" |
74 |
+ fi |
75 |
+} |
76 |
+ |
77 |
+src_compile() { :; } |
78 |
+ |
79 |
+src_install() { |
80 |
+ einfo "Installing for ${OFFICESUITE}" |
81 |
+ installation() { |
82 |
+ emake \ |
83 |
+ DESTDIR="${D}" \ |
84 |
+ prefix="${EPREFIX}/usr" \ |
85 |
+ oopath="${OFFICESUITE}/program" \ |
86 |
+ ooure="${OFFICESUITE}/ure-link/lib" \ |
87 |
+ oobasis="${OFFICESUITE}/program" \ |
88 |
+ sysconfdir="${EPREFIX}/etc" \ |
89 |
+ pythondir="$(python_get_sitedir)" \ |
90 |
+ python=${PYTHON} \ |
91 |
+ install install-doc-en |
92 |
+ } |
93 |
+ python_foreach_impl installation |
94 |
+ python_foreach_impl python_optimize |
95 |
+ |
96 |
+ python_foreach_impl python_newscript bibusStart.py ${PN} |
97 |
+} |
98 |
+ |
99 |
+pkg_postinst() { |
100 |
+ fdo-mime_desktop_database_update |
101 |
+ fdo-mime_mime_database_update |
102 |
+} |
103 |
+ |
104 |
+pkg_postrm() { |
105 |
+ fdo-mime_desktop_database_update |
106 |
+ fdo-mime_mime_database_update |
107 |
+} |
108 |
|
109 |
diff --git a/app-text/bibus/files/bibus-1.5.2-wx30.patch b/app-text/bibus/files/bibus-1.5.2-wx30.patch |
110 |
new file mode 100644 |
111 |
index 00000000000..b5348674181 |
112 |
--- /dev/null |
113 |
+++ b/app-text/bibus/files/bibus-1.5.2-wx30.patch |
114 |
@@ -0,0 +1,158 @@ |
115 |
+Author: Jan Beyer <jan@××××××××.de> |
116 |
+Copyright: Copyright 2014 Jan Beyer |
117 |
+License: The same as the Bibus packaging. |
118 |
+Description: Patch to migrate bibus from wxpython2.8 to wxpython 3.0 |
119 |
+ Thanks to Olly Betts for the script that did the main work: |
120 |
+ http://anonscm.debian.org/cgit/collab-maint/wx-migration-tools.git |
121 |
+ |
122 |
+--- a/ShortcutEd.py |
123 |
++++ b/ShortcutEd.py |
124 |
+@@ -27,7 +27,7 @@ |
125 |
+ self.category = category # edited category |
126 |
+ self.short = short # current shortcuts list |
127 |
+ # begin wxGlade: Capture.__init__ |
128 |
+- kwds["style"] = wx.DIALOG_MODAL|wx.CAPTION|wx.RESIZE_BORDER|wx.THICK_FRAME |
129 |
++ kwds["style"] = wx.CAPTION|wx.RESIZE_BORDER|wx.RESIZE_BORDER |
130 |
+ wx.Dialog.__init__(self, *args, **kwds) |
131 |
+ self.label_1 = wx.StaticText(self, -1, _("Capture from field")) |
132 |
+ self.choice_field = wx.Choice(self, -1, choices=[]) |
133 |
+@@ -110,7 +110,7 @@ |
134 |
+ self.parentshort = short # we keep a copy for updating it latter |
135 |
+ self.db = db # connection to the database |
136 |
+ # begin wxGlade: ShortcutEd.__init__ |
137 |
+- kwds["style"] = wx.DIALOG_MODAL|wx.CAPTION|wx.RESIZE_BORDER|wx.THICK_FRAME |
138 |
++ kwds["style"] = wx.CAPTION|wx.RESIZE_BORDER|wx.RESIZE_BORDER |
139 |
+ wx.Dialog.__init__(self, *args, **kwds) |
140 |
+ self.list_shortcuts = wx.ListCtrl(self, -1, style=wx.LC_REPORT|wx.LC_EDIT_LABELS|wx.LC_NO_HEADER|wx.LC_SINGLE_SEL|wx.SUNKEN_BORDER) |
141 |
+ self.button_new = wx.Button(self, -1, _("New")) |
142 |
+--- a/bibus.py |
143 |
++++ b/bibus.py |
144 |
+@@ -120,7 +120,7 @@ |
145 |
+ # |
146 |
+ class Bibus(wx.App): |
147 |
+ def OnInit(self): |
148 |
+- wx.InitAllImageHandlers() |
149 |
++ # no-op in wxPython2.8 and later: wx.InitAllImageHandlers() |
150 |
+ self.SetAppName(APPNAME) |
151 |
+ # reading and eventually converting the config file |
152 |
+ if os.path.isfile( wx.StandardPaths.Get().GetUserDataDir() ): # old config file in $HOME/.bibus |
153 |
+--- a/Pref_Shortcuts.py |
154 |
++++ b/Pref_Shortcuts.py |
155 |
+@@ -26,7 +26,7 @@ |
156 |
+ def __init__(self, categories, *args, **kwds): |
157 |
+ self.categories = categories # current categories in parent. may be different from BIB.SHORTCUTS |
158 |
+ # begin wxGlade: NewCategory.__init__ |
159 |
+- kwds["style"] = wx.DIALOG_MODAL|wx.CAPTION|wx.RESIZE_BORDER|wx.THICK_FRAME |
160 |
++ kwds["style"] = wx.CAPTION|wx.RESIZE_BORDER|wx.RESIZE_BORDER |
161 |
+ wx.Dialog.__init__(self, *args, **kwds) |
162 |
+ self.label_1 = wx.StaticText(self, -1, _("Name")) |
163 |
+ self.text_ctrl_name = wx.TextCtrl(self, -1, "") |
164 |
+@@ -80,7 +80,7 @@ |
165 |
+ def onFile(self,evt): |
166 |
+ tmpfilen = self.text_ctrl_name.GetValue() |
167 |
+ if not tmpfilen: tmpfilen = 'shortcut' |
168 |
+- filen = wx.FileSelector(_("Choose the file location and name"),default_filename=tmpfilen,parent=self, flags = wx.SAVE ) |
169 |
++ filen = wx.FileSelector(_("Choose the file location and name"),default_filename=tmpfilen,parent=self, flags = wx.FD_SAVE ) |
170 |
+ if filen: |
171 |
+ self.text_ctrl_filen.SetValue(filen) |
172 |
+ |
173 |
+--- a/moveFile.py |
174 |
++++ b/moveFile.py |
175 |
+@@ -96,7 +96,7 @@ |
176 |
+ |
177 |
+ if __name__ == "__main__": |
178 |
+ app = wx.PySimpleApp(0) |
179 |
+- wx.InitAllImageHandlers() |
180 |
++ # no-op in wxPython2.8 and later: wx.InitAllImageHandlers() |
181 |
+ dialog_1 = MoveFile(None, -1, "") |
182 |
+ app.SetTopWindow(dialog_1) |
183 |
+ dialog_1.Show() |
184 |
+--- a/OOo.py |
185 |
++++ b/OOo.py |
186 |
+@@ -103,7 +103,7 @@ |
187 |
+ self.saveDoc() |
188 |
+ self.finalize() |
189 |
+ except bibOOo_IOError: |
190 |
+- url = wx.FileSelector('Save as...',default_extension='odt',wildcard="%s (*.odt)|*.odt|%s (*.sxw)|*.sxw|%s (*.*)|*.*"%(_("OpenDocument Text"),_("OpenOffice.org Text Document"), _("All files")),flags=wx.SAVE|wx.OVERWRITE_PROMPT) |
191 |
++ url = wx.FileSelector('Save as...',default_extension='odt',wildcard="%s (*.odt)|*.odt|%s (*.sxw)|*.sxw|%s (*.*)|*.*"%(_("OpenDocument Text"),_("OpenOffice.org Text Document"), _("All files")),flags=wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT) |
192 |
+ if url == '': |
193 |
+ return |
194 |
+ else: |
195 |
+--- a/BibFrame.py |
196 |
++++ b/BibFrame.py |
197 |
+@@ -971,7 +971,7 @@ |
198 |
+ |
199 |
+ def __getFile(self,question=_("Please choose the file encoding"),mode='r',enc='ascii'): |
200 |
+ """Get file and encoding. Return open file or None""" |
201 |
+- dlg = wx.FileDialog(self,_("Choose a File to import"),style = wx.OPEN | wx.CHANGE_DIR) |
202 |
++ dlg = wx.FileDialog(self,_("Choose a File to import"),style = wx.FD_OPEN | wx.FD_CHANGE_DIR) |
203 |
+ try: |
204 |
+ answer = dlg.ShowModal() |
205 |
+ filename = dlg.GetPath() |
206 |
+@@ -1048,7 +1048,7 @@ |
207 |
+ # --------------------------------- File Export -------------------------------------------- |
208 |
+ def __saveFile(self,question=_("Please choose the file encoding"),mode='r',enc='latin_1'): |
209 |
+ """Get file and encoding. Return open file or None""" |
210 |
+- dlg = wx.FileDialog(self,_("Save as..."),style = wx.SAVE | wx.OVERWRITE_PROMPT | wx.CHANGE_DIR) |
211 |
++ dlg = wx.FileDialog(self,_("Save as..."),style = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT | wx.FD_CHANGE_DIR) |
212 |
+ try: |
213 |
+ answer = dlg.ShowModal() |
214 |
+ filename = dlg.GetPath() |
215 |
+@@ -1124,7 +1124,7 @@ |
216 |
+ |
217 |
+ def __saveFileHTML(self,question=_("Choose the destination file"),mode='w'): |
218 |
+ """Get file. Return open file or None""" |
219 |
+- dlg = wx.FileDialog(self,_("Save as..."),style = wx.SAVE | wx.OVERWRITE_PROMPT | wx.CHANGE_DIR) |
220 |
++ dlg = wx.FileDialog(self,_("Save as..."),style = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT | wx.FD_CHANGE_DIR) |
221 |
+ try: |
222 |
+ answer = dlg.ShowModal() |
223 |
+ finally: |
224 |
+@@ -1176,7 +1176,7 @@ |
225 |
+ ret = wx.GetSingleChoiceIndex(_('What do you want to export?'),_('Export'),[_('Selection'),_('Current key'),_('All')]) |
226 |
+ if ret == -1: return |
227 |
+ # get the file destination |
228 |
+- answer = wx.FileSelector(_("Choose the name of the SQLite database"), flags = wx.SAVE | wx.OVERWRITE_PROMPT | wx.CHANGE_DIR ) |
229 |
++ answer = wx.FileSelector(_("Choose the name of the SQLite database"), flags = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT | wx.FD_CHANGE_DIR ) |
230 |
+ if answer == '': return |
231 |
+ # we create the database |
232 |
+ try: |
233 |
+@@ -1746,7 +1746,7 @@ |
234 |
+ |
235 |
+ arcstarttime=time.time() |
236 |
+ archivename=time.strftime('bibusbackup_%y%m%d_%H%M%S.tar', time.localtime(arcstarttime)) |
237 |
+- dlg = wx.FileDialog(self,_("Archive all user data into file ..."),style = wx.SAVE | wx.OVERWRITE_PROMPT | wx.CHANGE_DIR) |
238 |
++ dlg = wx.FileDialog(self,_("Archive all user data into file ..."),style = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT | wx.FD_CHANGE_DIR) |
239 |
+ dlg.SetDirectory(userDocsDir) |
240 |
+ dlg.SetFilename(archivename) |
241 |
+ dlg.SetWildcard("TAR archive (*.tar)|*.tar") |
242 |
+--- a/FirstStart/MySQL_Setup.py |
243 |
++++ b/FirstStart/MySQL_Setup.py |
244 |
+@@ -533,7 +533,7 @@ |
245 |
+ |
246 |
+ if __name__ == "__main__": |
247 |
+ app = wx.PySimpleApp(0) |
248 |
+- wx.InitAllImageHandlers() |
249 |
++ # no-op in wxPython2.8 and later: wx.InitAllImageHandlers() |
250 |
+ MySQL_Setup = MySQL_Setup_Main(None, -1, "") |
251 |
+ app.SetTopWindow(MySQL_Setup) |
252 |
+ MySQL_Setup.Show() |
253 |
+--- a/StyleEditor/FormatEditor.py |
254 |
++++ b/StyleEditor/FormatEditor.py |
255 |
+@@ -33,7 +33,7 @@ |
256 |
+ |
257 |
+ class FormatEditor(wx.Dialog): |
258 |
+ def __init__(self, *args, **kwds): |
259 |
+- #kwds["style"] = wx.TAB_TRAVERSAL | wx.CAPTION | wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX | wx.THICK_FRAME |
260 |
++ #kwds["style"] = wx.TAB_TRAVERSAL | wx.CAPTION | wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX | wx.RESIZE_BORDER |
261 |
+ kwds["style"] = wx.DEFAULT_FRAME_STYLE |
262 |
+ self.filename = kwds['filename'] |
263 |
+ del kwds['filename'] |
264 |
+@@ -130,7 +130,7 @@ |
265 |
+ wx.MessageBox(_("The style name is not correct, please avoid: '/' under linux; '\\' and ':' under Windows"),_("Style name"),style=wx.OK|wx.ICON_ERROR) |
266 |
+ |
267 |
+ # def SaveAs(self,evt): |
268 |
+-# self.filename = wx.FileSelector(_('Where to save the style file?'), flags = wx.SAVE | wx.OVERWRITE_PROMPT) |
269 |
++# self.filename = wx.FileSelector(_('Where to save the style file?'), flags = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT) |
270 |
+ # #print "%r"%self.filename |
271 |
+ # if self.filename: |
272 |
+ # self.Save(evt) |