[med-svn] [SCM] bowtie2 branch, master, updated. upstream/2.0.0-beta5-14-g081828d

Andreas Tille tille at debian.org
Fri Apr 27 11:59:43 UTC 2012


The following commit has been merged in the master branch:
commit 081828dc38b05c6c4ef5c97d1b64e443bb24ae8c
Author: Andreas Tille <tille at debian.org>
Date:   Fri Apr 27 13:59:24 2012 +0200

    prevent -mXX and -msse2 switches for non Intel architectures

diff --git a/debian/changelog b/debian/changelog
index b9603be..a28936c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ bowtie2 (2.0.0-beta5-2) UNRELEASED; urgency=low
 
   [ Andreas Tille ]
   * debian/upstream: Added publication
+  * debian/patches/fix_makefile_machine_detection.patch + debian/rules:
+    prevent -mXX and -msse2 switches for non Intel architectures
+    Closes: #668123
 
  -- Andreas Tille <tille at debian.org>  Thu, 26 Apr 2012 13:59:54 +0200
 
diff --git a/debian/patches/fix_makefile_machine_detection.patch b/debian/patches/fix_makefile_machine_detection.patch
index 4608e98..7487d48 100644
--- a/debian/patches/fix_makefile_machine_detection.patch
+++ b/debian/patches/fix_makefile_machine_detection.patch
@@ -2,47 +2,56 @@ Subject: Attemp to adapt build flags to built package on all supported
  architectures.
 Origin: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 Date: 2012-03-10
---- bowtie2.orig/Makefile
-+++ bowtie2/Makefile
-@@ -107,20 +107,36 @@
+--- bowtie2-2.0.0-beta5.orig/Makefile
++++ bowtie2-2.0.0-beta5/Makefile
+@@ -107,20 +107,38 @@
  VERSION = $(shell cat VERSION)
  EXTRA_FLAGS =
  
-+ARCH := $(shell getconf LONG_BIT)
-+UNAME := $(shell uname -m )
- # Convert BITS=?? to a -m flag
- BITS=32
+-# Convert BITS=?? to a -m flag
+-BITS=32
 -ifeq (x86_64,$(shell uname -m))
-+ifeq (64,$(ARCH))
- BITS=64
- endif
- BITS_FLAG =
+-BITS=64
+-endif
+-BITS_FLAG =
 -ifeq (32,$(BITS))
 -BITS_FLAG = -m32
-+ifeq ($(UNAME),i386)
-+	BITS_FLAG = -m32
- endif
+-endif
 -ifeq (64,$(BITS))
 -BITS_FLAG = -m64
-+ifeq ($(UNAME),x86_64)
+-endif
++ifeq (1,$(ENABLE_SSE))
++ ARCH := $(shell getconf LONG_BIT)
++ UNAME := $(shell uname -m )
++ # Convert BITS=?? to a -m flag
++ BITS=32
++ ifeq (64,$(ARCH))
++ BITS=64
++ endif
++ BITS_FLAG =
++ ifeq ($(UNAME),i386)
++	BITS_FLAG = -m32
++ endif
++ ifeq ($(UNAME),x86_64)
 +	BITS_FLAG = -m64
-+endif
-+ifeq ($(UNAME),'Power Macintosh')
++ endif
++ ifeq ($(UNAME),'Power Macintosh')
 +	ifeq (32,$(BITS))
 +		BITS_FLAG = -m32
 +	endif
 +	ifeq (64,$(BITS))
 +		BITS_FLAG = -m64
 +	endif
- endif
++ endif
  
 -SSE_FLAG=-msse2
-+SSE_FLAG =
-+ifeq ($(UNAME),i386)
++ SSE_FLAG =
++ ifeq ($(UNAME),i386)
 +	SSE_FLAG=-msse2
-+endif
-+ifeq ($(UNAME),x86_64)
++ endif
++ ifeq ($(UNAME),x86_64)
 +	SSE_FLAG=-msse2
++ endif
 +endif
  
  DEBUG_FLAGS    = -O0 -g3 $(BITS_FLAG) $(SSE_FLAG)
diff --git a/debian/rules b/debian/rules
index ccff899..c9c2fdf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,10 +1,22 @@
 #!/usr/bin/make -f
 
-pkg=$(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
+pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
+arch := $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
+
+# ENABLE_SSE=0
+ifeq ($(arch),i386)
+    ENABLE_SSE=1
+endif
+ifeq ($(arch),amd64)
+    ENABLE_SSE=1
+endif
 
 %:
 	dh $@
 
+override_dh_auto_build:
+	dh_auto_build -- ENABLE_SSE=$(ENABLE_SSE)
+
 override_dh_auto_install:
 	mkdir -p $(CURDIR)/debian/$(pkg)/usr/share/man/man1/
 	help2man --name="wrapper for $(pkg)-align" --no-info \

-- 
ultrafast memory-efficient short read aligner



More information about the debian-med-commit mailing list