Author: tille Date: 2013-11-04 16:08:59 +0000 (Mon, 04 Nov 2013) New Revision: 15084
Added: trunk/packages/R/r-bioc-rsamtools/trunk/debian/patches/use-debian-packaged-libs.patch Modified: trunk/packages/R/r-bioc-rsamtools/trunk/debian/README.source trunk/packages/R/r-bioc-rsamtools/trunk/debian/README.test trunk/packages/R/r-bioc-rsamtools/trunk/debian/changelog trunk/packages/R/r-bioc-rsamtools/trunk/debian/control trunk/packages/R/r-bioc-rsamtools/trunk/debian/rules Log: Document extensively the attempt to use Debian packaged libbam.a and the way I found out that it does not work; Upload to new Modified: trunk/packages/R/r-bioc-rsamtools/trunk/debian/README.source =================================================================== --- trunk/packages/R/r-bioc-rsamtools/trunk/debian/README.source 2013-11-04 13:36:50 UTC (rev 15083) +++ trunk/packages/R/r-bioc-rsamtools/trunk/debian/README.source 2013-11-04 16:08:59 UTC (rev 15084) @@ -56,4 +56,20 @@ This is a hand-crafted file used in a unit test +Source code duplication +======================= + +The following files are copies of source code that is just contained in +other Debian packages. We are discussing this issue with upstream to +enable making use of dynamic linking for future versions of this package. + +Files: src/samtools/* + Source is part of samtools (0.1.19-1) + For more details what was tried see + debian/patches/use-debian-packaged-libs.patch + +Files: src/tabix/* + Source is part of tabix (0.2.6-1) + + -- Andreas Tille <[email protected]> Fri, 25 Oct 2013 08:53:18 +0200 Modified: trunk/packages/R/r-bioc-rsamtools/trunk/debian/README.test =================================================================== --- trunk/packages/R/r-bioc-rsamtools/trunk/debian/README.test 2013-11-04 13:36:50 UTC (rev 15083) +++ trunk/packages/R/r-bioc-rsamtools/trunk/debian/README.test 2013-11-04 16:08:59 UTC (rev 15084) @@ -1,5 +1,11 @@ Notes on how this package can be tested. ──────────────────────────────────────── -This package can be tested by loading it into R with the command -‘library(Rsamtools)’ in order to confirm its integrity. +This package can be tested by running the provided test: + +R --no-save <<EOT +require("Rsamtools") || stop("unable to load Rsamtools package") +Rsamtools:::.test() +EOT + +in order to confirm its integrity. Modified: trunk/packages/R/r-bioc-rsamtools/trunk/debian/changelog =================================================================== --- trunk/packages/R/r-bioc-rsamtools/trunk/debian/changelog 2013-11-04 13:36:50 UTC (rev 15083) +++ trunk/packages/R/r-bioc-rsamtools/trunk/debian/changelog 2013-11-04 16:08:59 UTC (rev 15084) @@ -1,4 +1,4 @@ -r-bioc-rsamtools (1.12.4-1) UNRELEASED; urgency=low +r-bioc-rsamtools (1.12.4-1) unstable; urgency=low * Initial release (closes: #728285) Modified: trunk/packages/R/r-bioc-rsamtools/trunk/debian/control =================================================================== --- trunk/packages/R/r-bioc-rsamtools/trunk/debian/control 2013-11-04 13:36:50 UTC (rev 15083) +++ trunk/packages/R/r-bioc-rsamtools/trunk/debian/control 2013-11-04 16:08:59 UTC (rev 15084) @@ -10,7 +10,8 @@ r-bioc-biocgenerics, r-bioc-iranges, r-bioc-biostrings, - r-bioc-genomicranges + r-bioc-genomicranges, + libbam-dev Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/R/r-bioc-rsamtools/trunk/ Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/R/r-bioc-rsamtools/trunk/ @@ -26,6 +27,8 @@ r-bioc-iranges, r-bioc-biostrings, r-bioc-genomicranges +# The following BioConductor modules are not yet packaged but used in the unit test +Suggests: r-bioc-pasillabamsubset, r-bioc-shortread Description: GNU R binary alignment (BAM), variant call (BCF), or tabix file import This package provides an interface to the 'samtools', 'bcftools', and 'tabix' utilities for manipulating SAM (Sequence Alignment / Map), Added: trunk/packages/R/r-bioc-rsamtools/trunk/debian/patches/use-debian-packaged-libs.patch =================================================================== --- trunk/packages/R/r-bioc-rsamtools/trunk/debian/patches/use-debian-packaged-libs.patch (rev 0) +++ trunk/packages/R/r-bioc-rsamtools/trunk/debian/patches/use-debian-packaged-libs.patch 2013-11-04 16:08:59 UTC (rev 15084) @@ -0,0 +1,85 @@ +Author: Andreas Tille <[email protected]> +LastChanged: Wed, 04 Sep 2013 11:11:22 +0200 +Description: This does not yet work / patch disabled + The purpose of this patch was to link dynymically against libbam which + is provided by libbam-dev package since the source of Rsamtools contains + a copy of samtools code which should be avoided. Unfortunately this + simple hack does not work because of some magic in the R build process + which is not yet fully understood and needs more investigation most + probably by discussing the issue with upstream. + . + It was verified that this patch does not work by the following method: + R --no-save < tests/Rsamtools_unit_tests.R + which crashed after: + Error in checkIdentical(exp, sapply(obs, length)) : FALSE. + Without the patch the test also runs in some errors - some of them + due to missing modules pasillaBamSubset and ShortRead (see Suggested + Depends in debian/control - these modules are not yet packaged) and + some due to blocked http, but the whole test at least finished with + some summary. + + +--- a/Rsamtools.mk ++++ b/Rsamtools.mk +@@ -2,7 +2,7 @@ SAMTOOLS_PATH=\ + `echo 'cat(system.file("usrlib", .Platform[["r_arch"]],\ + package="Rsamtools", mustWork=TRUE))' |\ + "${R_HOME}/bin/R" --vanilla --slave` +-PKG_LIBS+="$(SAMTOOLS_PATH)/libbam.a" "$(SAMTOOLS_PATH)/libbcf.a"\ ++PKG_LIBS+="-lbam" "$(SAMTOOLS_PATH)/libbcf.a"\ + "$(SAMTOOLS_PATH)/libtabix.a" -lz -pthread + PKG_CPPFLAGS+=-D_USE_KNETFILE -D_FILE_OFFSET_BITS=64 \ + -D_LARGEFILE64_SOURCE +--- a/src/Makevars.common ++++ b/src/Makevars.common +@@ -1,13 +1,8 @@ + PATCH_O = samtools_patch.o + KNETFILE_O = knetfile.o +-BAMOBJ_0 = \ +- bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o \ +- bam_pileup.o bam_lpileup.o bam_md.o razf.o faidx.o \ +- $(KNETFILE_O) bam_sort.o sam_header.o bam_reheader.o kprobaln.o + BCFOBJ_0 = \ + bcf.o vcf.o bcfutils.o prob1.o kfunc.o index.o fet.o \ + bcf2qcall.o +-BAMOBJ=$(BAMOBJ_0:%=samtools/%) $(PATCH_O) + BCFOBJ=$(BCFOBJ_0:%=samtools/bcftools/%) $(PATCH_O) + TABIXOBJ = \ + samtools/bgzf.o samtools/kstring.o samtools/knetfile.o \ +@@ -25,7 +20,7 @@ PKG_CFLAGS += \ + + PKG_LIBS += -pthread \ + $(SHLIB_OPENMP_CFLAGS) \ +- "${R_PACKAGE_DIR}/usrlib${R_ARCH}/libbam.a" \ ++ "-lbam" \ + "${R_PACKAGE_DIR}/usrlib${R_ARCH}/libbcf.a" \ + "${R_PACKAGE_DIR}/usrlib${R_ARCH}/libtabix.a" + +@@ -44,8 +39,8 @@ libs: libs0 + cp samtools/bgzf.h samtools/kstring.h samtools/knetfile.h \ + "${R_PACKAGE_DIR}/include/tabix/" + mkdir -p "${R_PACKAGE_DIR}/usrlib${R_ARCH}" +- cp libbam.a libbcf.a libtabix.a "${R_PACKAGE_DIR}/usrlib${R_ARCH}" ++ cp libbcf.a libtabix.a "${R_PACKAGE_DIR}/usrlib${R_ARCH}" + + clean: +- rm $(BAMOBJ) $(BCFOBJ) $(TABIXOBJ) *.a *.o *.so *.dll ++ rm $(BCFOBJ) $(TABIXOBJ) *.a *.o *.so *.dll + +--- a/src/Makevars ++++ b/src/Makevars +@@ -2,13 +2,10 @@ include Makevars.common + + PKG_LIBS += -lz + +-libs0: libbam.a libbcf.a libtabix.a ++libs0: libbcf.a libtabix.a + mkdir -p "${R_PACKAGE_DIR}/usretc${R_ARCH}" + cp ../Rsamtools.mk "${R_PACKAGE_DIR}/usretc${R_ARCH}" + +-libbam.a: $(BAMOBJ) +- $(AR) -crus $@ $(BAMOBJ) +- + libbcf.a: $(BCFOBJ) + $(AR) -crus $@ $(BCFOBJ) + Modified: trunk/packages/R/r-bioc-rsamtools/trunk/debian/rules =================================================================== --- trunk/packages/R/r-bioc-rsamtools/trunk/debian/rules 2013-11-04 13:36:50 UTC (rev 15083) +++ trunk/packages/R/r-bioc-rsamtools/trunk/debian/rules 2013-11-04 16:08:59 UTC (rev 15084) @@ -5,3 +5,7 @@ install/$(package):: rm -rf debian/$(package)/usr/lib/R/site-library/$(cranNameOrig)/LICENSE + +clean:: + dh_clean + rm -f src/*.a _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
