debian/0000755000000000000000000000000011775567246007212 5ustar debian/README.Debian0000644000000000000000000000051611634641541011236 0ustar libzerg for Debian ------------------ Reference ========= * Paquola, Apuã C M, Machado, Abimael A, Reis, Eduardo M, Da Silva, Aline M, and Verjovski-Almeida, Sergio: Zerg: a very fast BLAST parser library., Bioinformatics 19(8), volume 19, 1035–6, May 2003 -- Laszlo Kajan Wed, 14 Sep 2011 15:29:37 +0200 debian/watch0000644000000000000000000000024711734561464010235 0ustar # Compulsory line, this is a version 3 file version=3 # Uncomment to find new files on sourceforge, for devscripts >= 2.9 http://sf.net/libzerg/libzerg_(.*)\.tar\.gz debian/libzerg0.install0000644000000000000000000000002511634202537012274 0ustar usr/lib/libzerg.so.* debian/libzerg0-dev.install0000644000000000000000000000010611705524732013053 0ustar usr/include/* usr/lib/libzerg.a usr/lib/libzerg.la usr/lib/libzerg.so debian/rules0000755000000000000000000000100311775567117010261 0ustar #!/usr/bin/make -f export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh --with autoreconf $@ override_dh_clean: dh_clean rm -rf *.lo *.la *.o .libs rm -rf *.c libtool stamp-h1 Makefile .PHONY: override_dh_strip override_dh_strip: dh_strip --dbg-package=libzerg0-dbg debian/changelog0000644000000000000000000000315011775567117011060 0ustar libzerg (1.0.7-5) unstable; urgency=low * [Andreas Tille] debian/upstream: - Added URL + eprint - Moved DOI to references - Make author field BibTeX compliant [Laszlo Kajan] * Removing non-policy-compliant get-orig-source target from debian/rules. -- Laszlo Kajan Fri, 06 Jul 2012 15:35:05 +0200 libzerg (1.0.7-4) unstable; urgency=low * Fixed svn-buildpackage issue on unstable by saving original make file in Makefile.libzerg-orig * Revised description. * Mention librostlab-blast as a parser option. -- Laszlo Kajan Fri, 20 Jan 2012 14:26:44 +0100 libzerg (1.0.7-3) unstable; urgency=low [ Laszlo Kajan ] * Tille: debian/upstream-metadata.yaml: Added some missing fields Tue, 10 Jan 2012 08:30:18 +0100 * Kajan: Renamed libzerg-dev to libzerg0-dev, Provides: libzerg-dev * Renamed libzerg-dbg to libzerg0-dbg. * dh build now, no more CDBS, with dh-autoreconf. * No more debian-changes patches. [ Andreas Tille ] * debian/patches/save_makefile.patch - Make sure original Makefile can be restored * debian/rules: Fixed clean target -- Andreas Tille Wed, 18 Jan 2012 13:35:10 +0100 libzerg (1.0.7-2) unstable; urgency=low * Patched lexer to handle blastpgp [2.2.18] output. -- Laszlo Kajan Tue, 20 Sep 2011 10:51:18 +0200 libzerg (1.0.7-1) unstable; urgency=low * Initial release (Closes: #641581) * Pached to build with autotools and libtools allowing for a shared library as well as the static -- Laszlo Kajan Wed, 14 Sep 2011 15:29:37 +0200 debian/upstream0000644000000000000000000000106611775567223010773 0ustar Contact: Apuã Paquola Homepage: http://code.google.com/p/libzerg/ Reference: author: Paquola, Apuã C M and Machado, Abimael A and Reis, Eduardo M and Da Silva, Aline M and Verjovski-Almeida, Sergio title: "Zerg: a very fast BLAST parser library" journal: Bioinformatics volume: 19 number: 8 pages: 1035-6 year: 2003 URL: http://bioinformatics.oxfordjournals.org/content/19/8/1035.short eprint: http://bioinformatics.oxfordjournals.org/content/19/8/1035.full.pdf+html DOI: 10.1093/bioinformatics/btg122 PMID: 12761068 debian/control0000644000000000000000000000422411775567117010614 0ustar Source: libzerg Section: science Priority: extra Maintainer: Debian Med Packaging Team Uploaders: Laszlo Kajan , Andreas Tille Build-Depends: debhelper (>= 7.0.50~), dh-autoreconf, flex, perl Standards-Version: 3.9.3 Vcs-Svn: svn://svn.debian.org/debian-med/trunk/packages/rostlab/libzerg/trunk/ Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/rostlab/libzerg/trunk/ DM-Upload-Allowed: yes Homepage: http://code.google.com/p/libzerg/ Package: libzerg0 Architecture: any Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Description: C library for lexically scanning the output of NCBI BLAST programs Zerg is a C library for lexing - lexically scanning - the output of NCBI BLAST programs. . Based on a GNU Flex-generated lexical scanner, it runs extremely fast, being especially useful for processing large volumes of data. Benchmark tests show that Zerg is over two orders of magnitude faster than some widely used BLAST parsers. . If you need a parser and not only a lexer, check out librostlab-blast. . This package contains the shared library. Package: libzerg0-dev Architecture: any Section: libdevel Depends: libzerg0 (= ${binary:Version}), ${misc:Depends} Provides: libzerg-dev Description: development libraries and header files for libzerg Zerg is a C library for lexing - lexically scanning - the output of NCBI BLAST programs. . Based on a GNU Flex-generated lexical scanner, it runs extremely fast, being especially useful for processing large volumes of data. Benchmark tests show that Zerg is over two orders of magnitude faster than some widely used BLAST parsers. . If you need a parser and not only a lexer, check out librostlab-blast. . This package contains the header files and documentation needed to develop applications with libzerg. Package: libzerg0-dbg Architecture: any Section: debug Depends: libzerg0 (= ${binary:Version}), ${misc:Depends} Description: debugging symbols for libzerg Zerg is a C library for lexing - lexically scanning - the output of NCBI BLAST programs. . This package provides the detached debug symbols. debian/compat0000644000000000000000000000000211634164241010366 0ustar 7 debian/README.source0000644000000000000000000000067311706266015011357 0ustar libzerg for Debian ------------------ patches: blastpgp: * fix for lexer to parse blastpgp [2.2.18] -m 0 format results * alignments of HSPs are now reported as tags * many new tags for blastpgp result file elements autotools: * adds AUTHORS file * adds Makefile.am and configure.ac, creates m4 directory for build with autotools save_makefile.patch: * save original Makefile in Makefile.libzerg-orig # vim:et:ts=2: debian/docs0000644000000000000000000000000711634164241010040 0ustar README debian/copyright0000644000000000000000000000244311634164241011126 0ustar This work was packaged for Debian by: Laszlo Kajan on Wed, 14 Sep 2011 15:29:37 +0200 It was downloaded from: http://code.google.com/p/libzerg/ Upstream Author: Apuã Paquola Copyright: Copyright (C) 2002 Apuã Paquola - Instituto de Química - Universidade de São Paulo - Brasil License: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is: Copyright (C) 2011 Laszlo Kajan and is licensed under the GPL version 3, see "/usr/share/common-licenses/GPL-3". debian/patches/0000755000000000000000000000000011775567243010636 5ustar debian/patches/series0000644000000000000000000000004711706266015012037 0ustar save_makefile.patch autotools blastpgp debian/patches/blastpgp0000644000000000000000000003512711775567117012405 0ustar Author: Laszlo Kajan Description: patch to handle iterated blast Forwarded: no --- libzerg.orig/zerglexer.lex +++ libzerg/zerglexer.lex @@ -35,10 +35,11 @@ static char _zerg_internal_buffer[INTERNAL_BUFFER_LENGTH]; static char* _zerg_description_score; static char* _zerg_description_evalue; +static int _zerg_tail_of_rep_len=0; -static int _zerg_ignore[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; +// 0 10 20 30 40 50 60 +static int _zerg_ignore[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; static char* _zerg_value; -static int _zerg_have_hsp=0; /* _zerg_blast_type 0:blastn 1:blastp 2:blastx 3:tblastn 4:tblastx */ static int _zerg_blast_type=0; @@ -48,6 +49,15 @@ #define RET(SC,VALUE,CODE) BEGIN(SC);\ if(!_zerg_ignore[CODE]) {_zerg_value=VALUE; return CODE;} + +static void begin_tail_of_report( size_t __sc ) // the argument is here to make it clearer what start condition we switch to, and to make it show up better in searches +{ + _zerg_tail_of_rep_len = 0; _zerg_internal_buffer[0] = 0; + // + BEGIN(__sc); +} + + static void _zerg_strip_double_spaces() { char *p1, *p2; @@ -117,6 +127,7 @@ %x s_descriptions %x s_evalue %x s_evalue_2 +%x s_hsp_method %x s_gaps %x s_gaps_2 %x s_hsp @@ -126,6 +137,9 @@ %x s_percent_identities_2 %x s_pre_end %x s_pre_hits +%x s_pre_hits_2 +%x s_round +%x s_round_seq_new %x s_query_1 %x s_query_2 %x s_query_3 @@ -138,6 +152,10 @@ %x s_query_orientation_2 %x s_query_start %x s_query_start_2 +%x s_query_ali +%x s_query_ali_2 +%x s_subject_ali +%x s_subject_ali_2 %x s_reference %x s_score %x s_score_2 @@ -155,7 +173,7 @@ %x s_subject_orientation_2 %x s_subject_start %x s_subject_start_2 -%x s_end_of_report +%x s_tail_of_report %x s_positives %x s_positives_2 %x s_positives_3 @@ -166,14 +184,10 @@ %x s_frame_5 %x s_gaps_3 %x s_pre_subject_name -%x s_pre_score -%x s_pre_end_of_report_1 -%x s_pre_end_of_report_2 -%x s_pre_end_of_report_3 %% -T?BLAST.+ { +T?BLAST.+ { if(!strncmp(yytext,"BLASTN",6)) _zerg_blast_type=0; else if(!strncmp(yytext,"BLASTP",6)) _zerg_blast_type=1; @@ -185,8 +199,8 @@ } -\n+ BEGIN(s_reference); -"Reference:"(.+\n)+\n BEGIN(s_query_1); +\n+ BEGIN(s_reference); +Reference(.+\n)+\n+ RET(s_query_1,yytext,REFERENCE); "Query= " BEGIN(s_query_2); [^ \t\n]+ RET(s_query_3,yytext,QUERY_NAME); @@ -209,12 +223,14 @@ } .+\n\n BEGIN(s_database); -Database:(.+\n)+\n BEGIN(s_searching); -Searching"."*done\n+ BEGIN(s_pre_hits); -.+"No hits found".+\n\n RET(s_pre_end,yytext,NOHITS); -[ \t]+Score.+\n.+\n\n BEGIN(s_descriptions); - -[^ \t\n]+ RET(s_description_annotation,yytext,DESCRIPTION_HITNAME); +Database:(.+\n)+\n RET(s_searching,yytext,DATABASE); +Searching"."*done\n+ RET(s_pre_hits,yytext,SEARCHING); +.+"No hits found".+\n\n RET(s_hsp,yytext,NOHITS); +^"Results from round"" "* BEGIN(s_round); +[[:digit:]]+ RET(s_pre_hits,yytext,ROUND_NUMBER); +[ \t]+Score[[:space:]]+E.*\n.+\n BEGIN(s_pre_hits_2); +^\n BEGIN(s_descriptions); +^"Sequences used in model and found again:"\n RET(s_pre_hits_2,yytext,ROUND_SEQ_FOUND) .+\n { @@ -258,8 +274,9 @@ if(annotation_length+score_length+evalue_length+4 > INTERNAL_BUFFER_LENGTH) { - fprintf(stderr, "buffer overflow\n"); - exit(1); + _zerg_internal_buffer[INTERNAL_BUFFER_LENGTH-1] = 0; + fprintf(stderr, "zerg buffer overflow: '%s'\n", _zerg_internal_buffer); + return BUFFER_OVERFLOW; } pp=_zerg_internal_buffer; @@ -288,21 +305,14 @@ "~" RET(s_description_evalue,_zerg_description_score,DESCRIPTION_SCORE); "~" RET(s_descriptions,_zerg_description_evalue,DESCRIPTION_EVALUE); +\n"Sequences not found previously or not previously below threshold:"\n\n RET(s_descriptions,yytext,ROUND_SEQ_NEW); +[^ \t\n>]+ RET(s_description_annotation,yytext,DESCRIPTION_HITNAME); \n BEGIN(s_pre_hits); -> BEGIN(s_subject_name); -> { - if(_zerg_have_hsp) - { - _zerg_have_hsp=0; - unput('~'); - RET(s_pre_subject_name,_zerg_internal_buffer,QUERY_END); - } - else - { - BEGIN(s_subject_name); - } - } +\n"CONVERGED!"\n RET(s_pre_hits,yytext,CONVERGED); +> BEGIN(s_subject_name); + +> BEGIN(s_subject_name); "~" RET(s_subject_name,_zerg_internal_buffer+32,SUBJECT_END); @@ -325,32 +335,20 @@ \n+ BEGIN(s_hsp); -" Score ="" "+ { - if(_zerg_have_hsp) - { - _zerg_have_hsp=0; - unput('~'); - RET(s_pre_score,_zerg_internal_buffer,QUERY_END); - } - else - { - BEGIN(s_score); - } - } - -"~" RET(s_score,_zerg_internal_buffer+32,SUBJECT_END); - +" Score ="" "+ BEGIN(s_score); [^ \t\n]+ RET(s_score_2,yytext,SCORE_BITS); " bits (" BEGIN(s_score_parentheses); [0-9]+ RET(s_score_parentheses_2,yytext,SCORE); -"), Expect"("("[0-9]+")")?" ="" "+ BEGIN(s_evalue); -[^ \t\n]+ { +"), Expect"(\([0-9]+\))?" ="" "+ BEGIN(s_evalue); +[^ \t\n,]+ { _zerg_fix_evalue(); RET(s_evalue_2,_zerg_internal_buffer,EVALUE); } +", Method:"[ ]* BEGIN(s_hsp_method); \n" Identities = " BEGIN(s_identities); +[^\n]+ RET(s_evalue_2,yytext,HSP_METHOD); [0-9]+ RET(s_identities_2,yytext,IDENTITIES); "/" BEGIN(s_alignment_length); [0-9]+ RET(s_alignment_length_2,yytext,ALIGNMENT_LENGTH); @@ -398,108 +396,108 @@ \n+ BEGIN(s_hsp); (" "*\n)?"Query:"" "+ BEGIN(s_query_start); -[0-9]+ { - if(_zerg_have_hsp) - { - BEGIN(s_query_start_2); - } - else - { - RET(s_query_start_2,yytext,QUERY_START); - } - } - -" "+[^ \t]+" "+ BEGIN(s_query_end); -[0-9]+ { - if(!_zerg_ignore[QUERY_END]) - { - char *p1, *p2; - p1=yytext; - p2=_zerg_internal_buffer; - while(*p1 && p2-_zerg_internal_buffer < 32-1) - *(p2++)=*(p1++); - *p2='\0'; - } - BEGIN(s_query_end_2); - } - -\n.+\n"Sbjct:"" "+ BEGIN(s_subject_start); -[0-9]+ { - if(_zerg_have_hsp) - { - BEGIN(s_subject_start_2); - } - else - { - _zerg_have_hsp=1; - RET(s_subject_start_2,yytext,SUBJECT_START); - } - } -" "*[^ \t]+" "+ BEGIN(s_subject_end); -[0-9]+ { - if(!_zerg_ignore[SUBJECT_END]) - { - char *p1, *p2; - p1=yytext; - p2=_zerg_internal_buffer+32; - while(*p1 && p2-(_zerg_internal_buffer+32) < 32-1) - *(p2++)=*(p1++); - *p2='\0'; - } - BEGIN(s_subject_end_2); - } +[0-9]+ RET(s_query_start_2,yytext,QUERY_START); +[ ]+ BEGIN(s_query_ali); +[[:alpha:]-]+ RET(s_query_ali_2,yytext,QUERY_ALI); +[ ]+ BEGIN(s_query_end); +[0-9]+ RET(s_query_end_2,yytext,QUERY_END); + +%{ +/* handle this: +Query: 0 ------- + +Sbjct: 897 TPGAYGG 903 + + handle this: +[...] +Query: 0 + +Sbjct: 28 28 +[...] +*/ +%} +\n.+\n"Sbjct:"" "+ BEGIN(s_subject_start); +[0-9]+ RET(s_subject_start_2,yytext,SUBJECT_START); +[ ]+ BEGIN(s_subject_ali); +[[:alpha:]-]+ RET(s_subject_ali_2,yytext,SUBJECT_ALI); +[ ]+ BEGIN(s_subject_end); +%{ +/* handle this: +[...] +Query: 0 + +Sbjct: 28 28 +[...] +*/ +%} +[0-9]+ RET(s_subject_end_2,yytext,SUBJECT_END); \n+ BEGIN(s_hsp); -[ \t\n] +[ \t\n] -Database: RET(s_end_of_report,"",END_OF_REPORT); -T?BLAST. { - yyless(0); - RET(s_end_of_report,"",END_OF_REPORT); - } - +Database: { + yyless(0); + begin_tail_of_report(s_tail_of_report); + } -Database: { unput('~'); BEGIN(s_pre_end_of_report_1); } - +T?BLAST. { + yyless(0); + RET(s_pre_end,_zerg_internal_buffer,TAIL_OF_REPORT); + } -T?BLAST. { +T?BLAST. { yyless(0); - unput('~'); - BEGIN(s_pre_end_of_report_1); + RET(INITIAL,"",END_OF_REPORT); } - -"~" { - if(_zerg_have_hsp) - { - _zerg_have_hsp=0; - unput('~'); - unput('~'); - RET(s_pre_end_of_report_2,_zerg_internal_buffer,QUERY_END); - } - else - { - RET(s_end_of_report,"",END_OF_REPORT); - } +" Database:" { + yyless(0); + begin_tail_of_report(s_tail_of_report); } -"~" RET(s_pre_end_of_report_3,_zerg_internal_buffer+32,SUBJECT_END); -"~" RET(s_end_of_report,"",END_OF_REPORT); +.|\n { + if( _zerg_tail_of_rep_len < INTERNAL_BUFFER_LENGTH-1 ) + { + _zerg_internal_buffer[_zerg_tail_of_rep_len++] = *yytext; + _zerg_internal_buffer[_zerg_tail_of_rep_len] = 0; + } + else + fprintf(stderr, "zerg buffer overflow, can not store '%c'\n", *yytext ); + //BEGIN(s_tail_of_report); // it already is int this start cond + } -.|\n <*>.|\n RET(INITIAL,yytext,UNMATCHED); -<> _zerg_value=""; return 0; + +<> { + RET(INITIAL,_zerg_internal_buffer,TAIL_OF_REPORT); + } + +<> { + _zerg_value=""; return 0; + } %% void zerg_open_file(char* filename) { - zergin=fopen(filename,"r"); + FILE * fh; + + fh = fopen(filename,"r"); + + if( !fh ) zergrestart( stdin ); + else zergrestart( fh ); + BEGIN(INITIAL); +} + +void zerg_read_stream(FILE* __stream) +{ + zergrestart( __stream ); + BEGIN(INITIAL); } void zerg_close_file() @@ -516,7 +514,7 @@ void zerg_ignore_all() { int i; - for(i=BLAST_VERSION; i<=UNMATCHED; i++) + for(i=BLAST_VERSION; iyy_n_chars + yytext -YY_CURRENT_BUFFER->yy_ch_buf - _zerg_desconto; } + +// vim:et:ts=2: --- libzerg.orig/zerg.h +++ libzerg/zerg.h @@ -6,37 +6,51 @@ #ifndef _zerg_h_ #define _zerg_h_ -#define BLAST_VERSION 1 /* Esta tem que ser a primeira */ -#define QUERY_NAME 2 -#define QUERY_ANNOTATION 3 -#define QUERY_LENGTH 4 -#define NOHITS 5 -#define DESCRIPTION_HITNAME 6 -#define DESCRIPTION_ANNOTATION 7 -#define DESCRIPTION_SCORE 8 -#define DESCRIPTION_EVALUE 9 -#define SUBJECT_NAME 10 -#define SUBJECT_ANNOTATION 11 -#define SUBJECT_LENGTH 12 -#define SCORE_BITS 13 -#define SCORE 14 -#define EVALUE 15 -#define IDENTITIES 16 -#define ALIGNMENT_LENGTH 17 -#define PERCENT_IDENTITIES 18 -#define GAPS 19 -#define QUERY_ORIENTATION 20 -#define SUBJECT_ORIENTATION 21 -#define QUERY_START 22 -#define QUERY_END 23 -#define SUBJECT_START 24 -#define SUBJECT_END 25 -#define END_OF_REPORT 26 -#define POSITIVES 27 -#define PERCENT_POSITIVES 28 -#define QUERY_FRAME 29 -#define SUBJECT_FRAME 30 -#define UNMATCHED 31 /* Esta tem que ser a ultima */ +#define BUFFER_OVERFLOW -1 + +#define BLAST_VERSION 1 /* Esta tem que ser a primeira */ +#define QUERY_NAME 2 +#define QUERY_ANNOTATION 3 +#define QUERY_LENGTH 4 +#define NOHITS 5 +#define DESCRIPTION_HITNAME 6 +#define DESCRIPTION_ANNOTATION 7 +#define DESCRIPTION_SCORE 8 +#define DESCRIPTION_EVALUE 9 +#define SUBJECT_NAME 10 +#define SUBJECT_ANNOTATION 11 +#define SUBJECT_LENGTH 12 +#define SCORE_BITS 13 +#define SCORE 14 +#define EVALUE 15 +#define IDENTITIES 16 +#define ALIGNMENT_LENGTH 17 +#define PERCENT_IDENTITIES 18 +#define GAPS 19 +#define QUERY_ORIENTATION 20 +#define SUBJECT_ORIENTATION 21 +#define QUERY_START 22 +#define QUERY_END 23 +#define SUBJECT_START 24 +#define SUBJECT_END 25 +#define END_OF_REPORT 26 +#define POSITIVES 27 +#define PERCENT_POSITIVES 28 +#define QUERY_FRAME 29 +#define SUBJECT_FRAME 30 +#define UNMATCHED 31 +#define ROUND_NUMBER 32 +#define HSP_METHOD 33 +#define SEARCHING 34 +#define QUERY_ALI 35 +#define SUBJECT_ALI 36 +#define ROUND_SEQ_FOUND 37 +#define ROUND_SEQ_NEW 38 +#define CONVERGED 39 +#define REFERENCE 40 +#define TAIL_OF_REPORT 41 +#define DATABASE 42 +#define AFTER_LAST_TOKEN 43 // dummy token, must be last #ifdef __cplusplus extern "C" { @@ -44,6 +58,7 @@ void zerg_open_file(char* filename); void zerg_close_file(); +void zerg_read_stream(FILE* __stream); void zerg_ignore(int code); void zerg_ignore_all(); void zerg_unignore(int code); --- libzerg.orig/Makefile.am +++ libzerg/Makefile.am @@ -4,7 +4,7 @@ lib_LTLIBRARIES = libzerg.la libzerg_la_SOURCES = zerg.h zerglexer.c -libzerg_la_LDFLAGS = -version-info 0:0:0 +libzerg_la_LDFLAGS = -version-info 0:1:0 lex.zerg.c: zerglexer.lex flex -Cf zerglexer.lex debian/patches/save_makefile.patch0000644000000000000000000000151311775567117014452 0ustar Author: Andreas Tille and Laszlo Kajan Description: Save original Makefile to enable proper restoration of original state --- /dev/null +++ libzerg/Makefile.libzerg-orig @@ -0,0 +1,24 @@ +CC=gcc +CFLAGS=-O3 -fPIC +LOADLIBES=libzerg.a +PREFIX=/usr/local/libzerg + +libzerg.a: zerglexer.o + ar rc $@ $^ + ranlib libzerg.a + +zerglexer.o: zerglexer.c zerg.h + +lex.zerg.c: zerglexer.lex + flex -Cf zerglexer.lex + +zerglexer.c: lex.zerg.c + perl -pe 's/ret_val = EOB_ACT_CONTINUE_SCAN;/ret_val = EOB_ACT_CONTINUE_SCAN;\n\nDESCONTA;/; s/\#define YY_BUF_SIZE 16384/\#define YY_BUF_SIZE 2097152/' lex.zerg.c > zerglexer.c + +clean: + rm -f *.o *~ zerglexer.c libzerg.a lex.zerg.c + +install: + mkdir -m 0755 -p ${PREFIX}/lib ${PREFIX}/include; \ + cp libzerg.a ${PREFIX}/lib; \ + cp zerg.h ${PREFIX}/include debian/patches/autotools0000644000000000000000000000227611775567117012621 0ustar Author: Laszlo Kajan Description: use autotools build system Upstream uses a simple Makefile. Forwarded: no --- /dev/null +++ libzerg/AUTHORS @@ -0,0 +1 @@ +Copyright (C) 2002 Apuã Paquola - Instituto de Química - Universidade de São Paulo - Brasil --- /dev/null +++ libzerg/Makefile.am @@ -0,0 +1,16 @@ +ACLOCAL_AMFLAGS = -I m4 + +include_HEADERS = zerg.h + +lib_LTLIBRARIES = libzerg.la +libzerg_la_SOURCES = zerg.h zerglexer.c +libzerg_la_LDFLAGS = -version-info 0:0:0 + +lex.zerg.c: zerglexer.lex + flex -Cf zerglexer.lex + +zerglexer.c: lex.zerg.c + perl -pe 's/ret_val = EOB_ACT_CONTINUE_SCAN;/ret_val = EOB_ACT_CONTINUE_SCAN;\n\nDESCONTA;/; s/\#define YY_BUF_SIZE 16384/\#define YY_BUF_SIZE 2097152/' $< > $@ + +clean-local: + rm -f zerglexer.c lex.zerg.c --- /dev/null +++ libzerg/configure.ac @@ -0,0 +1,12 @@ +AC_INIT([libzerg], [1.0.7], [debian-med-packaging@lists.alioth.debian.org]) +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_SRCDIR([zerg.h]) +AC_CONFIG_HEADERS([config.h:config.hin]) +AM_INIT_AUTOMAKE([foreign]) + +AC_PROG_CC +AC_PROG_LIBTOOL +AC_LANG([C]) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT --- /dev/null +++ libzerg/m4/.createdir @@ -0,0 +1 @@ +create this directory debian/source/0000755000000000000000000000000011775567242010506 5ustar debian/source/format0000644000000000000000000000001411634164241011676 0ustar 3.0 (quilt)