You are not logged in.

#1 2005-08-18 03:23:33

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

HOW-TO: Improving the interface of Xaw3d apps (emacs,xdvi)

This mini HOW-TO is to a) improve the appearence and b) to give a more intuitive feel to apps using the Athena Widgets, i.e. emacs, xdvi and xemacs. Enjoy! big_smile

Emacs: You can use the neXtaw widgets instead of the xaw3d widgets.

# $Id: PKGBUILD,v 1.1 2005/07/09 20:04:48 judd Exp $
# Maintainer: judd <jvinet@zeroflux.org>
# Contributor: Renchi Raju <renchi@green.tam.uiuc.edu>
pkgname=emacs
pkgver=21.4
pkgrel=3
pkgdesc="The Emacs Editor"
url="http://www.gnu.org/software/emacs/emacs.html"
depends=('x-server' 'ncurses' 'zlib' 'libpng' 'libtiff' 
         'libjpeg' 'libungif' 'nextaw')
source=(ftp://ftp.gnu.org/gnu/emacs/$pkgname-21.4a.tar.gz 
        emacs-21.4-xorg.patch)
md5sums=('8f9d97cbd126121bd5d97e5e31168a87' 'ca07e58ea6c9ad668d15d2e3650f6628')

build() {
  cd $startdir/src/$pkgname-$pkgver
  # fix AltGr key behaviour when compiling against xorg
  patch -p1 -i ../emacs-21.4-xorg.patch || return 1
  ./configure --prefix=/usr 
        
  # we don't want to use /usr/libexec
  sed -i "s|"/usr/libexec/emacs.*$|"/usr/lib/emacs/$pkgver"|g" src/epaths.h
  mv newepaths.h src/epaths.h

  make libexecdir=/usr/lib archlibdir=/usr/lib/emacs/${pkgver} LIBW=-lneXtaw || return 1
  make prefix=$startdir/pkg/usr libexecdir=$startdir/pkg/usr/lib 
    archlibdir=$startdir/pkg/usr/lib/emacs/${pkgver} install
  # fix all the 777 perms on directories
  find $startdir/pkg/usr/share/emacs/$pkgver -type d -exec chmod 755 {} ;
}

Xdvi: For xdvi you have the choice of neXtaw or motif (my favorite wink ). Here's a PKGBUILD to use the motif widgets for xdvi. To use neXtaw, use --with-xdvi-x-toolkit=neXtaw

# $Id: PKGBUILD,v 1.15 2005/05/20 17:52:22 jgc Exp $
# Contributor: John Proctor <jproctor@prium.net>
# Maintainer: Jason Chu <jason@archlinux.org>

pkgname=tetex
pkgver=3.0
pkgrel=1
pkgdesc="TeX typesetting program"
depends=('x-server' 'libpng')
conflicts=(tetex-texmf)
url='http://www.tug.org/teTeX/'
source=(ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/3.0/distrib/tetex-src.tar.gz 
        ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/3.0/distrib/tetex-texmf.tar.gz)
md5sums=('944a4641e79e61043fdaf8f38ecbb4b3' '11aa15c8d3e28ee7815e0d5fcdf43fd4')
install=tetex.install
        
build() {
  mkdir -p $startdir/pkg/usr/share/texmf-dist
  cd $startdir/src
  mv `/bin/ls | grep -v tetex` ../pkg/usr/share/texmf-dist
  cd $startdir/src/$pkgname-src-$pkgver
  ./configure --prefix=/usr --datadir=$startdir/pkg/usr/share 
        --disable-multiplatform --without-texinfo --without-dialog 
        --with-system-zlib --with-system-pnglib --with-system-ncurses 
        --with-xdvi-x-toolkit=motif
  make all || return 1
  make prefix=$startdir/pkg/usr texmf=$startdir/pkg/usr/share/texmf install
  rm -rf $startdir/pkg/usr/share/texmf-dist/doc  
}

Xemacs: For xemacs, it is possible to use a gtk GUI. However, it is still EXPERIMENTAL.  Sometime, the scrollbar and menu would freeze but clicking on a button would unfreeze them :? Anyway, here's the PKGBUILD:

# $Id: PKGBUILD,v 1.9 2005/07/05 22:23:12 juergen Exp $
# Maintainer: juergen <juergen@archlinux.org>

pkgname=xemacs
pkgver=21.5.21
pkgrel=1
pkgdesc="X Windows version of the Emacs editor"
makedepends=('libungif')
depends=('x-server' 'db' 'libpng' 'libtiff' 'libjpeg' 'gpm' 'bash' 'gtk')
source=(http://ftp.us.xemacs.org/ftp/pub/xemacs/xemacs-21.5/$pkgname-$pkgver.tar.gz)
md5sums=('5941238fe8eda3a120bc5735cc50a94d') 
url="http://www.xemacs.org/"
        
build() {
  cd $startdir/src/${pkgname}-${pkgver}
  ./configure --build=$CHOST --prefix=/usr --with-dynamic 
      --with-gtk --without-postgresql 
      --enable-database=berkdb --without-ldap 
      --with-jpeg --with-png --with-tiff 
      --with-ncurses --with-pop --with-xfs --disable-sound  || return 1

  make || return 1
  make autoloads
  
  make prefix="$startdir/pkg/usr" install gzip-el

  rm $startdir/pkg/usr/bin/{b2m,ctags,etags,rcs-checkin}
  rm $startdir/pkg/usr/man/man1/{ctags.1,etags.1}

  # correct permissions
  chown -R root.root $startdir/pkg
}

Offline

Board footer

Powered by FluxBB