Skip to content

Commit

Permalink
Add a bulk -a test for FLAVORS
Browse files Browse the repository at this point in the history
  • Loading branch information
bdrewery committed Jun 17, 2017
1 parent b391041 commit b9460c8
Show file tree
Hide file tree
Showing 112 changed files with 7,605 additions and 6 deletions.
3 changes: 2 additions & 1 deletion test/Makefile
Expand Up @@ -19,7 +19,8 @@ TESTS=\
bulk-flavor-specific-dep-and-default-listed.sh \
bulk-flavor-specific-dep-and-default-shorthand-listed.sh \
bulk-flavor-specific-dep-and-multi-listed.sh \
bulk-flavor-specific-dep-and-multi-no-main-listed.sh
bulk-flavor-specific-dep-and-multi-no-main-listed.sh \
bulk-flavor-all.sh

all: check

Expand Down
19 changes: 19 additions & 0 deletions test/bulk-flavor-all.sh
@@ -0,0 +1,19 @@
#! /bin/sh

ALL=1
. common.bulk.sh

${SUDO} ${POUDRIEREPATH} -e ${POUDRIERE_ETC} bulk -n -CNt \
-B "${BUILDNAME}" \
-j "${JAILNAME}" -p "${PTNAME}" ${SETNAME:+-z "${SETNAME}"} \
-a
assert 0 $? "Bulk should pass"

# Assert that only listed packages are in poudriere.ports.queued as 'listed'
assert_queued "listed" "${LISTPORTS}"

# Assert that all expected dependencies are in poudriere.ports.queued (since
# they do not exist yet)
expand_origin_flavors "${LISTPORTS}" expanded_LISTPORTS
list_all_deps "${expanded_LISTPORTS}" ALL_EXPECTED
assert_queued "" "${ALL_EXPECTED}"
12 changes: 10 additions & 2 deletions test/common.bulk.sh
Expand Up @@ -204,8 +204,9 @@ export SRC_ENV_CONF=/dev/null

. common.sh

assert_not "" "${LISTPORTS}" "LISTPORTS empty"
echo "Building: $(echo ${LISTPORTS})"
if [ ${ALL:-0} -eq 0 ]; then
assert_not "" "${LISTPORTS}" "LISTPORTS empty"
fi

SUDO=
if [ $(id -u) -ne 0 ]; then
Expand Down Expand Up @@ -273,6 +274,13 @@ set +e

ALL_PKGNAMES=
ALL_ORIGINS=
if [ ${ALL} -eq 1 ]; then
LISTPORTS="$(listed_ports)"
fi
echo -n "Gathering metadata for requested ports..."
for origin in ${LISTPORTS}; do
cache_pkgnames "${origin}"
done
echo " done"
expand_origin_flavors "${LISTPORTS}" LISTPORTS_EXPANDED
echo "Building: $(echo ${LISTPORTS_EXPANDED})"
6 changes: 4 additions & 2 deletions test/ports/Makefile
@@ -1,5 +1,7 @@
# Not included in bulk tests
#SUBDIR += devel
SUBDIR += converters
SUBDIR += devel
SUBDIR += lang
SUBDIR += ports-mgmt
SUBDIR += misc
SUBDIR += print
SUBDIR += security
1 change: 1 addition & 0 deletions test/ports/converters/Makefile
@@ -0,0 +1 @@
SUBDIR += libiconv
44 changes: 44 additions & 0 deletions test/ports/converters/libiconv/Makefile
@@ -0,0 +1,44 @@
# Created by: Maxim Sobolev <sobomax@FreeBSD.org>
# $FreeBSD: head/converters/libiconv/Makefile 428196 2016-12-09 12:57:21Z sunpoet $

PORTNAME= libiconv
PORTVERSION= 1.14
PORTREVISION= 10
CATEGORIES= converters devel
MASTER_SITES= GNU

MAINTAINER= gnome@FreeBSD.org
COMMENT= Character set conversion library

LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING

GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-static \
--disable-nls \
--docdir=${DOCSDIR} \
am_cv_func_iconv=no
INSTALL_TARGET= install-strip
MAKE_JOBS_UNSAFE= yes
USES= libtool
USE_CSTD= gnu89
USE_LDCONFIG= yes

OPTIONS_DEFINE= DOCS ENCODINGS PATCHES
OPTIONS_DEFAULT=ENCODINGS
ENCODINGS_DESC= Include extra character sets
PATCHES_DESC= Apply patches to fix CP932, add EUCJP-MS

ENCODINGS_CONFIGURE_ENABLE= extra-encodings

PATCHES_PATCH_SITES= http://apolloron.org/software/libiconv-1.14-ja/ \
LOCAL/kwm
PATCHES_PATCHFILES= ${DISTNAME}-ja-1.patch.gz:-p1

post-patch:
@${REINPLACE_CMD} -e 's:ei_ksc5601:ei_euc_kr:g' ${WRKSRC}/lib/aliases.h
@${REINPLACE_CMD} -e 's:gawk:awk:g' ${WRKSRC}/configure \
${WRKSRC}/libcharset/configure \
${WRKSRC}/preload/configure

.include <bsd.port.mk>
4 changes: 4 additions & 0 deletions test/ports/converters/libiconv/distinfo
@@ -0,0 +1,4 @@
SHA256 (libiconv-1.14.tar.gz) = 72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613
SIZE (libiconv-1.14.tar.gz) = 4984397
SHA256 (libiconv-1.14-ja-1.patch.gz) = c9474ee420b971029073dabf5e599b049945fbb040f353dce4db32191401bfee
SIZE (libiconv-1.14-ja-1.patch.gz) = 291963
70 changes: 70 additions & 0 deletions test/ports/converters/libiconv/files/patch-include-iconv.h.in
@@ -0,0 +1,70 @@
--- include/iconv.h.in.orig 2011-08-07 17:48:03 UTC
+++ include/iconv.h.in
@@ -21,8 +21,10 @@
#ifndef _LIBICONV_H
#define _LIBICONV_H

+#ifndef LIBICONV_PLUG
#define _LIBICONV_VERSION 0x010E /* version number: (major<<8) + minor */
extern @DLL_VARIABLE@ int _libiconv_version; /* Likewise */
+#endif

/* We would like to #include any system header file which could define
iconv_t, 1. in order to eliminate the risk that the user gets compilation
@@ -94,7 +96,6 @@ extern int iconv_close (iconv_t cd);
#endif


-#ifndef LIBICONV_PLUG

/* Nonstandard extensions. */

@@ -127,12 +128,16 @@ typedef struct {
/* Allocates descriptor for code conversion from encoding ‘fromcode’ to
encoding ‘tocode’ into preallocated memory. Returns an error indicator
(0 or -1 with errno set). */
+#ifndef LIBICONV_PLUG
#define iconv_open_into libiconv_open_into
+#endif
extern int iconv_open_into (const char* tocode, const char* fromcode,
iconv_allocation_t* resultp);

/* Control of attributes. */
+#ifndef LIBICONV_PLUG
#define iconvctl libiconvctl
+#endif
extern int iconvctl (iconv_t cd, int request, void* argument);

/* Hook performed after every successful conversion of a Unicode character. */
@@ -212,7 +217,9 @@ struct iconv_fallbacks {
#define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */

/* Listing of locale independent encodings. */
+#ifndef LIBICONV_PLUG
#define iconvlist libiconvlist
+#endif
extern void iconvlist (int (*do_one) (unsigned int namescount,
const char * const * names,
void* data),
@@ -224,6 +231,7 @@ extern const char * iconv_canonicalize (

/* Support for relocatable packages. */

+#ifndef LIBICONV_PLUG
/* Sets the original and the current installation prefix of the package.
Relocation simply replaces a pathname starting with the original prefix
by the corresponding pathname with the current prefix instead. Both
@@ -231,12 +239,12 @@ extern const char * iconv_canonicalize (
instead of "/"). */
extern void libiconv_set_relocation_prefix (const char *orig_prefix,
const char *curr_prefix);
+#endif

#ifdef __cplusplus
}
#endif

-#endif


#endif /* _LIBICONV_H */
@@ -0,0 +1,43 @@
--- libcharset/lib/config.charset.orig 2010-04-05 02:25:38.000000000 +0200
+++ libcharset/lib/config.charset 2011-10-23 22:05:50.000000000 +0200
@@ -348,7 +348,7 @@ case "$os" in
#echo "sun_eu_greek ?" # what is this?
echo "UTF-8 UTF-8"
;;
- freebsd* | os2*)
+ freebsd4.[0-5]* | os2*)
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# from the environment variables.
@@ -385,6 +385,31 @@ case "$os" in
echo "ja_JP.Shift_JIS SHIFT_JIS"
echo "ko_KR.EUC EUC-KR"
;;
+ freebsd*)
+ echo "US-ASCII ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO_8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO_8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO_8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO_8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO_8859-7 ISO-8859-7"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO_8859-9 ISO-8859-9"
+ echo "ISO8859-13 ISO-8859-13"
+ echo "ISO_8859-13 ISO-8859-13"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "ISO_8859-15 ISO-8859-15"
+ echo "eucCN GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "Big5 BIG5"
+ echo "Big5HKSCS BIG5-HKSCS"
+ echo "SJIS SHIFT_JIS"
+ ;;
netbsd*)
echo "646 ASCII"
echo "ISO8859-1 ISO-8859-1"
19 changes: 19 additions & 0 deletions test/ports/converters/libiconv/files/patch-src__Makefile.in
@@ -0,0 +1,19 @@
--- src/Makefile.in.orig 2011-06-04 19:05:58.000000000 +0200
+++ src/Makefile.in 2013-07-06 18:49:54.000000000 +0200
@@ -71,7 +71,6 @@
# without internationalization and not linked with libintl.

all : iconv_no_i18n$(EXEEXT) iconv.@OBJEXT@ $(OBJECTS_RES_@WOE32@)
- test `ls -ld . | sed -e 's/^d\(.........\).*/\1/'` = rwxrwxrwx || chmod 777 .

# This is the temporary iconv executable, without internationalization.
iconv_no_i18n$(EXEEXT) : iconv_no_i18n.@OBJEXT@ ../lib/libiconv.la $(OBJECTS_RES_@WOE32@)
@@ -113,7 +112,7 @@
if [ ! -d $(DESTDIR)$(bindir) ] ; then $(mkinstalldirs) $(DESTDIR)$(bindir) ; fi
case "@host_os@" in \
hpux*) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a -L$(DESTDIR)$(libdir) -liconv @LIBINTL@ $(OBJECTS_RES_@WOE32@) `if test -n '$(DESTDIR)'; then echo " -Wl,+b -Wl,$(libdir)"; fi` -o iconv$(EXEEXT);; \
- *) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a $(DESTDIR)$(libdir)/libiconv.la @LTLIBINTL@ $(OBJECTS_RES_@WOE32@) -o iconv$(EXEEXT);; \
+ *) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a ../lib/libiconv.la @LTLIBINTL@ $(OBJECTS_RES_@WOE32@) -o iconv$(EXEEXT);; \
esac
$(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) iconv$(EXEEXT) $(DESTDIR)$(bindir)/iconv$(EXEEXT)

14 changes: 14 additions & 0 deletions test/ports/converters/libiconv/pkg-descr
@@ -0,0 +1,14 @@
This library provides an iconv() implementation, for use on systems which
don't have one, or whose implementation cannot convert from/to Unicode.

It can convert from any of these encodings to any other, through Unicode
conversion. It has also some limited support for transliteration, i.e.
when a character cannot be represented in the target character set, it can
be approximated through one or several similarly looking characters.

libiconv is for you if your application needs to support multiple character
encodings, but that support lacks from your system.

See either README or website for the list of supported encodings.

WWW: http://www.gnu.org/software/libiconv/
25 changes: 25 additions & 0 deletions test/ports/converters/libiconv/pkg-plist
@@ -0,0 +1,25 @@
bin/iconv
include/iconv.h
include/libcharset.h
include/localcharset.h
lib/charset.alias
lib/libcharset.a
lib/libcharset.so
lib/libcharset.so.1
lib/libcharset.so.1.0.0
lib/libiconv.a
lib/libiconv.so
lib/libiconv.so.2
lib/libiconv.so.2.5.1
man/man1/iconv.1.gz
man/man3/iconv.3.gz
man/man3/iconv_open.3.gz
man/man3/iconv_open_into.3.gz
man/man3/iconv_close.3.gz
man/man3/iconvctl.3.gz
%%PORTDOCS%%%%DOCSDIR%%/iconv.1.html
%%PORTDOCS%%%%DOCSDIR%%/iconv.3.html
%%PORTDOCS%%%%DOCSDIR%%/iconv_close.3.html
%%PORTDOCS%%%%DOCSDIR%%/iconv_open.3.html
%%PORTDOCS%%%%DOCSDIR%%/iconv_open_into.3.html
%%PORTDOCS%%%%DOCSDIR%%/iconvctl.3.html
8 changes: 8 additions & 0 deletions test/ports/devel/Makefile
Expand Up @@ -3,4 +3,12 @@ SUBDIR += autoconf-wrapper
SUBDIR += automake
SUBDIR += automake-wrapper
SUBDIR += ccache
SUBDIR += gettext
SUBDIR += gettext-runtime
SUBDIR += gettext-tools
SUBDIR += gmake
SUBDIR += libffi
SUBDIR += m4
SUBDIR += p5-Locale-gettext
SUBDIR += pkgconf
SUBDIR += readline
49 changes: 49 additions & 0 deletions test/ports/devel/gettext-runtime/Makefile
@@ -0,0 +1,49 @@
# $FreeBSD: head/devel/gettext-runtime/Makefile 428152 2016-12-08 19:52:19Z tijl $

# NOTE: before committing to this port, contact portmgr to arrange for an
# experimental ports run. Untested commits may be backed out at portmgr's
# discretion.

PORTNAME= gettext-runtime
PORTREVISION= 1

COMMENT= GNU gettext runtime libraries and programs

LICENSE= LGPL21 GPLv3
LICENSE_COMB= multi
LICENSE_FILE_LGPL21= ${WRKSRC}/intl/COPYING.LIB
LICENSE_FILE_GPLv3= ${WRKSRC}/../COPYING

.include "${.CURDIR}/../gettext/Makefile.common"

GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-csharp --disable-java --with-included-gettext \
ac_cv_lib_rt_sched_yield=no
INSTALL_TARGET= install-strip
TEST_TARGET= check
USES= charsetfix cpe iconv libtool tar:xz
USE_LDCONFIG= yes
WRKSRC_SUBDIR= gettext-runtime

INFO= autosprintf
CPE_PRODUCT= gettext
CPE_VENDOR= gnu

.include <bsd.port.options.mk>

.if ${OPSYS} == DragonFly
CONFIGURE_ARGS+=--disable-threads
.endif

post-patch:
# Do not install csharp and java documentation.
@${REINPLACE_CMD} -E '/^SUBDIRS =/s/(intl-csharp|intl-java)//g' \
${WRKSRC}/Makefile.in
# Do not install html copies of manpages.
@${REINPLACE_CMD} \
-e '/^all-local:/s/html-local//' \
-e '/^install-data-local:/s/install-html//' \
-e '/^installdirs-local:/s/installdirs-html//' \
${WRKSRC}/libasprintf/Makefile.in ${WRKSRC}/man/Makefile.in

.include <bsd.port.mk>
11 changes: 11 additions & 0 deletions test/ports/devel/gettext-runtime/files/patch-configure
@@ -0,0 +1,11 @@
--- configure.orig 2014-07-14 07:30:12 UTC
+++ configure
@@ -16277,7 +16277,7 @@
# thread: pthread_create from libc will fail, whereas
# pthread_create will actually create a thread.
case "$host_os" in
- solaris* | hpux*)
+ solaris* | hpux* | freebsd*)

$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h

0 comments on commit b9460c8

Please sign in to comment.