forked from pool/fontforge
Accepting request 226346 from M17N
- fixed linking against libpng (1.5, 1.6) [bnc#867041] * added fontforge-libpng.diff * removed libpng14-dynamic.diff - spec file cleanup * call spec-cleaner * fontforge-20090622-fdleak.patch renamed to fontforge-fdleak.patch * docdir.patch renamed to fontforge-docdir.patch OBS-URL: https://build.opensuse.org/request/show/226346 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fontforge?expand=0&rev=34
This commit is contained in:
commit
f0da2da344
34
fontforge-libpng.diff
Normal file
34
fontforge-libpng.diff
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
Index: configure
|
||||||
|
===================================================================
|
||||||
|
--- configure.orig 2012-08-02 17:09:08.000000000 +0200
|
||||||
|
+++ configure 2014-03-14 14:27:30.539876212 +0100
|
||||||
|
@@ -14074,6 +14074,12 @@
|
||||||
|
if test "$ac_cv_lib_png14_png_create_read_struct" = "yes"; then
|
||||||
|
STATIC_LIBS="$STATIC_LIBS -lpng14 -lz"
|
||||||
|
fi
|
||||||
|
+ if test "$ac_cv_lib_png15_png_create_read_struct" = "yes"; then
|
||||||
|
+ STATIC_LIBS="$STATIC_LIBS -lpng15 -lz"
|
||||||
|
+ fi
|
||||||
|
+ if test "$ac_cv_lib_png16_png_create_read_struct" = "yes"; then
|
||||||
|
+ STATIC_LIBS="$STATIC_LIBS -lpng16 -lz"
|
||||||
|
+ fi
|
||||||
|
if test "$ac_cv_lib_tiff_TIFFOpen" = "yes"; then
|
||||||
|
STATIC_LIBS="$STATIC_LIBS -ltiff"
|
||||||
|
fi
|
||||||
|
@@ -14178,6 +14184,16 @@
|
||||||
|
$as_echo "#define _STATIC_LIBPNG 1" >>confdefs.h
|
||||||
|
|
||||||
|
fi
|
||||||
|
+ if test "$ac_cv_lib_png15_png_create_read_struct" = "yes"; then
|
||||||
|
+ STATIC_LIBS="$STATIC_LIBS -lpng15 -lz"
|
||||||
|
+ $as_echo "#define _STATIC_LIBPNG 1" >>confdefs.h
|
||||||
|
+
|
||||||
|
+ fi
|
||||||
|
+ if test "$ac_cv_lib_png16_png_create_read_struct" = "yes"; then
|
||||||
|
+ STATIC_LIBS="$STATIC_LIBS -lpng16 -lz"
|
||||||
|
+ $as_echo "#define _STATIC_LIBPNG 1" >>confdefs.h
|
||||||
|
+
|
||||||
|
+ fi
|
||||||
|
if test "$ac_cv_lib_tiff_TIFFOpen" = "yes"; then
|
||||||
|
STATIC_LIBS="$STATIC_LIBS -ltiff"
|
||||||
|
$as_echo "#define _STATIC_LIBTIFF 1" >>confdefs.h
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 17 07:21:51 UTC 2014 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- fixed linking against libpng (1.5, 1.6) [bnc#867041]
|
||||||
|
* added fontforge-libpng.diff
|
||||||
|
* removed libpng14-dynamic.diff
|
||||||
|
- spec file cleanup
|
||||||
|
* call spec-cleaner
|
||||||
|
* fontforge-20090622-fdleak.patch renamed to fontforge-fdleak.patch
|
||||||
|
* docdir.patch renamed to fontforge-docdir.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Mar 9 13:40:08 UTC 2014 - schwab@linux-m68k.org
|
Sun Mar 9 13:40:08 UTC 2014 - schwab@linux-m68k.org
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package fontforge
|
# spec file for package fontforge
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2014 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
|
||||||
@ -16,27 +16,26 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define src_version %{version}-b
|
||||||
Name: fontforge
|
Name: fontforge
|
||||||
Version: 20120731
|
Version: 20120731
|
||||||
Release: 0
|
Release: 0
|
||||||
%define src_version %{version}-b
|
|
||||||
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/
|
Url: http://fontforge.org/
|
||||||
|
|
||||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}_full-%{src_version}.tar.bz2
|
Source0: http://downloads.sourceforge.net/%{name}/%{name}_full-%{src_version}.tar.bz2
|
||||||
Source1: http://downloads.sourceforge.net/%{name}/%{name}_htdocs-%{src_version}.tar.bz2
|
Source1: http://downloads.sourceforge.net/%{name}/%{name}_htdocs-%{src_version}.tar.bz2
|
||||||
# PATCH-FIX-OPENSUSE -- set path to documentation
|
# PATCH-FIX-OPENSUSE -- set path to documentation
|
||||||
Patch0: docdir.patch
|
Patch0: fontforge-docdir.patch
|
||||||
Patch1: fontforge-20090622-fdleak.patch
|
Patch1: fontforge-fdleak.patch
|
||||||
Patch2: libpng14-dynamic.diff
|
# workaround, this should be resolved upstream (use pkg-config) bnc#867041
|
||||||
|
Patch2: fontforge-libpng.diff
|
||||||
# PATCH-FIX-OPENSUSE fontforge-python-module-name.diff -- change python module name according to naming policy
|
# PATCH-FIX-OPENSUSE fontforge-python-module-name.diff -- change python module name according to naming policy
|
||||||
Patch3: fontforge-python-module-name.diff
|
Patch3: fontforge-python-module-name.diff
|
||||||
Patch4: fontforge-fixgiflib.patch
|
Patch4: fontforge-fixgiflib.patch
|
||||||
# PATCH-FIX-UPSTREAM http://sourceforge.net/p/fontforge/git/ci/9ae25e0
|
# PATCH-FIX-UPSTREAM http://sourceforge.net/p/fontforge/git/ci/9ae25e0
|
||||||
Patch5: fontforge-arraysubscript.patch
|
Patch5: fontforge-arraysubscript.patch
|
||||||
|
|
||||||
BuildRequires: cairo-devel
|
BuildRequires: cairo-devel
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: freetype2-devel
|
BuildRequires: freetype2-devel
|
||||||
@ -44,9 +43,6 @@ BuildRequires: gettext-tools
|
|||||||
BuildRequires: giflib-devel
|
BuildRequires: giflib-devel
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: libjpeg-devel
|
||||||
BuildRequires: libpng-devel
|
BuildRequires: libpng-devel
|
||||||
%if 0%{?suse_version} > 1210
|
|
||||||
BuildRequires: libspiro-devel
|
|
||||||
%endif
|
|
||||||
BuildRequires: libtiff-devel
|
BuildRequires: libtiff-devel
|
||||||
BuildRequires: libuninameslist-devel
|
BuildRequires: libuninameslist-devel
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
@ -56,10 +52,13 @@ BuildRequires: update-desktop-files
|
|||||||
BuildRequires: xorg-x11-devel
|
BuildRequires: xorg-x11-devel
|
||||||
# following to avoid warning
|
# following to avoid warning
|
||||||
# 'Application built with libpng-1.5.14 but running with 1.6.1'
|
# 'Application built with libpng-1.5.14 but running with 1.6.1'
|
||||||
%requires_eq libpng16-16
|
%requires_eq libpng16-16
|
||||||
Obsoletes: PfaEdit < 20110222
|
Obsoletes: PfaEdit < 20110222
|
||||||
Provides: PfaEdit = %{version}
|
Provides: PfaEdit = %{version}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
%if 0%{?suse_version} > 1210
|
||||||
|
BuildRequires: libspiro-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
%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
|
||||||
@ -99,15 +98,12 @@ to develop applications that use FontForge libraries.
|
|||||||
%setup -q -T -n fontforge-%{src_version} -b 0
|
%setup -q -T -n fontforge-%{src_version} -b 0
|
||||||
%patch0 -p 1 -b .docdir
|
%patch0 -p 1 -b .docdir
|
||||||
%patch1
|
%patch1
|
||||||
%if 0%{?suse_version} > 1120
|
|
||||||
%patch2
|
%patch2
|
||||||
%endif
|
|
||||||
%patch3
|
%patch3
|
||||||
%if 0%{?suse_version} > 1230
|
%if 0%{?suse_version} > 1230
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
|
|
||||||
mkdir docs
|
mkdir docs
|
||||||
tar -jxvf %{SOURCE1} -C docs
|
tar -jxvf %{SOURCE1} -C docs
|
||||||
chmod 644 docs/quadraticspline.gif
|
chmod 644 docs/quadraticspline.gif
|
||||||
@ -119,6 +115,8 @@ find . -name CVS -type d | xargs rm -rf
|
|||||||
sed -i 's/\r$//' docs/{Big5.txt,corpchar.txt}
|
sed -i 's/\r$//' docs/{Big5.txt,corpchar.txt}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
# workaround, this should be resolved upstream (use pkg-config) bnc#867041
|
||||||
|
pkg-config --exists 'libpng >= 1.7.0' && echo 'Libpng was updated to 1.7, fontforge-libpng.patch will probably need to be adapted.' && exit 1
|
||||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||||
%configure \
|
%configure \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
@ -126,35 +124,30 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
|
|||||||
--with-regular-link
|
--with-regular-link
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
pushd pyhook
|
pushd pyhook
|
||||||
python setup.py build
|
python setup.py build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make DESTDIR=%{buildroot} install
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||||
# symlink for old FontForge name - PfaEdit
|
# symlink for old FontForge name - PfaEdit
|
||||||
pushd %{buildroot}%{_bindir}
|
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* %{buildroot}%{_datadir}/fontforge
|
# install -m 644 Adobe* %{buildroot}%{_datadir}/fontforge
|
||||||
|
|
||||||
# desktop file and icon
|
# desktop file and icon
|
||||||
install -Dm 644 Packaging/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
|
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
|
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
|
||||||
|
|
||||||
%find_lang FontForge
|
%find_lang FontForge
|
||||||
rm -f %{buildroot}%{_libdir}/*.la
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
|
|
||||||
pushd pyhook
|
pushd pyhook
|
||||||
python setup.py install \
|
python setup.py install \
|
||||||
--root=%{buildroot} \
|
--root=%{buildroot} \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--record-rpm=%{name}-python.files
|
--record-rpm=%{name}-python.files
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%fdupes -s %{buildroot}%{_datadir}/%{name}
|
%fdupes -s %{buildroot}%{_datadir}/%{name}
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
@ -170,7 +163,7 @@ popd
|
|||||||
%{_mandir}/man1/*.1*
|
%{_mandir}/man1/*.1*
|
||||||
%{_datadir}/applications/%{name}.desktop
|
%{_datadir}/applications/%{name}.desktop
|
||||||
%{_datadir}/pixmaps/%{name}.png
|
%{_datadir}/pixmaps/%{name}.png
|
||||||
%py_sitedir/*
|
%{py_sitedir}/*
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
--- gutils/gimagereadpng.c.old 2011-05-16 13:11:25.000000000 +0200
|
|
||||||
+++ gutils/gimagereadpng.c 2011-05-16 13:19:32.000000000 +0200
|
|
||||||
@@ -88,6 +88,7 @@ static int loadpng() {
|
|
||||||
return( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
# if !defined(PNG_LIBPNG_VER_MAJOR) || (PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR<2)
|
|
||||||
/* Early versions are called libpng. Later libpng10/libpng12/libpng14... */
|
|
||||||
libpng = dlopen("libpng" SO_EXT,RTLD_LAZY);
|
|
||||||
@@ -112,6 +113,9 @@ return( 0 );
|
|
||||||
# endif
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
+#endif
|
|
||||||
+ libpng = dlopen("libpng14.so.14", RTLD_LAZY);
|
|
||||||
+
|
|
||||||
if ( libpng==NULL ) {
|
|
||||||
fprintf(stderr,"libpng: %s\n", dlerror());
|
|
||||||
return( 0 );
|
|
||||||
pgajdos@laura:~/branch/devel/fontforge/fontforge-20110222/gutils> diff -up gimagewritepng.c{.old,}
|
|
||||||
--- gutils/gimagewritepng.c.old 2011-05-16 13:20:47.000000000 +0200
|
|
||||||
+++ gutils/gimagewritepng.c 2011-05-16 13:21:44.000000000 +0200
|
|
||||||
@@ -72,6 +72,7 @@ static int loadpng() {
|
|
||||||
fprintf(stderr,"%s\n", dlerror());
|
|
||||||
return( 0 );
|
|
||||||
}
|
|
||||||
+#if 0
|
|
||||||
# if !defined(PNG_LIBPNG_VER_MAJOR) || (PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR<2)
|
|
||||||
/* Early versions are called libpng. Later libpng10/libpng12/libpng14... */
|
|
||||||
libpng = dlopen("libpng" SO_EXT,RTLD_LAZY);
|
|
||||||
@@ -96,6 +97,9 @@ return( 0 );
|
|
||||||
# endif
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
+#endif
|
|
||||||
+ libpng = dlopen("libpng14.so.14", RTLD_LAZY);
|
|
||||||
+
|
|
||||||
if ( libpng==NULL ) {
|
|
||||||
fprintf(stderr,"%s", dlerror());
|
|
||||||
return( 0 );
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user