Package init

This commit is contained in:
overweight 2019-09-30 10:39:04 -04:00
commit d3ba6340c7
11 changed files with 386 additions and 0 deletions

View File

@ -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 @@
# TrueType GX/AAT table validation. Needs `ftgxval.c' below.
#
# No FT_CONFIG_OPTION_PIC support.
-# 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.
#
# No FT_CONFIG_OPTION_PIC support.
-# AUX_MODULES += otvalid
+AUX_MODULES += otvalid
# Auxiliary PostScript driver component to share common code.
#

View File

@ -0,0 +1,11 @@
--- freetype-2.3.0/include/freetype/config/ftoption.h.spf 2007-01-18 14:27:34.000000000 -0500
+++ freetype-2.3.0/include/freetype/config/ftoption.h 2007-01-18 14:27:48.000000000 -0500
@@ -92,7 +92,7 @@
/* rendering technology that produces excellent output without LCD */
/* filtering. */
/* */
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
/*************************************************************************/

View File

@ -0,0 +1,17 @@
--- ft2demos-2.5.2/Makefile
+++ ft2demos-2.5.2/Makefile
@@ -296,10 +296,10 @@ else
# The following programs are not compiled automatically; either comment
# out the affected line or use the program name as a Makefile target.
#
- # EXES += ftchkwd
- # EXES += ftmemchk
- # EXES += ftpatchk
- # EXES += fttimer
+ EXES += ftchkwd
+ EXES += ftmemchk
+ EXES += ftpatchk
+ EXES += fttimer
# EXES += testname
exes: $(EXES:%=$(BIN_DIR_2)/%$E)

View File

@ -0,0 +1,11 @@
--- freetype-2.8/builds/unix/freetype-config.in.orig 2017-03-30 12:20:23.000000001 +0200
+++ freetype-2.8/builds/unix/freetype-config.in 2017-05-16 13:25:39.223041128 +0200
@@ -205,7 +205,7 @@ if test "$echo_libs" = "yes" ; then
fi
if test "$echo_libtool" = "yes" ; then
- echo ${SYSROOT}$libdir/libfreetype.la
+ echo ""
fi
# EOF

View File

@ -0,0 +1,65 @@
--- freetype-2.9/builds/unix/freetype-config.in
+++ freetype-2.9/builds/unix/freetype-config.in
@@ -13,45 +13,25 @@ LC_ALL=C
export LC_ALL
-# if `pkg-config' is available, use values from `freetype2.pc'
-%PKG_CONFIG% --atleast-pkgconfig-version 0.24 >/dev/null 2>&1
-if test $? -eq 0 ; then
- # note that option `--variable' is not affected by the
- # PKG_CONFIG_SYSROOT_DIR environment variable
- if test "x$SYSROOT" != "x" ; then
- PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
- export PKG_CONFIG_SYSROOT_DIR
- fi
-
- prefix=`%PKG_CONFIG% --variable prefix freetype2`
- exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2`
-
- includedir=`%PKG_CONFIG% --variable includedir freetype2`
- libdir=`%PKG_CONFIG% --variable libdir freetype2`
-
- version=`%PKG_CONFIG% --modversion freetype2`
-
- cflags=`%PKG_CONFIG% --cflags freetype2`
- dynamic_libs=`%PKG_CONFIG% --libs freetype2`
- static_libs=`%PKG_CONFIG% --static --libs freetype2`
-else
- prefix="%prefix%"
- exec_prefix="%exec_prefix%"
-
- includedir="%includedir%"
- libdir="%libdir%"
-
- version=%ft_version%
-
- cflags="-I${SYSROOT}$includedir/freetype2"
- dynamic_libs="-lfreetype"
- static_libs="%LIBSSTATIC_CONFIG%"
- if test "${SYSROOT}$libdir" != "/usr/lib" &&
- test "${SYSROOT}$libdir" != "/usr/lib64" ; then
- libs_L="-L${SYSROOT}$libdir"
- fi
+# note that option `--variable' is not affected by the
+# PKG_CONFIG_SYSROOT_DIR environment variable
+if test "x$SYSROOT" != "x" ; then
+ PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
+ export PKG_CONFIG_SYSROOT_DIR
fi
+prefix=`%PKG_CONFIG% --variable prefix freetype2`
+exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2`
+
+includedir=`%PKG_CONFIG% --variable includedir freetype2`
+libdir=`%PKG_CONFIG% --variable libdir freetype2`
+
+version=`%PKG_CONFIG% --modversion freetype2`
+
+cflags=`%PKG_CONFIG% --cflags freetype2`
+dynamic_libs=`%PKG_CONFIG% --libs freetype2`
+static_libs=`%PKG_CONFIG% --static --libs freetype2`
+
orig_prefix=$prefix
orig_exec_prefix=$exec_prefix

101
freetype-2.9-ftsmooth.patch Normal file
View File

@ -0,0 +1,101 @@
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -232,39 +232,13 @@
FT_UInt i, j;
unsigned int height = bitmap->rows;
- unsigned int width = bitmap->width;
+ unsigned int width = bitmap->width / 3;
int pitch = bitmap->pitch;
-
- /* Render 3 separate monochrome bitmaps, shifting the outline */
- /* by 1/3 pixel. */
- width /= 3;
-
- bitmap->buffer += width;
-
- error = render->raster_render( render->raster, &params );
- if ( error )
- goto Exit;
-
- FT_Outline_Translate( outline, -21, 0 );
- x_shift -= 21;
- bitmap->buffer += width;
-
error = render->raster_render( render->raster, &params );
if ( error )
goto Exit;
- FT_Outline_Translate( outline, 42, 0 );
- x_shift += 42;
- bitmap->buffer -= 2 * width;
-
- error = render->raster_render( render->raster, &params );
- if ( error )
- goto Exit;
-
- /* XXX: Rearrange the bytes according to FT_PIXEL_MODE_LCD. */
- /* XXX: It is more efficient to render every third byte above. */
-
if ( FT_ALLOC( temp, (FT_ULong)pitch ) )
goto Exit;
@@ -272,11 +246,7 @@
{
line = bitmap->buffer + i * (FT_ULong)pitch;
for ( j = 0; j < width; j++ )
- {
- temp[3 * j ] = line[j];
- temp[3 * j + 1] = line[j + width];
- temp[3 * j + 2] = line[j + width + width];
- }
+ temp[3 * j] = temp[3 * j + 1] = temp[3 * j + 2] = line[j];
FT_MEM_COPY( line, temp, pitch );
}
@@ -284,35 +254,23 @@
}
else if ( vmul ) /* lcd_v */
{
- int pitch = bitmap->pitch;
-
+ FT_Byte* line;
+ FT_UInt i;
+ int original_pitch = bitmap->pitch;
- /* Render 3 separate monochrome bitmaps, shifting the outline */
- /* by 1/3 pixel. Triple the pitch to render on each third row. */
bitmap->pitch *= 3;
bitmap->rows /= 3;
- bitmap->buffer += pitch;
-
- error = render->raster_render( render->raster, &params );
- if ( error )
- goto Exit;
-
- FT_Outline_Translate( outline, 0, 21 );
- y_shift += 21;
- bitmap->buffer += pitch;
-
error = render->raster_render( render->raster, &params );
if ( error )
goto Exit;
- FT_Outline_Translate( outline, 0, -42 );
- y_shift -= 42;
- bitmap->buffer -= 2 * pitch;
-
- error = render->raster_render( render->raster, &params );
- if ( error )
- goto Exit;
+ for ( i = 0; i < bitmap->rows; i++ )
+ {
+ line = bitmap->buffer + i * bitmap->pitch;
+ FT_MEM_COPY( line + original_pitch, line, bitmap->width );
+ FT_MEM_COPY( line + 2 * original_pitch, line, bitmap->width );
+ }
bitmap->pitch /= 3;
bitmap->rows *= 3;

BIN
freetype-2.9.1.tar.bz2 Normal file

Binary file not shown.

BIN
freetype-doc-2.9.1.tar.bz2 Normal file

Binary file not shown.

147
freetype.spec Normal file
View File

@ -0,0 +1,147 @@
%{!?_with_subpixel_rendering: %{!?_without_subpixel_rendering: %define _without_subpixel_rendering --without-subpixel_rendering}}
%{!?with_xfree86:%define with_xfree86 1}
Name: freetype
Version: 2.9.1
Release: 3
Summary: FreeType is a freely available software library to render fonts
License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement
URL: http://www.freetype.org
Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.bz2
Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.bz2
Source2: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.bz2
#ftconfig.h from fedora project
Source3: ftconfig.h
#PATCH-FIX-https://bugzilla.redhat.com/
Patch0: freetype-2.3.0-enable-spr.patch
#PATCH-FIX-https://bugzilla.redhat.com/ Enable otvalid and gxvalid modules patch from fedora project
Patch1: freetype-2.2.1-enable-valid.patch
#PATCH-FIX-https://bugzilla.redhat.com/ Enable additional demos patch from fedora project
Patch2: freetype-2.5.2-more-demos.patch
#PATCH-FIX-https://bugzilla.redhat.com/
Patch3: freetype-2.6.5-libtool.patch
#PATCH-FIX-https://bugzilla.redhat.com/
Patch4: freetype-2.8-multilib.patch
#PATCH-FIX-https://bugzilla.redhat.com/
Patch5: freetype-2.9-ftsmooth.patch
BuildRequires: gcc libX11-devel libpng-devel zlib-devel bzip2-devel
Provides: %{name}-bytecode %{name}-demos
%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}
Provides: %{name}-subpixel
%endif
Obsoletes: %{name}-demos
%description
FreeType is written in C, designed to be small,efficient, highly customizable, and portable while capable of producing high-quality
output (glyph images) of most vector and bitmap font formats
%package devel
Summary: FreeType development libraries and header files
Requires: %{name} = %{version}-%{release} pkgconf
%description devel
The freetype-devel package includes the static libraries and header files
for the FreeType font rendering engine.Install freetype-devel if you want to develop programs which will use
FreeType.
%package help
Summary: Documents for freetype
Buildarch: noarch
%description help
Man pages and other related for freetype documents.
%prep
%setup -q -b 1 -a 2
%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}
%patch0 -p1 -b .enable-spr
%endif
%patch1 -p1 -b .enable-valid
pushd ft2demos-%{version}
%patch2 -p1 -b .more-demos
popd
%patch3 -p1 -b .libtool
%patch4 -p1 -b .multilib
%patch5 -p1 -b .ftsmooth
%build
%configure --disable-static --with-zlib=yes --with-bzip2=yes --with-png=yes --enable-freetype-config --with-harfbuzz=no
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' builds/unix/libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' builds/unix/libtool
%make_build
%if %{with_xfree86}
cd ft2demos-%{version}
make TOP_DIR=".."
%endif
%install
%make_install gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
{
for ftdemo in ftbench ftchkwd ftmemchk ftpatchk fttimer ftdump ftlint ftmemchk ftvalid ; do
builds/unix/libtool --mode=install install -m 755 ft2demos-%{version}/bin/$ftdemo $RPM_BUILD_ROOT/%{_bindir}
done
}
%if %{with_xfree86}
{
for ftdemo in ftdiff ftgamma ftgrid ftmulti ftstring fttimer ftview ; do
builds/unix/libtool --mode=install install -m 755 ft2demos-%{version}/bin/$ftdemo $RPM_BUILD_ROOT/%{_bindir}
done
}
%endif
%define wordsize %{__isa_bits}
mv $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h \
$RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig-%{wordsize}.h
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h
%triggerpostun -- freetype < 2.0.5-3
{
# ttmkfdir updated - as of 2.0.5-3, on upgrades we need xfs to regenerate
# things to get the iso10646-1 encoding listed.
for I in %{_datadir}/fonts/*/TrueType /usr/share/X11/fonts/TTF; do
[ -d $I ] && [ -f $I/fonts.scale ] && [ -f $I/fonts.dir ] && touch $I/fonts.scale
done
exit 0
}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%license docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT
%{_libdir}/libfreetype.so.*
%{_bindir}/ft*
%files devel
%{_datadir}/aclocal/freetype2.m4
%{_includedir}/freetype2/*
%{_libdir}/libfreetype.so
%{_libdir}/pkgconfig/freetype2.pc
%{_bindir}/freetype-config
%exclude %{_libdir}/*.{a,la}
%files help
%doc docs/design
%doc docs/glyphs
%doc docs/reference
%doc docs/tutorial
%doc docs/CHANGES docs/formats.txt docs/ft2faq.html
%doc ChangeLog README
%{_mandir}/man1/*
%changelog
* Wed Sep 11 2019 openEuler jimmy<dukaitian@huawei.com> - 2.9.1-3
- Package init jimmy

BIN
ft2demos-2.9.1.tar.bz2 Normal file

Binary file not shown.

14
ftconfig.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef __FTCONFIG_H__MULTILIB
#define __FTCONFIG_H__MULTILIB
#include <bits/wordsize.h>
#if __WORDSIZE == 32
# include "ftconfig-32.h"
#elif __WORDSIZE == 64
# include "ftconfig-64.h"
#else
# error "unexpected value for __WORDSIZE macro"
#endif
#endif