public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] netsurf.eclass proposal
@ 2013-06-19 12:09 Michael Weber
  2013-06-19 12:16 ` Michał Górny
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Weber @ 2013-06-19 12:09 UTC (permalink / raw
  To: gentoo development

[-- Attachment #1: Type: text/plain, Size: 2449 bytes --]

Hello,

I'd like to add a new eclass for www-client/netsurf related ebuilds and
seek your review and approval. I'll add it in two days, if unchallenged.

=== Motivation ===

The browser projects started out as a stray set of components [1], some
without releases.

In the meantime, all stuff is presented on one web-git [2] and
download page [3]. The browser components is available as bundled tar
[4] and solo [5].
[1] http://www.netsurf-browser.org/projects/
[2] http://git.netsurf-browser.org/
[3] http://download.netsurf-browser.org/libs/releases/
[4] http://download.netsurf-browser.org/netsurf/releases/source/
[5] http://download.netsurf-browser.org/netsurf/releases/source-full/

Handling this the "Gentoo way" I added all components as single
packages. All relying on the same - separate - buildsystem tarball.

The presented eclass is intended to master this buildsystem for
- binary components (www-client/netsurf, dev-libs/nsgenbind)
- shared and static library components
- multilib builds and rename non-DEFAULT_ABI $bins to $bin.${ABI}
- verbose building
- repecting FLAGS, warn about stray -O? and -g flags in components.
and reduce code duplication within the ebuilds.

=== Eclass consumers (flattened DEPENDS tree) ===

dev-libs/libwapcaplet-0.2.0
dev-libs/libparserutils-0.1.2
dev-libs/libcss-0.2.0
net-libs/libhubbub-0.2.0
net-libs/libdom-0.0.1
dev-libs/libnsfb-0.1.0
dev-libs/nsgenbind-0.0.1
media-libs/libnsbmp-0.1.0
media-libs/libnsgif-0.1.0
media-libs/librosprite-0.1.0
media-libs/libsvgtiny-0.1.0
www-client/netsurf-3.0

=== Implementation ===
see attachment

[future] add live git multiple repo fetch voodoo.

=== Concerns ===

This eclass relies on multilib-minimal and the "inherit" tree
netsurf -> multilib-minimal -> multilib-build -> multibuild might be a
little fragile.

Only 12 consuming packages. No other rdeps, yet, so the whole set could
have been done in one ebuild.

*My first eclass* so there might be issues with bash array quoting.
 Are the DEPEND and IUSE inside the eclass added to the ebuilds?
 It looks ok, but I'd better ask.

Any good way to disable the CFLAGS sanity check on

(dev-libs/nsgenbind should be relocated to dev-utils)

( www-client/netsurf[abi_x86_32] on amd64 misses working curl version. )

=== TL;DR ===

see attachment for the real thing.

Constructive feedback is very welcome.

Thanks
-- 
Michael Weber
Gentoo Developer
web: https://xmw.de/
mailto: Michael Weber <xmw@gentoo.org>

[-- Attachment #2: netsurf.eclass-with-ebuilds.txt --]
[-- Type: text/plain, Size: 17822 bytes --]

=== eclass/netsurf.eclass ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

# @ECLASS: netsurf.eclass
# @MAINTAINER:
# Michael Weber <xmw@gentoo.org>
# @BLURB: Handle buildsystem of www.netsurf-browser.org components
# @DESCRIPTION:
# Handle unpacking and usage of separate buildsystem tarball and manage
# multilib build, static-libs generation and debug building.
#
# Supports PATCHES and DOCS as in base.eclass

case ${EAPI:-0} in
	0|1|2|3|4) die "this eclass doesn't support EAPI<5" ;;
	*) ;;
esac

inherit base toolchain-funcs multilib-minimal

EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install

LICENSE="MIT-with-advertising"

# @ECLASS-VARIABLE: NETSURF_BUILDSYSTEM
# @DESCRIPTION:
# Select version of buildsystem tarball to be used along the component
# defaults to buildsystem-1.0
NETSURF_BUILDSYSTEM="${NETSURF_BUILDSYSTEM:-buildsystem-1.0}"

# @ECLASS-VARIABLE: NETSURF_BUILDSYSTEM_SRC_URI
# @DESCRIPTION:
# Download link for NETSURF_BUILDSYSTEM, add to SRC_URI iff set explicitly.
NETSURF_BUILDSYSTEM_SRC_URI="http://download.netsurf-browser.org/libs/releases/${NETSURF_BUILDSYSTEM}.tar.gz -> netsurf-${NETSURF_BUILDSYSTEM}.tar.gz"

# @ECLASS-VARIABLE: NETSURF_COMPONENT_TYPE
# @DESCRIPTION:
# Passed to buildsystem as COMPONENT_TYPE, valid values are
# lib-shared, lib-static and binary. Defaults to "lib-static lib-shared"
NETSURF_COMPONENT_TYPE="${NETSURF_COMPONENT_TYPE:-lib-static lib-shared}"

# @ECLASS-VARIABLE: SRC_URI
# @DESCRIPTION:
# Defaults to http://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz
# and NETSURF_BUILDSYSTEM_SRC_URI.
if [ -z "${SRC_URI}" ] ; then
	SRC_URI="http://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz
	${NETSURF_BUILDSYSTEM_SRC_URI}"
fi

IUSE="debug"
if has lib-static ${NETSURF_COMPONENT_TYPE} ; then
	IUSE+=" static-libs"
fi

DEPEND="virtual/pkgconfig"

# @FUNCTION: netsurf_src_prepare
# @DESCRIPTION:
# Run base_src_prepare for PATCHES support and multilib_copy_sources for 
# in-source build.
netsurf_src_prepare() {
	base_src_prepare
	multilib_copy_sources
}

# @ECLASS-VARIABLE: netsurf_makeconf
# @DESCRIPTION:
# Configuration variable bash array to be passed to emake calls.
# Defined at netsurf_src_configure and can be altered afterwards.

# @FUNCTION: netsurf_src_configure
# @DESCRIPTION:
# Setup netsurf_makeconf and run multilib-minimal_src_configure.
# A default multilib_src_configure is provided by this eclass.
netsurf_src_configure() {
	netsurf_makeconf=(
		NSSHARED=${WORKDIR}/${NETSURF_BUILDSYSTEM}
		Q=
		HOST_CC="\$(CC)"
		CCOPT=
		CCNOOPT=
		CCDBG=
		LDDBG=
		AR="$(tc-getAR)"
		BUILD=$(usex debug debug release)
		PREFIX="${EROOT}"usr
	)

	multilib-minimal_src_configure
}

multilib_src_configure() {
	sed -e "/^INSTALL_ITEMS/s: /lib: /$(get_libdir):g" \
		-i Makefile || die
	if [ -f ${PN}.pc.in ] ; then
		sed -e "/^libdir/s:/lib:/$(get_libdir):g" \
			-i ${PN}.pc.in || die
	fi
}

# @FUNCTION: netsurf_make
# @DESCRIPTION:
# Calls emake with netsurf_makeconf and toolchain CC/LD 
# as arguments for every NETSURF_COMPONENT_TYPE if activated.
netsurf_make() {
	for COMPONENT_TYPE in ${NETSURF_COMPONENT_TYPE} ; do
		if [ "${COMPONENT_TYPE}" == "lib-static" ] ; then
			if ! use static-libs ; then
				continue
			fi
		fi
		emake CC="$(tc-getCC)" LD="$(tc-getLD)" "${netsurf_makeconf[@]}" \
			COMPONENT_TYPE=${COMPONENT_TYPE} "$@"
	done
}

# @FUNCTION: netsurf_src_compile
# @DESCRIPTION:
# Calls multilib-minimal_src_compile and netsurf_make doc if USE=doc.
# A default multilib_src_compile is provided by this eclass.
netsurf_src_compile() {
	local problems=$(egrep -Hn -- ' (-O.?|-g)( |$)' \
		$(find . -type f -name 'Makefile*'))
	if [ -n "${problems}" ] ; then
		elog "found bad flags: 
${problems}"
	fi

	multilib-minimal_src_compile "$@"

	if has doc ${USE} ; then
		netsurf_make "$@" docs
	fi
}

multilib_src_compile() {
	netsurf_make "$@"
}

# @FUNCTION: netsurf_src_test
# @DESCRIPTION:
# Calls multilib-minimal_src_test.
# A default multilib_src_test is provided by this eclass.
netsurf_src_test() {
	multilib-minimal_src_test "$@"
}

multilib_src_test() {
	netsurf_make test "$@"
}

# @FUNCTION: netsurf_src_install
# @DESCRIPTION:
# Calls multilib-minimal_src_install.
# A default multilib_src_test is provided by this eclass.
# A default multilib_src_install is provided by this eclass.
netsurf_src_install() {
	multilib-minimal_src_install "$@"
}

multilib_src_install() {
	#DEFAULT_ABI may not be the last.
	#install to clean dir, rename binaries, move everything back
	if [ "${ABI}" == "${DEFAULT_ABI}" ] ; then
		netsurf_make DESTDIR="${D}" install "$@"
	else
		netsurf_make DESTDIR="${D}"${ABI} install "$@"
		if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then
			find "${D}"${ABI}/usr/bin -type f -exec mv {} {}.${ABI} \;
		fi
		mv "${D}"${ABI}/* "${D}" || die
		rmdir "${D}"${ABI} || die
	fi
}


=== dev-libs/libwapcaplet/libwapcaplet-0.2.0.ebuild ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libwapcaplet/libwapcaplet-0.2.0.ebuild,v 1.1 2013/06/17 16:56:28 xmw Exp $

EAPI=5

inherit netsurf

DESCRIPTION="string internment library, written in C"
HOMEPAGE="http://www.netsurf-browser.org/projects/libwapcaplet/"

SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE="test"

REQUIRED_USE="amd64? ( abi_x86_32? ( !test ) )"

DEPEND="test? ( dev-libs/check )"


=== dev-libs/libparserutils/libparserutils-0.1.2.ebuild ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libparserutils/libparserutils-0.1.2.ebuild,v 1.1 2013/06/17 17:01:40 xmw Exp $

EAPI=5

inherit flag-o-matic netsurf

DESCRIPTION="library for building efficient parsers, written in C"
HOMEPAGE="http://www.netsurf-browser.org/projects/libparserutils/"

SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE="iconv test"

DEPEND="test? (	dev-lang/perl )"

DOCS=( README docs/Todo )

src_configure() {
	netsurf_src_configure

	append-cflags "-D$(usex iconv WITH WITHOUT)_ICONV_FILTER"
}


=== dev-libs/libcss/libcss-0.2.0.ebuild ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libcss/libcss-0.2.0.ebuild,v 1.1 2013/06/17 17:10:34 xmw Exp $

EAPI=5

inherit netsurf

DESCRIPTION="CSS parser and selection engine, written in C"
HOMEPAGE="http://www.netsurf-browser.org/projects/libcss/"

SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE="test"

RDEPEND=">=dev-libs/libparserutils-0.1.2[static-libs?,${MULTILIB_USEDEP}]
	>=dev-libs/libwapcaplet-0.2.0[static-libs?,${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}
	test? ( dev-lang/perl )"


=== net-libs/libhubbub/libhubbub-0.2.0.ebuild ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/libhubbub/libhubbub-0.2.0.ebuild,v 1.1 2013/06/17 17:23:28 xmw Exp $

EAPI=5

inherit netsurf

DESCRIPTION="HTML5 compliant parsing library, written in C"
HOMEPAGE="http://www.netsurf-browser.org/projects/hubbub/"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE="doc test"

#libjson.so.0.0.1 from app-emulation/emul-linux-x86-baselibs is outdated
REQUIRED_USE="amd64? ( abi_x86_32? ( !test ) )"

RDEPEND=">=dev-libs/libparserutils-0.1.2[static-libs?,${MULTILIB_USEDEP}]
	!net-libs/hubbub"
DEPEND="${RDEPEND}
	test? ( dev-lang/perl
		dev-libs/json-c )"

PATCHES=( "${FILESDIR}"/${P}-error.patch )
DOCS=( README docs/{Architecture,Macros,Todo,Treebuilder,Updated} )

RESTRICT=test


=== net-libs/libdom/libdom-0.0.1.ebuild ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/libdom/libdom-0.0.1.ebuild,v 1.1 2013/06/18 05:58:50 xmw Exp $

EAPI=5

inherit netsurf

DESCRIPTION="implementation of the W3C DOM, written in C"
HOMEPAGE="http://www.netsurf-browser.org/projects/libdom/"

SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE="expat test xml"

RDEPEND=">=dev-libs/libparserutils-0.1.2[static-libs?,${MULTILIB_USEDEP}]
	>=dev-libs/libwapcaplet-0.2.0[static-libs?,${MULTILIB_USEDEP}]
	>=net-libs/libhubbub-0.2.0[static-libs?,${MULTILIB_USEDEP}]
	xml? (
		expat? ( dev-libs/expat[static-libs?]
			amd64? ( abi_x86_32? ( app-emulation/emul-linux-x86-baselibs[development] ) ) )
		!expat? ( dev-libs/libxml2[static-libs?]
			amd64? ( abi_x86_32? ( app-emulation/emul-linux-x86-baselibs[development] ) ) )
	)"
DEPEND="${RDEPEND}
	test? ( dev-lang/perl
		dev-perl/XML-XPath
		dev-perl/libxml-perl
		perl-core/Switch )"

REQUIRED_USE="test? ( xml )"

src_configure() {
	netsurf_src_configure

	netsurf_makeconf+=(
		WITH_EXPAT_BINDING=$(usex xml $(usex expat yes no) no)
		WITH_LIBXML_BINDING=$(usex xml $(usex expat no yes) no)
	)
}


=== dev-libs/libnsfb/libnsfb-0.1.0.ebuild ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libnsfb/libnsfb-0.1.0.ebuild,v 1.1 2013/06/17 19:44:35 xmw Exp $

EAPI=5

inherit netsurf

DESCRIPTION="framebuffer abstraction library, written in C"
HOMEPAGE="http://www.netsurf-browser.org/projects/libnsfb/"

SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE="sdl test vnc wayland xcb"

RDEPEND="sdl? ( media-libs/libsdl[static-libs?]
		amd64? ( abi_x86_32? ( app-emulation/emul-linux-x86-sdl[development] ) ) )
	vnc? ( net-libs/libvncserver[static-libs?] )
	wayland? ( dev-libs/wayland[static-libs?] )
	xcb? ( x11-libs/libxcb[static-libs?,${MULTILIB_USEDEP}]
		x11-libs/xcb-util[static-libs?]
		x11-libs/xcb-util-image[static-libs?]
		x11-libs/xcb-util-keysyms[static-libs?] )"
DEPEND="${RDEPEND}"

REQUIRED_USE="amd64? ( abi_x86_32? ( !vnc !wayland !xcb ) )"

PATCHES=( "${FILESDIR}"/${PN}-0.1.0-autodetect.patch )
DOCS=( usage )


=== dev-libs/nsgenbind/nsgenbind-0.0.1.ebuild ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/nsgenbind/nsgenbind-0.0.1.ebuild,v 1.1 2013/06/18 09:42:58 xmw Exp $

EAPI=5

NETSURF_COMPONENT_TYPE=binary

inherit netsurf

DESCRIPTION="generate javascript to dom bindings from w3c webidl files"
HOMEPAGE="http://www.netsurf-browser.org/"

LICENSE="MIT-with-advertising"
SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE=""

DEPEND="virtual/yacc"

PATCHES=( "${FILESDIR}"/${P}-bison-2.6.patch )


=== media-libs/libnsbmp/libnsbmp-0.1.0.ebuild ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/libnsbmp/libnsbmp-0.1.0.ebuild,v 1.1 2013/06/17 17:29:07 xmw Exp $

EAPI=5

inherit netsurf

DESCRIPTION="decoding library for BMP and ICO image file formats, written in C"
HOMEPAGE="http://www.netsurf-browser.org/projects/libnsbmp/"

SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE=""


=== media-libs/libnsgif/libnsgif-0.1.0.ebuild ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/libnsgif/libnsgif-0.1.0.ebuild,v 1.1 2013/06/17 17:32:44 xmw Exp $

EAPI=5

inherit netsurf

DESCRIPTION="decoding library for the GIF image file format, written in C"
HOMEPAGE="http://www.netsurf-browser.org/projects/libnsgif/"

SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE=""


=== media-libs/librosprite/librosprite-0.1.0.ebuild ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/librosprite/librosprite-0.1.0.ebuild,v 1.1 2013/06/17 17:35:09 xmw Exp $

EAPI=5

inherit netsurf

DESCRIPTION="framebuffer abstraction library, written in C"
HOMEPAGE="http://www.netsurf-browser.org/projects/librosprite/"

SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE=""


=== media-libs/libsvgtiny/libsvgtiny-0.1.0.ebuild ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/libsvgtiny/libsvgtiny-0.1.0.ebuild,v 1.1 2013/06/17 19:01:07 xmw Exp $

EAPI=5

inherit netsurf

DESCRIPTION="framebuffer abstraction library, written in C"
HOMEPAGE="http://www.netsurf-browser.org/projects/libsvgtiny/"

SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE=""

RDEPEND=">=net-libs/libdom-0.0.1[static-libs?,${MULTILIB_USEDEP}]
	>=dev-libs/libwapcaplet-0.2.0[static-libs?,${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}
	dev-util/gperf"


=== www-client/netsurf/netsurf-3.0.ebuild ===
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-client/netsurf/netsurf-3.0.ebuild,v 1.3 2013/06/19 07:26:45 xmw Exp $

EAPI=5
NETSURF_COMPONENT_TYPE=binary

inherit netsurf

DESCRIPTION="a free, open source web browser"
HOMEPAGE="http://www.netsurf-browser.org/"
SRC_URI="http://download.netsurf-browser.org/netsurf/releases/source/${P}-src.tar.gz
	http://xmw.de/mirror/netsurf-fb.modes-example.gz
	${NETSURF_BUILDSYSTEM_SRC_URI}"

LICENSE="GPL-2 MIT-with-advertising"
SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE="+bmp fbcon truetype +gif gstreamer gtk javascript +jpeg +mng pdf-writer
	+png +rosprite +svg +svgtiny +webp fbcon_frontend_able fbcon_frontend_linux
	fbcon_frontend_sdl fbcon_frontend_vnc fbcon_frontend_x"

REQUIRED_USE="|| ( fbcon gtk )
	amd64? ( abi_x86_32? (
		!gstreamer !javascript !pdf-writer svg? ( svgtiny ) !truetype ) )
	fbcon? ( ^^ ( fbcon_frontend_able fbcon_frontend_linux fbcon_frontend_sdl
		fbcon_frontend_vnc fbcon_frontend_x ) )"

RDEPEND="dev-libs/libxml2
	net-misc/curl
	>=dev-libs/libcss-0.2.0[${MULTILIB_USEDEP}]
	>=net-libs/libhubbub-0.2.0[${MULTILIB_USEDEP}]
	bmp? ( >=media-libs/libnsbmp-0.1.0[${MULTILIB_USEDEP}] )
	fbcon? ( >=dev-libs/libnsfb-0.1.0[${MULTILIB_USEDEP}]
		truetype? ( media-fonts/dejavu
			media-libs/freetype )
	)
	gif? ( >=media-libs/libnsgif-0.1.0[${MULTILIB_USEDEP}] )
	gtk? ( dev-libs/glib:2
		gnome-base/libglade:2.0
		media-libs/lcms:0
		x11-libs/gtk+:2
		amd64? ( abi_x86_32? ( app-emulation/emul-linux-x86-baselibs
				app-emulation/emul-linux-x86-gtklibs ) ) )
	gstreamer? ( media-libs/gstreamer:0.10 )
	javascript? ( dev-libs/nsgenbind )
	jpeg? ( virtual/jpeg
		amd64? ( abi_x86_32? ( app-emulation/emul-linux-x86-baselibs ) ) )
	mng? ( media-libs/libmng
		amd64? ( abi_x86_32? ( app-emulation/emul-linux-x86-baselibs ) ) )
	pdf-writer? ( media-libs/libharu )
	png? ( media-libs/libpng
		amd64? ( abi_x86_32? ( app-emulation/emul-linux-x86-baselibs ) ) )
	svg? ( svgtiny? ( >=media-libs/libsvgtiny-0.1.0[${MULTILIB_USEDEP}] )
		!svgtiny? ( gnome-base/librsvg:2 ) )
	webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )"
DEPEND="${RDEPEND}
	javascript? ( dev-libs/nsgenbind )
	rosprite? ( >=media-libs/librosprite-0.1.0[${MULTILIB_USEDEP}] )"

PATCHES=( "${FILESDIR}"/${P}-CFLAGS.patch
	"${FILESDIR}"/${P}-framebuffer-pkgconfig.patch
	"${FILESDIR}"/${PN}-2.9-conditionally-include-image-headers.patch )
DOCS=( fb.modes README Docs/USING-Framebuffer
	Docs/ideas/{cache,css-engine,render-library}.txt )

src_prepare() {
	rm -rf amiga atari beos cocoa monkey riscos windows  || die

	mv "${WORKDIR}"/netsurf-fb.modes-example fb.modes

	netsurf_src_prepare
}

src_configure() {
	netsurf_src_configure

	netsurf_makeconf+=(
		NETSURF_USE_BMP=$(usex bmp YES NO)
		NETSURF_USE_GIF=$(usex gif YES NO)
		NETSURF_USE_JPEG=$(usex jpeg YES NO)
		NETSURF_USE_PNG=$(usex png YES NO)
		NETSURF_USE_PNG=$(usex png YES NO)
		NETSURF_USE_MNG=$(usex mng YES NO)
		NETSURF_USE_WEBP=$(usex webp YES NO)
		NETSURF_USE_VIDEO=$(usex gstreamer YES NO)
		NETSURF_USE_MOZJS=$(usex javascript YES NO)
		NETSURF_USE_JS=NO
		NETSURF_USE_HARU_PDF=$(usex pdf-writer YES NO)
		NETSURF_USE_NSSVG=$(usex svg $(usex svgtiny YES NO) NO)
		NETSURF_USE_RSVG=$(usex svg $(usex svgtiny NO YES) NO)
		NETSURF_USE_ROSPRITE=$(usex rosprite YES NO)
		PKG_CONFIG=$(tc-getPKG_CONFIG)
		$(usex fbcon_frontend_able  NETSURF_FB_FRONTEND=able  "")
		$(usex fbcon_frontend_linux NETSURF_FB_FRONTEND=linux "")
		$(usex fbcon_frontend_sdl   NETSURF_FB_FRONTEND=sdl   "")
		$(usex fbcon_frontend_vnc   NETSURF_FB_FRONTEND=vnc   "")
		$(usex fbcon_frontend_x     NETSURF_FB_FRONTEND=x     "")
		NETSURF_FB_FONTLIB=$(usex truetype freetype internal)
		NETSURF_FB_FONTPATH=${EROOT}usr/share/fonts/dejavu
		TARGET=dummy
	)
}

src_compile() {
	if use fbcon ; then
		netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=framebuffer}" )
		netsurf_src_compile
	fi
	if use gtk ; then
		netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=gtk}" )
		netsurf_src_compile
	fi
}

src_install() {
	sed -e '1iexit;' \
		-i "${WORKDIR}"/*/utils/git-testament.pl || die

	if use fbcon ; then
		netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=framebuffer}" )
		netsurf_src_install
		elog "framebuffer binary has been installed as netsurf-fb"
		mv -v "${ED}"usr/bin/netsurf{,-fb} || die
		make_desktop_entry "${EROOT}"usr/bin/netsurf-gtk NetSurf-gtk netsurf "Network;WebBrowser"

		elog "In order to setup the framebuffer console, netsurf needs an /etc/fb.modes"
		elog "You can use an example from /usr/share/doc/${PF}/fb.modes.* (bug 427092)."
		elog "Please make /etc/input/mice readable to the account using netsurf-fb."
		elog "Either use chmod a+r /etc/input/mice (security!!!) or use an group."
	fi
	if use gtk ; then
		netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=gtk}" )
		netsurf_src_install
		elog "netsurf gtk version has been installed as netsurf-gtk"
		mv -v "${ED}"/usr/bin/netsurf{,-gtk} || die
		make_desktop_entry "${EROOT}"usr/bin/netsurf-fb NetSurf-framebuffer netsurf "Network;WebBrowser"
	fi

	insinto /usr/share/pixmaps
	doins gtk/res/netsurf.xpm
}



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] netsurf.eclass proposal
  2013-06-19 12:09 [gentoo-dev] netsurf.eclass proposal Michael Weber
@ 2013-06-19 12:16 ` Michał Górny
  2013-06-19 12:30   ` Michael Weber
  0 siblings, 1 reply; 10+ messages in thread
From: Michał Górny @ 2013-06-19 12:16 UTC (permalink / raw
  To: gentoo-dev; +Cc: xmw

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

Dnia 2013-06-19, o godz. 14:09:26
Michael Weber <xmw@gentoo.org> napisał(a):

> - multilib builds and rename non-DEFAULT_ABI $bins to $bin.${ABI}

And why exactly do you need multilib for a web browser?

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] netsurf.eclass proposal
  2013-06-19 12:16 ` Michał Górny
@ 2013-06-19 12:30   ` Michael Weber
  2013-06-19 16:13     ` Thomas Sachau
  2013-06-19 16:23     ` Mike Gilbert
  0 siblings, 2 replies; 10+ messages in thread
From: Michael Weber @ 2013-06-19 12:30 UTC (permalink / raw
  To: gentoo-dev

On 06/19/2013 02:16 PM, Michał Górny wrote:
> Dnia 2013-06-19, o godz. 14:09:26
> Michael Weber <xmw@gentoo.org> napisał(a):
> 
>> - multilib builds and rename non-DEFAULT_ABI $bins to $bin.${ABI}
> 
> And why exactly do you need multilib for a web browser?
> 

No need for the browser package (just fun) but I'd like to provide it
for the ten library packages.

-- 
Michael Weber
Gentoo Developer
web: https://xmw.de/
mailto: Michael Weber <xmw@gentoo.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] netsurf.eclass proposal
  2013-06-19 12:30   ` Michael Weber
@ 2013-06-19 16:13     ` Thomas Sachau
  2013-06-19 16:23     ` Mike Gilbert
  1 sibling, 0 replies; 10+ messages in thread
From: Thomas Sachau @ 2013-06-19 16:13 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 856 bytes --]

Michael Weber schrieb:
> On 06/19/2013 02:16 PM, Michał Górny wrote:
>> Dnia 2013-06-19, o godz. 14:09:26
>> Michael Weber <xmw@gentoo.org> napisał(a):
>>
>>> - multilib builds and rename non-DEFAULT_ABI $bins to $bin.${ABI}
>>
>> And why exactly do you need multilib for a web browser?
>>
> 
> No need for the browser package (just fun) but I'd like to provide it
> for the ten library packages.
> 

If you have any library build systems depending on ABI-specific
binaries, you should wrap the binaries, otherwise you will have to add
and maintain custom hacks for all consumers and for the complete
lifetime of the consumers.
If you want to add such wrapper, you can look into the multilib-portage
overlay for such a wrapper, which has now been working and tested for
some years.

-- 

Thomas Sachau
Gentoo Linux Developer


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 379 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] netsurf.eclass proposal
  2013-06-19 12:30   ` Michael Weber
  2013-06-19 16:13     ` Thomas Sachau
@ 2013-06-19 16:23     ` Mike Gilbert
  2013-06-20 14:31       ` Michael Weber
  1 sibling, 1 reply; 10+ messages in thread
From: Mike Gilbert @ 2013-06-19 16:23 UTC (permalink / raw
  To: Gentoo Dev

On Wed, Jun 19, 2013 at 8:30 AM, Michael Weber <xmw@gentoo.org> wrote:
> On 06/19/2013 02:16 PM, Michał Górny wrote:
>> Dnia 2013-06-19, o godz. 14:09:26
>> Michael Weber <xmw@gentoo.org> napisał(a):
>>
>>> - multilib builds and rename non-DEFAULT_ABI $bins to $bin.${ABI}
>>
>> And why exactly do you need multilib for a web browser?
>>
>
> No need for the browser package (just fun) but I'd like to provide it
> for the ten library packages.
>

I guess the follow-up question is this:

Are there any consumers of these libraries which require the 32-bit
(x86) ABI to be installed?

I'm all for having fun, but I think the intent was to keep the
multilib-build eclass usage to a minimum. If there is some pre-built
32-bit application that needs them, then that's fine. Otherwise,
you'll end up installing libraries that will never be used.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] netsurf.eclass proposal
  2013-06-19 16:23     ` Mike Gilbert
@ 2013-06-20 14:31       ` Michael Weber
  2013-06-20 14:48         ` Mike Gilbert
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Weber @ 2013-06-20 14:31 UTC (permalink / raw
  To: gentoo-dev

On 06/19/2013 06:23 PM, Mike Gilbert wrote:
> I guess the follow-up question is this:
> 
> Are there any consumers of these libraries which require the 32-bit
> (x86) ABI to be installed?
No ... t jet. And not that likely to arise, but I'm out of crystal balls
;-) .

> I'm all for having fun, but I think the intent was to keep the
> multilib-build eclass usage to a minimum. 
Sorry, I've missed that agreement, can you point me to it, please?

> Otherwise, you'll end up installing libraries that will never be used.
Same goes for all corner cases of emul-linux-members.

Turning abi_x86_32 on/off in a global scale is a decision to be made by
the user. With all consequences (initial compile time vs recompiles on
reconsiderations). It doesn't make that difference if turned off.
But if needed, it's just there.

[Said that, I hope it doesn't propagate -abi_x86_32 down the dep tree.]

[And I seriously doubt that any user has the patience to watch us
migrate the tree on a per-request basis. Let's be honest then and
abandon it. -- not my standpoint, under given circumstances of
ready-to-use implementation.]

Michael

-- 
Michael Weber
Gentoo Developer
web: https://xmw.de/
mailto: Michael Weber <xmw@gentoo.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] netsurf.eclass proposal
  2013-06-20 14:31       ` Michael Weber
@ 2013-06-20 14:48         ` Mike Gilbert
  2013-06-20 14:56           ` hasufell
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Gilbert @ 2013-06-20 14:48 UTC (permalink / raw
  To: Gentoo Dev

On Thu, Jun 20, 2013 at 10:31 AM, Michael Weber <xmw@gentoo.org> wrote:
> On 06/19/2013 06:23 PM, Mike Gilbert wrote:
>> I'm all for having fun, but I think the intent was to keep the
>> multilib-build eclass usage to a minimum.
> Sorry, I've missed that agreement, can you point me to it, please?
>

Just something I picked up from various IRC conversations with mgorny
and pals. More precisely, I should say it was the eclass author's
intent, and it is a principle with which I personally agree.

> Turning abi_x86_32 on/off in a global scale is a decision to be made by
> the user. With all consequences (initial compile time vs recompiles on
> reconsiderations). It doesn't make that difference if turned off.
> But if needed, it's just there.
>

It's a good point. As long as we are willing to support users who do
not enable it globally, I guess it is fine.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] netsurf.eclass proposal
  2013-06-20 14:48         ` Mike Gilbert
@ 2013-06-20 14:56           ` hasufell
  2013-06-20 15:03             ` Mike Gilbert
  0 siblings, 1 reply; 10+ messages in thread
From: hasufell @ 2013-06-20 14:56 UTC (permalink / raw
  To: gentoo-dev

On 06/20/2013 04:48 PM, Mike Gilbert wrote:
> On Thu, Jun 20, 2013 at 10:31 AM, Michael Weber <xmw@gentoo.org> wrote:
>> On 06/19/2013 06:23 PM, Mike Gilbert wrote:
>>> I'm all for having fun, but I think the intent was to keep the
>>> multilib-build eclass usage to a minimum.
>> Sorry, I've missed that agreement, can you point me to it, please?
>>
> 
> Just something I picked up from various IRC conversations with mgorny
> and pals. More precisely, I should say it was the eclass author's
> intent, and it is a principle with which I personally agree.
> 

The eclass authors opinion is not a policy. Policies must be discussed.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] netsurf.eclass proposal
  2013-06-20 14:56           ` hasufell
@ 2013-06-20 15:03             ` Mike Gilbert
  2013-06-20 15:05               ` hasufell
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Gilbert @ 2013-06-20 15:03 UTC (permalink / raw
  To: Gentoo Dev

On Thu, Jun 20, 2013 at 10:56 AM, hasufell <hasufell@gentoo.org> wrote:
> On 06/20/2013 04:48 PM, Mike Gilbert wrote:
>> On Thu, Jun 20, 2013 at 10:31 AM, Michael Weber <xmw@gentoo.org> wrote:
>>> On 06/19/2013 06:23 PM, Mike Gilbert wrote:
>>>> I'm all for having fun, but I think the intent was to keep the
>>>> multilib-build eclass usage to a minimum.
>>> Sorry, I've missed that agreement, can you point me to it, please?
>>>
>>
>> Just something I picked up from various IRC conversations with mgorny
>> and pals. More precisely, I should say it was the eclass author's
>> intent, and it is a principle with which I personally agree.
>>
>
> The eclass authors opinion is not a policy. Policies must be discussed.
>

I missed the part where anyone mentioned a policy...


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] netsurf.eclass proposal
  2013-06-20 15:03             ` Mike Gilbert
@ 2013-06-20 15:05               ` hasufell
  0 siblings, 0 replies; 10+ messages in thread
From: hasufell @ 2013-06-20 15:05 UTC (permalink / raw
  To: gentoo-dev

On 06/20/2013 05:03 PM, Mike Gilbert wrote:
> On Thu, Jun 20, 2013 at 10:56 AM, hasufell <hasufell@gentoo.org> wrote:
>> On 06/20/2013 04:48 PM, Mike Gilbert wrote:
>>> On Thu, Jun 20, 2013 at 10:31 AM, Michael Weber <xmw@gentoo.org> wrote:
>>>> On 06/19/2013 06:23 PM, Mike Gilbert wrote:
>>>>> I'm all for having fun, but I think the intent was to keep the
>>>>> multilib-build eclass usage to a minimum.
>>>> Sorry, I've missed that agreement, can you point me to it, please?
>>>>
>>>
>>> Just something I picked up from various IRC conversations with mgorny
>>> and pals. More precisely, I should say it was the eclass author's
>>> intent, and it is a principle with which I personally agree.
>>>
>>
>> The eclass authors opinion is not a policy. Policies must be discussed.
>>
> 
> I missed the part where anyone mentioned a policy...
> 

I did... and by that I mean: let's discuss it! :D


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-06-20 15:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-19 12:09 [gentoo-dev] netsurf.eclass proposal Michael Weber
2013-06-19 12:16 ` Michał Górny
2013-06-19 12:30   ` Michael Weber
2013-06-19 16:13     ` Thomas Sachau
2013-06-19 16:23     ` Mike Gilbert
2013-06-20 14:31       ` Michael Weber
2013-06-20 14:48         ` Mike Gilbert
2013-06-20 14:56           ` hasufell
2013-06-20 15:03             ` Mike Gilbert
2013-06-20 15:05               ` hasufell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox