[eclipse-photran] Split back off from eclipse-ptp

Orion Poplawski orion at fedoraproject.org
Tue Apr 23 18:44:59 UTC 2013


commit f1ccd31db0d1e08907c046796b0c0917c50296ad
Author: Orion Poplawski <orion at nwra.com>
Date:   Tue Apr 23 12:44:57 2013 -0600

    Split back off from eclipse-ptp

 .gitignore           |    1 +
 eclipse-photran.spec |  205 ++++++++++++++++++++++----------------------------
 makesource.sh        |   14 +++-
 sources              |    2 +-
 4 files changed, 101 insertions(+), 121 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 66cd258..63080bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 photran-v200910081739.tar.gz
+/org.eclipse.photran-74923924e5df7031ca51b6de85a64ea7d96a5c70.tar.gz
diff --git a/eclipse-photran.spec b/eclipse-photran.spec
index b662e79..d19eae8 100644
--- a/eclipse-photran.spec
+++ b/eclipse-photran.spec
@@ -1,153 +1,126 @@
-%define major                   5
-%define minor                   0       
-%define patch                   0       
-%define majmin                  %{major}.%{minor}
-%define eclipse_base            %{_datadir}/eclipse
+%global eclipse_base            %{_datadir}/eclipse
+%global cdtreq                  1:8.1.0
+%global photran_build_id        20130409
+#global photran_git_tag         PTP_6_0_2
+%global photran_git_tag         74923924e5df7031ca51b6de85a64ea7d96a5c70
 
+Summary:        Fortran Development Tools (Photran) for Eclipse
 Name:           eclipse-photran
-Version:        %{majmin}.%{patch}
-Release:        0.4.200910081739%{?dist}
-Summary:        Eclipse Fortran Development Tools (Photran) plugin
-
-Group:          Development/Tools
+# Be sure to update photran version if needed
+Version:        8.1.0
+Release:        0.1.20130409git%{?dist}
 License:        EPL
-URL:            http://www.eclipse.org/photran
-# The following tarball was generated by the makesource.sh script
-Source0:        photran-v200910081739.tar.gz
-Source1:        makesource.sh
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
-BuildArch:      noarch
-ExcludeArch:    ppc64
-
-BuildRequires: eclipse-pde >= 1:3.5
-BuildRequires: eclipse-cdt >= 1:6.0
-BuildRequires: eclipse-rse >= 3.1
-BuildRequires: java-devel >= 1.4.2
+Group:          Development/Tools
+URL:            http://www.eclipse.org/ptp
 
-Requires:      eclipse-cdt >= 1:6.0
-Requires:      eclipse-rse >= 3.1
-Requires:      gdb make gcc-gfortran
+# The following tarballs were downloaded from the git repositories
+Source0:        http://git.eclipse.org/c/ptp/org.eclipse.photran.git/snapshot/org.eclipse.photran-%{photran_git_tag}.tar.gz
+# These are made with makesource.sh
+#Source0:        org.eclipse.photran-%{photran_git_tag}.tar.xz
+Source1:        makesource.sh
 
+BuildRequires:  java-devel
+BuildRequires:  maven-local
+BuildRequires:  tycho
+BuildRequires:  eclipse-cdt >= %{cdtreq}
+BuildArch:      noarch
+Requires:       eclipse-cdt >= %{cdtreq}
 
 %description
-The eclipse-photran package contains the Photran Eclipse feature and plugins
-that are useful for Fortran development.
+An Eclipse-based Integrated Development Environment for Fortran.
 
 
-%package        intel
+%package intel
 Summary:        Intel Fortran compiler support for Photran
 Group:          Development/Libraries
-Requires:       %{name} = %{version}-%{release}
+Requires:       eclipse-photran = %{version}-%{release}
 
-%description    intel
-%{summary}.
+%description intel
+This feature packages the plugins required to support
+the Intel Fortran compiler in Photran/FDT.
 
 
-%package        xlf
-Summary:        IBM XL Fortran compiler support for Photran
+%package xlf
+Summary:        IBM XLF Compiler Support
 Group:          Development/Libraries
-Requires:       %{name} = %{version}-%{release}
+Requires:       eclipse-photran = %{version}-%{release}
 
-%description    xlf
-%{summary}.
+%description xlf
+Error parser and managed build tool chain for the IBM XLF compiler.
 
 
 %prep
-%setup -q -n photran-v200910081739
-# Fixup to use 1.5 source level
-find -name \*.prefs | xargs sed -i -e 's/source=1.3/source=1.5/'
-# This prevents the intel feature from building
+%setup -q -n org.eclipse.photran-%{photran_git_tag}
+# Fix tycho version
+tychover=$(sed -ne '/<version>/{s/.*>\(.*\)<.*/\1/;p;q}' < /usr/share/maven-fragments/tycho)
+sed -i -e "/tycho-version/s/>.*</>${tychover}</" pom.xml
+
+# We need to rebuild this jar from the sources within it
+pwd
+mkdir cdtdb-4.0.3-eclipse
+pushd cdtdb-4.0.3-eclipse
+unzip -q ../org.eclipse.rephraserengine.core/cdtdb-4.0.3-eclipse.jar
+find -name \*.class -exec rm {} +
+popd
+# Delete any other jars in the project
+find -name \*.jar -exec rm {} +
+# This prevents the Photran Intel feature from building
 sed -i -e 's/os="linux"//' org.eclipse.photran.intel-feature/feature.xml
+#Fix line endings, causes problems with pdebuild link names
+#find -name MANIFEST.MF -exec sed -i -e 's|\r||' {} +
 
 
 %build
 export JAVA_HOME=%{java_home}
-export PATH=%{java_bin}:/usr/bin:$PATH
-for feature in org.eclipse.photran org.eclipse.photran.intel org.eclipse.photran.xlf
-do
-  %{_libdir}/eclipse/buildscripts/pdebuild -d "cdt rse" \
-    -f $feature -a "-DjavacSource=1.5 -DjavacTarget=1.5" 2>&1 | tee ${feature}.log
-done
+export PATH=/usr/bin:$PATH
+# Build the helper jar first
+pushd cdtdb-4.0.3-eclipse
+classpath=$(echo /usr/lib*/eclipse/plugins/org.eclipse.equinox.common_*.jar | sed -e 's/ /:/g')
+find -name \*java -exec javac -classpath $classpath '{}' +
+jar cf ../org.eclipse.rephraserengine.core/cdtdb-4.0.3-eclipse.jar *
+popd
+#Interferes with feature build
+rm -rf cdtdb-4.0.3-eclipse
+# Build the projects
+mvn-rpmbuild -Dmaven.repo.local=../.m2 -DforceContextQualifier=%{photran_build_id} install
 
 
 %install
-rm -rf ${RPM_BUILD_ROOT}
-for feature in org.eclipse.photran org.eclipse.photran.intel org.eclipse.photran.xlf
+mkdir -p %{buildroot}%{eclipse_base}/dropins/photran/eclipse/{features,plugins}
+
+# Features
+for jar in org.eclipse.photran.repo/target/repository/features/*.jar
 do
-  install -d -m755 ${RPM_BUILD_ROOT}%{eclipse_base}/dropins/${feature}
-  
-  unzip -o -d ${RPM_BUILD_ROOT}%{eclipse_base}/dropins/${feature} \
-              build/rpmBuild/${feature}.zip
-  mv ${RPM_BUILD_ROOT}%{eclipse_base}/dropins/${feature}/eclipse/* \
-     ${RPM_BUILD_ROOT}%{eclipse_base}/dropins/${feature}
-  rmdir ${RPM_BUILD_ROOT}%{eclipse_base}/dropins/${feature}/eclipse
+  name=$(basename $jar .jar)
+  unzip -u -d %{buildroot}%{eclipse_base}/dropins/photran/eclipse/features/$name $jar
+  sed -ne '/id=/s#.*"\(.*\)"#%{eclipse_base}/dropins/photran/eclipse/plugins/\1_*.jar#gp' %{buildroot}%{eclipse_base}/dropins/photran/eclipse/features/$name/feature.xml | tail -n +2 > files.$name
 done
+# Plugins
+cp -u org.eclipse.photran.repo/target/repository/plugins/*.jar \
+   %{buildroot}%{eclipse_base}/dropins/photran/eclipse/plugins/
 
+# special case for rephraserengine feature
+sed -i -e '/org.eclipse.rephraserengine_/d' files.org.eclipse.photran_%{version}.%{photran_build_id}
 
-%clean 
-rm -rf ${RPM_BUILD_ROOT}
 
-
-%files
-%defattr(-,root,root,-)
+%files -f files.org.eclipse.photran_%{version}.%{photran_build_id} -f files.org.eclipse.rephraserengine_%{version}.%{photran_build_id}
 %doc org.eclipse.photran-feature/epl-v10.html
-%{eclipse_base}/dropins/org.eclipse.photran
-
-%files intel
-%defattr(-,root,root,-)
-%{eclipse_base}/dropins/org.eclipse.photran.intel
+%dir %{eclipse_base}/dropins/photran
+%dir %{eclipse_base}/dropins/photran/eclipse
+%dir %{eclipse_base}/dropins/photran/eclipse/features
+%dir %{eclipse_base}/dropins/photran/eclipse/plugins
+%{eclipse_base}/dropins/photran/eclipse/features/org.eclipse.photran_*
+%{eclipse_base}/dropins/photran/eclipse/features/org.eclipse.rephraserengine_*
+
+%files intel -f files.org.eclipse.photran.intel_%{version}.%{photran_build_id}
+%doc org.eclipse.photran-feature/epl-v10.html
+%{eclipse_base}/dropins/photran/eclipse/features/org.eclipse.photran.intel_*
 
-%files xlf
-%defattr(-,root,root,-)
-%{eclipse_base}/dropins/org.eclipse.photran.xlf
+%files xlf -f files.org.eclipse.photran.xlf_%{version}.%{photran_build_id}
+%doc org.eclipse.photran-feature/epl-v10.html
+%{eclipse_base}/dropins/photran/eclipse/features/org.eclipse.photran.xlf_*
 
 
 %changelog
-* Wed Nov 4 2009 Orion Poplawski <orion at cora.nwra.com> - 5.0.0-0.4.200910081739
-- Exclude ppc64
-
-* Tue Nov 3 2009 Orion Poplawski <orion at cora.nwra.com> - 5.0.0-0.3.200910081739
-- Make noarch
-
-* Fri Oct 30 2009 Orion Poplawski <orion at cora.nwra.com> - 5.0.0-0.2.200910081739
-- Cleanup spec headers
-- Drop gcj support
-- Add needed Requires
-
-* Wed Oct 14 2009 Orion Poplawski <orion at cora.nwra.com> - 5.0.0-0.1.200910081739
-- Update to 5.0.0 pre-release 200910081739
-- Drop outline patch fixed upstream
-
-* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.0.0-0.7.b5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
-
-* Tue Apr 7 2009 Orion Poplawski <orion at cora.nwra.com> - 4.0.0-0.6.b5
-- Add patch from discussion list to fix outline view
-
-* Mon Mar 23 2009 Alexander Kurtakov <akurtako at redhat.com> 4.0.0-0.5.b5
-- Rebuild to not ship p2 content.xml.
-
-* Mon Feb 23 2009 Orion Poplawski <orion at cora.nwra.com> - 4.0.0-0.4.b5
-- Update to 4.0.0 Beta 5
-- Fix release tag
-- Add Intel compiler support package
-
-* Fri Sep 5 2008 Orion Poplawski <orion at cora.nwra.com> - 4.0.0-0.b4.3
-- Fix xlf Requires
-
-* Wed Sep 3 2008 Orion Poplawski <orion at cora.nwra.com> - 4.0.0-0.b4.2
-- Split out IBM XL Fortran support into sub-package
-
-* Thu Aug 28 2008 Orion Poplawski <orion at cora.nwra.com> - 4.0.0-0.b4.1
-- 4.0.0 Beta 4
-- Update for building against Eclipse SDK 3.4
-- Move everything to %%{_libdir}
-
-* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 4.0-1.b3.1
-- Autorebuild for GCC 4.3
-
-* Thu Dec 20 2007 - Orion Poplawski <orion at cora.nwr.com> - 4.0-0.b3.1
-- One line post/postun script form
-
-* Mon Nov 12 2007 - Orion Poplawski <orion at cora.nwr.com> - 4.0-0.b3
-- Initial package
+* Wed Apr 10 2013 Orion Poplawski <orion at cora.nwra.com> - 8.1.0-0.1.20130409git
+- Split photran out of eclipse-ptp package
diff --git a/makesource.sh b/makesource.sh
index 86422b5..8233fd6 100755
--- a/makesource.sh
+++ b/makesource.sh
@@ -1,6 +1,12 @@
 #!/bin/sh
+# Build the photran source tarball.
+#
+# Get some variables from the specfile
+eval `awk '$1 == "%global" { print $2 "=" $3 }' eclipse-photran.spec`
 
-rel=v200910081739
-rm -rf photran-$rel
-cvs -d :pserver:anonymous at dev.eclipse.org:/cvsroot/tools -z3 export -r $rel -d photran-$rel org.eclipse.ptp/photran
-tar czf photran-$rel.tar.gz photran-$rel
+# Checkout and create photran tarball
+[ ! -d org.eclipse.photran ] && git clone git://git.eclipse.org/gitroot/ptp/org.eclipse.photran.git
+pushd org.eclipse.photran
+git pull
+git archive --prefix org.eclipse.photran-$photran_git_tag/ $photran_git_tag | xz -c > ../org.eclipse.photran-${photran_git_tag}.tar.xz
+popd
diff --git a/sources b/sources
index 9df8a77..d5b62a9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7dd0e71953daaaa6fddccb68d15f2504  photran-v200910081739.tar.gz
+e76e2c8243726cb01034fc13af28e1fa  org.eclipse.photran-74923924e5df7031ca51b6de85a64ea7d96a5c70.tar.gz


More information about the scm-commits mailing list