1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
diff -Naur libx86-1.1.orig/Makefile libx86-1.1/Makefile
--- libx86-1.1.orig/Makefile 2016-01-16 15:58:32.764389859 +0000
+++ libx86-1.1/Makefile 2016-01-16 16:02:34.461849053 +0000
@@ -1,6 +1,7 @@
OBJECTS = x86-common.o
CFLAGS ?= -O2 -Wall -DDEBUG -g
LIBDIR ?= /usr/lib
+INCLUDEDIR ?= /usr/include
ifeq ($(BACKEND),x86emu)
OBJECTS += thunk.o x86emu/decode.o x86emu/debug.o x86emu/fpu.o \
@@ -29,7 +30,14 @@
rm -f *.o *~
clean: objclean
- rm -f *.so.1 *.a
+ rm -f *.so.1 *.a x86.pc
+
+x86.pc:
+ sed -e's,@prefix@,/usr,' x86.pc.in > x86.pc
+ sed -e's,@exec_prefix@,/usr,' -i x86.pc
+ sed -e's,@libdir@,${LIBDIR},' -i x86.pc
+ sed -e's,@includedir@,${INCLUDEDIR},' -i x86.pc
+ sed -e's,@PACKAGE_VERSION@,1.1,' -i x86.pc
install-shared: libx86.so.1
install -D libx86.so.1 $(DESTDIR)$(LIBDIR)/libx86.so.1
@@ -41,4 +49,7 @@
install-static:
install -D libx86.a $(DESTDIR)$(LIBDIR)/libx86.a
-install: install-shared install-static install-header
+install-pkgconfig: x86.pc
+ install -D x86.pc $(DESTDIR)$(LIBDIR)/pkgconfig/x86.pc
+
+install: install-shared install-static install-header install-pkgconfig
diff -Naur libx86-1.1.orig/x86.pc.in libx86-1.1/x86.pc.in
--- libx86-1.1.orig/x86.pc.in 1970-01-01 00:00:00.000000000 +0000
+++ libx86-1.1/x86.pc.in 2016-01-16 15:59:27.171393640 +0000
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: x86
+Description: Library providing x86 emulator access
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lx86
|