sherpa is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" (/hepforge/svn/sherpa does not appear to be a Subversion repository.). Look in the Trac log for more information.

Ticket #13: sherpa-1.1.1-relocation.patch

File sherpa-1.1.1-relocation.patch, 4.4 KB (added by Oleg.Zenin@cern.ch, 16 years ago)

Previous patch with LD_LIBRARY_PATH inserted into TOOLS/makeinstall

  • ATOOLS/Org/Library_Loader.C

    diff -Naur SHERPA-MC-1.1.1/ATOOLS/Org/Library_Loader.C SHERPA-MC-1.1.1.NEW/ATOOLS/Org/Library_Loader.C
    old new  
    1818
    1919Library_Loader::Library_Loader(): m_wait(3600)
    2020{
     21  char *var = NULL;
    2122  m_paths=EnvironmentVariable(LD_PATH_NAME);
    22   m_paths.push_back(SHERPA_LIBRARY_PATH);
     23  var = getenv ("SHERPA_LIBRARY_PATH");
     24  m_paths.push_back(var ? var : SHERPA_LIBRARY_PATH);
    2325}
    2426
    2527bool Library_Loader::CreateLockFile(const std::string &lockname)
  • ATOOLS/Org/Run_Parameter.C

    diff -Naur SHERPA-MC-1.1.1/ATOOLS/Org/Run_Parameter.C SHERPA-MC-1.1.1.NEW/ATOOLS/Org/Run_Parameter.C
    old new  
    8888  s_variables["SHERPA_LIB_PATH"]=std::string(((var=getenv("SHERPA_LIB_PATH"))==NULL?"":var));
    8989  s_variables["SHERPA_DAT_PATH"]=std::string(((var=getenv("SHERPA_DAT_PATH"))==NULL?"":var));
    9090  s_variables["LD_LIBRARY_PATH"]=std::string(((var=getenv("LD_LIBRARY_PATH"))==NULL?"":var));
    91   s_variables["SHERPA_BIN_PATH"]=SHERPA_BINARY_PATH;
     91  s_variables["SHERPA_BIN_PATH"]=std::string(((var=getenv("SHERPA_BIN_PATH"))==NULL?SHERPA_BINARY_PATH:var));
    9292  s_variables["SHERPA_RUN_PATH"]=getenv("PWD");
    9393  s_variables["HOME"]=std::string(((var=getenv("HOME"))==
    9494                                   NULL?s_variables["SHERPA_RUN_PATH"]:var));
     
    9797
    9898void Run_Parameter::Init(std::string path,std::string file,int argc,char* argv[])
    9999{
     100  char *var=NULL;
    100101  m_path = path;
    101102  path=s_variables["PATH_PIECE"];
    102103  gen.m_timer.Start();
     
    131132  std::string pdfpath=dr.GetValue<std::string>("SHERPA_PDF_PATH",std::string(""));
    132133  if (pdfpath.length()>0 && pdfpath[0]=='/') s_variables["SHERPA_PDF_PATH"]=pdfpath;
    133134  else if (s_variables["SHERPA_PDF_PATH"].length()==0)
    134     s_variables["SHERPA_PDF_PATH"]=SHERPA_SHARE_PATH;
    135   s_variables["SHERPA_SHARE_PATH"]=SHERPA_SHARE_PATH;
     135    s_variables["SHERPA_PDF_PATH"]=std::string(((var=getenv("SHERPA_SHARE_PATH"))==NULL?SHERPA_SHARE_PATH:var));
     136  s_variables["SHERPA_SHARE_PATH"]=std::string(((var=getenv("SHERPA_SHARE_PATH"))==NULL?SHERPA_SHARE_PATH:var));
    136137  // set cpp path
    137138  std::string cpppath=dr.GetValue<std::string>("SHERPA_CPP_PATH",std::string(""));
    138139  if (cpppath.length()>0 && cpppath[0]=='/') s_variables["SHERPA_CPP_PATH"]=cpppath;
     
    145146  else if (s_variables["SHERPA_LIB_PATH"].length()==0)
    146147    s_variables["SHERPA_LIB_PATH"]=s_variables["SHERPA_CPP_PATH"]
    147148      +std::string("/Process/lib");
    148   s_variables["SHERPA_INC_PATH"]=SHERPA_INCLUDE_PATH;
     149  s_variables["SHERPA_INC_PATH"]=std::string(((var=getenv("SHERPA_INC_PATH"))==NULL?SHERPA_INCLUDE_PATH:var));
    149150  if (s_variables["SHERPA_DAT_PATH"].length()==0)
    150151    if (path.length()>0 && path[0]=='/') s_variables["SHERPA_DAT_PATH"]=path;
    151152    else s_variables["SHERPA_DAT_PATH"]=s_variables["SHERPA_RUN_PATH"]+"/"+path;
  • TOOLS/makeinstall

    diff -Naur SHERPA-MC-1.1.1/TOOLS/makeinstall SHERPA-MC-1.1.1.NEW/TOOLS/makeinstall
    old new  
    1515
    1616IDUSR=`finger $USER | grep Name | cut -d":" -f3`
    1717
     18# One more dirty hack to enable linking w/o -rpath:
     19#
     20_topdir=`pwd`
     21export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(find . -type 'd' | grep -v Decaydata | sed "s,^,${_topdir}/,;s,[ ]*$,/.libs,;" | tr '\n' ':')
     22#
     23
    1824rmr () {
    1925  for file in `ls -a` ; do   
    2026    if [ $file != . ] && [ $file != .. ]; then
  • SHERPA-MC-1.1.1

    diff -Naur SHERPA-MC-1.1.1/configure.in SHERPA-MC-1.1.1.NEW/configure.in
    old new  
    1616AC_PROG_CC
    1717AC_PROG_F77
    1818AC_F77_LIBRARY_LDFLAGS
    19 AM_PROG_LIBTOOL
     19
     20dnl #AM_PROG_LIBTOOL
     21
     22AC_PROG_LIBTOOL
     23
     24dnl # Patching libtool to disable linking with -rpath.
     25dnl # Taken from Wmaker-0.91 configure.ac.
     26dnl # [ by Marcelo Magallon <mmagallo@efis.ucr.ac.cr> ]
     27
     28AC_MSG_RESULT([Disabling linking with -rpath])
     29mv libtool libtool.orig && \
     30sed "s,^hardcode_libdir_flag_spec.*$,hardcode_libdir_flag_spec=\" -D__RPATH_GAG__ \",;" \
     31< libtool.orig > libtool
     32chmod 755 libtool
     33
    2034dnl Checks for header files.
    2135AC_HEADER_STDC
    2236dnl Checks for typedefs, structures, and compiler characteristics.