ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/graphviz.spec
Revision: 1.20
Committed: Wed Jan 23 14:20:15 2008 UTC (17 years, 3 months ago) by eulisse
Branch: MAIN
Changes since 1.19: +8 -7 lines
Log Message:
More fixes to get latest graphviz working
* Using static linking on slc* architecture to avoid system libltld linking
  on slc4_amd64
* Disabling freetype only on slc*

File Contents

# User Rev Content
1 elmer 1.17 ### RPM external graphviz 2.16.1-CMS19
2     Source: http://www.graphviz.org/pub/%{n}/ARCHIVE/%{n}-%{realversion}.tar.gz
3 ratnik 1.4 Requires: expat zlib libjpg libpng
4 eulisse 1.1
5     %prep
6 elmer 1.12 %setup -n %{n}-%{realversion}
7 eulisse 1.1
8     %build
9 eulisse 1.19 which gcc
10     LIB64_SUFFIX=
11 eulisse 1.18 case %cmsplatf in
12 eulisse 1.19 *_ia32_* )
13 eulisse 1.18 export LD_LIBRARY_PATH=`echo $LD_LIBRARY_PATH | sed -e 's|lib64|lib|g'`
14 eulisse 1.20 ADDITIONAL_OPTIONS="--without-freetype --disable-shared --enable-static --disable-libtdl"
15 eulisse 1.19 ;;
16     *_amd64_* )
17     LIB64_SUFFIX=64
18 eulisse 1.20 ADDITIONAL_OPTIONS="--without-freetype --disable-shared --enable-static --disable-libtdl"
19 eulisse 1.19 ;;
20     osx* )
21     ADDITIONAL_OPTIONS=
22 eulisse 1.18 ;;
23     esac
24 ratnik 1.4 ./configure \
25 eulisse 1.19 --with-expatlibdir=$EXPAT_ROOT/lib$LIB64_SUFFIX \
26 ratnik 1.4 --with-expatincludedir=$EXPAT_ROOT/include \
27     --with-zincludedir=$ZLIB_ROOT/include \
28 eulisse 1.20 --with-zlibdir=$ZLIB_ROOT/lib \
29 ratnik 1.4 --with-pngincludedir=$LIBJPG_ROOT/include \
30 eulisse 1.20 --with-pnglibdir=$LIBJPG_ROOT/lib \
31 ratnik 1.4 --with-jpegincludedir=$LIBPNG_ROOT/include \
32 eulisse 1.20 --with-jpeglibdir=$LIBPNG_ROOT/lib \
33 ratnik 1.4 --without-x \
34 elmer 1.9 --without-tclsh \
35 eulisse 1.5 --without-tcl \
36 eulisse 1.18 --without-fontconfig \
37 argiro 1.6 --without-tk \
38 eulisse 1.18 --without-perl \
39     --without-python \
40     --without-ruby \
41     --disable-ruby \
42     --disable-perl \
43     --without-pangocairo \
44     --without-fontconfig \
45     --without-gdk-pixbuf \
46     --disable-sharp \
47     --disable-guile \
48     --disable-java \
49     --disable-lua \
50     --disable-ocaml \
51     --disable-perl \
52     --disable-php \
53     --disable-python \
54 eulisse 1.19 --prefix=%{i} \
55     $ADDITIONAL_OPTIONS
56    
57 elmer 1.8 # This is a workaround for the fact that sort from coreutils 5.96 doesn't
58     # like "sort +0 -1", not really something specific to ppc64/ydl5.0
59     if [ "$(uname -m)" == "ppc64" ]
60     then
61     perl -p -i -e "s|\+0 \-1|-k1,1|g" dotneato/common/Makefile
62     fi
63 elmer 1.17 # Probably the configure should just be remade on Darwin, but it builds
64     # as-is with this small cleanup
65     %ifos darwin
66     perl -p -i -e "s|-lexpat||g" configure
67     %endif
68 eulisse 1.20 make %makeprocesses
69 muzaffar 1.14
70     %install
71     make install
72 eulisse 1.20 ln -s dot_static %i/bin/dot
73    
74 muzaffar 1.14 # SCRAM ToolBox toolfile
75     mkdir -p %i/etc/scram.d
76     cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
77     <doc type=BuildSystem::ToolDoc version=1.0>
78     <Tool name=%n version=%v>
79     <info url="http://www.research.att.com/sw/tools/graphviz/"></info>
80     <Client>
81     <Environment name=GRAPHVIZ_BASE default="%i"></Environment>
82     <Environment name=GRAPHVIZ_BINDIR default="$GRAPHVIZ_BASE/bin"></Environment>
83     <Environment name=LIBDIR default="$GRAPHVIZ_BASE/lib/graphviz"></Environment>
84     </Client>
85     <Runtime name=PATH value="$GRAPHVIZ_BINDIR" type=path>
86     <Use name=expat>
87     <Use name=zlib>
88     <Use name=libjpg>
89     <use name=libpng>
90     </Tool>
91     EOF_TOOLFILE
92    
93 eulisse 1.7 %post
94 elmer 1.17 # It appears one needs to list at least one explicitly as the macro adds
95     # the prefix, but then the find can add it and the others (also with the
96     # prefix)
97     %{relocateConfig}/lib/libgraph.la `find $RPM_INSTALL_PREFIX/%pkgrel/lib -name *.la`
98 muzaffar 1.14 %{relocateConfig}etc/scram.d/%n