You are not logged in.

#1 2004-08-07 15:56:50

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

pkgbuilds for pgadmin3-devel and patched wxwidgets

This is highly experimental - use on your own risk :-)

I've been trying to build this package for several days. Finally I was able to do that (a kind of as you can see below). It's not a perfect pkgbuild and the only version that works is a devel version. I haven't tested this package so far but I decided to publish pkgbuilds so others can test them. Please, post any info that could improve the pkgbuilds here.

Pgadmin III is probably the most advanced and featureful application for gui management/development of postgresql dbs - that's the main reason to build it. But there are two main problems when you try to build a package for arch.

First, there are some gcc 3.4.1 related errors and that's what these sed lines ("dirty" workarounds) are for. The patch file would probably be more clean and better but since it's the build for the devel version that changes more frequently, I'd prefer to have them as sed commands. Feel free to change it if you want. Patches change only some of c++ "protected" class properties to "public" (according to make output and some info I found on pgadmin3-hackers list). This probably has to stay like that until new pgadmin version will be available.

Second, pgadmin3 is using a modified (patched) version of wxwidgets (aka wxwindows) library with gtk2 support. This library is needed only during the build process (if you have wxgtk installed you can remove for the time of building pgadmin3 package with pacman -Rd wxgtk, then install wxwidgets-pgadmin3 and remove after build finishes and you can reinstall wxgtk again) - static linking. Most patches from pgadmin team go sooner or later to main wxwidgets package but this is a slow process. Maybe in a month or two it will be possible to also build stable pgadmin3 with standard wxwidgets package. For now you will need this modified cvs snapshot wxwidges-pgadmin3 version. Other builds (including the one mentioned on main pgadmin page) compile fine but later there are errors when building pgadmin package, so don't waste time to build it.

Ok. You've been warned :-)

pgadmin3-devel PKGBUILD

pkgname=pgadmin3-devel
pkgver=1.1.0
pkgrel=1
pkgdesc="Administration and development GUI for Postgresql database (snapshot ver)"
url="http://www.pgadmin.org"
depends=('openssl' 'gtk2')
makedepends=('postgresql' 'wxwidgets-pgadmin3')
conflicts=('pgadmin3')
source=(http://pgadmin.postgresql.org/snapshots/pgadmin3-src.tar.gz)
md5sums=('d82c98d758eb8d4964ca7d718ffbb950')

build() {

    cd $startdir/src/pgadmin3-$pkgver

    sed -i "s/void OnChange(wxCommandEvent &ev);///&/" 
        $startdir/src/pgadmin3-$pkgver/src/include/dlgProperty.h

    sed -i "s/void OnChangeStc(wxStyledTextEvent& event);///&/" 
        $startdir/src/pgadmin3-$pkgver/src/include/dlgProperty.h

    sed -i "/virtual void CheckChange() =0;/a\
        void OnChange(wxCommandEvent &ev);\
        void OnChangeStc(wxStyledTextEvent& event);" 
                $startdir/src/pgadmin3-$pkgver/src/include/dlgProperty.h

    sed -i "/class pgDialog/,/class pgFrame/s/void OnCancel(wxCommandEvent& ev);///&/" 
        $startdir/src/pgadmin3-$pkgver/src/include/dlgClasses.h

    sed -i "/class ExternProcessDialog/,/DECLARE_EVENT/s/void OnClose(wxCloseEvent& event);///&/" 
        $startdir/src/pgadmin3-$pkgver/src/include/dlgClasses.h

    sed -i "/void LoadResource(wxWindow/a\
        void OnCancel(wxCommandEvent& ev);" 
                $startdir/src/pgadmin3-$pkgver/src/include/dlgClasses.h

    sed -i "/bool Execute(int step=0);/a\
        void OnClose(wxCloseEvent& event);" 
                $startdir/src/pgadmin3-$pkgver/src/include/dlgClasses.h

    ./configure --prefix=/usr --enable-static 
    --enable-debug 
    --with-pgsql-include=/usr/include/postgresql/ 
    --with-pgsql=/usr 
    --with-wx=/usr

    make || return 1

    make prefix=$startdir/pkg/usr install
}

wxwidgets-pgadmin3 PKGBUILD

pkgname=wxwidgets-pgadmin3
pkgver=20040711
pkgrel=1
pkgdesc="Framework for cross-platform GUI programming with pgadmin.org patches"
url="http://www.wxwindows.org"
depends=('bash' 'gtk2' 'freetype2')
conflicts=('wxwindows' 'wxwidgets' 'wxgtk')
source=(http://developer.pgadmin.org/snapshots/wxWidgets/wxWidgets-pgAdmin3-${pkgver}-1.tar.bz2)
md5sums=('5687bfdf335746758c998bd6fd99ab90')

build() {
  cd $startdir/src/wxWidgets-pgAdmin3-${pkgver}-1

  ./autogen.sh

  ./configure --prefix=/usr 
  --with-gtk 
  --enable-gtk2 
  --enable-unicode 
  --disable-shared 
  --enable-debug

  make || return 1

  cd $startdir/src/wxWidgets-pgAdmin3-${pkgver}-1/contrib/src/stc/
  make || return 1

  cd $startdir/src/wxWidgets-pgAdmin3-${pkgver}-1/contrib/src/xrc/
  make || return 1

  cd $startdir/src/wxWidgets-pgAdmin3-${pkgver}-1
  make prefix=$startdir/pkg/usr install

  cd $startdir/src/wxWidgets-pgAdmin3-${pkgver}-1/contrib/src/stc/
  make prefix=$startdir/pkg/usr install

  cd $startdir/src/wxWidgets-pgAdmin3-${pkgver}-1/contrib/src/xrc/
  make prefix=$startdir/pkg/usr install
}

Offline

Board footer

Powered by FluxBB