Hello,
On Wed, 20 Dec 2017, Helmut Jarausch wrote:
>On 12/19/2017 07:13:55 PM, Bas Zoutendijk wrote:
>> On Tue 19 Dec 2017 at 16:45:15 +0100, Helmut Jarausch wrote:
>> > In addition. I keep gcc-6.4.0 since it can generate PIE-enabled
>> > executables AND it it the last compiler with 'gcj'.
>> >
>> > I don't understand why 'pdftk' and packages depending on that have been
>> > masked.
>> >
>> > They build and run fine here (profile 17.0)
>>
>> If I read the =app-text/pdftk-2.02 ebuild correctly, it actually uses
>> GCC 5.4.0, regardless of what your system compiler is (6.4.0 for
>> profile 17.0):
>>
>> # We need gcc-5 because of Java
>> export PATH="$(gcc-config -B 5.4.0):${PATH}"
>
>Yes, but you can change this to
>
>RDEPEND="sys-devel/gcc:6.4.0[gcj]"
>
>which works just fine.
But should suffice to be
DEPEND="sys-devel/gcc[gcj]"
RDEPEND="${DEPEND}"
i.e. DEPEND not RDEPEND. The 6.4.x part is implicit by 7.x lacking the
gcj USE-flag. OTOH, in my ebuild I explicitly depend on 6.4.0 (but
only because I gcc-config'ed to gcc-7.2), so... If you have 6.4.0
selected, that explicit dep could be killed. It's just a matter of
'gcj' and 'gcjh' being in the path and found (and a matching gcc too).
And BTW, you can't change to java/icedtea, I've looked at the code,
it'd be a major rewrite, pdftk uses lots of gcj specific stuff.
I'll attach my whole diff to the original 2.02.ebuild.
HTH,
-dnh
--
"Here, in the bare dark face of night / A calm unhurried eye draws sight
-- We see in what we think we fear / The cloudings of our thought made clear"
"A most interesting contribution, we're sure, but can we keep this just a
little more focused?" -- GSV "Wisdom Like Silence" to LSV "Serious Callers Only"
--- /usr/portage/app-text/pdftk/pdftk-2.02.ebuild 2017-12-16 02:20:47.000000000 +0100
+++ pdftk-2.02.ebuild 2017-12-20 23:20:27.139925178 +0100
@@ -13,24 +13,31 @@
SLOT="0"
KEYWORDS="amd64 ~arm ppc x86 ~amd64-linux"
-RDEPEND="sys-devel/gcc:5.4.0[gcj]"
-DEPEND="${RDEPEND}
- sys-devel/gcc-config
-"
+DEPEND="sys-devel/gcc:6.4.0[gcj]"
+RDEPEND="${DEPEND}"
S="${WORKDIR}/${P}-dist/${PN}"
src_prepare() {
epatch "${FILESDIR}"/${P}-flags.patch
+
+ export PATH="$(gcc-config -B 6.4.0):${PATH}"
+ host=$(gcj -dumpmachine)
+ gcj_ver=$(gcj -dumpversion)
+ gcc_ver=$(gcc -dumpversion)
+ sed -i.orig \
+ -e "/CPP\|CXX/s@\$(VERSUFF)@-${gcc_ver}@" \
+ -e "/GCJ\|GCJH/s@\$(VERSUFF)@-${gcj_ver}@" \
+ -e "/LIBGCJ=/s@.*@export LIBGCJ=/usr/share/gcc-data/${host}/${gcc_ver}/java/libgcj-${gcj_ver}.jar@" \
+ -e '/GJAR=/s/$(VERSUFF)//' \
+ Makefile.Debian
}
src_compile() {
# Settings by java-config break compilation by gcj.
unset CLASSPATH
unset JAVA_HOME
-
- # We need gcc-5 because of Java
- export PATH="$(gcc-config -B 5.4.0):${PATH}"
+ export GCJFLAGS="${GCJFLAGS} -Wno-deprecated"
# Parallel make fails; confirmed, still not fixed in version 2.02.
emake -j1 -f "${S}"/Makefile.Debian || die "Compilation failed."