File dx.spec of Package dx

#
# spec file for package dx (Version 4.4.4)
#
# 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/
#



Name:           dx
%define         samplesversion 4.4.0
BuildRequires:  ImageMagick-devel bison flex freeglut-devel freetype2-devel gcc-c++ libexpat0 libpng-devel libtiff-devel openmotif openmotif-devel tcsh update-desktop-files
%if %suse_version > 1000
BuildRequires:  libdrm-devel
%endif
BuildRequires:  fdupes
Version:        4.4.4
Release:        165
Summary:        IBM Open Visualization Data Explorer
License:        IBM Public License
Group:          Productivity/Graphics/Visualization/Other
Requires:       tcsh jre
AutoReqProv:    on
Url:            http://opendx.org/
Source0:        dx-%{version}.tar.bz2
Source1:        dxsamples-%{samplesversion}.tar.bz2
Source2:        dx.desktop
Patch0:         dx-%{version}-string.patch
Patch1:         dx-%{version}-rights.patch
Patch2:         dx-%{version}-xkiso.patch
Patch3:         dx-%{version}-uninitialized_var.patch
Patch4:         dx-%{version}-implicit_decl.patch
Patch5:         dx-%{version}-return_value.patch
Patch6:         dx-%{version}-increment.patch
Patch7:         dx-%{version}-undefined_code.patch
Patch8:         dx-%{version}-manpage.patch
Patch9:         dx-%{version}-linux-sys.patch
Patch10:        dx-%{version}-array-overflow.patch
Patch11:        %{name}-%{version}-gcc_43.patch
Patch12:        %{name}-%{version}-open.patch
Patch13:        %{name}-%{version}-ac.patch
Patch20:        dxsamples-%{samplesversion}-java.patch
Patch21:        dxsamples-%{samplesversion}-DESTDIR.patch
Patch22:        dxsamples-%{samplesversion}-rights.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Recommends:     dx-data=%{version}, dx-doc=%{version}, dx-devel=%{version}

%description
The Open Visualization Data Explorer is a visualization framework that
gives users the ability to apply advanced visualization and analysis
techniques to their data. These techniques can be applied to help users
gain new insights into data from applications in a wide variety of
fields including science, engineering, medicine, and business.



Authors:
--------
    (C) COPYRIGHT International Business Machines Corp. 1991-1997

%package doc
License:        IBM Public License
Summary:        Additional Package Documentation for dx
Group:          Productivity/Graphics/Visualization/Other
Provides:       dxdoc
Requires:       %{name} = %{version}
Obsoletes:      dxdoc
AutoReqProv:    on

%description doc
This package contains the documentation for the IBM Open Visualization
Data Explorer in HTML format.



Authors:
--------
    (C) COPYRIGHT International Business Machines Corp. 1991-1997

%package data
License:        IBM Public License
Summary:        Sample data for the IBM Open Visualization Data Explorer
Group:          Productivity/Graphics/Visualization/Other
Provides:       dxdata
Requires:       %{name} = %{version}
Obsoletes:      dxdata
AutoReqProv:    on

%description data
This package contains some sample data for the IBM Open Visualization
Data Explorer.



Authors:
--------
    (C) COPYRIGHT International Business Machines Corp. 1991-1997

%package devel
License:        IBM Public License
Summary:        Headers, static libs and source code files for the IBM Open Visualization Data Explorer
Group:          Development/Tools/Other
Requires:       %{name} = %{version}
AutoReqProv:    on
Requires:       glibc-devel libtiff-devel libjpeg-devel fontconfig-devel openmotif-devel
Requires:       libpng-devel zlib-devel libexpat-devel freetype2-devel
Requires:       xorg-x11-libXp-devel Mesa-devel xorg-x11-libXmu-devel xorg-x11-libXext-devel
Requires:       xorg-x11-libXt-devel xorg-x11-libX11-devel xorg-x11-libxcb-devel xorg-x11-libXau-devel xorg-x11-libSM-devel
Requires:       xorg-x11-devel xorg-x11-libXpm-devel xorg-x11-libXrender-devel xorg-x11-libICE-devel
%if  %suse_version > 1030
Requires:       liblcms-devel libbz2-devel ImageMagick-devel
%endif

%description devel
This package contains header C files, static libraries and source code
files for the IBM Open Visualization Data Explorer.



Authors:
--------
    (C) COPYRIGHT International Business Machines Corp. 1991-1997

%prep
%setup -q -b 1
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9 -p1
%patch10
%patch11
%patch12
%patch13
# samples
cd ../dxsamples-%{samplesversion}
%patch20
%patch21
%patch22

%build
%{?suse_update_config:%{suse_update_config -f}}
autoreconf -fi
%if "%(xft-config --prefix)" == "/usr"
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fsigned-char" \
CXXFLAGS="$RPM_OPT_FLAGS -fno-exceptions -fno-strict-aliasing -fsigned-char" \
./configure --prefix=/opt --mandir=%{_mandir} --x-includes=/usr/include  --x-libraries=%{_libdir} 
%else
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fsigned-char" \
CXXFLAGS="$RPM_OPT_FLAGS -fno-exceptions -fno-strict-aliasing -fsigned-char" \
./configure --prefix=/opt --mandir=%{_mandir}
%endif
# don't use make %{?jobs:-j%jobs}, it will fail
make 
#
# dx-samples
cd ../dxsamples-%{samplesversion}
autoreconf -fi
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
./configure --prefix=/opt 
# don't use make %{?jobs:-j%jobs}, it will fail
make 

%install
make DESTDIR=$RPM_BUILD_ROOT \
     prefix=/opt \
     install 
#
# dx samples
cd $RPM_BUILD_DIR/dxsamples-%{samplesversion}
make DESTDIR=$RPM_BUILD_ROOT \
     prefix=/opt \
     install 
#
install -d $RPM_BUILD_ROOT/usr/bin
ln -sf /opt/dx/bin/dx $RPM_BUILD_ROOT/usr/bin/dx
rm -f $RPM_BUILD_ROOT/opt/bin/dx
%suse_update_desktop_file -i dx Education Science Math
%fdupes -s $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,755)
%doc AUTHORS COPYING ChangeLog LICENSE NEWS README*
%doc /usr/share/man/man1/dx.1.gz
/usr/bin/dx
/usr/share/applications/dx.desktop
/opt/dx/bin/
/opt/dx/bin_linux/
/opt/dx/fonts/
/opt/dx/help/
/opt/dx/java/
/opt/dx/lib/
/opt/dx/lib_linux/
# .la files go into devel
%exclude /opt/dx/lib_linux/*.la
# header files goes into devel
%exclude /opt/dx/include
# .la files go into devel
%exclude /opt/dx/lib_linux
# source code goes into devel
%exclude /opt/dx/lib/outboard.c
/opt/dx/man/
/opt/dx/ui/
%dir /opt/dx/

%files doc
%defattr(-,root,root,755)
/opt/dx/doc/
/opt/dx/html/

%files data
%defattr(-,root,root,755)
/opt/dx/samples/
# Removing these precompiled executables which will cause a requirement on historic libc.so.1
# so they will not work anyway
%exclude /opt/dx/samples/data/externalfilter_*
%exclude /opt/dx/samples/data/externalfilter
# source code files goes into devel
%exclude /opt/dx/samples/*/*.c
%exclude /opt/dx/samples/*/*/*.c
%exclude /opt/dx/samples/*/*/*.h
%exclude /opt/dx/samples/*/*/*/*.c
# useless file
%exclude /opt/dx/samples/user/Makefile_os2
%exclude /opt/dx/samples/outboard/Makefile_os2

%files devel
%defattr(-,root,root,755)
/opt/dx/include
/opt/dx/lib_linux
/opt/dx/lib/outboard.c
/opt/dx/samples/*/*.c
/opt/dx/samples/*/*/*.c
/opt/dx/samples/*/*/*.h
/opt/dx/samples/*/*/*/*.c

%changelog
* Mon Apr 14 2008 schwab@suse.de
- Fix configure script.
* Fri Feb 15 2008 lmichnovic@suse.cz
- removed version in jre requirement
- excluding useless files Makefile_os2
- fixed missing Requires in devel subpackage
* Mon Nov 26 2007 lmichnovic@suse.cz
- fixed third argument of open (*open.patch)
* Mon Oct 29 2007 pgajdos@suse.cz
- fixed build with gcc 4.3 (gcc-43.patch)
* Sat Aug 11 2007 meissner@suse.de
- fixed 3 array overflows (index 3 instead of 2),
  and one misplaced ) causing undefined behaviour.
- build with ImageMagick too
* Mon Aug 06 2007 olh@suse.de
- remove inclusion of linux/sys.h
  fix prep section for quilt setup -v *.spec
* Tue Jun 12 2007 lmichnovic@suse.cz
- removing externalfilter* which caused Requirement on historic
  libc.so.1 [#282833]
* Mon Jun 11 2007 lmichnovic@suse.cz
- fixed broken Requires %%{name} = %%{version}; [#282833]
* Tue May 29 2007 lmichnovic@suse.cz
- splitted off devel sub package
- fixed strange name of man page and installing to %%_mandir
  (manpage.patch)
- using Recommends tag for subpackages
- using fdupes
- defining includedir and libdir of X due to change of prefix in
  X.org 7.x
* Wed May 23 2007 lmichnovic@suse.cz
- installing to /opt (it is O.K. with FHS)
* Fri Apr 27 2007 lmichnovic@suse.cz
- added renamed package libexpat0 into BuildRequires
* Thu Mar 29 2007 lmichnovic@suse.cz
- added bison and flex into BuildRequires
* Tue Feb 20 2007 lmichnovic@suse.cz
- removed bindir.patch, making symbolic link instead
* Thu Feb 15 2007 lmichnovic@suse.cz
- fixed bindir to /usr/bin (bindir.patch)
* Tue Feb 13 2007 lmichnovic@suse.cz
- moved from /opt to /usr/share
* Tue Jan 23 2007 lmichnovic@suse.cz
- fixed uninitialized matrix (added to uninitialized_var.patch)
- fixed undefined evaluation of code (undefined_code.patch)
* Mon Dec 11 2006 lmichnovic@suse.cz
- fixed non deterministic evaluation of code (increment.patch)
* Mon Sep 25 2006 lmichnovic@suse.cz
- update dx to version 4.4.4
  * Many bug fixes, few features.
  - obsoletes matrix.patch
* Tue Jun 27 2006 lmichnovic@suse.cz
- fixed wrong computation of a matrix (matrix.patch) [#188294]
* Fri May 19 2006 lmichnovic@suse.cz
- repacked tarball; problematic files has now correct licence [#170130]
* Wed Apr 19 2006 lmichnovic@suse.cz
- Added freetype2-devel into BuildRequires
* Mon Mar 13 2006 rguenther@suse.de
- use -fsigned-char for build
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 11 2006 lmichnovic@suse.cz
- update to version 4.4.0
- remade build section
- removed flex-old and add flex again from NFB
* Mon Jan 09 2006 ro@suse.de
- comment out stray malloc call
* Fri Dec 02 2005 lmichnovic@suse.cz
- changed needforbuild to build package with flex-old
* Mon Sep 26 2005 lmichnovic@suse.cz
- fixed uninitialized variables and implicit declaration
* Mon Sep 26 2005 ro@suse.de
- fix implicit declaration
* Fri Apr 22 2005 meissner@suse.de
- Original author cannot count to 4, fixed single
  byte buffer overflow.
- Fixed 0 -> NULL sentinels with X*Va calls.
* Mon Apr 26 2004 ro@suse.de
- added no-strict-aliasing
* Mon Feb 16 2004 ro@suse.de
- turn autoreqprov off for subpackage dx-data
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Mon Oct 13 2003 ro@suse.de
- drop explicit requires for mesa
* Sat Aug 16 2003 adrian@suse.de
- add desktop file
* Tue May 27 2003 ro@suse.de
- remove unpackaged files from buildroot
* Tue Feb 04 2003 ro@suse.de
- make it build (xkiso.dif get XK_ISO_ defined from keysymdefs.h)
* Fri Nov 29 2002 pmladek@suse.cz
- fixed includes to compile with gcc-3.3
- used <errno.h> to define the symbol errno
* Tue Nov 19 2002 ro@suse.de
- removed requires to lesstif (openmotif is used anyway)
* Tue Nov 19 2002 pmladek@suse.cz
- fixed to build with autoconf-2.56:
  * removed old aclocal.m4
  * removed duplicity in AC_OUTPUT
* Thu Nov 07 2002 tcrhak@suse.cz
- fixed for bison 1.75: end rules with semicolons,
  separate nonterminals in %%type declarations by spaces (not commas)
* Thu Aug 08 2002 pmladek@suse.cz
- updated to version 4.2.0
- added missing java samples from CVS
- removed obsolete patch which fixes duplicit line from
  java/usermacros/Makefile.am
- used mesa-devel-packages in neededforbuild
- java support is not built because it hardly depends on netsacape
* Wed Aug 07 2002 ro@suse.de
- no more netscape4 - no more netscape4 support
* Wed Apr 17 2002 pmladek@suse.cz
- fixed to compile with gcc-3.1
* Tue Apr 02 2002 pmladek@suse.cz
- fixed to compile samples.jar
* Fri Mar 29 2002 pmladek@suse.cz
- fixed to compile with autoconf-2.53
- removed duplicit line from java/usermacros/Makefile.am
* Tue Mar 05 2002 pmladek@suse.cz
- fixed rights of directories [#14415]
* Thu Feb 14 2002 ro@suse.de
- fix bad owner/group
* Fri Feb 01 2002 ro@suse.de
- changed neededforbuild <libpng> to <libpng-devel-packages>
* Fri Nov 30 2001 pmladek@suse.cz
- updated on version 4.1.3
- compiled also java parts
- compiled with support for netscape
- removed obsolete README.SuSE
- fixed compilation with BuildRoot
* Wed May 09 2001 uli@suse.de
- bzipped tarballs
* Tue Apr 17 2001 kukuk@suse.de
- Remove version macro for subpackage
* Wed Mar 07 2001 ro@suse.de
- changed neededforbuild <mesadev> to <mesa-devel>
* Fri Dec 15 2000 smid@suse.cz
- link /usr/bin/dx => ../../opt/dx/bin/dx added
* Wed Nov 29 2000 smid@suse.cz
- subpackages renamed: dxdoc => dx-doc; dxdata => dx-data
* Tue Nov 21 2000 ro@suse.de
- use openmotif
* Mon May 22 2000 smid@suse.cz
- mesadev added to neededforbuild
* Tue Apr 18 2000 smid@suse.cz
- upgrade to 4.1.0
- buildroot added
* Thu Feb 03 2000 marquardt@suse.de
- made work around for new axp gcc (added -fno-exceptions to CXXFLAGS)
* Thu Feb 03 2000 marquardt@suse.de
- splitted the big rpm into binary, data and doc rpms
* Tue Feb 01 2000 marquardt@suse.de
- fixed some bugs in configure{.in} for compilation on alpha arch
* Tue Jan 25 2000 uli@suse.de
- fixed A LOT of dirty code gcc-2.95 complains about
* Mon Jan 17 2000 marquardt@suse.de
- initial release
openSUSE Build Service is sponsored by