HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • ← Previous Ticket
  • Next Ticket →

Ticket #330 (closed task: fixed)

Opened 5 years ago

Last modified 3 years ago

[libx11] add

Reported by: michaelvoliveira Owned by: michaelvoliveira
Priority: normal Milestone: Unscheduled
Component: x11-libs/libx11 Version:
Severity: normal Keywords: x11 xproto
Cc:

Description

X.Org X11 library

 http://xorg.freedesktop.org/

This is a huge library with a lots of dependencies

so I'll concentrate all here..

Attachments

xproto-7.0.16.patch​ (1.5 KB) - added by michaelvoliveira 5 years ago.
Patch based in a Kaliber port for TiltOS
libxau-1.0.5.patch​ (544 bytes) - added by michaelvoliveira 5 years ago.
patch to detect libnetwork
libx11-1.3.3.patch​ (1.1 KB) - added by michaelvoliveira 5 years ago.
Initial .patch file
libx11.OptionalPackageDescription​ (1.5 KB) - added by michaelvoliveira 5 years ago.
Refactored .opd file
util-macros-1.7.0.bep​ (425 bytes) - added by michaelvoliveira 5 years ago.
Added dependencies and checksum
xproto-7.0.16.bep​ (456 bytes) - added by michaelvoliveira 5 years ago.
Added dependencies and checksum
libx11-1.3.3.bep​ (807 bytes) - added by michaelvoliveira 5 years ago.
added xextproto as dependency
libpthread-stubs-0.3.2.bep​ (444 bytes) - added by michaelvoliveira 5 years ago.
checksum md5 found!
libpthread-stubs-0.3.bep​ (444 bytes) - added by michaelvoliveira 5 years ago.
ooops. replace the other one!
libxau-1.0.5.bep​ (481 bytes) - added by michaelvoliveira 5 years ago.
corrected pkgconfig dependency (added version number)
inputproto-2.0.bep​ (464 bytes) - added by michaelvoliveira 5 years ago.
removed unnecessary dependencies
kbproto-1.0.4.bep​ (458 bytes) - added by michaelvoliveira 5 years ago.
removed unnecessary dependencies
xcb-proto-1.6.bep​ (417 bytes) - added by michaelvoliveira 5 years ago.
removed unnecessary dependencies
xextproto-7.1.1.bep​ (466 bytes) - added by michaelvoliveira 5 years ago.
removed unnecessary dependencies
xtrans-1.2.5.patch​ (1.2 KB) - added by michaelvoliveira 5 years ago.
Removed SUN_LEN references
xtrans-1.2.5.bep​ (484 bytes) - added by michaelvoliveira 5 years ago.
added pkgconfig as dependency
libxcb-1.6.patch​ (925 bytes) - added by michaelvoliveira 5 years ago.
Removed SUN_LEN macro reference
libxcb-1.6.bep​ (497 bytes) - added by michaelvoliveira 5 years ago.
added pkgconfig as dependency. Removed unnecessary dependencies

Download all attachments as: .zip

Change History

Changed 5 years ago by michaelvoliveira

  • attachment xproto-7.0.16.patch​ added

Patch based in a Kaliber port for TiltOS

comment:1 Changed 5 years ago by michaelvoliveira

  • Component changed from default to x11-libs/libx11
  • Owner set to michaelvoliveira

comment:2 Changed 5 years ago by michaelvoliveira

  • Type changed from defect to task

Changed 5 years ago by michaelvoliveira

  • attachment libxau-1.0.5.patch​ added

patch to detect libnetwork

Changed 5 years ago by michaelvoliveira

  • attachment libx11-1.3.3.patch​ added

Initial .patch file

comment:3 Changed 5 years ago by michaelvoliveira

Build Structure, in the following order

util-macros
xproto
xtrans
kbproto
inputproto
libxcb
-xcb-proto
-libxslt
-libXau
libX11

comment:4 Changed 5 years ago by michaelvoliveira

This one will be split in many folders (X11-libs/libxcb, X11-libs/libxau, etc...) ?

comment:5 Changed 5 years ago by michaelvoliveira

Now is ready for review

comment:6 Changed 5 years ago by augiedoggie

It would be nice if there were checksums in the bep files.

The copyright field doesn't need to have (C) in it or any extra text like 'All rights reserved'

The license field in the OPD file has invalid license names. If the software uses multiple licenses then each one is listed on its own line and needs to be a valid name. MIT is ok, but for BSD you need to specify which version because there are at least three. You can see the correct names by looking at the files in /boot/system/data/licenses. For the X11 license there needs to be a separate file that can be copied into the repository that contains the text.

For example:

License:    MIT
License:    BSD (2-clause)
License:    X11

The DEPEND field in the bep files is not correct according to the wiki page. It needs to be something like:

DEPEND="media-libs/libx >= XXX
    dev-libs/liby >= YYY
    sys-apps/appz >= ZZZ"

There should be separate OPD files for each of the packages in addition to the unified one. Whoever adds this can probably split it up but it is something to think about in the future.

It would be nice if some of the URL links went to a specific web page for the library. For example util-macros is just a link to the main oracle website instead of a page about the software.

comment:7 Changed 5 years ago by michaelvoliveira

ahhh! thanks for the fast reply augiedoggie!!

I'll take care after a good sleep

comment:8 Changed 5 years ago by michaelvoliveira

another thing augiedoggie

In xcb_util.c from libxcb have the following piece of code:

#ifdef HAVE_SOCKADDR_SUN_LEN
    addr.sun_len = SUN_LEN(&addr);
#endif

but SUN_LEN != sun_len

and seems that sys/un.h don't define SUN_LEN like opensolaris one..
 http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/sys/un.h

so the lib don't work

could appoint me some solution?

comment:9 Changed 5 years ago by augiedoggie

Haiku doesn't have full support for unix domain sockets so it's possible that this macro isn't available. You could file an enhancement ticket on the Haiku trac but I don't know if it will be a high priority for them. It may be possible to disable support for this somewhere in the configure scripts so that HAVE_SOCKADDR_SUN_LEN isn't detected for Haiku.

comment:10 follow-up: ↓ 11 Changed 5 years ago by bonefish

sockaddr_un::sun_len is not POSIX at least. I don't know, if there's any actual standard covering it. Haiku has it, but not a SUN_LEN macro. You can change the code snippet to:

#ifdef HAVE_SOCKADDR_SUN_LEN
#   ifdef SUN_LEN
        addr.sun_len = SUN_LEN(&addr);
#   else
        addr.sun_len = sizeof(sockaddr_un);
#   endif
#endif

Alternatively it might be more convenient to define the macro in some central place (possibly even via configure):

#ifdnef SUN_LEN
#   define SUN_LEN(addr) sizeof(sockaddr_un)
#endif

Changed 5 years ago by michaelvoliveira

  • attachment libx11.OptionalPackageDescription​ added

Refactored .opd file

comment:11 in reply to: ↑ 10 ; follow-up: ↓ 14 Changed 5 years ago by augiedoggie

Replying to bonefish:

sockaddr_un::sun_len is not POSIX at least. I don't know, if there's any actual standard covering it. Haiku has it, but not a SUN_LEN macro. You can change the code snippet to:

#ifdef HAVE_SOCKADDR_SUN_LEN
#   ifdef SUN_LEN
        addr.sun_len = SUN_LEN(&addr);
#   else
        addr.sun_len = sizeof(sockaddr_un);
#   endif
#endif

Alternatively it might be more convenient to define the macro in some central place (possibly even via configure):

#ifdnef SUN_LEN
#   define SUN_LEN(addr) sizeof(sockaddr_un)
#endif

I'm sure Ingo knows much more about this than I do, but it seems like this is incorrect. In OSX, Linux, and Solaris the SUN_LEN macro takes into account how much of sun_path is actually being used with a strlen() call. I think it would work to use sizeof(sockaddr_un) but it would be wasting a small amount of memory. Perhaps I am mistaken though.

Changed 5 years ago by michaelvoliveira

  • attachment util-macros-1.7.0.bep​ added

Added dependencies and checksum

Changed 5 years ago by michaelvoliveira

  • attachment xproto-7.0.16.bep​ added

Added dependencies and checksum

Changed 5 years ago by michaelvoliveira

  • attachment libx11-1.3.3.bep​ added

added xextproto as dependency

comment:12 Changed 5 years ago by michaelvoliveira

I'm sorry for re-upload all .bep files

I take the wrongs md5 codes from Macports.
I did a clean Haiku build and tested again one by one
Never will happen again.

Back to SUN_LEN problem, libX11 continues showing the error "libX11.so.6.3.0: Could not resolve symbol 'SUN_LEN'" but the SUN_LEN code from libxcb was taken away with bonefish and augiedoggie suggestions... and libx11 has no reference to sys/un.h ...

very strange...

comment:13 Changed 5 years ago by michaelvoliveira

Maybe can be Xtranssock.c from xtrans lib which is dependency of libX11

#if (defined(BSD44SOCKETS) || defined(__UNIXWARE__)) 
    sockname.sun_len = strlen(sockname.sun_path);
#endif

#if defined(BSD44SOCKETS) || defined(SUN_LEN)
    namelen = SUN_LEN(&sockname);
#else
    namelen = strlen(sockname.sun_path) + offsetof(struct sockaddr_un, sun_path);
#endif

comment:14 in reply to: ↑ 11 Changed 5 years ago by bonefish

Replying to augiedoggie:

I'm sure Ingo knows much more about this than I do, but it seems like this is incorrect. In OSX, Linux, and Solaris the SUN_LEN macro takes into account how much of sun_path is actually being used with a strlen() call. I think it would work to use sizeof(sockaddr_un) but it would be wasting a small amount of memory. Perhaps I am mistaken though.

I just had a closer look. First of all, filling in the sun_len field should be unnecessary on all POSIX compliant platforms. It definitely is unnecessary on Haiku -- the field is ignored. The code snippet could therefore just be changed to:

#if defined(HAVE_SOCKADDR_SUN_LEN) && defined(SUN_LEN)
    addr.sun_len = SUN_LEN(&addr);
#endif

Regarding waste of space, this is really a non-issue. As I interpret the specs POSIX compliant software has to use a sockaddr_un structure and has to pass sizeof(sockaddr_un) to functions like bind() and connect(). So there's nothing to save.

Regarding SUN_LEN(), unless I miss something this seems to be a macro that is really only needed for POSIX noncompliant platforms, and compliant platforms probably only have it to keep software supporting the former platforms happy. I suppose we can introduce it in Haiku, too, but I don't consider this any kind of priority.

Cf.  Haiku ticket #3255.

Changed 5 years ago by michaelvoliveira

  • attachment libpthread-stubs-0.3.2.bep​ added

checksum md5 found!

Changed 5 years ago by michaelvoliveira

  • attachment libpthread-stubs-0.3.bep​ added

ooops. replace the other one!

comment:15 Changed 5 years ago by michaelvoliveira

Ok! after replace all SUN_LEN, now I'm getting the following error.. opening an app that uses libx11

 http://pastebin.com/WaRpPfmj

Seems that is the line#47 of Macros.c from LibX11

int XDefaultScreen(Display *dpy) { return (DefaultScreen(dpy)); }

Changed 5 years ago by michaelvoliveira

  • attachment libxau-1.0.5.bep​ added

corrected pkgconfig dependency (added version number)

Changed 5 years ago by michaelvoliveira

  • attachment inputproto-2.0.bep​ added

removed unnecessary dependencies

Changed 5 years ago by michaelvoliveira

  • attachment kbproto-1.0.4.bep​ added

removed unnecessary dependencies

Changed 5 years ago by michaelvoliveira

  • attachment xcb-proto-1.6.bep​ added

removed unnecessary dependencies

Changed 5 years ago by michaelvoliveira

  • attachment xextproto-7.1.1.bep​ added

removed unnecessary dependencies

Changed 5 years ago by michaelvoliveira

  • attachment xtrans-1.2.5.patch​ added

Removed SUN_LEN references

Changed 5 years ago by michaelvoliveira

  • attachment xtrans-1.2.5.bep​ added

added pkgconfig as dependency

Changed 5 years ago by michaelvoliveira

  • attachment libxcb-1.6.patch​ added

Removed SUN_LEN macro reference

Changed 5 years ago by michaelvoliveira

  • attachment libxcb-1.6.bep​ added

added pkgconfig as dependency. Removed unnecessary dependencies

comment:16 Changed 5 years ago by michaelvoliveira

Now is all ready for review.

comment:17 Changed 5 years ago by michaelvoliveira

  • Resolution set to fixed
  • Status changed from new to closed

Done in revision #766

comment:18 Changed 3 years ago by cipri

the build fails with the message:

Warning: download error, trying next location.
Error: Failed to download source package from all locations.

(and my connection i fine)

comment:19 Changed 3 years ago by cipri

ok. wrong info. The download works now again, but now it fails to build with:

configure.ac:29: error: must install xorg-macros 1.3 or later before running autoconf/autogen
configure.ac:29: the top level
autom4te: /boot/common/bin/m4 failed with exit status: 1
aclocal: /boot/common/bin/autom4te failed with exit status: 1
autoreconf: aclocal failed with exit status: 1

Perhaps somebody can take a look at it.

Version 1, edited 3 years ago by cipri (previous) (next) (diff)
Note: See TracTickets for help on using tickets.

Download in other formats:

  • Comma-delimited Text
  • Tab-delimited Text
  • RSS Feed

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/