Skip to content
Snippets Groups Projects
Commit 42fbb23e authored by Scott Mindock's avatar Scott Mindock
Browse files

Add in nagg and where, patch rpaths

parent 39cbf958
No related branches found
No related tags found
No related merge requests found
Pipeline #50978 passed with warnings
......@@ -449,17 +449,47 @@ mk_cminpak(){
where()
{
cd ${BUILD}
mkdir where
cd where
rm *.o
cp ${ADL_COTS}/getday.c .
cp ${ADL_COTS}/gettim.c .
cp ${ADL_COTS}/where.f .
gfortran where.f gettim.c getday.c -o where
cp where ${USER_COTS_PATH}/bin
echo "${FUNCNAME[0]}"
cd ${BUILD} && \
mkdir where && \
cd where && \
rm "*.o" && \
cp ${ADL_COTS}/getday.c . && \
cp ${ADL_COTS}/gettim.c . && \
cp ${ADL_COTS}/where.f . && \
gfortran where.f gettim.c getday.c -o where && \
cp where ${USER_COTS_PATH}/bin && \
echo "${FUNCNAME[0]} finished" && \
return 0
}
nagg(){
echo "${FUNCNAME[0]}"
cd ${BUILD} && \
tar_name=hdf5_HL_REGION-1.1.5.tar.gz && \
rm -fr ${BUILD}/hdf5_HL_REGION* && \
install_the_source ${tar_name} && \
cd /hdf5_HL_REGION* && \
export HDF5_INSTALL_DIR=${USER_COTS_PATH} && \
export LDFLAGS="-static" && \
make
make install
cd ${BUILD} && \
tar_name=nagg-1.6.2.tar.gz && \
rm -fr ${BUILD}/nagg* && \
install_the_source ${tar_name} && \
cd nagg-1.6.2 && \
# Build nagg
patch -p1 < ${COTS_HOME}/scripts/revised_nagg.patch && \
./configure --with-hlregion=${USER_COTS_PATH}/lib && \
make && \
make install && \
cp nagg/bin/nagg ${USER_COTS_PATH}/bin && \
unset LDFLAGS && \
echo "${FUNCNAME[0]} finished" && \
return 0
}
wipe()
......@@ -516,8 +546,50 @@ fix_links()
return 0
}
_rpath_setter() {
DESIRED_RPATH=$1
ORIGIN_DIRECTORY=$2
cd $ORIGIN_DIRECTORY
EXES=$(ls *)
printf "Desired %s\n" '$DESIRED_RPATH'
for exe in ${EXES}; do
printf "Start for %s\n" $exe
#patchelf --remove-rpath $exe
patchelf --set-rpath $DESIRED_RPATH $exe
patchelf --shrink-rpath $exe
printf "Final for %s\n" $exe
patchelf --print-rpath $exe
ldd $exe
done
}
export ADL_HOME=${COTSBASE}/libexec/ADL
patch_adl_rpaths() {
DESIRED_RPATH='$ORIGIN:$ORIGIN/../../bin:$ORIGIN/../../lib:$ORIGIN/../../lib64:$ORIGIN/../bin:$ORIGIN/../lib:'
_rpath_setter $DESIRED_RPATH ${ADL_HOME}/lib
_rpath_setter $DESIRED_RPATH ${ADL_HOME}/bin
DESIRED_RPATH='$ORIGIN:$ORIGIN/../../../bin:$ORIGIN/../../../lib:$ORIGIN/../../../lib64:$ORIGIN/../../bin:$ORIGIN/../../lib:'
_rpath_setter $DESIRED_RPATH ${ADL_HOME}/tools/bin
cd ${ADL_HOME}/bin
special=$(ls *.exe)
for spec in $special; do
patchelf --replace-needed /SDR_x_x/libexec/ADL/lib/libProSdrAtmsController.so libProSdrAtmsController.so $spec
patchelf --replace-needed /SDR_x_x/libexec/ADL/lib/libProSdrViirsGeoController.so libProSdrViirsGeoController.so $spec
patchelf --replace-needed /SDR_x_x/libexec/ADL/lib/libProSdrViirsCalController.so libProSdrViirsCalController.so $spec
patchelf --replace-needed /SDR_x_x/libexec/ADL/lib/libProSdrCrisFSController.so libProSdrCrisFSController.so $spec
patchelf --replace-needed /SDR_x_x/libexec/ADL/lib/libProSdrOmpsNpEarthController.so libProSdrOmpsNpEarthController.so $spec
patchelf --replace-needed /SDR_x_x/libexec/ADL/lib/libProSdrOmpsTcEarthController.so libProSdrOmpsTcEarthController.so $spec
done
}
all()
{
DESIRED_RPATH='$ORIGIN:$ORIGIN/../bin:$ORIGIN/../lib:$ORIGIN/../lib64:'
wipe
for_container && \
mk_xerces && \
......@@ -538,8 +610,14 @@ all()
mk_libtool && \
mk_cminpak && \
mk_proto && \
where && \
nagg && \
fix_links && \
echo "COTS Built"
echo "COTS Built" && \
_rpath_setter $DESIRED_RPATH $USER_COTS_PATH/lib && \
_rpath_setter $DESIRED_RPATH $USER_COTS_PATH/lib64 && \
_rpath_setter $DESIRED_RPATH $USER_COTS_PATH/bin && \
echo "Rpaths patched"
}
adl()
......
This diff is collapsed.
#include <time.h>
#if defined(sun)
void getday_(int *);
#else
void getday_(int *iday);
#endif
#if defined(sun)
void getday_(int *iday)
#else
void getday_(int *iday)
#endif
/**** McIDAS-AIX Revision History *** */
/* 1 GETDAY.C 25-Sep-90,11:46:52,`DAVES' First release */
/* 2 GETDAY.C 2-Jan-91,11:54:18,`SMG' change revision history lines */
/* 3 GETDAY.C 3-Jan-91,10:48:38,`DAVES' Released */
/* 4 GETDAY.C 11-Feb-91,14:55:24,`SMG' add conditional compile option */
/* 5 GETDAY.C 8-Jul-91,15:52:00,`SUEG' conform to ANSI standards */
/* 6 GETDAY.C 9-Jul-91,13:43:04,`SUEG' ta e getgrax.c */
/**** McIDAS-AIX Revision History *** */
/*
Return current day (YYDDD)
*/
{
struct tm *timexx;
time_t nowtime;
time(&nowtime);
timexx = gmtime(&nowtime);
*iday = timexx->tm_year * 1000 + timexx->tm_yday + 1;
}
#include <time.h>
#if defined(sun)
void gettim_(long int *);
#else
void gettim_(long int *);
#endif
#if defined(sun)
void gettim_(long int *itime)
#else
void gettim_(long int *itime)
#endif
/**** McIDAS-AIX Revision History *** */
/* 1 GETTIM.C 25-Sep-90,11:46:46,`DAVES' First release */
/* 2 GETTIM.C 2-Jan-91,11:54:18,`SMG' change revision history comment lines */
/* 3 GETTIM.C 3-Jan-91,12:12:20,`SMG' released */
/* 4 GETTIM.C 11-Feb-91,14:55:22,`SMG' add conditional compile option */
/* 5 GETTIM.C 8-Jul-91,16:41:24,`SUEG' conform to ANSI standards */
/* 6 GETTIM.C 9-Jul-91,13:43:56,`SUEG' resequence */
/**** McIDAS-AIX Revision History *** */
/*
Return current time (HHMMSS)
*/
{
struct tm *timexx;
time_t nowtime;
time(&nowtime);
timexx = gmtime(&nowtime);
*itime = timexx->tm_hour * 10000 + timexx->tm_min * 100 + timexx->tm_sec;
}
File added
File added
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment