[xml/sgml-commit] r92 - in packages/xerces/xerces23/trunk/debian: . patches

Jay Berkenbilt ejb-guest@haydn.debian.org
Tue, 20 Apr 2004 16:36:37 -0600


Author: ejb-guest
Date: 2004-04-20 16:35:45 -0600 (Tue, 20 Apr 2004)
New Revision: 92

Added:
   packages/xerces/xerces23/trunk/debian/patches/ICUTransService.cpp.patch
   packages/xerces/xerces23/trunk/debian/patches/IconvGNUTransService.compile.fix.patch
Removed:
   packages/xerces/xerces23/trunk/debian/libxerces23-dev.dirs
   packages/xerces/xerces23/trunk/debian/libxerces23-dev.docs
   packages/xerces/xerces23/trunk/debian/libxerces23.dirs
   packages/xerces/xerces23/trunk/debian/libxerces23.postinst
   packages/xerces/xerces23/trunk/debian/libxercesicu23.dirs
   packages/xerces/xerces23/trunk/debian/libxercesicu23.postinst
   packages/xerces/xerces23/trunk/debian/oldpatches/
   packages/xerces/xerces23/trunk/debian/patches/007_IconvGNUTransService.compile.fix.patch
   packages/xerces/xerces23/trunk/debian/scripts/
   packages/xerces/xerces23/trunk/debian/sys-build.mk
Modified:
   packages/xerces/xerces23/trunk/debian/
   packages/xerces/xerces23/trunk/debian/changelog
   packages/xerces/xerces23/trunk/debian/control
   packages/xerces/xerces23/trunk/debian/copyright
   packages/xerces/xerces23/trunk/debian/rules
Log:
new maintainer, incorporate NMU, repackage using cdbs


Property changes on: packages/xerces/xerces23/trunk/debian
___________________________________________________________________
Name: mergeWithUpstream
   + 1

Modified: packages/xerces/xerces23/trunk/debian/changelog
===================================================================
--- packages/xerces/xerces23/trunk/debian/changelog	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/changelog	2004-04-20 22:35:45 UTC (rev 92)
@@ -1,9 +1,20 @@
 xerces23 (2.3.0-2) unstable; urgency=low
 
-  * Bla.
+  * New maintainer.
+  * includes change from NMU (Closes: #234230)
+  * repackage using cdbs and fixing lintian warnings
+  * fixed copy/paste error in description for doc package
 
- -- Ivo Timmermans <ivo@debian.org>  Fri, 10 Oct 2003 09:46:34 +0200
+ -- Jay Berkenbilt <ejb@ql.org>  Sun, 18 Apr 2004 10:03:32 -0400
 
+xerces23 (2.3.0-1.1) unstable; urgency=low
+
+  * Non-maintainer upload
+  * debian/rules: install config.status for -dev package to support
+    building libxml-xerces-perl version 2.3.0.  (Closes: #234230)
+
+ -- Jay Berkenbilt <ejb@ql.org>  Wed, 17 Mar 2004 17:06:15 -0500
+
 xerces23 (2.3.0-1) unstable; urgency=low
 
   * New upstream version.  (Package is based on xerces21.)
@@ -38,7 +49,7 @@
 
 xerces21 (2.1.0-4) unstable; urgency=low
 
-  * control: libxerces21-dev conflicts with libxerces20-dev 
+  * control: libxerces21-dev conflicts with libxerces20-dev
 
  -- Guillaume Morin <gemorin@debian.org>  Tue, 10 Dec 2002 11:17:32 +0100
 
@@ -64,7 +75,3 @@
     As soon as this package will enter sid, I'll request xerces20 removal.
 
  -- Guillaume Morin <gemorin@debian.org>  Tue, 03 Sep 2002 11:50:24 +0200
-
-Local variables:
-mode: debian-changelog
-End:

Modified: packages/xerces/xerces23/trunk/debian/control
===================================================================
--- packages/xerces/xerces23/trunk/debian/control	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/control	2004-04-20 22:35:45 UTC (rev 92)
@@ -1,17 +1,17 @@
 Source: xerces23
 Section: libs
 Priority: extra
-Build-Depends: debhelper (>= 3.0), libicu21-dev, autoconf
-Maintainer: Ivo Timmermans <ivo@debian.org>
-Standards-Version: 3.5.10
+Build-Depends: debhelper (>= 4.0), libicu21-dev, autoconf, xutils, cdbs
+Maintainer: Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>
+Standards-Version: 3.6.1
 
 Package: libxerces23-dev
 Section: libdevel
 Architecture: any
 Depends: libxerces23 (= ${Source-Version}) | libxercesicu23 (= ${Source-Version}), libc6-dev
-Conflicts: libxerces1-dev, libxerces20-dev, libxerces21-dev
+Conflicts: libxerces21-dev
 Description: Validating XML parser library for C++ (development files)
- Xerces-C is a validating XML parser written in a portable subset of C++. 
+ Xerces-C is a validating XML parser written in a portable subset of C++.
  This package contains the development files for Xerces. It also contains
  various sample files.
 
@@ -19,8 +19,8 @@
 Section: doc
 Architecture: all
 Suggests: libxerces23-dev
-Description: Validating XML parser library for C++ (development files)
- Xerces-C is a validating XML parser written in a portable subset of C++. 
+Description: Validating XML parser library for C++ (documentation)
+ Xerces-C is a validating XML parser written in a portable subset of C++.
  This package contains the documentation files.
 
 Package: libxerces23
@@ -28,14 +28,14 @@
 Depends: ${shlibs:Depends}
 Conflicts: libxercesicu23
 Description: Validating XML parser library for C++
- Xerces-C is a validating XML parser written in a portable subset of C++. 
- Xerces-C makes it easy to give your application the ability to read and 
- write XML data. A shared library is provided for parsing, generating, 
- manipulating, and validating XML documents. Xerces-C is faithful to the 
- XML 1.0 recommendation and associated standards ( DOM 1.0, DOM 2.0, 
+ Xerces-C is a validating XML parser written in a portable subset of C++.
+ Xerces-C makes it easy to give your application the ability to read and
+ write XML data. A shared library is provided for parsing, generating,
+ manipulating, and validating XML documents. Xerces-C is faithful to the
+ XML 1.0 recommendation and associated standards ( DOM 1.0, DOM 2.0,
  SAX 1.0, SAX 2.0, Namespaces, XML Schema Part 1 and Part 2).
- It also provides early implementations of DOM Level 3.0. 
- The parser provides high performance, modularity, and scalability. 
+ It also provides early implementations of DOM Level 3.0.
+ The parser provides high performance, modularity, and scalability.
 
 Package: libxercesicu23
 Architecture: any
@@ -43,14 +43,14 @@
 Conflicts: libxerces23
 Provides: libxerces23
 Description: Validating XML parser library for C++
- Xerces-C is a validating XML parser written in a portable subset of C++. 
- Xerces-C makes it easy to give your application the ability to read and 
- write XML data. A shared library is provided for parsing, generating, 
- manipulating, and validating XML documents. Xerces-C is faithful to the 
- XML 1.0 recommendation and associated standards ( DOM 1.0, DOM 2.0, 
+ Xerces-C is a validating XML parser written in a portable subset of C++.
+ Xerces-C makes it easy to give your application the ability to read and
+ write XML data. A shared library is provided for parsing, generating,
+ manipulating, and validating XML documents. Xerces-C is faithful to the
+ XML 1.0 recommendation and associated standards ( DOM 1.0, DOM 2.0,
  SAX 1.0, SAX 2.0, Namespaces, XML Schema Part 1 and Part 2).
- It also provides early implementations of DOM Level 3.0. 
- The parser provides high performance, modularity, and scalability. 
+ It also provides early implementations of DOM Level 3.0.
+ The parser provides high performance, modularity, and scalability.
  .
  This version of xerces uses the ICU transcoder library instead of the
  native version.

Modified: packages/xerces/xerces23/trunk/debian/copyright
===================================================================
--- packages/xerces/xerces23/trunk/debian/copyright	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/copyright	2004-04-20 22:35:45 UTC (rev 92)
@@ -1,17 +1,18 @@
-This package was debianized by Ivo Timmermans <ivo@debian.org>, based
-on the xerces21 package by Guillaume Morin <gemorin@debian.org>, based
-on Randolph Chung <tausq@debian.org> work.
+This package was debianized by Jay Berkenbilt <ejb@ql.org> as part of
+the Debian XML/SGML group on alioth.  The packaging is partially based
+on prior work by Ivo Timmermans <ivo@debian.org>, Guillaume Morin
+<gemorin@debian.org>, and Randolph Chung <tausq@debian.org>.
 
 It was downloaded from http://xml.apache.org/
 
-Xerces is distributed according to the Apache Software License, 
+Xerces is distributed according to the Apache Software License,
 version 1.1:
 
 /*
  * The Apache Software License, Version 1.1
  *
  *
- * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
+ * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  * reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -59,7 +60,7 @@
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation and was
  * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
+ * Business Machines, Inc., http://www.ibm.com.  For more
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  */

Deleted: packages/xerces/xerces23/trunk/debian/libxerces23-dev.dirs
===================================================================
--- packages/xerces/xerces23/trunk/debian/libxerces23-dev.dirs	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/libxerces23-dev.dirs	2004-04-20 22:35:45 UTC (rev 92)
@@ -1,2 +0,0 @@
-usr/include
-

Deleted: packages/xerces/xerces23/trunk/debian/libxerces23-dev.docs
===================================================================
--- packages/xerces/xerces23/trunk/debian/libxerces23-dev.docs	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/libxerces23-dev.docs	2004-04-20 22:35:45 UTC (rev 92)
@@ -1,2 +0,0 @@
-build-tree/xerces-c-src_2_3_0/Readme.html
-build-tree/xerces-c-src_2_3_0/credits.txt

Deleted: packages/xerces/xerces23/trunk/debian/libxerces23.dirs
===================================================================
--- packages/xerces/xerces23/trunk/debian/libxerces23.dirs	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/libxerces23.dirs	2004-04-20 22:35:45 UTC (rev 92)
@@ -1,2 +0,0 @@
-usr/lib
-

Deleted: packages/xerces/xerces23/trunk/debian/libxerces23.postinst
===================================================================
--- packages/xerces/xerces23/trunk/debian/libxerces23.postinst	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/libxerces23.postinst	2004-04-20 22:35:45 UTC (rev 92)
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = "configure" ]; then
-  ldconfig
-fi
-
-#DEBHELPER#

Deleted: packages/xerces/xerces23/trunk/debian/libxercesicu23.dirs
===================================================================
--- packages/xerces/xerces23/trunk/debian/libxercesicu23.dirs	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/libxercesicu23.dirs	2004-04-20 22:35:45 UTC (rev 92)
@@ -1,2 +0,0 @@
-usr/lib
-

Deleted: packages/xerces/xerces23/trunk/debian/libxercesicu23.postinst
===================================================================
--- packages/xerces/xerces23/trunk/debian/libxercesicu23.postinst	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/libxercesicu23.postinst	2004-04-20 22:35:45 UTC (rev 92)
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = "configure" ]; then
-  ldconfig
-fi
-
-#DEBHELPER#

Deleted: packages/xerces/xerces23/trunk/debian/patches/007_IconvGNUTransService.compile.fix.patch
===================================================================
--- packages/xerces/xerces23/trunk/debian/patches/007_IconvGNUTransService.compile.fix.patch	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/patches/007_IconvGNUTransService.compile.fix.patch	2004-04-20 22:35:45 UTC (rev 92)
@@ -1,24 +0,0 @@
-diff -ruN -x Makefile.in -x configure xerces-c-src_2_3_0.orig/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp xerces-c-src_2_3_0/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
---- xerces-c-src_2_3_0.orig/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp	2003-05-27 17:04:57.000000000 +0200
-+++ xerces-c-src_2_3_0/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp	2003-06-01 14:19:06.000000000 +0200
-@@ -1051,7 +1051,7 @@
-     if (*toTranscode) {
-         const unsigned int wLent = calcRequiredSize(toTranscode);
-         if (wLent == 0) {
--            retVal = (XMLCh*) manager->allocate(sizeof(XMLCh));/new XMLCh[1];
-+            retVal = (XMLCh*) manager->allocate(sizeof(XMLCh));//new XMLCh[1];
-             retVal[0] = 0;
-             return retVal;
-         }
-diff -urN build-tree/xerces-c-src_2_3_0/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp bak/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
---- build-tree/xerces-c-src_2_3_0/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp        2003-06-01 14:23:35.000000000 +0200
-+++ bak/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp  2003-06-01 14:23:17.000000000 +0200
-@@ -1186,7 +1186,7 @@
-                       ,    iconv_t        cd_to
-                       ,    size_t        uchsize
-                       ,    unsigned int    ubo
--                      , MemoryManger* const manager
-+                      , MemoryManager* const manager
-     )
-     : XMLTranscoder(encodingName, blockSize, manager)
-     , IconvGNUWrapper (cd_from, cd_to, uchsize, ubo)

Added: packages/xerces/xerces23/trunk/debian/patches/ICUTransService.cpp.patch
===================================================================
--- packages/xerces/xerces23/trunk/debian/patches/ICUTransService.cpp.patch	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/patches/ICUTransService.cpp.patch	2004-04-20 22:35:45 UTC (rev 92)
@@ -0,0 +1,30 @@
+===================================================================
+RCS file: /home/cvspublic/xml-xerces/c/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp,v
+retrieving revision 1.9
+retrieving revision 1.10
+diff -u -r1.9 -r1.10
+--- xml-xercesc/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp	2003/05/17 16:32:17	1.9
++++ xml-xercesc/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp	2003/05/30 09:19:24	1.10
+@@ -55,7 +55,7 @@
+  */
+ 
+ /*
+- * $Id: ICUTransService.cpp,v 1.9 2003/05/17 16:32:17 knoaman Exp $
++ * $Id: ICUTransService.cpp,v 1.10 2003/05/30 09:19:24 gareth Exp $
+  */
+ 
+ 
+@@ -127,11 +127,11 @@
+ 
+ 
+ static XMLCh* convertToXMLCh( const UChar* const toConvert,
+-                            , MemoryManager* const manager = 0)
++                            MemoryManager* const manager = 0)
+ {
+     const unsigned int srcLen = u_strlen(toConvert);
+     XMLCh* retBuf = (manager)
+-        ? (XMLCh*) manager->allocate((srcLen+1) sizeof(XMLCh))
++        ? (XMLCh*) manager->allocate((srcLen+1) * sizeof(XMLCh))
+         : new XMLCh[srcLen + 1];
+ 
+     XMLCh* outPtr = retBuf;

Added: packages/xerces/xerces23/trunk/debian/patches/IconvGNUTransService.compile.fix.patch
===================================================================
--- packages/xerces/xerces23/trunk/debian/patches/IconvGNUTransService.compile.fix.patch	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/patches/IconvGNUTransService.compile.fix.patch	2004-04-20 22:35:45 UTC (rev 92)
@@ -0,0 +1,24 @@
+diff -ruN -x Makefile.in -x configure xerces-c-src_2_3_0.orig/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp xerces-c-src_2_3_0/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
+--- xerces-c-src_2_3_0.orig/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp	2003-05-27 17:04:57.000000000 +0200
++++ xerces-c-src_2_3_0/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp	2003-06-01 14:19:06.000000000 +0200
+@@ -1051,7 +1051,7 @@
+     if (*toTranscode) {
+         const unsigned int wLent = calcRequiredSize(toTranscode);
+         if (wLent == 0) {
+-            retVal = (XMLCh*) manager->allocate(sizeof(XMLCh));/new XMLCh[1];
++            retVal = (XMLCh*) manager->allocate(sizeof(XMLCh));//new XMLCh[1];
+             retVal[0] = 0;
+             return retVal;
+         }
+diff -urN build-tree/xerces-c-src_2_3_0/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp bak/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
+--- build-tree/xerces-c-src_2_3_0/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp        2003-06-01 14:23:35.000000000 +0200
++++ bak/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp  2003-06-01 14:23:17.000000000 +0200
+@@ -1186,7 +1186,7 @@
+                       ,    iconv_t        cd_to
+                       ,    size_t        uchsize
+                       ,    unsigned int    ubo
+-                      , MemoryManger* const manager
++                      , MemoryManager* const manager
+     )
+     : XMLTranscoder(encodingName, blockSize, manager)
+     , IconvGNUWrapper (cd_from, cd_to, uchsize, ubo)

Modified: packages/xerces/xerces23/trunk/debian/rules
===================================================================
--- packages/xerces/xerces23/trunk/debian/rules	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/rules	2004-04-20 22:35:45 UTC (rev 92)
@@ -1,164 +1,203 @@
 #!/usr/bin/make -f
 
-export DH_COMPAT=3
+# --------------------------------------------------------------------
 
-include debian/scripts/vars
-pkgversion=23
-libname=libxerces-c
-libmajor=23
-libversion=23.0
-soname=$(libname).so.23
-incompatversion=24
+# This is the debian/rules file for building Xerces packages.  It uses
+# cdbs to build two versions of the libraries: one using the native
+# transcoder and one using the transcoder implemented in libicu.  This
+# requires that we configure build everything twice.  As of this cdbs
+# 0.4.21, there is no clean support for packages that configure
+# themselves multiple times with different arguments.
 
-pkg_root:=$(shell pwd)/debian
-package_libxerces=libxerces$(pkgversion)
-package_libxerces_dev=libxerces$(pkgversion)-dev
-package_libxerces_icu=libxercesicu$(pkgversion)
-package_libxerces_doc=libxerces$(pkgversion)-doc
+# Our strategy is to extract the upstream tarball into build-tree
+# using cdbs's tarball.mk.  Then we use lndir, which is part of xutils
+# (hence the build dependency on xutils), to create two symbolic link
+# farms: one for the native transcoder version, and one for the ICU
+# transcoder version.  The clean build tree is used for the doc
+# package, the native build tree is used for the development and
+# native runtime packages, and the ICU build tree is used for the ICU
+# runtime packages.  To make this work, we make excessive use of stamp
+# files: our normal build targets depend upon stamp files, and the
+# stamp files' rules do the actual work.  This prevents needless
+# repetition of effort.  To avoid conflicts with stamp files used by
+# cdbs, all our stamps go in debian/l_stamps.
 
-BUILD_DIR:=$(shell pwd)/$(SOURCE_DIR)/$(TAR_DIR)
-export XERCESCROOT=$(BUILD_DIR)
+# To avoid code repetition, this file makes use of gnu make's "define"
+# functionality.  The technique of substituting words like __THIS__
+# with variables is used to simulate functions with parameters.  See
+# l_configure and l_install_libs for examples.
+
+# --------------------------------------------------------------------
+
+# To distinguish variables that are truly local to this file (rather
+# than for use by cdbs), we adopt the convention of starting local
+# variables' names with l_.
+
+l_LIBMAJOR=23
+l_PKGNAME=libxerces$(l_LIBMAJOR)
+l_LIBNAME=libxerces-c
+l_SHORTSONAME=$(l_LIBNAME).so.$(l_LIBMAJOR)
+l_LONGSONAME=$(l_SHORTSONAME).0
+
+l_PWD := $(shell pwd)
+l_STAMPS = debian/l_stamps
+l_NATIVE_BUILD = native-build
+l_ICU_BUILD = icu-build
+l_BUILDS = $(l_ICU_BUILD) $(l_NATIVE_BUILD)
+l_NATIVE_BUILD_DIR = build-tree/native-build
+l_ICU_BUILD_DIR = build-tree/icu-build
+l_CLEAN_BUILD_DIR = build-tree/$(DEB_TAR_SRCDIR)
+l_INSTALL = $(l_PWD)/debian
+
+# Since this package was originally packaged using dbs, the source
+# tarball is in upstream/tarballs.  As of 0.4.21, cdbs's tarball rules
+# don't want tarballs to be in a subdirectory.  We work around this by
+# creating a symbolic link so we don't have to repackage the source.
+# We also remove this link in the clean target.  If modeling a fresh
+# package from this, it would be better to just put the upstream
+# source tarball(s) at the top level of .orig.tar.gz (if using
+# tarball.mk).
+DUMMY := $(shell test -d upstream/tarballs && ln -sf upstream/tarballs/* .)
+
+# Variables used by cdbs
+DEB_TAR_SRCDIR = xerces-c-src_2_3_0
+DEB_INSTALL_DIRS_libxerces23 = /usr/lib
+DEB_INSTALL_DIRS_libxercesicu23 = /usr/lib
+DEB_INSTALL_DIRS_libxerces23-dev = /usr/include /usr/lib/$(l_PKGNAME)
+DEB_INSTALL_EXAMPLES_libxerces23-dev = $(l_PWD)/$(l_CLEAN_BUILD_DIR)/samples
+DEB_INSTALL_DOCS_libxerces23-doc = \
+	$(l_PWD)/$(l_CLEAN_BUILD_DIR)/doc/*
+DEB_INSTALL_DOCS_libxerces23-dev = \
+	$(l_PWD)/$(l_CLEAN_BUILD_DIR)/credits.txt \
+	$(l_PWD)/$(l_CLEAN_BUILD_DIR)/Readme.html
+DEB_COMPRESS_EXCLUDE = sample html
+
+# Include cdbs rules files.
+include /usr/share/cdbs/1/rules/tarball.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+include /usr/share/cdbs/1/rules/debhelper.mk
+
+# Environment variables used by the build
 export USELIBWWW=0
-export SONAME=$(soname)
 export ICUROOT=/usr
 
-build: build-native build-icu
-build-native: $(STAMP_DIR)/build-native 
-build-icu: $(STAMP_DIR)/build-icu
+cleanbuilddir::
+	$(RM) -r $(l_STAMPS)
 
-$(STAMP_DIR)/build-native:
-	dh_testdir
-	$(MAKE) -f debian/sys-build.mk source.clean
-	$(MAKE) -f debian/sys-build.mk source.build
-	chmod a+x $(BUILD_DIR)/src/xercesc/runConfigure
-	cd $(BUILD_DIR)/src/xercesc && autoconf
-	cd $(BUILD_DIR)/src/xercesc \
-		&& sh runConfigure -plinux -cgcc -xg++ -minmem -tIconvGNU \
+# As 0.4.21, cdbs creates but doesn't debian/compat.  It creates it
+# conditionally, so this doesn't have a trivial fix.
+clean::
+	$(RM) debian/compat
+
+# Remove the source tarball link to upstream/tarballs.  See comment
+# above.  (Search for DUMMY.)
+clean::
+	if test -h $(DEB_TAR_SRCDIR).tar.gz; then \
+		$(RM) $(DEB_TAR_SRCDIR).tar.gz; \
+	fi
+
+# function for making a stamp in a deep directory structure
+define l_makestamp
+	mkdir -p $(dir $@)
+	touch $@
+endef
+
+# Create a symbolic link farm to the build area.
+$(patsubst %,$(l_STAMPS)/lndir/%,$(l_BUILDS)):
+	mkdir -p build-tree/$(notdir $@)
+	lndir -silent ../$(DEB_TAR_SRCDIR) build-tree/$(notdir $@)
+	$(l_makestamp)
+
+# The configure commands for the two packages are identical except for
+# build directory and transcoder.  We use pattern substitution with
+# this define to avoid duplicating this code.
+define l_configure
+	chmod a+x __BUILD_DIR__/src/xercesc/runConfigure
+	cd __BUILD_DIR__/src/xercesc && autoconf
+	cd __BUILD_DIR__/src/xercesc \
+		&& XERCESCROOT=$(l_PWD)/__BUILD_DIR__ \
+		sh runConfigure -plinux -cgcc -xg++ -minmem -t__TRANSCODER__ \
 		                   -z -g \
 		                   -C --prefix=/usr \
 				   -C --mandir=\$${prefix}/share/man \
 				   -C --infodir=\$${prefix}/share/info
-	cd $(BUILD_DIR)/src/xercesc && $(MAKE) 
-	touch $@
+	$(l_makestamp)
+endef
 
-$(STAMP_DIR)/build-icu:
-	dh_testdir
-	$(MAKE) -f debian/sys-build.mk source.clean
-	$(MAKE) -f debian/sys-build.mk source.build
-	chmod a+x $(BUILD_DIR)/src/xercesc/runConfigure
-	cd $(BUILD_DIR)/src/xercesc/ && autoconf
-	cd $(BUILD_DIR)/src/xercesc/ \
-		&& sh runConfigure -plinux -cgcc -xg++ -minmem -ticu -z -g \
-		                   -C --prefix=/usr -C \
-				   --mandir=\$${prefix}/share/man \
-				   -C --infodir=\$${prefix}/share/info
-	cd $(BUILD_DIR)/src/xercesc/ && $(MAKE) 
-				   #-z -I$(BUILD_DIR)/include \
-	touch $@
+# Configure stamps depend upon lndir stamps and invoke l_configure as
+# defined above.
 
-clean:
-	dh_testdir
-	dh_testroot
-	$(MAKE) -f debian/sys-build.mk source.clean
-	rm -rf $(STAMP_DIR)
-	dh_clean
+$(l_STAMPS)/configure/$(l_NATIVE_BUILD): $(l_STAMPS)/lndir/$(l_NATIVE_BUILD)
+	$(subst __BUILD_DIR__,$(l_NATIVE_BUILD_DIR),$(subst __TRANSCODER__,IconvGNU,$(l_configure)))
 
-install-native: build-native
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	dh_installdirs
+$(l_STAMPS)/configure/$(l_ICU_BUILD): $(l_STAMPS)/lndir/$(l_ICU_BUILD)
+	$(subst __BUILD_DIR__,$(l_ICU_BUILD_DIR),$(subst __TRANSCODER__,icu,$(l_configure)))
 
-# Yes, I know this looks totally barking mad, but the xerces 'install'
-# and/or 'copy' targets were either written by a retard's cat on crack or
-# someone who thinks that IBM's VA compiler is 'the way of the future'.
-# Much the same thing it appears..
+# The development and native runtime packages depend upon the native
+# build directory.  The ICU version depends upon the ICU build
+# directory.  The documentation package only depends upon the initial
+# extracted source tree which doesn't need any special configuration.
 
-	cd $(BUILD_DIR)/src/xercesc && $(MAKE) install PREFIX=$(pkg_root)/$(package_libxerces_dev)/usr prefix=$(pkg_root)/$(package_libxerces_dev)/usr
+configure/libxerces23 configure/libxerces23-dev:: $(l_STAMPS)/configure/$(l_NATIVE_BUILD)
 
-	# now shuffle things around to put them in sane places.
-	cd $(pkg_root)/$(package_libxerces_dev)/usr/lib \
-		&& mv $(libname).so.$(libversion) $(pkg_root)/$(package_libxerces)/usr/lib/$(libname).so.$(libversion) \
-		&& ln -sf $(libname).so.$(libversion) $(pkg_root)/$(package_libxerces)/usr/lib/$(soname) \
-		&& ln -sf $(libname).so.$(libversion) $(pkg_root)/$(package_libxerces_dev)/usr/lib/$(libname).so \
-		&& rm -f $(pkg_root)/$(package_libxerces_dev)/usr/lib/$(libname).so.$(libmajor)
+configure/libxercesicu23:: $(l_STAMPS)/configure/$(l_ICU_BUILD)
 
-		#&& ln -sf $(soname) $(libname).so \
-		#&& mv $(soname) $(pkg_root)/$(package_libxerces)/usr/lib/$(libname).so.$(libversion) 
-		#&& ln -s $(libname).so.$(libversion) $(pkg_root)/$(package_libxerces)/usr/lib/$(soname)
+# Build rules again using stamps
 
-	# rm $(pkg_root)/$(package_libxerces_dev)/usr/
+$(l_STAMPS)/build/$(l_NATIVE_BUILD):
+	XERCESCROOT=$(l_PWD)/$(l_NATIVE_BUILD_DIR) \
+		$(MAKE) -C $(l_NATIVE_BUILD_DIR)/src/xercesc
+	$(l_makestamp)
 
-install-icu: build-icu
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	dh_installdirs
-	cp $(BUILD_DIR)/lib/$(libname).so $(pkg_root)/$(package_libxerces_icu)/usr/lib/$(libname).so.$(libversion)
-	cd $(pkg_root)/$(package_libxerces_icu)/usr/lib \
-		&& ln -s $(libname).so.$(libversion) $(soname) 
-## 		&& ln -s $(libname).so.$(libversion) $(libname).so
-		
+$(l_STAMPS)/build/$(l_ICU_BUILD):
+	XERCESCROOT=$(l_PWD)/$(l_ICU_BUILD_DIR) \
+		$(MAKE) -C $(l_ICU_BUILD_DIR)/src/xercesc
+	$(l_makestamp)
 
-binary-indep: $(STAMP_DIR)/binary-indep
-$(STAMP_DIR)/binary-indep:
-	dh_installdocs -p$(package_libxerces_doc) $(BUILD_DIR)/doc/*
-	dh_installchangelogs -p$(package_libxerces_doc)
-	dh_compress -p$(package_libxerces_doc) -Xhtml
-	dh_fixperms -p$(package_libxerces_doc)
-	dh_installdeb -p$(package_libxerces_doc)
-	dh_gencontrol -p$(package_libxerces_doc)
-	dh_md5sums -p$(package_libxerces_doc)
-	dh_builddeb -p$(package_libxerces_doc)
-	touch $@
+build/libxerces23:: $(l_STAMPS)/build/$(l_NATIVE_BUILD)
 
-binary-arch-native: build-native install-native
-	dh_testdir
-	dh_testroot
-	dh_installdocs -p$(package_libxerces) -p$(package_libxerces_dev)
-	dh_installchangelogs
-	dh_installexamples $(BUILD_DIR)/samples
+build/libxercesicu23:: $(l_STAMPS)/build/$(l_ICU_BUILD)
 
-	# fix perms on samples
-	-cd $(pkg_root)/$(package_libxerces_dev)/usr/share/doc/$(package_libxerces_dev)/examples/samples \
-		&& find -type f | xargs chmod 644 && chmod 755 config.guess config.sub configure install-sh runConfigure
+# The xerces install target installs development files as well as
+# shared libraries, and it doesn't necessarily install the right
+# shared library file names.  Here we use make install to create the
+# development package, and we install the shared libraries for the
+# runtime packages manually.
 
-	# and remove more sodding cruft
-	-rm $(pkg_root)/$(package_libxerces_dev)/usr/share/doc/$(package_libxerces_dev)/html/resources/CVS
+# We use the native build to install developer files, though it
+# doesn't really matter which build we use.  After running make
+# install, remove all installed shared library files, create a
+# versionless dangling symbolic link to the real shared library file
+# that will be installed in the runtime package, install
+# config.status, which is needed to build libxml-xerces-perl, and
+# clean up some lintian warnings about executable files (that aren't
+# fixed by dh_fixperms).
+install/libxerces23-dev::
+	XERCESCROOT=$(l_PWD)/$(l_NATIVE_BUILD_DIR) \
+		$(MAKE) -C $(l_NATIVE_BUILD_DIR)/src/xercesc \
+		install PREFIX=$(l_INSTALL)/$(cdbs_curpkg)/usr \
+		prefix=$(l_INSTALL)/$(cdbs_curpkg)/usr
+	cd $(l_INSTALL)/$(cdbs_curpkg)/usr/lib \
+		&& rm -f $(l_LIBNAME).so* \
+		&& ln -sf $(l_SHORTSONAME) $(l_LIBNAME).so
+	cp $(l_PWD)/$(l_NATIVE_BUILD_DIR)/src/xercesc/config.status \
+		$(l_INSTALL)/$(cdbs_curpkg)/usr/lib/$(l_PKGNAME)
+	find $(l_INSTALL)/$(cdbs_curpkg)/usr/include -type f -print | \
+		xargs chmod -x
+	find $(DEB_INSTALL_EXAMPLES_libxerces23-dev) \
+		-type f -name '*.in' -print | xargs chmod -x
 
-	dh_strip -p$(package_libxerces)
-	dh_compress -p$(package_libxerces) -p$(package_libxerces_dev) -Xsamples
-	dh_fixperms -p$(package_libxerces) -p$(package_libxerces_dev)
-	#dh_makeshlibs -m$(libmajor) --version-info '$(package_libxerces) (>= $(libversion)-1),$(package_libxerces) (<< $(incompatversion))' -p$(package_libxerces)
-	dh_makeshlibs -p$(package_libxerces)
-	dh_shlibdeps -p$(package_libxerces)
-	dh_installdeb -p$(package_libxerces)
-	dh_gencontrol -p$(package_libxerces)
-	dh_md5sums -p$(package_libxerces)
-	dh_builddeb -p$(package_libxerces)
-	# and the -dev
-	dh_installdeb -p$(package_libxerces_dev)
-	dh_gencontrol -p$(package_libxerces_dev)
-	dh_md5sums -p$(package_libxerces_dev)
-	dh_builddeb -p$(package_libxerces_dev)
+# The rule for manually installing shared library files is identical
+# except for build directory.
+define l_install_libs
+	cp $(l_PWD)/__BUILD_DIR__/lib/$(l_LIBNAME).so \
+		$(l_INSTALL)/$(cdbs_curpkg)/usr/lib/$(l_LONGSONAME)
+	ln -sf $(l_LONGSONAME) \
+		$(l_INSTALL)/$(cdbs_curpkg)/usr/lib/$(l_SHORTSONAME)
+endef
 
-binary-arch-icu: build-icu install-icu
-	dh_testdir
-	dh_testroot
-	dh_installdocs -p$(package_libxerces_icu)
-	dh_installchangelogs -p$(package_libxerces_icu)
-	dh_strip -p$(package_libxerces_icu)
-	dh_compress -p$(package_libxerces_icu)
-	dh_fixperms -p$(package_libxerces_icu)
-	#dh_makeshlibs -m$(libmajor) --version-info '$(package_libxerces_icu) (>= $(libversion)-1),$(package_libxerces_icu) (<< $(incompatversion))' -p$(package_libxerces_icu)
-	dh_makeshlibs -p$(package_libxerces_icu)
-	dh_shlibdeps -p$(package_libxerces_icu)
-	dh_installdeb -p$(package_libxerces_icu)
-	dh_gencontrol -p$(package_libxerces_icu)
-	dh_md5sums -p$(package_libxerces_icu)
-	dh_builddeb -p$(package_libxerces_icu)
+install/libxerces23::
+	$(subst __BUILD_DIR__,$(l_NATIVE_BUILD_DIR),$(l_install_libs))
 
-binary-arch: binary-arch-native binary-arch-icu
-
-binary: binary-indep binary-arch
-
+install/libxercesicu23::
+	$(subst __BUILD_DIR__,$(l_ICU_BUILD_DIR),$(l_install_libs))

Deleted: packages/xerces/xerces23/trunk/debian/sys-build.mk
===================================================================
--- packages/xerces/xerces23/trunk/debian/sys-build.mk	2004-04-20 22:34:50 UTC (rev 91)
+++ packages/xerces/xerces23/trunk/debian/sys-build.mk	2004-04-20 22:35:45 UTC (rev 92)
@@ -1,167 +0,0 @@
-#!/usr/bin/make -f
-# Separate tarball/patch build system by Adam Heath <doogie@debian.org>
-
-# The magic targets that you need to concern yourself with are:
-#
-# source.build:		Unpacks upstream tarballs, optionally applies patches
-#			to fix the upstream patches, then applies upstream
-#			patches.
-# source.make:		Applies debian patches.
-# source.clean:		Cleans the build directory, then unfixes the upstream
-#			patches.
-# source.compile:	Will compile the source for you.  Please check
-#			debian/scripts/vars.
-# source.cmd:		When calling this target, if you define a variable
-#			SOURCE_CMD, it will run that command in the build
-#			tree.
-# make-diff:		Generates debian.diff in the current directory which
-#			contains all edits that are currently in the build
-#			tree.
-#
-# Nothing in this file should require any editting.  Please look at
-# debian/scripts/vars for things to change for the local environment.
-#
-# debian/rules target		command
-# ----------------------------------------------------------------
-# clean:			$(MAKE) -f debian/sys-build.mk source.clean
-# build:			$(MAKE) -f debian/sys-build.mk source.compile
-#					for simple systems.
-# build:			$(MAKE) -f debian/sys-build.mk source.make
-#					and, in the rules file, you can
-#					build the targets you want.
-SHELL=/bin/bash
-ifndef NOISY
-.SILENT:
-endif
-
-include debian/scripts/vars
-# remove quotes
-DIFF_EXCLUDE:=$(patsubst %,-x %,$(shell echo $(DIFF_EXCLUDE)))
-
-ifdef TAR_DIR
-BUILD_TREE=$(SOURCE_DIR)/$(TAR_DIR)
-else
-BUILD_TREE=$(SOURCE_DIR)
-endif
-
-SOURCE_CMD=:
-
-ifdef CLEAN_IGNORE
-	CLEAN_CMD=-
-	CLEAN_SH=
-else
-	CLEAN_CMD=
-	CLEAN_SH=
-endif
-ifndef CLEAN_TARGET
-	CLEAN_TARGET=clean
-endif
-
-foo:
-	echo $(DIFF_EXCLUDE)
-
-make-diff:
-	mv $(BUILD_TREE) bak
-	$(MAKE) -f debian/sys-build.mk source.clean
-	$(MAKE) -f debian/sys-build.mk source.make
-	mv $(BUILD_TREE) $(BUILD_TREE).orig
-	mv bak $(BUILD_TREE)
-
-ifdef TAR_DIR
-ifdef CLEAN_TARGET_EXTERNAL
-	$(CLEAN_CMD)$(MAKE) -f debian/rules $(CLEAN_TARGET_EXTERNAL)
-else
-	$(CLEAN_CMD)$(MAKE) -C $(BUILD_TREE) $(CLEAN_TARGET)
-endif
-	-(cd $(SOURCE_DIR);diff -ruN $(TAR_DIR).orig $(TAR_DIR) $(DIFF_EXCLUDE)) > debian.diff
-else
-ifdef CLEAN_TARGET_EXTERNAL
-	$(CLEAN_CMD)$(MAKE) -f debian/rules $(CLEAN_TARGET_EXTERNAL)
-else
-	$(CLEAN_CMD)for a in $(BUILD_TREE)/*;do $(MAKE) -C $$a $(CLEAN_TARGET);done
-endif
-	-(diff -ruN $(BUILD_TREE).orig $(BUILD_TREE) $(DIFF_EXCLUDE)) > debian.diff
-	if [ ! -s debian.diff ];then\
-		rm debian.diff;\
-	fi
-endif
-	rm -rf $(BUILD_TREE).orig
-
-patchapply: $(STAMP_DIR)/patchapply
-$(STAMP_DIR)/patchapply: $(STAMP_DIR)/source.build $(STAMP_DIR)
-	$(SHELL) debian/scripts/lib patch.apply
-	touch $@
-	rm -f $(STAMP_DIR)/patchunapply
-
-patchunapply: $(STAMP_DIR)/patchunapply
-$(STAMP_DIR)/patchunapply: $(STAMP_DIR)/source.build $(STAMP_DIR)
-	$(SHELL) debian/scripts/lib patch.unapply
-	touch $@
-	rm -f $(STAMP_DIR)/patchapply
-
-.export: SOURCE_TREE
-
-#
-# The rules that really do the work all start with $(STAMPDIR)
-# This little trick allows us to use stamp files to keep us from
-# having to rerun long targets over and over.  It also puts
-# all stamp files in one place, for easy cleaning.
-#
-# If a stampdir rule depends on something else, be sure it is
-# another stampdir rule.  Depending on base rule won't work.
-#
-
-source.build: $(STAMP_DIR)/source.build
-STAMP_DIR_TARGETS+= $(STAMP_DIR)/source.build
-$(STAMP_DIR)/source.build: $(STAMP_DIR)/source.unpack $(STAMP_DIR)/source.patch $(STAMP_DIR)
-	touch $@
-
-source.make: $(STAMP_DIR)/source.make
-STAMP_DIR_TARGETS+= $(STAMP_DIR)/source.make
-$(STAMP_DIR)/source.make: $(STAMP_DIR)/source.build $(STAMP_DIR)/patchapply $(STAMP_DIR)
-	touch $@
-
-source.unpack: $(STAMP_DIR)/source.unpack
-STAMP_DIR_TARGETS+= $(STAMP_DIR)/source.unpack
-$(STAMP_DIR)/source.unpack: $(STAMP_DIR)
-	$(SHELL) debian/scripts/source.unpack
-	touch $@
-
-source.patch: $(STAMP_DIR)/source.patch
-STAMP_DIR_TARGETS+= $(STAMP_DIR)/source.patch
-$(STAMP_DIR)/source.patch: $(STAMP_DIR)/source.unpack $(STAMP_DIR)/fix.source.patch $(STAMP_DIR)
-	$(SHELL) debian/scripts/lib source.patch
-	touch $@
-
-fix.source.patch: $(STAMP_DIR)/fix.source.patch
-STAMP_DIR_TARGETS+= $(STAMP_DIR)/fix.source.patch
-$(STAMP_DIR)/fix.source.patch: $(STAMP_DIR)
-	$(SHELL) debian/scripts/lib fix.source.patch
-	touch $@
-
-unfix.source.patch: $(STAMP_DIR)/unfix.source.patch
-STAMP_DIR_TARGETS+= $(STAMP_DIR)/unfix.source.patch
-$(STAMP_DIR)/unfix.source.patch: $(STAMP_DIR)
-	$(SHELL) debian/scripts/lib unfix.source.patch
-	touch $@
-
-source.compile: $(STAMP_DIR)/source.compile
-STAMP_DIR_TARGETS+= $(STAMP_DIR)/source.compile
-$(STAMP_DIR)/source.compile: $(STAMP_DIR)/source.make $(STAMP_DIR)
-	$(MAKE) -C $(BUILD_TREE) $(BUILD_TARGET)
-	touch $@
-
-source.command:
-	(cd $(BUILD_TREE); $(SOURCE_CMD))
-
-DIR_TARGETS+=$(STAMP_DIR)
-$(STAMP_DIR_TARGETS): $(STAMP_DIR)
-
-$(DIR_TARGETS)/:
-	mkdir -p $@
-
-source.clean: unfix.source.patch
-	$(SHELL) debian/scripts/lib source.clean
-	rm -f $(STAMP_DIR_TARGETS)
-	-rm -rf $(STAMP_DIR)
-	$(MAKE) -C debian/scripts clean