tags 474169 + patch
thanks

Attached to this email you will find a patch against mcpp-2.7-1 from
unstable to enable libmcpp.  I tried to respect the original structure
of debian/rules although it would probably be wiser to go for a single
DESTDIR and dh_install files.

-- 
Francisco Moya Fernandez Computer Architecture and Networks Group
Assistant Professor
[EMAIL PROTECTED] School of Computer Science
Fax:(+34 926) 29 53 54 University of Castilla-La Mancha
Tel:(+34 926) 29 54 83 http://www.inf-cr.uclm.es/
diff -Nru mcpp-2.7/debian/control mcpp-2.7-1.1/debian/control
--- mcpp-2.7/debian/control	2008-04-04 12:29:44.000000000 +0200
+++ mcpp-2.7-1.1/debian/control	2008-04-04 12:20:16.000000000 +0200
@@ -23,3 +23,34 @@
  proprocessor or as a subroutine called from some other main program,
  this package installs only a stand-alone program named 'mcpp' which
  behaves independent from GCC.
+
+Package: libmcpp0
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Alternative C/C++ preprocessor (shared library)
+ C/C++ preprocessor expands macros and processes '#if', '#include' and
+ some other directives.
+ .
+ MCPP is an alternative C/C++ preprocessor with the highest
+ conformance, implementated by Kiyoshi Matsui.  MCPP is especially
+ useful for debugging the source program which use complicated macros
+ and also useful for checking portability of the source.  It supports
+ multiple standards: K&R, ISO C90, ISO C99, and ISO C++98.
+ .
+ This package installs the shared library version of MCPP.
+
+Package: libmcpp0-dev
+Architecture: any
+Depends: libmcpp0
+Description: Alternative C/C++ preprocessor (development files)
+ C/C++ preprocessor expands macros and processes '#if', '#include' and
+ some other directives.
+ .
+ MCPP is an alternative C/C++ preprocessor with the highest
+ conformance, implementated by Kiyoshi Matsui.  MCPP is especially
+ useful for debugging the source program which use complicated macros
+ and also useful for checking portability of the source.  It supports
+ multiple standards: K&R, ISO C90, ISO C99, and ISO C++98.
+ .
+ This package installs the development files for the library version
+ of MCPP.
diff -Nru mcpp-2.7/debian/rules mcpp-2.7-1.1/debian/rules
--- mcpp-2.7/debian/rules	2008-04-04 12:29:44.000000000 +0200
+++ mcpp-2.7-1.1/debian/rules	2008-04-04 12:25:05.000000000 +0200
@@ -17,21 +17,27 @@
 	INSTALL_PROGRAM += -s
 endif
 
-config.status: configure
+bin/config.status: configure
 	dh_testdir
-	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
+	mkdir -p bin && cd bin && CFLAGS="$(CFLAGS)" ../configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
+
+lib/config.status: configure
+	dh_testdir
+	mkdir -p lib && cd lib && CFLAGS="$(CFLAGS)" ../configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-mcpplib
 
 
 build: build-stamp
-build-stamp:  config.status
+build-stamp:  bin/config.status lib/config.status
 	dh_testdir
-	$(MAKE)
+	$(MAKE) -C bin
+	$(MAKE) -C lib
 	touch build-stamp
 
 clean:
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp 
+	rm -rf lib bin
 	[ ! -f Makefile ] || $(MAKE) distclean
 	dh_clean 
 
@@ -41,10 +47,16 @@
 	dh_clean -k 
 	dh_installdirs
 
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/mcpp
-	rmdir $(CURDIR)/debian/mcpp/usr/lib
+	$(MAKE) -C bin install DESTDIR=$(CURDIR)/debian/mcpp
+	$(MAKE) -C lib install DESTDIR=$(CURDIR)/debian/libmcpp0-dev
+	mkdir -p $(CURDIR)/debian/libmcpp0-dev/usr/include
+	mkdir -p $(CURDIR)/debian/libmcpp0/usr/lib
+	cp src/mcpp_lib.h $(CURDIR)/debian/libmcpp0-dev/usr/include
+	mv $(CURDIR)/debian/libmcpp0-dev/usr/lib/*.so.* \
+		$(CURDIR)/debian/libmcpp0/usr/lib
 #	LICENSE is included in debian/copyright
 	rm -f $(CURDIR)/debian/mcpp/usr/share/doc/mcpp/LICENSE
+	rm -f $(CURDIR)/debian/libmcpp0-dev/usr/share/doc/mcpp/LICENSE
 
 
 # Build architecture-independent files here.
diff -Nru mcpp-2.7/src/internal.H mcpp-2.7-1.1/src/internal.H
--- mcpp-2.7/src/internal.H	2008-03-11 17:04:07.000000000 +0100
+++ mcpp-2.7-1.1/src/internal.H	2008-04-04 10:58:37.000000000 +0200
@@ -526,7 +526,7 @@
                 /* Do the final commands        */
 extern void     print_heap( void);
                 /* Print blocks of heap memory  */
-#if ! HOST_HAVE_STPCPY || HOST_COMPILER == GNUC
+#if ! HOST_HAVE_STPCPY
 extern char *   stpcpy( char * dest, const char * src);
                 /* Non-Standard library function*/
 #endif

Reply via email to