[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#519460: sg3-utils: Fix kfreebsd problems

Package: sg3-utils
Version: 1.24-2
Severity: important

This patch fixes two problems on kfreebsd:

1) Missing dependency of libsgutils1-dev on libcam-dev. Due to
   the .la file referencing -lcam packages building against

   See e.g.

2) FTBFS on kfreebsd due to the fact that LDFLAGS from the 
   environment overwrite the LDFLAGS in the makefile, so the
   -lcam gets missing. I've hardcoded it in the only place it is
   really needed.


-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages sg3-utils depends on:
ii  libc6                         2.7-18     GNU C Library: Shared libraries
ii  libsgutils1                   1.24-2     Utilities for working with generic

sg3-utils recommends no packages.

sg3-utils suggests no packages.

-- no debconf information

Frank Lichtenheld <djpig@debian.org>       http://www.debian.org/
diff -u sg3-utils-1.24/Makefile.freebsd sg3-utils-1.24/Makefile.freebsd
--- sg3-utils-1.24/Makefile.freebsd
+++ sg3-utils-1.24/Makefile.freebsd
@@ -10,7 +10,7 @@
 LD = gcc
 # LIBTOOL = libtool15
 LIBTOOL = libtool
-LT_EXTRA = --tag=junk
+# LT_EXTRA = --tag=junk
 EXECS = sg_readcap sg_turs sg_inq sg_start sg_modes sg_logs \
 	sg_senddiag sg_persist sg_requests sg_ses sg_luns \
@@ -74,7 +74,7 @@
 	$(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_pt_freebsd.c
 libsgutils.la: sg_lib.lo sg_cmds_basic.lo sg_cmds_extra.lo sg_pt_freebsd.lo
-	$(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) $(LDFLAGS) -o libsgutils.la sg_lib.lo \
+	$(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) $(LDFLAGS) -lcam -o libsgutils.la sg_lib.lo \
 	sg_cmds_basic.lo sg_cmds_extra.lo sg_pt_freebsd.lo -rpath $(LIBDIR) \
 	-version-info $(LIB_VINFO)
diff -u sg3-utils-1.24/debian/changelog sg3-utils-1.24/debian/changelog
--- sg3-utils-1.24/debian/changelog
+++ sg3-utils-1.24/debian/changelog
@@ -1,3 +1,11 @@
+sg3-utils (1.24-2.1) unstable; urgency=low
+  * Non-maintainer upload.
+  * Add dependency of libsgutils-dev on libcam-dev on kfreebsd-*
+  * Fix FTBFS on kfreebsd-* due to LDFLAGS set by dpkg-buildpackage.
+ -- Frank Lichtenheld <djpig@debian.org>  Thu, 12 Mar 2009 20:48:13 +0100
 sg3-utils (1.24-2) unstable; urgency=low
   * Cleaned up package description (Closes: #445920).
diff -u sg3-utils-1.24/debian/control sg3-utils-1.24/debian/control
--- sg3-utils-1.24/debian/control
+++ sg3-utils-1.24/debian/control
@@ -39,7 +39,7 @@
 Package: libsgutils1-dev
 Section: libdevel
 Architecture: any
-Depends: libsgutils1, ${shlibs:Depends}
+Depends: libsgutils1, ${shlibs:Depends}, ${kfreebsd:Depends}
 Recommends: sg3-utils
 Description: Utilities for working with generic SCSI devices (developer files)
  This package contains the <scsi/sg_cmds.h> and <scsi/sg_lib.h> header
diff -u sg3-utils-1.24/debian/rules sg3-utils-1.24/debian/rules
--- sg3-utils-1.24/debian/rules
+++ sg3-utils-1.24/debian/rules
@@ -78,6 +78,9 @@
 	dh_makeshlibs -V -v
 	dh_installdeb -a
 	dh_shlibdeps -ldebian/tmp/usr/lib -L libsgutils1
+ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
+	echo kfreebsd:Depends=libcam-dev >>debian/libsgutils1-dev.substvars
 	dh_gencontrol -a
 	dh_md5sums -a
 	dh_builddeb -a

Reply to: