Start by opening a terminal.
Install required packages such as gcc and zlib-devel
su -c 'zypper install gcc zlib-devel patch'
Change to your Downloads folder
cd Downloads
We are going to download the freetype source rpm package from the openSUSE servers.
wget http://download.opensuse.org/source/distribution/12.1/repo/oss/suse/src/freetype2-2.4.7-1.2.src.rpm
At the time of writing 2.4.7-1.2 was the current available version.
Install the source package locally
rpm -ivh freetype2-2.4.7-1.2.src.rpm
A new folder will be created in your home directory called rpmbuild.
cd ~/rpmbuild/SPECS
We need to edit the freetype2.spec file so it compiles with the auto hinter enabled.
kwrite freetype2.spec
Scroll down to line 80 and change %define enable_subpixel_rendering 0 to %define enable_subpixel_rendering 1
Save and exit
It is now time to compile our modified freetype package, which should not take very long.
rpmbuild -bb freetype2.spec
Once the package has been successfully compiled, it will be located in the rpmbuild/RPMS/x86_64 or rpmbuild/RPMS/x86 folder.
To install your modified freetype package,
cd ~/rpmbuild/RPMS/$(arch)
su -c 'zypper install --force libfreetype6-2.4.7-1.2.$(arch).rpm'
You have now installed your modified freetype package, reboot your machine to see the difference.
Important Note:
Installing your modified freetype package will overwrite the existing freetype package that has the patented code disabled. However, should openSUSE install an update to freetype it will overwrite your modified freetype package.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.