diff --git a/cairo-ubuntu/PKGBUILD b/cairo-ubuntu/PKGBUILD new file mode 100644 index 000000000..30455ecea --- /dev/null +++ b/cairo-ubuntu/PKGBUILD @@ -0,0 +1,54 @@ +# +# Apps Packages for Chakra, part of chakra-project.org +# +# Maintainer: Adrián Chaves Fernández (Gallaecio) + +pkgname=cairo-ubuntu +_pkgname=cairo +pkgver=1.10.2 +_pkgver=$pkgver-2ubuntu2 +pkgrel=1 +pkgdesc="Cairo vector graphics library, with Ubuntu's LCD rendering patches." +arch=(i686 x86_64) +url="https://launchpad.net/ubuntu/natty/+source/cairo" +license=('LGPL' 'MPL') +depends=('fontconfig-ubuntu>=2.8.0' 'libpng>=1.4.0' 'libxft-ubuntu' 'libxrender' 'pixman>=0.16.6' 'xcb-util>=0.3.6') +provides=("$_pkgname=$pkgver") +conflicts=($_pkgname) +source=(http://cairographics.org/releases/$_pkgname-$pkgver.tar.gz + http://archive.ubuntu.com/ubuntu/pool/main/c/$_pkgname/${_pkgname}_$_pkgver.debian.tar.gz + cairo-respect-fontconfig.patch) +md5sums=('f101a9e88b783337b20b2e26dfd26d5f' + 'c28ce4e75bf13c2a10727b2af1385059' + '79f7c141c49f3d65ab308cc706d50914') + +build() { + cd $srcdir/$_pkgname-$pkgver + + # Debian patches. + for FILE in $(cat $srcdir/debian/patches/series) ; do + patch -Np1 -i $srcdir/debian/patches/$FILE + done + + # Own patch. + patch -Np1 -i $srcdir/cairo-respect-fontconfig.patch + + # Configure and build. + ./configure \ + --disable-static \ + --enable-tee \ + --localstatedir=/var \ + --prefix=/usr \ + --sysconfdir=/etc + make +} + +package() { + cd $srcdir/$_pkgname-$pkgver + + make DESTDIR=$pkgdir install + + # Documentation. + install -d $pkgdir/usr/share/doc/$_pkgname/ + install -m644 -t $pkgdir/usr/share/doc/$_pkgname/ NEWS README +} diff --git a/cairo-ubuntu/cairo-respect-fontconfig.patch b/cairo-ubuntu/cairo-respect-fontconfig.patch new file mode 100644 index 000000000..3bb8b8f83 --- /dev/null +++ b/cairo-ubuntu/cairo-respect-fontconfig.patch @@ -0,0 +1,21 @@ +diff -Nur cairo-1.8.6.orig/src/cairo-ft-font.c cairo-1.8.6/src/cairo-ft-font.c +--- cairo-1.8.6.orig/src/cairo-ft-font.c 2008-12-12 20:48:04.000000000 +0800 ++++ cairo-1.8.6/src/cairo-ft-font.c 2009-02-20 14:56:57.000000000 +0800 +@@ -1448,8 +1448,15 @@ + if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT) + options->base.hint_style = other->base.hint_style; + +- if (other->base.hint_style == CAIRO_HINT_STYLE_NONE) +- options->base.hint_style = CAIRO_HINT_STYLE_NONE; ++ //if (other->base.hint_style == CAIRO_HINT_STYLE_NONE) ++ //options->base.hint_style = CAIRO_HINT_STYLE_NONE; ++ ++ if (other->base.hint_style == CAIRO_HINT_STYLE_NONE || ++ other->base.hint_style == CAIRO_HINT_STYLE_SLIGHT || ++ other->base.hint_style == CAIRO_HINT_STYLE_MEDIUM || ++ other->base.hint_style == CAIRO_HINT_STYLE_FULL) { ++ options->base.hint_style = other->base.hint_style; ++ } + + if (options->base.antialias == CAIRO_ANTIALIAS_NONE) { + if (options->base.hint_style == CAIRO_HINT_STYLE_NONE) diff --git a/fontconfig-ubuntu/PKGBUILD b/fontconfig-ubuntu/PKGBUILD new file mode 100644 index 000000000..c217bbee7 --- /dev/null +++ b/fontconfig-ubuntu/PKGBUILD @@ -0,0 +1,63 @@ +# +# Apps Packages for Chakra, part of chakra-project.org +# +# Maintainer: Adrián Chaves Fernández (Gallaecio) +# Contributor: Paul Bredbury +# Contributor: Biru Ionut +# Contributor: Andrea Fagiani + +pkgname=fontconfig-ubuntu +_pkgname=fontconfig +pkgver=2.8.0 +_pkgver=$pkgver-2ubuntu1 +pkgrel=1 +pkgdesc="A library for configuring and customizing font access, with Ubuntu's LCD rendering patches." +arch=('i686' 'x86_64') +url="http://packages.ubuntu.com/lucid/fontconfig" +license=('MIT') +depends=('expat>=2.0.1' 'freetype2-ubuntu>=2.3.11') +conflicts=($_pkgname) +provides=("$_pkgname=$pkgver") +options=('!libtool') +install=fontconfig.install +source=(http://archive.ubuntu.com/ubuntu/pool/main/f/$_pkgname/${_pkgname}_$pkgver.orig.tar.gz + http://archive.ubuntu.com/ubuntu/pool/main/f/$_pkgname/${_pkgname}_$_pkgver.diff.gz) +md5sums=('77e15a92006ddc2adbb06f840d591c0e' + 'ea8666fd1906bf101b9cfc42bf325f94') + +build() { + cd $srcdir/$_pkgname-$pkgver + + # Patches. + patch -Np1 -i $srcdir/${_pkgname}_$_pkgver.diff || return 1 + for FILE in $(cat debian/patches/series) ; do + patch -Np1 -i debian/patches/$FILE || return 1 + done + + # Enable Position Independent Code for prelinking + export CFLAGS="${CFLAGS} -fPIC" + + # Configure and build. + ./configure \ + --localstatedir=/var \ + --prefix=/usr \ + --sysconfdir=/etc + make +} + +package() { + cd $srcdir/$_pkgname-$pkgver + + # Installation. + make DESTDIR=$pkgdir install + + # Remove configuration files. + rm -f ${pkgdir}/etc/fonts/conf.d/*.conf + + # License. + install -Dm0644 COPYING $pkgdir/usr/share/licenses/$pkgname/license.txt + + # Documentation. + install -Dm0644 debian/changelog $pkgdir/usr/share/doc/$pkgname/ChangeLog +} + diff --git a/fontconfig-ubuntu/fontconfig.install b/fontconfig-ubuntu/fontconfig.install new file mode 100644 index 000000000..4a875af19 --- /dev/null +++ b/fontconfig-ubuntu/fontconfig.install @@ -0,0 +1,114 @@ +configs=('10-antialias.conf' + '10-hinting.conf' + '10-hinting-slight.conf' + '11-lcd-filter-lcddefault.conf' + '20-fix-globaladvance.conf' + '20-unhint-small-vera.conf' + '25-ttf-arphic-uming-render.conf' + '30-cjk-aliases.conf' + '30-defoma.conf' + '30-metric-aliases.conf' + '30-urw-aliases.conf' + '35-ttf-arphic-uming-aliases.conf' + '40-nonlatin.conf' + '41-ttf-arphic-uming.conf' + '45-latin.conf' + '49-sansserif.conf' + '50-user.conf' + '51-local.conf' + '53-monospace-lcd-filter.conf' + '60-latin.conf' + '64-ttf-arphic-uming.conf' + '64-ttf-thai-tlwg.conf' + '65-fonts-persian.conf' + '65-nonlatin.conf' + '69-unifont.conf' + '80-delicious.conf' + '90-synthetic.conf' + '90-ttf-arphic-uming-embolden.conf' + '90-ttf-thai-tlwg-synthetic.conf') + +post_install() { + echo -n "updating font cache... " + /sbin/ldconfig -r . + pushd /etc/fonts/conf.d > /dev/null + for config in "${configs[@]}"; do + ln -sf ../conf.avail/${config} . + done + popd > /dev/null + /usr/bin/fc-cache -f + echo "done." +} + +post_upgrade() { + rm -f /etc/fonts/conf.d/10-bitmaps.conf + cat << _EOF + +===> Important Fontconfig configuration change <=== + + The way fontconfig is configured has been changed. + Configuration is done via /etc/fonts/conf.avail and conf.d. + Read /etc/fonts/conf.avail/README for more information. + + Configuration via /etc/fonts/local.conf is still possible, + but is no longer recommended for options available in conf.avail. + +_EOF + + if [ `vercmp 2.4.1-1 $2` -gt 0 ]; then + # Upgrade from old version, place all symlinks. pre-symlink package version + echo -n "Linking configuration files... " + pushd /etc/fonts/conf.d > /dev/null + for config in "${configs[@]}"; do + ln -sf ../conf.avail/${config} . + done + popd > /dev/null + echo "done." + fi + + if [ `vercmp 2.6.0-6 $2` -gt 0 ]; then + # pre-2.6.0 versions have missing config + echo -n "Adding missing configuration files... " + pushd /etc/fonts/conf.d > /dev/null + ln -sf ../conf.avail/30-metric-aliases.conf . + ln -sf ../conf.avail/40-nonlatin.conf . + ln -sf ../conf.avail/45-latin.conf . + popd > /dev/null + echo "done." + fi + + # Remove dead links + echo -n "Removing outdated configuration files... " + for config in /etc/fonts/conf.d/*; do + if [ ! -f ${config} ]; then + rm -f ${config} + fi + done + echo "done." + + echo -n "updating font cache... " + /usr/bin/fc-cache -f + echo "done." +} + +pre_upgrade() { + # Link new config files not present on system yet + echo -n "Symlinking new configuration files... " + pushd /etc/fonts/conf.d > /dev/null + for config in "${configs[@]}"; do + if [ ! -f ../conf.avail/${config} ]; then + ln -sf ../conf.avail/${config} . + fi + done + popd > /dev/null + echo "done." +} + +post_remove() { + pushd /etc/fonts/conf.d > /dev/null + for config in "${configs[@]}"; do + rm -f ${config} + done + popd > /dev/null +} + diff --git a/freetype2-ubuntu/PKGBUILD b/freetype2-ubuntu/PKGBUILD new file mode 100644 index 000000000..1e62c23e3 --- /dev/null +++ b/freetype2-ubuntu/PKGBUILD @@ -0,0 +1,57 @@ +# +# Apps Packages for Chakra, part of chakra-project.org +# +# Maintainer: Adrián Chaves Fernández (Gallaecio) + +pkgname=freetype2-ubuntu +_pkgname=freetype +_pkgname2=freetype2 +pkgver=2.4.6 +_pkgver=2.4.4-2 +pkgrel=1 +pkgdesc="TrueType font rendering library, with Ubuntu's LCD rendering patches." +arch=('i686' 'x86_64') +url="https://launchpad.net/ubuntu/oneiric/+source/freetype" +license=('GPL') +depends=('zlib') +conflicts=($_pkgname2) +provides=("$_pkgname2=$pkgver") +options=('!libtool') +source=(http://downloads.sourceforge.net/sourceforge/$_pkgname/$_pkgname-$pkgver.tar.bz2 + https://launchpad.net/ubuntu/oneiric/+source/$_pkgname/$_pkgver/+files/${_pkgname}_$_pkgver.diff.gz + apple-offset.patch + enable-valid.patch) +md5sums=('5e6510613f612809d2d7862592b92ab7' + '8a170e472c2b1d60dff0987722a290d3' + '1c964f90ae90aa391af574ceb0814cda' + '214119610444c9b02766ccee5e220680') + +build() { + cd $srcdir/$_pkgname-$pkgver + + # Patch from Ubuntu. + patch -Np1 -i $srcdir/${_pkgname}_$_pkgver.diff + + # Patches adjustments. + sed -i -e "s#\ssrc# freetype-$pkgver/src#g" debian/patches-freetype/freetype-2.1.7-backwards.compat.patch + sed -i -e "s/-p[0-9]\|.*otvalid\.patch//g" debian/patches-freetype/series + + # Patches. + for _f in $(cat debian/patches-freetype/series) ; do + patch -Np1 -i debian/patches-freetype/$_f + done + + # Patches from Arch Linux. + patch -Np1 -i $srcdir/enable-valid.patch + + # Configure and build. + ./configure \ + --prefix=/usr + make +} + +package() { + cd $srcdir/$_pkgname-$pkgver + + make DESTDIR=$pkgdir install +} diff --git a/freetype2-ubuntu/apple-offset.patch b/freetype2-ubuntu/apple-offset.patch new file mode 100644 index 000000000..f6a986e9f --- /dev/null +++ b/freetype2-ubuntu/apple-offset.patch @@ -0,0 +1,12 @@ +diff -rupN freetype-2.3.11.orig/include/freetype/config/ftoption.h freetype-2.3.11/include/freetype/config/ftoption.h +--- freetype-2.3.11.orig/include/freetype/config/ftoption.h 2010-02-05 10:53:35.000000000 +0000 ++++ freetype-2.3.11/include/freetype/config/ftoption.h 2010-02-05 10:54:29.000000000 +0000 +@@ -574,7 +574,7 @@ FT_BEGIN_HEADER + /* http://partners.adobe.com/asn/developer/opentype/glyf.html */ + /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ + /* */ +-#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED ++#define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED + + + /*************************************************************************/ diff --git a/freetype2-ubuntu/enable-valid.patch b/freetype2-ubuntu/enable-valid.patch new file mode 100644 index 000000000..c78b6b70f --- /dev/null +++ b/freetype2-ubuntu/enable-valid.patch @@ -0,0 +1,20 @@ +--- freetype-2.2.1/modules.cfg.orig 2006-07-07 21:01:09.000000000 -0400 ++++ freetype-2.2.1/modules.cfg 2006-07-07 21:01:54.000000000 -0400 +@@ -110,7 +110,7 @@ + AUX_MODULES += cache + + # TrueType GX/AAT table validation. Needs ftgxval.c below. +-# AUX_MODULES += gxvalid ++AUX_MODULES += gxvalid + + # Support for streams compressed with gzip (files with suffix .gz). + # +@@ -124,7 +124,7 @@ + + # OpenType table validation. Needs ftotval.c below. + # +-# AUX_MODULES += otvalid ++AUX_MODULES += otvalid + + # Auxiliary PostScript driver component to share common code. + # diff --git a/libxft-ubuntu/PKGBUILD b/libxft-ubuntu/PKGBUILD new file mode 100644 index 000000000..8538f65a6 --- /dev/null +++ b/libxft-ubuntu/PKGBUILD @@ -0,0 +1,52 @@ +# +# Apps Packages for Chakra, part of chakra-project.org +# +# Maintainer: Adrián Chaves Fernández (Gallaecio) +# Contributor: Paul Bredbury +# Contributor: Biru Ionut +# Contributor: Andrea Fagiani + +pkgname=libxft-ubuntu +_pkgname=libxft +_pkgname2=libXft +_pkgname3=xft +pkgver=2.2.0 +_pkgver=2.1.14-2ubuntu1 +pkgrel=1 +pkgdesc="FreeType-based font drawing library for X, with Ubuntu's LCD rendering patches." +arch=('i686' 'x86_64') +url="https://launchpad.net/ubuntu/natty/+source/xft" +license=('GPL') +depends=('fontconfig-ubuntu>=2.6.0' 'freetype2-ubuntu' 'libxrender' 'sh') +conflicts=($_pkgname) +provides=("$_pkgname=$pkgver") +source=(http://xorg.freedesktop.org/releases/individual/lib/$_pkgname2-$pkgver.tar.bz2 + http://archive.ubuntu.com/ubuntu/pool/main/x/xft/${_pkgname3}_$_pkgver.diff.gz) +md5sums=('cce3c327258116493b753f157e0360c7' + 'b965b9575673ebed2a86992b4096731d') + +build() { + cd $srcdir/$_pkgname2-$pkgver + + # Patches. + patch -Np1 -i $srcdir/${_pkgname3}_$_pkgver.diff + for FILE in $(cat debian/patches/series) ; do + [[ $FILE = "001_no_export_freetype.diff" ]] && continue + patch -Np1 -i debian/patches/$FILE + done + + # Configure and build. + ./configure \ + --disable-static \ + --prefix=/usr \ + --sysconfdir=/etc + make +} + +package() { + cd $srcdir/$_pkgname2-$pkgver + make DESTDIR=$pkgdir install + + # License. + install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/license.txt +}