diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-tex/rail | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-tex/rail')
| -rw-r--r-- | dev-tex/rail/Manifest | 1 | ||||
| -rw-r--r-- | dev-tex/rail/files/rail-1.2_p1-C23.patch | 359 | ||||
| -rw-r--r-- | dev-tex/rail/files/rail-1.2_p1-makefile.patch | 21 | ||||
| -rw-r--r-- | dev-tex/rail/metadata.xml | 12 | ||||
| -rw-r--r-- | dev-tex/rail/rail-1.2_p1-r2.ebuild | 39 |
5 files changed, 432 insertions, 0 deletions
diff --git a/dev-tex/rail/Manifest b/dev-tex/rail/Manifest new file mode 100644 index 000000000000..91aecdac53ba --- /dev/null +++ b/dev-tex/rail/Manifest @@ -0,0 +1 @@ +DIST rail-1.2_p1.zip 107773 BLAKE2B 557f1406768a03e049f403798e459a9cf40c231ceda156bac5bfcc8e1df6018428b1a0eeb4c7e518078d96de141c9aa045cabf22d4ffa3ebe16c3a04798c9884 SHA512 8d0178b7beb0f212eb34487b6a285f41d10e776d4294c945e2cc1c163bde44b4d6a38afca952ed0fb9759962f565002d3591f4e098d78d60eb03ae30469483c8 diff --git a/dev-tex/rail/files/rail-1.2_p1-C23.patch b/dev-tex/rail/files/rail-1.2_p1-C23.patch new file mode 100644 index 000000000000..cdfc10264aae --- /dev/null +++ b/dev-tex/rail/files/rail-1.2_p1-C23.patch @@ -0,0 +1,359 @@ +Fix includes and function definitions and signatures +until whole thing compiles with C23. +https://bugs.gentoo.org/738854 +https://bugs.gentoo.org/883267 +https://bugs.gentoo.org/947155 +--- a/gram.y ++++ b/gram.y +@@ -5,6 +5,7 @@ + #include <stdio.h> + + #include "rail.h" ++extern int yylex (void); + + char optchar; + +--- a/rail.c ++++ b/rail.c +@@ -21,6 +21,7 @@ + #include <stdlib.h> + #include <stdio.h> + #include <string.h> ++#include <unistd.h> + + #include "patchlevel.h" + #include "rail.h" +@@ -54,9 +55,7 @@ + + int anonymous; /* anonymous rules */ + +-main(argc,argv) +-unsigned argc; +-char *argv[]; ++int main(int argc, char *argv[]) + { + char *arg, **argp; + unsigned len; +@@ -122,8 +121,7 @@ + /*NOTREACHED*/ + } + +-int setopt(c,s) +-char c, *s; ++int setopt(char c, char *s) + { + int set; + +@@ -167,7 +165,7 @@ + return 1; + } + +-usage() ++void usage(void) + { + fprintf(stderr,USAGE,myname); + exit(1); +@@ -175,23 +173,21 @@ + + /* error routine for yyparse() */ + +-yyerror(s) +-char *s; ++void yyerror(char *s) + { + fatal("%s",s); + } + + /* wrap-up routine for yylex() */ + +-yywrap() ++int yywrap(void) + { + return(1); + } + + /* check for non-NULL pointer */ + +-char *mcheck(s) +-char *s; ++char *mcheck(char *s) + { + if(s==NULL) + fatal("out of memory",(char *)NULL); +@@ -201,9 +197,7 @@ + + /* make a new body */ + +-BODYTYPE *newbody(kind,body1,body2) +-int kind; +-BODYTYPE *body1, *body2; ++BODYTYPE *newbody(int kind, BODYTYPE *body1, BODYTYPE *body2) + { + BODYTYPE *body; + +@@ -226,8 +220,7 @@ + + /* free a body recursively */ + +-freebody(body) +-BODYTYPE *body; ++void freebody(BODYTYPE *body) + { + int i; + +@@ -246,16 +239,14 @@ + + /* test if a body is empty */ + +-int isemptybody(body) +-BODYTYPE *body; ++int isemptybody(BODYTYPE *body) + { + return(body==NULL || body->kind==EMPTY); + } + + /* add to a body list */ + +-static addlist(body1,body2) +-BODYTYPE *body1, *body2; ++void static addlist(BODYTYPE *body1, BODYTYPE *body2) + { + if(body1->nlist>=MAXLIST) { + yyerror("list too long"); +@@ -265,9 +256,7 @@ + + /* add two body lists (for CAT, BAR, PLUS) */ + +-BODYTYPE *addbody(kind,body1,body2) +-int kind; +-BODYTYPE *body1, *body2; ++BODYTYPE *addbody(int kind, BODYTYPE *body1, BODYTYPE *body2) + { + BODYTYPE *body; + int i; +@@ -292,8 +281,7 @@ + + /* reverse all concatenations (for PLUS) */ + +-BODYTYPE *revbody(body) +-BODYTYPE *body; ++BODYTYPE *revbody(BODYTYPE *body) + { + int i,j; + BODYTYPE *tmp; +@@ -314,9 +302,7 @@ + + /* print a body for debugging */ + +-prtbody(indent,body) +-int indent; +-BODYTYPE *body; ++void prtbody(int indent, BODYTYPE *body) + { + int i; + +@@ -376,9 +362,7 @@ + + /* output a body */ + +-outbody(id,body) +-IDTYPE *id; +-BODYTYPE *body; ++void outbody(IDTYPE *id, BODYTYPE *body) + { + posbody(body,0); + +@@ -403,10 +387,7 @@ + + /* format a body */ + +-fmtbody(body,cent,arrow) +-BODYTYPE *body; +-char *cent; +-char arrow; ++void fmtbody(BODYTYPE *body, char *cent, char arrow) + { + BODYTYPE *body1; + int i; +@@ -494,8 +475,7 @@ + + /* position body (fill in height and ystart) */ + +-posbody(body,ystart) +-BODYTYPE *body; ++void posbody(BODYTYPE *body, int ystart) + { + BODYTYPE *body1; + int i; +@@ -551,8 +531,7 @@ + + /* output an index entry */ + +-outindex(id) +-IDTYPE *id; ++int outindex(IDTYPE *id) + { + if(id!=NULL) + fprintf(outf,"\\rail@index{%s}\n",id->name); +@@ -560,9 +539,7 @@ + + /* make a new rule list */ + +-RULETYPE *newrule(id,body) +-IDTYPE *id; +-BODYTYPE *body; ++RULETYPE *newrule(IDTYPE *id, BODYTYPE *body) + { + RULETYPE *rule; + +@@ -576,8 +553,7 @@ + + /* free a rule list */ + +-freerule(rule) +-RULETYPE *rule; ++void freerule(RULETYPE *rule) + { + RULETYPE *rulep; + +@@ -591,8 +567,7 @@ + + /* add two rule lists */ + +-RULETYPE *addrule(rule1,rule2) +-RULETYPE *rule1, *rule2; ++RULETYPE *addrule(RULETYPE *rule1, RULETYPE *rule2) + { + RULETYPE *rulep; + +@@ -609,8 +584,7 @@ + + /* output a rule list */ + +-outrule(rule) +-RULETYPE *rule; ++void outrule(RULETYPE *rule) + { + while(rule!=NULL) { + +@@ -625,8 +599,7 @@ + + /* look up an identifier */ + +-IDTYPE *lookup(name) +-char *name; ++IDTYPE *lookup(char *name) + { + IDTYPE *idp, **idq; + +@@ -648,8 +621,7 @@ + + /* delete an identifier */ + +-delete(id) +-IDTYPE *id; ++void delete(IDTYPE *id) + { + IDTYPE *idp, **idq; + +@@ -665,7 +637,7 @@ + + /* check that there are no undefined identifiers */ + +-checkdefs() ++void checkdefs(void) + { + IDTYPE *id; + +@@ -676,8 +648,7 @@ + + /* complain about an undefined identifier */ + +-undef(id) +-IDTYPE *id; ++void undef(IDTYPE *id) + { + if(chkgram) + error("undefined identifier '%s'",id->name); +@@ -685,8 +656,7 @@ + + /* complain about a redefined identifier */ + +-redef(id) +-IDTYPE *id; ++void redef(IDTYPE *id) + { + if(chkgram) + error("redefined identifier '%s'",id->name); +@@ -694,8 +664,7 @@ + + /* display an error */ + +-error(f,s) +-char *f, *s; ++void error(char *f, char *s) + { + if(newline) { + printf("\n"); +@@ -713,8 +682,7 @@ + fprintf(stderr,"\n"); + } + +-fatal(f,s) +-char *f,*s; ++void fatal(char *f, char *s) + { + error(f,s); + +--- a/rail.h ++++ b/rail.h +@@ -68,22 +68,31 @@ + + extern IDTYPE *errorid; + +-extern char *mcheck(); ++extern char *mcheck(char *s); + +-extern BODYTYPE *newbody(); +-extern freebody(); +-extern int isemptybody(); +-extern BODYTYPE *addbody(); +-extern BODYTYPE *revbody(); +- +-extern RULETYPE *newrule(); +-extern freerule(); +-extern RULETYPE *addrule(); +-extern outrule(); +- +-extern IDTYPE *lookup(); +-extern delete(); +- +-extern undef(); +-extern redef(); +-extern error(); ++extern BODYTYPE *newbody(int kind, BODYTYPE *body1, BODYTYPE *body2); ++extern void freebody(BODYTYPE *body); ++extern int isemptybody(BODYTYPE *body); ++extern BODYTYPE *addbody(int kind, BODYTYPE *body1, BODYTYPE *body2); ++extern BODYTYPE *revbody(BODYTYPE *body); ++extern void posbody(BODYTYPE *body, int ystart); ++extern void fmtbody(BODYTYPE *body, char *cent, char arrow); ++ ++extern RULETYPE *newrule(IDTYPE *id, BODYTYPE *body); ++extern void freerule(RULETYPE *rule); ++extern RULETYPE *addrule(RULETYPE *rule1, RULETYPE *rule2); ++extern void outrule(RULETYPE *rule); ++ ++extern IDTYPE *lookup(char *name); ++extern void delete(IDTYPE *id); ++ ++extern void undef(IDTYPE *id); ++extern void redef(IDTYPE *id); ++extern void error(char *f, char *s); ++extern void yyerror(char *s); ++extern int yywrap(void); ++ ++int setopt(char c, char *s); ++void usage(void); ++void checkdefs(void); ++void fatal(char *f, char *s); diff --git a/dev-tex/rail/files/rail-1.2_p1-makefile.patch b/dev-tex/rail/files/rail-1.2_p1-makefile.patch new file mode 100644 index 000000000000..44870b9a8c73 --- /dev/null +++ b/dev-tex/rail/files/rail-1.2_p1-makefile.patch @@ -0,0 +1,21 @@ +Correct Makefile, enabling parallel build. +--- a/Makefile ++++ b/Makefile +@@ -51,11 +53,15 @@ + + rail.o: patchlevel.h + ++.PHONY: gram.c gram.h clean ++ +-gram.c gram.h: y.tab.c y.tab.h ++gram.c: y.tab.c + cmp -s gram.c y.tab.c || cp y.tab.c gram.c ++ ++gram.h: y.tab.h + cmp -s gram.h y.tab.h || cp y.tab.h gram.h + +-y.tab.c y.tab.h y.output: gram.y ++y.tab.c y.tab.h y.output &: gram.y + $(YACC) $(YFLAGS) -dv gram.y + + rail: $(OBJS) diff --git a/dev-tex/rail/metadata.xml b/dev-tex/rail/metadata.xml new file mode 100644 index 000000000000..db02b8faece9 --- /dev/null +++ b/dev-tex/rail/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>tex@gentoo.org</email> + <name>Gentoo TeX Project</name> + </maintainer> + <upstream> + <remote-id type="ctan">rail</remote-id> + </upstream> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/dev-tex/rail/rail-1.2_p1-r2.ebuild b/dev-tex/rail/rail-1.2_p1-r2.ebuild new file mode 100644 index 000000000000..a11cd774b754 --- /dev/null +++ b/dev-tex/rail/rail-1.2_p1-r2.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit latex-package toolchain-funcs + +DESCRIPTION="Offers syntax/railroad diagrams" +HOMEPAGE="https://www.ctan.org/tex-archive/support/rail/" +SRC_URI="https://mirror.ctan.org/support/${PN}.zip -> ${P}.zip" +S="${WORKDIR}/${PN}" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +BDEPEND="app-arch/unzip + app-alternatives/yacc + app-alternatives/lex" + +PATCHES=( + "${FILESDIR}/${P}-C23.patch" + "${FILESDIR}/${P}-makefile.patch" +) + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + CFLAGS="-DYYDEBUG ${CFLAGS} ${LDFLAGS}" \ + rail rail.dvi +} + +src_install() { + local LATEX_PACKAGE_SKIP="try.tex" + + latex-package_src_doinstall sty doc + dobin rail + newman rail.man rail.1 +} |
