[Expat-discuss] [PATCH] contents of "expat-pkgconfig.patch"
yuki latt
yuki.latt at gmail.com
Fri Jul 18 17:54:48 CEST 2008
Hi,
I posted the contents of patch file.
----------------------------------------------------------------------------------------------------------
Add a pkg-config file for expat to allow easier linking with the libary.
Must 'cvs add expat.pc.in'.
--- /dev/null 2007-06-29 06:21:44.613798959 -0700
+++ expat.pc.in 2007-07-06 07:17:34.000000000 -0700
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: expat
+Version: @PACKAGE_VERSION@
+Description: expat XML parser
+Libs: -L${libdir} -lexpat
+Cflags: -I${includedir}
Index: .cvsignore
===================================================================
RCS file: /cvsroot/expat/expat/.cvsignore,v
retrieving revision 1.10
diff -p -u -r1.10 .cvsignore
--- .cvsignore 3 May 2007 19:54:50 -0000 1.10
+++ .cvsignore 6 Jul 2007 14:40:26 -0000
@@ -11,3 +11,4 @@ libtool
expat.ncb
expat.opt
.project
+expat.pc
Index: Makefile.in
===================================================================
RCS file: /cvsroot/expat/expat/Makefile.in,v
retrieving revision 1.58
diff -p -u -r1.58 Makefile.in
--- Makefile.in 9 May 2007 18:38:50 -0000 1.58
+++ Makefile.in 6 Jul 2007 14:40:26 -0000
@@ -31,6 +31,7 @@ bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
man1dir = @mandir@/man1
+pkgconfigdir = $(libdir)/pkgconfig
top_builddir = .
@@ -48,9 +49,9 @@ DESTDIR = $(INSTALL_ROOT)
default: buildlib xmlwf/xmlwf
-buildlib: $(LIBRARY)
+buildlib: $(LIBRARY) expat.pc
-all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline
+all: $(LIBRARY) expat.pc xmlwf/xmlwf examples/elements examples/outline
clean:
cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
@@ -65,7 +66,7 @@ clobber: clean
distclean: clean
rm -f expat_config.h config.status config.log config.cache libtool
- rm -f Makefile
+ rm -f Makefile expat.pc
extraclean: distclean
rm -f expat_config.h.in configure
@@ -80,10 +81,11 @@ install: xmlwf/xmlwf installlib
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf
$(DESTDIR)$(bindir)/xmlwf
$(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
-installlib: $(LIBRARY) $(APIHEADER)
- $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+installlib: $(LIBRARY) $(APIHEADER) expat.pc
+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
$(DESTDIR)$(pkgconfigdir)
$(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY)
$(DESTDIR)$(libdir)/$(LIBRARY)
for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN
$(DESTDIR)$(includedir) ; done
+ $(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc
uninstall: uninstalllib
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf
@@ -93,6 +95,7 @@ uninstalllib:
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
rm -f $(DESTDIR)$(includedir)/expat.h
rm -f $(DESTDIR)$(includedir)/expat_external.h
+ rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc
# for VPATH builds (invoked by configure)
mkdir-init:
@@ -125,6 +128,9 @@ LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo
$(LIBRARY): $(LIB_OBJS)
$(LINK_LIB) $(LIB_OBJS)
+expat.pc: $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
Index: configure.in
===================================================================
RCS file: /cvsroot/expat/expat/configure.in,v
retrieving revision 1.45
diff -p -u -r1.45 configure.in
--- configure.in 9 May 2007 13:26:48 -0000 1.45
+++ configure.in 6 Jul 2007 14:40:26 -0000
@@ -144,7 +144,7 @@ AC_DEFINE([XML_DTD], 1,
AC_DEFINE([XML_CONTEXT_BYTES], 1024,
[Define to specify how much context to retain around the current
parse point.])
-AC_CONFIG_FILES(Makefile)
+AC_CONFIG_FILES([Makefile expat.pc])
AC_OUTPUT
abs_srcdir="`cd $srcdir && pwd`"
More information about the Expat-discuss
mailing list