summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-03-06 19:03:45 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-03-06 19:03:45 +0000
commit95bf778d64e1e74be25eeb47daf68317f3fc616e (patch)
treeff29e192fa1940b7593bfc30bb157de3348aa568
parent75cb84da6274d97fb7d146499b96b5a4973367cd (diff)
downloadmidipix_build-95bf778d64e1e74be25eeb47daf68317f3fc616e.tar.bz2
midipix_build-95bf778d64e1e74be25eeb47daf68317f3fc616e.tar.xz
- Adds glib2, irssi, and libffi.
- Fixes signal handling wrt. build status files. - Simplify tarball creation procedure. - Forcibly remove all \*.la files from $PREFIX_LVL3/lib after each installation build step.
l---------359.libffi.build1
l---------360.glib.build1
l---------361.irssi.build1
-rwxr-xr-xbuild.sh23
-rw-r--r--build.subr3
-rw-r--r--build.vars19
-rw-r--r--glib-2.46.2.local.patch181
-rw-r--r--irssi-0.8.18.local.patch22
-rw-r--r--pkg.build1
9 files changed, 238 insertions, 14 deletions
diff --git a/359.libffi.build b/359.libffi.build
new file mode 120000
index 00000000..52bb82e5
--- /dev/null
+++ b/359.libffi.build
@@ -0,0 +1 @@
+pkg.build \ No newline at end of file
diff --git a/360.glib.build b/360.glib.build
new file mode 120000
index 00000000..52bb82e5
--- /dev/null
+++ b/360.glib.build
@@ -0,0 +1 @@
+pkg.build \ No newline at end of file
diff --git a/361.irssi.build b/361.irssi.build
new file mode 120000
index 00000000..52bb82e5
--- /dev/null
+++ b/361.irssi.build
@@ -0,0 +1 @@
+pkg.build \ No newline at end of file
diff --git a/build.sh b/build.sh
index e12a9d43..e8751232 100755
--- a/build.sh
+++ b/build.sh
@@ -27,7 +27,7 @@ clear_env_with_except ${CLEAR_ENV_VARS_EXCEPT};
check_path_vars ${CHECK_PATH_VARS}; check_prereqs ${PREREQ_CMDS};
mkdir -p ${PREFIX} ${PREFIX_NATIVE} ${PREFIX_TARGET} ${WORKDIR};
{(
-update_build_status build_start; build_times_init; trap clean_build_status\ abort HUP INT TERM USR1 USR2;
+update_build_status build_start; build_times_init; trap "clean_build_status abort; exit 1" HUP INT TERM USR1 USR2;
log_msg info "Build started by ${BUILD_USER:=${USER}}@${BUILD_HNAME:=$(hostname)} at ${BUILD_DATE_START}.";
log_env_vars ${LOG_ENV_VARS}; [ ${ARG_CLEAN:-0} -eq 1 ] && clean_prefix;
BUILD_NFINI=${BUILD_NSKIP:=${BUILD_NFAIL:=${BUILD_NBUILT:=0}}};
@@ -99,25 +99,24 @@ if [ $(( ${BUILD_NFINI} + ${BUILD_NSKIP} )) -ge 0 ] \
&& [ ${ARG_TARBALL:-0} -eq 1 ]; then
update_build_status build_finish tarball_start;
log_msg info "Building distribution tarball...";
- (cd ${PREFIX}; PREFIX_BASENAME=${PREFIX_NATIVE##*/};
+ cd ${PREFIX}; PREFIX_BASENAME=${PREFIX_NATIVE##*/};
rm_if_exists -m ${PREFIX_BASENAME}/lib.bak;
tar -C ${PREFIX_BASENAME}/lib -cpf - . | tar -C ${PREFIX_BASENAME}/lib.bak -xpf -;
log_msg info "Backed up ${PREFIX_BASENAME}/lib.";
- (cd native/lib &&
- find . -maxdepth 1 -type l \
- -exec sh -c 'DEST=$(readlink -- "${0}") && \
- rm -f -- "${0}" && ln -- "${DEST}" "${0}"' {} \;); wait;
- log_msg info "Converted symbolic links in ${PREFIX_BASENAME}/lib to hard links.";
- TARBALL_FNAME=${TARBALL_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.xz;
- tar -cJpf ${TARBALL_FNAME} \
+ find native/lib -maxdepth 1 -type l \
+ -exec sh -c '[ -f "${DEST:=$(readlink -- "${0}")}" ] && \
+ rm -f -- "${0}" && ln -- "${DEST}" "${0}"' {} \;;
+ log_msg info "Converted symbolic links in ${PREFIX_BASENAME}/lib to hard links.";
+ tar -cJpf ${TARBALL_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.xz\
$(find_with_no_paths "${TARBALL_EXCLUDE_PATHS} native/lib.bak" . \
-mindepth 1 -maxdepth 2 -type d);
- rm -rf ${PREFIX_BASENAME}/lib; mv ${PREFIX_BASENAME}/lib.bak ${PREFIX_BASENAME}/lib);
- wait; log_msg info "Finished building distribution tarball.";
+ rm -rf ${PREFIX_BASENAME}/lib; mv ${PREFIX_BASENAME}/lib.bak ${PREFIX_BASENAME}/lib;
+ cd ${OLDPWD};
+ log_msg info "Finished building distribution tarball.";
update_build_status tarball_finish;
fi;
update_build_status finish; clean_build_status;
-exit ${BUILD_SCRIPT_RC})} 2>&1 | tee ${PREFIX}/build.log &
+exit ${BUILD_SCRIPT_RC})} 2>&1 | tee ${PREFIX}/${BUILD_LOG_FNAME:=build-$(date ${TIMESTAMP_FMT_STATUS_FILES}).log} &
trap "kill -INT $!" HUP INT TERM USR1 USR2; wait;
# vim:filetype=sh
diff --git a/build.subr b/build.subr
index 8e6b1977..d4b00e1a 100644
--- a/build.subr
+++ b/build.subr
@@ -43,11 +43,12 @@ clean_prefix() {
};
clean_build_status() {
+ [ "${1}" = abort ] && _cbs_abort=1;
set -- BUILD_STATUS_IN_PROGRESS_FNAME BUILD_STATUS_PROGRESS_FNAME BUILD_STATUS_TARBALL_PROGRESS_FNAME;
while [ ${#} -gt 0 ]; do
rm -f $(get_var_unsafe ${1}); shift;
done;
- if [ "${1}" = abort ]; then
+ if [ ${_cbs_abort:-0} -eq 1 ]; then
touch ${PREFIX}/BUILD_ABORTED_AT_$(date %Y-%m-%d-%H-%M-%S);
log_msg fail "Build aborted at $(date %Y-%m-%d-%H-%M-%S).";
fi;
diff --git a/build.vars b/build.vars
index 91147d5c..5bb21214 100644
--- a/build.vars
+++ b/build.vars
@@ -41,7 +41,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}";
: ${WGET_ARGS:="-N --no-check-certificate"};
: ${WORKDIR:=${PREFIX}/tmp};
-: ${PKG_BUILD_NAMES:="apk_tools bash binutils binutils_host bzip2 coreutils dalist dash diffutils findutils gawk git gmp grep gzip hexcurse less libelf libressl libz make mpc mpfr nano ncurses ncursestw ncursesw ntapi ntcon ntctty openssh patch pemagine popt psxscl psxstub psxtypes rsync sed tar util_linux which xz"};
+: ${PKG_BUILD_NAMES:="apk_tools bash binutils binutils_host bzip2 coreutils dalist dash diffutils findutils gawk git glib gmp grep gzip hexcurse irssi less libelf libffi libressl libz make mpc mpfr nano ncurses ncursestw ncursesw ntapi ntcon ntctty openssh patch pemagine popt psxscl psxstub psxtypes rsync sed tar util_linux which xz"};
: ${PKG_BUILD_VARS:="AR_BUILD AR_CONFIGURE BUILD_DIR BUILD_TYPE CC_BUILD CC_CONFIGURE CC_INSTALL CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA CFLAGS_INSTALL_EXTRA CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA ENV_VARS_EXTRA GIT_ARGS_EXTRA INSTALL_TARGET LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA LDFLAGS_INSTALL_EXTRA LIBTOOL_MIDIPIX LIBTOOL_MIDIPIX_FIX MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA NO_CLEAN PATCHES_EXTRA_URL PREFIX_EXTRA RANLIB_INSTALL SHA256SUM SUBDIR URL URL_TYPE VERSION"};
: ${PKG_LVL0_CFLAGS_CONFIGURE:=-O0};
: ${PKG_LVL0_CONFIGURE_ARGS:="-C --host=${HOST_NATIVE} --prefix= --target=${TARGET}"};
@@ -123,6 +123,12 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}";
: ${PKG_GIT_SUBDIR:=git};
: ${PKG_GIT_URL:=https://github.com/git/git.git};
: ${PKG_GIT_URL_TYPE:=git};
+: ${PKG_GLIB_VERSION:=2.46.2};
+: ${PKG_GLIB_SHA256SUM:=5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db};
+: ${PKG_GLIB_URL:=http://ftp.gnome.org/pub/GNOME/sources/glib/${PKG_GLIB_VERSION%.[0-9]}/glib-${PKG_GLIB_VERSION}.tar.xz};
+: ${PKG_GLIB_CONFIGURE_ARGS_EXTRA:=--with-pcre=internal --disable-libelf};
+: ${PKG_GLIB_ENV_VARS_EXTRA:=LIBFFI_CFLAGS=-I${PREFIX_LVL3}/lib/libffi-3.2.1/include,LIBFFI_LIBS=-L${PREFIX_LVL3}/lib -lffi};
+: ${PKG_GLIB_MAKEFLAGS_BUILD_EXTRA:=V=99};
: ${PKG_GMP_VERSION:=5.1.3};
: ${PKG_GMP_SHA256SUM:=752079520b4690531171d0f4532e40f08600215feefede70b24fabdc6f1ab160};
: ${PKG_GMP_URL:=https://gmplib.org/download/gmp/gmp-${PKG_GMP_VERSION}.tar.bz2};
@@ -140,6 +146,13 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}";
: ${PKG_HEXCURSE_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_LVL3}/include/ncursesw};
: ${PKG_HEXCURSE_URL:=https://github.com/LonnyGomes/hexcurse};
: ${PKG_HEXCURSE_URL_TYPE:=git};
+: ${PKG_IRSSI_VERSION=0.8.18};
+: ${PKG_IRSSI_SHA256SUM:=30043784815bb864b1bb66a82c1e659c325be0a18ddcf76fc101812e36c39c20};
+: ${PKG_IRSSI_URL:=https://github.com/irssi/irssi/releases/download/0.8.18/irssi-0.8.18.tar.gz};
+: ${PKG_IRSSI_CFLAGS_CONFIGURE_EXTRA:="-I${PREFIX_LVL3}/include/glib-2.0 -I${PREFIX_LVL3}/include/glib-2.0/include -I${PREFIX_LVL3}/lib/glib-2.0/include"};
+: ${PKG_IRSSI_ENV_VARS_EXTRA:=PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig};
+: ${PKG_IRSSI_LDFLAGS_CONFIGURE_EXTRA:="-L${PREFIX_LVL3}/lib -lglib-2.0"};
+: ${PKG_IRSSI_MAKEFLAGS_BUILD_EXTRA:=V=99};
: ${PKG_LESS_VERSION:=481};
: ${PKG_LESS_SHA256SUM:=3fa38f2cf5e9e040bb44fffaa6c76a84506e379e47f5a04686ab78102090dda5};
: ${PKG_LESS_URL:=http://www.greenwoodsoftware.com/less/less-${PKG_LESS_VERSION}.tar.gz};
@@ -149,7 +162,11 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}";
: ${PKG_LIBELF_CC_CONFIGURE:=${HOST_NATIVE}-gcc};
: ${PKG_LIBELF_CONFIGURE_ARGS:="--host=${HOST_NATIVE} --prefix=${PREFIX_LVL1} --target=${TARGET}"};
: ${PKG_LIBELF_MAKEFLAGS_INSTALL:=};
+: ${PKG_LIBFFI_VERSION:=3.2.1};
+: ${PKG_LIBFFI_SHA256SUM:=d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37};
+: ${PKG_LIBFFI_URL=ftp://sourceware.org/pub/libffi/libffi-${PKG_LIBFFI_VERSION}.tar.gz};
: ${PKG_LIBFFI_LIBTOOL_MIDIPIX:=1};
+: ${PKG_LIBFFI_CFLAGS_CONFIGURE_EXTRA:=-D_WIN64};
: ${PKG_LIBRESSL_VERSION:=2.2.6};
: ${PKG_LIBRESSL_SHA256SUM:=1ee19994cffd047d40f63ba149115dba18a681b0cc923beec301bf424b58d64f};
: ${PKG_LIBRESSL_URL:=http://ftp.eu.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${PKG_LIBRESSL_VERSION}.tar.gz};
diff --git a/glib-2.46.2.local.patch b/glib-2.46.2.local.patch
new file mode 100644
index 00000000..5f759178
--- /dev/null
+++ b/glib-2.46.2.local.patch
@@ -0,0 +1,181 @@
+--- glib-2.46.2/config.sub.orig 2016-01-18 17:21:43.000000000 +0000
++++ glib-2.46.2/config.sub 2016-03-06 17:24:27.478613857 +0000
+@@ -810,6 +810,10 @@
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
++ midipix)
++ basic_machine=x86_64-pc
++ os=-midipix
++ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+@@ -1390,7 +1394,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* \
+--- glib-2.46.2/configure.orig 2015-11-06 22:28:54.000000000 +0000
++++ glib-2.46.2/configure 2016-03-06 18:55:06.490493143 +0000
+@@ -21737,33 +21737,7 @@
+ if ${glib_cv_stack_grows+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+-
+- if test "$cross_compiling" = yes; then :
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
+-See \`config.log' for more details" "$LINENO" 5; }
+-else
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+- volatile int *a = 0, *b = 0;
+- void f (int i) { volatile int x = 5; if (i == 0) b = &x; else f (i - 1); }
+- int main () { volatile int y = 7; a = &y; f (100); return b > a ? 0 : 1; }
+-
+-_ACEOF
+-if ac_fn_c_try_run "$LINENO"; then :
+ glib_cv_stack_grows=yes
+-
+-else
+- glib_cv_stack_grows=no
+-
+-fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+- conftest.$ac_objext conftest.beam conftest.$ac_ext
+-fi
+-
+-
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glib_cv_stack_grows" >&5
+ $as_echo "$glib_cv_stack_grows" >&6; }
+@@ -25142,37 +25116,7 @@
+ if ${glib_cv_uscore+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+-
+- if test "$cross_compiling" = yes; then :
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
+-See \`config.log' for more details" "$LINENO" 5; }
+-else
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-#include <dlfcn.h>
+- int glib_underscore_test (void) { return 42; }
+- int main() {
+- void *f1 = (void*)0, *f2 = (void*)0, *handle;
+- handle = dlopen ((void*)0, 0);
+- if (handle) {
+- f1 = dlsym (handle, "glib_underscore_test");
+- f2 = dlsym (handle, "_glib_underscore_test");
+- } return (!f2 || f1);
+- }
+-_ACEOF
+-if ac_fn_c_try_run "$LINENO"; then :
+ glib_cv_uscore=yes
+-else
+- glib_cv_uscore=no
+-fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+- conftest.$ac_objext conftest.beam conftest.$ac_ext
+-fi
+-
+- rm -f plugin.c plugin.$ac_objext plugin.lo
+-
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glib_cv_uscore" >&5
+ $as_echo "$glib_cv_uscore" >&6; }
+@@ -26503,37 +26447,7 @@
+ if ${ac_cv_func_posix_getpwuid_r+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+- if test "$cross_compiling" = yes; then :
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
+-See \`config.log' for more details" "$LINENO" 5; }
+-else
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+-#include <errno.h>
+-#include <pwd.h>
+-int main () {
+- char buffer[10000];
+- struct passwd pwd, *pwptr = &pwd;
+- int error;
+- errno = 0;
+- error = getpwuid_r (0, &pwd, buffer,
+- sizeof (buffer), &pwptr);
+- return (error < 0 && errno == ENOSYS)
+- || error == ENOSYS;
+-}
+-_ACEOF
+-if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_posix_getpwuid_r=yes
+-else
+- ac_cv_func_posix_getpwuid_r=no
+-fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+- conftest.$ac_objext conftest.beam conftest.$ac_ext
+-fi
+-
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_posix_getpwuid_r" >&5
+ $as_echo "$ac_cv_func_posix_getpwuid_r" >&6; }
+@@ -26594,37 +26508,7 @@
+ if ${ac_cv_func_posix_getgrgid_r+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+- if test "$cross_compiling" = yes; then :
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
+-See \`config.log' for more details" "$LINENO" 5; }
+-else
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+-#include <errno.h>
+-#include <grp.h>
+-int main () {
+- char buffer[10000];
+- struct group grp, *grpptr = &grp;
+- int error;
+- errno = 0;
+- error = getgrgid_r (0, &grp, buffer,
+- sizeof (buffer), &grpptr);
+- return (error < 0 && errno == ENOSYS)
+- || error == ENOSYS;
+-}
+-_ACEOF
+-if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_posix_getgrgid_r=yes
+-else
+- ac_cv_func_posix_getgrgid_r=no
+-fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+- conftest.$ac_objext conftest.beam conftest.$ac_ext
+-fi
+-
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_posix_getgrgid_r" >&5
+ $as_echo "$ac_cv_func_posix_getgrgid_r" >&6; }
+@@ -27053,7 +26937,7 @@
+ }
+ _ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+- glib_cv_eventfd=yes
++ glib_cv_eventfd=no
+ else
+ glib_cv_eventfd=no
+ fi
diff --git a/irssi-0.8.18.local.patch b/irssi-0.8.18.local.patch
new file mode 100644
index 00000000..f21ce2fe
--- /dev/null
+++ b/irssi-0.8.18.local.patch
@@ -0,0 +1,22 @@
+--- irssi-0.8.18/build-aux/config.sub.orig 2016-02-08 20:16:25.000000000 +0000
++++ irssi-0.8.18/build-aux/config.sub 2016-03-06 18:06:18.154558135 +0000
+@@ -804,6 +804,10 @@
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
++ midipix)
++ basic_machine=x86_64-pc
++ os=-midipix
++ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+@@ -1384,7 +1388,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* \
diff --git a/pkg.build b/pkg.build
index 0ad5f4a1..df63b003 100644
--- a/pkg.build
+++ b/pkg.build
@@ -121,6 +121,7 @@ if ! is_build_script_done install; then
pkg_${PKG_NAME}_install_post;
fi;
fi;
+ find ${PKG_PREFIX}/lib -type f -name \*.la -exec rm -f {} \;
set_build_script_done install -finish;
fi;
set_build_script_done finish;