You are not logged in.

#1 2009-02-10 16:31:19

BoppreH
Member
Registered: 2009-02-04
Posts: 47

Editing PKGBUILD from ABS

I'm trying to build my own wxPython, since the packaged one doesn't include mediactrl. ABS seemed very easy to use and straightforward, so I went for it.

I have copied the PKGBUILD file to a new directory to build it, but I found a little problem when editing it: the needed lines are missing.

The options I need are:
- Add gstreamer0.10-base as depends
- Add gstreamer0.10-base-plugins as makedepends
- Add --enable-mediactrl to the configure options line.

The first is very easy: just take the depends list and add it.

But where's the makedepends? Was it omitted because it was empty? Can I safely add the line

makedepends=("gstreamer0.10-base-plugins")

below "depends"?

And what about the configure options, where the heck does it go?


Here's the PKGBUILD file copied from the ABS tree. When I opened it I was expecting somethings along the lines of this file, but the missing parts (especially the configure ones) are truly confusing.

# $Id: PKGBUILD 17378 2008-10-29 02:23:35Z eric $
# Maintainer: Eric Belanger <eric@archlinux.org>
# Contributor: Andrew Wright <andreww@photism.org>

pkgname=wxpython
pkgver=2.8.9.1
pkgrel=1
pkgdesc="A wxWidgets GUI toolkit for Python"
arch=('i686' 'x86_64')
license=('custom:wxWindows')
url="http://www.wxpython.org"
depends=('wxgtk>=2.8.8' 'python>=2.6')
source=(http://downloads.sourceforge.net/sourceforge/wxpython/wxPython-src-${pkgver}.tar.bz2)
md5sums=('4ad9a64e05529097618c7e48fbb10a84')
sha1sums=('7359af790d58082330c867f5c10f51b6382d9a35')

build() {
  cd ${srcdir}/wxPython-src-${pkgver}/wxPython
  python setup.py \
    WXPORT=gtk2 \
    UNICODE=1 \
    build install --root=${pkgdir} || return 1
  install -D -m644 ../docs/licence.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1
}

[EDIT] Tried without the configure options, just adding the depends and makedepends options, but a lot of errors occurred:

In file included from src/helpers.cpp:16:
include/wx/wxPython/wxPython_int.h:19:19: error: wx/wx.h: No such file or directory
include/wx/wxPython/wxPython_int.h:21:25: error: wx/busyinfo.h: No such file or directory
include/wx/wxPython/wxPython_int.h:22:22: error: wx/caret.h: No such file or directory
include/wx/wxPython/wxPython_int.h:23:25: error: wx/choicebk.h: No such file or directory
include/wx/wxPython/wxPython_int.h:24:24: error: wx/clipbrd.h: No such file or directory
include/wx/wxPython/wxPython_int.h:25:25: error: wx/colordlg.h: No such file or directory
include/wx/wxPython/wxPython_int.h:26:23: error: wx/config.h: No such file or directory
include/wx/wxPython/wxPython_int.h:27:23: error: wx/cshelp.h: No such file or directory
include/wx/wxPython/wxPython_int.h:28:25: error: wx/dcmirror.h: No such file or directory
include/wx/wxPython/wxPython_int.h:29:21: error: wx/dcps.h: No such file or directory
include/wx/wxPython/wxPython_int.h:30:24: error: wx/dirctrl.h: No such file or directory
include/wx/wxPython/wxPython_int.h:31:23: error: wx/dirdlg.h: No such file or directory
include/wx/wxPython/wxPython_int.h:32:23: error: wx/numdlg.h: No such file or directory
include/wx/wxPython/wxPython_int.h:33:20: error: wx/dnd.h: No such file or directory
include/wx/wxPython/wxPython_int.h:34:24: error: wx/docview.h: No such file or directory
include/wx/wxPython/wxPython_int.h:35:24: error: wx/encconv.h: No such file or directory
include/wx/wxPython/wxPython_int.h:36:25: error: wx/fdrepdlg.h: No such file or directory
include/wx/wxPython/wxPython_int.h:37:25: error: wx/fileconf.h: No such file or directory
include/wx/wxPython/wxPython_int.h:38:24: error: wx/filesys.h: No such file or directory
include/wx/wxPython/wxPython_int.h:39:24: error: wx/fontdlg.h: No such file or directory
include/wx/wxPython/wxPython_int.h:40:24: error: wx/fs_inet.h: No such file or directory
include/wx/wxPython/wxPython_int.h:41:23: error: wx/fs_mem.h: No such file or directory
include/wx/wxPython/wxPython_int.h:42:23: error: wx/fs_zip.h: No such file or directory
include/wx/wxPython/wxPython_int.h:43:24: error: wx/gbsizer.h: No such file or directory
include/wx/wxPython/wxPython_int.h:44:25: error: wx/geometry.h: No such file or directory
include/wx/wxPython/wxPython_int.h:45:25: error: wx/htmllbox.h: No such file or directory
include/wx/wxPython/wxPython_int.h:46:22: error: wx/image.h: No such file or directory
include/wx/wxPython/wxPython_int.h:47:25: error: wx/imaglist.h: No such file or directory
include/wx/wxPython/wxPython_int.h:48:21: error: wx/intl.h: No such file or directory
include/wx/wxPython/wxPython_int.h:49:23: error: wx/laywin.h: No such file or directory
include/wx/wxPython/wxPython_int.h:50:25: error: wx/listbook.h: No such file or directory
include/wx/wxPython/wxPython_int.h:51:25: error: wx/minifram.h: No such file or directory
include/wx/wxPython/wxPython_int.h:52:25: error: wx/notebook.h: No such file or directory
include/wx/wxPython/wxPython_int.h:53:22: error: wx/print.h: No such file or directory
include/wx/wxPython/wxPython_int.h:54:25: error: wx/printdlg.h: No such file or directory
include/wx/wxPython/wxPython_int.h:55:24: error: wx/process.h: No such file or directory
include/wx/wxPython/wxPython_int.h:56:24: error: wx/progdlg.h: No such file or directory
include/wx/wxPython/wxPython_int.h:57:24: error: wx/sashwin.h: No such file or directory
include/wx/wxPython/wxPython_int.h:58:25: error: wx/spinbutt.h: No such file or directory
include/wx/wxPython/wxPython_int.h:59:25: error: wx/spinctrl.h: No such file or directory
include/wx/wxPython/wxPython_int.h:60:23: error: wx/splash.h: No such file or directory
include/wx/wxPython/wxPython_int.h:61:25: error: wx/splitter.h: No such file or directory
include/wx/wxPython/wxPython_int.h:62:25: error: wx/statline.h: No such file or directory
include/wx/wxPython/wxPython_int.h:63:23: error: wx/stream.h: No such file or directory
include/wx/wxPython/wxPython_int.h:64:23: error: wx/sysopt.h: No such file or directory
include/wx/wxPython/wxPython_int.h:65:24: error: wx/taskbar.h: No such file or directory
include/wx/wxPython/wxPython_int.h:66:23: error: wx/tglbtn.h: No such file or directory
include/wx/wxPython/wxPython_int.h:67:23: error: wx/tipwin.h: No such file or directory
include/wx/wxPython/wxPython_int.h:68:25: error: wx/toolbook.h: No such file or directory
include/wx/wxPython/wxPython_int.h:69:24: error: wx/tooltip.h: No such file or directory
include/wx/wxPython/wxPython_int.h:70:25: error: wx/treebook.h: No such file or directory
include/wx/wxPython/wxPython_int.h:71:22: error: wx/vlbox.h: No such file or directory
include/wx/wxPython/wxPython_int.h:72:24: error: wx/vscroll.h: No such file or directory
include/wx/wxPython/wxPython_int.h:73:24: error: wx/dateevt.h: No such file or directory
include/wx/wxPython/wxPython_int.h:74:25: error: wx/datectrl.h: No such file or directory
include/wx/wxPython/wxPython_int.h:75:22: error: wx/power.h: No such file or directory
include/wx/wxPython/wxPython_int.h:76:26: error: wx/hyperlink.h: No such file or directory
include/wx/wxPython/wxPython_int.h:77:27: error: wx/pickerbase.h: No such file or directory
include/wx/wxPython/wxPython_int.h:78:26: error: wx/clrpicker.h: No such file or directory
include/wx/wxPython/wxPython_int.h:79:27: error: wx/filepicker.h: No such file or directory
include/wx/wxPython/wxPython_int.h:80:31: error: wx/fontpicker.h: No such file or directory
include/wx/wxPython/wxPython_int.h:81:25: error: wx/collpane.h: No such file or directory
include/wx/wxPython/wxPython_int.h:82:25: error: wx/srchctrl.h: No such file or directory
include/wx/wxPython/wxPython_int.h:83:33: error: wx/generic/datectrl.h: No such file or directory
src/helpers.cpp:35:29: error: wx/gtk1/win_gtk.h: No such file or directory
src/helpers.cpp:53:25: error: wx/mimetype.h: No such file or directory
In file included from src/helpers.cpp:16:
include/wx/wxPython/wxPython_int.h:99: error: expected class-name before '{' token
include/wx/wxPython/wxPython_int.h:101: error: expected `)' before 'evtType'
include/wx/wxPython/wxPython_int.h:104: error: ISO C++ forbids declaration of 'wxEvent' with no type
include/wx/wxPython/wxPython_int.h:104: error: 'wxEvent' declared as a 'virtual' field
include/wx/wxPython/wxPython_int.h:104: error: expected ';' before '*' token
include/wx/wxPython/wxPython_int.h:105: error: expected `;' before '}' token
include/wx/wxPython/wxPython_int.h:112: error: 'wxPoint2DDouble' does not name a type
include/wx/wxPython/wxPython_int.h:113: error: 'wxRect2DDouble' does not name a type
include/wx/wxPython/wxPython_int.h:136: error: variable or field 'wxPyEventThunker' declared void
include/wx/wxPython/wxPython_int.h:136: error: 'wxObject' was not declared in this scope
include/wx/wxPython/wxPython_int.h:136: error: expected primary-expression before ',' token
include/wx/wxPython/wxPython_int.h:136: error: 'wxEvent' was not declared in this scope
include/wx/wxPython/wxPython_int.h:136: error: 'event' was not declared in this scope
include/wx/wxPython/wxPython_int.h:139: error: expected ',' or '...' before '*' token
include/wx/wxPython/wxPython_int.h:139: error: ISO C++ forbids declaration of 'wxChar' with no type
include/wx/wxPython/wxPython_int.h:141: error: expected ',' or '...' before '*' token
include/wx/wxPython/wxPython_int.h:142: error: ISO C++ forbids declaration of 'wxChar' with no type
include/wx/wxPython/wxPython_int.h:144: error: expected ',' or '...' before '*' token
include/wx/wxPython/wxPython_int.h:144: error: ISO C++ forbids declaration of 'wxChar' with no type
include/wx/wxPython/wxPython_int.h:145: error: expected ',' or '...' before '*' token
include/wx/wxPython/wxPython_int.h:145: error: ISO C++ forbids declaration of 'wxChar' with no type
include/wx/wxPython/wxPython_int.h:148: error: expected ',' or '...' before '&' token
include/wx/wxPython/wxPython_int.h:148: error: ISO C++ forbids declaration of 'wxString' with no type
include/wx/wxPython/wxPython_int.h:149: error: 'wxString' does not name a type
include/wx/wxPython/wxPython_int.h:151: error: 'wxObject' was not declared in this scope
include/wx/wxPython/wxPython_int.h:151: error: 'source' was not declared in this scope
include/wx/wxPython/wxPython_int.h:151: error: expected primary-expression before 'bool'
include/wx/wxPython/wxPython_int.h:151: error: expected primary-expression before 'bool'
include/wx/wxPython/wxPython_int.h:151: error: initializer expression list treated as compound expression
include/wx/wxPython/wxPython_int.h:152: error: 'wxSizer' was not declared in this scope
include/wx/wxPython/wxPython_int.h:152: error: 'source' was not declared in this scope
include/wx/wxPython/wxPython_int.h:152: error: expected primary-expression before 'bool'
include/wx/wxPython/wxPython_int.h:152: error: initializer expression list treated as compound expression
include/wx/wxPython/wxPython_int.h:155: error: 'wxWindow' was not declared in this scope
include/wx/wxPython/wxPython_int.h:155: error: 'win' was not declared in this scope
include/wx/wxPython/wxPython_int.h:236: error: expected constructor, destructor, or type conversion before '*' token
include/wx/wxPython/wxPython_int.h:242: error: expected constructor, destructor, or type conversion before '*' token
include/wx/wxPython/wxPython_int.h:243: error: expected constructor, destructor, or type conversion before '*' token
include/wx/wxPython/wxPython_int.h:244: error: expected constructor, destructor, or type conversion before '*' token
include/wx/wxPython/wxPython_int.h:245: error: expected constructor, destructor, or type conversion before '*' token
include/wx/wxPython/wxPython_int.h:246: error: expected constructor, destructor, or type conversion before '*' token
include/wx/wxPython/wxPython_int.h:247: error: expected constructor, destructor, or type conversion before '*' token
include/wx/wxPython/wxPython_int.h:249: error: 'wxSize' has not been declared
include/wx/wxPython/wxPython_int.h:250: error: 'wxPoint' has not been declared
include/wx/wxPython/wxPython_int.h:251: error: 'wxRealPoint' has not been declared
include/wx/wxPython/wxPython_int.h:252: error: 'wxRect' has not been declared
include/wx/wxPython/wxPython_int.h:253: error: 'wxColour' has not been declared
include/wx/wxPython/wxPython_int.h:254: error: 'wxPoint2D' has not been declared
include/wx/wxPython/wxPython_int.h:255: error: 'wxRect2D' has not been declared
include/wx/wxPython/wxPython_int.h:258: error: expected ',' or '...' before '*' token
include/wx/wxPython/wxPython_int.h:258: error: ISO C++ forbids declaration of 'wxChar' with no type
include/wx/wxPython/wxPython_int.h:269: error: expected ',' or '...' before '&' token
include/wx/wxPython/wxPython_int.h:269: error: ISO C++ forbids declaration of 'wxArrayString' with no type
include/wx/wxPython/wxPython_int.h:270: error: expected ',' or '...' before '&' token
include/wx/wxPython/wxPython_int.h:270: error: ISO C++ forbids declaration of 'wxArrayInt' with no type
include/wx/wxPython/wxPython_int.h:271: error: expected ',' or '...' before '&' token
include/wx/wxPython/wxPython_int.h:271: error: ISO C++ forbids declaration of 'wxArrayDouble' with no type
include/wx/wxPython/wxPython_int.h:290: error: expected class-name before '{' token
include/wx/wxPython/wxPython_int.h:291: error: ISO C++ forbids declaration of 'DECLARE_ABSTRACT_CLASS' with no type
include/wx/wxPython/wxPython_int.h:292: error: expected ';' before 'public'
include/wx/wxPython/wxPython_int.h:297: error: 'wxEvent' has not been declared
include/wx/wxPython/wxPython_int.h:326: error: expected class-name before ',' token
include/wx/wxPython/wxPython_int.h:327: error: ISO C++ forbids declaration of 'DECLARE_ABSTRACT_CLASS' with no type
include/wx/wxPython/wxPython_int.h:328: error: expected ';' before 'public'
include/wx/wxPython/wxPython_int.h:333: error: ISO C++ forbids declaration of 'wxEvent' with no type
include/wx/wxPython/wxPython_int.h:333: error: 'wxEvent' declared as a 'virtual' field
include/wx/wxPython/wxPython_int.h:333: error: expected ';' before '*' token
include/wx/wxPython/wxPython_int.h:334: error: expected `;' before '}' token
include/wx/wxPython/wxPython_int.h:337: error: expected class-name before ',' token
include/wx/wxPython/wxPython_int.h:338: error: ISO C++ forbids declaration of 'DECLARE_ABSTRACT_CLASS' with no type
include/wx/wxPython/wxPython_int.h:339: error: expected ';' before 'public'
include/wx/wxPython/wxPython_int.h:344: error: ISO C++ forbids declaration of 'wxEvent' with no type
include/wx/wxPython/wxPython_int.h:344: error: 'wxEvent' declared as a 'virtual' field
include/wx/wxPython/wxPython_int.h:344: error: expected ';' before '*' token
include/wx/wxPython/wxPython_int.h:345: error: expected `;' before '}' token
include/wx/wxPython/wxPython_int.h:375: error: expected ',' or '...' before '*' token
include/wx/wxPython/wxPython_int.h:375: error: ISO C++ forbids declaration of 'wxChar' with no type
include/wx/wxPython/wxPython_int.h:376: error: expected ',' or '...' before '*' token
include/wx/wxPython/wxPython_int.h:376: error: ISO C++ forbids declaration of 'wxChar' with no type
include/wx/wxPython/wxPython_int.h:377: error: expected ',' or '...' before '*' token
include/wx/wxPython/wxPython_int.h:377: error: ISO C++ forbids declaration of 'wxChar' with no type
include/wx/wxPython/wxPython_int.h:378: error: expected ',' or '...' before '*' token
include/wx/wxPython/wxPython_int.h:378: error: ISO C++ forbids declaration of 'wxChar' with no type
include/wx/wxPython/wxPython_int.h:387: error: ISO C++ forbids declaration of 'wxString' with no type
include/wx/wxPython/wxPython_int.h:387: error: expected ';' before '*' token
include/wx/wxPython/wxPython_int.h:388: error: expected identifier before '*' token
include/wx/wxPython/wxPython_int.h:388: error: ISO C++ forbids declaration of 'wxString' with no type
include/wx/wxPython/wxPython_int.h:388: error: 'wxString' declared as function returning a function
include/wx/wxPython/wxPython_int.h:389: error: expected ',' or '...' before '&' token
include/wx/wxPython/wxPython_int.h:389: error: ISO C++ forbids declaration of 'wxString' with no type
include/wx/wxPython/wxPython_int.h:395: error: ISO C++ forbids declaration of 'wxPoint' with no type
include/wx/wxPython/wxPython_int.h:395: error: expected ';' before '*' token
include/wx/wxPython/wxPython_int.h:396: error: ISO C++ forbids declaration of 'wxBitmap' with no type
include/wx/wxPython/wxPython_int.h:396: error: expected ';' before '*' token
include/wx/wxPython/wxPython_int.h:397: error: ISO C++ forbids declaration of 'wxString' with no type
include/wx/wxPython/wxPython_int.h:397: error: expected ';' before '*' token
include/wx/wxPython/wxPython_int.h:398: error: ISO C++ forbids declaration of 'wxAcceleratorEntry' with no type
include/wx/wxPython/wxPython_int.h:398: error: expected ';' before '*' token
include/wx/wxPython/wxPython_int.h:400: error: 'wxSize' has not been declared
include/wx/wxPython/wxPython_int.h:401: error: 'wxPoint' has not been declared
include/wx/wxPython/wxPython_int.h:402: error: 'wxRealPoint' has not been declared
include/wx/wxPython/wxPython_int.h:403: error: 'wxRect' has not been declared
include/wx/wxPython/wxPython_int.h:404: error: 'wxColour' has not been declared
include/wx/wxPython/wxPython_int.h:405: error: 'wxPoint2D' has not been declared
include/wx/wxPython/wxPython_int.h:408: error: expected ',' or '...' before '*' token
include/wx/wxPython/wxPython_int.h:408: error: ISO C++ forbids declaration of 'wxChar' with no type
include/wx/wxPython/wxPython_int.h:417: error: expected ';' before '(' token
include/wx/wxPython/wxPython_int.h:418: error: expected ';' before '(' token
include/wx/wxPython/wxPython_int.h:422: error: expected ',' or '...' before '&' token
include/wx/wxPython/wxPython_int.h:422: error: ISO C++ forbids declaration of 'wxArrayString' with no type
include/wx/wxPython/wxPython_int.h:423: error: expected ',' or '...' before '&' token
include/wx/wxPython/wxPython_int.h:423: error: ISO C++ forbids declaration of 'wxArrayInt' with no type
include/wx/wxPython/wxPython_int.h:438: error: expected ',' or '...' before '&' token
include/wx/wxPython/wxPython_int.h:438: error: ISO C++ forbids declaration of 'wxArrayDouble' with no type
include/wx/wxPython/wxPython_int.h:439: error: ISO C++ forbids declaration of 'wxPoint2D' with no type
include/wx/wxPython/wxPython_int.h:439: error: expected ';' before '*' token
include/wx/wxPython/wxPython_int.h:440: error: 'wxRect2D' has not been declared
include/wx/wxPython/wxPython_int.h:458: error: expected class-name before '{' token
include/wx/wxPython/wxPython_int.h:477: error: expected class-name before '{' token
include/wx/wxPython/wxPython_int.h:519: error: expected class-name before '{' token
include/wx/wxPython/wxPython_int.h:530: error: expected ';' before '(' token
include/wx/wxPython/wxPython_int.h:531: error: expected ';' before '(' token
include/wx/wxPython/wxPython_int.h:532: error: expected ';' before '(' token
include/wx/wxPython/wxPython_int.h:539: error: 'wxImage' has not been declared
include/wx/wxPython/wxPython_int.h:539: error: 'wxInputStream' has not been declared
include/wx/wxPython/wxPython_int.h:541: error: 'wxImage' has not been declared
include/wx/wxPython/wxPython_int.h:541: error: 'wxOutputStream' has not been declared
include/wx/wxPython/wxPython_int.h:543: error: 'wxInputStream' has not been declared
include/wx/wxPython/wxPython_int.h:544: error: 'wxInputStream' has not been declared
include/wx/wxPython/wxPython_int.h:626: error: expected class-name before '{' token
include/wx/wxPython/wxPython_int.h:627: error: ISO C++ forbids declaration of 'DECLARE_ABSTRACT_CLASS' with no type
include/wx/wxPython/wxPython_int.h:629: error: expected ';' before 'public'
include/wx/wxPython/wxPython_int.h:651: error: expected ',' or '...' before '&' token
include/wx/wxPython/wxPython_int.h:651: error: ISO C++ forbids declaration of 'wxString' with no type
include/wx/wxPython/wxPython_int.h:652: error: expected ',' or '...' before '&' token
include/wx/wxPython/wxPython_int.h:652: error: ISO C++ forbids declaration of 'wxString' with no type
include/wx/wxPython/wxPython_int.h:660: error: 'wxString' does not name a type
include/wx/wxPython/wxPython_int.h:666: error: expected ',' or '...' before '&' token
include/wx/wxPython/wxPython_int.h:666: error: ISO C++ forbids declaration of 'wxString' with no type
In file included from src/helpers.cpp:17:
include/wx/wxPython/pyistream.h:27: error: ISO C++ forbids declaration of 'wxInputStream' with no type
include/wx/wxPython/pyistream.h:27: error: expected ';' before '*' token
include/wx/wxPython/pyistream.h:30: error: expected `)' before '*' token
include/wx/wxPython/pyistream.h:63: error: 'wxSeekMode' has not been declared
include/wx/wxPython/pyistream.h: In member function 'char wxPyInputStream::Peek()':
include/wx/wxPython/pyistream.h:56: error: 'm_wxis' was not declared in this scope
include/wx/wxPython/pyistream.h: In member function 'char wxPyInputStream::GetC()':
include/wx/wxPython/pyistream.h:57: error: 'm_wxis' was not declared in this scope
include/wx/wxPython/pyistream.h: In member function 'size_t wxPyInputStream::LastRead()':
include/wx/wxPython/pyistream.h:58: error: 'm_wxis' was not declared in this scope
include/wx/wxPython/pyistream.h: In member function 'bool wxPyInputStream::CanRead()':
include/wx/wxPython/pyistream.h:59: error: 'm_wxis' was not declared in this scope
include/wx/wxPython/pyistream.h: In member function 'bool wxPyInputStream::Eof()':
include/wx/wxPython/pyistream.h:60: error: 'm_wxis' was not declared in this scope
include/wx/wxPython/pyistream.h: In member function 'bool wxPyInputStream::Ungetch(char)':
include/wx/wxPython/pyistream.h:61: error: 'm_wxis' was not declared in this scope
include/wx/wxPython/pyistream.h: In member function 'long unsigned int wxPyInputStream::SeekI(long unsigned int, int)':
include/wx/wxPython/pyistream.h:64: error: 'm_wxis' was not declared in this scope
include/wx/wxPython/pyistream.h: In member function 'long unsigned int wxPyInputStream::TellI()':
include/wx/wxPython/pyistream.h:65: error: 'm_wxis' was not declared in this scope
include/wx/wxPython/pyistream.h: At global scope:
include/wx/wxPython/pyistream.h:72: error: expected class-name before '{' token
include/wx/wxPython/pyistream.h:75: error: 'wxFileOffset' does not name a type
include/wx/wxPython/pyistream.h:89: error: 'wxFileOffset' does not name a type
include/wx/wxPython/pyistream.h:90: error: 'wxFileOffset' does not name a type
include/wx/wxPython/pyistream.h:105: error: ISO C++ forbids declaration of 'wxOutputStream' with no type
include/wx/wxPython/pyistream.h:105: error: expected ';' before '*' token
include/wx/wxPython/pyistream.h:108: error: expected `)' before '*' token
include/wx/wxPython/pyistream.h:134: error: 'wxSeekMode' has not been declared
include/wx/wxPython/pyistream.h:134: error: 'wxFromStart' was not declared in this scope
include/wx/wxPython/pyistream.h: In member function 'void wxPyOutputStream::PutC(char)':
include/wx/wxPython/pyistream.h:132: error: 'm_wxos' was not declared in this scope
include/wx/wxPython/pyistream.h: In member function 'size_t wxPyOutputStream::LastWrite()':
include/wx/wxPython/pyistream.h:133: error: 'm_wxos' was not declared in this scope
include/wx/wxPython/pyistream.h: In member function 'long unsigned int wxPyOutputStream::SeekO(long unsigned int, int)':
include/wx/wxPython/pyistream.h:135: error: 'm_wxos' was not declared in this scope
include/wx/wxPython/pyistream.h: In member function 'long unsigned int wxPyOutputStream::TellO()':
include/wx/wxPython/pyistream.h:136: error: 'm_wxos' was not declared in this scope
include/wx/wxPython/pyistream.h: At global scope:
include/wx/wxPython/pyistream.h:143: error: expected class-name before '{' token
include/wx/wxPython/pyistream.h:146: error: 'wxFileOffset' does not name a type
include/wx/wxPython/pyistream.h:160: error: 'wxFileOffset' does not name a type
include/wx/wxPython/pyistream.h:161: error: 'wxFileOffset' does not name a type
In file included from src/helpers.cpp:19:
include/wx/wxPython/twoitem.h:19: error: expected ',' or '...' before '*' token
include/wx/wxPython/twoitem.h:19: error: ISO C++ forbids declaration of 'wxChar' with no type
include/wx/wxPython/twoitem.h: In function 'bool wxPyTwoIntItem_helper(PyObject*, T**, int)':
include/wx/wxPython/twoitem.h:24: error: 'name' was not declared in this scope
include/wx/wxPython/twoitem.h:45: error: 'wxString' was not declared in this scope
include/wx/wxPython/twoitem.h:45: error: expected `;' before 'msg'
include/wx/wxPython/twoitem.h:46: error: 'msg' was not declared in this scope
include/wx/wxPython/twoitem.h:46: error: there are no arguments to 'wxT' that depend on a template parameter, so a declaration of 'wxT' must be available
include/wx/wxPython/twoitem.h:46: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
include/wx/wxPython/twoitem.h:46: error: 'name' was not declared in this scope
src/helpers.cpp: At global scope:
src/helpers.cpp:125: error: 'wxApp' has not been declared
src/helpers.cpp:125: error: expected constructor, destructor, or type conversion before ';' token
src/helpers.cpp:128: error: definition of implicitly-declared 'wxPyApp::wxPyApp()'
src/helpers.cpp: In destructor 'wxPyApp::~wxPyApp()':
src/helpers.cpp:136: error: 'wxApp' has not been declared
src/helpers.cpp: In member function 'int wxPyApp::MainLoop()':
src/helpers.cpp:149: error: 'DeletePendingObjects' was not declared in this scope
src/helpers.cpp:150: error: 'wxTopLevelWindows' was not declared in this scope
src/helpers.cpp:152: error: 'm_exitOnFrameDelete' was not declared in this scope
src/helpers.cpp:152: error: 'Later' was not declared in this scope
src/helpers.cpp:153: error: 'Yes' was not declared in this scope
src/helpers.cpp:156: error: 'wxApp' has not been declared
src/helpers.cpp: In member function 'virtual bool wxPyApp::OnInitGui()':
src/helpers.cpp:165: error: 'wxApp' has not been declared
src/helpers.cpp: In member function 'virtual int wxPyApp::OnExit()':
src/helpers.cpp:180: error: 'wxApp' has not been declared
src/helpers.cpp: In member function 'virtual void wxPyApp::ExitMainLoop()':
src/helpers.cpp:193: error: 'wxApp' has not been declared
src/helpers.cpp: At global scope:
src/helpers.cpp:289: error: expected ',' or '...' before '&' token
src/helpers.cpp:289: error: ISO C++ forbids declaration of 'wxString' with no type
src/helpers.cpp: In member function 'virtual void wxPyApp::MacOpenFile(int)':
src/helpers.cpp:293: error: 'fileName' was not declared in this scope
src/helpers.cpp: At global scope:
src/helpers.cpp:300: error: expected ',' or '...' before '&' token
src/helpers.cpp:300: error: ISO C++ forbids declaration of 'wxString' with no type
src/helpers.cpp: In member function 'virtual void wxPyApp::MacPrintFile(int)':
src/helpers.cpp:304: error: 'fileName' was not declared in this scope
src/helpers.cpp: At global scope:
src/helpers.cpp:361: error: 'wxString' does not name a type
src/helpers.cpp:395: error: expected ',' or '...' before '&' token
src/helpers.cpp:395: error: ISO C++ forbids declaration of 'wxString' with no type
src/helpers.cpp: In member function 'void wxPyApp::_BootstrapApp()':
src/helpers.cpp:421: warning: deprecated conversion from string constant to 'char*'
src/helpers.cpp:422: warning: deprecated conversion from string constant to 'char*'
src/helpers.cpp:438: error: 'wxEntryStart' was not declared in this scope
src/helpers.cpp:465: error: 'class wxPyApp' has no member named 'argc'
src/helpers.cpp:466: error: 'class wxPyApp' has no member named 'argv'
src/helpers.cpp: In function 'void __wxPyPreStart(PyObject*)':
src/helpers.cpp:598: error: 'wxApp' has not been declared
src/helpers.cpp:598: error: 'WX_BUILD_OPTIONS_SIGNATURE' was not declared in this scope
src/helpers.cpp:600: error: 'wxInitAllImageHandlers' was not declared in this scope
src/helpers.cpp: In function 'void __wxPyCleanup()':
src/helpers.cpp:609: error: 'wxEntryCleanup' was not declared in this scope
src/helpers.cpp: In function 'PyObject* __wxPySetDictionary(PyObject*, PyObject*)':
src/helpers.cpp:643: warning: deprecated conversion from string constant to 'char*'
src/helpers.cpp:648: warning: deprecated conversion from string constant to 'char*'
src/helpers.cpp:682: error: 'wxUSE_UNICODE' was not declared in this scope
src/helpers.cpp: In function 'bool wxPyCheckForApp()':
src/helpers.cpp:745: error: 'wxTheApp' was not declared in this scope
src/helpers.cpp: In function 'void wxPyOORClientData_dtor(wxPyOORClientData*)':
src/helpers.cpp:811: warning: deprecated conversion from string constant to 'char*'
src/helpers.cpp: At global scope:
src/helpers.cpp:863: error: redefinition of 'PyObject* wxPyMake_wxObject'
include/wx/wxPython/wxPython_int.h:151: error: 'PyObject* wxPyMake_wxObject' previously defined here
src/helpers.cpp:863: error: 'wxObject' was not declared in this scope
src/helpers.cpp:863: error: 'source' was not declared in this scope
src/helpers.cpp:863: error: expected primary-expression before 'bool'
src/helpers.cpp:863: error: expected primary-expression before 'bool'
src/helpers.cpp:92: warning: 'wxPyDefaultEncoding' defined but not used
error: command 'gcc' failed with exit status 1

[EDIT] It did work, but the options passed were ignored.

Last edited by BoppreH (2009-02-11 00:26:47)

Offline

#2 2009-02-10 17:55:48

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Editing PKGBUILD from ABS

You can add any field that's missing (you can actually add any valid bash code). Empty fields are stripped from PKGBUILDs to reduce clutter (and size) because they serve absolutely no purpose.

Post your modified PKGBUILD so someone can inspect it for errors. From what you posted, it seems that the source is to blame. Adding pkgs to the depends and makedepends arrays have no effect on compilation (other than enabling their use).

The configure option should go in the build function. Maybe you need to add it to the setup command (which is split across 3 lines):

  python setup.py \
    WXPORT=gtk2 \
    UNICODE=1 \

Just check how they configure it upstream. The build function usually contains the same commands that you would run when building it manually, except that it's installed to the $pkgdir.


*edit*
I've tested building both the ABS PKGBUILD and the modified one and have had no problems.
Also, I usually see single quotes around pkg names in the (make|opt)depends arrays (although I tried with double-quotes to see if it had any effect in this case, which it didn't).

Last edited by Xyne (2009-02-10 18:00:05)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2009-02-10 18:19:54

sirius
Member
From: Norway
Registered: 2008-12-25
Posts: 68

Re: Editing PKGBUILD from ABS

You should have read wxPython/docs/BUILD.txt wink

Try to change the build function to this:

build() {
  cd ${srcdir}/wxPython-src-${pkgver}/wxPython
  ../configure --enable-mediactrl || return 1
  python setup.py \
    WXPORT=gtk2 \
    UNICODE=1 \
    build install --root=${pkgdir} || return 1
  install -D -m644 ../docs/licence.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1
}

The include/wx/wxPython/wxPython_int.h:19:19: error: wx/wx.h: No such file or directory errors tells me you haven't installed wxgtk? You need to install wxgtk before you compile wxPython.

Your PKGBUILD should be

# $Id: PKGBUILD 17378 2008-10-29 02:23:35Z eric $
# Maintainer: Eric Belanger <eric@archlinux.org>
# Contributor: Andrew Wright <andreww@photism.org>

pkgname=wxpython
pkgver=2.8.9.1
pkgrel=1
pkgdesc="A wxWidgets GUI toolkit for Python"
arch=('i686' 'x86_64')
license=('custom:wxWindows')
url="http://www.wxpython.org"
depends=('wxgtk>=2.8.8' 'python>=2.6' 'gstreamer0.10-base')
makedepends=('gstreamer0.10-base-plugins')
source=(http://downloads.sourceforge.net/sourceforge/wxpython/wxPython-src-${pkgver}.tar.bz2)
md5sums=('4ad9a64e05529097618c7e48fbb10a84')
sha1sums=('7359af790d58082330c867f5c10f51b6382d9a35')

build() {
  cd ${srcdir}/wxPython-src-${pkgver}/wxPython
  ../configure --enable-mediactrl || return 1
  python setup.py \
    WXPORT=gtk2 \
    UNICODE=1 \
    build install --root=${pkgdir} || return 1
  install -D -m644 ../docs/licence.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1
}

Offline

#4 2009-02-10 18:27:34

BoppreH
Member
Registered: 2009-02-04
Posts: 47

Re: Editing PKGBUILD from ABS

$ sudo abs
$ mkdir ~/wxPython
$ cp -r /var/abs/extra/wxpython/ ~/wxPython
$ cd ~/wxPython/wxpython/
$ makepkg -s

Yields the error in the first post. I guess I'll have to fix it first.

sirius, I have read the BUILD.txt guide as well the INSTALL.txt. I have been looking for this answer since I installed Arch (~5 days).

I also have wxgtk installed.

I'm now trying to execute the PKGBUILD you gave me. Thanks for working it out for me.

[EDIT] I must have done something really dumb somewhere in this steps.

sirius' PKGBUILD worked like a charm when building, but when I tested it with python ">>> import wx" I was greeted with a long and cryptic ImportError:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/__init__.py", line 45, in <module>
    from wx._core import *
  File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 4, in <module>
    import _core_
ImportError: libwx_gtk2ud_richtext-2.8.so.0: cannot open shared object file: No such file or directory

I'm now looking for a fix, like this one, but if you have the answer feel free to post.

Last edited by BoppreH (2009-02-10 19:15:05)

Offline

#5 2009-02-10 18:47:42

sirius
Member
From: Norway
Registered: 2008-12-25
Posts: 68

Re: Editing PKGBUILD from ABS

Sorry, didn't mean to sound arrogant smile

My wx.h is located in /usr/include/wx-2.8/wx, and 'pacman -Qo /usr/include/wx-2.8/wx/wx.h' gives me '/usr/include/wx-2.8/wx/wx.h is owned by wxgtk 2.8.9-1'.

If I delete those files I get exactly the same error message as you. You may try to reinstall the wxgtk package :-)

edit: typo

Last edited by sirius (2009-02-10 18:49:37)

Offline

#6 2009-02-10 18:54:14

BoppreH
Member
Registered: 2009-02-04
Posts: 47

Re: Editing PKGBUILD from ABS

I forgot to do the "sudo pacman -U package" part :facepalm:

A lot of "file exists in filesystem" errors appeared, result of badly uninstalled wxPython builds, but I manually removed them.

Pacman installed the package, python imported it successfully. But...

AttributeError: 'module' object has no attribute 'media'

It seems that the --enable-mediactrl options was ignored or unsupported, because other wxPython non-media-dependent scripts are working. Back to the planning table.

But I think it's not an ABS problem anymore, since the same thing happened when I tried building it from the original site's source. Now I'm not sure it's a wxPython source problem or if ABS ignored the "../configure options" part.

sirius wrote:

Sorry, didn't mean to sound arrogant smile

No problem, you didn't. And this is the Newbie Corner, more details is better.

Last edited by BoppreH (2009-02-10 19:20:37)

Offline

Board footer

Powered by FluxBB