From: Craig P P. <pre...@ph...> - 2001-03-26 03:26:32
|
Hello; This note includes some small patches to the lpr, npadmin, and urw-fonts packages for building and installing from source rpms. I hope this is the right place to send this; if not please let me know. I tried following the instructions from http://hp.sourceforge.net/uhowto/eps-uhowto.php found on the GNUlpr home page. I have a Red Hat 6.2 Linux Alpha system, so install-binaries.sh doesn't work for me (no alpha binary rpms). So instead I built them from sources found at: ftp://lpr.sourceforge.net/pub/lpr/redhat-6.2/SRPMS/ Appended are the small patches I made for successful installation on my system and some little description about them. Cheers, Craig ****************** package: urw-fonts ****************** urw-fonts.spec Add a blank to chkfontpath conditionals, or rpm will complain. --- urw-fonts.spec~ Thu Feb 8 15:17:54 2001 +++ urw-fonts.spec Sun Mar 25 05:25:28 2001 @@ -38,11 +38,11 @@ } %post -[-f /usr/sbin/chkfontpath ] && /usr/sbin/chkfontpath -q -a /usr/share/fonts/default/Type1 +[ -f /usr/sbin/chkfontpath ] && /usr/sbin/chkfontpath -q -a /usr/share/fonts/default/Type1 %postun if [ "$1" = "0" ]; then - [-f /usr/sbin/chkfontpath ] && /usr/sbin/chkfontpath -q -r /usr/share/fonts/default/Type1 + [ -f /usr/sbin/chkfontpath ] && /usr/sbin/chkfontpath -q -r /usr/share/fonts/default/Type1 fi %clean ****************** package: lpr ****************** lpr.spec Add MANDIR to the make install command on alpha or install will fail. --- lpr.spec~ Fri Jan 26 22:48:52 2001 +++ lpr.spec Sun Mar 25 03:52:30 2001 @@ -36,7 +36,7 @@ %ifarch alpha # we shouldn't need this with more recent glibc's, but lpq kills remote # lpd w/o it and there seems to be a mistake in lpr's makefiles somewhere -make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Dgetline=get_line" DESTDIR=$RPM_BUILD_ROOT install +make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Dgetline=get_line" DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} install %else make DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} install %endif ****************** package: npadmin ****************** configure.in Move C++ stuff to the end, or AC_C_CONST and AC_C_INLINE will fail (they need the current language to be "C") and compilation (with gcc 2.95.2, anyway) will fail on npadmin.C due to a parse error in string.h. npadmin.spec In %files section, get compressed man page. diff -u configure.in~ configure.in --- configure.in~ Sun Mar 25 04:41:26 2001 +++ configure.in Sun Mar 25 04:40:45 2001 @@ -16,8 +16,6 @@ dnl We want these before the checks, so the checks can modify their values. AC_SUBST(LDFLAGS) -AC_LANG_CPLUSPLUS() - WARNS="" AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging (assumes gcc/gdb) [default=no]],WARNS="-W -Wall -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wshadow -O0 -ggdb3",AC_DEFINE(NDEBUG)) AC_SUBST(WARNS) @@ -27,18 +25,6 @@ AC_PROG_CC AC_PROG_CXX - -AC_MSG_CHECKING(whether compiler handles exceptions) -AC_TRY_COMPILE([],[try{}catch(int e){}],AC_MSG_RESULT(yes), - [AC_MSG_RESULT(no) - AC_MSG_CHECKING(whether compiler needs -fhandle-exceptions) - CXXFLAGS="-fhandle-exceptions -g" - __needs_excepthand_flag="-fhandle-exceptions" - AC_TRY_COMPILE([],[try{}catch(int e){}],AC_MSG_RESULT(yes), - [AC_MSG_RESULT(no) - AC_MSG_ERROR(C++ compiler must support exception handling.)]) -]) -AC_SUBST(__needs_excepthand_flag) dnl Checks for libraries. dnl Checks for header files. @@ -76,5 +62,19 @@ AC_CHECK_LIB(iberty, getopt_long)) AC_CHECK_LIB(pthread, pthread_join) + +AC_LANG_CPLUSPLUS() + +AC_MSG_CHECKING(whether compiler handles exceptions) +AC_TRY_COMPILE([],[try{}catch(int e){}],AC_MSG_RESULT(yes), + [AC_MSG_RESULT(no) + AC_MSG_CHECKING(whether compiler needs -fhandle-exceptions) + CXXFLAGS="-fhandle-exceptions -g" + __needs_excepthand_flag="-fhandle-exceptions" + AC_TRY_COMPILE([],[try{}catch(int e){}],AC_MSG_RESULT(yes), + [AC_MSG_RESULT(no) + AC_MSG_ERROR(C++ compiler must support exception handling.)]) +]) +AC_SUBST(__needs_excepthand_flag) AC_OUTPUT(Makefile npadmin.spec) diff -u npadmin.spec~ npadmin.spec --- npadmin.spec~ Fri Mar 16 19:28:28 2001 +++ npadmin.spec Sun Mar 25 04:57:46 2001 @@ -26,4 +26,4 @@ %files /usr/bin/npadmin -/usr/man/man1/npadmin.1 +/usr/man/man1/npadmin.1.gz |