libservicelog/libservicelog-pkgconfig.patch
OBS User autobuild 261cbc985a Accepting request 38203 from devel:libraries:c_c++
Copy from devel:libraries:c_c++/libservicelog based on submit request 38203 from user psmt

OBS-URL: https://build.opensuse.org/request/show/38203
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libservicelog?expand=0&rev=6
2010-04-20 00:25:20 +00:00

33 lines
1.2 KiB
Diff

Index: src/servicelog-1.pc.in
===================================================================
--- src/servicelog-1.pc.in.orig 2008-03-06 01:24:51.000000000 +0100
+++ src/servicelog-1.pc.in 2010-04-14 19:58:24.503511195 +0200
@@ -6,5 +6,5 @@ includedir=@includedir@
Name: servicelog
Description: Library for access to the system servicelog
Version: @VERSION@
-Libs: -L${libdir} -lsqlite3 -l@GENERIC_LIBRARY_NAME@-@GENERIC_API_VERSION@
-Cflags: -I${includedir}/@GENERIC_LIBRARY_NAME@-@GENERIC_API_VERSION@
+Libs: @LIBS_LIBDIR@ -lsqlite3 -l@GENERIC_LIBRARY_NAME@
+Cflags: -I${includedir}/servicelog-@GENERIC_API_VERSION@
Index: configure.ac
===================================================================
--- configure.ac.orig 2008-08-17 00:15:33.000000000 +0200
+++ configure.ac 2010-04-14 20:00:54.851453776 +0200
@@ -70,5 +70,15 @@ AC_FUNC_STAT
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([memset strerror strtoull uname])
+AC_MSG_CHECKING([Whether to put -L\${libdir} in .pc])
+if test -z "$(echo $libdir|fgrep /usr)"; then
+ LIBS_LIBDIR='-L${libdir}'
+ use_libdir=yes
+else
+ use_libdir=no
+fi
+AC_MSG_RESULT(${use_libdir})
+AC_SUBST(LIBS_LIBDIR)
+
AC_CONFIG_FILES([Makefile src/Makefile libservicelog.spec src/servicelog-1.pc])
AC_OUTPUT