From 86797576cbe84840a90ff11634da56ec9040c142 Mon Sep 17 00:00:00 2001 From: Ben Konrath Date: Oct 20 2006 02:37:41 +0000 Subject: * Thu Oct 19 2006 Ben Konrath 3.1.1-3 - Remove work-around for gcc bug # 20198. - Do not include notice.html and epl-v10.html because these files are already included in the SDK. - Put JNI libraries in %{_libdir}/eclipse. - Only build the CDT SDK. - Fix build issue on non-x86 systems. - Resolves: #208622 --- diff --git a/.cvsignore b/.cvsignore index 4f2692e..17fa583 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,5 +1,2 @@ -eclipse-cdt-fetched-src-3.1.0.tar.bz2 -eclipse-cdt-autotools-0.0.3.tar.gz -eclipse-cdt-autotools-0.0.4.tar.gz eclipse-cdt-autotools-0.0.5.tar.gz eclipse-cdt-fetched-src-3.1.1.tar.bz2 diff --git a/eclipse-cdt.spec b/eclipse-cdt.spec index d6780f7..c088cd5 100644 --- a/eclipse-cdt.spec +++ b/eclipse-cdt.spec @@ -21,7 +21,7 @@ Epoch: 1 Summary: %{pkg_summary} Name: %{eclipse_name}-cdt Version: %{majmin}.%{micro} -Release: 2%{dist} +Release: 3%{dist} License: Eclipse Public License - v 1.0 (EPL) Group: Text Editors/Integrated Development Environments (IDE) URL: http://www.eclipse.org/cdt @@ -87,11 +87,14 @@ This is the SDK version of the eclipse-cdt package. %setup -q -c pushd "org.eclipse.cdt.releng" %patch1 -p0 +# Only build the sdk +offset=0; +for line in $(grep -no "value=.*platform" build.xml); do + linenum=$(echo "$line" | cut -d : -f 1) + sed --in-place -e "$(expr $linenum - 1 - $offset ),$(expr $linenum + 1 - $offset)d" build.xml + offset=$(expr $offset + 3) +done # Only build for the platform on which we're building -pushd platform -sed --in-place -e "74,82d" build.properties -sed --in-place -e "s:configs=\\\:configs=linux,gtk,%{eclipse_arch}:" build.properties -popd pushd sdk sed --in-place -e "74,82d" build.properties sed --in-place -e "s:configs=\\\:configs=linux,gtk,%{eclipse_arch}:" build.properties @@ -127,54 +130,25 @@ mkdir home homedir=$(cd home > /dev/null && pwd) -pushd `pwd` -cd org.eclipse.cdt.releng - -pushd results/plugins/org.eclipse.cdt.core.linux/library +pushd org.eclipse.cdt.releng/results/plugins/org.eclipse.cdt.core.linux/library make JAVA_HOME="%{java_home}" ARCH=%{eclipse_arch} CC='gcc -D_GNU_SOURCE' popd # Call eclipse headless to process CDT releng build scripts -# need -Dosgi.install.area for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198 +pushd org.eclipse.cdt.releng java -cp $SDK/startup.jar \ -Duser.home=$homedir \ - -Dosgi.install.area=%{eclipse_base} \ org.eclipse.core.launcher.Main \ -application org.eclipse.ant.core.antRunner \ -DjavacFailOnError=true \ -DdontUnzip=true \ -DbaseLocation=$SDK \ -Dpde.build.scripts=%{eclipse_base}/plugins/org.eclipse.pde.build/scripts \ - -DdontFetchAnything=true - -if ! [ -e $(pwd)/org.eclipse.cdt.releng/results/plugins/org.eclipse.cdt.core.linux.%{eclipse_arch}* ]; then - buildArch="x86" -else - buildArch=%{eclipse_arch} -fi + -DdontFetchAnything=true popd # Autotools has dependencies on CDT so we must add these to the SDK directory -for file in $(pwd)/org.eclipse.cdt.releng/results/I.*/*.tar.gz; do - case $file in - */org.eclipse.cdt-*-linux.$buildArch.*) - # The ".." is needed since the zip files contain "eclipse/foo". - (cd $SDK && tar --strip-components=1 -zxvf $file) - ;; - */org.eclipse.cdt.managedbuilder.*) - (cd $SDK && tar --strip-components=1 -zxvf $file) - ;; - */org.eclipse.cdt.make.*) - (cd $SDK && tar --strip-components=1 -zxvf $file) - ;; - */org.eclipse.cdt.core*) - (cd $SDK && tar --strip-components=1 -zxvf $file) - ;; - */org.eclipse.cdt.ui*) - (cd $SDK && tar --strip-components=1 -zxvf $file) - ;; - esac -done +tar -C $SDK --strip-components=1 -zxvf org.eclipse.cdt.releng/results/I.*/org.eclipse.cdt.sdk-*.tar.gz # Autotools build pushd autotools @@ -196,48 +170,28 @@ rm -rf ${RPM_BUILD_ROOT} install -d -m755 ${RPM_BUILD_ROOT}/%{eclipse_base} -if ! [ -e $(pwd)/org.eclipse.cdt.releng/results/plugins/org.eclipse.cdt.core.linux.%{eclipse_arch}* ]; then - buildArch="x86" -else - buildArch=%{eclipse_arch} -fi - -for file in $(pwd)/org.eclipse.cdt.releng/results/I.*/*.tar.gz; do - case $file in - */org.eclipse.cdt-*-linux.$buildArch.*) - # The ".." is needed since the zip files contain "eclipse/foo". - (cd $RPM_BUILD_ROOT/%{eclipse_base}/.. && tar zxvf $file) - ;; - */org.eclipse.cdt.sdk-*-linux.$buildArch.*) - # The ".." is needed since the zip files contain "eclipse/foo". - (cd $RPM_BUILD_ROOT/%{eclipse_base}/.. && tar zxvf $file) - ;; - esac -done +tar -C ${RPM_BUILD_ROOT}/%{eclipse_base} --strip-components=1 -zxvf \ + org.eclipse.cdt.releng/results/I.*/org.eclipse.cdt.sdk-*.tar.gz # We move the libraries to libdir, leaving symlinks behind. And since # zip doesn't preserve file permissions, we must also mark all the .so # files as executable. - -( -cd $RPM_BUILD_ROOT -find ./%{eclipse_base} -name '*.so' -print | -while read sofile; do - newname=$(echo "$sofile" | sed -e 's,^./%{eclipse_base},%{_libdir}/eclipse,') - echo $newname - mkdir -p ./$(dirname "$newname") - mv $sofile ./$newname - ln -s $newname $sofile +mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/eclipse +pushd ${RPM_BUILD_ROOT} +for sofile in $(find .%{eclipse_base} -name \*.so); do + mv $sofile .%{_libdir}/eclipse + chmod -R 755 .%{_libdir}/eclipse/$(basename $sofile) + ln -s %{_libdir}/eclipse/$(basename $sofile) $sofile done -) +popd # These are in the SDK packages -#rm $RPM_BUILD_ROOT/%{eclipse_base}/epl-v10.html -#rm $RPM_BUILD_ROOT/%{eclipse_base}/notice.html +rm ${RPM_BUILD_ROOT}%{eclipse_base}/epl-v10.html +rm ${RPM_BUILD_ROOT}%{eclipse_base}/notice.html # Autotools install pushd autotools -unzip -q -d $RPM_BUILD_ROOT%{eclipse_base}/.. build/rpmBuild/com.redhat.eclipse.cdt.autotools.feature.zip +unzip -qq -d $RPM_BUILD_ROOT%{eclipse_base}/.. build/rpmBuild/com.redhat.eclipse.cdt.autotools.feature.zip popd %if %{gcj_support} @@ -269,7 +223,7 @@ rm -rf ${RPM_BUILD_ROOT} %{eclipse_base}/plugins/org.eclipse.cdt.refactoring* %{eclipse_base}/plugins/org.eclipse.cdt.ui* %{eclipse_base}/plugins/com.redhat.eclipse.cdt* -%{_libdir}/eclipse/plugins/org.eclipse.cdt.core.linux* +%{_libdir}/eclipse/lib* %if %{gcj_support} %{_libdir}/gcj/%{name} %endif @@ -280,13 +234,20 @@ rm -rf ${RPM_BUILD_ROOT} %{eclipse_base}/features/org.eclipse.cdt.source* %{eclipse_base}/plugins/org.eclipse.cdt.source* %{eclipse_base}/plugins/org.eclipse.cdt.sdk* -%{eclipse_base}/epl-v10.html -%{eclipse_base}/notice.html %if %{gcj_support} %{_libdir}/gcj/%{name} %endif %changelog +* Thu Oct 19 2006 Ben Konrath 3.1.1-3 +- Remove work-around for gcc bug # 20198. +- Do not include notice.html and epl-v10.html because these files are already + included in the SDK. +- Put JNI libraries in %{_libdir}/eclipse. +- Only build the CDT SDK. +- Fix build issue on non-x86 systems. +- Resolves: #208622 + * Mon Oct 16 2006 Jeff Johnston 3.1.1-2 - Replace build patches with sed commands - Resolves: #208622