public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jerry James <loganjerry@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/antlr3] epel10: Add bootstrap conditional (bz 1847093).
Date: Wed, 22 Jul 2026 19:37:45 GMT	[thread overview]
Message-ID: <178474906508.1.8593416820292993038.rpms-antlr3-2d77c1a4a83b@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/antlr3
Branch : epel10
Commit : 2d77c1a4a83bd21a65102cf1067c0d763114baea
Author : Jerry James <loganjerry@gmail.com>
Date   : 2021-03-12T11:22:29-07:00
Stats  : +61/-4 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/antlr3/c/2d77c1a4a83bd21a65102cf1067c0d763114baea?branch=epel10

Log:
Add bootstrap conditional (bz 1847093).

---
diff --git a/antlr3.spec b/antlr3.spec
index a938e3b..6c415d6 100644
--- a/antlr3.spec
+++ b/antlr3.spec
@@ -1,7 +1,17 @@
 %global antlr_version 3.5.2
 %global c_runtime_version 3.4
 %global javascript_runtime_version 3.1
-%global baserelease 31
+%global baserelease 32
+
+# This package needs itself to build.  Use this to bootstrap on a new system.
+%bcond_without bootstrap
+
+# Component versions to use when bootstrapping
+%global antlr2_version 2.7.7
+%global bootstrap_version 3.5
+%global ST4ver1 4.0.7
+%global ST4ver2 4.0.8
+%global stringtemplatever 3.2.1
 
 Summary:            ANother Tool for Language Recognition
 Name:               antlr3
@@ -12,8 +22,25 @@ License:            BSD
 URL:                http://www.antlr3.org/
 
 Source0:            https://github.com/antlr/antlr3/archive/%{antlr_version}/%{name}-%{antlr_version}.tar.gz
-#Source2:            http://www.antlr3.org/download/Python/antlr_python_runtime-%{python_runtime_version}.tar.gz
-Source3:            http://www.antlr3.org/download/antlr-javascript-runtime-%{javascript_runtime_version}.zip
+Source1:            http://www.antlr3.org/download/antlr-javascript-runtime-%{javascript_runtime_version}.zip
+%if %{with bootstrap}
+# Get prebuilt versions to bootstrap
+Source2:            https://repo1.maven.org/maven2/org/antlr/ST4/%{ST4ver1}/ST4-%{ST4ver1}.jar
+Source3:            https://repo1.maven.org/maven2/org/antlr/ST4/%{ST4ver1}/ST4-%{ST4ver1}.pom
+Source4:            https://repo1.maven.org/maven2/org/antlr/ST4/%{ST4ver2}/ST4-%{ST4ver2}.jar
+Source5:            https://repo1.maven.org/maven2/org/antlr/ST4/%{ST4ver2}/ST4-%{ST4ver2}.pom
+Source6:            https://repo1.maven.org/maven2/org/antlr/antlr/%{bootstrap_version}/antlr-%{bootstrap_version}.jar
+Source7:            https://repo1.maven.org/maven2/org/antlr/antlr/%{bootstrap_version}/antlr-%{bootstrap_version}.pom
+Source8:            https://repo1.maven.org/maven2/org/antlr/antlr-master/%{bootstrap_version}/antlr-master-%{bootstrap_version}.pom
+Source9:            https://repo1.maven.org/maven2/org/antlr/antlr-runtime/%{bootstrap_version}/antlr-runtime-%{bootstrap_version}.jar
+Source10:           https://repo1.maven.org/maven2/org/antlr/antlr-runtime/%{bootstrap_version}/antlr-runtime-%{bootstrap_version}.pom
+Source11:           https://repo1.maven.org/maven2/org/antlr/antlr3-maven-plugin/%{bootstrap_version}/antlr3-maven-plugin-%{bootstrap_version}.jar
+Source12:           https://repo1.maven.org/maven2/org/antlr/antlr3-maven-plugin/%{bootstrap_version}/antlr3-maven-plugin-%{bootstrap_version}.pom
+Source13:           https://repo1.maven.org/maven2/org/antlr/stringtemplate/%{stringtemplatever}/stringtemplate-%{stringtemplatever}.jar
+Source14:           https://repo1.maven.org/maven2/org/antlr/stringtemplate/%{stringtemplatever}/stringtemplate-%{stringtemplatever}.pom
+Source15:           https://repo1.maven.org/maven2/antlr/antlr/%{antlr2_version}/antlr-%{antlr2_version}.jar
+Source16:           https://repo1.maven.org/maven2/antlr/antlr/%{antlr2_version}/antlr-%{antlr2_version}.pom
+%endif
 
 Patch0:         0001-java8-fix.patch
 # Generate OSGi metadata
@@ -35,10 +62,12 @@ Patch7:         0007-update-java-target.patch
 BuildRequires:  ant
 BuildRequires:  make
 BuildRequires:  maven-local
+%if %{without bootstrap}
 BuildRequires:  mvn(org.antlr:antlr)
 BuildRequires:  mvn(org.antlr:antlr3-maven-plugin)
 BuildRequires:  mvn(org.antlr:ST4)
 BuildRequires:  mvn(org.antlr:stringtemplate)
+%endif
 BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
 BuildRequires:  mvn(org.apache.maven:maven-plugin-api)
 BuildRequires:  mvn(org.apache.maven:maven-project)
@@ -140,7 +169,7 @@ Summary:        C++ runtime support for ANTLR-generated parsers
 C++ runtime support for ANTLR-generated parsers.
 
 %prep
-%setup -q -n antlr3-%{antlr_version} -a 3
+%setup -q -n antlr3-%{antlr_version} -a 1
 sed -i "s,\${buildNumber},`cat %{_sysconfdir}/fedora-release` `date`," tool/src/main/resources/org/antlr/antlr.properties
 %patch0 -p1
 %patch1
@@ -175,6 +204,31 @@ find -type f -a -name *.class -delete
 %mvn_file :antlr-runtime antlr3-runtime
 %mvn_file :antlr-maven-plugin antlr3-maven-plugin
 
+%if %{with bootstrap}
+# Make the bootstrap JARs and POMs available
+mkdir -p .m2/org/antlr/ST4/%{ST4ver1}
+cp -p %{SOURCE2} %{SOURCE3} .m2/org/antlr/ST4/%{ST4ver1}
+mkdir -p .m2/org/antlr/ST4/%{ST4ver2}
+cp -p %{SOURCE4} %{SOURCE5} .m2/org/antlr/ST4/%{ST4ver2}
+mkdir -p .m2/org/antlr/antlr/%{bootstrap_version}
+cp -p %{SOURCE6} %{SOURCE7} .m2/org/antlr/antlr/%{bootstrap_version}
+mkdir -p .m2/org/antlr/antlr-master/%{bootstrap_version}
+cp -p %{SOURCE8} .m2/org/antlr/antlr-master/%{bootstrap_version}
+mkdir -p .m2/org/antlr/antlr-runtime/%{bootstrap_version}
+cp -p %{SOURCE9} %{SOURCE10} .m2/org/antlr/antlr-runtime/%{bootstrap_version}
+mkdir -p .m2/org/antlr/antlr3-maven-plugin/%{bootstrap_version}
+cp -p %{SOURCE11} %{SOURCE12} .m2/org/antlr/antlr3-maven-plugin/%{bootstrap_version}
+mkdir -p .m2/org/antlr/stringtemplate/%{stringtemplatever}
+cp -p %{SOURCE13} %{SOURCE14} .m2/org/antlr/stringtemplate/%{stringtemplatever}
+mkdir -p .m2/antlr/antlr/%{antlr2_version}
+cp -p %{SOURCE15} %{SOURCE16} .m2/antlr/antlr/%{antlr2_version}
+
+# We don't need the parent POM
+%pom_remove_parent .m2/org/antlr/ST4/%{ST4ver1}/ST4-%{ST4ver1}.pom
+%pom_remove_parent .m2/org/antlr/ST4/%{ST4ver2}/ST4-%{ST4ver2}.pom
+%pom_remove_parent .m2/org/antlr/antlr-master/%{bootstrap_version}/antlr-master-%{bootstrap_version}.pom
+%endif
+
 %build
 %mvn_build -f
 
@@ -277,6 +331,9 @@ install -pm 644 runtime/Cpp/include/* $RPM_BUILD_ROOT/%{_includedir}/
 %doc tool/LICENSE.txt
 
 %changelog
+* Fri Mar 12 2021 Jerry James <loganjerry@gmail.com> - 1:3.5.2-32
+- Add bootstrap conditional (bz 1847093)
+
 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.5.2-31
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
 

                 reply	other threads:[~2026-07-22 19:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178474906508.1.8593416820292993038.rpms-antlr3-2d77c1a4a83b@fedoraproject.org \
    --to=loganjerry@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox