diff --git a/330.libressl.build b/330.libressl.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/330.libressl.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/build.vars b/build.vars index 838354d..7ab22d1 100644 --- a/build.vars +++ b/build.vars @@ -126,6 +126,11 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_LIBELF_SHA256SUM:=591a9b4ec81c1f2042a97aa60564e0cb79d041c52faa7416acb38bc95bd2c76d}; : ${PKG_LIBELF_VERSION:=0.8.13}; : ${PKG_LIBELF_URL:=http://www.mr511.de/software/libelf-${PKG_LIBELF_VERSION}.tar.gz}; +: ${PKG_LIBRESSL_CFLAGS:=-D__MIDIPIX}; +: ${PKG_LIBRESSL_CONFIGURE_ARGS_EXTRA:=--disable-asm}; +: ${PKG_LIBRESSL_SHA256SUM:=1ee19994cffd047d40f63ba149115dba18a681b0cc923beec301bf424b58d64f}; +: ${PKG_LIBRESSL_VERSION:=2.2.6}; +: ${PKG_LIBRESSL_URL:=http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${PKG_LIBRESSL_VERSION}.tar.gz}; : ${PKG_LIBZ_CONFIGURE_ARGS:=--host=${HOST_NATIVE} --prefix= --target=${TARGET}}; : ${PKG_LIBZ_SHA256SUM:=33e65f22ec3d3e3f87436e53f82eb114054cd3aa373dc0480625dd92806fd9a0}; : ${PKG_LIBZ_VERSION:=1.2.8.2015.05.20}; @@ -166,6 +171,8 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_SED_SHA256SUM:=f048d1838da284c8bc9753e4506b85a1e0cc1ea8999d36f6995bcb9460cddbd7}; : ${PKG_SED_VERSION:=4.2.2}; : ${PKG_SED_URL:=https://ftp.gnu.org/gnu/sed/sed-${PKG_SED_VERSION}.tar.bz2}; +: ${PKG_UTIL_LINUX_CFLAGS:=-I${PREFIX_LVL3}/include}; +: ${PKG_UTIL_LINUX_LDFLAGS:=-I${PREFIX_LVL3}/lib}; : ${PKG_UTIL_LINUX_CONFIGURE_ARGS_EXTRA:=--disable-agetty --disable-wall --disable-write}; : ${PKG_UTIL_LINUX_SHA256SUM:=133c14f625d40e90e73e9d200faf3f2ce87937b99f923c84e5504ac0badc71d6}; : ${PKG_UTIL_LINUX_VERSION:=2.27.1}; diff --git a/libressl-2.2.6.local.patch b/libressl-2.2.6.local.patch new file mode 100644 index 0000000..a2f1074 --- /dev/null +++ b/libressl-2.2.6.local.patch @@ -0,0 +1,205 @@ +--- libressl-2.2.6/config.sub.orig 2016-01-28 19:18:06.000000000 +0100 ++++ libressl-2.2.6/config.sub 2016-02-12 17:19:40.807245600 +0100 +@@ -804,6 +804,9 @@ + microblaze*) + basic_machine=microblaze-xilinx + ;; ++ midipix) ++ os=-midipix; ++ ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 +@@ -1384,7 +1387,7 @@ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ ++ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ +--- libressl-2.2.6/configure.orig 2016-01-28 19:18:06.000000000 +0100 ++++ libressl-2.2.6/configure 2016-02-12 17:46:12.545206600 +0100 +@@ -690,6 +690,8 @@ + HOST_NETBSD_TRUE + HOST_LINUX_FALSE + HOST_LINUX_TRUE ++HOST_MIDIPIX_FALSE ++HOST_MIDIPIX_TRUE + HOST_HPUX_FALSE + HOST_HPUX_TRUE + HOST_FREEBSD_FALSE +@@ -11902,6 +11904,11 @@ + HOST_ABI=elf + CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE" + ;; ++ *midipix*) ++ HOST_OS=midipix ++ HOST_ABI=pe ++ CFLAGS="$CFLAGS -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE" ++ ;; + *netbsd*) + HOST_OS=netbsd + CPPFLAGS="$CPPFLAGS -D_OPENBSD_SOURCE" +@@ -11981,6 +11988,14 @@ + HOST_LINUX_FALSE= + fi + ++ if test x$HOST_OS = xmidipix; then ++ HOST_MIDIPIX_TRUE= ++ HOST_MIDIPIX_FALSE='#' ++else ++ HOST_MIDIPIX_TRUE='#' ++ HOST_MIDIPIX_FALSE= ++fi ++ + if test x$HOST_OS = xnetbsd; then + HOST_NETBSD_TRUE= + HOST_NETBSD_FALSE='#' +@@ -13422,6 +13437,10 @@ + as_fn_error $? "conditional \"HOST_LINUX\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${HOST_MIDIPIX_TRUE}" && test -z "${HOST_MIDIPIX_FALSE}"; then ++ as_fn_error $? "conditional \"HOST_MIDIPIX\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${HOST_NETBSD_TRUE}" && test -z "${HOST_NETBSD_FALSE}"; then + as_fn_error $? "conditional \"HOST_NETBSD\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +--- libressl-2.2.6/crypto/compat/arc4random.h.orig 2015-10-15 23:18:44.000000000 +0200 ++++ libressl-2.2.6/crypto/compat/arc4random.h 2016-02-12 17:19:40.815245600 +0100 +@@ -12,7 +12,7 @@ + #elif defined(__hpux) + #include "arc4random_hpux.h" + +-#elif defined(__linux__) ++#elif defined(__linux__) || defined(__MIDIPIX) + #include "arc4random_linux.h" + + #elif defined(__NetBSD__) +--- libressl-2.2.6/crypto/compat/getentropy_linux.c.orig 2015-10-16 00:04:58.000000000 +0200 ++++ libressl-2.2.6/crypto/compat/getentropy_linux.c 2016-02-12 17:48:47.474391200 +0100 +@@ -27,7 +27,7 @@ + #include + #include + #include +-#ifdef SYS__sysctl ++#if defined(SYS__sysctl) && !defined(__MIDIPIX) + #include + #endif + #include +@@ -49,8 +49,10 @@ + #include + #include + ++#ifndef __MIDIPIX + #include + #include ++#endif + #ifdef HAVE_GETAUXVAL + #include + #endif +@@ -78,7 +80,7 @@ + static int getentropy_getrandom(void *buf, size_t len); + #endif + static int getentropy_urandom(void *buf, size_t len); +-#ifdef SYS__sysctl ++#if defined(SYS__sysctl) && !defined(__MIDIPIX) + static int getentropy_sysctl(void *buf, size_t len); + #endif + static int getentropy_fallback(void *buf, size_t len); +@@ -115,7 +117,7 @@ + if (ret != -1) + return (ret); + +-#ifdef SYS__sysctl ++#if defined(SYS__sysctl) && !defined(__MIDIPIX) + /* + * Try to use sysctl CTL_KERN, KERN_RANDOM, RANDOM_UUID. + * sysctl is a failsafe API, so it guarantees a result. This +@@ -241,10 +243,12 @@ + close(fd); + goto nodevrandom; + } ++#ifndef __MIDIPIX + if (ioctl(fd, RNDGETENTCNT, &cnt) == -1) { + close(fd); + goto nodevrandom; + } ++#endif + for (i = 0; i < len; ) { + size_t wanted = len - i; + ssize_t ret = read(fd, (char *)buf + i, wanted); +@@ -267,7 +271,7 @@ + return -1; + } + +-#ifdef SYS__sysctl ++#if defined(SYS__sysctl) && !defined(__MIDIPIX) + static int + getentropy_sysctl(void *buf, size_t len) + { +--- libressl-2.2.6/crypto/Makefile.in.orig 2016-01-28 19:18:08.000000000 +0100 ++++ libressl-2.2.6/crypto/Makefile.in 2016-02-12 17:19:40.823245600 +0100 +@@ -111,10 +111,11 @@ + @HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_FREEBSD_TRUE@am__append_19 = compat/getentropy_freebsd.c + @HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_HPUX_TRUE@am__append_20 = compat/getentropy_hpux.c + @HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_LINUX_TRUE@am__append_21 = compat/getentropy_linux.c +-@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_NETBSD_TRUE@am__append_22 = compat/getentropy_netbsd.c +-@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_DARWIN_TRUE@am__append_23 = compat/getentropy_osx.c +-@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_SOLARIS_TRUE@am__append_24 = compat/getentropy_solaris.c +-@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_WIN_TRUE@am__append_25 = compat/getentropy_win.c ++@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_MIDIPIX_TRUE@am__append_22 = compat/getentropy_linux.c ++@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_NETBSD_TRUE@am__append_23 = compat/getentropy_netbsd.c ++@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_DARWIN_TRUE@am__append_24 = compat/getentropy_osx.c ++@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_SOLARIS_TRUE@am__append_25 = compat/getentropy_solaris.c ++@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_WIN_TRUE@am__append_26 = compat/getentropy_win.c + @HOST_ASM_ELF_X86_64_TRUE@am__append_26 = -DAES_ASM -DBSAES_ASM \ + @HOST_ASM_ELF_X86_64_TRUE@ -DVPAES_ASM -DOPENSSL_IA32_SSE2 \ + @HOST_ASM_ELF_X86_64_TRUE@ -DOPENSSL_BN_ASM_MONT \ +@@ -220,17 +221,18 @@ + @HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_FREEBSD_TRUE@am__objects_13 = compat/getentropy_freebsd.lo + @HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_HPUX_TRUE@am__objects_14 = compat/getentropy_hpux.lo + @HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_LINUX_TRUE@am__objects_15 = compat/getentropy_linux.lo +-@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_NETBSD_TRUE@am__objects_16 = compat/getentropy_netbsd.lo +-@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_DARWIN_TRUE@am__objects_17 = compat/getentropy_osx.lo +-@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_SOLARIS_TRUE@am__objects_18 = compat/getentropy_solaris.lo +-@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_WIN_TRUE@am__objects_19 = compat/getentropy_win.lo ++@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_MIDIPIX_TRUE@am__objects_16 = compat/getentropy_linux.lo ++@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_NETBSD_TRUE@am__objects_17 = compat/getentropy_netbsd.lo ++@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_DARWIN_TRUE@am__objects_18 = compat/getentropy_osx.lo ++@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_SOLARIS_TRUE@am__objects_19 = compat/getentropy_solaris.lo ++@HAVE_ARC4RANDOM_BUF_FALSE@@HAVE_GETENTROPY_FALSE@@HOST_WIN_TRUE@am__objects_20 = compat/getentropy_win.lo + am_libcompat_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) $(am__objects_4) $(am__objects_5) \ + $(am__objects_6) $(am__objects_7) $(am__objects_8) \ + $(am__objects_9) $(am__objects_10) $(am__objects_11) \ + $(am__objects_12) $(am__objects_13) $(am__objects_14) \ + $(am__objects_15) $(am__objects_16) $(am__objects_17) \ +- $(am__objects_18) $(am__objects_19) ++ $(am__objects_18) $(am__objects_19) $(am__objects_20) + libcompat_la_OBJECTS = $(am_libcompat_la_OBJECTS) + AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +@@ -985,7 +987,7 @@ + $(am__append_16) $(am__append_17) $(am__append_18) \ + $(am__append_19) $(am__append_20) $(am__append_21) \ + $(am__append_22) $(am__append_23) $(am__append_24) \ +- $(am__append_25) ++ $(am__append_25) $(am__append_26) + libcompat_la_LIBADD = $(PLATFORM_LDADD) + + # rc4 +--- libressl-2.2.6/include/compat/machine/endian.h.orig 2015-10-15 23:18:44.000000000 +0200 ++++ libressl-2.2.6/include/compat/machine/endian.h 2016-02-12 17:19:40.827245600 +0100 +@@ -21,7 +21,7 @@ + #define BYTE_ORDER BIG_ENDIAN + #endif + +-#elif defined(__linux__) ++#elif defined(__linux__) || defined(__MIDIPIX) + #include + + #elif defined(__sun) || defined(_AIX) || defined(__hpux) diff --git a/pkg.build b/pkg.build index 997da3d..99bdb2c 100644 --- a/pkg.build +++ b/pkg.build @@ -6,8 +6,8 @@ parse_with_pkg_name ${2} \ bash binutils binutils_host bzip2 coreutils \ dalist dash diffutils findutils gawk gmp \ - grep gzip less libelf libz make mpc mpfr ncurses \ - ntapi ntcon ntctty patch pemagine popt psxscl \ + grep gzip less libelf libressl libz make mpc mpfr \ + ncurses ntapi ntcon ntctty patch pemagine popt psxscl \ psxstub psxtypes rsync sed tar util_linux which xz; case "${SCRIPT_FNAME%[0-9][0-9]*}" in 1) _configure_args="--host=${HOST_NATIVE} --prefix=${PKG_PREFIX:-/} --target=${TARGET}"; @@ -15,7 +15,7 @@ case "${SCRIPT_FNAME%[0-9][0-9]*}" in 2) _configure_args="--prefix=${PREFIX_LVL} --host=${HOST_NATIVE}"; PKG_BUILD_TYPE=cross; PKG_URL_TYPE=git; - PKG_NO_CONFIG_CACHE=${PKG_NO_DESTDIR:=${PKG_NO_EXTRACT:=1}}; + PKG_NO_CONFIG_CACHE=${PKG_NO_DESTDIR:=${PKG_NO_EXTRACT:=${PKG_NO_LIBTOOL_MIDIPIX:=1}}}; PKG_UNSET_VARS_BUILD="CC LD CFLAGS LDFLAGS PREFIX"; export CFLAGS_PATH=-I${PREFIX_LVL}/include; export LDFLAGS_PATH=-L${PREFIX_LVL}/lib;