diff options
author | riastradh <riastradh@pkgsrc.org> | 2013-05-10 05:27:38 +0000 |
---|---|---|
committer | riastradh <riastradh@pkgsrc.org> | 2013-05-10 05:27:38 +0000 |
commit | 4e854d2449102a5609bd186e22eff12dab0f0fae (patch) | |
tree | 38523566a40b8b8ae14b295b59cf74ba695e739e | |
parent | 18e34c90155c3c155faba342b2e411cbb1573bc1 (diff) | |
download | pkgsrc-4e854d2449102a5609bd186e22eff12dab0f0fae.tar.gz |
Fix cross-build of textproc/enca: use CC_FOR_BUILD and avoid run-tests.
-rw-r--r-- | textproc/enca/Makefile | 12 | ||||
-rw-r--r-- | textproc/enca/distinfo | 6 | ||||
-rw-r--r-- | textproc/enca/patches/patch-configure | 14 | ||||
-rw-r--r-- | textproc/enca/patches/patch-configure.ac | 14 | ||||
-rw-r--r-- | textproc/enca/patches/patch-tools_Makefile.am | 36 | ||||
-rw-r--r-- | textproc/enca/patches/patch-tools_Makefile.in | 68 |
6 files changed, 148 insertions, 2 deletions
diff --git a/textproc/enca/Makefile b/textproc/enca/Makefile index 72be831755e..687c15f4e0a 100644 --- a/textproc/enca/Makefile +++ b/textproc/enca/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2013/01/21 13:16:12 wiz Exp $ +# $NetBSD: Makefile,v 1.6 2013/05/10 05:27:38 riastradh Exp $ # DISTNAME= enca-1.14 @@ -17,4 +17,14 @@ USE_PKGLOCALEDIR= yes USE_TOOLS+= gmake PKGCONFIG_OVERRIDE+= ${WRKSRC}/enca.pc.in +.include "../../mk/bsd.prefs.mk" + +.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) && ${OPSYS} == "NetBSD" +CONFIGURE_ENV+= ac_cv_file__dev_random=yes +CONFIGURE_ENV+= ac_cv_file__dev_urandom=yes +CONFIGURE_ENV+= ac_cv_file__dev_srandom=no +CONFIGURE_ENV+= ac_cv_file__dev_arandom=no +CONFIGURE_ENV+= CC_FOR_BUILD=${NATIVE_CC:Q} +.endif + .include "../../mk/bsd.pkg.mk" diff --git a/textproc/enca/distinfo b/textproc/enca/distinfo index 830718f8d71..25bc102055e 100644 --- a/textproc/enca/distinfo +++ b/textproc/enca/distinfo @@ -1,5 +1,9 @@ -$NetBSD: distinfo,v 1.3 2013/01/21 13:16:12 wiz Exp $ +$NetBSD: distinfo,v 1.4 2013/05/10 05:27:38 riastradh Exp $ SHA1 (enca-1.14.tar.bz2) = 9aacb595da981f40a5fa0dadb886f3efeca933f4 RMD160 (enca-1.14.tar.bz2) = 2e4442b905ad6935241b8f47434429ebfd55fbbc Size (enca-1.14.tar.bz2) = 560982 bytes +SHA1 (patch-configure) = 04fe66b700e0886f1d28be7439f9b16e6d9c8b75 +SHA1 (patch-configure.ac) = b1a5fa52c7edc5893f4841675cf4bfdd20a2f544 +SHA1 (patch-tools_Makefile.am) = 1716a9b1675f1bed89e3f79c7ab8dcecea0f2455 +SHA1 (patch-tools_Makefile.in) = 885fe42ecc4f5daad9204fbe415eb77b99f2399d diff --git a/textproc/enca/patches/patch-configure b/textproc/enca/patches/patch-configure new file mode 100644 index 00000000000..01013c3bd99 --- /dev/null +++ b/textproc/enca/patches/patch-configure @@ -0,0 +1,14 @@ +$NetBSD: patch-configure,v 1.1 2013/05/10 05:27:39 riastradh Exp $ + +Pass CC_FOR_BUILD through for make_hash. + +--- configure.orig 2012-09-11 09:12:23.000000000 +0000 ++++ configure +@@ -635,6 +635,7 @@ ac_includes_default="\ + ac_subst_vars='am__EXEEXT_FALSE + am__EXEEXT_TRUE + LTLIBOBJS ++CC_FOR_BUILD + SHELL_RANDOM_FILENAME + DEFAULT_CONVERTER_LIST + DEFAULT_EXTERNAL_CONVERTER diff --git a/textproc/enca/patches/patch-configure.ac b/textproc/enca/patches/patch-configure.ac new file mode 100644 index 00000000000..7b1ac0f53aa --- /dev/null +++ b/textproc/enca/patches/patch-configure.ac @@ -0,0 +1,14 @@ +$NetBSD: patch-configure.ac,v 1.1 2013/05/10 05:27:39 riastradh Exp $ + +Pass CC_FOR_BUILD through for make_hash. + +--- configure.ac.orig 2012-09-11 09:11:11.000000000 +0000 ++++ configure.ac +@@ -207,6 +206,7 @@ AC_SUBST(CONVERTER_LIBS) + AC_SUBST(DEFAULT_EXTERNAL_CONVERTER) + AC_SUBST(DEFAULT_CONVERTER_LIST) + AC_SUBST(SHELL_RANDOM_FILENAME) ++AC_SUBST(CC_FOR_BUILD) + + AC_OUTPUT + diff --git a/textproc/enca/patches/patch-tools_Makefile.am b/textproc/enca/patches/patch-tools_Makefile.am new file mode 100644 index 00000000000..25d86829384 --- /dev/null +++ b/textproc/enca/patches/patch-tools_Makefile.am @@ -0,0 +1,36 @@ +$NetBSD: patch-tools_Makefile.am,v 1.1 2013/05/10 05:27:39 riastradh Exp $ + +Use CC_FOR_BUILD to compile make_hash. + +--- tools/Makefile.am.orig 2009-08-25 08:33:34.000000000 +0000 ++++ tools/Makefile.am +@@ -3,7 +3,9 @@ noinst_PROGRAMS = make_hash + noinst_HEADERS = encodings.h + noinst_SCRIPTS = expand_table.pl + +-make_hash_SOURCES = make_hash.c ++CLEANFILES = make_hash$(EXEEXT) ++make_hash$(EXEEXT): make_hash.c ++ $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/make_hash.c + + BUILT_SOURCES = $(noinst_HEADERS) + +@@ -23,15 +25,15 @@ TABLE_SRC = \ + TEX_SKIP.t \ + encodings.dat + +-EXTRA_DIST = $(TABLE_SRC) $(noinst_SCRIPTS) iconvenc.null ++EXTRA_DIST = $(TABLE_SRC) $(noinst_SCRIPTS) iconvenc.null make_hash.c + + all: encodings.h + + encodings.sed: $(top_builddir)/iconvenc.h + sed -e 's/^#define \([A-Z0-9_]*\) \(.*\)/@\1@ \2/' -e 's/"//g' -e 's/NULL$$//' -e 's/ /\//' -e 's/^\(.*\)$$/s\/\1\//' $(top_builddir)/iconvenc.h >encodings.sed + +-encodings.h: encodings.sed $(srcdir)/encodings.dat make_hash +- sed -f encodings.sed $(srcdir)/encodings.dat | ./make_hash >encodings.h ++encodings.h: encodings.sed $(srcdir)/encodings.dat make_hash$(EXEEXT) ++ sed -f encodings.sed $(srcdir)/encodings.dat | ./make_hash$(EXEEXT) >encodings.h + + # Normally there's no need to regenerate tables, they are copy-and-pasted + # into the C source manually, but the rules are here. Run `make tables' diff --git a/textproc/enca/patches/patch-tools_Makefile.in b/textproc/enca/patches/patch-tools_Makefile.in new file mode 100644 index 00000000000..2100529b52f --- /dev/null +++ b/textproc/enca/patches/patch-tools_Makefile.in @@ -0,0 +1,68 @@ +$NetBSD: patch-tools_Makefile.in,v 1.1 2013/05/10 05:27:39 riastradh Exp $ + +Use CC_FOR_BUILD to compile make_hash. + +--- tools/Makefile.in.orig 2012-09-11 09:12:22.000000000 +0000 ++++ tools/Makefile.in +@@ -109,6 +109,7 @@ AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ ++CC_FOR_BUILD = @CC_FOR_BUILD@ + CFLAGS = @CFLAGS@ + CONVERTER_LIBS = @CONVERTER_LIBS@ + CPP = @CPP@ +@@ -233,6 +234,7 @@ top_srcdir = @top_srcdir@ + noinst_HEADERS = encodings.h + noinst_SCRIPTS = expand_table.pl + make_hash_SOURCES = make_hash.c ++CLEANFILES = make_hash$(EXEEXT) + BUILT_SOURCES = $(noinst_HEADERS) + TABLE_SRC = \ + ACCEPTED_CHARS.t \ +@@ -250,7 +252,7 @@ TABLE_SRC = \ + TEX_SKIP.t \ + encodings.dat + +-EXTRA_DIST = $(TABLE_SRC) $(noinst_SCRIPTS) iconvenc.null ++EXTRA_DIST = $(TABLE_SRC) $(noinst_SCRIPTS) iconvenc.null make_hash.c + + # Normally there's no need to regenerate tables, they are copy-and-pasted + # into the C source manually, but the rules are here. Run `make tables' +@@ -313,9 +315,6 @@ clean-noinstPROGRAMS: + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +-make_hash$(EXEEXT): $(make_hash_OBJECTS) $(make_hash_DEPENDENCIES) $(EXTRA_make_hash_DEPENDENCIES) +- @rm -f make_hash$(EXEEXT) +- $(LINK) $(make_hash_OBJECTS) $(make_hash_LDADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +@@ -462,6 +461,7 @@ install-strip: + mostlyclean-generic: + + clean-generic: ++ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + + distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) +@@ -558,14 +558,16 @@ uninstall-am: + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am + ++make_hash$(EXEEXT): make_hash.c ++ $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/make_hash.c + + all: encodings.h + + encodings.sed: $(top_builddir)/iconvenc.h + sed -e 's/^#define \([A-Z0-9_]*\) \(.*\)/@\1@ \2/' -e 's/"//g' -e 's/NULL$$//' -e 's/ /\//' -e 's/^\(.*\)$$/s\/\1\//' $(top_builddir)/iconvenc.h >encodings.sed + +-encodings.h: encodings.sed $(srcdir)/encodings.dat make_hash +- sed -f encodings.sed $(srcdir)/encodings.dat | ./make_hash >encodings.h ++encodings.h: encodings.sed $(srcdir)/encodings.dat make_hash$(EXEEXT) ++ sed -f encodings.sed $(srcdir)/encodings.dat | ./make_hash$(EXEEXT) >encodings.h + + @MAINTAINER_MODE_TRUE@tables: $(TABLES) $(TABLES_INCR) + |