Package: x11-xlocale-fix Version: 1 Revision: 1 BuildDepends: x11-dev # not sure if 10.5's x11 is bugged but this hack seems unlikely to # break anything, and it's nice to allow other other packages to keep # their 10.5 vs 10.6 BuildDepends in sync Distribution: 10.5, 10.6 # the bug appears fixed as of x11 in 10.7 Type: nosource PatchScript: << #!/bin/sh -ev cat > Xlocale.h < #include /* if the "new" (bug-fixed) x11 token isn't used, assume x11's is old and so we need to hack to allow loading of it even after Apple's is loaded */ #ifndef _X11_XLOCALE_H_ #undef _XLOCALE_H_ #include /* _XLOCALE_H_ has now presumably been re-defined because that's what the old x11 would do; not doing any sanity-checking here because we don't have any solution to other situations */ #endif #endif /* _FINK_X11_XLOCALE_H_ */ EOFILE << CompileScript: # InstallScript: << mkdir -p %i/include/x11-xlocale-fix/X11 install -m0644 Xlocale.h %i/include/x11-xlocale-fix/X11 << DescUsage: << To use, make sure %p/include/x11-xlocale-fix/X11/Xlocale.h is used whenever a source wants X11/Xlocale.h, rather than directly accessing the one that comes with X11 itself. One way is to pass -I%p/include/x11-xlocale-fix to the compiler. This flag must come before -I/usr/X11/include or other ways that would expose x11's actual header. Another way is to patch sources to #include the special .h directly (x11-xlocale-fix/X11/Xlocale.h rather than X11/Xlocale.h). Doing so only requires passing the usual -I%p/include, no extra -I or special ordering required. << DescDetail: << Use our own include-once guard token to avoid collision between apple's xlocale.h and some older versions of x11's X11/Xlocale.h (would prevent #including both of them). See upstream git commit d0cbf388919364fe6b5b9127f36426eb744090a0 << Description: Work around a bug in some X11/Xlocale.h Maintainer: Daniel Macks License: BSD