Tweaking lesstif to support Xft and antialiased font rendering.

This commit is contained in:
Daniele 2012-01-02 15:53:37 +00:00
parent ac3eaa48ea
commit 24a5024340

View File

@ -6,39 +6,78 @@
pkgname=lesstif
pkgver=0.95.2
pkgrel=1
pkgdesc="LGPL'd re-implementation of Motif"
pkgrel=2
pkgdesc="LGPL'd re-implementation of Motif."
arch=('i686' 'x86_64')
url="http://www.lesstif.org/"
license=('LGPL' 'MIT')
depends=('freetype2' 'libxt' 'libxp')
depends=('freetype2' 'libxt' 'libxp' 'libxft' 'libxrender' 'fontconfig' 'freetype2')
options=('!libtool')
source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2 \
LICENSE 040_fedora_XxxxProperty-64bit.diff)
md5sums=('754187dbac09fcf5d18296437e72a32f' 'b1f320192a9154f72d83e9d3d5a25a2f'\
source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
'LICENSE'
'040_fedora_XxxxProperty-64bit.diff')
md5sums=('754187dbac09fcf5d18296437e72a32f'
'b1f320192a9154f72d83e9d3d5a25a2f'
'30e2c0babc84696af089d55cb9cb2908')
sha1sums=('b894e544d529a235a6a665d48ca94a465f44a4e5' '5d7f38555417cb617d7d5b7e41a93af8430dc638'\
'85412aba25058110db8da99da4a2c5ab44330467')
sha1sums=('b894e544d529a235a6a665d48ca94a465f44a4e5'
'5d7f38555417cb617d7d5b7e41a93af8430dc638'
'85412aba25058110db8da99da4a2c5ab44330467')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -p1 < ../040_fedora_XxxxProperty-64bit.diff || return 1
./configure --prefix=/usr --mandir=/usr/share/man --docdir=/usr/share/doc \
--enable-production --enable-nonstandard-conversions --enable-editres \
--with-xdnd --enable-build-21 --disable-debug --enable-static || return 1
# fix linkage against already installed version
perl -pi -e 's/^(hardcode_into_libs)=.*/$1=no/' libtool || return 1
patch -Np1 -i "${srcdir}/040_fedora_XxxxProperty-64bit.diff"
make || return 1
# the following redefinition of CFLAGS and LIBS is because the configuration
# script relies on a 'fontconfig-config' executable which does not exist
# anymore, as it has been superseded by pkg-config.
# fix linkage against already installed version
for f in `find . -name \*.la -type f` ; do
perl -pi -e 's/^(relink_command=.*)/# $1/' $f || return 1
CFLAGS="${CFLAGS} -I/usr/include/fontconfig"
export CFLAGS
LIBS="${LIBS} -L/usr/lib -lfontconfig"
export LIBS
# the -x-* switches below are needed to correctly find Xrender and friends...
# reference: http://www.linuxfromscratch.org/pipermail/blfs-dev/2009-January/019225.html
./configure --prefix=/usr \
--mandir=/usr/share/man \
--docdir=/usr/share/doc \
--with-xdnd \
--enable-production \
--enable-nonstandard-conversions \
--enable-editres \
--enable-build-21 \
--enable-static \
--disable-debug \
--x-includes=/usr/include \
--x-libraries=/usr/lib
# fix linkage against already installed version
perl -pi -e 's/^(hardcode_into_libs)=.*/$1=no/' libtool
make
# fix linkage against already installed version
for f in $(find . -name \*.la -type f); do
perl -pi -e 's/^(relink_command=.*)/# $1/' "${f}"
done
make -C lib/Mrm-2.1 || return 1
make -C lib/Mrm-2.1 DESTDIR="${pkgdir}" install || return 1
make appdir=/usr/share/X11/app-defaults rootdir=/usr/share/LessTif DESTDIR="${pkgdir}" install || return 1
install -D -m644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" || return 1
make -C lib/Mrm-2.1
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
# Commented out, since it fails:
#
# make -C lib/Mrm-2.1 DESTDIR="${pkgdir}" install
#
# It should be covered by the following "make" command anyway...
make appdir=/usr/share/X11/app-defaults rootdir=/usr/share/LessTif DESTDIR="${pkgdir}" install
install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
# vim:set ts=2 sw=2 et: