File dia.spec of Package dia

#
# spec file for package dia (Version 0.94)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild
# usedforbuild    Mesa Mesa-devel aaa_base acl alsa alsa-devel atk atk-devel attr audiofile audiofile-devel audit-libs autoconf automake bash bind-libs bind-utils binutils bison bzip2 cairo cairo-devel coreutils cpio cpp cracklib cups-libs cvs cyrus-sasl db dbus-1 dbus-1-devel dbus-1-glib desktop-translations diffutils docbook-dsssl-stylesheets docbook-toys docbook_3 docbook_4 e2fsprogs esound esound-devel expat file filesystem fillup findutils flex fontconfig fontconfig-devel freetype2 freetype2-devel gawk gcc gcc-c++ gconf2 gconf2-devel gdbm gdbm-devel gettext gettext-devel glib2 glib2-devel glibc glibc-devel glibc-locale glitz glitz-devel gnome-filesystem gnome-icon-theme gnome-keyring gnome-keyring-devel gnome-patch-translation gnome-vfs2 gnome-vfs2-devel gnutls gnutls-devel gpm grep groff gtk2 gtk2-devel gzip hal hal-devel info insserv intltool iso_ent jadetex klogd latex-ucs less libacl libart_lgpl libart_lgpl-devel libattr libbonobo libbonobo-devel libbonoboui libbonoboui-devel libcom_err libdrm libgcc libgcrypt libgcrypt-devel libglade2 libglade2-devel libgnome libgnome-devel libgnomecanvas libgnomecanvas-devel libgnomeprint libgnomeprint-devel libgnomeprintui libgnomeprintui-devel libgnomesu libgnomeui libgnomeui-devel libgpg-error libgpg-error-devel libjpeg libjpeg-devel libmudflap libnscd libpng libpng-devel libstdc++ libstdc++-devel libsvg libsvg-cairo libtiff libtool libusb libwnck libwnck-devel libxcrypt libxml2 libxml2-devel libxslt libxslt-devel libzio m4 mDNSResponder-devel mDNSResponder-lib make man mktemp module-init-tools ncurses ncurses-devel net-tools netcfg openjade openldap2-client openmotif-libs opensp openssl openssl-devel orbit2 orbit2-devel pam pam-modules pango pango-devel patch perl perl-XML-Parser permissions pkgconfig popt popt-devel procinfo procps psmisc pwdutils python python-cairo python-devel python-gtk python-numeric rcs readline resmgr rpm sed sgml-skel shared-mime-info strace sysvinit tar tcpd te_latex tetex texinfo timezone unzip update-desktop-files util-linux vim xorg-x11-devel xorg-x11-libs zlib zlib-devel


Name:           dia
BuildRequires:  docbook-toys gcc-c++ gnome-patch-translation gnutls-devel intltool libglade2-devel libgnomeprintui-devel libgnomeui-devel libwnck-devel libxslt-devel mDNSResponder-devel perl-XML-Parser python-devel python-gtk sgml-skel update-desktop-files
%define prefix /opt/gnome
License:        GPL v2 or later
Group:          Productivity/Graphics/Other
Requires:       ghostscript-fonts-std python-gtk python-numeric
AutoReqProv:    on
Summary:        A Diagram Creation Program
Version:        0.94
Release:        41.25
Source:         ftp://ftp.gnome.org/pub/GNOME/stable/sources/dia/dia-%{version}.tar.bz2
Source1:        font-test-japanese.dia
Source2:        font-test-czech.dia
Source3:        font-test-german-euro.dia
Patch:          %name-0.92.2-callbrowser.diff
Patch1:         dia-translatable-empty-string.patch
Patch3:         dia-0.92.2-no-strict-aliasing.diff
Patch4:         dia-random-return.patch
Patch5:         dia_bugfixes.diff
Patch6:         dia-gcc4.patch
Patch7:         dia-cairo-0.5.patch
Patch8:         dia-group-props-size.patch
Patch9:         dia-can-2005-2966.patch
Patch10:        dia-xfig.patch
Patch11:        dia-cve-2006-2480.patch
Patch12:        dia-cve-2006-2453.patch
Patch13:        dia-hungarian-po.patch
Url:            http://www.gnome.org/projects/dia/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Dia is designed to be much like the commercial program 'Visio.' It can
be used to draw many different kinds of diagrams. It has special
objects to help draw entity relationship diagrams, UML diagrams, SADT,
flowcharts, network diagrams, and simple circuits. It is possible to
add support for new shapes by writing simple XML files, and using a
subset of SVG to draw the shape.

Dia can load and save diagrams to a custom XML format (gzipped by
default to save space), can export diagrams to EPS, PNG, CGM, or SVG
formats, and can print diagrams (including ones that span multiple
pages).



Authors:
--------
    James Henstridge <james@daa.com.au>
    Alexander Larsson <alla@lysator.liu.se>

%debug_package
%prep
%setup
%patch1
%patch13
gnome-patch-translation-prepare
%patch -p1
%patch3
%patch4
%patch5 -p1
%patch6
%patch7
%patch8
%patch9
cd plug-ins/xfig
%patch10
cd ../..
%patch11
%patch12
# Work around gettext bug #186174
LANG=en_US.UTF-8 msgconv po/ko.po -o po/ko.po.new
mv po/ko.po.new po/ko.po
rename no nb po/no.*
sed "s/\(ALL_LINGUAS.*\) no /\1 nb /" configure.in > configure.in.tmp && \
        mv configure.in.tmp configure.in
gnome-patch-translation-update
cp $RPM_SOURCE_DIR/font-test*dia .

%build
autoconf
export CFLAGS="$RPM_OPT_FLAGS"
export CPPFLAGS="$(pkg-config --cflags cairo)"
./configure --prefix=%prefix \
	    --mandir=%_mandir \
	    --sysconfdir=/etc%_prefix \
	    --libdir=%prefix/%_lib \
	    --enable-db2html \
	    --enable-gnome \
	    --with-python \
	    --with-cairo
make

%install
make DESTDIR=$RPM_BUILD_ROOT install
%suse_update_desktop_file -r -C "" -G "Diagram Editor" dia Office FlowChart GNOME
%find_lang dia

%clean
rm -rf $RPM_BUILD_ROOT

%files -f dia.lang
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL 
%doc KNOWN_BUGS NEWS README TODO samples/*.dia
%doc font-test*dia
%_mandir/man1/*
%prefix/bin/*
%prefix/%_lib/dia
%prefix/share/dia
%prefix/share/applications/*.desktop
#%prefix/share/gnome/help/*
%dir %prefix/share/gnome/help/dia/C
%prefix/share/mime-info/*
%prefix/share/pixmaps/*

%changelog
* Wed Feb 21 2007 - sbrabec@suse.cz
- Disabled invalid translation of empty string as po file header.
* Tue Feb 20 2007 - jhargadon@suse.de
- added patch dia-hungarian-po.patch (#245769)
* Wed Jan 17 2007 - sbrabec@suse.cz
- Fixed Norwegian patch translation (#235192).
* Mon Jun 19 2006 - sbrabec@suse.cz
- Worked around failing msgmerge (#186174).
* Tue May 23 2006 - sbrabec@suse.cz
- Fixed more format string vulnerabilities (CVE-2006-2453,
  [#173867]).
* Wed May 17 2006 - sbrabec@suse.cz
- Fixed message format string vulnerability (CVE-2006-2480,
  [#173867]).
* Thu Mar 30 2006 - sbrabec@suse.cz
- Fixed XFig import buffer overflows (#162074).
  http://mail.gnome.org/archives/dia-list/2006-March/msg00149.html
* Fri Feb 24 2006 - sbrabec@suse.cz
- Improved Categories.
* Wed Feb 15 2006 - stbinner@suse.de
- fix %%suse_update_desktop and add .desktop file GenericName entry
* Wed Feb 01 2006 - sbrabec@suse.cz
- Use translation compendium gnome-patch-translation.
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 11 2006 - sbrabec@suse.cz
- Removed libpixman from neededforbuild.
* Tue Dec 20 2005 - ro@suse.de
- add /opt/gnome/share/gnome/help/dia/C to filelist
* Tue Oct 04 2005 - sbrabec@suse.cz
- Fixed SVG import arbitary python code execution
  (#120091, CAN-2005-2966).
* Thu Aug 18 2005 - sreeves@suse.de
- Patch to fix bugzilla.novell.com defect#6341 - "popup of group
  properties is too small"
* Fri Jun 10 2005 - sbrabec@suse.cz
- Updated cairo patch from Hans Breuer.
  http://bugzilla.gnome.org/show_bug.cgi?id=307144
* Fri Jun 03 2005 - ro@suse.de
- fix build with new cairo using cairo-api-update script
* Wed May 11 2005 - uli@suse.de
- fixed to build (glitz* missing in neededforbuild)
* Fri Apr 08 2005 - sbrabec@suse.cz
- Fixed GCC 4 related problems.
* Mon Feb 21 2005 - sbrabec@suse.cz
- Updated to version 0.94.
* Wed Oct 27 2004 - mmj@suse.de
- locale rename no to nb
* Mon Aug 23 2004 - ro@suse.de
- adapt filelist (help is installed below pkgdatadir)
* Fri Aug 20 2004 - shprasad@suse.de
- Fixes bug #60814
  Remove the default gnome-menu style. It will display
  'Help -> Manual' and clicking on it will bring the help
  window.
* Thu Jul 22 2004 - kimmidi@suse.de
- Fixes bugs #60003 and #61815 on ximian bugzilla.
* Fri Jul 16 2004 - kimmidi@suse.de
- Correct the -p option for patch6 and patch7 in dia.spec
* Thu Jul 15 2004 - kimmidi@suse.de
- Fixes bugs #60814 and #60816 on ximian bugzilla.
* Mon Jun 28 2004 - kimmidi@suse.de
- Fixes bugs #59101, #59230, #59097 and #59548 on ximian bugzilla.
* Mon May 31 2004 - sbrabec@suse.cz
- Fixed crash on IA64 (#41339).
  http://bugzilla.gnome.org/show_bug.cgi?id=143448
* Fri May 14 2004 - ro@suse.de
- use -fno-strict-aliasing
* Mon Feb 23 2004 - adrian@suse.de
- fix multiple menu entries
* Thu Jan 08 2004 - ro@suse.de
- fix build with current freetype
- fix build with lib64
* Sun Nov 09 2003 - mmj@suse.de
- Update to dia-0.92.2
* Mon Oct 27 2003 - sbrabec@suse.cz
- Updated to version 0.92.
- Enabled python, xslt and GNOME support.
* Thu Oct 16 2003 - mmj@suse.de
- Don't build as root
* Wed Sep 10 2003 - mmj@suse.de
- Bug [#30080] brought to my attention we don't package the docu-
  mentation.
- Use call-browser instead of netscape [#30080]
* Mon Sep 01 2003 - mmj@suse.de
- Disable buggy xslt plugin [#29690]
* Sat Aug 16 2003 - adrian@suse.de
- add Categories
* Thu Jul 24 2003 - hhetter@suse.de
- %%_lib fixes
* Tue Jul 22 2003 - hhetter@suse.de
- prefix to /opt/gnome
- remove former prefix clash fixes
- use gnome-filesystem
* Wed Jun 18 2003 - sbrabec@suse.cz
- Desktop file prefix clash fix.
* Wed Mar 26 2003 - mmj@suse.de
- Update to 0.91, which switches to GNOME2
* Fri Mar 07 2003 - mmj@suse.de
- Add patch to avoid strlen(0); [#24620]
* Wed Jan 08 2003 - ro@suse.de
- fixed configure
* Wed Nov 06 2002 - uli@suse.de
- fixed segfault on x86-64 and other 64 bit systems
* Thu Oct 24 2002 - hhetter@suse.de
- applied patch from CVS (no longer translate font
  strings) (Bug Id #20676)
* Fri Sep 27 2002 - ro@suse.de
- Added alsa alsa-devel to neededforbuild (esound)
* Thu Aug 08 2002 - mfabian@suse.de
- update to 0.90
- add configure option --enable-freetype
  using this option, fonts will be embedded in the PostScript
  ouput and all scalable fonts installed can be used.
  This works nicely for most European languages.
  Unfortunately it doesn't work for CJK. Japanese can be displayed
  on screen but printing doesn't work (but Japanese printing
  stopped working without "--enable-freetype" as well).
* Tue Jul 02 2002 - meissner@suse.de
- auto* rerun, some automake related fixes.
* Thu Mar 21 2002 - mfabian@suse.de
- fix for bugzilla #15026 (dia crashes for LANG=de_DE@euro)
  use fallback fonts which certainly work with gdk_fontset_load
  if some fonts cannot be found to avoid crashing.
  (I made iso8859-15 fonts usable with 'dia' available in the
  ghostscript-fonts-std package, i.e. 'dia' will not crash anymore
  for de_DE@euro even without this fallback font fix. Nevertheless
  it is a safer to have valid fallback fonts as well).
- include test file for de_DE@euro font-test-german-euro.dia
* Sat Mar 02 2002 - mfabian@suse.de
- fix for bugzilla #13267 and #14015
  (International fonts are broken (can't write in czech)):
- use the URW Type1 fonts as the preferred fonts for display on X11
  as these are very similar to the fonts used for printing
  (identical when our Ghostscript is used). Leaving in the bitmap
  fonts as fallbacks doesn't hurt.
- add Requires: ghostscript-fonts-std
- use gdk_fontset_load instead of gdk_font_load always *exept*
  for the "fontspecific" fonts (i.e. "Symbol" and "Dingbats").
- Add support for the Japanese fonts
  Ryumin-Light-EUC-H and GothicBBB-Medium-EUC-H
- don't reencode the "Dingbats" font and the Japanese fonts either
  when generating .eps
* Thu Feb 21 2002 - hhetter@suse.de
- dia-fonts.dif: Dia maintains a static font list with
  nearly only Bitmap-Fonts. It does internal AA via libart
  and requests the fonts in sizes that our X-Server doesn't
  provide because the :unscaled flag is set on bitmap fonts.
  The patch reorganizes Dia's font list to actually scaleable
  ones and fonts where scaling makes sense.
* Fri Feb 01 2002 - ro@suse.de
- changed neededforbuild <libpng> to <libpng-devel-packages>
* Fri Jun 15 2001 - egger@suse.de
- Updated to version 0.88.1.
- General specfile cleanup.
* Wed May 09 2001 - mfabian@suse.de
- bzip2 sources
* Wed Mar 21 2001 - ro@suse.de
- added esound-devel
* Sun Feb 25 2001 - egger@suse.de
- Remove unnecessary dependencies from #neededforbuild,
  especially imlib-config.
* Wed Jan 31 2001 - ro@suse.de
- changed neededforbuild <imlibcfe> to <imlib-config>
* Wed Nov 01 2000 - egger@suse.de
- Updated specfile to new long packagenames.
- Reworked specfile.
- Probably needs some more work; I'm taking care of that.
* Tue Aug 08 2000 - grimmer@suse.de
- update to 0.86
- moved man page to %%{_mandir}/man1
- added some more docu (doc/*)
* Wed May 24 2000 - egger@suse.de
- update to 0.85
* Tue Feb 29 2000 - grimmer@suse.de
- update to 0.84
- use BUILD_ROOT and strip binary during installation
* Wed Jan 26 2000 - grimmer@suse.de
- update to 0.83
- use version macro in spec file
* Tue Jan 04 2000 - grimmer@suse.de
- update to 0.82
- reworked package descriptions
- added NLS support
- added missing files to file list
* Thu Nov 11 1999 - ray@suse.de
- new package dia version 0.81
openSUSE Build Service is sponsored by