public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
@ 2011-03-15  7:33 justin
  2011-03-15 20:51 ` justin
  0 siblings, 1 reply; 26+ messages in thread
From: justin @ 2011-03-15  7:33 UTC (permalink / raw
  To: gentoo-dev

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

Hi all,

I unbundled a couple of libs from emboss and thus we need a new
installation scheme for the embassy package. For this purpose I rewrote
the embassy eclass  to handle now all emboss and embassy* packages.

Please comment if you have objections for the tree commit

http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=blob_plain;
f=eclass/emboss.eclass;hb=HEAD

thanks justin


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

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-15  7:33 [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass justin
@ 2011-03-15 20:51 ` justin
  2011-03-15 21:25   ` Tomáš Chvátal
  2011-03-15 22:06   ` Mike Frysinger
  0 siblings, 2 replies; 26+ messages in thread
From: justin @ 2011-03-15 20:51 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 111 bytes --]

Donnie pointed out, that it might be clever to attach what I want to
have reviewed. So here it is.

justin

[-- Attachment #1.2: emboss.eclass --]
[-- Type: text/plain, Size: 5371 bytes --]

# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/embassy.eclass,v 1.17 2008/11/03 22:17:50 ribosome Exp $

# Creator of the original eclass
# Author Olivier Fisette <ofisette@gmail.com>
#
# Author of the next generation eclass
# Justin Lecher <jlec@gentoo.org>

# @ECLASS: emboss.eclass
# @MAINTAINER:
# sci-biology@gentoo.org
# jlec@gentoo.org
# @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons).
# @DESCRIPTION:
# The inheriting ebuild should provide EBO_DESCRIPTION before the inherit line.
# KEYWORDS should be set. Additionally "(R|P)DEPEND"encies and other standard
# ebuild Variables can be extended (FOO+="BAR").
# The inheriting ebuild's name must begin with "emboss" or "embassy" and must be EAPI=4 conform.

# @ECLASS-VARIABLE: EBO_DESCRIPTION
# @DESCRIPTION:
# Should be set. Completes the describtion of the embassy module as follows:
#
# EMBOSS integrated version of EBO_DESCRIPTION"
#
# Defaults to the upstream name of the module.

# @ECLASS-VARIABLE: EBO_PATCH
# @DEFAULT_UNSET
# @DESCRIPTION: Specify the patch level of EMBOSS. Only available for the emboss ebuild.
# The patch wil be fetch from:
#
# ftp://emboss.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz.
#
# Embassy packages should create one patch package and place it in FILESDIR, e.g.
# "files/embassy-iprscan-4.3.1-r2.patch". The patch will be automatically used during src_prepare

# @ECLASS-VARIABLE: NO_RECONF
# @DEFAULT_UNSET
# @DESCRIPTION:
# Set this, if you do not want to have eautoreconf be run after patching.

# @ECLASS-VARIABLE: EBO_ECONF
# @DEFAULT_UNSET
# @DESCRIPTION:
# Extra config options passed to econf, similar to EXTRA_ECONF.

EAPI="4"

inherit autotools eutils multilib

HOMEPAGE="http://emboss.sourceforge.net"
LICENSE="LGPL-2 GPL-2"

SLOT="0"
IUSE="mysql pdf png postgres static-libs X "

DEPEND="
	dev-libs/expat
	dev-libs/libpcre:3
	sci-libs/plplot
	sys-libs/zlib
	mysql? ( dev-db/mysql )
	pdf? ( media-libs/libharu )
	png? ( media-libs/gd[png] )
	postgres? ( dev-db/postgresql-base )
	X? ( x11-libs/libXt )
	"

RDEPEND="
	${DEPEND}
	"

DOCS="AUTHORS ChangeLog NEWS README "

if [[ ${PN} == "emboss" ]] ; then
	EBOV=${PV/_p*}
	DESCRIPTION="The European Molecular Biology Open Software Suite - A sequence analysis package"
	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${EBOV}.tar.gz"
	[[ -n ${EBO_PATCH} ]] && SRC_URI+=" ftp://${PN}.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz -> ${P}.patch.gz"
	IUSE+="minimal "
	RDEPEND+="
		!sys-devel/cons
		"
	PDEPEND+="
		!minimal? (
				sci-biology/aaindex
				sci-biology/cutg
				sci-biology/prints
				sci-biology/prosite
				sci-biology/rebase
				sci-biology/transfac
				)
		"
	S=${WORKDIR}/EMBOSS-${EBOV}
	DOCS+="FAQ THANKS "
else
	# The EMBASSY package name, retrieved from the inheriting ebuild's name
	EN=${PN:8}
	# The full name and version of the EMBASSY package (excluding the Gentoo
	# revision number)
	EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}
	EBO_DESCRIPTION=${EBO_DESCRIPTION:=${EN}}
	DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${PN:8}-${PV}.tar.gz"
	DEPEND+=">=sci-biology/emboss-6.3.1_p4[mysql=,pdf=,png=,postgres=,static-libs=,X=] "

	S=${WORKDIR}/${EF}
fi

# @FUNCTION: emboss_src_prepare
# @USAGE:
# @RETURN:
# @MAINTAINER:
# @DESCRIPTION:
# Does three things
#
#  1. Patches EMBOSS if EBO_PATCH is set
#  2. Patches with "${FILESDIR}"/${PF}.patch, of present
#  3. Runs eautoreconf unless NO_RECONF is set
#

emboss_src_prepare() {
	[[ ${PN} == emboss ]] && [[ -n ${EBO_PATCH} ]] && epatch "${WORKDIR}"/${P}.patch
	[[ -f "${FILESDIR}"/${PF}.patch ]] && epatch "${FILESDIR}"/${PF}.patch
	[[ -n ${NO_RECONF} ]] || eautoreconf
}

# @FUNCTION: emboss_src_prepare
# @USAGE:
# @RETURN:
# @MAINTAINER:
# @DESCRIPTION:
# runs econf with following options. Extra options can be passed by setting EBO_ECONF
#
#  $(use_with X x)
#  $(use_with png pngdriver "${EPREFIX}/usr")
#  $(use_with pdf hpdf "${EPREFIX}/usr")
#  $(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config")
#  $(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config")
#  $(use_enable amd64 64)
#  $(use_enable static-libs static)
#  --enable-large
#  --without-java
#  --enable-systemlibs
#  ${EBO_ECONF}

emboss_src_configure() {
	econf \
		$(use_with X x) \
		$(use_with png pngdriver "${EPREFIX}/usr") \
		$(use_with pdf hpdf "${EPREFIX}/usr") \
		$(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config") \
		$(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config") \
		$(use_enable amd64 64) \
		$(use_enable static-libs static) \
		--enable-large \
		--without-java \
		--enable-systemlibs \
		${EBO_ECONF}
}

# @FUNCTION: emboss_src_install
# @USAGE:
# @RETURN:
# @MAINTAINER:
# @DESCRIPTION:
# Standard src_install. Takes care of correct position of docs.

emboss_src_install() {
	default
	mv "${ED}"/usr/share/EMBOSS/doc/* "${ED}"/usr/share/doc/${PF}/
	rm -rf "${ED}"/usr/share/EMBOSS/doc
}

[[ ${PN} == embassy ]] || EXPORT_FUNCTIONS src_prepare src_configure src_install

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

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-15 20:51 ` justin
@ 2011-03-15 21:25   ` Tomáš Chvátal
  2011-03-16  6:48     ` justin
  2011-03-15 22:06   ` Mike Frysinger
  1 sibling, 1 reply; 26+ messages in thread
From: Tomáš Chvátal @ 2011-03-15 21:25 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dne 15.3.2011 21:51, justin napsal(a):
> Donnie pointed out, that it might be clever to attach what I want to
> have reviewed. So here it is.
> 
> justin
EAPI CAN'T BE DEFINED IN ECLASS!
this should be craved into stones :)

Some whitespace is funny.

look on XFCONF_AUTORECONF or XORG_AUTORECONF variable, just create
EBO_AUTORECONF with yes by default and handle it correctly.

i am seriously hurt by $(use_enable amd64 64)

why are not those functions exported for embassy ebuild?

Cheers

Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1/2UcACgkQHB6c3gNBRYd7owCgsP74VUYO0oQ5w2UNoYNXS0aA
zoUAnRMrGLAA/8kj4hX7Jc+QCb5cPJdb
=lz/B
-----END PGP SIGNATURE-----



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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-15 20:51 ` justin
  2011-03-15 21:25   ` Tomáš Chvátal
@ 2011-03-15 22:06   ` Mike Frysinger
  2011-03-15 23:25     ` [gentoo-dev] " Duncan
                       ` (3 more replies)
  1 sibling, 4 replies; 26+ messages in thread
From: Mike Frysinger @ 2011-03-15 22:06 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 4292 bytes --]

> # Copyright 1999-2004 Gentoo Foundation

s/2004/2011/

have you looked at the man page output for this to make sure the white spacing 
you're putting into the comments properly carries over ?

> # @ECLASS-VARIABLE: EBO_DESCRIPTION
> # @DESCRIPTION:
> # Should be set. Completes the describtion of the embassy module as follows:

i dont understand what this is trying to say (ignoring the spelling mistake in 
description)

> # EMBOSS integrated version of EBO_DESCRIPTION"

i see just one quote.  it needs a friend.

> # @ECLASS-VARIABLE: EBO_PATCH
> # @DEFAULT_UNSET
> # @DESCRIPTION: Specify the patch level of EMBOSS. Only available for the 
emboss ebuild.
> # The patch wil be fetch from:

wil -> will

> # @ECLASS-VARIABLE: NO_RECONF
> # @DEFAULT_UNSET
> # @DESCRIPTION:
> # Set this, if you do not want to have eautoreconf be run after patching.

please namespace all variables consistently

> # @ECLASS-VARIABLE: EBO_ECONF

EBO_EXTRA_ECONF is better for consistency sake too

> EAPI="4"

erp!

> HOMEPAGE="http://emboss.sourceforge.net"

could do with a trailing "/"

> IUSE="mysql pdf png postgres static-libs X "

no trailing space.  let the person appending the variable add the space:
	IUSE+=" moo"

> DOCS="AUTHORS ChangeLog NEWS README "

no need for that trailing space, and usually DOCS is left for end ebuilds isnt 
it ?  eclasses should append it.

> 
> if [[ ${PN} == "emboss" ]] ; then
> 	EBOV=${PV/_p*}
> 	DESCRIPTION="The European Molecular Biology Open Software Suite - A 
sequence analysis package"
> 	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${EBOV}.tar.gz"
> 	[[ -n ${EBO_PATCH} ]] && SRC_URI+=" ftp://${PN}.open-
bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz -> ${P}.patch.gz"
> 	IUSE+="minimal "
> 	RDEPEND+="
> 		!sys-devel/cons
> 		"
> 	PDEPEND+="
> 		!minimal? (
> 				sci-biology/aaindex
> 				sci-biology/cutg
> 				sci-biology/prints
> 				sci-biology/prosite
> 				sci-biology/rebase
> 				sci-biology/transfac
> 				)
> 		"
> 	S=${WORKDIR}/EMBOSS-${EBOV}
> 	DOCS+="FAQ THANKS "

this doesnt make much sense to me.  shouldnt this all be in the emboss ebuild 
instead of the eclass ?

> 	# The EMBASSY package name, retrieved from the inheriting ebuild's name
> 	EN=${PN:8}

should there be some checking here to make sure it starts with "embassy-" or 
whatever you're expecting ?

> 	# The full name and version of the EMBASSY package (excluding the Gentoo
> 	# revision number)
> 	EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}

ugh, but i guess we cant do much until we have newer bash

> 	EBO_DESCRIPTION=${EBO_DESCRIPTION:=${EN}}

tricky, but wrong.  i guess you actually want:
	: ${EBO_DESCRIPTION:=${EN}}

> 	DEPEND+=">=sci-biology/emboss-6.3.1_p4[mysql=,pdf=,png=,postgres=,static-
libs=,X=] "

space should be at the start of the string, not the end

> # @FUNCTION: emboss_src_prepare
> # @USAGE:
> # @RETURN:
> # @MAINTAINER:

i dont think these three tags make sense.  not even sure if this last one is 
even allowed.  best to just punt.

same goes for all the other funcs below.

> emboss_src_prepare() {
> 	[[ ${PN} == emboss ]] && [[ -n ${EBO_PATCH} ]] && epatch 
"${WORKDIR}"/${P}.patch

guess that would be moved to the emboss ebuild

> 	[[ -f "${FILESDIR}"/${PF}.patch ]] && epatch "${FILESDIR}"/${PF}.patch

technically, no need to quote FILESDIR here as the [[...]] takes care of it

> #  $(use_with png pngdriver "${EPREFIX}/usr")
> #  $(use_with pdf hpdf "${EPREFIX}/usr")
> #  $(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config")
> #  $(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config")

do you really need full paths here ?  are the configure scripts that screwed 
up ?  ideally libs would be found via .pc files.

> #  $(use_enable amd64 64)

oh god it burns so bad when i poo

> emboss_src_install() {
> 	default
> 	mv "${ED}"/usr/share/EMBOSS/doc/* "${ED}"/usr/share/doc/${PF}/
> 	rm -rf "${ED}"/usr/share/EMBOSS/doc

does the configure script respect --docdir= ?  then you wouldnt need this 
clean up logic ...

> [[ ${PN} == embassy ]] || EXPORT_FUNCTIONS src_prepare src_configure 
src_install

this $PN logic should get punted
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* [gentoo-dev] Re: RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-15 22:06   ` Mike Frysinger
@ 2011-03-15 23:25     ` Duncan
  2011-03-16  3:00     ` [gentoo-dev] " Jeroen Roovers
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 26+ messages in thread
From: Duncan @ 2011-03-15 23:25 UTC (permalink / raw
  To: gentoo-dev

Mike Frysinger posted on Tue, 15 Mar 2011 18:06:36 -0400 as excerpted:

>> # The patch wil be fetch from:
> 
> wil -> will

While you're at it, s/fetch/fetched/

IOW:

# The patch will be fetched from:

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-15 22:06   ` Mike Frysinger
  2011-03-15 23:25     ` [gentoo-dev] " Duncan
@ 2011-03-16  3:00     ` Jeroen Roovers
  2011-03-16  3:17       ` Jeremy Olexa
  2011-03-16  7:02     ` justin
  2011-03-16  7:20     ` justin
  3 siblings, 1 reply; 26+ messages in thread
From: Jeroen Roovers @ 2011-03-16  3:00 UTC (permalink / raw
  To: gentoo-dev

On Tue, 15 Mar 2011 18:06:36 -0400
Mike Frysinger <vapier@gentoo.org> wrote:

> > 	# The full name and version of the EMBASSY package
> > (excluding the Gentoo # revision number)
> > 	EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}
> 
> ugh, but i guess we cant do much until we have newer bash

bash 4.1 has been stable for half a year now. Not long enough?

EF="${EN^^}"


     jer



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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-16  3:00     ` [gentoo-dev] " Jeroen Roovers
@ 2011-03-16  3:17       ` Jeremy Olexa
  0 siblings, 0 replies; 26+ messages in thread
From: Jeremy Olexa @ 2011-03-16  3:17 UTC (permalink / raw
  To: gentoo-dev

On 03/15/2011 10:00 PM, Jeroen Roovers wrote:
> On Tue, 15 Mar 2011 18:06:36 -0400
> Mike Frysinger<vapier@gentoo.org>  wrote:
>
>>> 	# The full name and version of the EMBASSY package
>>> (excluding the Gentoo # revision number)
>>> 	EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}
>>
>> ugh, but i guess we cant do much until we have newer bash
>
> bash 4.1 has been stable for half a year now. Not long enough?
>
> EF="${EN^^}"

Not until PMS specifies[1] something other than: "The interpreter is 
assumed to be GNU bash, version 3.2 or later"

[1]: http://dev.gentoo.org/~ulm/pms/head/pms.html#x1-650007

-Jeremy




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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-15 21:25   ` Tomáš Chvátal
@ 2011-03-16  6:48     ` justin
  2011-03-16  9:36       ` Tomáš Chvátal
  0 siblings, 1 reply; 26+ messages in thread
From: justin @ 2011-03-16  6:48 UTC (permalink / raw
  To: gentoo-dev

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

On 15/03/11 22:25, Tomáš Chvátal wrote:
> Dne 15.3.2011 21:51, justin napsal(a):
>> Donnie pointed out, that it might be clever to attach what I want to
>> have reviewed. So here it is.
> 
>> justin
> EAPI CAN'T BE DEFINED IN ECLASS!
> this should be craved into stones :)

I didn't see this mentioned anywhere in the docs. But okay, this is fixable.

> 
> Some whitespace is funny.

I love funny whitespaces.

> 
> look on XFCONF_AUTORECONF or XORG_AUTORECONF variable, just create
> EBO_AUTORECONF with yes by default and handle it correctly.

Thanks for that hint. I will change it accordingly.

> 
> i am seriously hurt by $(use_enable amd64 64)

Where is the problem? The purpose of the eclass is not to repeat the
same code 20 times. Why can't this be here?

> 
> why are not those functions exported for embassy ebuild?

Just a Meta ebuild to install all modules (emabassy-*).

> 
> Cheers
> 
> Tom

thanks justin


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

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-15 22:06   ` Mike Frysinger
  2011-03-15 23:25     ` [gentoo-dev] " Duncan
  2011-03-16  3:00     ` [gentoo-dev] " Jeroen Roovers
@ 2011-03-16  7:02     ` justin
  2011-03-16 17:13       ` Jeroen Roovers
  2011-03-16 18:49       ` Mike Frysinger
  2011-03-16  7:20     ` justin
  3 siblings, 2 replies; 26+ messages in thread
From: justin @ 2011-03-16  7:02 UTC (permalink / raw
  To: gentoo-dev

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

On 15/03/11 23:06, Mike Frysinger wrote:
>> # Copyright 1999-2004 Gentoo Foundation
> 
> s/2004/2011/
> 
> have you looked at the man page output for this to make sure the white spacing 
> you're putting into the comments properly carries over ?

I will do this before the final commit. Currently it is alright.

> 
>> # @ECLASS-VARIABLE: EBO_DESCRIPTION
>> # @DESCRIPTION:
>> # Should be set. Completes the describtion of the embassy module as follows:
> 
> i dont understand what this is trying to say (ignoring the spelling mistake in 
> description)

These are all modules for EMBOSS. I want to shorten the Description of
each ebuild to the important part. But I will makes this clearer for the
manpage. What I don't want, is what you can read in all the gstreamer
plugins "plugins for foo"

>> HOMEPAGE="http://emboss.sourceforge.net"
> 
> could do with a trailing "/"

I asked myself quite often, if this needed or not. What is the purpose
of the trailing "/"?

//
snip
//

>> #  $(use_with png pngdriver "${EPREFIX}/usr")
>> #  $(use_with pdf hpdf "${EPREFIX}/usr")
>> #  $(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config")
>> #  $(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config")
> 
> do you really need full paths here ?  are the configure scripts that screwed 
> up ?  ideally libs would be found via .pc files.

It f..ing defaults to / roots if not specified

> 
>> #  $(use_enable amd64 64)
> 
> oh god it burns so bad when i poo
> 
>> emboss_src_install() {
>> 	default
>> 	mv "${ED}"/usr/share/EMBOSS/doc/* "${ED}"/usr/share/doc/${PF}/
>> 	rm -rf "${ED}"/usr/share/EMBOSS/doc
> 
> does the configure script respect --docdir= ?  then you wouldnt need this 
> clean up logic ...

It soesn't and actually the java part (not installed yet) expects docs
here. I am not sure where this could be left like this or breaks somehting.

> -mike

Thanks mike for all your suggestions and remarks. I will fix the eclass
accordingly.

justin


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

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-15 22:06   ` Mike Frysinger
                       ` (2 preceding siblings ...)
  2011-03-16  7:02     ` justin
@ 2011-03-16  7:20     ` justin
  3 siblings, 0 replies; 26+ messages in thread
From: justin @ 2011-03-16  7:20 UTC (permalink / raw
  To: gentoo-dev

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

>> #  $(use_enable amd64 64)
> 
> oh god it burns so bad when i poo
> 

I couldn't find out why this burns so much. The eclass is inherited from
the ebuild during emerge, so it should be aware of the current system.
So what is the problem? Only thing I can think of is crosscompiling, but
even there your profile should set this.
Could you explain that to me?

Thanks justin


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

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-16  6:48     ` justin
@ 2011-03-16  9:36       ` Tomáš Chvátal
  2011-03-16 18:51         ` Mike Frysinger
  0 siblings, 1 reply; 26+ messages in thread
From: Tomáš Chvátal @ 2011-03-16  9:36 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dne 16.3.2011 07:48, justin napsal(a):
> On 15/03/11 22:25, Tomáš Chvátal wrote:
>>
>> i am seriously hurt by $(use_enable amd64 64)
> 
> Where is the problem? The purpose of the eclass is not to repeat the
> same code 20 times. Why can't this be here?
> 
Problem is in amd64, what if we get to 64b mips OR ppc64 or any other
non-32bit arch?

Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2AhJUACgkQHB6c3gNBRYeo8gCgzgj2xDGjaA9ym2SmIsYmpn2W
bIgAn3GvJ7SjwAGg+V91YZwG4PK+2q/u
=8GNY
-----END PGP SIGNATURE-----



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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-16  7:02     ` justin
@ 2011-03-16 17:13       ` Jeroen Roovers
  2011-03-16 17:59         ` Ulrich Mueller
  2011-03-16 18:49       ` Mike Frysinger
  1 sibling, 1 reply; 26+ messages in thread
From: Jeroen Roovers @ 2011-03-16 17:13 UTC (permalink / raw
  To: gentoo-dev

On Wed, 16 Mar 2011 08:02:01 +0100
justin <jlec@gentoo.org> wrote:

> >> HOMEPAGE="http://emboss.sourceforge.net"
> > 
> > could do with a trailing "/"

I *like* to see that too...

> I asked myself quite often, if this needed or not. What is the purpose
> of the trailing "/"?

However:

  "An HTTP URL takes the form:

      http://<host>:<port>/<path>?<searchpart>

  "where <host> and <port> are as described in Section 3.1. If :<port>
   is omitted, the port defaults to 80.  No user name or password is
   allowed.  <path> is an HTTP selector, and <searchpart> is a query
   string. The <path> is optional, as is the <searchpart> and its
   preceding "?". If neither <path> nor <searchpart> is present, the "/"
   may also be omitted."   [1]





[1] <http://www.ietf.org/rfc/rfc1738.txt>, p.8, section 3.3



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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-16 17:13       ` Jeroen Roovers
@ 2011-03-16 17:59         ` Ulrich Mueller
  2011-03-16 19:23           ` justin
  0 siblings, 1 reply; 26+ messages in thread
From: Ulrich Mueller @ 2011-03-16 17:59 UTC (permalink / raw
  To: gentoo-dev

>>>>> On Wed, 16 Mar 2011, Jeroen Roovers wrote:

>   "An HTTP URL takes the form:

>       http://<host>:<port>/<path>?<searchpart>

>   "where <host> and <port> are as described in Section 3.1. If :<port>
>    is omitted, the port defaults to 80.  No user name or password is
>    allowed.  <path> is an HTTP selector, and <searchpart> is a query
>    string. The <path> is optional, as is the <searchpart> and its
>    preceding "?". If neither <path> nor <searchpart> is present, the "/"
>    may also be omitted."   [1]

Right, so <http://emboss.sourceforge.net> or even
<http://emboss.sourceforge.net:80> are legal and equivalent to
<http://emboss.sourceforge.net/>.

However, there is also a "normalized form" of URIs, which does include
the trailing slash:

   "In general, a URI that uses the generic syntax for authority with
    an empty path should be normalized to a path of "/"." [2]

Ulrich


> [1] <http://www.ietf.org/rfc/rfc1738.txt>, p.8, section 3.3
[2] <http://tools.ietf.org/html/rfc3986#section-6.2.3>



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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-16  7:02     ` justin
  2011-03-16 17:13       ` Jeroen Roovers
@ 2011-03-16 18:49       ` Mike Frysinger
  2011-03-16 19:25         ` justin
  1 sibling, 1 reply; 26+ messages in thread
From: Mike Frysinger @ 2011-03-16 18:49 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 679 bytes --]

On Wednesday, March 16, 2011 03:02:01 justin wrote:
> >> #  $(use_with png pngdriver "${EPREFIX}/usr")
> >> #  $(use_with pdf hpdf "${EPREFIX}/usr")
> >> #  $(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config")
> >> #  $(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config")
> > 
> > do you really need full paths here ?  are the configure scripts that
> > screwed up ?  ideally libs would be found via .pc files.
> 
> It f..ing defaults to / roots if not specified

lame.  feel like pestering upstream to be smarter about this ?  like use 
AC_CHECK_TOOL(mysql_config) ?  and for things like libpng, use PKG_CONFIG 
macros to find the .pc files ?
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-16  9:36       ` Tomáš Chvátal
@ 2011-03-16 18:51         ` Mike Frysinger
  2011-03-19 19:33           ` justin
  0 siblings, 1 reply; 26+ messages in thread
From: Mike Frysinger @ 2011-03-16 18:51 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 795 bytes --]

On Wednesday, March 16, 2011 05:36:21 Tomáš Chvátal wrote:
> Dne 16.3.2011 07:48, justin napsal(a):
> > On 15/03/11 22:25, Tomáš Chvátal wrote:
> >> i am seriously hurt by $(use_enable amd64 64)
> > 
> > Where is the problem? The purpose of the eclass is not to repeat the
> > same code 20 times. Why can't this be here?
> 
> Problem is in amd64, what if we get to 64b mips OR ppc64 or any other
> non-32bit arch?

or using the upcoming x32 ABI with KEYWORDS=amd64 ?

if a package has a configure flag to control "64bitness", it is absolutely 
broken.  figure out what exactly the "64bitness" means (pointer size ?  data 
width ?  assumptions about size of long ?) and replace it with a proper 
configure time check.  then the whole 64 configure flag can be thrown away.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-16 17:59         ` Ulrich Mueller
@ 2011-03-16 19:23           ` justin
  0 siblings, 0 replies; 26+ messages in thread
From: justin @ 2011-03-16 19:23 UTC (permalink / raw
  To: gentoo-dev

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

On 16/03/11 18:59, Ulrich Mueller wrote:
>>>>>> On Wed, 16 Mar 2011, Jeroen Roovers wrote:
> 
>>   "An HTTP URL takes the form:
> 
>>       http://<host>:<port>/<path>?<searchpart>
> 
>>   "where <host> and <port> are as described in Section 3.1. If :<port>
>>    is omitted, the port defaults to 80.  No user name or password is
>>    allowed.  <path> is an HTTP selector, and <searchpart> is a query
>>    string. The <path> is optional, as is the <searchpart> and its
>>    preceding "?". If neither <path> nor <searchpart> is present, the "/"
>>    may also be omitted."   [1]
> 
> Right, so <http://emboss.sourceforge.net> or even
> <http://emboss.sourceforge.net:80> are legal and equivalent to
> <http://emboss.sourceforge.net/>.
> 
> However, there is also a "normalized form" of URIs, which does include
> the trailing slash:
> 
>    "In general, a URI that uses the generic syntax for authority with
>     an empty path should be normalized to a path of "/"." [2]
> 
> Ulrich
> 
> 
>> [1] <http://www.ietf.org/rfc/rfc1738.txt>, p.8, section 3.3
> [2] <http://tools.ietf.org/html/rfc3986#section-6.2.3>
> 

Thanks for clarification, justin


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

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-16 18:49       ` Mike Frysinger
@ 2011-03-16 19:25         ` justin
  0 siblings, 0 replies; 26+ messages in thread
From: justin @ 2011-03-16 19:25 UTC (permalink / raw
  To: gentoo-dev

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

On 16/03/11 19:49, Mike Frysinger wrote:
> On Wednesday, March 16, 2011 03:02:01 justin wrote:
>>>> #  $(use_with png pngdriver "${EPREFIX}/usr")
>>>> #  $(use_with pdf hpdf "${EPREFIX}/usr")
>>>> #  $(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config")
>>>> #  $(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config")
>>>
>>> do you really need full paths here ?  are the configure scripts that
>>> screwed up ?  ideally libs would be found via .pc files.
>>
>> It f..ing defaults to / roots if not specified
> 
> lame.  feel like pestering upstream to be smarter about this ?  like use 
> AC_CHECK_TOOL(mysql_config) ?  and for things like libpng, use PKG_CONFIG 
> macros to find the .pc files ?
> -mike

I will recheck that and see whether I can convince the build system to
be nice. I have to run eautoreconf anyways.

justin


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

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-16 18:51         ` Mike Frysinger
@ 2011-03-19 19:33           ` justin
  2011-03-20 18:39             ` Mike Frysinger
  0 siblings, 1 reply; 26+ messages in thread
From: justin @ 2011-03-19 19:33 UTC (permalink / raw
  To: gentoo-dev

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

On 16/03/11 19:51, Mike Frysinger wrote:
> On Wednesday, March 16, 2011 05:36:21 Tomáš Chvátal wrote:
>> Dne 16.3.2011 07:48, justin napsal(a):
>>> On 15/03/11 22:25, Tomáš Chvátal wrote:
>>>> i am seriously hurt by $(use_enable amd64 64)
>>>
>>> Where is the problem? The purpose of the eclass is not to repeat the
>>> same code 20 times. Why can't this be here?
>>
>> Problem is in amd64, what if we get to 64b mips OR ppc64 or any other
>> non-32bit arch?
> 
> or using the upcoming x32 ABI with KEYWORDS=amd64 ?
> 
> if a package has a configure flag to control "64bitness", it is absolutely 
> broken.  figure out what exactly the "64bitness" means (pointer size ?  data 
> width ?  assumptions about size of long ?) and replace it with a proper 
> configure time check.  then the whole 64 configure flag can be thrown away.
> -mike

Hi guys,

I need your help figure out how to handle the situation.

sample code is here: http://tinyurl.com/6ezv9uw

the configure adds -D__amd64__ to C(PP)FLAGS.

To me it should be set this on 64bit. Do I interpret that right?

How can I check for 64bitness during configure?

Thanks for help justin


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

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-19 19:33           ` justin
@ 2011-03-20 18:39             ` Mike Frysinger
  2011-03-21 10:37               ` justin
  0 siblings, 1 reply; 26+ messages in thread
From: Mike Frysinger @ 2011-03-20 18:39 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: Text/Plain, Size: 1306 bytes --]

On Saturday, March 19, 2011 15:33:00 justin wrote:
> I need your help figure out how to handle the situation.
> 
> sample code is here: http://tinyurl.com/6ezv9uw

dont do that.  tinyurl's die, as do websites.  just attach the code.  see the 
one example func attached.

is this the only way the define is used ?  this file has no "64bit" behavior 
in it at all, only x86_64 ABI-specific behavior.

the behavior it's looking at though really shouldnt be encoded into 
applications.  apparently the code relies on whether stdargs generates a fresh 
list on the stack (and thus can be modified without modifying the original 
arguments), or if it refers directly to the original arguments.

i'd have to look up what POSIX says on the matter, but if they're going to 
delving down that far into the ABI, then it sounds like the code is fairly 
fragile.  but that's upstream's choice to write crap code.

> the configure adds -D__amd64__ to C(PP)FLAGS.
> 
> To me it should be set this on 64bit. Do I interpret that right?

no.  the compiler already takes care of defining __amd64__ for x86_64 targets, 
so there's no need to manually define it.

so if this is the only place where __amd64__ is used, then you should make 
sure the configure code never manually appends it.
-mike

[-- Attachment #1.2: example.c --]
[-- Type: text/x-csrc, Size: 632 bytes --]

AjPStr ajFmtStr(const char* fmt, ...)
{
    va_list ap;
#if defined(__amd64__) || defined (__EM64T__) || \
    defined(__PPC__) && defined(_CALL_SYSV)
    va_list save_ap;
#endif
    ajint len = 32;
    AjPStr fnew;

    fnew = ajStrNewRes(len);
    va_start(ap, fmt);

#if defined(__amd64__) || defined(__EM64T__) || \
    defined(__PPC__) && defined(_CALL_SYSV)
    __va_copy(save_ap, ap);
#endif

    fnew->Len = ajFmtVfmtStrCL(&fnew->Ptr, 0, &fnew->Res, fmt, ap);

#if defined(__amd64__) || defined(__EM64T__) || \
    defined(__PPC__) && defined(_CALL_SYSV)
	__va_copy(ap, save_ap);
#endif

    va_end(ap);

    return fnew;
}

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-20 18:39             ` Mike Frysinger
@ 2011-03-21 10:37               ` justin
  2011-03-21 13:04                 ` Mike Frysinger
  0 siblings, 1 reply; 26+ messages in thread
From: justin @ 2011-03-21 10:37 UTC (permalink / raw
  To: gentoo-dev

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

During closer investigation I found that it alos changes data width and
similar. probably something which should be checked during configure.

I attached some code as example:


from configure:

AC_ARG_ENABLE(64,
   AS_HELP_STRING([--enable-64], [64 bit pointers]))
if test "${enable_64}" = "yes" ; then
AC_MSG_CHECKING(for 64bit compilation support)

dnl Test for Linux 64 bit

if test "`uname`" = "Linux"; then
CPPFLAGS="-DAJ_Linux64 $CPPFLAGS"
fi


exmaple header:


dnl Test for FreeBSD 64 bit
#if !defined(AJ_LinuxLF) && !defined(AJ_SolarisLF) &&
!defined(AJ_IRIXLF) && !defined(AJ_AIXLF) && !defined(AJ_HPUXLF) &&
!defined(AJ_MACOSXLF) && !defined(AJ_FreeBSDLF) && !defined(WIN32)
typedef int ajint;
typedef long ajlong;
typedef unsigned int ajuint;
typedef short ajshort;
typedef unsigned short ajushort;
typedef unsigned long ajulong;
#endif


#ifdef AJ_LinuxLF
#define HAVE64
typedef int ajint;
typedef long long ajlong;
typedef unsigned int ajuint;
typedef short ajshort;
typedef unsigned short ajushort;
typedef unsigned long long ajulong;
#define ftell(a) ftello(a)
#define fseek(a,b,c) fseeko(a,b,c)
#endif


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

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-21 10:37               ` justin
@ 2011-03-21 13:04                 ` Mike Frysinger
  2011-03-21 13:14                   ` Fabian Groffen
  2011-03-27 14:34                   ` justin
  0 siblings, 2 replies; 26+ messages in thread
From: Mike Frysinger @ 2011-03-21 13:04 UTC (permalink / raw
  To: gentoo-dev

On Mon, Mar 21, 2011 at 6:37 AM, justin wrote:
> During closer investigation I found that it alos changes data width and
> similar. probably something which should be checked during configure.

oh god, this is why it burns

> AC_ARG_ENABLE(64,
>   AS_HELP_STRING([--enable-64], [64 bit pointers]))
> if test "${enable_64}" = "yes" ; then
> AC_MSG_CHECKING(for 64bit compilation support)
>
> dnl Test for Linux 64 bit
>
> if test "`uname`" = "Linux"; then
> CPPFLAGS="-DAJ_Linux64 $CPPFLAGS"
> fi

this all needs to be punted

> exmaple header:
>
>
> dnl Test for FreeBSD 64 bit
> #if !defined(AJ_LinuxLF) && !defined(AJ_SolarisLF) &&
> !defined(AJ_IRIXLF) && !defined(AJ_AIXLF) && !defined(AJ_HPUXLF) &&
> !defined(AJ_MACOSXLF) && !defined(AJ_FreeBSDLF) && !defined(WIN32)
> typedef int ajint;
> typedef long ajlong;
> typedef unsigned int ajuint;
> typedef short ajshort;
> typedef unsigned short ajushort;
> typedef unsigned long ajulong;
> #endif
>
>
> #ifdef AJ_LinuxLF
> #define HAVE64
> typedef int ajint;
> typedef long long ajlong;
> typedef unsigned int ajuint;
> typedef short ajshort;
> typedef unsigned short ajushort;
> typedef unsigned long long ajulong;
> #define ftell(a) ftello(a)
> #define fseek(a,b,c) fseeko(a,b,c)
> #endif

so it wants to normalize aj* types to a specific size.  it'd make more
sense to include stdint.h and then do:
typedef int32_t ajint;
typedef int64_t ajlong;
typedef uint32_t ajuint;
typedef int16_t ajshort;
typedef uint16_t ajushort;
typedef uint64_t ajulong;

this should work for *all* targets

ftell vs ftello is a bit weirder.  i'd say always call ftello() all
the time and let the off_t types worry about 32 bit vs 64 bit.  so in
the configure script. do something like:
AC_CHECK_FUNCS([ftello fseeko])

then in the header:
#ifdef HAVE_FTELLO
#define ftell(a) ftello(a)
#endif
#ifdef HAVE_FSEEKO
#define fseek(a,b,c) fseeko(a,b,c)
#endif

and again, this should work for all targets, not just linux
-mike



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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-21 13:04                 ` Mike Frysinger
@ 2011-03-21 13:14                   ` Fabian Groffen
  2011-03-21 13:20                     ` Mike Frysinger
  2011-03-27 14:34                   ` justin
  1 sibling, 1 reply; 26+ messages in thread
From: Fabian Groffen @ 2011-03-21 13:14 UTC (permalink / raw
  To: gentoo-dev

On 21-03-2011 09:04:24 -0400, Mike Frysinger wrote:
> ftell vs ftello is a bit weirder.  i'd say always call ftello() all
> the time and let the off_t types worry about 32 bit vs 64 bit.  so in
> the configure script. do something like:
> AC_CHECK_FUNCS([ftello fseeko])

FYI:
There is an AC_FUNC_FSEEKO macro, that is designed to deal with this
specifically, in case more is necessary.

> then in the header:
> #ifdef HAVE_FTELLO
> #define ftell(a) ftello(a)
> #endif
> #ifdef HAVE_FSEEKO
> #define fseek(a,b,c) fseeko(a,b,c)
> #endif
> 
> and again, this should work for all targets, not just linux


-- 
Fabian Groffen
Gentoo on a different level



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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-21 13:14                   ` Fabian Groffen
@ 2011-03-21 13:20                     ` Mike Frysinger
  0 siblings, 0 replies; 26+ messages in thread
From: Mike Frysinger @ 2011-03-21 13:20 UTC (permalink / raw
  To: gentoo-dev

On Mon, Mar 21, 2011 at 9:14 AM, Fabian Groffen wrote:
> On 21-03-2011 09:04:24 -0400, Mike Frysinger wrote:
>> ftell vs ftello is a bit weirder.  i'd say always call ftello() all
>> the time and let the off_t types worry about 32 bit vs 64 bit.  so in
>> the configure script. do something like:
>> AC_CHECK_FUNCS([ftello fseeko])
>
> FYI:
> There is an AC_FUNC_FSEEKO macro, that is designed to deal with this
> specifically, in case more is necessary.

thanks, i wasnt aware of that.  that probably is much better than the
AC_CHECK_FUNCS invocation i posted above.
-mike



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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-21 13:04                 ` Mike Frysinger
  2011-03-21 13:14                   ` Fabian Groffen
@ 2011-03-27 14:34                   ` justin
  2011-03-27 14:50                     ` Mike Frysinger
  1 sibling, 1 reply; 26+ messages in thread
From: justin @ 2011-03-27 14:34 UTC (permalink / raw
  To: gentoo-dev

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

So I need one last hint, how to correct following correctly?


#if defined (HAVE64) && !defined(AJ_MACOSXLF) && !defined(AJ_HPUXLF) &&
!defined(AJ_FreeBSDLF) && !defined(AJ_AIXLF)
    struct dirent64 *dp;
#else
    struct dirent *dp;
#endif

#if defined (HAVE64) && !defined(AJ_MACOSXLF) && !defined(AJ_HPUXLF) &&
!defined(AJ_FreeBSDLF) && !defined(AJ_AIXLF)
    struct stat64 sbuf;
#else
    struct stat sbuf;
#endif


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

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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-27 14:34                   ` justin
@ 2011-03-27 14:50                     ` Mike Frysinger
  2011-03-27 15:34                       ` justin
  0 siblings, 1 reply; 26+ messages in thread
From: Mike Frysinger @ 2011-03-27 14:50 UTC (permalink / raw
  To: gentoo-dev

On Sun, Mar 27, 2011 at 10:34 AM, justin wrote:
> So I need one last hint, how to correct following correctly?
>
>
> #if defined (HAVE64) && !defined(AJ_MACOSXLF) && !defined(AJ_HPUXLF) &&
> !defined(AJ_FreeBSDLF) && !defined(AJ_AIXLF)
>    struct dirent64 *dp;
> #else
>    struct dirent *dp;
> #endif
>
> #if defined (HAVE64) && !defined(AJ_MACOSXLF) && !defined(AJ_HPUXLF) &&
> !defined(AJ_FreeBSDLF) && !defined(AJ_AIXLF)
>    struct stat64 sbuf;
> #else
>    struct stat sbuf;
> #endif

neither should be necessary with LFS.  if you call
AC_USE_SYSTEM_EXTENSIONS or AC_SYS_LARGEFILE, the system will take
care of translating stat into stat64 as needed.

but in practice, i guess what they'll want to do is:
 - call AC_USE_SYSTEM_EXTENSIONS at top of configure script
 - add some AC_TRY_COMPILE's:
AC_CACHE_CHECK([for stat64], ac_cv_struct_stat64,
  [AC_TRY_COMPILE([#include <sys/stat.h>],
  [struct stat64 st],
  ac_cv_struct_stat64=yes, ac_cv_struct_stat64=no)])
  if test "x$ac_cv_struct_stat64" = xyes; then
    AC_DEFINE(HAVE_STRUCT_STAT64)
  fi
 - change the code to look at HAVE_STRUCT_STAT64 instead of random
system defines

(largely untested :P)
-mike



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

* Re: [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass
  2011-03-27 14:50                     ` Mike Frysinger
@ 2011-03-27 15:34                       ` justin
  0 siblings, 0 replies; 26+ messages in thread
From: justin @ 2011-03-27 15:34 UTC (permalink / raw
  To: gentoo-dev

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

On 27/03/11 16:50, Mike Frysinger wrote:
> On Sun, Mar 27, 2011 at 10:34 AM, justin wrote:
>> So I need one last hint, how to correct following correctly?
>>
>>
>> #if defined (HAVE64) && !defined(AJ_MACOSXLF) && !defined(AJ_HPUXLF) &&
>> !defined(AJ_FreeBSDLF) && !defined(AJ_AIXLF)
>>    struct dirent64 *dp;
>> #else
>>    struct dirent *dp;
>> #endif
>>
>> #if defined (HAVE64) && !defined(AJ_MACOSXLF) && !defined(AJ_HPUXLF) &&
>> !defined(AJ_FreeBSDLF) && !defined(AJ_AIXLF)
>>    struct stat64 sbuf;
>> #else
>>    struct stat sbuf;
>> #endif
> 
> neither should be necessary with LFS.  if you call
> AC_USE_SYSTEM_EXTENSIONS or AC_SYS_LARGEFILE, the system will take
> care of translating stat into stat64 as needed.
> 
> but in practice, i guess what they'll want to do is:
>  - call AC_USE_SYSTEM_EXTENSIONS at top of configure script
>  - add some AC_TRY_COMPILE's:
> AC_CACHE_CHECK([for stat64], ac_cv_struct_stat64,
>   [AC_TRY_COMPILE([#include <sys/stat.h>],
>   [struct stat64 st],
>   ac_cv_struct_stat64=yes, ac_cv_struct_stat64=no)])
>   if test "x$ac_cv_struct_stat64" = xyes; then
>     AC_DEFINE(HAVE_STRUCT_STAT64)
>   fi
>  - change the code to look at HAVE_STRUCT_STAT64 instead of random
> system defines
> 
> (largely untested :P)
> -mike
> 

Thanks Mike,

compiletime and runtime tests are fine. I really owe you one!


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

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

end of thread, other threads:[~2011-03-27 15:35 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15  7:33 [gentoo-dev] RFC: emboss.eclass as replacement for embassy.eclass justin
2011-03-15 20:51 ` justin
2011-03-15 21:25   ` Tomáš Chvátal
2011-03-16  6:48     ` justin
2011-03-16  9:36       ` Tomáš Chvátal
2011-03-16 18:51         ` Mike Frysinger
2011-03-19 19:33           ` justin
2011-03-20 18:39             ` Mike Frysinger
2011-03-21 10:37               ` justin
2011-03-21 13:04                 ` Mike Frysinger
2011-03-21 13:14                   ` Fabian Groffen
2011-03-21 13:20                     ` Mike Frysinger
2011-03-27 14:34                   ` justin
2011-03-27 14:50                     ` Mike Frysinger
2011-03-27 15:34                       ` justin
2011-03-15 22:06   ` Mike Frysinger
2011-03-15 23:25     ` [gentoo-dev] " Duncan
2011-03-16  3:00     ` [gentoo-dev] " Jeroen Roovers
2011-03-16  3:17       ` Jeremy Olexa
2011-03-16  7:02     ` justin
2011-03-16 17:13       ` Jeroen Roovers
2011-03-16 17:59         ` Ulrich Mueller
2011-03-16 19:23           ` justin
2011-03-16 18:49       ` Mike Frysinger
2011-03-16 19:25         ` justin
2011-03-16  7:20     ` justin

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