IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ticket #571: pslib-0.8.99-dump_sed.patch

File pslib-0.8.99-dump_sed.patch, 5.4 KB (added by jhoblitt, 21 years ago)

patch to replace build time dep. on sed with perl

  • configure.ac

    RCS file: /usr/local/cvs/repositories/pan-starrs/datasys/IPP/psLib/configure.ac,v
    retrieving revision 1.51
    diff -u -r1.51 configure.ac
     
    1111PSLIB_LT_VERSION="0:9:0"
    1212AC_SUBST(PSLIB_LT_VERSION,$PSLIB_LT_VERSION)
    1313
    14 dnl Determine the location of GNU sed
    15 AC_CHECK_PROGS([SED],[gsed sed])
    16 if test "${SED}" == ""
    17 then
    18   AC_MSG_ERROR([GNU SED is required.])
    19 fi
    20 AC_SUBST(SED,[${SED}])
     14dnl ------------------- PERL options ---------------------
     15  AC_ARG_WITH(perl,
     16    [AS_HELP_STRING(--with-perl=FILE,Specify location of PERL executable.)],
     17    [AC_CHECK_PROG(PERL, $withval, $withval)],
     18    [AC_CHECK_PROG(PERL, perl, `which perl`)])
     19    if test "$PERL" == ""
     20    then
     21      AC_MSG_ERROR([PERL is required.  Use --with-perl to specify its install location.])
     22    fi
     23    AC_SUBST(PERL,$PERL)
    2124
    2225SUBDIR="etc src test" dnl don't include 'swig', as it is optional
    2326
    2427SRCPATH='${top_srcdir}/src'
    2528SRCDIRS="sys astro db fft fits imageops math mathtypes types xml"
    26 SRCINC=`echo "${SRCDIRS=}" | ${SED} "s|\(\\w\+\)|-I\${SRCPATH=}/\1|g"`
     29# escape two escapes at this level so \\ gets passed to the shell and \ to perl
     30SRCINC=`echo "${SRCDIRS=}" | ${PERL} -pe "s|(\w+)|-I\\\\${SRCPATH=}/\1|g"`
    2731SRCINC="-I${SRCPATH=} ${SRCINC=}"
    28 SRCSUBLIBS=`echo "${SRCDIRS=}" | ${SED} "s|\(\\w\+\)|\1/libpslib\1.la|g"`
     32SRCSUBLIBS=`echo "${SRCDIRS=}" | ${PERL} -pe "s|(\w+)|\1/libpslib\1.la|g"`
    2933AC_SUBST(SRCSUBLIBS,${SRCSUBLIBS=})
    3034AC_SUBST(SRCINC,${SRCINC=})
    3135AC_SUBST(ABS_SRCDIR,`pwd`) dnl assuming configure is run in top directory -- is there something better?
     
    238242     [AC_MSG_ERROR([SWIG is required.  Obtain it at www.swig.org or use --with-swig to specify its install location.])])
    239243  SUBDIR="${SUBDIR=} swig"
    240244
    241 dnl ------------------- PERL options ---------------------
    242   AC_ARG_WITH(perl,
    243     [AS_HELP_STRING(--with-perl=FILE,Specify location of PERL executable.)],
    244     [AC_CHECK_PROG(PERL, $withval, $withval)],
    245     [AC_CHECK_PROG(PERL, perl, `which perl`)])
    246     if test "$PERL" == ""
    247     then
    248       AC_MSG_ERROR([PERL is required.  Use --with-perl to specify its install location.])
    249     fi
    250     AC_SUBST(PERL,$PERL)
    251 
    252245dnl ---------------- PERLPREFIX option -------------------
    253246  AC_ARG_WITH(perlprefix,
    254247    [AS_HELP_STRING(--with-perlprefix=DIR,Specify prefix of Perl Module's installation. (default=PREFIX))],
  • ./etc/pslib/Makefile.am

    RCS file: /usr/local/cvs/repositories/pan-starrs/datasys/IPP/psLib/etc/pslib/Makefile.am,v
    retrieving revision 1.9
    diff -u -r1.9 Makefile.am
     
    77EXTRA_DIST = psTime.xml pslib.config.template
    88
    99pslib.config: pslib.config.template
    10         sed 's|PREFIX|$(prefix)|' $? > $@
     10        $(PERL) -pe 's|PREFIX|$(prefix)|' $? > $@
    1111
    1212$(sysconfdir)/pslib:
    1313        mkdir -p -m 755 $(sysconfdir)/pslib
  • ./src/Makefile.am

    RCS file: /usr/local/cvs/repositories/pan-starrs/datasys/IPP/psLib/src/Makefile.am,v
    retrieving revision 1.18
    diff -u -r1.18 Makefile.am
     
    2424        psErrorText.h
    2525
    2626install-exec-hook: libpslib.la
    27         sed "s|\(^dependency_libs=.*\)|dependency_libs=\'$(PSLIB_LIBS)\'|" $(libdir)/libpslib.la > libpslib.la.temp
     27        $(PERL) -pe "s|(^dependency_libs=.*)|dependency_libs=\'$(PSLIB_LIBS)\'|" $(libdir)/libpslib.la > libpslib.la.temp
    2828        $(INSTALL) libpslib.la.temp $(libdir)/libpslib.la
  • ./swig/Makefile.am

    RCS file: /usr/local/cvs/repositories/pan-starrs/datasys/IPP/psLib/swig/Makefile.am,v
    retrieving revision 1.18
    diff -u -r1.18 Makefile.am
     
    66
    77# this is going into a make file one directory deeper in the tree so the
    88# realitive paths need to be adjusted
    9 SWIGINC=`echo "${SRCINC}" | ${SED} "s|-I|-I../|g"`
     9SWIGINC=`echo "${SRCINC}" | ${PERL} -pe "s|-I|-I../|g"`
    1010
    1111####################################################
    1212## PsLibModule swig build section.
  • ./test/astro/Makefile.am

    RCS file: /usr/local/cvs/repositories/pan-starrs/datasys/IPP/psLib/test/astro/Makefile.am,v
    retrieving revision 1.11
    diff -u -r1.11 Makefile.am
     
    4343CLEANFILES = $(TESTS) $(check_DATA) temp/*
    4444
    4545pslib.config: $(top_srcdir)/etc/pslib/pslib.config.template
    46         sed 's|PREFIX|$(top_srcdir)|' $? > $@
     46        $(PERL) -pe 's|PREFIX|$(top_srcdir)|' $? > $@
    4747
    4848test.psTime.config1: data/test.psTime.config1.template
    4949        cp $? $@
    5050
    5151test.psTime.config2: data/test.psTime.config2.template
    52         sed 's|PREFIX|$(top_srcdir)|' $? > $@
     52        $(PERL) -pe 's|PREFIX|$(top_srcdir)|' $? > $@
    5353
    5454test.psTime.config3: data/test.psTime.config3.template
    55         sed 's|PREFIX|$(top_srcdir)|' $? > $@
     55        $(PERL) -pe 's|PREFIX|$(top_srcdir)|' $? > $@
    5656
    5757test.psTime.config4: data/test.psTime.config4.template
    5858        cp $? $@