Commits

Anonymous committed 60e7727

support for slc6 + bump to root-5.32.02

Comments (0)

Files changed (12)

 
  - fix ld-library-path empty slots on macosx (prevents uuid to be correctly discovered)
  - fix ``ROOTSYS`` detection in ``waf shell``
-
-
+ - add detection of bz2 headers+libs (so ``boost`` won't fail
+   "mysteriously")
+ - add detection of Xpm and Xft so ``ROOT`` won't fail "mysteriously"
+ - add detection of ncurses (for ``cmake``)
 
 Troubleshooting
 ---------------
 
    $ yum install \
    bzip2-devel \
-   libXpm-devel
+   libXpm-devel \
+   ncurses-devel
 
 

pkg/builders/boost/wscript

     ctx.env['BOOST_BJAM_COMPILE_FLAGS'] = ' '.join(
         ctx.env['CXXFLAGS']
         +ctx.env['CXXFLAGS_python']
+        +ctx.env['CPPFLAGS']
         )
-
+    
     ctx.env['BOOST_TOOLSET'] = 'gcc'
     if ctx.waffle_utils._is_darwin(ctx):
         ctx.env['BOOST_TOOLSET'] = 'darwin'

pkg/builders/cmake/cmake_configure.sh

 #!/bin/sh
 
-export CFLAGS=${EXT_BUNDLED_CMAKE_CFLAGS}
-export CXXFLAGS=${EXT_BUNDLED_CMAKE_CXXFLAGS}
+export CFLAGS="${EXT_BUNDLED_CMAKE_CFLAGS} ${EXT_BUNDLED_CMAKE_CPPFLAGS}"
+export CXXFLAGS="${EXT_BUNDLED_CMAKE_CXXFLAGS} ${EXT_BUNDLED_CMAKE_CPPFLAGS}"
 
 ../cmake/configure --prefix=${EXT_BUNDLED_CMAKE_PREFIX} --parallel=2

pkg/builders/cmake/wscript

         env['EXT_BUNDLED_CMAKE_%s' % kk] = env[kk]\
                                            .replace(' -ansi ', ' ')\
                                            .replace(' -Wall ', ' ')
+    env['EXT_BUNDLED_CMAKE_CPPFLAGS'] = env['CPPFLAGS']
     
     ctx.declare_build_external(
         name='cmake',

pkg/builders/gccxml/gccxml_configure.sh

 #!/bin/sh
 
-export CFLAGS=${EXT_BUNDLED_GCCXML_CCFLAGS}
-export CCFLAGS=${EXT_BUNDLED_GCCXML_CCFLAGS}
-export CXXFLAGS=${EXT_BUNDLED_GCCXML_CXXFLAGS}
+export CFLAGS="${EXT_BUNDLED_GCCXML_CCFLAGS} ${EXT_BUNDLED_GCCXML_CPPFLAGS}"
+export CCFLAGS="${EXT_BUNDLED_GCCXML_CCFLAGS} ${EXT_BUNDLED_GCCXML_CPPFLAGS}"
+export CXXFLAGS="${EXT_BUNDLED_GCCXML_CXXFLAGS} ${EXT_BUNDLED_GCCXML_CPPFLAGS}"
 
 ${EXT_BUNDLED_GCCXML_CMAKE} \
     ../gccxml \

pkg/builders/gccxml/wscript

         env['EXT_BUNDLED_GCCXML_%s' % kk] = env[kk]\
                                             .replace(' -ansi ', ' ')\
                                             .replace(' -Wall ', ' ')
+    env['EXT_BUNDLED_GCCXML_CPPFLAGS'] = env['CPPFLAGS']
+    
     env['EXT_BUNDLED_GCCXML_CMAKE'] = ctx.env.CMAKE
     ctx.declare_build_external(
         name="gccxml",
         install_dir = 'gccxml-install',
         configure_cmd = '%s/gccxml_configure.sh' % ctx.path.abspath(),
         #build_cmd = "make",
-        build_cmd = 'make -j%s' % waflib.Options.options.jobs,            
+        build_cmd = 'make -j%s' % waflib.Options.options.jobs,
         install_cmd = "make install",
         env=env,
+        shell=True
         )
     msg.warn('building gccxml from sources... [done]')
 

pkg/builders/root/root_configure.sh

+#!/bin/sh
+
+export EXTRA_CXXFLAGS="${EXT_BUNDLED_ROOT_CXXFLAGS}"
+export EXTRA_CFLAGS="${EXT_BUNDLED_ROOT_CFLAGS}"
+
+echo "CXXFLAGS: [${EXTRA_CXXFLAGS}]"
+../ROOT/configure \
+    ${EXT_BUNDLED_ROOT_CONFIG_ARCH} \
+    --enable-python \
+    --with-python-incdir=${INCLUDES_python} \
+    --with-python-libdir=${LIBPATH_python} \
+    --enable-xrootd \
+    --with-xrootd=${EXT_BUNDLED_XROOTD_PREFIX} \
+    --enable-mathmore \
+    --enable-minuit2 \
+    --enable-roofit \
+    --enable-unuran \
+    --enable-fftw3 \
+    --enable-reflex \
+    --with-gccxml=${GCCXML_BINDIR} \
+    --enable-cintex \
+    --enable-qt \
+    --enable-qtgsi \
+    --enable-builtin-freetype \
+    --enable-builtin-pcre \
+    --enable-table \
+    --enable-explicitlink \
+    --enable-gdml \
+    --disable-rpath \
+    --with-cint-maxstruct=36000 \
+    --with-cint-maxtypedef=36000 \
+    --with-cint-longline=4096 \
+    || exit 1
+
+make showbuild || exit 1
+
+#exit 1

pkg/builders/root/root_patch.diff

+diff -urN ROOT-orig/config/Makefile.in ROOT/config/Makefile.in
+--- ROOT-orig/config/Makefile.in	2012-04-04 14:09:30.860532472 +0200
++++ ROOT/config/Makefile.in	2012-04-04 14:11:34.182532424 +0200
+@@ -25,8 +25,8 @@
+ USECONFIG      := @useconfig@
+ MKLIBOPTIONS   := @mkliboption@
+ 
+-EXTRA_CFLAGS   := -Iinclude @cflags@
+-EXTRA_CXXFLAGS := -Iinclude @cflags@
++EXTRA_CFLAGS   := -Iinclude @cflags@ -D__USE_XOPEN2K8 -std=c99
++EXTRA_CXXFLAGS := -Iinclude @cflags@ -D__USE_XOPEN2K8
+ EXTRA_LDFLAGS  := @ldflags@
+ WINRTDEBUG     := @winrtdebug@
+ 

pkg/builders/root/root_patch.sh

+#!/bin/sh
+
+patch_file=$1; shift
+
+cd ../ROOT || exit 1
+patch -p1 < $patch_file || exit 1
+

pkg/builders/root/wscript

 
     msg.warn('building ROOT from sources...')
 
-    ctx.env['EXT_BUNDLED_ROOT_VERSION'] = '5.32.00'
+    ctx.env['EXT_BUNDLED_ROOT_VERSION'] = '5.32.02'
     ctx.env['EXT_BUNDLED_ROOT_PREFIX'] = subst_vars(
         '${EXTERNAL_AREA}/root/${EXT_BUNDLED_ROOT_VERSION}/${CMTCFG}/root',
         ctx.env)
     #gccxml_dir = os.path.dirname(
     #    subst_vars('${GCCXML}', ctx.env)
     #    )
-    configure_cmd = ' '.join([
-        '../ROOT/configure',
-        root_config_arch,
-        "--enable-python",
-        "--with-python-incdir=${INCLUDES_python}",
-        "--with-python-libdir=${LIBPATH_python}",
-        "--enable-xrootd",
-        "--with-xrootd=${EXT_BUNDLED_XROOTD_PREFIX}",
-        "--enable-mathmore",
-        "--enable-minuit2",
-        "--enable-roofit",
-        "--enable-unuran",
-        #"--enable-gsl",
-        "--enable-fftw3",
-        #"--enable-pythia8",
-        "--enable-reflex",
-        "--with-gccxml=${GCCXML_BINDIR}",
-        "--enable-cintex",
-        #"--enable-globus",
-        #"--enable-gfal",
-        #"--enable-rfio",
-        #"--enable-castor",
-        #"--enable-dcache",
-        "--enable-qt",
-        "--enable-qtgsi",
-        "--enable-builtin-freetype",
-        #"--enable-oracle",
-        #"--enable-mysql",
-        "--enable-builtin-pcre",
-        "--enable-table",
-        "--enable-explicitlink",
-        "--enable-gdml",
-        "--disable-rpath",
-        "--with-cint-maxstruct=36000",
-        "--with-cint-maxtypedef=36000",
-        "--with-cint-longline=4096",
-        ])
+    ctx.env['EXT_BUNDLED_ROOT_CONFIG_ARCH'] = root_config_arch
+    
+    env = waffle_utils._get_env_for_subproc(ctx)
+    env['CXXFLAGS'] += ' '+env['CPPFLAGS']
+    env['CCFLAGS'] += ' '+env['CPPFLAGS']
+    env['CFLAGS'] += ' '+env['CPPFLAGS']
+
+    for k in ('CXXFLAGS', 'CFLAGS'):
+        env['EXT_BUNDLED_ROOT_%s'%k] = env[k]\
+                                       .replace(' -ansi ', ' -std=c99 ')\
+                                       .replace(' -Wall ', ' ')
+
     ctx.declare_build_external(
         name='ROOT',
         url = 'root_v${EXT_BUNDLED_ROOT_VERSION}.source.tar.gz',
-        url_md5 = '1c30e4e6eeae62ff1ad5118cd1309679',
+        url_md5 = '614a00632ab11fb33d2002800aabdcc7',
         install_dir = 'ROOT-install',
-        configure_cmd = configure_cmd,
-        build_cmd = 'make -j%s' % waflib.Options.options.jobs,
-        #install_cmd = 'make DESTDIR=${BUNDLED_ROOT_ROOT} install',
+        patch_cmd = ' '.join([
+            '%s/root_patch.sh' % ctx.path.abspath(),
+            '%s/root_patch.diff' % ctx.path.abspath(),
+            ]),
+        configure_cmd = '%s/root_configure.sh' % ctx.path.abspath(),
+        #configure_cmd = configure_cmd,
+        #build_cmd = 'make -j%s' % waflib.Options.options.jobs,
+        build_cmd = 'make -j2',
         install_cmd = 'make install ROOTSYS=${EXT_BUNDLED_ROOT_PREFIX}',
-        #install_cmd = 'make install --prefix=${BUNDLED_ROOT_ROOT}',
-        #env=env,
+        env=env,
         )
     msg.warn('building ROOT from sources... [done]')
     ctx.env['BUNDLED_ROOT'] = 1

pkg/builders/xrootd/wscript

         '-DENABLE_CRYPTO=TRUE',
         #'-DENABLE_KRB5=TRUE',
         '-DENABLE_READLINE=TRUE',
+        #'${CPPFLAGS}',
+        '-DCMAKE_CXX_FLAGS:STRING=\"${CPPFLAGS} ${CXXFLAGS}\"',
         ])
     ctx.declare_build_external(
         name='xrootd',
         url = 'xrootd-${EXT_BUNDLED_XROOTD_VERSION}.tar.gz',
         url_md5 = '72efa1278bce2edd2bcaab9db24851ba',
         install_dir = 'xrootd-install',
-        configure_cmd = configure_cmd,
+        configure_cmd = '%s/xrootd_configure.sh' % ctx.path.abspath(),
+        #configure_cmd = configure_cmd,
         build_cmd = 'make -j%s' % waflib.Options.options.jobs,
         install_cmd = "make install",
         )

pkg/builders/xrootd/xrootd_configure.sh

+#!/bin/sh
+
+${CMAKE} ../xrootd \
+    -DCMAKE_INSTALL_PREFIX:PATH=${EXT_BUNDLED_XROOTD_PREFIX} \
+    -DENABLE_PERL=FALSE \
+    -DENABLE_FUSE=FALSE \
+    -DENABLE_CRYPTO=TRUE \
+    -DENABLE_READLINE=TRUE \
+    -DCMAKE_CXX_FLAGS:STRING="${CPPFLAGS} ${CXXFLAGS}"