dx stable port information

Package: dx
Version: 4.4.4
Revision: 1507
Source: http://opendx.sdsc.edu/source/%n-%v.tar.gz
Source-MD5: 6da0c4cd21d3c08f97b7662e3aee5b7b
PatchFile: %n.patch
PatchFile-MD5: c96d6e6a6be650d562daafcf05d09d2f
PatchScript: <<
%{default_script}
perl -pi -e 's/unsigned\s(int.*arg)/\1/g' \
src/uipp/base/Application.h \
src/uipp/base/Application.C \
src/uipp/base/IBMApplication.h \
src/uipp/base/IBMApplication.C \
src/uipp/dxui/Main.C \
src/uipp/dxuilib/DXApplication.h \
src/uipp/dxuilib/DXApplication.C \
src/uipp/mb/MBApplication.h \
src/uipp/mb/MBApplication.C \
src/uipp/mb/Main.C \
src/uipp/prompter/GARApplication.h \
src/uipp/prompter/GARApplication.C \
src/uipp/prompter/Main.C \
src/uipp/startup/Main.C \
src/uipp/startup/StartupApplication.h \
src/uipp/startup/StartupApplication.C \
src/uipp/tutor/Main.C \
src/uipp/tutor/TutorApplication.C \
src/uipp/tutor/TutorApplication.h
perl -pi -e 's/DestroyConstitute/ConstituteComponentTerminus/g' \
src/exec/dxmods/_im_image.c
<<
BuildDepends: autoconf2.6, automake1.11, fink-package-precedence, fontconfig2-dev (>= 2.8.0-4), freetype219 (>= 2.3.12-1), imagemagick2-dev, libjpeg8, libtiff (>= 3.7.2-1001), libtool2, netcdf7, openmotif4, x11-dev
Depends: freetype219-shlibs (>= 2.3.12-1), hdf (>= 4.2r1-1001), imagemagick2-shlibs, libjpeg8-shlibs, libtiff-shlibs (>= 3.7.2-1001), netcdf7-shlibs, openmotif4-shlibs, x11
ConfigureParams: --prefix=%p/share --exec_prefix=%p --with-motif-libs=%p/lib --with-motif-includes=%p/include --without-javadx --with-large-arenas --enable-dependency-tracking --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib
UseMaxBuildJobs: false
SetLIBS: -lz
SetCFLAGS: -g -O2
SetCPPFLAGS: -I%p/opt/netcdf7/include
SetLDFLAGS: -L%p/opt/netcdf7/lib
GCC:4.0
CompileScript:<<
%p/bin/autoreconf -f -i
./configure ac_cv_exeext='' ac_cv_lib_xm_XmStringFree='no' ac_cv_lib_xt_XtVaGetValues='no' %c
make
fink-package-precedence .
<<
InstallScript: <<
make install DESTDIR=%d
ln -s %p/include %i/share/dx
<<
DocFiles: <<
LICENSE NEWS README doc/README COPYING doc/README_SMP
<<
License: OSI-Approved
Description: Open Visualization Data Explorer
DescDetail: <<
Open Visualization Data Explorer is a full visualization environment 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. Data Explorer
provides a full set of tools for manipulating, transforming, processing,
realizing, rendering and animating data and allow for visualization and
analysis methods based on points, lines, areas, volumes, images or geometric
primitives in any combination. Data Explorer is discipline-independent and
easily adapts to new applications and data. The integrated object-oriented
graphical user interface is intuitive to learn and easy to use.
(http://www.research.ibm.com/dx/dxDescription.html)
<<
DescPort: <<
The original program installed itself in %p/dx, which is against fink policy.
Various makefile.am were modified so that fink installed the bulk of the
program in %p/share/dx, while installing binaries, includes, manfiles, etc.
in %p/bin, %p/include, %p/share/man etc. Using %p/lib breaks things, so
I've left the "libraries" in %/p/share/dx/lib.
Disables java dx.
Fixed the -morehelp option.
Now uses openmotif3, as lesstif doesn't render some widgets correctly.
Corrected configure.ac so all necesary hdf libaries are compiled in.
Placed a symbolic link between %p/include and %p/share/dx/include to aid in
porting downstream packages with "smart" configure scripts.

Adds work around discussed in Apple Technical Q&A 1567:Compiling X11/ OpenGL
applications on Mac OS X v.10.5 Leopard. Fixes StartWebBrowser.C to compile
with Leopard's ApplicationServices.h

Patch to allow compiling if ImageMagick was built with --enable-hdri
(require positive int for array subscript in _im_image.c). See:
http://www.imagemagick.org/script/high-dynamic-range.php

akh: patch instances of "argc" to be an int rather than
unsigned int to keep clang happy.
patch _im_image.c to deal with a change in the ImageMagick API (shocker!)
cf.:
https://bugs.launchpad.net/ubuntu/+source/transcode/+bug/539106
<<
DescPackaging: <<
dmacks: Hack configure to use moderner check for ImageMagick.

dmacks: hdf (v4) requires g95, but switching dx to use hdf5
seems non-trivial. Use dx-hdf5 to add support for newer hdf*
functionality into dx.

Can't move to gcc43 because it won't tolerate that main() is
written with argc as an unsigned int instead of int, so then
passing pointers to it give invalid conversion...too deeply
embedded to make a simple change to solve it.

drm: The 10.6 version of dx uses /usr/bin/gcc-4.2 rather than
fink's gcc42 package (which is not available in 10.6).

dmacks: hdf may enable szip as well as jpeg but is still
static-only so have to pass its dep-libs linker flags. Also
therefore keeping libjpeg at old libversion because that's
what hdf uses.
<<
Homepage: http://www.opendx.org
Maintainer: Jeremy Erwin

dx stable port .patch

diff -urN dx-4.4.4/bin/Makefile.am dx-new/bin/Makefile.am
--- dx-4.4.4/bin/Makefile.am 2003-07-11 20:11:37.000000000 -0400
+++ dx-new/bin/Makefile.am 2011-12-04 22:58:28.000000000 -0500
@@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in

dxbindir = $(prefix)/dx/bin
-bindir = $(prefix)/bin
+bindir = $(exec_prefix)/bin

EXTRA_SCRIPTS = mdf2c dx
EXTRA_DIST = url_handler.sh
diff -urN dx-4.4.4/bin/dx.in dx-new/bin/dx.in
--- dx-4.4.4/bin/dx.in 2004-05-31 12:12:05.000000000 -0400
+++ dx-new/bin/dx.in 2011-12-04 22:58:28.000000000 -0500
@@ -60,10 +60,10 @@
#
longhelp() {

-if test -f "$dxroot/man/catl/dx.l" ; then
- more "$dxroot/man/catl/dx.l"
+if test -f "$dxroot/../man/catl/dx.l" ; then
+ more "$dxroot/../man/catl/dx.l"
else
- echo "cannot find $dxroot/man/catl/dx.l"
+ echo "cannot find $dxroot/../man/catl/dx.l"
echo "set the DXROOT environment variable to the root of the"
echo "dx installation tree and try again."
fi
diff -urN dx-4.4.4/configure.ac dx-new/configure.ac
--- dx-4.4.4/configure.ac 2006-08-21 17:56:08.000000000 -0400
+++ dx-new/configure.ac 2011-12-04 22:58:28.000000000 -0500
@@ -218,6 +218,7 @@
dnl End of command line options configuration

dnl Start DX configuration
+AC_PROG_CXX
AC_LANG([C++])
AC_CHECK_HEADERS(stdlib.h)
AC_LANG([C])
@@ -505,6 +506,11 @@
LIBS="-L$xm_libraries $LIBS"
fi

+if test "$ARCH" = "macos" ; then
+ LDFLAGS="$LDFLAGS -dylib_file \
+ /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
+/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
+fi
AC_CHECK_LIB(GL, glXGetConfig)
AC_CHECK_LIB(GLU, gluBuild2DMipmaps)

@@ -677,7 +683,7 @@
fi
dnl -- check for unix
else
- AC_CHECK_LIB(df,Hopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,[ -lz -ljpeg ])
+ AC_CHECK_LIB(df,Hopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,[ -lz -ljpeg -lsz ])
AC_MSG_CHECKING(if HDF package is complete)
if test $passed -gt 0
then
@@ -686,7 +692,7 @@
AC_MSG_RESULT(no -- some components failed test)
have_hdf='no (failed tests)'
else
- LIB_HDF='-ldf'
+ LIB_HDF='-ldf -ljpeg -lsz '
LIBS="$LIB_HDF $LIBS"
FMT_LIBS="$FMT_LIBS libdf.a"
AC_DEFINE(HAVE_LIBDF, 1, [Define to 1 if you have the HDF libraries])
@@ -801,7 +807,12 @@

failed=0;
passed=0;
+ if test "$HAVE_MC" = "yes" ; then
+ mysave_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="`Magick-config --cppflags` $CPPFLAGS"
+ fi
AC_CHECK_HEADER([magick/api.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
+ CPPFLAGS=$mysave_CPPFLAGS
if test "$ARCH" = "intelnt" ; then
AC_CHECK_LIB(CORE_RL_magick_,Hopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
AC_MSG_CHECKING(if ImageMagick package is complete)
@@ -836,7 +847,7 @@

if test "$HAVE_MC" = "yes" ; then
LIB_MAGICK="`Magick-config --ldflags` `Magick-config --libs`"
- AC_CHECK_LIB( Magick,GetImageInfo, passed=`expr $passed + 1`, failed=`expr $failed + 1`, [ $LIB_MAGICK ])
+ AC_CHECK_LIB( MagickCore,GetImageInfo, passed=`expr $passed + 1`, failed=`expr $failed + 1`, [ $LIB_MAGICK ])
AC_MSG_CHECKING(if ImageMagick package is complete)
if test $passed -gt 0
then
diff -urN dx-4.4.4/include/Makefile.am dx-new/include/Makefile.am
--- dx-4.4.4/include/Makefile.am 2006-04-08 23:44:49.000000000 -0400
+++ dx-new/include/Makefile.am 2011-12-04 22:58:28.000000000 -0500
@@ -1,4 +1,4 @@
-dxincdir = $(prefix)/dx/include
+dxincdir = $(exec_prefix)/include
SUBDIRS = dx
dxinc_HEADERS = dxl.h dxstereo.h
nodist_dxinc_HEADERS = dxconfig.h
diff -urN dx-4.4.4/include/dx/Makefile.am dx-new/include/dx/Makefile.am
--- dx-4.4.4/include/dx/Makefile.am 1999-05-25 19:35:16.000000000 -0400
+++ dx-new/include/dx/Makefile.am 2011-12-04 22:58:28.000000000 -0500
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in

-dxincdir = $(prefix)/dx/include/dx
+dxincdir = $(exec_prefix)/include/dx

dxinc_HEADERS = \
UserInteractors.h advanced.h arch.h array.h arrayhandles.h \
diff -urN dx-4.4.4/man/catl/Makefile.am dx-new/man/catl/Makefile.am
--- dx-4.4.4/man/catl/Makefile.am 1999-04-05 07:56:00.000000000 -0400
+++ dx-new/man/catl/Makefile.am 2011-12-04 22:58:28.000000000 -0500
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in

-catdir = $(prefix)/dx/man/catl
+catdir = $(exec_prefix)/share/man/catl

cat_DATA = dx.l
EXTRA_DIST = $(cat_DATA)
diff -urN dx-4.4.4/man/manl/Makefile.am dx-new/man/manl/Makefile.am
--- dx-4.4.4/man/manl/Makefile.am 2002-05-20 00:47:06.000000000 -0400
+++ dx-new/man/manl/Makefile.am 2011-12-04 22:58:28.000000000 -0500
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in

-mandir = $(prefix)/dx/man
+mandir = $(exec_prefix)/share/man

man_MANS = dx.l
EXTRA_DIST = $(man_MANS)
diff -urN dx-4.4.4/src/exec/dpexec/packet.c dx-new/src/exec/dpexec/packet.c
--- dx-4.4.4/src/exec/dpexec/packet.c 2006-04-27 11:34:53.000000000 -0400
+++ dx-new/src/exec/dpexec/packet.c 2011-12-05 00:26:25.000000000 -0500
@@ -143,6 +143,8 @@
{
if (sts > 0 && (!tmpbufferused || *tmpbufferused == 0))
{
+ //see http://www.opendx.org/bugs/view.php?id=251
+ sts=0; // MHM change in case IOCTL fails
if(SFILEIoctl(_dxd_exSockFD, FIONBIO, &one) >= 0)
sts = writeToSFILE(_dxd_exSockFD, packet, length);
SFILEIoctl(_dxd_exSockFD, FIONBIO, &zero);
diff -urN dx-4.4.4/src/exec/dxmods/_im_image.c dx-new/src/exec/dxmods/_im_image.c
--- dx-4.4.4/src/exec/dxmods/_im_image.c 2006-01-05 17:55:43.000000000 -0500
+++ dx-new/src/exec/dxmods/_im_image.c 2011-12-04 22:58:28.000000000 -0500
@@ -999,8 +999,11 @@
/* Opacities in colormap is wrong; use direct color map */
if ( image->matte )
for ( x = 0; x < width; x++ )
- omap[*(indexes2++)] = ( 1.0 -
+ {
+ int omap_index = *(indexes2++); // if Magick has HDRI, Quantum is a float
+ omap[(omap_index < 0 ? 0 : omap_index)] = ( 1.0 - // clamp if negative
((float) (pixies++)->opacity) / MaxRGB );
+ }
}
} else
DXErrorGoto( ERROR_INTERNAL, "unexpected image field format" );
diff -urN dx-4.4.4/src/uipp/base/StartWebBrowser.C dx-new/src/uipp/base/StartWebBrowser.C
--- dx-4.4.4/src/uipp/base/StartWebBrowser.C 2005-12-16 16:11:51.000000000 -0500
+++ dx-new/src/uipp/base/StartWebBrowser.C 2011-12-04 22:58:28.000000000 -0500
@@ -13,6 +13,11 @@
#include

#if defined(macos)
+#define _UINT64
+#define _UINT32
+#define _UINT16
+#define _UINT8
+
#include
#endif

dx _unstable_ port .patch