fontforge/fontforge.spec
Sascha Peilicke e866520393 Accepting request 74670 from M17N
- updated to 20110222:
  * Did a lot of work to improve the accuracy in remove overlap.
  * Fix various error messages. 
  * Remove some obsolete documentation. 
  * Technical fixes to stroking code. 
  * Add a miterlimit to stroking code.
  * FontForge was using the wrong MIME type for svg files. 
    W3C has changed it and it's now "image/svg+xml" not 
    "image/svg-xml" or "image/svg".
  * etc. on 
    http://fontforge.sourceforge.net/changelog.html
  * libpng14.diff and fontforge.py27.diff kept but not needed yet

OBS-URL: https://build.opensuse.org/request/show/74670
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fontforge?expand=0&rev=20
2011-06-28 07:20:37 +00:00

160 lines
5.0 KiB
RPMSpec

#
# spec file for package fontforge (Version 20090923)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: fontforge
BuildRequires: dos2unix freetype2-devel giflib-devel libpng-devel libtiff-devel libxml2-devel python-devel update-desktop-files xorg-x11-devel
License: BSD3c(or similar)
Group: Productivity/Graphics/Vector Editors
AutoReqProv: on
Obsoletes: PfaEdit
Provides: PfaEdit
Version: 20110222
Release: 4
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
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: A Font Editor
%description
FontForge allows editing of outline and bitmap fonts. With it, you can
create new fonts or modify old ones. It also converts font formats and
can convert among PostScript (ASCII & binary Type 1, some Type 3s, and
some Type 0s), TrueType, OpenType (Type2), and CID-keyed fonts.
%package devel
License: BSD3c(or similar)
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/Other
Requires: %{name} = %{version} freetype2-devel
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%prep
%setup -q -T -n fontforge-%{version} -b 0
%patch0 -p 1 -b .docdir
%patch2 -p1
%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
mkdir docs
tar jxvf %{S:1} -C docs
tar jxvf %{S:2} -C docs
chmod 644 docs/quadraticspline.gif
dos2unix docs/ja/*html docs/ja/nonBMP/index.html docs/corpchar.txt docs/Big5.txt
tar zxvf docs/cidmaps.tgz
find . -name "*.html" -o -name "*.png" | xargs chmod 644
find . -name CVS -type d | xargs rm -rf
%build
%{?suse_update_config}
#libtoolize --force
#autoreconf --force --install
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
# --with-multilayer
%configure --disable-static --with-pic \
--enable-pyextension
%{__make} %{?jobs:-j%jobs}
pushd pyhook
python setup.py build
popd
%install
# mkdir -p ${RPM_BUILD_ROOT}{%{_bindir},%{_libdir},%{_mandir}/man1,/usr/share/fontforge}
# make -e bindir=$RPM_BUILD_ROOT/usr/bin \
# sharedir=$RPM_BUILD_ROOT/usr/share/fontforge \
# libdir=$RPM_BUILD_ROOT%{_libdir} \
# mandir=$RPM_BUILD_ROOT%{_mandir} \
# localedir=$RPM_BUILD_ROOT/usr/share/locale \
# install
make DESTDIR=$RPM_BUILD_ROOT install
pushd $RPM_BUILD_ROOT/usr/bin
ln -s fontforge pfaedit
popd
# install CMaps to be able to edit CID-keyed fonts:
install -m 644 Adobe* $RPM_BUILD_ROOT/usr/share/fontforge
install -d $RPM_BUILD_ROOT%_datadir/pixmaps
install -m644 $RPM_SOURCE_DIR/%name.png $RPM_BUILD_ROOT%_datadir/pixmaps/%name.png
%find_lang FontForge
%suse_update_desktop_file -i %{name} VectorGraphics
%{__rm} -f %{buildroot}%{_libdir}/*.la
pushd pyhook
python setup.py install \
--root=$RPM_BUILD_ROOT \
--prefix=%{_prefix} \
--record-rpm=%{name}-python.files
popd
%clean
%{__rm} -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f FontForge.lang
%defattr(-,root,root)
%doc AUTHORS VERSION LICENSE README* docs
%{_bindir}/*
%{_libdir}/lib*.so.*
%dir /usr/share/fontforge/
/usr/share/fontforge/*
%doc %{_mandir}/man1/*.1*
/usr/share/applications/%{name}.desktop
%_datadir/pixmaps/%name.png
%py_sitedir/*
%files devel
%defattr(-, root, root)
%dir %{_includedir}/fontforge/
%{_includedir}/fontforge/*
%{_libdir}/pkgconfig/*
%{_libdir}/lib*.so
%changelog