On 170418-09:17+0000, J. Roeleveld wrote:
> On April 18, 2017 11:06:12 AM GMT+02:00, Peter Humphrey 
> <pe...@prh.myzen.co.uk> wrote:
> >On Monday 17 Apr 2017 13:05:59 Walter Dnes wrote:
> >>   A couple of things to note, which also apply to building Firefox
...
> >I don't see any of those USE flags. This is from the octopus overlay:
...
> >This is in spite of having "www-client/palemoon" (no qualifiers) in 
> >package.keywords, and having only version 4.9.4 p1.0 of GCC installed.
> >
> >Really, sometimes I doubt the evidence of my own eyes.  :-(
> 
> If you are certain you don't have gcc in slot 5.x installed. You can
> add palemoon to /etc/portage/package.unmask

"If" is what I would start with. Because it's hard to believe. Possible,
but I'd be more believing if I saw 'emerge --info' and 'gcc-config -l'
of that machine in that time.

But I'll depart on a tangent. Actually on this gcc-tangent, so to speak.

Namely I keep updating my Palemoon, remaining on gcc-5, and have no
issues.

Here is my gcc-config listing:

 [1] arm-unknown-linux-gnueabi-5.4.0
 [2] arm-unknown-linux-gnueabi-5.4.0-hardenednopie
 [3] arm-unknown-linux-gnueabi-5.4.0-hardenednopiessp
 [4] arm-unknown-linux-gnueabi-5.4.0-hardenednossp
 [5] arm-unknown-linux-gnueabi-5.4.0-vanilla *

 [6] x86_64-pc-linux-gnu-4.9.4
 [7] x86_64-pc-linux-gnu-4.9.4-hardenednopie
 [8] x86_64-pc-linux-gnu-4.9.4-hardenednopiessp
 [9] x86_64-pc-linux-gnu-4.9.4-hardenednossp
 [10] x86_64-pc-linux-gnu-4.9.4-vanilla
 [11] x86_64-pc-linux-gnu-5.4.0 *
 [12] x86_64-pc-linux-gnu-5.4.0-hardenednopie
 [13] x86_64-pc-linux-gnu-5.4.0-hardenednopiessp
 [14] x86_64-pc-linux-gnu-5.4.0-hardenednossp
 [15] x86_64-pc-linux-gnu-5.4.0-vanilla

> That will override the package.mask from the overlay.
> 

I wouldn't even bet that would solve the issue (but that's just my bet,
I'm not very advanced to offer actual analysis, it's just my feeling...
However, I've spent many hours compiling Palemoon over the last three or
four months...).

I'd like to know if anybody runs Palemoon built with gcc-5, like I build
it? Because it's strange that I just don't have issues with it, and
normally Palemoon from:
https://github.com/deuiore/palemoon-overlay
won't even build with gcc-5...

I changed a few things, and generally, not much has changed from the
time I made this fork/branch:
https://github.com/miroR/palemoon-overlay/tree/develop
which constitutes the pull request in the main overlay:
https://github.com/deuiore/palemoon-overlay/pull/34

I have posted about it at:
Pale Moon Air-Gapped portage EAPI 6 Install WAS: [Logging] SSL with PM
https://lists.gt.net/gentoo/user/323422

and if there is any interest, I can try and find time to update that
pretty unprofessionally made fork of mine there...

The ebuild would need to be updated, e.g. my current version is:

Version: 27.3.0a1 (64-bit) (2017-04-18)

And it installs the same way in Air-Gapped in the fashion described in
that "Pale Moon Air-Gapped portage EAPI 6 Install" topic on this mailing
list, as it would from online git, except the Air-Gapped way is much
much safer, and...

And, for that installation of mine, this installation actually:

# emerge -pv palemoon

These are the packages that would be merged, in order:

Calculating dependencies      ... done!                           
[ebuild   R    ] www-client/palemoon-27.3.0-r3::miro  USE="alsa gtk2 
official-branding optimize -dbus -gtk3 -jemalloc -necko-wifi -pulseaudio 
-shared-js -system-libs -valgrind -webrtc" LINGUAS="-cs -de -es_AR -es_ES 
-es_MX -fr -hu -it -ja -ko -pl -ru -zh_CN" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
#

[for that installation], here's the ebuild, I'm attaching it:

palemoon-27.3.0-r3.ebuild

I can't remember with certainty, but I think that the "palemoon-1-r1" eclass 
that's necessary to
build with gcc-5 (that is, aside from the naming changes that are
necessary to do in the ebuild, which ebuild is otherwise a copy of deuoire's
ebuild --e.g. ffmpeg is now used for HTML5, not gstreamer, and other likely good
changes--... [aside from the naming changes], that eclass is what is
also necessary, to build with gcc-5.

It's just some commenting out in that eclass that's needed to get the
gcc-5 compilation.

And that palemoon-1-r1 eclass I think hasn't change, but I'd need to
look it up more closely (time... much time needed in these
affairs...)...

Of course, all that done in your custom overlay (earlier name was local
overlay).

But if anybody is interested, pls. have patience, I'm most usually a
slow worker...

-- 
Miroslav Rovis
Zagreb, Croatia
https://www.CroatiaFidelis.hr
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

REQUIRED_BUILDSPACE='7G'

# For mozlinguas:
MOZ_LANGS=( cs de es-AR es-ES es-MX fr hu it ja ko pl ru zh-CN )
MOZ_LANGPACK_PREFIX="langpacks/27.x/"
MOZ_FTP_URI="http://relmirror.palemoon.org";

inherit palemoon-1-r1 mozlinguas git-r3 eutils flag-o-matic pax-utils

KEYWORDS="~x86 ~amd64"
DESCRIPTION="Pale Moon Web Browser"
HOMEPAGE="https://www.palemoon.org/";

SLOT="0"
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
IUSE="+official-branding -system-libs +optimize shared-js jemalloc -valgrind
        dbus -necko-wifi +gtk2 -gtk3 -webrtc alsa pulseaudio"

EGIT_REPO_URI="http://localhost/cgi-bin/cgit.cgi/Pale-Moon.git";
GIT_TAG="${PV}a1"

DEPEND="
        >=sys-devel/autoconf-2.13:2.1
        dev-lang/python:2.7
        >=dev-lang/perl-5.6
        dev-lang/yasm"

RDEPEND="
        x11-libs/libXt
        app-arch/zip
        media-libs/freetype
        media-libs/fontconfig
        virtual/ffmpeg[x264]

        system-libs? (
                dev-libs/libevent
                sys-libs/zlib
                app-arch/bzip2
                media-libs/libwebp
                >=media-libs/libvpx-1.4.0
                >=app-text/hunspell-1.6.0
                >=dev-db/sqlite-3.13.0[secure-delete]
        )

        optimize? ( sys-libs/glibc )

        valgrind? ( dev-util/valgrind )

        shared-js? ( virtual/libffi )

        dbus? (
                >=sys-apps/dbus-0.60
                >=dev-libs/dbus-glib-0.60
        )

        gtk2? ( >=x11-libs/gtk+-2.18.0:2 )
        gtk3? ( >=x11-libs/gtk+-3.4.0:3 )

        alsa? ( media-libs/alsa-lib )
        pulseaudio? ( media-sound/pulseaudio )

        necko-wifi? ( net-wireless/wireless-tools )"

REQUIRED_USE="
        jemalloc? ( !valgrind )
        ^^ ( gtk2 gtk3 )
        ^^ ( alsa pulseaudio )
        necko-wifi? ( dbus )"

src_unpack() {
        git-r3_fetch ${EGIT_REPO_URI} refs/heads/master
        git-r3_checkout

        # Unpack language packs:
        cd "${WORKDIR}"
        mozlinguas_src_unpack
}

src_prepare() {
        # Ensure that our plugins dir is enabled by default:
        sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
                "${S}/xpcom/io/nsAppFileLocationProvider.cpp" \
                || die "sed failed to replace plugin path for 32bit!"
        sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
                "${S}/xpcom/io/nsAppFileLocationProvider.cpp" \
                || die "sed failed to replace plugin path for 64bit!"

        # Allow users to apply any additional patches without modifing the 
ebuild:
        eapply_user
}

src_configure() {
        # Basic configuration:
        mozconfig_init

        mozconfig_disable updater

        if use system-libs; then
                mozconfig_with system-libevent system-zlib system-bz2 \
                        system-webp system-libvpx
                mozconfig_enable system-hunspell system-sqlite
        fi

        if use optimize; then
                O=$(get-flag '-O*')
                mozconfig_enable optimize=\"$O\"
                filter-flags '-O*'
        else
                mozconfig_disable optimize
        fi

        if use shared-js; then
                mozconfig_enable shared-js
        fi

        if use jemalloc; then
                mozconfig_enable jemalloc jemalloc-lib
        fi

        if use valgrind; then
                mozconfig_enable valgrind
        else
                mozconfig_disable valgrind
        fi

        if ! use dbus; then
                mozconfig_disable dbus
        fi

        if ! use necko-wifi; then
                mozconfig_disable necko-wifi
        fi

        if use webrtc; then
                mozconfig_enable webrtc
        else
                mozconfig_disable webrtc
        fi

        if   use alsa; then
                mozconfig_enable alsa
        fi

        if ! use pulseaudio; then
                mozconfig_disable pulseaudio
        fi

        if use official-branding; then
                official-branding_warning
                mozconfig_enable official-branding
        fi

        if use gtk2; then
                mozconfig_enable default-toolkit=\"cairo-gtk2\"
        fi

        if use gtk3; then
                mozconfig_enable default-toolkit=\"cairo-gtk3\"
        fi

        # Mainly to prevent system's NSS/NSPR from taking precedence over
        # the built-in ones:
        append-ldflags -Wl,-rpath="$EPREFIX/usr/$(get_libdir)/palemoon"

        export MOZBUILD_STATE_PATH="${WORKDIR}/mach_state"
        mozconfig_var PYTHON $(which python2)
        mozconfig_var AUTOCONF $(which autoconf-2.13)
        mozconfig_var MOZ_MAKE_FLAGS "${MAKEOPTS}"
        # Disable mach notifications, which also cause sandbox access 
violations:
        export MOZ_NOSPAM=1

        python2 mach # Run it once to create the state directory.
        python2 mach configure || die
}

src_compile() {
        python2 mach build || die
}

src_install() {
        # obj_dir changes depending on arch, compiler, etc:
        local obj_dir="$(echo */config.log)"
        obj_dir="${obj_dir%/*}"

        # Disable MPROTECT for startup cache creation:
        pax-mark m "${obj_dir}"/dist/bin/xpcshell

        load_default_prefs
        set_pref "spellchecker.dictionary_path" "${EPREFIX}/usr/share/myspell"

        # Gotta create the package, unpack it and manually install the files
        # from there not to miss anything (e.g. the statusbar extension):
        einfo "Creating the package..."
        python2 mach package || die
        local extracted_dir="${T}/package"
        mkdir -p "${extracted_dir}"
        cd "${extracted_dir}"
        einfo "Extracting the package..."
        tar xjpf 
"${S}/${obj_dir}/dist/${P}a1.linux-${CTARGET_default%%-*}.tar.bz2"
        einfo "Installing the package..."
        local dest_libdir="/usr/$(get_libdir)"
        mkdir -p "${D}/${dest_libdir}"
        cp -rL "${PN}" "${D}/${dest_libdir}"
        dosym "${dest_libdir}/${PN}/${PN}" "/usr/bin/${PN}"
        einfo "Done installing the package."

        # Until JIT-less builds are supported,
        # also disable MPROTECT on the main executable:
        pax-mark m 
"${D}/${dest_libdir}/${PN}/"{palemoon,palemoon-bin,plugin-container}

        # Install language packs:
        MOZILLA_FIVE_HOME="${dest_libdir}/${PN}/browser"
        mozlinguas_src_install

        # Install icons and .desktop for menu entry:
        cp -rL "${S}/${obj_dir}/dist/branding" "${extracted_dir}/"
        local size sizes icon_path icon name
        sizes="16 32 48"
        icon_path="${extracted_dir}/branding"
        icon="${PN}"
        name="Pale Moon"
        for size in ${sizes}; do
                insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
                newins "${icon_path}/default${size}.png" "${icon}.png"
        done
        # The 128x128 icon has a different name:
        insinto "/usr/share/icons/hicolor/128x128/apps"
        newins "${icon_path}/mozicon128.png" "${icon}.png"
        # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs:
        newicon "${icon_path}/default48.png" "${icon}.png"
        newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop"
        sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
                "${ED}/usr/share/applications/${PN}.desktop" || die
}

Attachment: signature.asc
Description: Digital signature

Reply via email to