[xml/sgml-commit] [SCM] linuxdoc-tools package for Debian. branch, experimental, updated. debian/0.9.56-14-g5a75899

Agustin Martin Domingo agmartin at debian.org
Wed Sep 24 09:22:03 UTC 2008


The following commit has been merged in the experimental branch:
commit 5a758994ce469d669bf131c100a06f3efe54c698
Author: Agustin Martin Domingo <agmartin at debian.org>
Date:   Wed Sep 24 11:00:10 2008 +0200

    New perllibdir and texdir configure opts. Do not substitute linuxdoc.in here.
    
    * New configure options, texdir and perllibdir, so this addresses are set at
      the configuration stage. Modified debian/rules and Makefile.in to use them.
    * No longer substitute bin/linuxdoc.in from configure. Variables like
      ${pkgdatadir} were replaced unexpended this way. Better replace from
      Makefile as before, so everything (e.g., things like
      ${datadir}/linuxdoc-tools) is replaced fully expanded, as suggested in the
      'Installation Directory Variables' section of the autoconf manual.
    * Other changes in Makefile.in:
      - Explicitly pass perl5libdir to entities Makefile.
      - Pass $(prefix) prefixed with $(DESTDIR) when buildong docs.
    * bin/linuxdoc.in: Make sure we always look in @pkgdatadir@ and @perl5libdir@

diff --git a/Makefile.in b/Makefile.in
index a9e78f9..4ae46f7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -11,12 +11,14 @@ auxbindir          = @auxbindir@
 datadir            = @datadir@
 mandir             = @mandir@
 PERL               = @PERL@
-
+PERLWARN           = @PERLWARN@
+GROFFMACRO         = @GROFFMACRO@
 pkgdatadir         = @pkgdatadir@
+texdir             = @texdir@
+perl5libdir        = @perl5libdir@
+
 docdir             = $(prefix)/share/doc/linuxdoc-tools
 man1dir            = $(mandir)/man1
-texdir             = $(pkgdatadir)
-perl5libdir        = $(pkgdatadir)
 
 INSTALL            = @INSTALL@
 INSTALL_PROGRAM    = @INSTALL_PROGRAM@ -m 755
@@ -75,7 +77,7 @@ endif
 	    > genman/$$bn; \
 	done
 
-install::
+install:: bin/linuxdoc
 	@echo "Installing binaries in $(bin_ddir) ..."
 	[ -d $(bin_ddir) ] || mkdir -m 755 -p $(bin_ddir)
 # nsgmls or onsgmls should be installed already
@@ -92,7 +94,7 @@ endif
 ifeq ($(BUILD_ENTITY_MAP), true)
 	@echo "Installing Entity Mapping library (in entity-map)..."
 	( cd entity-map; \
-	  $(MAKE) install DESTDIR=$(DESTDIR))
+	  $(MAKE) install DESTDIR=$(DESTDIR) perl5libdir=$(perl5libdir))
 endif
 
 #    --
@@ -155,7 +157,7 @@ endif
 	@echo "Installing documentation in $(doc_ddir) ..."
 	(cd doc; \
 		PATH=${PATH}:$(bin_ddir) \
-		PREFIX=$(prefix) \
+		PREFIX=$(DESTDIR)$(prefix) \
 		AUXBINDIR=$(auxbin_ddir) \
 	 	PKGPERL5LIB=$(perl5lib_ddir) \
 	 	PKGDATADIR=$(pkgdata_ddir) \
@@ -184,6 +186,16 @@ ifeq ($(BUILD_ISO_ENTITIES), true)
      MDIRS += iso-entities
 endif
 
+bin/linuxdoc:: Makefile bin/linuxdoc.in
+	sed -e 's!\@prefix\@!$(prefix)!g' \
+	    -e 's!\@auxbindir\@!$(auxbindir)!g' \
+	    -e 's!\@pkgdatadir\@!$(pkgdatadir)!g' \
+	    -e 's!\@perl5libdir\@!$(perl5libdir)!g' \
+	    -e 's!\@PERL\@!$(PERL)!g' \
+	    -e 's!\@PERLWARN\@!$(PERLWARN)!g' \
+	    -e 's!\@GROFFMACRO\@!$(GROFFMACRO)!g' \
+	bin/linuxdoc.in > bin/linuxdoc
+
 clean::
 	-rm -f *~ bin/*~ bin/linuxdoc
 	for d in $(DDIRS) $(MDIRS) rtf-fix; do $(MAKE) -C $$d clean; done
diff --git a/bin/linuxdoc.in b/bin/linuxdoc.in
index cf0108f..0b85617 100755
--- a/bin/linuxdoc.in
+++ b/bin/linuxdoc.in
@@ -16,14 +16,12 @@ use strict;
 
 use vars qw($prefix $DataDir $AuxBinDir $progs);
 
-$prefix     = "@prefix@";
-$DataDir    = "@pkgdatadir@";
-$AuxBinDir  = "@auxbindir@";
+$prefix      = "@prefix@";
+$DataDir     = "@pkgdatadir@";
+$AuxBinDir   = "@auxbindir@";
 
 use lib "@pkgdatadir@";
-use lib "@prefix@/perl5";
-use lib "@prefix@/lib/perl5";
-use lib "@prefix@/share/perl5";
+use lib "@perl5libdir@";
 
 # ---------------------------------------------------------------------
 sub ldt_which {
diff --git a/configure b/configure
index cb5eb5d..5934743 100755
--- a/configure
+++ b/configure
@@ -23,8 +23,14 @@ ac_help="$ac_help
   --with-auxbindir=dir           dir for internal use programs
                                    (default: EPREFIX/bin)"
 ac_help="$ac_help
-  --with-pkgdatadir=dir          dir for package libraries
+  --with-pkgdatadir=dir          dir for package datadir
                                    (default: PREFIX/share/linuxdoc-tools)"
+ac_help="$ac_help
+  --with-perllibdir=dir          dir for package perl modules
+                                   (default: PKGDATADIR)"
+ac_help="$ac_help
+  --with-texdir=dir              dir for tex style files
+                                   (default: PKGDATADIR)"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -567,7 +573,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:571: checking for a BSD compatible install" >&5
+echo "configure:577: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -623,7 +629,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:627: checking for $ac_word" >&5
+echo "configure:633: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -679,7 +685,7 @@ fi
 # Extract the first word of "groff", so it can be a program name with args.
 set dummy groff; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:683: checking for $ac_word" >&5
+echo "configure:689: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GROFF'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -714,7 +720,7 @@ fi
 
 
 echo $ac_n "checking whether ${GROFF} accepts -mgs""... $ac_c" 1>&6
-echo "configure:718: checking whether ${GROFF} accepts -mgs" >&5
+echo "configure:724: checking whether ${GROFF} accepts -mgs" >&5
 if eval "test \"`echo '$''{'ac_cv_linuxdoctools_groff_mgs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -740,7 +746,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:744: checking for $ac_word" >&5
+echo "configure:750: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -784,7 +790,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:788: checking for $ac_word" >&5
+echo "configure:794: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_NSGMLS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -828,7 +834,7 @@ test -n "$NSGMLS" || NSGMLS="notfound"
 # Extract the first word of "sgmlsasp", so it can be a program name with args.
 set dummy sgmlsasp; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:832: checking for $ac_word" >&5
+echo "configure:838: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SGMLSASP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -907,9 +913,9 @@ fi
 
 
 
-# Check whether --with-pkgdatadirdir or --without-pkgdatadirdir was given.
-if test "${with_pkgdatadirdir+set}" = set; then
-  withval="$with_pkgdatadirdir"
+# Check whether --with-pkgdatadir or --without-pkgdatadir was given.
+if test "${with_pkgdatadir+set}" = set; then
+  withval="$with_pkgdatadir"
   pkgdatadir="$withval"
 else
   pkgdatadir="\${prefix}/share/linuxdoc-tools"
@@ -918,6 +924,28 @@ fi
 
 
 
+# Check whether --with-perllibdir or --without-perllibdir was given.
+if test "${with_perllibdir+set}" = set; then
+  withval="$with_perllibdir"
+  perl5libdir="$withval"
+else
+  perl5libdir="\${pkgdatadir}"
+
+fi
+
+
+
+# Check whether --with-texdir or --without-texdir was given.
+if test "${with_texdir+set}" = set; then
+  withval="$with_texdir"
+  texdir="$withval"
+else
+  texdir="\${pkgdatadir}"
+
+fi
+
+
+
 if test "$BUILD_NSGMLS" = "true"
 then
   SUB=sp
@@ -1048,7 +1076,7 @@ done
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "Makefile bin/linuxdoc" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -1096,6 +1124,8 @@ s%@BUILD_ENTITY_MAP@%$BUILD_ENTITY_MAP%g
 s%@BUILD_ISO_ENTITIES@%$BUILD_ISO_ENTITIES%g
 s%@auxbindir@%$auxbindir%g
 s%@pkgdatadir@%$pkgdatadir%g
+s%@perl5libdir@%$perl5libdir%g
+s%@texdir@%$texdir%g
 s%@subdirs@%$subdirs%g
 
 CEOF
@@ -1138,7 +1168,7 @@ EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"Makefile bin/linuxdoc"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
diff --git a/configure.in b/configure.in
index a210cec..02388ab 100644
--- a/configure.in
+++ b/configure.in
@@ -24,7 +24,7 @@ fi
 
 dnl ------ Make perl a bit more verbose if desired ---------
 AC_ARG_WITH(perl-w,
-  [  --with-perl-w                  use perl -w option],
+   [  --with-perl-w                  use perl -w option],
    PERLWARN=-w,
    PERLWARN=
 )
@@ -64,7 +64,7 @@ AC_SUBST(BUILD_NSGMLS)
 dnl ------ Check for sgmlsasp ------------------------------
 AC_PATH_PROG(SGMLSASP, sgmlsasp)
 AC_ARG_WITH(installed-sgmlsasp,
-[  --with-installed-sgmlsasp      use installed sgmlsasp],
+   [  --with-installed-sgmlsasp      use installed sgmlsasp],
    test -n "$SGMLSASP" || AC_MSG_ERROR(sgmlsasp not found)
    BUILD_SGMLSASP=,
    SGMLSASP=\${prefix}/bin/sgmlsasp
@@ -75,7 +75,7 @@ AC_SUBST(BUILD_SGMLSASP)
 
 dnl ------ Check if we will use installed entity-map -------
 AC_ARG_WITH(installed-entity-map,
-[  --with-installed-entity-map    use installed entity-map],
+   [  --with-installed-entity-map    use installed entity-map],
    BUILD_ENTITY_MAP=,
    BUILD_ENTITY_MAP=true
 )
@@ -83,7 +83,7 @@ AC_SUBST(BUILD_ENTITY_MAP)
 
 dnl ------ Check if we will use installed iso-entities -----
 AC_ARG_WITH(installed-iso-entities,
-[  --with-installed-iso-entities  use installed iso-entities],
+   [  --with-installed-iso-entities  use installed iso-entities],
    BUILD_ISO_ENTITIES=,
    BUILD_ISO_ENTITIES=true
 )
@@ -99,14 +99,32 @@ AC_ARG_WITH(auxbindir,
 AC_SUBST(auxbindir)
 
 dnl ------ Set dir for package datadir --------------------
-AC_ARG_WITH(pkgdatadirdir,
-  [  --with-pkgdatadir=dir          dir for package libraries]
+AC_ARG_WITH(pkgdatadir,
+  [  --with-pkgdatadir=dir          dir for package datadir]
   [                                 (default: PREFIX/share/linuxdoc-tools)],
   pkgdatadir="$withval",
   pkgdatadir="\${prefix}/share/linuxdoc-tools"
 )
 AC_SUBST(pkgdatadir)
 
+dnl ------ Set dir for package perl modules ---------------
+AC_ARG_WITH(perllibdir,
+  [  --with-perllibdir=dir          dir for package perl modules]
+  [                                 (default: PKGDATADIR)],
+  perl5libdir="$withval",
+  perl5libdir="\${pkgdatadir}"
+)
+AC_SUBST(perl5libdir)
+
+dnl ------ Set dir for tex style files --------------------
+AC_ARG_WITH(texdir,
+  [  --with-texdir=dir              dir for tex style files]
+  [                                 (default: PKGDATADIR)],
+  texdir="$withval",
+  texdir="\${pkgdatadir}"
+)
+AC_SUBST(texdir)
+
 dnl ------ Create list of possible extra subdirs -----------
 if test "$BUILD_NSGMLS" = "true"
 then
@@ -124,7 +142,7 @@ fi
 
 AC_CONFIG_SUBDIRS($SUB)
 
-AC_OUTPUT([Makefile bin/linuxdoc])
+AC_OUTPUT(Makefile)
 
 if test "$BUILD_SGMLSASP" = "true"
 then
diff --git a/debian/rules b/debian/rules
index 52db706..016663f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -44,7 +44,9 @@ build-stamp:
 	./configure --prefix=/usr \
 	 	--mandir=$(MANDIR) \
 		--with-installed-nsgmls \
-		--with-auxbindir=/usr/lib/linuxdoc-tools
+		--with-auxbindir=/usr/lib/linuxdoc-tools \
+		--with-perllibdir=/usr/share/perl5 \
+		--with-texdir=/usr/share/texmf/tex/latex/misc
 
 	$(MAKE) OPTIMIZE="-g -O2"
 
@@ -76,10 +78,7 @@ install: build
 	dh_installdirs
 
 # --- do 'make install'
-	$(MAKE)	DESTDIR=$(DESTDIR) \
-		perl5libdir=/usr/share/perl5 \
-		texdir=/usr/share/texmf/tex/latex/misc \
-		install
+	$(MAKE)	DESTDIR=$(DESTDIR) install
 
 # --- Install shell scripts for sgml2{txt,latex,info}
 	for i in txt latex info; do \
diff --git a/doc/Makedoc.sh b/doc/Makedoc.sh
index 69ba534..0539b26 100644
--- a/doc/Makedoc.sh
+++ b/doc/Makedoc.sh
@@ -29,13 +29,14 @@ sed < ../entity-map/EntityMap.pm.in > $TMPDIR/Text/EntityMap.pm \
  -e 's|\@localentitymapdir\@|'${PKGDATADIR}'/../entity-map|g' \
  -e 's|\@entitymapdir\@|'${PKGDATADIR}'/../entity-map/0.1.0|g'
 
-sed < ../bin/linuxdoc.in >$TMPDIR/linuxdoc \
- -e 's!\@prefix\@!'${PREFIX}'!' \
- -e 's!\@auxbindir\@!'${AUXBINDIR}'!' \
- -e 's!\@pkgdatadir\@!'${TMPDATADIR}'!' \
- -e 's!\@GROFFMACRO\@!-ms!' \
- -e 's!\@PERL\@!'${PERL}'!' \
- -e 's!\@PERLWARN\@!!'
+sed < ../bin/linuxdoc.in > $TMPDIR/linuxdoc \
+ -e 's!\@prefix\@!'${PREFIX}'!g' \
+ -e 's!\@auxbindir\@!'${AUXBINDIR}'!g' \
+ -e 's!\@pkgdatadir\@!'${TMPDATADIR}'!g' \
+ -e 's!\@perl5libdir\@!'${TMPDIR}'!g' \
+ -e 's!\@GROFFMACRO\@!-ms!g' \
+ -e 's!\@PERL\@!'${PERL}'!g' \
+ -e 's!\@PERLWARN\@!!g'
 
 chmod u+x $TMPDIR/linuxdoc
 

-- 
linuxdoc-tools package for Debian.



More information about the debian-xml-sgml-commit mailing list