pkgsrc-WIP-changes archive

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

xmatchview: install fonts and improve handling of tests



Module Name:	pkgsrc-wip
Committed By:	Brook Milligan <brook%nmsu.edu@localhost>
Pushed By:	brook
Date:		Sun Jun 20 11:38:45 2021 -0600
Changeset:	64033b4569678bfe6a209fd03f8bd971a46cc1bd

Modified Files:
	xmatchview/Makefile
	xmatchview/PLIST
Added Files:
	xmatchview/files/Makefile.xmatchview
	xmatchview/files/Makefile.xmatchview-hive

Log Message:
xmatchview: install fonts and improve handling of tests

xmatchview creates much better graphics if the fonts are installed.

Install the test cases so that they also serve as examples.  Give
them each a Makefile so that they can be run more simply with
'make test' and as standalone examples.

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

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

diffstat:
 xmatchview/Makefile                       | 29 ++++++++++++++++++++-----
 xmatchview/PLIST                          | 36 +++++++++++++++++++++++++++++++
 xmatchview/files/Makefile.xmatchview      | 23 ++++++++++++++++++++
 xmatchview/files/Makefile.xmatchview-hive | 21 ++++++++++++++++++
 4 files changed, 104 insertions(+), 5 deletions(-)

diffs:
diff --git a/xmatchview/Makefile b/xmatchview/Makefile
index 85fb98550c..e95b7a4944 100644
--- a/xmatchview/Makefile
+++ b/xmatchview/Makefile
@@ -15,6 +15,7 @@ LICENSE=	gnu-gpl-v3
 
 WRKSRC=		${WRKDIR}/xmatchview-1.2.5
 USE_LANGUAGES=	# none
+USE_TOOLS+=	pax
 NO_BUILD=	yes
 
 DEPENDS+=	${PYPKGPREFIX}-Pillow>=8.2.0:../../graphics/py-pillow
@@ -23,7 +24,24 @@ REPLACE_PYTHON+=	xmatchview-conifer.py
 REPLACE_PYTHON+=	xmatchview-hive.py
 REPLACE_PYTHON+=	xmatchview.py
 
-INSTALLATION_DIRS+=	bin share/doc/xmatchview
+SUBST_CLASSES+=		prefix
+SUBST_STAGE.prefix=	pre-configure
+SUBST_FILES.prefix=	test/Makefile
+SUBST_VARS.prefix=	PREFIX
+
+TEST_TARGET=	all
+TEST_DIRS=	test test-hive
+TEST_ENV+=	XMATCHVIEW=../xmatchview.py
+TEST_ENV+=	XMATCHVIEW_HIVE=../xmatchview-hive.py
+TEST_ENV+=	FONT_DIR=../tarballs/fonts
+
+post-extract:
+	${CP} ${FILESDIR}/Makefile.xmatchview ${WRKSRC}/test/Makefile
+	${CP} ${FILESDIR}/Makefile.xmatchview-hive ${WRKSRC}/test-hive/Makefile
+
+INSTALLATION_DIRS+=	bin share/doc/xmatchview share/fonts/xmatchview
+INSTALLATION_DIRS+=	share/examples/xmatchview/xmatchview
+INSTALLATION_DIRS+=	share/examples/xmatchview/xmatchview-hive
 
 do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/xmatchview-conifer.py ${DESTDIR}${PREFIX}/bin
@@ -32,12 +50,13 @@ do-install:
 	${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/share/doc/xmatchview
 	${INSTALL_DATA} ${WRKSRC}/paper/paper.md ${DESTDIR}${PREFIX}/share/doc/xmatchview
 	${INSTALL_DATA} ${WRKSRC}/paper/paper.pdf ${DESTDIR}${PREFIX}/share/doc/xmatchview
-
-do-test:
+	cd ${WRKSRC}/tarballs/fonts && ${PAX} -rw * ${DESTDIR}${PREFIX}/share/fonts/xmatchview 
 	cd ${WRKSRC}/test \
-	&& ./runXMV.sh FTL1_pa.fa_vs_FTL1_ss.fa.rep FTL1_pa.fa FTL1_ss.fa 200 10 2 FTL1_pa.gff FTL1_ss.gff
+	&& ${RM} -f xmv-FTL1_pa.fa_vs_FTL1_ss.fa.rep_m10_b10_r1_c2.png \
+	&& ${PAX} -rw * ${DESTDIR}${PREFIX}/share/examples/xmatchview/xmatchview
 	cd ${WRKSRC}/test-hive \
-	&& ../xmatchview-hive.py -q 2019-nCoV.txt -r SARS-CoV.txt -s MERS-CoV.txt -x 2019-nCoV.fa_vs_SARS-CoV.fa.rep -y 2019-nCoV.fa_vs_MERS-CoV.fa.rep -z MERS-CoV.fa_vs_SARS-CoV.fa.rep -e SARScds.gff -i 0 -b 1 -c 30 -a 0.75
+	&& ${RM} -f xmv-hive_i0_b1_c30_a0.75.svg \
+	&& ${PAX} -rw * ${DESTDIR}${PREFIX}/share/examples/xmatchview/xmatchview-hive
 
 .include "../../lang/python/application.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/xmatchview/PLIST b/xmatchview/PLIST
index 9fa46bdcbf..80dc22a950 100644
--- a/xmatchview/PLIST
+++ b/xmatchview/PLIST
@@ -5,3 +5,39 @@ bin/xmatchview.py
 share/doc/xmatchview/README.md
 share/doc/xmatchview/paper.md
 share/doc/xmatchview/paper.pdf
+share/examples/xmatchview/xmatchview-hive/2019-nCoV.fa_vs_MERS-CoV.fa.paf
+share/examples/xmatchview/xmatchview-hive/2019-nCoV.fa_vs_MERS-CoV.fa.rep
+share/examples/xmatchview/xmatchview-hive/2019-nCoV.fa_vs_SARS-CoV.fa.paf
+share/examples/xmatchview/xmatchview-hive/2019-nCoV.fa_vs_SARS-CoV.fa.rep
+share/examples/xmatchview/xmatchview-hive/2019-nCoV.txt
+share/examples/xmatchview/xmatchview-hive/MERS-CoV.fa_vs_SARS-CoV.fa.paf
+share/examples/xmatchview/xmatchview-hive/MERS-CoV.fa_vs_SARS-CoV.fa.rep
+share/examples/xmatchview/xmatchview-hive/MERS-CoV.txt
+share/examples/xmatchview/xmatchview-hive/Makefile
+share/examples/xmatchview/xmatchview-hive/SARS-CoV.txt
+share/examples/xmatchview/xmatchview-hive/SARScds.gff
+share/examples/xmatchview/xmatchview-hive/all.paf.success.svg
+share/examples/xmatchview/xmatchview-hive/all.rep.success.svg
+share/examples/xmatchview/xmatchview-hive/config.txt
+share/examples/xmatchview/xmatchview-hive/readme
+share/examples/xmatchview/xmatchview/FTL1_pa.fa
+share/examples/xmatchview/xmatchview/FTL1_pa.fa_vs_FTL1_ss.fa.rep
+share/examples/xmatchview/xmatchview/FTL1_pa.gff
+share/examples/xmatchview/xmatchview/FTL1_paMF.fa
+share/examples/xmatchview/xmatchview/FTL1_paMF.fa_vs_FTL1_ssMF.fa.paf
+share/examples/xmatchview/xmatchview/FTL1_paMF.fa_vs_FTL1_ssMF.fa.rep
+share/examples/xmatchview/xmatchview/FTL1_ss.fa
+share/examples/xmatchview/xmatchview/FTL1_ss.gff
+share/examples/xmatchview/xmatchview/FTL1_ssMF.fa
+share/examples/xmatchview/xmatchview/Makefile
+share/examples/xmatchview/xmatchview/runXMV-conifer.sh
+share/examples/xmatchview/xmatchview/runXMV.sh
+share/examples/xmatchview/xmatchview/runXMV.sh.orig
+share/examples/xmatchview/xmatchview/xmv-FTL1_pa.fa_vs_FTL1_ss.fa.rep_m10_b10_r1_c2_success.png
+share/examples/xmatchview/xmatchview/xmv-FTL1_paMF.fa_vs_FTL1_ssMF.fa.rep_m10_b10_r1_c2_success.png
+share/examples/xmatchview/xmatchview/xmvconifer-FTL1_pa.fa_vs_FTL1_ss.fa.rep_m10_b10_c2_success.png
+share/examples/xmatchview/xmatchview/xmvconifer-FTL1_paMF.fa_vs_FTL1_ssMF.fa.paf_m99_b10_c2_success.png
+share/fonts/xmatchview/arial.ttf
+share/fonts/xmatchview/arialbd.ttf
+share/fonts/xmatchview/arialbi.ttf
+share/fonts/xmatchview/ariali.ttf
diff --git a/xmatchview/files/Makefile.xmatchview b/xmatchview/files/Makefile.xmatchview
new file mode 100644
index 0000000000..9dffecc619
--- /dev/null
+++ b/xmatchview/files/Makefile.xmatchview
@@ -0,0 +1,23 @@
+# $NetBSD$
+
+XMATCHVIEW?=	xmatchview.py
+FONT_DIR?=	@PREFIX@/share/fonts/xmatchview
+
+XMATCHVIEW_ARGS+=	-x FTL1_pa.fa_vs_FTL1_ss.fa.rep
+XMATCHVIEW_ARGS+=	-s FTL1_ss.fa
+XMATCHVIEW_ARGS+=	-q FTL1_pa.fa
+XMATCHVIEW_ARGS+=	-a 200
+XMATCHVIEW_ARGS+=	-m 10
+XMATCHVIEW_ARGS+=	-b 10
+XMATCHVIEW_ARGS+=	-r 1
+XMATCHVIEW_ARGS+=	-c 2
+XMATCHVIEW_ARGS+=	-f png
+XMATCHVIEW_ARGS+=	-y FTL1_pa.gff
+XMATCHVIEW_ARGS+=	-e FTL1_ss.gff
+XMATCHVIEW_ARGS+=	-p ${FONT_DIR}
+
+all:
+	${XMATCHVIEW} ${XMATCHVIEW_ARGS}
+
+clean:
+	rm -f xmv-FTL1_pa.fa_vs_FTL1_ss.fa.rep_m10_b10_r1_c2.png
diff --git a/xmatchview/files/Makefile.xmatchview-hive b/xmatchview/files/Makefile.xmatchview-hive
new file mode 100644
index 0000000000..dae7bcce89
--- /dev/null
+++ b/xmatchview/files/Makefile.xmatchview-hive
@@ -0,0 +1,21 @@
+# $NetBSD$
+
+XMATCHVIEW_HIVE?=	xmatchview-hive.py
+
+XMATCHVIEW_HIVE_ARGS+=	-q 2019-nCoV.txt
+XMATCHVIEW_HIVE_ARGS+=	-r SARS-CoV.txt
+XMATCHVIEW_HIVE_ARGS+=	-s MERS-CoV.txt
+XMATCHVIEW_HIVE_ARGS+=	-x 2019-nCoV.fa_vs_SARS-CoV.fa.rep
+XMATCHVIEW_HIVE_ARGS+=	-y 2019-nCoV.fa_vs_MERS-CoV.fa.rep
+XMATCHVIEW_HIVE_ARGS+=	-z MERS-CoV.fa_vs_SARS-CoV.fa.rep
+XMATCHVIEW_HIVE_ARGS+=	-e SARScds.gff
+XMATCHVIEW_HIVE_ARGS+=	-i 0
+XMATCHVIEW_HIVE_ARGS+=	-b 1
+XMATCHVIEW_HIVE_ARGS+=	-c 30
+XMATCHVIEW_HIVE_ARGS+=	-a 0.75
+
+all:
+	${XMATCHVIEW_HIVE} ${XMATCHVIEW_HIVE_ARGS}
+
+clean:
+	rm -f xmv-hive_i0_b1_c30_a0.75.svg
\ No newline at end of file


Home | Main Index | Thread Index | Old Index