summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/base.bbclass19
-rw-r--r--classes/java-library.bbclass21
-rw-r--r--classes/java.bbclass36
-rw-r--r--classes/native.bbclass9
-rw-r--r--conf/bitbake.conf13
-rw-r--r--conf/checksums.ini16
-rw-r--r--packages/classpath/classpath-native.inc4
-rw-r--r--packages/giflib/giflib_4.1.6.bb18
-rw-r--r--packages/gtk+/gdk-pixbuf-csource-native_2.12.11.bb2
-rw-r--r--packages/lesstif/files/000_bootstrap_script.diff30
-rw-r--r--packages/lesstif/files/000_libtool_linking.diff11
-rw-r--r--packages/lesstif/files/010_rebootstrap-small.diff456
-rw-r--r--packages/lesstif/files/020_bad_integer_cast.diff13
-rw-r--r--packages/lesstif/files/020_missing_xm_h.diff11
-rw-r--r--packages/lesstif/files/020_render_table_crash.diff11
-rw-r--r--packages/lesstif/files/020_unsigned_int.diff38
-rw-r--r--packages/lesstif/files/020_xpmpipethrough.diff381
-rw-r--r--packages/lesstif/files/021_xim_chained_list_crash.diff24
-rw-r--r--packages/lesstif/files/030_manpage.diff11
-rw-r--r--packages/lesstif/files/ac_debug.m4.diff95
-rw-r--r--packages/lesstif/files/ac_find_xft.m4.diff304
-rw-r--r--packages/lesstif/files/ac_have_libxp.m4.diff57
-rw-r--r--packages/lesstif/files/aclocal.m4.diff2746
-rw-r--r--packages/lesstif/files/disable-docs.patch29
-rw-r--r--packages/lesstif/lesstif_0.95.0.bb49
25 files changed, 4353 insertions, 51 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index b50bc8667c..93a76aa30f 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -157,6 +157,23 @@ def base_both_contain(variable1, variable2, checkvalue, d):
DEPENDS_prepend="${@base_dep_prepend(d)} "
+# Returns PN with various suffixes removed
+# or PN if no matching suffix was found.
+def base_package_name(d):
+ import bb;
+
+ pn = bb.data.getVar('PN', d, 1)
+ if pn.endswith("-native"):
+ pn = pn[0:-7]
+ elif pn.endswith("-cross"):
+ pn = pn[0:-6]
+ elif pn.endswith("-initial"):
+ pn = pn[0:-8]
+ elif pn.endswith("-intermediate"):
+ pn = pn[0:-13]
+
+ return pn
+
def base_set_filespath(path, d):
import os, bb
filespath = []
@@ -167,7 +184,7 @@ def base_set_filespath(path, d):
filespath.append(os.path.join(p, o))
return ":".join(filespath)
-FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
+FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
def oe_filter(f, str, d):
from re import match
diff --git a/classes/java-library.bbclass b/classes/java-library.bbclass
index eced939ef0..06c3170544 100644
--- a/classes/java-library.bbclass
+++ b/classes/java-library.bbclass
@@ -10,6 +10,9 @@
inherit java
+# use java_stage for native packages
+JAVA_NATIVE_STAGE_INSTALL = "1"
+
def java_package_name(d):
import bb;
@@ -25,18 +28,6 @@ def java_package_name(d):
return pre + pn + post
-def java_base_package_name(d):
- import bb;
-
- pre=""
- post=""
-
- pn = bb.data.getVar('PN', d, 1)
- if pn.endswith("-native"):
- pn = pn[0:-7]
-
- return pn
-
JPN ?= "${@java_package_name(d)}"
DEPENDS_prepend = "virtual/javac-native fastjar-native "
@@ -47,12 +38,6 @@ PACKAGE_ARCH_${JPN} = "all"
FILES_${JPN} = "${datadir_java}"
-# Base package name
-# Automatically derives "foo" from "foo-native"
-BPN ?= ""${@java_base_package_name(d)}""
-
-BP ?= "${BPN}-${PV}"
-
# File name of the libraries' main Jar file
JARFILENAME = "${BP}.jar"
diff --git a/classes/java.bbclass b/classes/java.bbclass
index 32415d5800..7b67bcd510 100644
--- a/classes/java.bbclass
+++ b/classes/java.bbclass
@@ -84,32 +84,32 @@ oe_makeclasspath() {
#
# oe_makeclasspath cp foo baz bar
# Stores ${datadir_java}/foo.jar:${datadir_java}/baz.jar:${datadir_java}/bar.jar
- # in variable "cp".
+ # in variable "cp".
#
# oe_makeclasspath bootcp -s foo baz bar
# Stores ${STAGING_DATADIR_JAVA}/foo.jar:${STAGING_DATADIR_JAVA}/baz.jar:${STAGING_DATADIR_JAVA}/bar.jar
- # in variable "bootcp".
- #
+ # in variable "bootcp".
+ #
# Provide the -s at the beginning otherwise strange things happen.
- # If -s is given the function checks whether the requested jar file exists
- # and exits with an error message if it cannot be found.
- #
+ # If -s is given the function checks whether the requested jar file exists
+ # and exits with an error message if it cannot be found.
+ #
dir=${datadir_java}
- classpath=
- delimiter=
- retval=$1
+ classpath=
+ delimiter=
+ retval=$1
- shift
+ shift
while [ "$#" -gt 0 ]; do
case "$1" in
-s)
- # take jar files from native staging if this is a -native recipe
- if [ ${PACKAGE_ARCH} = ${BUILD_ARCH} ]; then
+ # take jar files from native staging if this is a -native recipe
+ if [ ${PACKAGE_ARCH} = ${BUILD_ARCH} ]; then
dir=${STAGING_DATADIR_JAVA_NATIVE}
- else
+ else
dir=${STAGING_DATADIR_JAVA}
- fi
+ fi
;;
-*)
oefatal "oe_makeclasspath: unknown option: $1"
@@ -117,9 +117,9 @@ oe_makeclasspath() {
*)
file=$dir/$1.jar
- if [ -z "$dir" -a ! -f $file ]; then
- oefatal "oe_makeclasspath: Jar file for '$1' not found at $file"
- fi
+ if [ -z "$dir" -a ! -f $file ]; then
+ oefatal "oe_makeclasspath: Jar file for '$1' not found at $file"
+ fi
classpath=$classpath$delimiter$file
delimiter=":"
@@ -128,7 +128,7 @@ oe_makeclasspath() {
shift
done
- eval $retval="$classpath"
+ eval $retval="$classpath"
}
# Creates a simple wrapper script for your Java program.
diff --git a/classes/native.bbclass b/classes/native.bbclass
index 8f79935040..61048b6b14 100644
--- a/classes/native.bbclass
+++ b/classes/native.bbclass
@@ -80,11 +80,14 @@ export oldincludedir = "${STAGING_DIR_NATIVE}${layout_includedir}"
do_stage () {
if [ "${INHIBIT_NATIVE_STAGE_INSTALL}" != "1" ]
then
- if [ "${AUTOTOOLS_NATIVE_STAGE_INSTALL}" != "1" ]
+ if [ "${JAVA_NATIVE_STAGE_INSTALL}" = "1" ]
+ then
+ java_stage
+ elif [ "${AUTOTOOLS_NATIVE_STAGE_INSTALL}" = "1" ]
then
- oe_runmake install
- else
autotools_stage_all
+ else
+ oe_runmake install
fi
fi
}
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 071c1efdc9..93064b0a30 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -143,10 +143,11 @@ EXTENDPEVER = "${@['','${PE\x7d:'][bb.data.getVar('PE',d,1) > 0]}"
DEBPV = "${EXTENDPEVER}${PV}-${PR}"
P = "${PN}-${PV}"
-##################################################################
-# Distro default
-##################################################################
-DISTRO_PR ?= ""
+# Base package name
+# Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
+# otherwise it is the same as PN and P
+BPN = "${@base_package_name(d)}"
+BP = "${BPN}-${PV}"
# Package info.
@@ -217,7 +218,7 @@ FILES_${PN}-locale = "${datadir}/locale"
export MANIFEST = "${FILESDIR}/manifest"
FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}"
-FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
+FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}"
##################################################################
@@ -237,7 +238,7 @@ STAMP = "${TMPDIR}/stamps/${MULTIMACH_TARGET_SYS}/${PF}"
WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}"
T = "${WORKDIR}/temp"
D = "${WORKDIR}/image"
-S = "${WORKDIR}/${P}"
+S = "${WORKDIR}/${BP}"
B = "${S}"
STAGING_DIR = "${TMPDIR}/staging"
diff --git a/conf/checksums.ini b/conf/checksums.ini
index c1ac6ccd1f..2033571ac7 100644
--- a/conf/checksums.ini
+++ b/conf/checksums.ini
@@ -4438,6 +4438,10 @@ sha256=176611c4d88d742ea4013991ad54c2f9d2feefbc97a28434c0f48922ebaa8bac
md5=85bb8ee345fc41c218de19dda0164806
sha256=90825b05b675890bd405767a973d3c8c90eae36d22a7be6307e07a2e3c760d89
+[http://downloads.sourceforge.net/giflib/giflib-4.1.6.tar.bz2]
+md5=7125644155ae6ad33dbc9fc15a14735f
+sha256=e1c1ced9c5bc8f93ef0faf0a8c7717abf784d10a7b270d2285e8e1f3b93f2bed
+
[http://downloads.sourceforge.net/gift/gift-0.11.4.tar.bz2]
md5=decc82159c6723be999b1306a808077f
sha256=68149059b807b2fac505e376c18320e64104fbe0190e359f98059e73a63693dc
@@ -7194,6 +7198,10 @@ sha256=a73727c9c2e15d6302cf4f5d3aaf8378c5de9d60a302b9d5fa4ee5332341f867
md5=c7affcc61d4135ee838121a57b08de0f
sha256=dae915b7f963762385df2f4660eaad497261fa72393ba69339530e5b0b5d8bc3
+[http://downloads.sourceforge.net/jamvm/jamvm-1.4.5.tar.gz]
+md5=3f538bab6e1c77aed331e5e71f754f5b
+sha256=f329d1c8f42c06b53a3e82763d33900b100b8e9acd7afe02f7583c51253fd6e5
+
[http://downloads.sourceforge.net/jamvm/jamvm-1.5.0.tar.gz]
md5=a965452442cdbfc94caba57d0dd25a8f
sha256=18b269b1bfad7230384681e89189c6af18584e19cddbf92208c0acef814046ab
@@ -7466,6 +7474,10 @@ sha256=f532fcd61b012379d3258196a8588fd9d51ecdfb5c795485ab2f78d439b103b4
md5=b6d7ca9e9740286f0ce918da9fb8438b
sha256=0ee6a3caee4812827b8e167d4a07dbf859cb08a00a20f09568c3baae379d6ce8
+[http://downloads.sourceforge.net/lesstif/lesstif-0.95.0.tar.bz2]
+md5=ab895165c149d7f95843c7584b1c7ad4
+sha256=2a6f20d3bd525e6066ba2be22d8a47bf4bcd0425
+
[ftp://ftp.wiretapped.net/pub/mirrors/lftp/old/lftp-3.5.1.tar.bz2]
md5=c6d48782cdad4759000bf7cd24555723
sha256=463f0b46ce3a0fc09ef9ad7a5429959034d50a1eadbed5dfeae36c25dca31130
@@ -15490,6 +15502,10 @@ sha256=cb4909d8753dff7f6ac90a62a61ed1ae68e49ead2dbc60c22673c55bb0e14a36
md5=96830836f64edbb12c248eb84e6b0d18
sha256=b8e200ae66c20897c9aaa80b0044e638a0016d3bdb6e67560fd61f1ef162f305
+[http://downloads.sourceforge.net/wesnoth/wesnoth-1.4.5.tar.bz2]
+md5=09b7b76d4a4eedf502f38df9d551d827
+sha256=6abc3f0c9bee10dfe890c3691542ecae053908da
+
[ftp://ftp.gnu.org/gnu/wget/wget-1.9.1.tar.gz]
md5=e6051f1e1487ec0ebfdbda72bedc70ad
sha256=69044b87c517b986dbc17a5f7e4de430cb56e605330c19c6bb0d384d5c37e638
diff --git a/packages/classpath/classpath-native.inc b/packages/classpath/classpath-native.inc
index d178ce6779..31015b3d71 100644
--- a/packages/classpath/classpath-native.inc
+++ b/packages/classpath/classpath-native.inc
@@ -8,10 +8,6 @@ DEPENDS = "ecj-initial fastjar-native zip-native gettext-native"
SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz"
-S = "${WORKDIR}/classpath-${PV}"
-
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/classpath-${PV}"
-
do_configure_prepend () {
cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S}
diff --git a/packages/giflib/giflib_4.1.6.bb b/packages/giflib/giflib_4.1.6.bb
new file mode 100644
index 0000000000..0f4223c76a
--- /dev/null
+++ b/packages/giflib/giflib_4.1.6.bb
@@ -0,0 +1,18 @@
+SECTION = "libs"
+DESCRIPTION = "shared library for GIF images"
+SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.bz2"
+LICENSE = "MIT"
+PR = "r1"
+
+PACKAGES += "${PN}-utils"
+
+FILES_${PN} = "${libdir}"
+FILES_${PN}-utils = "${bindir}"
+
+inherit autotools
+
+do_stage() {
+ oe_libinstall -so -C lib/.libs libgif ${STAGING_LIBDIR}
+
+ install -m 0644 lib/gif_lib.h ${STAGING_INCDIR}/
+}
diff --git a/packages/gtk+/gdk-pixbuf-csource-native_2.12.11.bb b/packages/gtk+/gdk-pixbuf-csource-native_2.12.11.bb
index 2af16a344b..c7abc18855 100644
--- a/packages/gtk+/gdk-pixbuf-csource-native_2.12.11.bb
+++ b/packages/gtk+/gdk-pixbuf-csource-native_2.12.11.bb
@@ -1,6 +1,6 @@
require gtk+_${PV}.bb
inherit native
-DEPENDS = "jpeg-native libpng-native gettext-native glib-2.0-native"
+DEPENDS = "jpeg-native libpng-native gettext-native glib-2.0-native libx11-native"
S = "${WORKDIR}/gtk+-${PV}"
FILESPATH = "${FILE_DIRNAME}/gdk-pixbuf-csource:${FILE_DIRNAME}/gtk+-${PV}:${FILE_DIRNAME}/files"
SRC_URI += "file://reduce-dependencies.patch;patch=1"
diff --git a/packages/lesstif/files/000_bootstrap_script.diff b/packages/lesstif/files/000_bootstrap_script.diff
new file mode 100644
index 0000000000..ca1a998700
--- /dev/null
+++ b/packages/lesstif/files/000_bootstrap_script.diff
@@ -0,0 +1,30 @@
+Index: lesstif1-1-0.93.94/bootstrap
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ lesstif1-1-0.93.94/bootstrap 2006-05-26 17:36:58.000000000 +0200
+@@ -0,0 +1,25 @@
++#! /bin/sh
++
++for x in aclocal.m4 configure config.guess config.log config.sub config.cache config.h.in config.h compile libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh; do rm -f $x test/$x; done
++rm -Rf autom4te.cache
++
++# Explain what we are doing from now
++set -x
++
++libtoolize --copy --force
++aclocal-1.9 -I .
++autoconf
++autoheader
++automake-1.9 --foreign --add-missing --copy
++
++cd test
++
++libtoolize --copy --force
++aclocal-1.9 -I ..
++autoconf
++autoheader
++automake-1.9 --foreign --add-missing --copy
++
++# Remove cruft that we no longer want
++rm -Rf autom4te.cache
++
diff --git a/packages/lesstif/files/000_libtool_linking.diff b/packages/lesstif/files/000_libtool_linking.diff
new file mode 100644
index 0000000000..18a5bc57a4
--- /dev/null
+++ b/packages/lesstif/files/000_libtool_linking.diff
@@ -0,0 +1,11 @@
+--- lesstif2-0.94.4.orig/clients/Motif-2.1/mwm/Makefile.am
++++ lesstif2-0.94.4/clients/Motif-2.1/mwm/Makefile.am
+@@ -37,7 +37,7 @@
+
+ appdir= $(libdir)/X11/app-defaults
+
+-mwmddir= $(libdir)/X11/mwm
++mwmddir= /etc/X11/mwm
+ mwmd_DATA= system.mwmrc alt.map README
+
+
diff --git a/packages/lesstif/files/010_rebootstrap-small.diff b/packages/lesstif/files/010_rebootstrap-small.diff
new file mode 100644
index 0000000000..8bf355fdb9
--- /dev/null
+++ b/packages/lesstif/files/010_rebootstrap-small.diff
@@ -0,0 +1,456 @@
+Index: lesstif2-0.95.0/ac_debug.m4
+===================================================================
+--- lesstif2-0.95.0.orig/ac_debug.m4 2004-02-01 16:49:40.000000000 +0100
++++ lesstif2-0.95.0/ac_debug.m4 2006-07-11 11:11:36.000000000 +0200
+@@ -4,6 +4,90 @@
+ dnl Source code which depends on this is mostly in
+ dnl DebugUtil.c/.h
+ dnl
++AC_DEFUN(LT_WITH_DMALLOC,
++[AC_MSG_CHECKING(if malloc debugging is wanted)
++AC_ARG_WITH(dmalloc,
++[ --with-dmalloc[=path] use dmalloc, see INSTALL(.html) for reference],
++[if test "$withval" = no; then
++ AC_MSG_RESULT(no)
++else
++dnl We overwrite the variables since we won't continue in
++dnl case of an error!
++dnl We modify CFLAGS, and also link libs (LDFLAGS) and programs (LIBS)
++ if test "$withval" != yes; then
++dnl a path was given
++ CFLAGS="$CFLAGS -I$withval/include -DDMALLOC_FUNC_CHECK"
++
++ LDFLAGS="$LDFLAGS -L$withval/lib -ldmalloc"
++ LIBS="$LIBS -L$withval/lib -ldmalloc"
++ else
++dnl no path was given
++ CFLAGS="$CFLAGS -DDMALLOC_FUNC_CHECK"
++ LDFLAGS="$LDFLAGS -ldmalloc"
++ LIBS="$LIBS -ldmalloc"
++ fi
++ AC_TRY_LINK(
++ [#include <dmalloc.h>],
++ [char *ptr;
++ ptr=malloc(1);
++ free(ptr);
++ ],
++ [AC_DEFINE(WITH_DMALLOC,1,
++ [Define if using the dmalloc debugging malloc package])
++ AC_MSG_RESULT(Using dmalloc)],
++ AC_MSG_ERROR(dmalloc not found)
++ )
++fi],
++[AC_MSG_RESULT(no)])
++])
++
++
++dnl
++dnl Enable another malloc checker for debugging purposes
++dnl Source code which depends on this is mostly in
++dnl DebugUtil.c/.h
++dnl
++AC_DEFUN(LT_WITH_DBMALLOC,
++[AC_MSG_CHECKING(if malloc debugging is wanted)
++AC_ARG_WITH(dbmalloc,
++[ --with-dbmalloc[=path] use dbmalloc, see INSTALL(.html) for reference],
++[if test "$withval" = no; then
++ AC_MSG_RESULT(no)
++else
++dnl We overwrite the variables since we won't continue in
++dnl case of an error!
++dnl We modify CFLAGS, and also link libs (LDFLAGS) and programs (LIBS)
++ if test "$withval" != yes; then
++dnl a path was given
++ CFLAGS="$CFLAGS -I$withval/include"
++
++ LDFLAGS="$LDFLAGS -L$withval/lib -ldbmalloc"
++ LIBS="$LIBS -L$withval/lib -ldbmalloc"
++ else
++dnl no path was given
++ LDFLAGS="$LDFLAGS -ldbmalloc"
++ LIBS="$LIBS -ldbmalloc"
++ fi
++ AC_TRY_LINK(
++ [#include <dbmalloc.h>],
++ [char *ptr;
++ ptr=malloc(1);
++ free(ptr);
++ ],
++ [AC_DEFINE(WITH_DBMALLOC,1,
++ [Define if using the dbmalloc debugging malloc package])
++ AC_MSG_RESULT(Using dbmalloc)],
++ AC_MSG_ERROR(dbmalloc not found)
++ )
++fi],
++[AC_MSG_RESULT(no)])
++])
++dnl
++dnl Enable malloc checker for debugging purposes
++dnl See http://dmalloc.com, INSTALL(.html) for references to this.
++dnl Source code which depends on this is mostly in
++dnl DebugUtil.c/.h
++dnl
+ AC_DEFUN([LT_WITH_DMALLOC],
+ [AC_MSG_CHECKING(if malloc debugging is wanted)
+ AC_ARG_WITH(dmalloc,
+Index: lesstif2-0.95.0/ac_find_xft.m4
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ lesstif2-0.95.0/ac_find_xft.m4 2006-07-11 11:11:44.000000000 +0200
+@@ -0,0 +1,299 @@
++dnl
++dnl $Header: /home/kobras/cvsroot/debian/lesstif1-1/ac_find_xft.m4,v 1.1 2004/05/27 10:48:25 kobras Exp $
++dnl
++dnl $XFree86: xc/lib/fontconfig/configure.in,v 1.7 2002/08/01 15:57:25 keithp Exp $
++dnl
++dnl Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
++dnl Manipulated into AC_FIND_XFT macro by Danny Backx (also © 2002).
++dnl
++dnl Permission to use, copy, modify, distribute, and sell this software and its
++dnl documentation for any purpose is hereby granted without fee, provided that
++dnl the above copyright notice appear in all copies and that both that
++dnl copyright notice and this permission notice appear in supporting
++dnl documentation, and that the name of Keith Packard not be used in
++dnl advertising or publicity pertaining to distribution of the software without
++dnl specific, written prior permission. Keith Packard makes no
++dnl representations about the suitability of this software for any purpose. It
++dnl is provided "as is" without express or implied warranty.
++dnl
++dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
++dnl PERFORMANCE OF THIS SOFTWARE.
++dnl
++
++AC_DEFUN(AC_FIND_XFT,
++[
++AH_TEMPLATE([HAVE_FREETYPE], [We have the FreeType library])
++AH_TEMPLATE([HAVE_FONTCONFIG], [We have the fontconfig library])
++AH_TEMPLATE([HAVE_XRENDER], [We have the fontconfig library])
++AH_TEMPLATE([FC_DEFAULT_FONTS], [We have the fontconfig library])
++AH_TEMPLATE([X_FONT_DIR], [We have the fontconfig library])
++AH_TEMPLATE([CONFDIR], [We have the fontconfig library])
++AH_TEMPLATE([USE_XFT], [We have the fontconfig library])
++
++AC_ARG_WITH(freetype_includes, [ --with-freetype-includes=DIR Use FreeType includes in DIR], freetype_includes=$withval, freetype_includes=yes)
++AC_ARG_WITH(freetype_lib, [ --with-freetype-lib=DIR Use FreeType library in DIR], freetype_lib=$withval, freetype_lib=yes)
++AC_ARG_WITH(freetype_config, [ --with-freetype-config=PROG Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=yes)
++dnl AC_ARG_WITH(expat, [ --with-expat=DIR Use Expat in DIR], expat=$withval, expat=yes)
++dnl AC_ARG_WITH(expat_includes, [ --with-expat-includes=DIR Use Expat includes in DIR], expat_includes=$withval, expat_includes=yes)
++dnl AC_ARG_WITH(expat_lib, [ --with-expat-lib=DIR Use Expat library in DIR], expat_lib=$withval, expat_lib=yes)
++AC_ARG_WITH(default_fonts, [ --with-default-fonts=DIR Use fonts from DIR when config is busted], defaultfonts="$withval", default_fonts=yes)
++dnl AC_ARG_WITH(confdir, [ --with-confdir=DIR Use DIR to store configuration files (default /etc/fonts)], confdir="$withval", confdir=yes)
++AC_ARG_WITH(fontconfig_includes, [ --with-fontconfig-includes=DIR Use Fontconfig includes in DIR], fontconfig_includes=$withval, fontconfig_includes=yes)
++AC_ARG_WITH(fontconfig_lib, [ --with-fontconfig-lib=DIR Use Fontconfig library in DIR], fontconfig_lib=$withval, fontconfig_lib=yes)
++AC_ARG_WITH(fontconfig_config, [ --with-fontconfig-config=PROG Use Fontconfig configuration program PROG], fontconfig_config=$withval, fontconfig_config=yes)
++AC_ARG_ENABLE(xrender, [ --enable-xrender Enable Xrender])
++
++# Using x libraries, set X font directory
++case "$no_x" in
++yes)
++ ;;
++*)
++ X_FONT_DIR="$x_libraries/X11/fonts"
++ AC_DEFINE_UNQUOTED(X_FONT_DIR,$X_FONT_DIR)
++ ;;
++esac
++AC_SUBST(X_FONT_DIR)
++
++#
++# Check freetype configuration
++#
++case "$freetype_config" in
++no)
++ ;;
++yes)
++ AC_CHECK_PROG(ft_config,freetype-config,freetype-config,no)
++ ;;
++*)
++ ft_config="$freetype_config"
++ ;;
++esac
++
++case "$freetype_includes" in
++no)
++ FREETYPE_CFLAGS=""
++ ;;
++yes)
++ case "$ft_config" in
++ no)
++ FREETYPE_CFLAGS=""
++ ;;
++ *)
++ FREETYPE_CFLAGS="`$ft_config --cflags`"
++ ;;
++ esac
++ ;;
++*)
++ FREETYPE_CFLAGS="-I$freetype_includes"
++ ;;
++esac
++
++case "$freetype_lib" in
++no)
++ freetype_lib=""
++ ;;
++yes)
++ case "$ft_config" in
++ no)
++ freetype_lib=""
++ ;;
++ *)
++ freetype_lib="`$ft_config --libs`"
++ ;;
++ esac
++ ;;
++*)
++ freetype_lib="-L$freetype_lib -lfreetype"
++ ;;
++esac
++
++saved_LIBS="$LIBS"
++LIBS="$LIBS $freetype_lib"
++saved_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
++AC_CHECK_HEADERS(freetype/freetype.h)
++
++HAVEFREETYPE="no"
++case "$ac_cv_header_freetype_freetype_h" in
++no)
++ CPPFLAGS="$saved_CPPFLAGS"
++ LIBS="$saved_LIBS"
++ ;;
++yes)
++ AC_CHECK_FUNCS(FT_Init_FreeType)
++ case "$ac_cv_func_FT_Init_FreeType" in
++ no)
++ CPPFLAGS="$saved_CPPFLAGS"
++ LIBS="$saved_LIBS"
++ ;;
++ yes)
++ HAVEFREETYPE="yes"
++ AC_DEFINE(HAVE_FREETYPE)
++ AC_SUBST(FREETYPE_CFLAGS)
++ ;;
++ esac
++ ;;
++esac
++
++case "$default_fonts" in
++yes)
++ FC_DEFAULT_FONTS="/usr/share/fonts"
++ AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts")
++ ;;
++*)
++ FC_DEFAULT_FONTS="$default_fonts"
++ AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "$default_fonts")
++ ;;
++esac
++
++AC_SUBST(FC_DEFAULT_FONTS)
++
++#
++# Set CONFDIR and FONTCONFIG_PATH
++#
++
++case "$confdir" in
++no|yes)
++ confdir=/etc/fonts
++ ;;
++*)
++ ;;
++esac
++AC_SUBST(confdir)
++CONFDIR='${confdir}'
++AC_DEFINE_UNQUOTED(CONFDIR, "$CONFDIR")
++AC_SUBST(CONFDIR)
++
++#
++# Check X configuration
++#
++HAVEXRENDER="no"
++case "$enable_xrender" in
++no)
++ ;;
++*)
++ XRENDER_CFLAGS="-I$x_includes"
++ XRENDER_LIBS="-L$x_libraries -lXft -lXrender"
++
++ saved_LIBS="$LIBS"
++ LIBS="$LIBS $XRENDER_LIBS"
++ saved_CPPFLAGS="$CPPFLAGS"
++ CPPFLAGS="$CPPFLAGS $XRENDER_CFLAGS"
++ AC_CHECK_HEADERS(X11/extensions/Xrender.h)
++
++ case "$ac_cv_header_X11_extensions_Xrender_h" in
++ no)
++ CPPFLAGS="$saved_CPPFLAGS"
++ LIBS="$saved_LIBS"
++ ;;
++ yes)
++ AC_CHECK_FUNCS(XRenderParseColor)
++ case "$ac_cv_func_XRenderParseColor" in
++ no)
++ CPPFLAGS="$saved_CPPFLAGS"
++ LIBS="$saved_LIBS"
++ ;;
++ yes)
++ HAVEXRENDER="yes"
++ AC_DEFINE(HAVE_XRENDER)
++ AC_SUBST(XRENDER_CFLAGS)
++ AC_SUBST(XRENDER_LIBS)
++ ;;
++ esac
++ ;;
++ esac
++
++ ;;
++esac
++
++#
++# Check fontconfig configuration
++#
++case "$fontconfig_config" in
++no)
++ ;;
++yes)
++ AC_CHECK_PROG(fc_config,fontconfig-config,fontconfig-config,no)
++ ;;
++*)
++ fc_config="$fontconfig_config"
++ ;;
++esac
++
++case "$fontconfig_includes" in
++no)
++ FONTCONFIG_CFLAGS=""
++ ;;
++yes)
++ case "$fc_config" in
++ no)
++ FONTCONFIG_CFLAGS=""
++ ;;
++ *)
++ FONTCONFIG_CFLAGS="`$fc_config --cflags`"
++ ;;
++ esac
++ ;;
++*)
++ FONTCONFIG_CFLAGS="-I$fontconfig_includes"
++ ;;
++esac
++
++case "$fontconfig_lib" in
++no)
++ fontconfig_lib=""
++ ;;
++yes)
++ case "$fc_config" in
++ no)
++ fontconfig_lib=""
++ ;;
++ *)
++ FONTCONFIG_LIBS="`$fc_config --libs`"
++ ;;
++ esac
++ ;;
++*)
++ FONTCONFIG_LIBS="-L$fontconfig_lib -lfontconfig"
++ ;;
++esac
++
++saved_LIBS="$LIBS"
++LIBS="$LIBS $FONTCONFIG_LIBS"
++saved_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="$CPPFLAGS $FONTCONFIG_CFLAGS"
++AC_CHECK_HEADERS(fontconfig/fontconfig.h)
++
++case "$ac_cv_header_fontconfig_fontconfig_h" in
++no)
++ CPPFLAGS="$saved_CPPFLAGS"
++ LIBS="$saved_LIBS"
++ ;;
++yes)
++ AC_CHECK_FUNCS(FcInit)
++ case "$ac_cv_func_FcInit" in
++ no)
++ CPPFLAGS="$saved_CPPFLAGS"
++ LIBS="$saved_LIBS"
++ ;;
++ yes)
++ AC_DEFINE(HAVE_FONTCONFIG)
++ AC_SUBST(FONTCONFIG_CFLAGS)
++ AC_SUBST(FONTCONFIG_LIBS)
++ ;;
++ esac
++ ;;
++esac
++
++dnl
++dnl Should this be conditionally defined ?
++dnl
++if test "$HAVEXRENDER" = "yes" -a "$HAVEFREETYPE" = "yes"
++then
++ AC_DEFINE(USE_XFT)
++fi
++])
+Index: lesstif2-0.95.0/ac_have_libxp.m4
+===================================================================
+--- lesstif2-0.95.0.orig/ac_have_libxp.m4 2004-02-01 16:49:40.000000000 +0100
++++ lesstif2-0.95.0/ac_have_libxp.m4 2006-07-11 11:11:36.000000000 +0200
+@@ -11,6 +11,52 @@
+ dnl Makefiles. Perhaps one should immediately add those libs
+ dnl to link commands which include libXm version2.1?!
+ dnl
++AC_DEFUN(LT_HAVE_LIBXP,
++[AC_REQUIRE([AC_PATH_X])
++AC_CACHE_CHECK(whether libXp is available, lt_cv_libxp,
++[lt_save_CFLAGS="$CFLAGS"
++lt_save_CPPFLAGS="$CPPFLAGS"
++lt_save_LIBS="$LIBS"
++LIBS="$X_LIBS -lXp -lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
++CFLAGS="$X_CFLAGS $CFLAGS"
++CPPFLAGS="$X_CFLAGS $CPPFLAGS"
++AC_TRY_LINK([
++#include <X11/Intrinsic.h>
++#include <X11/extensions/Print.h>
++],[
++Display *display=NULL;
++short major_version, minor_version;
++Status rc;
++rc=XpQueryVersion(display, &major_version, &minor_version);
++],
++lt_cv_libxp=yes,
++lt_cv_libxp=no)
++])
++if test $lt_cv_libxp = yes; then
++ AC_DEFINE(HAVE_LIB_XP)
++ LT_HAVELIBXP=1
++else
++ LT_HAVELIBXP=0
++fi
++AM_CONDITIONAL(Have_Libxp, test "$lt_cv_libxp" = "yes")
++AC_SUBST(LT_HAVELIBXP)
++CFLAGS="$lt_save_CFLAGS"
++CPPFLAGS="$lt_save_CPPFLAGS"
++LIBS="$lt_save_LIBS"
++])
++dnl
++dnl Check for libXp
++dnl In fact this check ensures that
++dnl - <X11/extensions/Print.h> and
++dnl - both libXp and libXext
++dnl are in place
++dnl Perhaps AC_CHECK_LIB() could be used as well, but
++dnl requires the same amount of work to get all linker
++dnl flags and additional libraries specified.
++dnl If the test succeeds 'Have_Libxp' will be defined within our
++dnl Makefiles. Perhaps one should immediately add those libs
++dnl to link commands which include libXm version2.1?!
++dnl
+ AC_DEFUN([LT_HAVE_LIBXP],
+ [AC_REQUIRE([AC_PATH_X])
+ AC_CACHE_CHECK(whether libXp is available, lt_cv_libxp,
diff --git a/packages/lesstif/files/020_bad_integer_cast.diff b/packages/lesstif/files/020_bad_integer_cast.diff
new file mode 100644
index 0000000000..620d702f0f
--- /dev/null
+++ b/packages/lesstif/files/020_bad_integer_cast.diff
@@ -0,0 +1,13 @@
+--- lesstif2-0.94.4.orig/include/Motif-2.1/XmI/XpmI.h
++++ lesstif2-0.94.4/include/Motif-2.1/XmI/XpmI.h
+@@ -217,8 +217,8 @@
+ FUNC(xpmHashSlot, xpmHashAtom *, (xpmHashTable *table, char *s));
+ FUNC(xpmHashIntern, int, (xpmHashTable *table, char *tag, void *data));
+
+-#define HashAtomData(i) ((void *)i)
+-#define HashColorIndex(slot) ((unsigned int)((*slot)->data))
++#define HashAtomData(i) ((void *)(uintptr_t)i)
++#define HashColorIndex(slot) ((uintptr_t)((*slot)->data))
+ #define USE_HASHTABLE (cpp > 2 && ncolors > 4)
+
+ /* I/O utility */
diff --git a/packages/lesstif/files/020_missing_xm_h.diff b/packages/lesstif/files/020_missing_xm_h.diff
new file mode 100644
index 0000000000..2d298d5f4c
--- /dev/null
+++ b/packages/lesstif/files/020_missing_xm_h.diff
@@ -0,0 +1,11 @@
+--- lesstif2-0.94.4.orig/include/Motif-2.1/Xm/XmStrDefs.h
++++ lesstif2-0.94.4/include/Motif-2.1/Xm/XmStrDefs.h
+@@ -28,6 +28,8 @@
+
+ #include <X11/StringDefs.h>
+
++#include <Xm/Xm.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
diff --git a/packages/lesstif/files/020_render_table_crash.diff b/packages/lesstif/files/020_render_table_crash.diff
new file mode 100644
index 0000000000..1699dbe190
--- /dev/null
+++ b/packages/lesstif/files/020_render_table_crash.diff
@@ -0,0 +1,11 @@
+--- lesstif2-0.95.0.orig/lib/Xm-2.1/RenderTable.c
++++ lesstif2-0.95.0/lib/Xm-2.1/RenderTable.c
+@@ -465,7 +465,7 @@
+ DEBUGOUT(_LtDebug(__FILE__, w, "_XmRenderTableFinaliseTag(%s)\n", tag));
+ #if 1
+ /* Experimental start */
+- if (r->dpy == 0)
++ if (r->dpy == 0 && w)
+ r->dpy = XtDisplay(w);
+ /* Experimental end */
+ #endif
diff --git a/packages/lesstif/files/020_unsigned_int.diff b/packages/lesstif/files/020_unsigned_int.diff
new file mode 100644
index 0000000000..a682d9704c
--- /dev/null
+++ b/packages/lesstif/files/020_unsigned_int.diff
@@ -0,0 +1,38 @@
+--- lesstif2-0.94.4.orig/lib/Xm-2.1/Xpmcreate.c
++++ lesstif2-0.94.4/lib/Xm-2.1/Xpmcreate.c
+@@ -1265,10 +1265,10 @@
+ register char *src;
+ register char *dst;
+ register unsigned int *iptr;
+- register unsigned int x, y, i;
++ register unsigned int x, y;
+ register char *data;
+ Pixel pixel, px;
+- int