]> git.pld-linux.org Git - packages/antlr.git/blobdiff - antlr.spec
- fix docdir packaging
[packages/antlr.git] / antlr.spec
index 8bb9dbab4eb4c4e797cf3ef475b7f46e2a888882..947ca74f498210e30b3523ef83c580a667c48785 100644 (file)
@@ -1,6 +1,10 @@
 # TODO:
-#  *  add python bcond
-#  *  package the Emacs and Jedit modes
+#  - add python bcond
+#  - package the Emacs and Jedit modes
+#
+# NOTE:
+#  - next version is packaged as antlr3.spec. Please, do not upgrade this spec
+#    to 3.
 #
 # Conditional build:
 %bcond_without gcj     # use javac instead of GCJ
 #
 %{?with_dotnet:%include        /usr/lib/rpm/macros.mono}
 #
+%ifarch i486 i586 i686 athlon %{x8664}
+%undefine      with_gcj
+%endif
+#
 Summary:       ANother Tool for Language Recognition
 Summary(pl.UTF-8):     Jeszcze jedno narzędzie do rozpoznawania języka
 Name:          antlr
 Version:       2.7.7
-Release:       2
+Release:       13
 License:       Public Domain
 Group:         Development/Tools
-Source0:       http://www.antlr.org/download/%{name}-%{version}.tar.gz
+Source0:       http://www.antlr2.org/download/%{name}-%{version}.tar.gz
 # Source0-md5: 01cc9a2a454dd33dcd8c856ec89af090
 Patch0:                %{name}-DESTDIR.patch
-URL:           http://www.antlr.org/
+Patch1:                %{name}-strcasecmp.patch
+Patch2:                %{name}-gentoo.patch
+URL:           http://www.antlr2.org/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: libstdc++-devel
@@ -28,14 +38,13 @@ BuildRequires:      python
 BuildRequires: sed >= 4.0
 %if %{with java}
 %if %{with gcj}
-BuildRequires: gcc-java >= 5:4.0.0
-BuildRequires: gcc-java-tools >= 5:4.0.0
-Requires:      /usr/bin/gij
+BuildRequires: java-gcj-compat-devel
 %else
 BuildRequires: jar
 BuildRequires: jdk
-Requires:      jre
+Requires:      jpackage-utils
 %endif
+Requires:      jre
 %endif
 Conflicts:     pccts < 1.33MR33-6
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -98,17 +107,18 @@ Przykładowe programy używające ANTLR.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
 cp -f /usr/share/automake/config.sub scripts
 %{__autoconf}
 %configure \
-       --enable-cxx \
-       %{?with_dotnet:--enable-csharp} \
+       %{?with_dotnet:CSHARPC=/usr/bin/mcs --enable-csharp} \
        %{!?with_dotnet:--disable-csharp} \
-       %{!?with_gcj:CLASSPATH=`pwd` --with-java=java --with-javac=javac --with-jar=jar} \
+       --enable-cxx \
+       %{?with_java:CLASSPATH=`pwd` --with-java=java --with-javac=javac --with-jar=jar} \
        %{!?with_java:--disable-java} \
-       %{?with_gcj:--with-java=gij --with-javac=gcj --with-jar=jar}
 
 CXXFLAGS="%{rpmcxxflags}" \
 %{__make}
@@ -138,6 +148,8 @@ rm $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/*.py
 
 %{__sed} -i -e "s,ANTLR_JAR=.*,ANTLR_JAR=\"%{_javadir}/antlr.jar\",g" $RPM_BUILD_ROOT%{_bindir}/antlr
 
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
This page took 0.051401 seconds and 4 git commands to generate.