Ticket #13: sherpa-1.1.1-relocation.patch
File sherpa-1.1.1-relocation.patch, 4.4 KB (added by , 16 years ago) |
---|
-
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 18 18 19 19 Library_Loader::Library_Loader(): m_wait(3600) 20 20 { 21 char *var = NULL; 21 22 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); 23 25 } 24 26 25 27 bool 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 88 88 s_variables["SHERPA_LIB_PATH"]=std::string(((var=getenv("SHERPA_LIB_PATH"))==NULL?"":var)); 89 89 s_variables["SHERPA_DAT_PATH"]=std::string(((var=getenv("SHERPA_DAT_PATH"))==NULL?"":var)); 90 90 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)); 92 92 s_variables["SHERPA_RUN_PATH"]=getenv("PWD"); 93 93 s_variables["HOME"]=std::string(((var=getenv("HOME"))== 94 94 NULL?s_variables["SHERPA_RUN_PATH"]:var)); … … 97 97 98 98 void Run_Parameter::Init(std::string path,std::string file,int argc,char* argv[]) 99 99 { 100 char *var=NULL; 100 101 m_path = path; 101 102 path=s_variables["PATH_PIECE"]; 102 103 gen.m_timer.Start(); … … 131 132 std::string pdfpath=dr.GetValue<std::string>("SHERPA_PDF_PATH",std::string("")); 132 133 if (pdfpath.length()>0 && pdfpath[0]=='/') s_variables["SHERPA_PDF_PATH"]=pdfpath; 133 134 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)); 136 137 // set cpp path 137 138 std::string cpppath=dr.GetValue<std::string>("SHERPA_CPP_PATH",std::string("")); 138 139 if (cpppath.length()>0 && cpppath[0]=='/') s_variables["SHERPA_CPP_PATH"]=cpppath; … … 145 146 else if (s_variables["SHERPA_LIB_PATH"].length()==0) 146 147 s_variables["SHERPA_LIB_PATH"]=s_variables["SHERPA_CPP_PATH"] 147 148 +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)); 149 150 if (s_variables["SHERPA_DAT_PATH"].length()==0) 150 151 if (path.length()>0 && path[0]=='/') s_variables["SHERPA_DAT_PATH"]=path; 151 152 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 15 15 16 16 IDUSR=`finger $USER | grep Name | cut -d":" -f3` 17 17 18 # One more dirty hack to enable linking w/o -rpath: 19 # 20 _topdir=`pwd` 21 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(find . -type 'd' | grep -v Decaydata | sed "s,^,${_topdir}/,;s,[ ]*$,/.libs,;" | tr '\n' ':') 22 # 23 18 24 rmr () { 19 25 for file in `ls -a` ; do 20 26 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 16 16 AC_PROG_CC 17 17 AC_PROG_F77 18 18 AC_F77_LIBRARY_LDFLAGS 19 AM_PROG_LIBTOOL 19 20 dnl #AM_PROG_LIBTOOL 21 22 AC_PROG_LIBTOOL 23 24 dnl # Patching libtool to disable linking with -rpath. 25 dnl # Taken from Wmaker-0.91 configure.ac. 26 dnl # [ by Marcelo Magallon <mmagallo@efis.ucr.ac.cr> ] 27 28 AC_MSG_RESULT([Disabling linking with -rpath]) 29 mv libtool libtool.orig && \ 30 sed "s,^hardcode_libdir_flag_spec.*$,hardcode_libdir_flag_spec=\" -D__RPATH_GAG__ \",;" \ 31 < libtool.orig > libtool 32 chmod 755 libtool 33 20 34 dnl Checks for header files. 21 35 AC_HEADER_STDC 22 36 dnl Checks for typedefs, structures, and compiler characteristics.