-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev-lang/fpc: added new revision which is usable under prefix #5495
Conversation
Pull Request assignment Areas affected: ebuilds dev-lang/fpc: @Amynka |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your fix of free pascal for Prefix. Your changes are feasible, though they could be simplified.
dev-lang/fpc/fpc-3.0.2-r1.ebuild
Outdated
sed -i "s|if CfgFileExists('/etc/'+fn) then|if CfgFileExists('${EPREFIX}/etc/'+fn) then|g" "${WORKDIR}"/fpcbuild-${PV}/fpcsrc/compiler/options.pas || die | ||
sed -i "s|foundfn:='/etc/'+fn|foundfn:='${EPREFIX}/etc/'+fn|g" "${WORKDIR}"/fpcbuild-${PV}/fpcsrc/compiler/options.pas || die | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simplified by hprefixify from prefix.eclass, to hprefixify "${WORKDIR}"/fpcbuild-${PV}/fpcsrc/compiler/options.pas
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sadly, that doesn't perform the required edit:
ag "if CfgFileExists" "${WORKDIR}"/fpcbuild-${PV}/fpcsrc/compiler/options.pas -A 10
# make the compiled binary check for fpc.cfg under the prefixed /etc/ path
hprefixify "${WORKDIR}"/fpcbuild-${PV}/fpcsrc/compiler/options.pas
ag "if CfgFileExists" "${WORKDIR}"/fpcbuild-${PV}/fpcsrc/compiler/options.pas -A 10
gives me:
3119: if CfgFileExists(configpath+fn) then
3120- foundfn:=configpath+fn
3121- else
3122-{$ifdef WINDOWS}
3123- if (GetEnvironmentVariable('USERPROFILE')<>'') and CfgFileExists(FixPath(GetEnvironmentVariable('USE
RPROFILE'),false)+fn) then
3124- foundfn:=FixPath(GetEnvironmentVariable('USERPROFILE'),false)+fn
3131: if CfgFileExists(exepath+fn) then
3132- foundfn:=exepath+fn
3133- else
3134-{$else}
3135: if CfgFileExists('/etc/'+fn) then
3136- foundfn:='/etc/'+fn
3137- else
3138-{$endif}
3139- check_configfile:=false;
3140- end;
/home/hioanas/gentoo/var/tmp/portage/dev-lang/fpc-3.0.2-r1/temp/environment: line 850: hprefixify: command not f
ound
3119: if CfgFileExists(configpath+fn) then
3120- foundfn:=configpath+fn
3121- else
3122-{$ifdef WINDOWS}
3123- if (GetEnvironmentVariable('USERPROFILE')<>'') and CfgFileExists(FixPath(GetEnvironmentVariable('USE
RPROFILE'),false)+fn) then
3124- foundfn:=FixPath(GetEnvironmentVariable('USERPROFILE'),false)+fn
3131: if CfgFileExists(exepath+fn) then
3132- foundfn:=exepath+fn
3133- else
3134-{$else}
3135: if CfgFileExists('/etc/'+fn) then
3136- foundfn:='/etc/'+fn
3137- else
3138-{$endif}
3139- check_configfile:=false;
3140- end;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be fine with the sed solution you provided..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@heroxbd so we can leave it at that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3119: if CfgFileExists(configpath+fn) then
3120- foundfn:=configpath+fn
3121- else
3122-{$ifdef WINDOWS}
3123- if (GetEnvironmentVariable('USERPROFILE')<>'') and CfgFileExists(FixPath(GetEnvironmentVariable('USERPROFILE'),false)+fn) then
3124- foundfn:=FixPath(GetEnvironmentVariable('USERPROFILE'),false)+fn
3125- else
3126- if (GetEnvironmentVariable('ALLUSERSPROFILE')<>'') and CfgFileExists(FixPath(GetEnvironmentVariable('ALLUSERSPROFILE'),false)+fn) then
3127- foundfn:=FixPath(GetEnvironmentVariable('ALLUSERSPROFILE'),false)+fn
3128- else
3129-{$endif WINDOWS}
3131: if CfgFileExists(exepath+fn) then
3132- foundfn:=exepath+fn
3133- else
3134-{$else}
3135: if CfgFileExists('/etc/'+fn) then
3136- foundfn:='/etc/'+fn
3137- else
3138-{$endif}
3139- check_configfile:=false;
3140- end;
3141-end;
3142-
3143-
3144-procedure read_arguments(cmd:TCmdStr);
3145-var
* Adjusting to prefix /fefs/disk/usr100/gentoo
* options.pas ... [ ok ]
3119: if CfgFileExists(configpath+fn) then
3120- foundfn:=configpath+fn
3121- else
3122-{$ifdef WINDOWS}
3123- if (GetEnvironmentVariable('USERPROFILE')<>'') and CfgFileExists(FixPath(GetEnvironmentVariable('USERPROFILE'),false)+fn) then
3124- foundfn:=FixPath(GetEnvironmentVariable('USERPROFILE'),false)+fn
3125- else
3126- if (GetEnvironmentVariable('ALLUSERSPROFILE')<>'') and CfgFileExists(FixPath(GetEnvironmentVariable('ALLUSERSPROFILE'),false)+fn) then
3127- foundfn:=FixPath(GetEnvironmentVariable('ALLUSERSPROFILE'),false)+fn
3128- else
3129-{$endif WINDOWS}
3131: if CfgFileExists(exepath+fn) then
3132- foundfn:=exepath+fn
3133- else
3134-{$else}
3135: if CfgFileExists('/fefs/disk/usr100/gentoo/etc/'+fn) then
3136- foundfn:='/fefs/disk/usr100/gentoo/etc/'+fn
3137- else
3138-{$endif}
3139- check_configfile:=false;
3140- end;
3141-end;
3142-
3143-
3144-procedure read_arguments(cmd:TCmdStr);
3145-var
>>> Source prepared.
It works for me. Are you testing it on Prefix? Is EPREFIX defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, looking closer to your code snippet,
/home/hioanas/gentoo/var/tmp/portage/dev-lang/fpc-3.0.2-r1/temp/environment: line 850: hprefixify: command not found
you need to inherit prefix
at the top of the ebuild to call hprefixify
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@heroxbd whoops :)
Works now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets merge it then? Can I ? :) (works for me though I don't have prefix :) )
dev-lang/fpc/fpc-3.0.2-r1.ebuild
Outdated
|
||
SLOT="0" | ||
LICENSE="GPL-2 LGPL-2.1-with-linking-exception" | ||
KEYWORDS="~amd64 ~arm ~ppc ~x86" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to add back ppc and arm keywords here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test it on ~arm and ~ppc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, and I have corrected the ebuild to exclude them. Still, I think it is very weird that repoman warned me about this - and specifically for this version and revision, not =fpc-3.0.0
, where they were historically dropped:
dev-lang/fpc: removed arm and ppc keywords
# Please enter the commit message for your changes.
# (Comment lines starting with '#' will not be included)
#
# KEYWORDS.dropped 1
# dev-lang/fpc/fpc-3.0.2-r1.ebuild: arm ppc
# upstream.workaround 40
# dev-lang/fpc/fpc-2.6.4.ebuild: Upstream parallel compilation bug (ebuild calls emake -j1 on line: 91)
# dev-lang/fpc/fpc-2.6.4.ebuild: Upstream parallel compilation bug (ebuild calls emake -j1 on line: 97)
# dev-lang/fpc/fpc-2.6.4.ebuild: Upstream parallel compilation bug (ebuild calls emake -j1 on line: 105)
# dev-lang/fpc/fpc-2.6.4.ebuild: Upstream parallel compilation bug (ebuild calls emake -j1 on line: 107)
# dev-lang/fpc/fpc-2.6.4.ebuild: Upstream parallel compilation bug (ebuild calls emake -j1 on line: 111)
# dev-lang/fpc/fpc-2.6.4.ebuild: Upstream parallel compilation bug (ebuild calls emake -j1 on line: 125)
# dev-lang/fpc/fpc-2.6.4.ebuild: Upstream parallel compilation bug (ebuild calls emake -j1 on line: 130)
# dev-lang/fpc/fpc-2.6.4.ebuild: Upstream parallel compilation bug (ebuild calls emake -j1 on line: 133)
# dev-lang/fpc/fpc-2.6.4.ebuild: Upstream parallel compilation bug (ebuild calls emake -j1 on line: 144)
# dev-lang/fpc/fpc-2.6.4.ebuild: Upstream parallel compilation bug (ebuild calls emake -j1 on line: 150)
# dev-lang/fpc/fpc-3.0.0.ebuild: Upstream parallel compilation bug (ebuild calls emake -j1 on line: 78)
# dev-lang/fpc/fpc-3.0.0.ebuild: Upstream parallel compilation bug (ebuild calls emake -j1 on line: 84)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not weird it is normal behaviour :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so it keeps on warning you forever if at any point in the package's history KEYWORDS were dropped? o.0
Package-Manager: Portage-2.3.8, Repoman-2.3.3
😞 The QA check for this pull request has found the following issues: Issues inherited from Gentoo (may be modified by PR): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Horea. Sure Amy, please go ahead.
Done thanks :) |
Package-Manager: Portage-2.3.8, Repoman-2.3.3
The current fpc package would not work properly on RAP/prefix systems, because:
fpc.cfg
file.fpc
binary hard-coded the compiler configfile path as/etc/fpc.cfg
.Here is an example of these two issues arising: