Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263897 - x11-libs/libXt: Better patch for cross-compiling
Summary: x11-libs/libXt: Better patch for cross-compiling
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-26 20:18 UTC by Sven 'sleipnir' Rebhan
Modified: 2009-09-13 07:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Better patch for libXt (libXt-1.0.5.patch,849 bytes, patch)
2009-03-26 20:20 UTC, Sven 'sleipnir' Rebhan
Details | Diff
Better patch for libXt - ebuild part (libXt-1.0.5.patch,342 bytes, patch)
2009-03-26 22:52 UTC, Sven 'sleipnir' Rebhan
Details | Diff
Automake/conf fixes (libXt-1.0.5-crosscompile-makestr.patch,1.94 KB, patch)
2009-03-26 22:53 UTC, Sven 'sleipnir' Rebhan
Details | Diff
Reworked patch (libXt-1.0.5-crosscompile-makestr.patch,2.01 KB, patch)
2009-03-30 21:18 UTC, Sven 'sleipnir' Rebhan
Details | Diff
enables xcompilation of libXt-1.0.6 (libXt-1.0.6-cross.patch,1.74 KB, patch)
2009-09-13 01:06 UTC, Martin Gysel (bearsh)
Details | Diff
set CFLAGS_FOR_BUILD in ebuild (libXt-1.0.6.ebuild-cross.patch,360 bytes, patch)
2009-09-13 01:12 UTC, Martin Gysel (bearsh)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven 'sleipnir' Rebhan 2009-03-26 20:18:49 UTC
The current patch for cross-compiling libXt assumes that libXt (or at least the makestr binary) is installed to the build host. However, the following patch doesn't put in that contrain, but rather compiles a host version of makestr for building the target files.

Reproducible: Always
Comment 1 Sven 'sleipnir' Rebhan 2009-03-26 20:20:37 UTC
Created attachment 186355 [details, diff]
Better patch for libXt

This patch applies to the libXt ebuild. It does not require the makestr binary to be available on the compile host, but rather compiles a host version itself.
Comment 2 solar (RETIRED) gentoo-dev 2009-03-26 20:50:38 UTC
Pretty sure x11 team would prefer all patches be done to the source vs the ebuilds.
Comment 3 Sven 'sleipnir' Rebhan 2009-03-26 21:04:10 UTC
I just "copied" the solution to libX11's makekeys. However, if they want me to do a better patch to the sources, they will tell me hopefully!?
Comment 4 Tomáš Chvátal (RETIRED) gentoo-dev 2009-03-26 21:08:12 UTC
We allways prefer patch to sources that can be pushed upstream.
It is quite logical :]
Comment 5 Sven 'sleipnir' Rebhan 2009-03-26 22:52:51 UTC
Created attachment 186364 [details, diff]
Better patch for libXt - ebuild part

You want love, you get love...
Comment 6 Sven 'sleipnir' Rebhan 2009-03-26 22:53:45 UTC
Created attachment 186366 [details, diff]
Automake/conf fixes

Your whish is my command!
Comment 7 Sven 'sleipnir' Rebhan 2009-03-26 22:54:24 UTC
A patch for libX11 will follow in a separate patch.
Comment 8 solar (RETIRED) gentoo-dev 2009-03-26 23:39:55 UTC
(In reply to comment #5)
> Created an attachment (id=186364) [edit]
> Better patch for libXt - ebuild part

Good work Sven. At this rate you keep it up and one of us poor suckers is going to have to mentor you.


(In reply to comment #7)
> A patch for libX11 will follow in a separate patch.

Ok but can you do that in another bug please?
This one here you reserved for libXt.

Comment 9 Sven 'sleipnir' Rebhan 2009-03-27 08:03:29 UTC
A simlar patch for libX11 can be found in #263937.
Comment 10 Rémi Cardona (RETIRED) gentoo-dev 2009-03-28 07:58:13 UTC
Please open a bug in FreeDesktop's bugzilla with your patch attached to it and paste the url here.

Thanks
Comment 11 SpanKY gentoo-dev 2009-03-28 11:19:59 UTC
well, you know about $cross_compiling, but you dont always use it, so that's odd

unless there's an X standard for using XX_FOR_BUILD, i'd suggest we go with BUILD_XX style

you should use +set style to figure out whether a var is set:
if test "x${BUILD_CC+set}" != "xset" ; then
  if test "x$cross_compiling" = "xyes" ; then
    BUILD_CC=gcc
  else
    BUILD_CC=$CC
  fi
fi

does incrementing noinst_PROGRAMS not work ?
if CROSS_COMPILING
noinst_PROGRAMS += xmakestrs$(EXEEXT)
Comment 12 Sven 'sleipnir' Rebhan 2009-03-30 21:18:45 UTC
Created attachment 186804 [details, diff]
Reworked patch

Some fixes of vapier applied. However, I sticked with CC_FOR_BUILD as the config.guess in the project dir also had this as a name for the host compiler.
Comment 13 Sven 'sleipnir' Rebhan 2009-03-30 21:21:02 UTC
I will submit the patch to Freedesktop's bugzilla in the next days and paste the link here...
Comment 14 Sven 'sleipnir' Rebhan 2009-03-30 21:34:35 UTC
Upstream submission: http://bugs.freedesktop.org/show_bug.cgi?id=20958
Comment 15 Rémi Cardona (RETIRED) gentoo-dev 2009-08-17 22:48:34 UTC
Upstream says this is already fixed. Care to let me know what needs to be done now?

Thanks
Comment 16 Martin Gysel (bearsh) 2009-09-13 01:01:17 UTC
(In reply to comment #15)
> Upstream says this is already fixed. Care to let me know what needs to be done
> now?

it is fixed in a way which doesn't work for gentoo/xcompile
Comment 17 Martin Gysel (bearsh) 2009-09-13 01:03:56 UTC
I addapted sleipnir's patch for libXt-1.0.6 and modified the ebuild. now it cross-compiles...
Comment 18 Martin Gysel (bearsh) 2009-09-13 01:06:09 UTC
Created attachment 203895 [details, diff]
enables xcompilation of libXt-1.0.6
Comment 19 Martin Gysel (bearsh) 2009-09-13 01:12:41 UTC
Created attachment 203896 [details, diff]
set CFLAGS_FOR_BUILD in ebuild
Comment 20 Rémi Cardona (RETIRED) gentoo-dev 2009-09-13 07:40:08 UTC
Again, please file a bug upstream and paste the url here so that this patch gets a proper review.

I won't add patches that are not accepted or ACKed by upstream.

Thanks