[med-svn] [Git][med-team/mecat2][master] Some build depends and modify Makefiles to use libraries already in Debian

Shayan Doust gitlab at salsa.debian.org
Mon Jun 29 15:50:03 BST 2020



Shayan Doust pushed to branch master at Debian Med / mecat2


Commits:
98eeb380 by Shayan Doust at 2020-06-29T15:49:14+01:00
Some build depends and modify Makefiles to use libraries already in Debian

- - - - -


3 changed files:

- debian/control
- + debian/patches/series
- + debian/patches/use_system_packaged_libs.patch


Changes:

=====================================
debian/control
=====================================
@@ -3,7 +3,9 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
 Uploaders: Shayan Doust <hello at shayandoust.me>
 Section: science
 Priority: optional
-Build-Depends: debhelper-compat (= 13)
+Build-Depends: debhelper-compat (= 13),
+               libhdf5-dev,
+               zlib1g-dev
 Standards-Version: 4.5.0
 Vcs-Browser: https://salsa.debian.org/med-team/mecat2
 Vcs-Git: https://salsa.debian.org/med-team/mecat2.git


=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+use_system_packaged_libs.patch


=====================================
debian/patches/use_system_packaged_libs.patch
=====================================
@@ -0,0 +1,72 @@
+Description: use libraries that are already pre-packaged in Debian
+ Modify the Makefiles so that we instead use libraries that are already within Debian as a package, and not one in some third_party/ directory to build (removed).
+Author: Shayan Doust <hello at shayandoust.me> 
+Last-Update: 2020-06-29
+---
+
+--- mecat2.orig/Makefile
++++ mecat2/Makefile
+@@ -1,6 +1,7 @@
+ PWD := $(shell pwd)
+ OS_TYPE		:= $(shell echo `uname`)
+ MACHINE_TYPE	:= $(shell echo `uname -m`)
++MACHINE_TYPE_2 := $(shell echo `uname -m`)
+ ifeq (${MACHINE_TYPE}, x86_64)
+ 	MACHINE_TYPE = amd64
+ endif
+@@ -8,13 +9,6 @@
+ 
+ BUILD_TOP_DIR := ${PWD}/${OS_TYPE}-${MACHINE_TYPE}
+ 
+-HDF5_VERSION ?= 1.10.4
+-HDF5_INSTALL = ${BUILD_TOP_DIR}/hdf5
+-HDF5_SOURCE = ${BUILD_TOP_DIR}/hdf5-${HDF5_VERSION}
+-HDF5_INCLUDE = ${HDF5_INSTALL}/include
+-HDF5_LIB = ${HDF5_INSTALL}/lib/libhdf5.a
+-HDF5_TAR_GZ = ${BUILD_TOP_DIR}/hdf5-$(HDF5_VERSION).tar.gz
+-
+ DEXTRACTOR_BIN_NAME = dexqv dexta dextract undexqv undexta
+ DEXTRACTOR_BIN = $(patsubst %, ${BUILD_DIR}/%, $(DEXTRACTOR_BIN_NAME))
+ 
+@@ -28,8 +22,6 @@
+ clean:
+ 	cd src && make clean
+ 	cd DEXTRACTOR && make -f ../dextract_makefile clean
+-	rm ${HDF5_INSTALL} -rf
+-	rm ${HDF5_SOURCE} -rf
+ 	rm ${DEXTRACTOR_BIN} -f
+ 
+ dextractor: ${BUILD_TOP_DIR}/bin/dexqv ${BUILD_TOP_DIR}/bin/dexta ${BUILD_TOP_DIR}/bin/dextract ${BUILD_TOP_DIR}/bin/undexqv ${BUILD_TOP_DIR}/bin/undexta
+@@ -37,18 +29,5 @@
+ 
+ ${DEXTRACTOR_BIN}: ${HDF5_LIB}
+ 	mkdir -p ${BUILD_DIR}		
+-	cd DEXTRACTOR && make -f ../dextract_makefile HDF5_INCLUDE=${HDF5_INCLUDE} HDF5_LIB=${HDF5_LIB} 
++	cd DEXTRACTOR && make -f ../dextract_makefile HDF5_INCLUDE=/usr/include/hdf5/serial/ HDF5_LIB=/usr/lib/${MACHINE_TYPE_2}-linux-gnu/hdf5/serial/ 
+ 	cd DEXTRACTOR && cp ${DEXTRACTOR_BIN_NAME} ${BUILD_DIR}
+-
+-${HDF5_LIB}: ${HDF5_TAR_GZ}
+-	tar -xzf ${BUILD_TOP_DIR}/hdf5-$(HDF5_VERSION).tar.gz -C ${BUILD_TOP_DIR} || exit 255
+-	cd ${BUILD_TOP_DIR}/hdf5-$(HDF5_VERSION) && \
+-		./configure --enable-threadsafe --disable-hl --libdir=`pwd`/../hdf5/lib --includedir=`pwd`/../hdf5/include --prefix=`pwd`/../hdf5 && \
+-		make -j ${MAKEFLAGS} && make install
+-
+-${HDF5_TAR_GZ}:
+-	mkdir -p ${BUILD_DIR}		
+-	version_major_minor=`echo "$(HDF5_VERSION)" | sed -E 's/\.[0-9]+$$//'`; \
+-	cp third_party/hdf5-1.10.4.tar.gz ${BUILD_TOP_DIR}/
+-	
+-
+--- mecat2.orig/dextract_makefile
++++ mecat2/dextract_makefile
+@@ -6,8 +6,8 @@
+ all: dextract dexta undexta dexqv undexqv
+ 
+ dextract:
+-	#${CC} $(CFLAGS) -I$(HDF5_INCLUDE) -L$(HDF5_LIB) -o dextract dextract.c DB.c QV.c expr.c bax.c sam.c -lhdf5 -lz
+-	${CC} $(CFLAGS) -I$(HDF5_INCLUDE) -o dextract dextract.c DB.c QV.c expr.c bax.c sam.c ${HDF5_LIB} -lpthread  -lz -ldl -lm
++	${CC} $(CFLAGS) -I$(HDF5_INCLUDE) -L$(HDF5_LIB) -o dextract dextract.c DB.c QV.c expr.c bax.c sam.c -lhdf5 -lz -lpthread -lm -ldl
++	#${CC} $(CFLAGS) -I$(HDF5_INCLUDE) -o dextract dextract.c DB.c QV.c expr.c bax.c sam.c ${HDF5_LIB} -lpthread  -lz -ldl -lm
+ 
+ dexta:
+ 	${CC} ${CFLAGS} -o dexta dexta.c DB.c QV.c



View it on GitLab: https://salsa.debian.org/med-team/mecat2/-/commit/98eeb38062772bb771034fa6fade16f18fcb4fa7

-- 
View it on GitLab: https://salsa.debian.org/med-team/mecat2/-/commit/98eeb38062772bb771034fa6fade16f18fcb4fa7
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200629/97171466/attachment-0001.html>


More information about the debian-med-commit mailing list