libx86-add-pkgconfig.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. From fc4f25c4d16aaff7dcb5dd42cc20b292f4eb2218 Mon Sep 17 00:00:00 2001
  2. From: Dave Airlie <airlied@redhat.com>
  3. Date: Tue, 4 Aug 2009 13:08:42 +1000
  4. Subject: [PATCH] git add x86.pc
  5. ---
  6. Makefile | 15 ++++++++++++---
  7. x86.pc.in | 10 ++++++++++
  8. 2 files changed, 22 insertions(+), 3 deletions(-)
  9. create mode 100644 x86.pc.in
  10. diff --git a/Makefile b/Makefile
  11. index 951b617..953a499 100644
  12. --- a/Makefile
  13. +++ b/Makefile
  14. @@ -1,6 +1,7 @@
  15. OBJECTS = x86-common.o
  16. CFLAGS ?= -O2 -Wall -DDEBUG -g
  17. LIBDIR ?= /usr/lib
  18. +INCLUDEDIR ?= /usr/include
  19. ifeq ($(BACKEND),x86emu)
  20. OBJECTS += thunk.o x86emu/decode.o x86emu/debug.o x86emu/fpu.o \
  21. @@ -29,10 +30,18 @@ objclean:
  22. rm -f *.o *~
  23. clean: objclean
  24. - rm -f *.so.1 *.a
  25. + rm -f *.so.1 *.a x86.pc
  26. -install: libx86.so.1
  27. +x86.pc:
  28. + sed -e's,@prefix@,/usr,' x86.pc.in > x86.pc
  29. + sed -e's,@exec_prefix@,/usr,' -i x86.pc
  30. + sed -e's,@libdir@,${LIBDIR},' -i x86.pc
  31. + sed -e's,@includedir@,${INCLUDEDIR},' -i x86.pc
  32. + sed -e's,@PACKAGE_VERSION@,1.1,' -i x86.pc
  33. +
  34. +install: libx86.so.1 x86.pc
  35. install -D libx86.so.1 $(DESTDIR)$(LIBDIR)/libx86.so.1
  36. install -D libx86.a $(DESTDIR)$(LIBDIR)/libx86.a
  37. + install -D x86.pc $(DESTDIR)$(LIBDIR)/pkgconfig/x86.pc
  38. ln -sf libx86.so.1 $(DESTDIR)$(LIBDIR)/libx86.so
  39. - install -p -m 0644 -D lrmi.h $(DESTDIR)/usr/include/libx86.h
  40. + install -p -m 0644 -D lrmi.h $(DESTDIR)$(INCLUDEDIR)/libx86.h
  41. diff --git a/x86.pc.in b/x86.pc.in
  42. new file mode 100644
  43. index 0000000..711d90d
  44. --- /dev/null
  45. +++ b/x86.pc.in
  46. @@ -0,0 +1,10 @@
  47. +prefix=@prefix@
  48. +exec_prefix=@exec_prefix@
  49. +libdir=@libdir@
  50. +includedir=@includedir@
  51. +
  52. +Name: x86
  53. +Description: Library providing x86 emulator access
  54. +Version: @PACKAGE_VERSION@
  55. +Cflags: -I${includedir}
  56. +Libs: -L${libdir} -lx86
  57. --
  58. 1.5.4.1