summaryrefslogtreecommitdiff
path: root/package/heimdal
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-11-12 22:58:45 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-11-12 22:58:45 +0100
commitd29b7059e0e3dacc3e051c310eabaecabe19a8d2 (patch)
tree078693d3be8a0d6096587f5ac01b2ffc76dc8626 /package/heimdal
parent4129680028eaddf98219126f787b08551bbf7088 (diff)
updates and build fixes for a lot of packages
compiled for ibmx40 with eglibc.
Diffstat (limited to 'package/heimdal')
-rw-r--r--package/heimdal/Makefile15
-rw-r--r--package/heimdal/patches/patch-lib_roken_Makefile_in41
-rw-r--r--package/heimdal/patches/patch-lib_roken_Makefile_in.orig27
-rw-r--r--package/heimdal/patches/patch-lib_roken_roken_h_in11
-rw-r--r--package/heimdal/src/cf/roken-h-process.pl181
5 files changed, 271 insertions, 4 deletions
diff --git a/package/heimdal/Makefile b/package/heimdal/Makefile
index dfe5c0c65..dfffe8523 100644
--- a/package/heimdal/Makefile
+++ b/package/heimdal/Makefile
@@ -70,8 +70,9 @@ endif
TCFLAGS+= -I${STAGING_DIR}/usr/include/et -pthread
-CONFIGURE_ARGS+= ${CONFIGURE_OPTS}
-CONFIGURE_ENV+= ac_cv_func_getaddrinfo_numserv=yes
+CONFIGURE_ARGS+= ${CONFIGURE_OPTS} --with-cross-tools=${STAGING_TOOLS}/bin
+CONFIGURE_ENV+= cross_compiling=yes \
+ ac_cv_func_getaddrinfo_numserv=yes
ifeq ($(ADK_HOST_CYGWIN),y)
EXEEXT:= .exe
@@ -79,17 +80,23 @@ endif
pre-configure:
(cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
- ./configure ${CONFIGURE_OPTS} \
+ ./configure --prefix=$(STAGING_TOOLS) \
+ --disable-pk-init \
+ --without-openldap \
+ --disable-otp \
);
+ ${MAKE} -C ${WRKBUILD}/include
${MAKE} -C ${WRKBUILD}/lib/roken
${MAKE} -C ${WRKBUILD}/lib/vers
${MAKE} -C ${WRKBUILD}/lib/editline
${MAKE} -C ${WRKBUILD}/lib/asn1 asn1_compile$(EXEEXT)
${MAKE} -C ${WRKBUILD}/lib/sl slc$(EXEEXT)
- ${INSTALL_BIN} ${WRKBUILD}/lib/asn1/asn1_compile$(EXEEXT) \
+ ${INSTALL_BIN} ${WRKBUILD}/lib/roken/make-roken$(EXEEXT) \
${STAGING_TOOLS}/bin
${INSTALL_BIN} ${WRKBUILD}/lib/sl/slc$(EXEEXT) \
${STAGING_TOOLS}/bin
+ ${MAKE} -C ${WRKBUILD}/lib/roken install
+ ${MAKE} -C ${WRKBUILD}/lib/asn1 install
${MAKE} -C ${WRKBUILD}/lib/asn1 clean
${MAKE} -C ${WRKBUILD}/lib/roken clean
${MAKE} -C ${WRKBUILD} clean
diff --git a/package/heimdal/patches/patch-lib_roken_Makefile_in b/package/heimdal/patches/patch-lib_roken_Makefile_in
new file mode 100644
index 000000000..a702be6b7
--- /dev/null
+++ b/package/heimdal/patches/patch-lib_roken_Makefile_in
@@ -0,0 +1,41 @@
+--- heimdal-1.4.orig/lib/roken/Makefile.in 2010-09-13 09:24:23.000000000 +0200
++++ heimdal-1.4/lib/roken/Makefile.in 2010-11-10 19:56:51.764995802 +0100
+@@ -726,9 +726,6 @@ getifaddrs-test$(EXEEXT): $(getifaddrs_t
+ hex-test$(EXEEXT): $(hex_test_OBJECTS) $(hex_test_DEPENDENCIES)
+ @rm -f hex-test$(EXEEXT)
+ $(LINK) $(hex_test_OBJECTS) $(hex_test_LDADD) $(LIBS)
+-make-roken$(EXEEXT): $(make_roken_OBJECTS) $(make_roken_DEPENDENCIES)
+- @rm -f make-roken$(EXEEXT)
+- $(LINK) $(make_roken_OBJECTS) $(make_roken_LDADD) $(LIBS)
+ parse_bytes-test$(EXEEXT): $(parse_bytes_test_OBJECTS) $(parse_bytes_test_DEPENDENCIES)
+ @rm -f parse_bytes-test$(EXEEXT)
+ $(LINK) $(parse_bytes_test_OBJECTS) $(parse_bytes_test_LDADD) $(LIBS)
+@@ -1977,18 +1974,18 @@ $(LTLIBOBJS) $(libroken_la_OBJECTS): rok
+ .hin.h:
+ cp $< $@
+
+-@CROSS_COMPILE_FALSE@roken.h: make-roken$(EXEEXT)
+-@CROSS_COMPILE_FALSE@ @./make-roken$(EXEEXT) > tmp.h ;\
+-@CROSS_COMPILE_FALSE@ if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \
+-@CROSS_COMPILE_FALSE@ else rm -f roken.h; mv tmp.h roken.h; fi
++roken.h: make-roken$(EXEEXT)
++ ./make-roken$(EXEEXT) > tmp.h ;\
++ if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \
++ else rm -f roken.h; mv tmp.h roken.h; fi
+
+-@CROSS_COMPILE_FALSE@make-roken.c: roken.h.in roken.awk
+-@CROSS_COMPILE_FALSE@ $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c
++make-roken.c: roken.h.in roken.awk
++ $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c
++
++make-roken$(EXEEXT): make-roken.c
++ $(HOSTCC) $(HOSTCFLAGS) -I$(top_builddir)/include -DHAVE_CONFIG_H \
++ -o $@ $<
+
+-@CROSS_COMPILE_TRUE@roken.h: $(top_srcdir)/cf/roken-h-process.pl roken.h.in
+-@CROSS_COMPILE_TRUE@ perl $(top_srcdir)/cf/roken-h-process.pl \
+-@CROSS_COMPILE_TRUE@ -c $(top_builddir)/include/config.h \
+-@CROSS_COMPILE_TRUE@ -p $(srcdir)/roken.h.in -o roken.h
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/package/heimdal/patches/patch-lib_roken_Makefile_in.orig b/package/heimdal/patches/patch-lib_roken_Makefile_in.orig
new file mode 100644
index 000000000..7d207e474
--- /dev/null
+++ b/package/heimdal/patches/patch-lib_roken_Makefile_in.orig
@@ -0,0 +1,27 @@
+--- heimdal-1.4.orig/lib/roken/Makefile.in 2010-09-13 09:24:23.000000000 +0200
++++ heimdal-1.4/lib/roken/Makefile.in 2010-11-10 18:57:00.174995995 +0100
+@@ -1977,18 +1977,13 @@ $(LTLIBOBJS) $(libroken_la_OBJECTS): rok
+ .hin.h:
+ cp $< $@
+
+-@CROSS_COMPILE_FALSE@roken.h: make-roken$(EXEEXT)
+-@CROSS_COMPILE_FALSE@ @./make-roken$(EXEEXT) > tmp.h ;\
+-@CROSS_COMPILE_FALSE@ if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \
+-@CROSS_COMPILE_FALSE@ else rm -f roken.h; mv tmp.h roken.h; fi
+-
+-@CROSS_COMPILE_FALSE@make-roken.c: roken.h.in roken.awk
+-@CROSS_COMPILE_FALSE@ $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c
++roken.h: make-roken$(EXEEXT)
++ ./make-roken$(EXEEXT) > tmp.h ;\
++ if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \
++ else rm -f roken.h; mv tmp.h roken.h; fi
+
+-@CROSS_COMPILE_TRUE@roken.h: $(top_srcdir)/cf/roken-h-process.pl roken.h.in
+-@CROSS_COMPILE_TRUE@ perl $(top_srcdir)/cf/roken-h-process.pl \
+-@CROSS_COMPILE_TRUE@ -c $(top_builddir)/include/config.h \
+-@CROSS_COMPILE_TRUE@ -p $(srcdir)/roken.h.in -o roken.h
++make-roken.c: roken.h.in roken.awk
++ $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/package/heimdal/patches/patch-lib_roken_roken_h_in b/package/heimdal/patches/patch-lib_roken_roken_h_in
new file mode 100644
index 000000000..59e9a2c52
--- /dev/null
+++ b/package/heimdal/patches/patch-lib_roken_roken_h_in
@@ -0,0 +1,11 @@
+--- heimdal-1.4.orig/lib/roken/roken.h.in 2010-09-13 09:23:34.000000000 +0200
++++ heimdal-1.4/lib/roken/roken.h.in 2010-11-10 19:46:45.916683899 +0100
+@@ -524,7 +524,7 @@ ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL ge
+ ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strerror(int);
+ #endif
+
+-#if (!defined(HAVE_STRERROR_R) && !defined(strerror_r)) || (!defined(STRERROR_R_PROTO_COMPATIBLE) && defined(HAVE_STRERROR_R))
++#if ( !defined(HAVE_STRERROR_R) && !defined(strerror_r)) || (!defined(STRERROR_R_PROTO_COMPATIBLE) && defined(HAVE_STRERROR_R))
+ int ROKEN_LIB_FUNCTION rk_strerror_r(int, char *, size_t);
+ #else
+ #define rk_strerror_r strerror_r
diff --git a/package/heimdal/src/cf/roken-h-process.pl b/package/heimdal/src/cf/roken-h-process.pl
new file mode 100644
index 000000000..a54c9216d
--- /dev/null
+++ b/package/heimdal/src/cf/roken-h-process.pl
@@ -0,0 +1,181 @@
+#!/usr/bin/perl
+
+require 'getopts.pl';
+
+my $debug = 0;
+
+Getopts('dc:p:o:') || die "foo";
+
+if ($opt_d) {
+ $debug = 1;
+}
+
+die "missing arg" if (!defined $opt_c || !defined $opt_p || !defined $opt_o);
+
+my %defines;
+my $IN;
+my $OUT;
+
+print "parse config.h\n" if ($debug);
+
+open IN, $opt_c || die "failed open ${opt_c}";
+
+my @nesting;
+
+push @nesting, 1;
+
+while (<IN>) {
+ if (m/\s*#ifdef\s+(.*)/) {
+ my $var = $1;
+ if (defined $defines{$var}) {
+ push @nesting, 1;
+ } else {
+ push @nesting, 0;
+ }
+ next;
+ } elsif (m/\s*#ifndef\s+(.*)/) {
+ my $var = $1;
+ if (defined $defines{$var}) {
+ push @nesting, 0;
+ } else {
+ push @nesting, 1;
+ }
+ next;
+ } elsif (m/\s*#else/) {
+ my $var = pop @nesting;
+ $var = !$var;
+ push @nesting, $var;
+ next;
+ } elsif ($nesting[$#nesting] and m/\s*#define\s+(\w+)\s+(\S+)/) {
+ my $res = $2;
+ $res = 1 if (!defined $res);
+ $defines{$1} = $res;
+ }
+}
+
+close IN;
+
+if ($debug) {
+ foreach my $i (keys %defines) {
+ print "k: $i v: $defines{$i}\n";
+ }
+}
+
+open IN, "$opt_p" || die "failed open ${opt_p}";
+open OUT, ">$opt_o" || die "failed open ${opt_o}";
+
+print "parse roken.h.in\n" if ($debug);
+
+print OUT "/* This is an OS dependent, generated file */\n";
+print OUT "\n";
+print OUT "\n";
+print OUT "#ifndef __ROKEN_H__\n";
+print OUT "#define __ROKEN_H__\n";
+print OUT "\n";
+
+@nesting = (1);
+
+while (<IN>) {
+ if (m/\s*#ifdef\s+(.*)/) {
+ my $var = $1;
+ if (defined $defines{$var}) {
+ push @nesting, 1;
+ } else {
+ push @nesting, 0;
+ }
+ next;
+ } elsif (m/\s*#ifndef\s+(.*)/) {
+ my $var = $1;
+ if (defined $defines{$var}) {
+ push @nesting, 0;
+ } else {
+ push @nesting, 1;
+ }
+ next;
+ } elsif (m/\s*#if\s+(.*)/) {
+ my $res = parse_if($1);
+ print "line = $res: $1\n" if ($debug);
+ push @nesting, $res;
+ next;
+ } elsif (m/\s*#elif\s+(.*)/) {
+ my $res = pop @nesting;
+ if ($res gt 0) {
+ $res = -1;
+ } else {
+ my $res = parse_if($1);
+ }
+ push @nesting, $res;
+ next;
+ } elsif (m/\s*#else/) {
+ my $var = pop @nesting;
+ $var = !$var;
+ push @nesting, $var;
+ next;
+ } elsif (m/\s*#endif/) {
+ pop @nesting;
+ next;
+ }
+ print "line: $_\n" if ($debug);
+ print "nesting dep $#{nesting}\n" if ($debug);
+ my $i = 0, $t = 1;
+ while ($i le $#nesting) {
+ $t = 0 if ($nesting[$i] le 0);
+ print "nesting $i val $nesting[$i] -> $t\n" if ($debug);
+ $i++;
+ }
+ if ($t) {
+ print OUT;
+ }
+}
+
+print OUT "\n";
+print OUT "#endif /* __ROKEN_H__ */\n";
+
+
+close IN;
+
+exit 0;
+
+sub parse_if
+{
+ my ($neg, $var);
+
+ $_ = shift;
+
+ if (m/^\s*$/) {
+ print "end $_\n" if ($debug);
+ return 1;
+ } elsif (m/^([^&]+)\&\&(.*)$/) {
+ print "$1 and $2\n" if ($debug);
+ return parse_if($1) and parse_if($2);
+ } elsif (m/^([^\|]+)\|\|(.*)$/) {
+ print "$1 or $2\n" if ($debug);
+ return parse_if($1) or parse_if($2);
+ } elsif (m/^\s*(\!)?\s*defined\((\w+)\)/) {
+ ($neg, $var) = ($1, $2);
+ print "def: ${neg}-defined(${var})\n" if ($debug);
+ my $res = defined $defines{$var};
+ if ($neg eq "!") {
+ if ($res) {
+ $res = 0;
+ } else {
+ $res = 1;
+ }
+ }
+ print "res: $res\n" if ($debug);
+ return $res;
+ } elsif (m/^\s*(\!)?(\w+)/) {
+ ($neg, $var) = ($1, $2);
+ print "var: $neg $var\n" if ($debug);
+ my $res;
+ if (defined $defines{$var}) {
+ $res = $defines{$var};
+ } else {
+ $res = 0;
+ }
+ $res = ! $res if ($neg =~ m/!/);
+ print "res: $res\n" if ($debug);
+ return $res;
+ }
+ die "failed parse: $_\n";
+}