summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. A. López-Valencia2015-07-07 19:03:11 -0500
committerP. A. López-Valencia2015-07-07 19:03:11 -0500
commit2c4a7ca5430313c882013ca292fbd54f1ae86f09 (patch)
tree0f994de510b72e888fe75dcdd0d09bb1fe0c9a24
downloadaur-2c4a7ca5430313c882013ca292fbd54f1ae86f09.tar.gz
2.6-1
-rw-r--r--.SRCINFO29
-rw-r--r--.gitignore14
-rw-r--r--PKGBUILD66
-rw-r--r--env_FT2_SUBPIXEL_HINTING.diff18
-rw-r--r--freetype-2.2.1-enable-valid.patch20
-rw-r--r--freetype-2.5.1-enable-sph.patch13
-rw-r--r--freetype-2.5.1-enable-spr.patch13
-rw-r--r--libreoffice-uglyfix.patch21
8 files changed, 194 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ec24e5a44916
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = libreoffice-uglyfix-freetype2
+ pkgdesc = Installs freetype2 .so files in the LibreOffice directory to fix font ugliness
+ pkgver = 2.6
+ pkgrel = 1
+ url = http://freetype.sourceforge.net
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = zlib
+ depends = bzip2
+ depends = sh
+ depends = libpng
+ depends = libreoffice-common
+ options = !docs
+ source = http://downloads.sourceforge.net/sourceforge/freetype/freetype-2.6.tar.bz2
+ source = libreoffice-uglyfix.patch
+ source = freetype-2.2.1-enable-valid.patch
+ source = freetype-2.5.1-enable-spr.patch
+ source = freetype-2.5.1-enable-sph.patch
+ source = env_FT2_SUBPIXEL_HINTING.diff
+ sha256sums = 8469fb8124764f85029cc8247c31e132a2c5e51084ddce2a44ea32ee4ae8347e
+ sha256sums = 78932b6044c92367bf1eca07910b1c533ce6a0e721233feaeb27e6019adc3b81
+ sha256sums = 54c83a91b0b2ad7edad7df00a2c26a11ca18431a8e323db9471268a139c46f7e
+ sha256sums = 1c9a03e4cf07799deb7983b47b15f7557a8dbf9b8a7690910d017b6fd6804a23
+ sha256sums = ae89da5ce6d196abd5fe44dfbec16e731d7045c0cdc043a503ed3f120663bcfd
+ sha256sums = 4b0a220ea989da35fc40f58c20bed092a901ecc35f28c45b02da38c96c470855
+
+pkgname = libreoffice-uglyfix-freetype2
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..fa9b07747604
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+*~
+pkg/
+src/
+*.gz
+*.bz2
+*.xz
+*.lzo
+*.xz4
+*.tgz
+*.tbz
+*.txz
+*.tar
+*.jar
+*.zip
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..51b8f624a1ea
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,66 @@
+# See AUR interface to contact current maintainer.
+
+pkgname=libreoffice-uglyfix-freetype2
+pkgver=2.6
+pkgrel=1
+pkgdesc="Installs freetype2 .so files in the LibreOffice directory to fix font ugliness"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://freetype.sourceforge.net"
+depends=('zlib' 'bzip2' 'sh' 'libpng' 'libreoffice-common')
+options=(!docs)
+source=(
+ "http://downloads.sourceforge.net/sourceforge/freetype/freetype-${pkgver}.tar.bz2"
+ 'libreoffice-uglyfix.patch'
+ 'freetype-2.2.1-enable-valid.patch'
+ 'freetype-2.5.1-enable-spr.patch'
+ 'freetype-2.5.1-enable-sph.patch'
+ 'env_FT2_SUBPIXEL_HINTING.diff')
+sha256sums=('8469fb8124764f85029cc8247c31e132a2c5e51084ddce2a44ea32ee4ae8347e'
+ '78932b6044c92367bf1eca07910b1c533ce6a0e721233feaeb27e6019adc3b81'
+ '54c83a91b0b2ad7edad7df00a2c26a11ca18431a8e323db9471268a139c46f7e'
+ '1c9a03e4cf07799deb7983b47b15f7557a8dbf9b8a7690910d017b6fd6804a23'
+ 'ae89da5ce6d196abd5fe44dfbec16e731d7045c0cdc043a503ed3f120663bcfd'
+ '4b0a220ea989da35fc40f58c20bed092a901ecc35f28c45b02da38c96c470855')
+
+prepare()
+{
+ cd "$srcdir/freetype-$pkgver"
+
+ patch -Np1 -i "$srcdir/libreoffice-uglyfix.patch"
+
+ # Arch patches
+ #
+ # Enable font validity checking (bad fonts can crash your
+ # whole graphics stack)
+ #
+ patch -Np1 -i "$srcdir/freetype-2.2.1-enable-valid.patch"
+ #
+ # Enable subpixel rendering
+ #
+ patch -Np1 -i "$srcdir/freetype-2.5.1-enable-spr.patch"
+
+ # Disabled for now due to resistance
+ # Kept here for easier rebuilds via ABS
+ # https://bugs.archlinux.org/task/35274
+ #
+ # Enable subpixel hinting.
+ #
+ #patch -Np1 -i "$srcdir/freetype-2.5.1-enable-sph.patch"
+
+}
+
+build()
+{
+ cd "$srcdir/freetype-$pkgver"
+ ./configure --prefix=/usr --disable-static
+ make
+}
+
+package()
+{
+ cd "$srcdir/freetype-$pkgver"
+ install -d "$pkgdir"/usr/lib/libreoffice/program
+ cp -aP "$srcdir/freetype-$pkgver"/objs/.libs/libfreetype.so* \
+ "$pkgdir"/usr/lib/libreoffice/program
+}
diff --git a/env_FT2_SUBPIXEL_HINTING.diff b/env_FT2_SUBPIXEL_HINTING.diff
new file mode 100644
index 000000000000..3187ca0988cb
--- /dev/null
+++ b/env_FT2_SUBPIXEL_HINTING.diff
@@ -0,0 +1,18 @@
+diff -u -r freetype-2.5.4/src/truetype/ttobjs.c freetype-2.5.4-env/src/truetype/ttobjs.c
+--- freetype-2.5.4/src/truetype/ttobjs.c 2014-12-06 18:52:13.098214719 +0100
++++ freetype-2.5.4-env/src/truetype/ttobjs.c 2014-12-10 09:13:04.418886699 +0100
+@@ -1264,10 +1264,11 @@
+ return FT_THROW( Could_Not_Find_Context );
+
+ #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+- driver->interpreter_version = TT_INTERPRETER_VERSION_38;
+-#else
+- driver->interpreter_version = TT_INTERPRETER_VERSION_35;
++ if ( getenv( "FT2_SUBPIXEL_HINTING" ) )
++ driver->interpreter_version = TT_INTERPRETER_VERSION_38;
++ else
+ #endif
++ driver->interpreter_version = TT_INTERPRETER_VERSION_35;
+
+ #else /* !TT_USE_BYTECODE_INTERPRETER */
+
diff --git a/freetype-2.2.1-enable-valid.patch b/freetype-2.2.1-enable-valid.patch
new file mode 100644
index 000000000000..c78b6b70f6f5
--- /dev/null
+++ b/freetype-2.2.1-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/freetype-2.5.1-enable-sph.patch b/freetype-2.5.1-enable-sph.patch
new file mode 100644
index 000000000000..69f73b7e36dc
--- /dev/null
+++ b/freetype-2.5.1-enable-sph.patch
@@ -0,0 +1,13 @@
+diff --git i/include/config/ftoption.h w/include/config/ftoption.h
+index fe2ba15..1ab4226 100644
+--- i/include/config/ftoption.h
++++ w/include/config/ftoption.h
+@@ -591,7 +591,7 @@ FT_BEGIN_HEADER
+ /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
+ /* defined. */
+ /* */
+-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+
+ /*************************************************************************/
diff --git a/freetype-2.5.1-enable-spr.patch b/freetype-2.5.1-enable-spr.patch
new file mode 100644
index 000000000000..0d300a8dfcb0
--- /dev/null
+++ b/freetype-2.5.1-enable-spr.patch
@@ -0,0 +1,13 @@
+diff --git i/include/config/ftoption.h w/include/config/ftoption.h
+index fe2ba15..22ce1a3 100644
+--- i/include/config/ftoption.h
++++ w/include/config/ftoption.h
+@@ -92,7 +92,7 @@ FT_BEGIN_HEADER
+ /* This is done to allow FreeType clients to run unmodified, forcing */
+ /* them to display normal gray-level anti-aliased glyphs. */
+ /* */
+-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+
+ /*************************************************************************/
diff --git a/libreoffice-uglyfix.patch b/libreoffice-uglyfix.patch
new file mode 100644
index 000000000000..ae077d40aa7a
--- /dev/null
+++ b/libreoffice-uglyfix.patch
@@ -0,0 +1,21 @@
+diff -urN a/include/freetype.h b/include/freetype.h
+--- a/include/freetype.h 2013-06-19 00:21:31.000000000 -0500
++++ b/include/freetype.h 2013-08-25 16:23:40.602691844 -0500
+@@ -2568,7 +2568,7 @@
+ #define FT_LOAD_RENDER ( 1L << 2 )
+ #define FT_LOAD_NO_BITMAP ( 1L << 3 )
+ #define FT_LOAD_VERTICAL_LAYOUT ( 1L << 4 )
+-#define FT_LOAD_FORCE_AUTOHINT ( 1L << 5 )
++#define FT_LOAD_NO_AUTOHINT ( 1L << 5 )
+ #define FT_LOAD_CROP_BITMAP ( 1L << 6 )
+ #define FT_LOAD_PEDANTIC ( 1L << 7 )
+ #define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 )
+@@ -2576,7 +2576,7 @@
+ #define FT_LOAD_IGNORE_TRANSFORM ( 1L << 11 )
+ #define FT_LOAD_MONOCHROME ( 1L << 12 )
+ #define FT_LOAD_LINEAR_DESIGN ( 1L << 13 )
+-#define FT_LOAD_NO_AUTOHINT ( 1L << 15 )
++#define FT_LOAD_FORCE_AUTOHINT ( 1L << 15 )
+ /* Bits 16..19 are used by `FT_LOAD_TARGET_' */
+ #define FT_LOAD_COLOR ( 1L << 20 )
+