pkgsrc-WIP-changes archive

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

smithwaterman: use github for upstream, many fixes



Module Name:	pkgsrc-wip
Committed By:	Winston Weinert <winston%ml1.net@localhost>
Pushed By:	winston
Date:		Mon Mar 26 23:08:20 2018 -0500
Changeset:	297651a70156e3e1898f44be8e2470fd9c6ac0cd

Modified Files:
	smithwaterman/Makefile
	smithwaterman/PLIST
	smithwaterman/distinfo
Added Files:
	smithwaterman/files/Makefile

Log Message:
smithwaterman: use github for upstream, many fixes

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

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

diffstat:
 smithwaterman/Makefile       |  22 ++++------
 smithwaterman/PLIST          |   1 +
 smithwaterman/distinfo       |   8 ++--
 smithwaterman/files/Makefile | 101 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 115 insertions(+), 17 deletions(-)

diffs:
diff --git a/smithwaterman/Makefile b/smithwaterman/Makefile
index 44a31781a9..f34d912865 100644
--- a/smithwaterman/Makefile
+++ b/smithwaterman/Makefile
@@ -1,27 +1,23 @@
 # $NetBSD$
-#
-###########################################################
-#               Generated by fbsd2pkg                     #
-###########################################################
 
-DISTNAME=	smithwaterman-${PORTVERSION}
+DISTNAME=	smithwaterman-0.0.0p20160702
 CATEGORIES=	biology
-MASTER_SITES=	${MASTER_SITE_GITHUB:=outpaddling/}
+MASTER_SITES=	${MASTER_SITE_GITHUB:=ekg/}
 
 MAINTAINER=	bacon%NetBSD.org@localhost
 HOMEPAGE=	https://github.com/ekg/smithwaterman
 COMMENT=	Smith-waterman-gotoh alignment algorithm
 LICENSE=	gnu-gpl-v2
 
-# Pessimistic assumption.  Test and change if possible.
-# MAKE_JOBS_SAFE=	no
-
-# Just assuming C and C++: Adjust this!
-USE_LANGUAGES=	c c++
+USE_LANGUAGES=	c++
 USE_TOOLS+=	gmake
 INSTALL_TARGET=	install-strip
-GITHUB_TAG=	${PORTVERSION}
+GITHUB_TAG=	2610e259611ae4cde8f03c72499d28f03f6d38a7
+
+pre-configure:
+	${CP} ${FILESDIR}/Makefile ${WRKSRC}
 
-PORTVERSION=	8e667291798b785d698f0875e58da2710d740567
+post-install:
+	cd ${DESTDIR}${PREFIX}/lib && ${LN} -s libsw.so.1 libsw.so
 
 .include "../../mk/bsd.pkg.mk"
diff --git a/smithwaterman/PLIST b/smithwaterman/PLIST
index 5c2c743171..7068d08121 100644
--- a/smithwaterman/PLIST
+++ b/smithwaterman/PLIST
@@ -9,4 +9,5 @@ include/smithwaterman/SmithWatermanGotoh.h
 include/smithwaterman/convert.h
 include/smithwaterman/disorder.h
 lib/libsw.a
+lib/libsw.so
 lib/libsw.so.1
diff --git a/smithwaterman/distinfo b/smithwaterman/distinfo
index 82b08fd35b..189ef7a7f6 100644
--- a/smithwaterman/distinfo
+++ b/smithwaterman/distinfo
@@ -1,6 +1,6 @@
 $NetBSD$
 
-SHA1 (smithwaterman-8e667291798b785d698f0875e58da2710d740567-8e667291798b785d698f0875e58da2710d740567.tar.gz) = 0057f7535fb87c6dc0b7c8ba5870bff6a43d520f
-RMD160 (smithwaterman-8e667291798b785d698f0875e58da2710d740567-8e667291798b785d698f0875e58da2710d740567.tar.gz) = 07bcff1ed35aba893b94cfa22f7e4594d0b2d167
-SHA512 (smithwaterman-8e667291798b785d698f0875e58da2710d740567-8e667291798b785d698f0875e58da2710d740567.tar.gz) = 3777fb7cfa107072ea2831344449e9bdb897d5006121063d5104863c4655f4b6c525ed135d5ccdc48d1f04e9281c3907c4344b52b9e1349e43f4b508a97a3e6c
-Size (smithwaterman-8e667291798b785d698f0875e58da2710d740567-8e667291798b785d698f0875e58da2710d740567.tar.gz) = 38774 bytes
+SHA1 (smithwaterman-0.0.0p20160702-2610e259611ae4cde8f03c72499d28f03f6d38a7.tar.gz) = f91c95f1d3b27df53935b5493b16d9cc46cad4b9
+RMD160 (smithwaterman-0.0.0p20160702-2610e259611ae4cde8f03c72499d28f03f6d38a7.tar.gz) = d4713ab1e185da6c1813f79535acba4eb5efecbf
+SHA512 (smithwaterman-0.0.0p20160702-2610e259611ae4cde8f03c72499d28f03f6d38a7.tar.gz) = 0539b576a27b1ecc7ae8fa9acfe9cbf2c627a374c82e47ee98f0a32b0c6bca86f94a57ad47efdfd54fc14702027e40d2cf48d4dae457e180edb738ed4338cac6
+Size (smithwaterman-0.0.0p20160702-2610e259611ae4cde8f03c72499d28f03f6d38a7.tar.gz) = 39190 bytes
diff --git a/smithwaterman/files/Makefile b/smithwaterman/files/Makefile
new file mode 100644
index 0000000000..47c2f1978b
--- /dev/null
+++ b/smithwaterman/files/Makefile
@@ -0,0 +1,101 @@
+# =========================================
+# MOSAIK Banded Smith-Waterman Makefile
+# (c) 2009 Michael Stromberg & Wan-Ping Lee
+# =========================================
+
+# ----------------------------------
+# define our source and object files
+# ----------------------------------
+
+SOURCES= smithwaterman.cpp BandedSmithWaterman.cpp SmithWatermanGotoh.cpp Repeats.cpp LeftAlign.cpp IndelAllele.cpp
+OBJECTS= $(SOURCES:.cpp=.o) disorder.o
+OBJECTS_NO_MAIN= disorder.o BandedSmithWaterman.o SmithWatermanGotoh.o Repeats.o LeftAlign.o IndelAllele.o
+
+# ----------------
+# compiler options
+# ----------------
+
+# Use ?= to allow overriding from the env or command-line, e.g.
+#
+#       make CXXFLAGS="-O3 -fPIC" install
+#
+# Package managers will override many of these variables automatically, so
+# this is aimed at making it easy to create packages (Debian packages,
+# FreeBSD ports, MacPorts, pkgsrc, etc.)
+
+CXX ?=		c++
+CXXFLAGS ?=	-O3
+CXXFLAGS +=	-fPIC
+DESTDIR ?=	stage
+PREFIX ?=	/usr/local
+STRIP ?=	strip
+INSTALL ?=	install -c
+MKDIR ?=	mkdir -p
+AR ?=		ar
+LN ?=		ln
+
+LDFLAGS:=	-Wl,-s
+BIN =		smithwaterman
+LIB =		libsw.a
+SOVERSION =	1
+SLIB =		libsw.so.$(SOVERSION)
+
+all: $(BIN) $(LIB) $(SLIB) sw.o
+
+.PHONY: all
+
+$(LIB): $(OBJECTS_NO_MAIN)
+	$(AR) rs $@ $(OBJECTS_NO_MAIN)
+
+$(SLIB): $(OBJECTS_NO_MAIN)
+	$(CXX) -shared -Wl,-soname,$(SLIB) -o $(SLIB) $(OBJECTS_NO_MAIN)
+
+sw.o:  $(OBJECTS_NO_MAIN)
+	ld -r $^ -o sw.o -L.
+	@#$(CXX) $(CFLAGS) -c -o smithwaterman.cpp $(OBJECTS_NO_MAIN) -I.
+
+### @$(CXX) $(LDFLAGS) $(CFLAGS) -o $@ $^ -I.
+$(BIN): $(OBJECTS)
+	$(CXX) $(CFLAGS) $^ -I. -o $@
+
+#smithwaterman: $(OBJECTS)
+#	$(CXX) $(CXXFLAGS) -o $@ $< -I.
+
+smithwaterman.o: smithwaterman.cpp disorder.o
+	$(CXX) $(CXXFLAGS) -c -o $@ smithwaterman.cpp -I.
+
+disorder.o: disorder.cpp disorder.h
+	$(CXX) $(CXXFLAGS) -c -o $@ $< -I.
+
+BandedSmithWaterman.o: BandedSmithWaterman.cpp BandedSmithWaterman.h
+	$(CXX) $(CXXFLAGS) -c -o $@ $< -I.
+
+SmithWatermanGotoh.o: SmithWatermanGotoh.cpp SmithWatermanGotoh.h disorder.o
+	$(CXX) $(CXXFLAGS) -c -o $@ $< -I.
+
+Repeats.o: Repeats.cpp
+	$(CXX) $(CXXFLAGS) -c -o $@ $< -I.
+
+LeftAlign.o: LeftAlign.cpp
+	$(CXX) $(CXXFLAGS) -c -o $@ $< -I.
+
+IndelAllele.o: IndelAllele.cpp
+	$(CXX) $(CXXFLAGS) -c -o $@ $< -I.
+
+install: all
+	$(MKDIR) $(DESTDIR)$(PREFIX)/bin
+	$(MKDIR) $(DESTDIR)$(PREFIX)/include/smithwaterman
+	$(MKDIR) $(DESTDIR)$(PREFIX)/lib
+	$(INSTALL) $(BIN) $(DESTDIR)$(PREFIX)/bin
+	$(INSTALL) -m644 *.h $(DESTDIR)$(PREFIX)/include/smithwaterman
+	$(INSTALL) -m644 $(LIB) $(DESTDIR)$(PREFIX)/lib
+	$(INSTALL) $(SLIB) $(DESTDIR)$(PREFIX)/lib
+
+install-strip: install
+	$(STRIP) $(DESTDIR)$(PREFIX)/bin/$(BIN) $(DESTDIR)$(PREFIX)/lib/$(SLIB)
+
+.PHONY: clean
+
+clean:
+	@echo "Cleaning up."
+	@rm -rf $(BIN) $(LIB) $(SLIB) $(OBJECTS) $(DESTDIR)


Home | Main Index | Thread Index | Old Index