You are not logged in.

#1 2008-09-28 04:07:29

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

SciTE CVS [FINISHED]

******************************************
Please see post #6 for review request
******************************************

-->This is easier to understand if you know SciTE. <--

I put together a PKGBUILD file for SciTE from CVS. I got it working great but with one remaining problem. There are bugs (that I filed a bug report for) where some of the options in the User Options File are ignored by SciTE. Two of these that I know of are window position and geometry. In order to change these settings it has to be done to the Global Options File. This is overwritten every time SciTE is updated.

The solution so far is to check to see if /usr/share/scite/SciTEGlobal.properties already exists in the file system. If it does, the new version of the file is saved as SciTEGlobal.properties.pacnew and the old version is copied into the new package. Is this a decent solution until the bug gets fixed upstream? If so, how do I get pacman to print and log the information? If not, would copying all of the settings from the old properties file to the new one make more sense?

--EDIT--

Post #6 has the (hopefully) final version.

Last edited by skottish (2008-09-30 06:17:35)

Offline

#2 2008-09-28 08:08:23

Mr.Cat
Member
Registered: 2008-09-27
Posts: 79

Re: SciTE CVS [FINISHED]

I suppose, this should be done not in PKGBUILD's build section but in post_install section in .install file. So, you should always install SciTEGlobal.properties.pacnew and then (in post_install) rename it to SciTEGlobal.properties if the later does not already exist.

Offline

#3 2008-09-28 14:06:07

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: SciTE CVS [FINISHED]

Mr.Cat wrote:

I suppose, this should be done not in PKGBUILD's build section but in post_install section in .install file. So, you should always install SciTEGlobal.properties.pacnew and then (in post_install) rename it to SciTEGlobal.properties if the later does not already exist.

The .install file! Of course! Those things exists for a reason after all. Thanks Mr.Cat.

Welcome to the forums by the way.

Offline

#4 2008-09-28 14:11:09

Mr.Cat
Member
Registered: 2008-09-27
Posts: 79

Re: SciTE CVS [FINISHED]

skottish wrote:

Welcome to the forums by the way.

Thnx.

Offline

#5 2008-09-28 15:14:54

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: SciTE CVS [FINISHED]

I was tired when I wrote the .pacnew stuff. The window position code is useless under Linux. If you can use GTK, you're within a WM. And, it seems that the geometry stuff is already fixed. It's been broken for so long that I didn't notice it wasn't anymore. I'll comment out the position stuff by default.

Offline

#6 2008-09-28 15:50:50

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: SciTE CVS [FINISHED]

All of my questions are now answered and no one has commented, so soon to be in AUR.

# Maintainer: skottish <STUFF>
# Contributor: Corrado 'bardo' Primier <STUFF>
# Contributor: Jochem Kossen <STUFF>
pkgname=scite-cvs
pkgver=20080929
pkgrel=1
pkgdesc="A generally useful editor with facilities for building and running programs"
arch=('i686' 'x86_64')
url="http://www.scintilla.org/SciTE.html"
license=('custom:scite')
depends=('gtk2' 'desktop-file-utils')
provides=('scite')
conflicts=('scite')
makedepends=('cvs')
install=scite.install
source=(SciTE.desktop)
md5sums=('48526532ef677982a4b156ae90f25b6f')

_builddir="scite-build"
_cvsroot=":pserver:anonymous@scintilla.cvs.sourceforge.net:/cvsroot/scintilla"
_cvsmod="scintilla"
_cvsmod_scite="scite"

build() {

  mkdir $startdir/src/$_builddir

  cd $startdir/src/

  msg "Connecting to scintilla.cvs.sourceforge.net CVS server....[Scintilla]"
  if [ -d $_cvsmod ]; then
    cd $_cvsmod
    cvs -z3 update -d
  else
    cvs -z3 -d $_cvsroot co -D $pkgver -f $_cvsmod
  fi

  cd $startdir/src/

  msg "Connecting to scintilla.cvs.sourceforge.net CVS server....[SciTE]"
  if [ -d $_cvsmod_scite ]; then
    cd $_cvsmod_scite
    cvs -z3 update -d
  else
    cvs -z3 -d $_cvsroot co -D $pkgver -f $_cvsmod_scite
  fi

  msg "CVS checkout done or server timeout"
  msg "Starting make..."

  cd $startdir/src/

  cp -r $_cvsmod $_builddir
  cp -r $_cvsmod_scite $_builddir

  find $_builddir -type f -exec sed -i 's/1.76/CVS/' {} \;

  cd $_builddir/$_cvsmod/gtk

  sed -i "s/#ARCHCXXFLAGS#/${CXXFLAGS}/g" makefile
  make || return 1
  install -Dm644 ../License.txt $startdir/pkg/usr/share/licenses/scintilla/LICENSE

  cd $startdir/src/$_builddir/$_cvsmod_scite/gtk

  sed -i "s/#ARCHCXXFLAGS#/${CXXFLAGS}/g" makefile
  make || return 1
  make DESTDIR=$startdir/pkg install

  install -Dm644 ../License.txt $startdir/pkg/usr/share/licenses/${pkgname}/LICENSE
  install -Dm644 $startdir/src/SciTE.desktop $startdir/pkg/usr/share/applications/
  ln -sf SciTE $startdir/pkg/usr/bin/scite

  cd $startdir/pkg/usr/share/scite/
  find SciTEGlobal.properties -type f -exec sed -i 's/position.left/#position.left/' {} \;
  find SciTEGlobal.properties -type f -exec sed -i 's/position.top/#position.top/' {} \;

  rm -rf $startdir/src/$_builddir
}

# vim:set ts=2 sw=2 et:

Last edited by skottish (2008-09-30 06:24:05)

Offline

#7 2008-12-09 09:38:39

B15HOP
Member
From: Australia
Registered: 2005-02-10
Posts: 138

Re: SciTE CVS [FINISHED]

How come ScitE is no longer listed in pacman?

pacman -Ss scite


"The ecological crisis is a moral issue."

Offline

#8 2008-12-09 10:28:33

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: SciTE CVS [FINISHED]

$ /usr/bin/pacman -Ss scite
community/scite 1.77-1 [0,90 MB]
    A generally useful editor with facilities for building and running programs

1000

Offline

#9 2008-12-09 11:02:11

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: SciTE CVS [FINISHED]

B15HOP, do you have the [community] repo enabled in yout pacman.conf?

Offline

#10 2008-12-10 12:53:30

B15HOP
Member
From: Australia
Registered: 2005-02-10
Posts: 138

Re: SciTE CVS [FINISHED]

oops had a # in front of community


"The ecological crisis is a moral issue."

Offline

Board footer

Powered by FluxBB