From 928cc7118d2cc3c67807d7f88c094cddfa5345df Mon Sep 17 00:00:00 2001 From: gil Date: Fri, 5 Jan 2024 20:26:58 +0100 Subject: [PATCH] package created by autospec [release 1.4-1mamba;Thu Nov 25 2010] --- README.md | 12 +++ antlrworks-1.4-BrowserLauncher.patch | 11 +++ antlrworks-1.4-build_xml.patch | 12 +++ antlrworks-script | 22 ++++++ antlrworks.desktop | 8 ++ antlrworks.spec | 113 +++++++++++++++++++++++++++ 6 files changed, 178 insertions(+) create mode 100644 antlrworks-1.4-BrowserLauncher.patch create mode 100644 antlrworks-1.4-build_xml.patch create mode 100644 antlrworks-script create mode 100644 antlrworks.desktop create mode 100644 antlrworks.spec diff --git a/README.md b/README.md index 56324b7..c525967 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,14 @@ # antlrworks +ANTLRWorks is a novel grammar development environment for ANTLR v3 grammars +written by Jean Bovet (with suggested use cases from Terence Parr). It combines +an excellent grammar-aware editor with an interpreter for rapid prototyping and +a language-agnostic debugger for isolating grammar errors. ANTLRWorks helps +eliminate grammar nondeterminisms, one of the most difficult problems for +beginners and experts alike, by highlighting nondeterministic paths in the +syntax diagram associated with a grammar. ANTLRWorks' goal is to make grammars +more accessible to the average programmer, improve maintainability and +readability of grammars by providing excellent grammar navigation and +refactoring tools, and address the most common questions and problems +encountered by grammar developers. + diff --git a/antlrworks-1.4-BrowserLauncher.patch b/antlrworks-1.4-BrowserLauncher.patch new file mode 100644 index 0000000..0500ef9 --- /dev/null +++ b/antlrworks-1.4-BrowserLauncher.patch @@ -0,0 +1,11 @@ +--- src/aw/org/antlr/xjlib/appkit/utils/BrowserLauncher.java 2010-05-09 21:50:20.000000000 +0200 ++++ src/aw/org/antlr/xjlib/appkit/utils/BrowserLauncher.java-gil 2010-11-25 21:10:02.000000000 +0100 +@@ -464,7 +464,7 @@ + case OTHER: + default: + // Jean Bovet: look for multiple browser in case netscape is not installed +- browser = new String[] {"firefox", "mozilla", "netscape", "opera", "konqueror", "galeon", "firebird"}; ++ browser = new String[] {"xdg-open", "firefox", "mozilla", "icecat", "chrome", "netscape", "opera", "konqueror", "epiphany", "galeon", "firebird"}; + break; + } + return browser; diff --git a/antlrworks-1.4-build_xml.patch b/antlrworks-1.4-build_xml.patch new file mode 100644 index 0000000..a81049c --- /dev/null +++ b/antlrworks-1.4-build_xml.patch @@ -0,0 +1,12 @@ +--- build.xml 2010-05-09 21:50:20.000000000 +0200 ++++ build.xml-gil 2010-11-25 21:04:10.000000000 +0100 +@@ -63,9 +63,6 @@ + + + +- +- +- + + + diff --git a/antlrworks-script b/antlrworks-script new file mode 100644 index 0000000..d643144 --- /dev/null +++ b/antlrworks-script @@ -0,0 +1,22 @@ +#!/bin/sh + +# Source functions library +if [ -f /usr/share/java-utils/java-functions ] ; then + . /usr/share/java-utils/java-functions +else + echo "Can't find functions library, aborting" + exit 1 +fi + +# Configuration +MAIN_CLASS="org.antlr.works.IDE" +BASE_FLAGS="-Xmx400m" +BASE_JARS="antlrworks antlr antlr3 antlr3-runtime jgoodies-forms stringtemplate32" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS + +# Let's start +run "$@" diff --git a/antlrworks.desktop b/antlrworks.desktop new file mode 100644 index 0000000..4c5c5e4 --- /dev/null +++ b/antlrworks.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=ANTLRWorks +Comment=Grammar development environment for ANTLR v3 grammars +Exec=antlrworks +Icon=antlrworks +Terminal=false +Type=Application +Categories=Development;IDE;Java; diff --git a/antlrworks.spec b/antlrworks.spec new file mode 100644 index 0000000..b82440b --- /dev/null +++ b/antlrworks.spec @@ -0,0 +1,113 @@ +Name: antlrworks +Version: 1.4 +Release: 1mamba +Summary: The ANTLR GUI Development Environment +Group: Graphical Desktop/Applications/Development +Vendor: openmamba +Distribution: openmamba +Packager: gil +URL: http://www.antlr.org/works/index.html +Source0: http://www.antlr.org/download/antlrworks-%{version}-src.zip +Source1: antlrworks-script +Source2: antlrworks.desktop +Patch0: antlrworks-1.4-build_xml.patch +Patch1: antlrworks-1.4-BrowserLauncher.patch +License: BSD +BuildRequires: apache-ant +BuildRequires: antlr3 +BuildRequires: desktop-file-utils +BuildRequires: jgoodies-forms +Requires: antlr +Requires: antlr3 +Requires: graphviz +Requires: hicolor-icon-theme +Requires: java-stringtemplate32 +Requires: jgoodies-forms +Requires: jpackage-utils +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +ANTLRWorks is a novel grammar development environment for ANTLR v3 grammars +written by Jean Bovet (with suggested use cases from Terence Parr). It combines +an excellent grammar-aware editor with an interpreter for rapid prototyping and +a language-agnostic debugger for isolating grammar errors. ANTLRWorks helps +eliminate grammar nondeterminisms, one of the most difficult problems for +beginners and experts alike, by highlighting nondeterministic paths in the +syntax diagram associated with a grammar. ANTLRWorks' goal is to make grammars +more accessible to the average programmer, improve maintainability and +readability of grammars by providing excellent grammar navigation and +refactoring tools, and address the most common questions and problems +encountered by grammar developers. + +%prep +%setup -q -c %{name}-%{version} +%patch0 -p0 +%patch1 -p0 + +for j in $(find . -name '*.class' -o -name '*.jar'); do + rm -rf $j +done + +%build + +export CLASSPATH=$(build-classpath antlr antlr3 antlr3-runtime jgoodies-forms stringtemplate32) +ant build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +mkdir -p %{buildroot}%{_javadir} + +install -pm 0644 dist/antlrworks-%{version}.jar %{buildroot}%{_javadir}/antlrworks-%{version}.jar + +( + cd %{buildroot}%{_javadir}/ + for jar in *-%{version}.jar; do + ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` + done +) + +mkdir -p %{buildroot}%{_bindir} +install -pm 755 %{SOURCE1} %{buildroot}%{_bindir}/antlrworks + +desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2} + +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps +install -pm 644 resources/icons/app.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/antlrworks.png +mkdir -p %{buildroot}%{_datadir}/pixmaps +install -pm 644 resources/icons/app.png %{buildroot}%{_datadir}/pixmaps/antlrworks.png + +for i in 16 32 64; do + mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps + install -pm 644 resources/icons/app_${i}x${i}.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/antlrworks.png +done + +desktop-file-validate %{buildroot}%{_datadir}/applications/antlrworks.desktop + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%files +%defattr(-,root,root) +%{_javadir}/antlrworks-%{version}.jar +%{_javadir}/antlrworks.jar +%{_bindir}/antlrworks +%{_datadir}/applications/antlrworks.desktop +%{_datadir}/icons/hicolor/*x*/apps/antlrworks.png +%{_datadir}/pixmaps/antlrworks.png + +%changelog +* Thu Nov 25 2010 gil 1.4-1mamba +- package created by autospec