diff -ruN --exclude=CVS --exclude=.svn /usr/ports/biology/emboss/Makefile /usr/ports/wip/emboss/Makefile --- /usr/ports/biology/emboss/Makefile 2021-09-06 10:26:04.797733000 -0500 +++ /usr/ports/wip/emboss/Makefile 2021-09-15 08:34:15.675327000 -0500 @@ -2,7 +2,7 @@ PORTNAME= emboss PORTVERSION= 6.6.0 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= biology MASTER_SITES= ftp://emboss.open-bio.org/pub/EMBOSS/ DISTNAME= ${PORTNAME:tu}-${PORTVERSION} @@ -50,6 +50,9 @@ post-patch: @${REINPLACE_CMD} -e 's/-liconv/${ICONV_LIB}/' ${WRKSRC}/configure +post-build: + ${CC} -DEMBOSS_PREFIX="\"${PREFIX}\"" ${FILESDIR}/emboss.c -o ${WRKDIR}/emboss + pre-install: @ ${REINPLACE_CMD} -e 's#%%DATADIR%%#${PREFIX}/share/${PORTNAME:tu}#' ${CONFIG_FILE} @@ -57,5 +60,6 @@ @${MKDIR} ${STAGEDIR}${LOCALBASE}/bin ${INSTALL_SCRIPT} ${WRKDIR}/emboss-shell ${STAGEDIR}${LOCALBASE}/bin ${INSTALL_DATA} ${CONFIG_FILE} ${STAGEDIR}${DATADIR} + ${INSTALL_PROGRAM} ${WRKDIR}/emboss ${STAGEDIR}${LOCALBASE}/bin .include diff -ruN --exclude=CVS --exclude=.svn /usr/ports/biology/emboss/distinfo /usr/ports/wip/emboss/distinfo --- /usr/ports/biology/emboss/distinfo 2021-09-06 10:26:04.797780000 -0500 +++ /usr/ports/wip/emboss/distinfo 2021-06-12 09:21:58.597608000 -0500 @@ -1,3 +1,2 @@ -TIMESTAMP = 1630940920 SHA256 (emboss/EMBOSS-6.6.0.tar.gz) = 7184a763d39ad96bb598bfd531628a34aa53e474db9e7cac4416c2a40ab10c6e SIZE (emboss/EMBOSS-6.6.0.tar.gz) = 117962028 diff -ruN --exclude=CVS --exclude=.svn /usr/ports/biology/emboss/files/emboss.c /usr/ports/wip/emboss/files/emboss.c --- /usr/ports/biology/emboss/files/emboss.c 1969-12-31 18:00:00.000000000 -0600 +++ /usr/ports/wip/emboss/files/emboss.c 2021-09-13 10:12:18.608856000 -0500 @@ -0,0 +1,59 @@ +/*************************************************************************** + * Description: + * Wrapper to turn emboss commands into subcommands. The emboss suite + * contains executables that conflict with multiple other software + * packages and therefore cannot be safely installed directly under a + * standard prefix. This wrapper can be installed under the standard + * PATH and used to to execute emboss commands installed under a + * private prefix, without altering PATH, activating a special + * environment, opening a container, etc. This sub-command paradigm + * is already familiar to bioinformaticians thanks to other suites + * like samtools, bedtools, etc. + * + * Example: + * + * emboss seqret args + * + * instead of one of the following: + * + * prefix/bin/seqret args + * + * env PATH=prefix/bin:$PATH seqret args + * + * conda activate emboss + * seqret args + * + * Arguments: + * The full emboss command you would use if it were in PATH. + * + * Compile with EMBOSS_PREFIX set to the parent of the bin directory + * containing the emboss binaries. + * + * History: + * Date Name Modification + * 2021-09-13 Jason Bacon Begin + ***************************************************************************/ + +#include +#include +#include +#include + +#ifndef EMBOSS_PREFIX +#define EMBOSS_PREFIX "/usr/local/emboss" +#endif + +int main(int argc,char *argv[]) + +{ + char cmd[PATH_MAX + 1]; + + if ( argc < 2 ) + { + fprintf(stderr, "Usage: %s emboss-command [args]\n", argv[0]); + return EX_USAGE; + } + + snprintf(cmd, PATH_MAX, "%s/bin/%s", EMBOSS_PREFIX, argv[1]); + execv(cmd, argv + 1); +} diff -ruN --exclude=CVS --exclude=.svn /usr/ports/biology/emboss/pkg-plist /usr/ports/wip/emboss/pkg-plist --- /usr/ports/biology/emboss/pkg-plist 2021-09-06 10:26:04.798288000 -0500 +++ /usr/ports/wip/emboss/pkg-plist 2021-09-13 09:14:29.686623000 -0500 @@ -77,6 +77,7 @@ bin/edamname bin/edialign bin/einverted +%%LOCALBASE%%/bin/emboss %%LOCALBASE%%/bin/emboss-shell bin/embossdata bin/embossupdate