public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-fs/dmraid/files: dmraid-1.0.0_rc16-static-build-fixes.patch
@ 2010-12-15 17:25 Thomas Sachau (tommy)
  0 siblings, 0 replies; only message in thread
From: Thomas Sachau (tommy) @ 2010-12-15 17:25 UTC (permalink / raw
  To: gentoo-commits

tommy       10/12/15 17:25:09

  Added:                dmraid-1.0.0_rc16-static-build-fixes.patch
  Log:
  proxy commit: Revision bump, fixes bug 347712
  
  (Portage version: 2.2.0_alpha7-r1/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch?rev=1.1&content-type=text/plain

Index: dmraid-1.0.0_rc16-static-build-fixes.patch
===================================================================
--- tools/Makefile.in.old	2010-05-31 07:18:31.000000000 -0400
+++ tools/Makefile.in	2010-12-13 13:15:22.000000000 -0500
@@ -60,17 +60,23 @@
 ifeq ("@KLIBC@", "no")
 	ifeq ("@STATIC_LINK@", "no")
 		LDFLAGS += -rdynamic
+		MYLIBOBJ=$(top_builddir)/lib/libdmraid.so
 	else
 		LDFLAGS += -static
+		MYLIBOBJ=$(top_builddir)/lib/libdmraid.a
+		DMRAIDLIBS += \
+			$(DEVMAPPEREVENT_LIBS) \
+			$(DEVMAPPER_LIBS) \
+			$(DL_LIBS)
 	endif
 endif
 
 .PHONY: install_dmraid_tools
 
-dmraid: $(OBJECTS) $(top_builddir)/lib/libdmraid.a
+dmraid: $(OBJECTS) $(MYLIBOBJ)
 	$(CC) -o $@ $(OBJECTS) $(LDFLAGS) -L$(top_builddir)/lib $(DMRAIDLIBS) $(LIBS)
 
-dmevent_tool: $(OBJECTS2) $(top_builddir)/lib/libdmraid.a
+dmevent_tool: $(OBJECTS2) $(MYLIBOBJ)
 	$(CC) -o $@ $(OBJECTS2) $(INCLUDES) $(LDFLAGS) -L$(top_builddir)/lib \
 		$(DMEVENTTOOLLIBS) $(DMRAIDLIBS) $(LIBS)
 
--- lib/Makefile.in.old	2010-10-27 07:31:46.000000000 -0400
+++ lib/Makefile.in	2010-12-13 13:04:16.000000000 -0500
@@ -60,11 +60,11 @@
 USRLIB_RELPATH = $(shell echo $(abspath $(usrlibdir) $(libdir)) | \
   $(AWK) -f $(top_srcdir)/tools/relpath.awk)
 
-TARGETS = $(LIB_STATIC)
+TARGETS = $(LIB_STATIC) $(LIB_SHARED) $(LIB_EVENTS_SHARED)
 
 ifeq ("@KLIBC@", "no")
 	ifeq ("@STATIC_LINK@", "no")
-		TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED)
+		TARGETS = $(LIB_SHARED) $(LIB_EVENTS_SHARED)
 	endif
 endif
 
--- configure.in	2010-05-31 07:18:30.000000000 -0400
+++ configure.in.new	2010-12-07 13:30:40.000000000 -0500
@@ -155,6 +155,15 @@
     Default is dynamic linking]),
   [STATIC_LINK=$enableval], [STATIC_LINK=no])
 
+if test "x$STATIC_LINK" != "xno"; then
+  if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+  fi
+  PKG_CONFIG="${PKG_CONFIG} --static"
+  ac_cv_env_PKG_CONFIG_set=set
+fi
+PKG_PROG_PKG_CONFIG([0.2])
+
 dnl Enables shared libdmraid
 AC_ARG_ENABLE(shared_lib,
   AC_HELP_STRING([--enable-shared_lib], [Use this to generate shared
@@ -248,23 +257,31 @@
 	AC_HELP_STRING([--with-devmapper-prefix=PFX],
 		[Where is devmapper library installed]),
 	[DEVMAPPER_LIBS="-L$withval/lib"
-	 DEVMAPPER_CFLAGS="-I$withval/include"],
+	 DEVMAPPER_CFLAGS="-I$withval/include"
+	 dmprefix=$withval],
 	[DEVMAPPER_LIBS=
-	 DEVMAPPER_CFLAGS=])
-save_LDFLAGS=$LDFLAGS
-save_CPPFLAGS=$CPPFLAGS
-LDFLAGS="$LDFLAGS $DEVMAPPER_LIBS"
-CPPFLAGS="$CPPFLAGS $DEVMAPPER_CFLAGS"
-AC_CHECK_LIB(devmapper-event, dm_event_handler_create,
-	[DEVMAPPEREVENT_LIBS="$DEVMAPPER_LIBS -ldevmapper-event"],
-	[AC_MSG_ERROR([device-mapper-event library is either missing or is too old and badly linked])])
-AC_CHECK_LIB(devmapper, dm_task_set_name,
-	[DEVMAPPER_LIBS="$DEVMAPPER_LIBS -ldevmapper"],
-	[AC_MSG_ERROR([device-mapper library is missing])])
-AC_CHECK_HEADERS(libdevmapper.h libdevmapper-event.h,,
-	[AC_MSG_ERROR([Missing headers device-mapper headers])])
-CPPFLAGS=$save_CPPFLAGS
-LDFLAGS=$save_LDFLAGS
+	 DEVMAPPER_CFLAGS=
+	 dmprefix=no])
+if test "x$dmprefix" = xno ; then
+	PKG_CHECK_MODULES([DEVMAPPER],[devmapper],
+		[PKG_CHECK_MODULES([DEVMAPPEREVENT],[devmapper-event])
+		])
+else
+	save_LDFLAGS=$LDFLAGS
+	save_CPPFLAGS=$CPPFLAGS
+	LDFLAGS="$LDFLAGS $DEVMAPPER_LIBS"
+	CPPFLAGS="$CPPFLAGS $DEVMAPPER_CFLAGS"
+	AC_CHECK_LIB(devmapper-event, dm_event_handler_create,
+		[DEVMAPPEREVENT_LIBS="$DEVMAPPER_LIBS -ldevmapper-event"],
+		[AC_MSG_ERROR([device-mapper-event library is either missing or is too old and badly linked])])
+	AC_CHECK_LIB(devmapper, dm_task_set_name,
+		[DEVMAPPER_LIBS="$DEVMAPPER_LIBS -ldevmapper"],
+		[AC_MSG_ERROR([device-mapper library is missing])])
+	AC_CHECK_HEADERS(libdevmapper.h libdevmapper-event.h,,
+		[AC_MSG_ERROR([Missing headers device-mapper headers])])
+	CPPFLAGS=$save_CPPFLAGS
+	LDFLAGS=$save_LDFLAGS
+fi
 
 VERSION=$srcdir/tools/VERSION
 DMRAID_LIB_MAJOR=$(cut -d. -f1 $VERSION)





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-12-15 17:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-15 17:25 [gentoo-commits] gentoo-x86 commit in sys-fs/dmraid/files: dmraid-1.0.0_rc16-static-build-fixes.patch Thomas Sachau (tommy)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox