0002-Make-and-install-a-pkg-config-file-on-Windows.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From f90d931fa6f400065189b44d00273979709c700b Mon Sep 17 00:00:00 2001
  2. From: Peter Williams <peter@newton.cx>
  3. Date: Wed, 5 Sep 2018 16:50:54 -0400
  4. Subject: [PATCH] Make and install a pkg-config file on Windows.
  5. ---
  6. win32/Makefile.msvc | 18 +++++++++++++++++-
  7. 1 file changed, 17 insertions(+), 1 deletion(-)
  8. diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc
  9. index 491dc88..415ec0b 100644
  10. --- a/win32/Makefile.msvc
  11. +++ b/win32/Makefile.msvc
  12. @@ -282,7 +282,21 @@ _VC_MANIFEST_EMBED_EXE=
  13. _VC_MANIFEST_EMBED_DLL=
  14. !endif
  15. -all : libxml libxmla libxmladll utils
  16. +all : libxml libxmla libxmladll utils libxml-2.0.pc
  17. +
  18. +# Note hardcoded libraries and trouble getting dollar-sign/brace variables working
  19. +libxml-2.0.pc:
  20. + echo prefix=$(PREFIX:\=/) >$@
  21. + echo exec_prefix=$(PREFIX:\=/) >>$@
  22. + echo libdir=$(LIBPREFIX:\=/) >>$@
  23. + echo includedir=$(INCPREFIX:\=/) >>$@
  24. + echo modules=0 >>$@
  25. + echo Name: libXML >>$@
  26. + echo Version: $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION) >>$@
  27. + echo Description: libXML library version2. >>$@
  28. + echo Requires: >>$@
  29. + echo Libs: -L$(LIBPREFIX:\=/) -lxml2 -liconv -lz >>$@
  30. + echo Cflags: -I$(INCPREFIX:\=/)/libxml >>$@
  31. libxml : $(BINDIR)\$(XML_SO)
  32. @@ -320,6 +334,8 @@ install-libs : all
  33. install : install-libs
  34. copy $(BINDIR)\*.exe $(BINPREFIX)
  35. -copy $(BINDIR)\*.pdb $(BINPREFIX)
  36. + if not exist $(LIBPREFIX)\pkgconfig mkdir $(LIBPREFIX)\pkgconfig
  37. + copy libxml-2.0.pc $(LIBPREFIX)\pkgconfig
  38. install-dist : install-libs
  39. copy $(BINDIR)\xml*.exe $(BINPREFIX)
  40. --
  41. 2.17.1