]> git.pld-linux.org Git - packages/gmock.git/blob - install.patch
8a16d1647f81454ec320ecbd412d979b1348283c
[packages/gmock.git] / install.patch
1 diff --git a/Makefile.am b/Makefile.am
2 index adc21d7..2077654 100644
3 --- a/Makefile.am
4 +++ b/Makefile.am
5 @@ -7,6 +7,9 @@ EXTRA_DIST =
6  # included in the 'subdirs' variable.
7  SUBDIRS = $(subdirs)
8  
9 +
10 +bin_SCRIPTS = scripts/gmock-config
11 +
12  # This is generated by the configure script, so clean it for distribution.
13  DISTCLEANFILES = scripts/gmock-config
14  
15 @@ -21,10 +24,13 @@ if HAVE_PTHREADS
16  endif
17  
18  # Build rules for libraries.
19 -lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
20 +check_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
21  
22 -lib_libgmock_la_SOURCES = src/gmock-all.cc
23 +nodist_lib_libgmock_la_SOURCES = src/gmock-all.cc
24  
25 +pkgconfigdir = $(datadir)/pkgconfig
26 +pkgconfig_DATA = gmock.pc
27 +  
28  pkginclude_HEADERS = \
29    include/gmock/gmock-actions.h \
30    include/gmock/gmock-cardinalities.h \
31 @@ -43,7 +49,7 @@ pkginclude_internal_HEADERS = \
32    include/gmock/internal/gmock-internal-utils.h \
33    include/gmock/internal/gmock-port.h
34  
35 -lib_libgmock_main_la_SOURCES = src/gmock_main.cc
36 +nodist_lib_libgmock_main_la_SOURCES = src/gmock_main.cc
37  lib_libgmock_main_la_LIBADD = lib/libgmock.la
38  
39  # Build rules for tests. Automake's naming for some of these variables isn't
40 @@ -178,8 +184,8 @@ $(test_gmock_fused_test_SOURCES): fused-gmock-internal
41  
42  # TODO(vladl@google.com): Find a way to add Google Tests's sources here.
43  fused-gmock-internal: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
44 -                      $(lib_libgmock_la_SOURCES) $(GMOCK_SOURCE_INGLUDES) \
45 -                      $(lib_libgmock_main_la_SOURCES) \
46 +                      $(nodist_lib_libgmock_la_SOURCES) $(GMOCK_SOURCE_INGLUDES) \
47 +                      $(nodist_lib_libgmock_main_la_SOURCES) \
48                        scripts/fuse_gmock_files.py
49         mkdir -p "$(srcdir)/fused-src"
50         chmod -R u+w "$(srcdir)/fused-src"
51 @@ -200,10 +206,8 @@ CLEANFILES = core
52  # Mock can lead to undefined behavior due to violation of the
53  # One-Definition Rule.
54  
55 -install-exec-local:
56 -       echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
57 -       false
58 -
59 -install-data-local:
60 -       echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
61 -       false
62 +install-exec-hook:
63 +       mkdir -p $(DESTDIR)$(datadir)/@PACKAGE@ $(DESTDIR)$(prefix)/src/@PACKAGE@
64 +       cp -rf scripts/generator $(DESTDIR)$(datadir)/@PACKAGE@
65 +       cp -f src/* $(DESTDIR)$(prefix)/src/@PACKAGE@
66 +       sed -i s/src[/]//g $(DESTDIR)$(prefix)/src/@PACKAGE@/gmock-all.cc
67 diff --git a/configure.ac b/configure.ac
68 index e8b65bd..9ec7743 100644
69 --- a/configure.ac
70 +++ b/configure.ac
71 @@ -10,7 +10,7 @@ AC_PREREQ([2.59])
72  AC_CONFIG_SRCDIR([./COPYING])
73  AC_CONFIG_AUX_DIR([build-aux])
74  AC_CONFIG_HEADERS([build-aux/config.h])
75 -AC_CONFIG_FILES([Makefile])
76 +AC_CONFIG_FILES([Makefile gmock.pc])
77  AC_CONFIG_FILES([scripts/gmock-config], [chmod +x scripts/gmock-config])
78  
79  # Initialize Automake with various options. We require at least v1.9, prevent
80 diff --git a/gmock.pc.in b/gmock.pc.in
81 new file mode 100644
82 index 0000000..da4b6c4
83 --- /dev/null
84 +++ b/gmock.pc.in
85 @@ -0,0 +1,14 @@
86 +#############################
87 +# Pkg-Config file for gmock #
88 +#############################
89 +
90 +Name: gmock
91 +Description: Google C++ mocking framework
92 +URL: https://code.google.com/p/googlemock/
93 +Version: @VERSION@
94 +
95 +prefix=@prefix@
96 +includedir=@includedir@
97 +srcdir=@prefix@/src/gmock
98 +
99 +Cflags: -I${includedir}/gmock
This page took 0.0478189999999999 seconds and 2 git commands to generate.