Ticket #712: parrot_rakudo_rpm_fixes.patch

File parrot_rakudo_rpm_fixes.patch, 5.4 KB (added by wayland, 6 years ago)

Parrot fixes for Rakudo RPM

  • lib/Parrot/Configure/Compiler.pm

     
    696696} 
    697697 
    698698sub append_configure_log { 
    699     my $conf = shift; 
    700     my $target = shift; 
     699    my($conf, $target, $group, $other) = @_; 
     700 
    701701    if ( $conf->{active_configuration} ) { 
     702        defined($group) or $group = ''; 
     703        defined($other) or $other = ''; 
    702704        my $generated_log = 'MANIFEST.configure.generated'; 
    703705        open my $GEN, '>>', $generated_log 
    704706            or die "Can't open $generated_log for appending: $!"; 
    705         print $GEN "$target\n"; 
     707        print $GEN "$target          [$group]$other\n"; 
    706708        close $GEN or die "Can't close $generated_log after appending: $!"; 
    707709    } 
    708710} 
  • ports/fedora/parrot.spec.fedora

     
    11Name:           parrot 
    2 Version:        1.0.0 
     2Version:        1.2.0 
    33Release:        6%{?dist} 
    44Summary:        Parrot is a virtual machine 
    55License:        Artistic 2.0 
     
    1212# Symlink:  libparrot.so ->  libparrot.so.%{version} 
    1313# See for upstream: https://trac.parrot.org/parrot/ticket/509 
    1414# Extended for the package to have no subdirectory under pkgconfig 
    15 Patch0:         parrot-install_files.patch 
    16 Patch1:         parrot-1.0.0-rpath-removal.patch 
     15#Patch0:         parrot-install_files.patch 
     16#Patch1:         parrot-1.0.0-rpath-removal.patch 
    1717 
    1818BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
    1919BuildRequires:  readline-devel 
     
    6868 
    6969%prep 
    7070%setup -q 
    71 %patch0 -p0 
    72 %patch1 -b .rpatch 
     71#%patch0 -p0 
     72#%patch1 -b .rpatch 
    7373 
    7474%{__perl} -pi -e 's,"lib/,"%{_lib}/, if (/CONST_STRING\(interp,/)' \ 
    7575    src/library.c 
     
    129129# install-dev: Same as 'install' taget but also install support for development. 
    130130make install-dev DESTDIR=$RPM_BUILD_ROOT 
    131131 
    132 %define RPM_PAR_LIB_DIR $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}/ 
     132%define versiondir %{version}-devel 
     133%define RPM_PAR_LIB_DIR $RPM_BUILD_ROOT%{_libdir}/%{name}/%{versiondir}/ 
    133134 
    134135 
    135136# Drop the docs so rpm can pick them up itself. 
     
    159160    -exec chmod 755 {} \; 
    160161# This module is only needed for building and should not be installed (I think) 
    161162# module "Parrot::OpLib::core" 
    162 rm -rf %{RPM_PAR_LIB_DIR}tools/lib/Parrot/OpLib 
     163# Wrong, needed for Rakudo 
     164#rm -rf %{RPM_PAR_LIB_DIR}tools/lib/Parrot/OpLib 
    163165 
    164166# Remove doc-files with zero-length 
    165167find docs/html -type f -size 0 -exec rm -f {} \; 
     
    189191 
    190192find examples/languages -type f -name harness \ 
    191193    -exec %{__sed} -i -e '1 s&#! perl&#!/usr/bin/perl&' {} \; 
    192 for file in docs/book/ch09_pct.pod docs/memory_internals.pod; do 
    193         %{__mv} $file timestamp 
    194         iconv -f ISO-8859-1 -t UTF-8 -o $file timestamp 
    195         touch -r timestamp $file 
    196 done 
     194#for file in docs/book/ch09_pct.pod docs/memory_internals.pod; do 
     195#        %{__mv} $file timestamp 
     196#        iconv -f ISO-8859-1 -t UTF-8 -o $file timestamp 
     197#        touch -r timestamp $file 
     198#done 
    197199%{__rm} -f timestamp 
    198200 
    199201# These files *probably* aren't needed. 
    200202rm -rf $RPM_BUILD_ROOT%{_usr}/config \ 
    201     $RPM_BUILD_ROOT%{_includedir}/src \ 
    202     $RPM_BUILD_ROOT%{_usr}/src  
     203    $RPM_BUILD_ROOT%{_includedir}/src 
     204# Don't add the directory listed below, as it's needed by Rakudo (default.pmc) 
     205#    $RPM_BUILD_ROOT%{_usr}/src  
    203206 
     207 
    204208%check 
    205209export LD_LIBRARY_PATH=$( pwd )/blib/lib 
    206210make test 
     
    222226%exclude %{_bindir}/pbc_* 
    223227%{_bindir}/* 
    224228%{_libdir}/parrot/ 
    225 %exclude %{_libdir}/parrot/%{version}/tools 
    226 %exclude %{_libdir}/parrot/%{version}/VERSION 
     229%exclude %{_libdir}/parrot/%{versiondir}/tools 
     230%exclude %{_libdir}/parrot/%{versiondir}/VERSION 
    227231%{_libdir}/libparrot.so.* 
    228232 
    229233%files docs 
     
    243247%{_libdir}/libparrot.so 
    244248%{_libdir}/libparrot.a 
    245249%{_libdir}/pkgconfig/* 
     250%{_usrsrc}/%{name}/%{versiondir}/ 
    246251 
    247252%files tools 
    248253%defattr(-,root,root,-) 
    249254# Files for building languages 
    250 %{_libdir}/parrot/%{version}/tools/* 
    251 %{_libdir}/parrot/%{version}/VERSION 
     255%{_libdir}/parrot/%{versiondir}/tools/* 
     256%{_libdir}/parrot/%{versiondir}/tools/dev 
     257%{_libdir}/parrot/%{versiondir}/VERSION 
    252258 
    253259 
    254260 
  • config/gen/parrot_include.pm

     
    203203                else { 
    204204                    $gen = join "\n", &const_to_parrot(@defs); 
    205205                } 
    206                 $conf->append_configure_log(qq{$self->{destdir}/$target}); 
     206                $conf->append_configure_log( 
     207                    qq{$self->{destdir}/$target}, 
     208                    ($self->{destdir} =~ m#runtime/parrot/include# ? 'main' : '') 
     209                ); 
    207210                my $target_tmp = "$target.tmp"; 
    208211                open my $out, '>', $target_tmp or die "Can't open $target_tmp: $!\n"; 
    209212 
  • config/gen/makefiles/root.in

     
    21742174    --destdir=$(DESTDIR) \ 
    21752175    --docdir=$(DOC_DIR) \ 
    21762176    --versiondir=$(VERSION_DIR) \ 
    2177     MANIFEST MANIFEST.generated 
     2177    MANIFEST MANIFEST.generated MANIFEST.configure.generated 
    21782178 
    21792179install-dev: install 
    21802180        $(PERL) tools/dev/install_dev_files.pl \