Blob Blame History Raw
%define eclipse_base     %{_libdir}/eclipse

Name:      eclipse-epic
Version:   0.6.35
Release:   1%{?dist}
Summary:   Perl Eclipse plugin
Group:     Development/Tools
License:   CPL
URL:       http://www.epic-ide.org/

# source tarball and the script used to generate it from upstream's source control
# script usage:
# $ sh get-epic.sh
Source0:   epic-%{version}.tar.gz
Source1:   get-epic.sh

# enable module starter and taint checking by default
Patch0:    %{name}-enable-module-starter.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:        noarch

BuildRequires:    java-devel
BuildRequires:    jpackage-utils
BuildRequires:    eclipse-pde >= 3.4
BuildRequires:    antlr
BuildRequires:    jdom
BuildRequires:    gnu-regexp
BuildRequires:    brazil
Requires:         java
Requires:         jpackage-utils
Requires:         eclipse-platform >= 3.4
Requires:         antlr
Requires:         jdom
Requires:         gnu-regexp
Requires:         brazil
Requires:         perl
Requires:         perl(PadWalker)
Requires:         perl(Module::Starter)
Requires:         perl(Test::Simple)
Requires:         perl(Perl::Tidy)

%description
EPIC is an open source Perl IDE based on the Eclipse platform. Features 
supported are syntax highlighting, on-the-fly syntax check, content assist, 
perldoc support, source formatter, templating support, a regular expression 
view and a Perl debugger.

%prep
%setup -q -n epic-%{version}

# apply patches
pushd org.epic.perleditor
%patch0 -p0
popd

# ditch bundled libs in favor of building against fedora packaged libs
rm org.epic.lib/lib/jdom-1.1.jar \
   org.epic.lib/lib/antlr-2.7.5.jar \
   org.epic.lib/lib/brazil_mini.jar \
   org.epic.lib/lib/gnu-regexp-1.1.4.jar
build-jar-repository -s -p org.epic.lib/lib jdom antlr gnu-regexp brazil

grep -lR jdom-1.1 *         | xargs sed --in-place "s/jdom-1.1/jdom/"
grep -lR antlr-2.7.5 *      | xargs sed --in-place "s/antlr-2.7.5/antlr/"
grep -lR gnu-regexp-1.1.4 * | xargs sed --in-place "s/gnu-regexp-1.1.4/gnu-regexp/"
grep -lR brazil_mini *      | xargs sed --in-place "s/brazil_mini/brazil/"

# put the source plugin together
for p in org.epic.perleditor \
         org.epic.regexp \
         org.epic.debug; do
  mkdir org.epic.source/src/$p
  pushd $p/src
  zip -r -q ../../org.epic.source/src/$p/src.zip *
  popd
done

# make sure upstream hasn't sneaked in any jars we don't know about
JARS=""
for j in `find -name "*.jar"`; do
  if [ ! -L $j ]; then
    JARS="$JARS $j"
  fi
done
if [ ! -z "$JARS" ]; then
   echo "These jars should be deleted and symlinked to system jars: $JARS"
   exit 1
fi

%build
# parse grammar for grammar parser
pushd org.epic.perleditor/src/org/epic/core/parser/
for g in `find . -name "*.g"`; do
  antlr $g
done
popd

# build the main feature
%{eclipse_base}/buildscripts/pdebuild -f org.epic.feature.main \
  -a "-DjavacTarget=1.4 -DjavacSource=1.4"

%install
rm -rf %{buildroot}
installDir=%{buildroot}%{_datadir}/eclipse/dropins/epic
install -d -m 755 $installDir
unzip -q -d $installDir build/rpmBuild/org.epic.feature.main.zip

# need to recreate the symlinks to libraries that were setup in "prep"
# because for some reason the ant copy task doesn't preserve them
pushd $installDir/eclipse/plugins/org.epic.lib_*/lib
rm *.jar
build-jar-repository -s -p . jdom antlr gnu-regexp brazil
popd

# ensure source packages are correctly verisoned
pushd $installDir/eclipse/plugins
for p in org.epic.perleditor \
         org.epic.regexp \
         org.epic.debug; do
  PVERSION=_`ls -1 | grep $p | sed -r 's/.*_(.*)\.jar$/\1/'`
  mv org.epic.source_%{version}/src/$p org.epic.source_%{version}/src/$p$PVERSION
done
popd

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc org.epic.feature.main/license.html
%{_datadir}/eclipse/dropins/epic

%changelog
* Tue Jun 02 2009 Mat Booth <fedora@matbooth.co.uk> 0.6.35-1
- Drop GCJ support.
- Require Perl::Tidy for code formatting.
- Update to version 0.6.35.
- Fixed Bug [ 2782469 ] Step Return very slow, ends up in overload.pm
- Fixed Bug [ 1874581 ] Outline view out of sync with comment typing/deletion

* Tue Mar 24 2009 Mat Booth <fedora@matbooth.co.uk> 0.6.33-1
- Rebuilt to omit p2 metadata.
- Updated to version 0.6.33.
- Fixed Bug [ 2609775 ] CGI debugging: Could not connect to debug port!
- Fixed Bug [ 2617018 ] Breakpoints view sorting
- Fixed Bug [ 2703403 ] Show options remain disabled in Variables view
- Fixed Bug [ 2680597 ] doesn't respect global Eclipse text editor background color
- Fixed Bug [ 2694463 ] Templates don't work anymore in 0.6.32
- Fixed Bug [ 2617016 ] Editor fails highlight. double-click.
- Fixed Bug [ 2612813 ] Editor fails highlight. Binary operators.
- Implemented Feature Request [ 2692844 ] Preference for fold column background color

* Mon Mar 16 2009 Mat Booth <fedora@matbooth.co.uk> 0.6.31-2
- Add missing dependency Test::Simple for Module::Starter integration.
- Enable Module::Starter and taint checking by default.

* Sun Mar 1 2009 Mat Booth <fedora@matbooth.co.uk> 0.6.31-1
- Updated to verion 0.6.31.
- Fixed Bug [ 2431258 ] Perl internal variables not appearing
- Fixed Bug [ 2241882 ] NPE in Perl Expression View
- Fixed Bug [ 2513003 ] epic_breakpoints raises exception in Template::Toolkit
- Fixed Bug [ 2501676 ] debugger crash
- Fixed Bug [ 2433437 ] Content-type does not enable to run/debug perl scripts
- Fixed Bug [ 2537700 ] Editor fails highlight. grep + regexp
- Fixed Bug [ 2502366 ] Content assist and typed lexicals
- Fixed Bug [ 2502358 ] Content assist and "use base"
- Applied Patch [ 2490403 ] cygwin drive prefix processing
- Implemented Feature Request [ 2431423 ] Show @_ in Variables view

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.27-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 15 2008 Mat Booth <fedora@matbooth.co.uk> 0.6.27-1
- Add Module::Starter dependency.
- Updated to verion 0.6.27.
- Fixed Bug [ 2188379 ] Global variables can not be displayed
- Fixed Bug [ 2059660 ] shift left works different than in other eclipse editors
- Implemented Feature Request [ 2204771 ] Enable variable substitution for Perl executable in prefs
- Implemented Feature Request [ 2197630 ] Display package-scope ('our') variables in debugger

* Thu Sep 04 2008 Mat Booth <fedora@matbooth.co.uk> 0.6.25-1
- Updated to version 0.6.25.
- Implemented Feature Request [ 2045172 ] Module::Starter integration
- Implemented Feature Request [ 2045001 ] Persistent Variables view options

* Wed Jul 30 2008 Andrew Overholt <overholt@redhat.com> 0.6.24-3
- Update for building with Eclipse SDK 3.4.

* Sat Jun 14 2008 Mat Booth <fedora@matbooth.co.uk> 0.6.24-2
- Fixed package ownership of feature directory.

* Sun Jun 01 2008 Mat Booth <fedora@matbooth.co.uk> 0.6.24-1
- Updated to version 0.6.24.
- Fixed Bug [ 1972281 ] URIs with PATH_INFO not recognized in CGI debug

* Mon May 05 2008 Mat Booth <fedora@matbooth.co.uk> 0.6.23-1
- Removed JDOM API patch that was moved upstream.
- Updated to version 0.6.23.

* Tue Apr 29 2008 Mat Booth <fedora@matbooth.co.uk> 0.6.22-4
- Added missing dependency.
- Build the source plugin properly to support the "import as projects with
  source folders" feature of Eclipse.

* Sat Apr 19 2008 Mat Booth <fedora@matbooth.co.uk> 0.6.22-3
- Use JPackage tools to create jar repositories.

* Sun Apr 13 2008 Mat Booth <fedora@matbooth.co.uk> 0.6.22-2
- Updated package for new Eclipse plugin guidelines.

* Sun Mar 30 2008 Mat Booth <fedora@matbooth.co.uk> 0.6.22-1
- Updated to version 0.6.22.

* Wed Feb 20 2008 Mat Booth <fedora@matbooth.co.uk> 0.6.20-1
- Updated to version 0.6.20.

* Wed Dec 24 2007 Mat Booth <fedora@matbooth.co.uk> 0.6.17-1
- Initial release.