]> git.pld-linux.org Git - packages/antlr.git/commitdiff
- added java bcond to allow build without all java stuff
authorwrobell <wrobell@pld-linux.org>
Sat, 24 Feb 2007 12:01:52 +0000 (12:01 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    antlr.spec -> 1.49

antlr.spec

index d9ee49af005f7410421fdbbc3655ffc33db27473..8bb9dbab4eb4c4e797cf3ef475b7f46e2a888882 100644 (file)
@@ -5,6 +5,7 @@
 # Conditional build:
 %bcond_without gcj     # use javac instead of GCJ
 %bcond_without dotnet  # don't build .NET modules
+%bcond_without java    # don't build Java at all
 #
 %{?with_dotnet:%include        /usr/lib/rpm/macros.mono}
 #
@@ -25,6 +26,7 @@ BuildRequires:        libstdc++-devel
 %{?with_dotnet:BuildRequires:  mono-csharp}
 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
@@ -34,6 +36,7 @@ BuildRequires:        jar
 BuildRequires: jdk
 Requires:      jre
 %endif
+%endif
 Conflicts:     pccts < 1.33MR33-6
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -104,6 +107,7 @@ cp -f /usr/share/automake/config.sub scripts
        %{?with_dotnet:--enable-csharp} \
        %{!?with_dotnet:--disable-csharp} \
        %{!?with_gcj: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}" \
@@ -116,8 +120,10 @@ install -d $RPM_BUILD_ROOT{%{_javadir},%{py_sitescriptdir}/%{name},%{_prefix}/li
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%if %{with java}
 install $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/antlr.jar \
        $RPM_BUILD_ROOT%{_javadir}
+%endif
 install $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/*.py \
        $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}
 cp -Rf examples/{cpp,csharp,java,python} \
@@ -143,7 +149,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/%{name}
 %{_libdir}/libantlr.a
 # Dont separate it, antlr binary wont work without it
+%if %{with java}
 %{_javadir}/*.jar
+%endif
 
 %if %{with dotnet}
 %files -n dotnet-antlr
This page took 0.093883 seconds and 4 git commands to generate.