[med-svn] [sra-sdk] 04/06: Adapt patches to new upstream version
Andreas Tille
tille at debian.org
Wed Jul 30 12:22:35 UTC 2014
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository sra-sdk.
commit 5ef56e1288faef49d7bee25f0aa7e08abcdb9934
Author: Andreas Tille <tille at debian.org>
Date: Wed Jul 30 14:04:43 2014 +0200
Adapt patches to new upstream version
---
Makefile | 6 +++---
build/Makefile.env | 4 ++--
build/Makefile.gcc | 6 ------
build/Makefile.shell | 23 +++++++++++-----------
debian/patches/10_portability.patch | 2 +-
debian/patches/build-with-system-libbz2-libz.patch | 2 +-
debian/patches/hardening.patch | 5 +----
libs/Makefile | 1 -
libs/kdb/database.c | 2 +-
libs/kdb/index.c | 2 +-
libs/kdb/table.c | 2 +-
libs/ncbi-vdb/Makefile | 6 ++----
12 files changed, 24 insertions(+), 37 deletions(-)
diff --git a/Makefile b/Makefile
index 0b467d0..58d55d9 100644
--- a/Makefile
+++ b/Makefile
@@ -81,11 +81,11 @@ PASSTHRUS = \
$(CONFIG) $(PUBLISH)
$(PASSTHRUS):
- @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env $@
- @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env rebuild-dirlinks config
+ @ $(MAKE) -s TOP=$(CURDIR) DEB_CFLAGS="$(DEB_CFLAGS)" DEB_LDFLAGS="$(DEB_LDFLAGS)" -f build/Makefile.env $@
+ @ $(MAKE) -s TOP=$(CURDIR) DEB_CFLAGS="$(DEB_CFLAGS)" DEB_LDFLAGS="$(DEB_LDFLAGS)" -f build/Makefile.env rebuild-dirlinks config
$(REPORTS):
- @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env $@
+ @ $(MAKE) -s TOP=$(CURDIR) DEB_CFLAGS="$(DEB_CFLAGS)" DEB_LDFLAGS="$(DEB_LDFLAGS)" -f build/Makefile.env $@
.PHONY: $(PASSTHRUS) $(REPORTS)
diff --git a/build/Makefile.env b/build/Makefile.env
index fcc653c..ce12830 100644
--- a/build/Makefile.env
+++ b/build/Makefile.env
@@ -303,6 +303,6 @@ DLLX ?= $(SHLX)
ARCHDEFS = -D_ARCH_BITS=$(BITS) -DLIBPREFIX=$(LPFX) -DSHLIBEXT=$(DLLX)
# default tool parameters
-CFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(PED) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(MIN_DEPLOY_OS_OPT) $(INCDIRS)
+CFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(PED) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(MIN_DEPLOY_OS_OPT) $(INCDIRS) $(DEB_CFLAGS)
CPFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(MIN_DEPLOY_OS_OPT) $(INCDIRS)
-LDFLAGS = $(DBG) $(PROF) $(CARCH) $(MIN_DEPLOY_OS_OPT)
+LDFLAGS = $(DBG) $(PROF) $(CARCH) $(MIN_DEPLOY_OS_OPT) $(DEB_LDFLAGS)
diff --git a/build/Makefile.gcc b/build/Makefile.gcc
index d391d1b..35650a8 100644
--- a/build/Makefile.gcc
+++ b/build/Makefile.gcc
@@ -55,12 +55,6 @@ ifeq (linux,$(OS))
NO_ARRAY_BOUNDS_WARNING = -Wno-array-bounds
endif
-ifeq (64,$(BITS))
- CARCH = -m64
-else
- CARCH = -m32
-endif
-
ifeq (prof, $(BUILD))
PROF = -pg
endif
diff --git a/build/Makefile.shell b/build/Makefile.shell
index 0990c50..a9b8f77 100644
--- a/build/Makefile.shell
+++ b/build/Makefile.shell
@@ -26,6 +26,7 @@
# determine OS
UNAME = $(shell uname -s)
+HOST_OS = ''
ifeq (Darwin, $(UNAME))
HOST_OS = mac
endif
@@ -42,12 +43,17 @@ endif
ifeq (xMINGW, $(findstring xMINGW,x$(UNAME)))
HOST_OS = win
endif
+# handle all other OSes (like BSD or Hurd) as if they were linux (see bug #627861)
+ifeq ($(HOST_OS), '')
+ HOST_OS = linux
+endif
# assume build OS is the same as host OS
OS = $(HOST_OS)
BUILD_OS = $(OS)
# determine ARCH
+HOST_ARCH=''
ARCHITECTURES = default
ifeq (mac,$(HOST_OS))
HOST_ARCH = $(shell $(TOP)/build/mac.arch.sh)
@@ -88,6 +94,10 @@ else
ARCHITECTURES = sparc64 sparc32
endif
endif
+# Handle all other architectures equivalent as i386 (see bug #627861)
+ifeq ($(ARCH),'')
+ ARCH = i386
+endif
ARCH = $(HOST_ARCH)
REMOTE_ARCH = $(ARCH)
@@ -136,15 +146,4 @@ endif
OSFLAV = $(OS)
# determine BITS
-ifeq (x86_64, $(ARCH))
- BITS = 64
-endif
-ifeq (sparc64, $(ARCH))
- BITS = 64
-endif
-ifeq (i386, $(ARCH))
- BITS = 32
-endif
-ifeq (sparc32, $(ARCH))
- BITS = 32
-endif
+BITS = $(shell dpkg-architecture -qDEB_BUILD_ARCH_BITS)
diff --git a/debian/patches/10_portability.patch b/debian/patches/10_portability.patch
index e0ca446..78a01a4 100644
--- a/debian/patches/10_portability.patch
+++ b/debian/patches/10_portability.patch
@@ -5,7 +5,7 @@ Description: Drop redundant -m32/-m64 option to enable build
--- a/build/Makefile.gcc
+++ b/build/Makefile.gcc
-@@ -53,12 +53,6 @@ ifeq (linux,$(OS))
+@@ -55,12 +55,6 @@ ifeq (linux,$(OS))
NO_ARRAY_BOUNDS_WARNING = -Wno-array-bounds
endif
diff --git a/debian/patches/build-with-system-libbz2-libz.patch b/debian/patches/build-with-system-libbz2-libz.patch
index c2f755a..1c8359a 100644
--- a/debian/patches/build-with-system-libbz2-libz.patch
+++ b/debian/patches/build-with-system-libbz2-libz.patch
@@ -16,7 +16,7 @@ Description: Fix issue when trying to build against Debian packaged
@@ -97,8 +96,7 @@ VDB_LIB_CMN = \
ksrch \
$(LIBKXML) \
- kurl \
+ kns \
- vfs \
- z
+ vfs
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
index 2bc210b..8500b44 100644
--- a/debian/patches/hardening.patch
+++ b/debian/patches/hardening.patch
@@ -8,7 +8,7 @@ Description: Propagate Debian hardening options into build system
--- a/build/Makefile.env
+++ b/build/Makefile.env
-@@ -301,9 +301,9 @@ DLLX ?= $(SHLX)
+@@ -303,6 +303,6 @@ DLLX ?= $(SHLX)
ARCHDEFS = -D_ARCH_BITS=$(BITS) -DLIBPREFIX=$(LPFX) -DSHLIBEXT=$(DLLX)
# default tool parameters
@@ -17,9 +17,6 @@ Description: Propagate Debian hardening options into build system
CPFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(MIN_DEPLOY_OS_OPT) $(INCDIRS)
-LDFLAGS = $(DBG) $(PROF) $(CARCH) $(MIN_DEPLOY_OS_OPT)
+LDFLAGS = $(DBG) $(PROF) $(CARCH) $(MIN_DEPLOY_OS_OPT) $(DEB_LDFLAGS)
-
- #-------------------------------------------------------------------------------
- # runtests
--- a/Makefile
+++ b/Makefile
@@ -81,11 +81,11 @@ PASSTHRUS = \
diff --git a/libs/Makefile b/libs/Makefile
index ac66110..1db72c8 100644
--- a/libs/Makefile
+++ b/libs/Makefile
@@ -32,7 +32,6 @@ include $(TOP)/build/Makefile.shell
# default
#
SUBDIRS = \
- ext \
klib \
kproc \
kfs \
diff --git a/libs/kdb/database.c b/libs/kdb/database.c
index 7329631..0fbe4b8 100644
--- a/libs/kdb/database.c
+++ b/libs/kdb/database.c
@@ -216,7 +216,7 @@ rc_t KDBManagerVOpenDBReadInt ( const KDBManager *self, const KDatabase **dbp,
is that of stdc library's printf, not vdb printf */
char dbpath [ 4096 ];
int z = ( args == NULL ) ?
- snprintf ( dbpath, sizeof dbpath, path ):
+ snprintf ( dbpath, sizeof dbpath, "%s", path ):
vsnprintf ( dbpath, sizeof dbpath, path, args );
if ( z < 0 || ( size_t ) z >= sizeof dbpath )
rc = RC ( rcDB, rcMgr, rcOpening, rcPath, rcExcessive );
diff --git a/libs/kdb/index.c b/libs/kdb/index.c
index b4cd1f6..d76bc56 100644
--- a/libs/kdb/index.c
+++ b/libs/kdb/index.c
@@ -492,7 +492,7 @@ LIB_EXPORT rc_t CC KTableVOpenIndexRead ( const KTable *self,
{
int len;
if ( args == 0 )
- len = snprintf ( path, sizeof path, name );
+ len = snprintf ( path, sizeof path, "%s", name );
else
len = vsnprintf ( path, sizeof path, name, args );
if ( len < 0 || ( size_t ) len >= sizeof path )
diff --git a/libs/kdb/table.c b/libs/kdb/table.c
index 3072e5a..e64e6af 100644
--- a/libs/kdb/table.c
+++ b/libs/kdb/table.c
@@ -216,7 +216,7 @@ rc_t KDBManagerVOpenTableReadInt ( const KDBManager *self,
char tblpath [ 4096 ];
int z = ( args == NULL ) ?
- snprintf ( tblpath, sizeof tblpath, path ):
+ snprintf ( tblpath, sizeof tblpath, "%s", path ):
vsnprintf ( tblpath, sizeof tblpath, path, args );
if ( z < 0 || ( size_t ) z >= sizeof tblpath )
rc = RC ( rcDB, rcMgr, rcOpening, rcPath, rcExcessive );
diff --git a/libs/ncbi-vdb/Makefile b/libs/ncbi-vdb/Makefile
index 8821403..063d37f 100644
--- a/libs/ncbi-vdb/Makefile
+++ b/libs/ncbi-vdb/Makefile
@@ -87,7 +87,6 @@ endif
VDB_LIB_CMN = \
align-access \
ncbi-bam \
- bz2 \
kfg \
kfs \
klib \
@@ -97,8 +96,7 @@ VDB_LIB_CMN = \
ksrch \
$(LIBKXML) \
kns \
- vfs \
- z
+ vfs
VDB_LIB_RD = \
$(VDB_LIB_CMN) \
@@ -115,7 +113,7 @@ VDB_OBJ = \
$(addprefix $(ILIBDIR)/lib,$(addsuffix .a,$(VDB_LIB_RD)))
VDB_LIB = \
- $(addprefix -s,$(VDB_LIB_RD))
+ $(addprefix -s,$(VDB_LIB_RD)) -lbz2 -lz
$(LIBDIR)/libncbi-vdb.$(SHLX): $(VDB_OBJ)
$(LD) --dlib --vers $(SRCDIR) -o $@ $(VDB_LIB)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/sra-sdk.git
More information about the debian-med-commit
mailing list