pkgsrc-WIP-changes archive

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

bedtools: Upgrade to 2.29.2 and clean up



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Thu Jan 21 17:24:40 2021 -0600
Changeset:	17673fc48c921e80349e1d007e47e1695d39a0cf

Modified Files:
	bedtools2/Makefile
	bedtools2/distinfo
	bedtools2/patches/patch-Makefile
Added Files:
	bedtools2/patches/patch-src_utils_htslib_Makefile
Removed Files:
	bedtools2/TODO

Log Message:
bedtools: Upgrade to 2.29.2 and clean up

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=17673fc48c921e80349e1d007e47e1695d39a0cf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 bedtools2/Makefile                                | 41 ++++++----------
 bedtools2/TODO                                    |  1 -
 bedtools2/distinfo                                | 11 +++--
 bedtools2/patches/patch-Makefile                  | 60 ++++++-----------------
 bedtools2/patches/patch-src_utils_htslib_Makefile | 24 +++++++++
 5 files changed, 61 insertions(+), 76 deletions(-)

diffs:
diff --git a/bedtools2/Makefile b/bedtools2/Makefile
index 4d926bdc93..5f4a3e313b 100644
--- a/bedtools2/Makefile
+++ b/bedtools2/Makefile
@@ -1,39 +1,30 @@
 # $NetBSD$
 
-# N.B. Not sure if we need to override "python" in the Makefiles.
-
-DISTNAME=	bedtools2-${PORTVERSION}
+DISTNAME=	bedtools-2.29.2
 CATEGORIES=	biology
 MASTER_SITES=	${MASTER_SITE_GITHUB:=arq5x/}
-GITHUB_TAG=	v${PORTVERSION}
+GITHUB_PROJECT=	bedtools2
+GITHUB_TAG=	v${PKGVERSION_NOREV}
 
 MAINTAINER=	bacon%NetBSD.org@localhost
 HOMEPAGE=	https://github.com/arq5x/bedtools2
 COMMENT=	Swiss army knife for genome arithmetic
-LICENSE=	gnu-gpl-v2
+LICENSE=	mit
 
 USE_LANGUAGES=	c c++
 USE_TOOLS+=	gmake
-REPLACE_BASH=	scripts/*.sh
-REPLACE_PYTHON=	scripts/*.py
-
-PORTVERSION=	2.27.1
-
-.include "../../mk/bsd.prefs.mk"
-
-.if ${MACHINE_ARCH} == i386
-MAKE_ENV+=	POPCNT_CAPABILITY=0
-.endif
-
-pre-configure:
-	${SED} -i -e 's|@\$$(CXX)|$(CXX)|g' \
-	        ${WRKSRC}/*/Makefile \
-	        ${WRKSRC}/*/*/Makefile \
-	        ${WRKSRC}/*/*/*/Makefile \
-	        ${WRKSRC}/*/*/*/*/Makefile
-
-post-install:
-	${STRIP_CMD} ${DESTDIR}${PREFIX}/bin/bedtools
+REPLACE_SH=	scripts/vcfsortsh
+REPLACE_PYTHON=	scripts/makeBashScripts.py
+
+SUBST_CLASSES+=		make
+SUBST_STAGE.make=	pre-configure
+SUBST_SED.make=		-e 's|python|${PYTHONBIN}|g'
+SUBST_FILES.make=	Makefile
+
+# Avoid conflict with C++20 <version> by adding .txt suffix
+post-extract:
+	@${MV} ${WRKSRC}/src/utils/gzstream/version \
+		${WRKSRC}/src/utils/gzstream/version.txt
 
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../lang/python/application.mk"
diff --git a/bedtools2/TODO b/bedtools2/TODO
deleted file mode 100644
index b687356e6b..0000000000
--- a/bedtools2/TODO
+++ /dev/null
@@ -1 +0,0 @@
-Clean up and test
diff --git a/bedtools2/distinfo b/bedtools2/distinfo
index cf1824ff60..17501fd9cb 100644
--- a/bedtools2/distinfo
+++ b/bedtools2/distinfo
@@ -1,7 +1,8 @@
 $NetBSD$
 
-SHA1 (bedtools2-2.27.1.tar.gz) = 0f45ade764913f88b332c3126f152fd55da9a101
-RMD160 (bedtools2-2.27.1.tar.gz) = 957b40f240fd6b22374165f25b96fc4aa3fb8f5a
-SHA512 (bedtools2-2.27.1.tar.gz) = 65d58b5d9e00581ed73f2d5a58be56c888adbc4045396e62fe39abc27a2abcd974721c7fe25533d76613788e43529b5df427ad19acce7ff6e7133018cdd35f40
-Size (bedtools2-2.27.1.tar.gz) = 20003119 bytes
-SHA1 (patch-Makefile) = be89e0e963ca559480fa7f98ec8bd70582b6d7e2
+SHA1 (bedtools-2.29.2.tar.gz) = 51f03e1cac60f99c062d9babb6385800c89c78f6
+RMD160 (bedtools-2.29.2.tar.gz) = 08ea14501ddfc85f2d4a5a756a10512a61ec93f2
+SHA512 (bedtools-2.29.2.tar.gz) = 06b0016674acb08fd85b80fe1a8ff1ebce5c54c0a30ff7f4e52e63fe5b3f3841413f49df3c51088454d79048ca267fde8c23d9ed51f309ee6916d9b49610be41
+Size (bedtools-2.29.2.tar.gz) = 20638840 bytes
+SHA1 (patch-Makefile) = d6a76cb23e623842d6d5c60d67eff928b45b091c
+SHA1 (patch-src_utils_htslib_Makefile) = ba513efa59eed05321c176185fb576f4892ea7a5
diff --git a/bedtools2/patches/patch-Makefile b/bedtools2/patches/patch-Makefile
index a80527d735..8c8c19dd3e 100644
--- a/bedtools2/patches/patch-Makefile
+++ b/bedtools2/patches/patch-Makefile
@@ -1,7 +1,8 @@
 $NetBSD$
 
-# Use portable shell path, respect env
---- Makefile.orig	2017-12-14 17:15:02.000000000 +0000
+# Respect pkgsrc env, drop bash dep
+
+--- Makefile.orig	2019-12-17 20:12:15.000000000 +0000
 +++ Makefile
 @@ -4,7 +4,7 @@
  # (c) 2009 Aaron Quinlan
@@ -12,47 +13,25 @@ $NetBSD$
  
  VERSION_FILE=./src/utils/version/version_git.h
  RELEASED_VERSION_FILE=./src/utils/version/version_release.txt
-@@ -16,11 +16,11 @@ export OBJ_DIR	= obj
- export BIN_DIR	= bin
- export SRC_DIR	= src
- export UTIL_DIR	= src/utils
--export CXX		= g++
-+export CXX		?= g++
- ifeq ($(DEBUG),1)
--export CXXFLAGS = -Wall -Wextra -DDEBUG -D_DEBUG -g -O0 -D_FILE_OFFSET_BITS=64 -fPIC $(INCLUDES)
-+export CXXFLAGS += -Wall -Wextra -DDEBUG -D_DEBUG -g -O0 -D_FILE_OFFSET_BITS=64 -fPIC $(INCLUDES)
- else
--export CXXFLAGS = -Wall -O2 -D_FILE_OFFSET_BITS=64 -fPIC $(INCLUDES)
-+export CXXFLAGS += -D_FILE_OFFSET_BITS=64 -fPIC $(INCLUDES)
- endif
+@@ -21,7 +21,7 @@ OBJ_DIR	= obj
+ BIN_DIR	= bin
+ SRC_DIR	= src
  
- # If the user has specified to do so, tell the compile to use rand() (instead of mt19937).
-@@ -33,7 +33,7 @@ endif
- export LIBS		= -lz
- export BT_ROOT  = src/utils/BamTools/
+-CXX     = g++
++CXX     ?= g++
+ 
+ ifeq ($(DEBUG),1)
+ BT_CPPFLAGS = -DDEBUG -D_DEBUG -D_FILE_OFFSET_BITS=64 -DWITH_HTS_CB_API $(INCLUDES)
+@@ -41,7 +41,7 @@ endif
+ BT_LDFLAGS =
+ BT_LIBS    = -lz -lm -lbz2 -llzma -lpthread
  
 -prefix ?= /usr/local
 +PREFIX ?= /usr/local
  
  SUBDIRS = $(SRC_DIR)/annotateBed \
  		  $(SRC_DIR)/bamToBed \
-@@ -143,12 +143,12 @@ INCLUDES =	-I$(SRC_DIR)/utils/bedFile \
- 
- all: print_banner $(OBJ_DIR) $(BIN_DIR) autoversion $(UTIL_SUBDIRS) $(SUBDIRS)
- 	@echo "- Building main bedtools binary."
--	@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c src/bedtools.cpp -o obj/bedtools.o $(INCLUDES)
--	@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $(BIN_DIR)/bedtools $(BUILT_OBJECTS) -L$(UTIL_DIR)/BamTools/lib/ -lbamtools $(LIBS) $(LDFLAGS) $(INCLUDES)
-+	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c src/bedtools.cpp -o obj/bedtools.o $(INCLUDES)
-+	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $(BIN_DIR)/bedtools $(BUILT_OBJECTS) -L$(UTIL_DIR)/BamTools/lib/ -lbamtools $(LIBS) $(LDFLAGS) $(INCLUDES)
- 	@echo "done."
- 
- 	@echo "- Creating executables for old CLI."
--	@python scripts/makeBashScripts.py
-+	scripts/makeBashScripts.py
- 	@chmod +x bin/*
- 	@echo "done."
- 
-@@ -156,9 +156,9 @@ all: print_banner $(OBJ_DIR) $(BIN_DIR)
+@@ -191,9 +191,9 @@ $(BIN_DIR)/intersectBed: | $(BIN_DIR)
  .PHONY: all
  
  install: all
@@ -64,12 +43,3 @@ $NetBSD$
  	done
  
  print_banner:
-@@ -193,7 +193,7 @@ clean:
- .PHONY: clean
- 
- test: all
--	@cd test; bash test.sh
-+	@cd test; $(SHELL) test.sh
- 
- .PHONY: test
- 
diff --git a/bedtools2/patches/patch-src_utils_htslib_Makefile b/bedtools2/patches/patch-src_utils_htslib_Makefile
new file mode 100644
index 0000000000..3de50d71c5
--- /dev/null
+++ b/bedtools2/patches/patch-src_utils_htslib_Makefile
@@ -0,0 +1,24 @@
+$NetBSD$
+
+# Respect pkgsrc env
+
+--- src/utils/htslib/Makefile.orig	2021-01-21 22:49:18.823750624 +0000
++++ src/utils/htslib/Makefile
+@@ -22,7 +22,7 @@
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ # DEALINGS IN THE SOFTWARE.
+ 
+-CC     = gcc
++CC     ?= gcc
+ AR     = ar
+ RANLIB = ranlib
+ 
+@@ -33,7 +33,7 @@ CPPFLAGS =
+ # TODO: probably update cram code to make it compile cleanly with -Wc++-compat
+ # For testing strict C99 support add -std=c99 -D_XOPEN_SOURCE=600
+ #CFLAGS   = -g -Wall -O2 -pedantic -std=c99 -D_XOPEN_SOURCE=600 -D__FUNCTION__=__func__
+-CFLAGS   = -g -Wall -O2
++CFLAGS   ?= -g -Wall -O2
+ EXTRA_CFLAGS_PIC = -fpic
+ LDFLAGS  =
+ LIBS     = $(htslib_default_libs)


Home | Main Index | Thread Index | Old Index