alternative from mk/jpeg.buildlink3.mk
This allows selection of an alternative jpeg library (namely the x86 MMX,
SSE, SSE2 accelerated libjpeg-turbo) via JPEG_DEFAULT=libjpeg-turbo, and
follows the current standard model for alternatives (fam, motif, fuse etc).
The mechanical edits were applied via the following script:
#!/bin/sh
for d in */*; do
[ -d "$d" ] || continue
for i in "$d/"Makefile* "$d/"*.mk; do
case "$i" in *.orig|*"*"*) continue;; esac
out="$d/x"
sed -e 's;graphics/jpeg/buildlink3\.mk;mk/jpeg.buildlink3.mk;g' \
-e 's;BUILDLINK_PREFIX\.jpeg;JPEGBASE;g' \
< "$i" > "$out"
if cmp -s "$i" "$out"; then
rm -f "$out"
else
echo "Edited $i"
mv -f "$i" "$i.orig" && mv "$out" "$i"
fi
done
done
Directories in LOCALBASE must not be added, or break build of some qt packages.
For examples, mis-pick up old header files of itself, or introduce hidden
dependency.
patch-ad:
src/tools/qglobal.h mentionss about Q_NO_PACKED_REFERENCE:
---
/* ARM gcc pads structs to 32 bits, even when they contain a single
char, or short. We tell gcc to pack QChars to 16 bits, to avoid
QString bloat. However, gcc 3.4 doesn't allow us to create references to
members of a packed struct. (Pointers are OK, because then you
supposedly know what you are doing.) */
# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
# define Q_PACKED __attribute__ ((packed))
# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
# define Q_NO_PACKED_REFERENCE
---
but it seems we also have to define it on gcc4.
patch-ch:
Furthermore, it looks gcc4 also rejects implicit pointer casts, so
add an explicit cast where the above Q_NO_PACKED_REFERENCE is referred.
This changes the buildlink3.mk files to use an include guard for the
recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS,
BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new
variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of
enter/exit marker, which can be used to reconstruct the tree and
to determine first level includes. Avoiding := for large variables
(BUILDLINK_ORDER) speeds up parse time as += has linear complexity.
The include guard reduces system time by avoiding reading files over and
over again. For complex packages this reduces both %user and %sys time to
half of the former time.
This would leak rpath references to the build directory and
libtool should take care of this already. Non-libtool builds
might be broken by this, but they shouldn't use -Wl,-R either,
but -Wl,-rpath. Bump revision of qt3-libs (rpath changes) and
qt3-tools (qmake changes).
packages with the modular Xorg equivalent. Those are falling back
to the old location by default, so this commmit doesn't change
dependencies.
graphics/xpm ==> x11/libXpm
fonts/Xft2 ==> x11/libXft
x11/Xfixes ==> x11/libXfixes
x11/xcursor ==> x11/libXcursor
x11/Xrender ==> x11/libXrender
x11/Xrandr ==> libXrandr
The patch was proposed in
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=210742, but this is
appearently not what Redhat does -- they have an update for kdelibs, but
don't tell details.
The patch helps for me, so put it in, at least until we know more.