SHA256
1
0
forked from pool/fontforge

Accepting request 147151 from M17N

(forwarded request 147149 from Dmitry_R)

OBS-URL: https://build.opensuse.org/request/show/147151
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fontforge?expand=0&rev=27
This commit is contained in:
Stephan Kulow 2013-01-13 13:07:24 +00:00 committed by Git OBS Bridge
commit 8d56e8c6fb
12 changed files with 94 additions and 294 deletions

View File

@ -1,14 +0,0 @@
---
fontforge/cvimages.c | 1 +
1 file changed, 1 insertion(+)
--- a/fontforge/cvimages.c
+++ b/fontforge/cvimages.c
@@ -1116,6 +1116,7 @@
++tot;
}
}
+ closedir(dir);
if ( tot==0 )
ff_post_error(_("Nothing Loaded"),_("Nothing Loaded"));
return( true );

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Fri Jan 4 12:44:05 UTC 2013 - dmitry_r@opensuse.org
- Build with cairo and pango support
-------------------------------------------------------------------
Sun Dec 30 06:44:35 UTC 2012 - dmitry_r@opensuse.org
- Update to 20120731b
* see included changelog.html for details
* removed obsolete fontforge.py27.diff
* removed obsolete fontforge-missing-closedir.diff
* removed obsolete libpng14.diff
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 20 20:25:40 UTC 2011 - coolo@suse.com Tue Dec 20 20:25:40 UTC 2011 - coolo@suse.com

View File

@ -1,8 +0,0 @@
[Desktop Entry]
Type=Application
Exec=fontforge
Name=FontForge
GenericName=Font Editor
Icon=fontforge
GenericName[de]= Schrifteditor
GenericName[ja]=

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:303f17aef16d9193b209403eb0fb9eaa0bcdbe63600a48885db867bea7827e2d
size 14309

View File

@ -1,96 +0,0 @@
diff -ru fontforge-20090923.orig/fontforge/ffpython.h fontforge-20090923/fontforge/ffpython.h
--- fontforge-20090923.orig/fontforge/ffpython.h 2009-08-06 01:33:51.000000000 +0200
+++ fontforge-20090923/fontforge/ffpython.h 2010-09-06 10:51:46.003385009 +0200
@@ -60,11 +60,11 @@
#define _PyBytes_Eq _PyString_Eq
#define PyBytes_Format PyString_Format
#define _PyBytes_FormatLong _PyString_FormatLong
-#define PyBytes_DecodeEscape PyString_DecodeEscape
+#define PyString_DecodeEscape PyString_DecodeEscape
#define _PyBytes_Join _PyString_Join
-#define PyBytes_Decode PyString_Decode
+#define PyString_Decode PyString_Decode
#define PyBytes_Encode PyString_Encode
-#define PyBytes_AsEncodedObject PyString_AsEncodedObject
+#define PyString_AsEncodedObject PyString_AsEncodedObject
#define PyBytes_AsEncodedString PyString_AsEncodedString
#define PyBytes_AsDecodedObject PyString_AsDecodedObject
#define PyBytes_AsDecodedString PyString_AsDecodedString
diff -ru fontforge-20090923.orig/fontforge/python.c fontforge-20090923/fontforge/python.c
--- fontforge-20090923.orig/fontforge/python.c 2009-09-12 14:43:32.000000000 +0200
+++ fontforge-20090923/fontforge/python.c 2010-09-06 10:51:46.062259025 +0200
@@ -742,7 +742,7 @@
Py_XINCREF(glyph);
PyTuple_SetItem(arglist,0,py_ie[ie_index].data);
PyTuple_SetItem(arglist,1,glyph);
- PyTuple_SetItem(arglist,2,PyBytes_Decode(filename,strlen(filename),"UTF-8",NULL));
+ PyTuple_SetItem(arglist,2,PyString_Decode(filename,strlen(filename),"UTF-8",NULL));
PyTuple_SetItem(arglist,3,Py_BuildValue("i",toback));
result = PyEval_CallObject(py_ie[ie_index].import, arglist);
Py_DECREF(arglist);
@@ -765,7 +765,7 @@
Py_XINCREF(glyph);
PyTuple_SetItem(arglist,0,py_ie[ie_index].data);
PyTuple_SetItem(arglist,1,glyph);
- PyTuple_SetItem(arglist,2,PyBytes_Decode(filename,strlen(filename),"UTF-8",NULL));
+ PyTuple_SetItem(arglist,2,PyString_Decode(filename,strlen(filename),"UTF-8",NULL));
result = PyEval_CallObject(py_ie[ie_index].export, arglist);
Py_DECREF(arglist);
Py_XDECREF(result);
@@ -882,7 +882,7 @@
free(def);
if ( ret==NULL )
Py_RETURN_NONE;
- reto = PyBytes_Decode(ret,strlen(ret),"UTF-8",NULL);
+ reto = PyString_Decode(ret,strlen(ret),"UTF-8",NULL);
free(ret);
return( reto );
}
@@ -905,7 +905,7 @@
free(def);
if ( ret==NULL )
Py_RETURN_NONE;
- reto = PyBytes_Decode(ret,strlen(ret),"UTF-8",NULL);
+ reto = PyString_Decode(ret,strlen(ret),"UTF-8",NULL);
free(ret);
return( reto );
}
@@ -937,7 +937,7 @@
return( NULL );
}
for ( i=0; i<cnt; ++i ) {
- PyObject *utf8_name = PyBytes_AsEncodedObject(PyTuple_GetItem(answero,i),
+ PyObject *utf8_name = PyString_AsEncodedObject(PyTuple_GetItem(answero,i),
"UTF-8",NULL);
if ( utf8_name==NULL )
return( NULL );
@@ -977,7 +977,7 @@
return( NULL );
}
for ( i=0; i<cnt; ++i ) {
- PyObject *utf8_name = PyBytes_AsEncodedObject(PySequence_GetItem(answero,i),
+ PyObject *utf8_name = PyString_AsEncodedObject(PySequence_GetItem(answero,i),
"UTF-8",NULL);
if ( utf8_name==NULL )
return( NULL );
diff -ru fontforge-20090923.orig/fontforge/pythonui.c fontforge-20090923/fontforge/pythonui.c
--- fontforge-20090923.orig/fontforge/pythonui.c 2009-08-06 01:33:53.000000000 +0200
+++ fontforge-20090923/fontforge/pythonui.c 2010-09-06 10:51:46.066259158 +0200
@@ -228,7 +228,7 @@
shortcut_str = PyBytes_AsString(PyTuple_GetItem(args,4));
for ( i=5; i<cnt; ++i ) {
- PyObject *submenu_utf8 = PyBytes_AsEncodedObject(PyTuple_GetItem(args,i),
+ PyObject *submenu_utf8 = PyString_AsEncodedObject(PyTuple_GetItem(args,i),
"UTF-8",NULL);
unichar_t *submenuu = utf82u_copy( PyBytes_AsString(submenu_utf8) );
Py_DECREF(submenu_utf8);
@@ -305,7 +305,7 @@
return( NULL );
}
for ( i=5; i<cnt; ++i ) {
- utf8_name = PyBytes_AsEncodedObject(PyTuple_GetItem(args,i),
+ utf8_name = PyString_AsEncodedObject(PyTuple_GetItem(args,i),
"UTF-8",NULL);
if ( utf8_name==NULL )
return( NULL );

View File

@ -1,7 +1,7 @@
# #
# spec file for package fontforge # spec file for package fontforge
# #
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -15,39 +15,44 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: fontforge Name: fontforge
BuildRequires: dos2unix Version: 20120731
BuildRequires: freetype2-devel
BuildRequires: giflib-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libxml2-devel
BuildRequires: python-devel
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-devel
Version: 20110222
Release: 0 Release: 0
Obsoletes: PfaEdit < 20110222 %define src_version %{version}-b
Provides: PfaEdit = %{version}
Url: http://fontforge.sourceforge.net/
Source0: http://dfn.dl.sourceforge.net/sourceforge/fontforge/fontforge_full-%{version}.tar.bz2
Source1: http://sourceforge.net/projects/fontforge/files/fontforge-docs/fontforge_htdocs-20110221.tar.bz2
Source2: http://belnet.dl.sourceforge.net/sourceforge/fontforge/fontforge_ja_htdocs-20060822.tar.bz2
Source10: %{name}.desktop
Source11: %name.png
Patch0: docdir.patch
Patch2: fontforge-missing-closedir.diff
Patch3: fontforge-20090622-fdleak.patch
# libpng14.diff upstreamed from 20110222
Patch4: libpng14.diff
# fontforge.py27.diff upstreamed from 20110222
Patch5: fontforge.py27.diff
Patch6: libpng14-dynamic.diff
Patch7: fontforge-python-module-name.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: A Font Editor Summary: A Font Editor
License: BSD-3-Clause License: BSD-3-Clause
Group: Productivity/Graphics/Vector Editors Group: Productivity/Graphics/Vector Editors
Url: http://fontforge.org/
Source0: http://downloads.sourceforge.net/%{name}/%{name}_full-%{src_version}.tar.bz2
Source1: http://downloads.sourceforge.net/%{name}/%{name}_htdocs-%{src_version}.tar.bz2
# PATCH-FIX-OPENSUSE -- set path to documentation
Patch0: docdir.patch
Patch1: fontforge-20090622-fdleak.patch
Patch2: libpng14-dynamic.diff
# PATCH-FIX-OPENSUSE fontforge-python-module-name.diff -- change python module name according to naming policy
Patch3: fontforge-python-module-name.diff
BuildRequires: cairo-devel
BuildRequires: fdupes
BuildRequires: freetype2-devel
BuildRequires: gettext-tools
BuildRequires: giflib-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
%if 0%{?suse_version} > 1210
BuildRequires: libspiro-devel
%endif
BuildRequires: libtiff-devel
BuildRequires: libuninameslist-devel
BuildRequires: libxml2-devel
BuildRequires: pango-devel
BuildRequires: python-devel
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-devel
Obsoletes: PfaEdit < 20110222
Provides: PfaEdit = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
FontForge allows editing of outline and bitmap fonts. With it, you can FontForge allows editing of outline and bitmap fonts. With it, you can
@ -58,49 +63,39 @@ some Type 0s), TrueType, OpenType (Type2), and CID-keyed fonts.
%package devel %package devel
Summary: Include Files and Libraries mandatory for Development Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/Other Group: Development/Libraries/Other
Requires: %{name} = %{version} freetype2-devel Requires: %{name} = %{version}
Requires: freetype2-devel
%description devel %description devel
This package contains all necessary include files and libraries needed This package contains all necessary include files and libraries needed
to develop applications that require these. to develop applications that use FontForge libraries.
%prep %prep
%setup -q -T -n fontforge-%{version} -b 0 %setup -q -T -n fontforge-%{src_version} -b 0
%patch0 -p 1 -b .docdir %patch0 -p 1 -b .docdir
%patch2 -p1 %patch1
%if 0%{?suse_version} > 1120
%patch2
%endif
%patch3 %patch3
%if %suse_version > 1120
# change <= 1130 to <= 1140 as soon as factory will have suse_version > 1140
%if %suse_version <= 1130
%patch4 -p1
%endif
%endif
%if %suse_version > 1130
# change the nonsense <= 1130 to <= 1140 as soon as factory will have suse_version > 1140
%if %suse_version <= 1130
%patch5 -p1
%endif
%endif
%if %suse_version > 1120
%patch6
%endif
%patch7
mkdir docs mkdir docs
tar -jxvf %{S:1} -C docs tar -jxvf %{SOURCE1} -C docs
tar -jxvf %{S:2} -C docs
chmod 644 docs/quadraticspline.gif chmod 644 docs/quadraticspline.gif
dos2unix docs/ja/*html docs/ja/nonBMP/index.html docs/corpchar.txt docs/Big5.txt chmod 644 docs/FontForgeSplash.png
tar zxvf docs/cidmaps.tgz chmod 644 docs/*.html
find . -name "*.html" -o -name "*.png" | xargs chmod 644 # tar zxvf docs/cidmaps.tgz
find . -name CVS -type d | xargs rm -rf find . -name CVS -type d | xargs rm -rf
# fix wrong-file-end-of-line-encoding
sed -i 's/\r$//' docs/{Big5.txt,corpchar.txt}
%build %build
#libtoolize --force export CFLAGS="%{optflags} -fno-strict-aliasing"
#autoreconf --force --install %configure \
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" --disable-static \
# --with-multilayer --enable-pyextension \
%configure --disable-static --with-pic \ --with-regular-link
--enable-pyextension
make %{?_smp_mflags} make %{?_smp_mflags}
pushd pyhook pushd pyhook
@ -108,39 +103,44 @@ python setup.py build
popd popd
%install %install
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=%{buildroot} install
pushd $RPM_BUILD_ROOT/usr/bin # symlink for old FontForge name - PfaEdit
pushd %{buildroot}%{_bindir}
ln -s fontforge pfaedit ln -s fontforge pfaedit
popd popd
# install CMaps to be able to edit CID-keyed fonts: # install CMaps to be able to edit CID-keyed fonts:
install -m 644 Adobe* $RPM_BUILD_ROOT/usr/share/fontforge # install -m 644 Adobe* %{buildroot}%{_datadir}/fontforge
install -d $RPM_BUILD_ROOT%_datadir/pixmaps
install -m644 $RPM_SOURCE_DIR/%name.png $RPM_BUILD_ROOT%_datadir/pixmaps/%name.png # desktop file and icon
%find_lang FontForge install -Dm 644 Packaging/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
install -Dm 644 Packaging/icons/48x48/apps/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
%suse_update_desktop_file -i %{name} VectorGraphics %suse_update_desktop_file -i %{name} VectorGraphics
%{__rm} -f %{buildroot}%{_libdir}/*.la
%find_lang FontForge
rm -f %{buildroot}%{_libdir}/*.la
pushd pyhook pushd pyhook
python setup.py install \ python setup.py install \
--root=$RPM_BUILD_ROOT \ --root=%{buildroot} \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--record-rpm=%{name}-python.files --record-rpm=%{name}-python.files
popd popd
%fdupes -s %{buildroot}%{_datadir}/%{name}
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files -f FontForge.lang %files -f FontForge.lang
%defattr(-,root,root) %defattr(-,root,root)
%doc AUTHORS VERSION LICENSE README* docs %doc AUTHORS VERSION LICENSE README-unix docs/
%{_bindir}/* %{_bindir}/*
%{_libdir}/lib*.so.* %{_libdir}/lib*.so.*
%dir /usr/share/fontforge/ %{_datadir}/fontforge/
/usr/share/fontforge/* %{_mandir}/man1/*.1*
%doc %{_mandir}/man1/*.1* %{_datadir}/applications/%{name}.desktop
/usr/share/applications/%{name}.desktop %{_datadir}/pixmaps/%{name}.png
%_datadir/pixmaps/%name.png
%py_sitedir/* %py_sitedir/*
%files devel %files devel

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8fa2818026f84bb7b8a77451d21cab7e9dea8aa904e5218afa158be6a320433e
size 5126031

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1b6184caff211e315783a029256f56cf05f1d4fd3cbcb41820d21c7745040fb6
size 5541994

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7a81b9a30fa8f287e63abcfee568d7fcfd1a21c75c5c69effe95fe677d963fec
size 3129839

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6c3f178484d21814762c52859ffead25564a93e88cd5fe7cc9877e4b7e85105d
size 3506833

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7fab073647edd096aaff93c114f9a4385dc16dec0903c0a92735d531d4d4a49d
size 3200612

View File

@ -1,90 +0,0 @@
Index: fontforge-20090923/gutils/gimagereadpng.c
===================================================================
--- fontforge-20090923.orig/gutils/gimagereadpng.c 2009-02-22 18:26:06.000000000 +0100
+++ fontforge-20090923/gutils/gimagereadpng.c 2010-04-08 09:54:52.000000000 +0200
@@ -220,13 +220,13 @@ return( NULL );
if ( (info_ptr->valid&PNG_INFO_tRNS) && info_ptr->num_trans>0 ) {
if ( info_ptr->color_type==PNG_COLOR_TYPE_RGB || info_ptr->color_type==PNG_COLOR_TYPE_RGB_ALPHA )
base->trans = COLOR_CREATE(
- (info_ptr->trans_values.red>>8),
- (info_ptr->trans_values.green>>8),
- (info_ptr->trans_values.blue>>8));
+ (info_ptr->trans_color.red>>8),
+ (info_ptr->trans_color.green>>8),
+ (info_ptr->trans_color.blue>>8));
else if ( base->image_type == it_mono )
- base->trans = info_ptr->trans[0];
+ base->trans = info_ptr->trans_alpha[0];
else
- base->clut->trans_index = base->trans = info_ptr->trans[0];
+ base->clut->trans_index = base->trans = info_ptr->trans_alpha[0];
}
row_pointers = galloc(info_ptr->height*sizeof(png_bytep));
Index: fontforge-20090923/gutils/gimagewritepng.c
===================================================================
--- fontforge-20090923.orig/gutils/gimagewritepng.c 2009-02-22 18:26:06.000000000 +0100
+++ fontforge-20090923/gutils/gimagewritepng.c 2010-04-08 10:03:02.000000000 +0200
@@ -183,8 +183,8 @@ return(false);
if ( info_ptr->num_palette<=16 )
_png_set_packing(png_ptr);
if ( base->trans!=-1 ) {
- info_ptr->trans = galloc(1);
- info_ptr->trans[0] = base->trans;
+ info_ptr->trans_alpha = galloc(1);
+ info_ptr->trans_alpha[0] = base->trans;
}
} else {
info_ptr->color_type = PNG_COLOR_TYPE_RGB;
@@ -192,9 +192,9 @@ return(false);
info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
if ( base->trans!=-1 ) {
- info_ptr->trans_values.red = COLOR_RED(base->trans);
- info_ptr->trans_values.green = COLOR_GREEN(base->trans);
- info_ptr->trans_values.blue = COLOR_BLUE(base->trans);
+ info_ptr->trans_color.red = COLOR_RED(base->trans);
+ info_ptr->trans_color.green = COLOR_GREEN(base->trans);
+ info_ptr->trans_color.blue = COLOR_BLUE(base->trans);
}
}
_png_write_info(png_ptr, info_ptr);
@@ -210,7 +210,7 @@ return(false);
_png_write_end(png_ptr, info_ptr);
- if ( info_ptr->trans!=NULL ) gfree(info_ptr->trans);
+ if ( info_ptr->trans_alpha!=NULL ) gfree(info_ptr->trans_alpha);
if ( info_ptr->palette!=NULL ) gfree(info_ptr->palette);
_png_destroy_write_struct(&png_ptr, &info_ptr);
gfree(rows);
@@ -314,15 +314,15 @@ return(false);
if ( info_ptr->num_palette<=16 )
png_set_packing(png_ptr);
if ( base->trans!=-1 ) {
- info_ptr->trans = galloc(1);
- info_ptr->trans[0] = base->trans;
+ info_ptr->trans_alpha = galloc(1);
+ info_ptr->trans_alpha[0] = base->trans;
}
} else {
info_ptr->color_type = PNG_COLOR_TYPE_RGB;
if ( base->trans!=-1 ) {
- info_ptr->trans_values.red = COLOR_RED(base->trans);
- info_ptr->trans_values.green = COLOR_GREEN(base->trans);
- info_ptr->trans_values.blue = COLOR_BLUE(base->trans);
+ info_ptr->trans_color.red = COLOR_RED(base->trans);
+ info_ptr->trans_color.green = COLOR_GREEN(base->trans);
+ info_ptr->trans_color.blue = COLOR_BLUE(base->trans);
}
}
png_write_info(png_ptr, info_ptr);
@@ -338,7 +338,7 @@ return(false);
png_write_end(png_ptr, info_ptr);
- if ( info_ptr->trans!=NULL ) gfree(info_ptr->trans);
+ if ( info_ptr->trans_alpha!=NULL ) gfree(info_ptr->trans_alpha);
if ( info_ptr->palette!=NULL ) gfree(info_ptr->palette);
png_destroy_write_struct(&png_ptr, &info_ptr);
gfree(rows);