diff --git a/recipes/pdb2fasta/build.sh b/recipes/pdb2fasta/build.sh new file mode 100644 index 0000000000000..6dfee62b849e2 --- /dev/null +++ b/recipes/pdb2fasta/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash -euo + +mkdir -p ${PREFIX}/bin +${CC} -O2 pdb2fasta.c -o pdb2fasta +mv pdb2fasta ${PREFIX}/bin diff --git a/recipes/pdb2fasta/meta.yaml b/recipes/pdb2fasta/meta.yaml new file mode 100644 index 0000000000000..593a3eadf9376 --- /dev/null +++ b/recipes/pdb2fasta/meta.yaml @@ -0,0 +1,38 @@ +{% set name = "pdb2fasta" %} +{% set version = "1.0" %} + +package: + name: {{ name }} + version: {{ version }} + +source: + url: https://github.com/kad-ecoli/{{ name }}/archive/refs/tags/{{ version }}.tar.gz + sha256: 63c22998df75c0a1ee9c00051d4d401e45b13651a09b98bb2885a86bc342b7bf + patches: + - pdb2fasta.patch + +build: + number: 0 + run_exports: + - {{ pin_subpackage('pdb2fasta', max_pin="x.x") }} + +requirements: + build: + - {{ compiler('c') }} + +test: + commands: + - pdb2fasta --help + +about: + home: "https://github.com/kad-ecoli/pdb2fasta" + license: "GPL-2-only" + license_family: GPL2 + license_file: License.txt + summary: "Convert PDB structures to FASTA sequences." + dev_url: "https://github.com/kad-ecoli/pdb2fasta" + +extra: + additional-platforms: + - linux-aarch64 + - osx-arm64 diff --git a/recipes/pdb2fasta/pdb2fasta.patch b/recipes/pdb2fasta/pdb2fasta.patch new file mode 100644 index 0000000000000..b9182ba172719 --- /dev/null +++ b/recipes/pdb2fasta/pdb2fasta.patch @@ -0,0 +1,40 @@ +diff --git a/pdb2fasta.c b/pdb2fasta.c +index 9642d03..9e8eef1 100644 +--- a/pdb2fasta.c ++++ b/pdb2fasta.c +@@ -1,3 +1,4 @@ ++#include + #include + #include + +@@ -99,14 +100,24 @@ char *pdb2fasta(char *pdb_file){ + } + + int main(int argc, char** argv){ +- if (argc<2){ +- printf("pdb2fasta pdb.pdb > seq.fasta\n"); +- printf(" convert PDB file pdb.pdb to FASTA sequence file seq.fasta\n"); ++ if (argc < 2){ ++ printf("Usage: pdb2fasta pdb.pdb > seq.fasta\n"); ++ printf(" Convert PDB file pdb.pdb to FASTA sequence file seq.fasta\n"); + return argc; + } +- +- int i; +- for (i=1;i seq.fasta\n"); ++ return 0; ++ } ++ ++ for (int i=1; i