summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-02-07 20:48:54 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-02-07 20:48:54 +0100
commitce7607c38e89fa56303cdf5d3aef7559cc1e0378 (patch)
tree9c003def944254cdb487cd85f120b77d80102fed
parent999fdc0521acf5f5cd532b494548486521834d76 (diff)
downloadmidipix_build-ce7607c38e89fa56303cdf5d3aef7559cc1e0378.tar.bz2
midipix_build-ce7607c38e89fa56303cdf5d3aef7559cc1e0378.tar.xz
Merged 300.coreutils.build with 101.gmp.build into pkg.build and
200.psxtypes.build with 204.psxscl.build.
l---------001.binutils.host.build1
l---------001.binutils_host.build1
l---------[-rw-r--r--]101.gmp.build61
l---------102.mpfr.build2
l---------103.mpc.build2
l---------104.libelf.build2
-rw-r--r--104.libelf.vars15
l---------105.binutils.build2
l---------[-rw-r--r--]200.psxtypes.build15
-rw-r--r--204.psxscl.build39
l---------[-rw-r--r--]300.coreutils.build70
l---------301.diffutils.build2
l---------302.findutils.build2
l---------302.patch.build1
l---------303.gawk.build1
l---------303.patch.build1
l---------304.bash.build1
-rw-r--r--304.bash.vars (renamed from 305.bash.vars)0
l---------304.gawk.build1
l---------305.bash.build1
l---------305.make.build1
-rw-r--r--306.libz.build (renamed from 307.libz.build)0
l---------306.make.build1
l---------307.gzip.build1
l---------308.grep.build1
l---------308.gzip.build1
l---------309.grep.build1
l---------309.sed.build1
l---------310.sed.build1
-rw-r--r--build.subr5
-rw-r--r--build.vars8
-rw-r--r--pkg.build76
32 files changed, 142 insertions, 175 deletions
diff --git a/001.binutils.host.build b/001.binutils.host.build
deleted file mode 120000
index 5b9b303f..00000000
--- a/001.binutils.host.build
+++ /dev/null
@@ -1 +0,0 @@
-300.coreutils.build \ No newline at end of file
diff --git a/001.binutils_host.build b/001.binutils_host.build
new file mode 120000
index 00000000..52bb82e5
--- /dev/null
+++ b/001.binutils_host.build
@@ -0,0 +1 @@
+pkg.build \ No newline at end of file
diff --git a/101.gmp.build b/101.gmp.build
index c0d0fca4..52bb82e5 100644..120000
--- a/101.gmp.build
+++ b/101.gmp.build
@@ -1,60 +1 @@
-parse_with_pkg_name ${2} gmp mpfr mpc libelf binutils;
-if is_build_script_done finished; then
- exit 212;
-else
- fetch ${PKG_URL} ${PKG_SHA256SUM};
- set_build_dir ${PKG_SUBDIR} native;
-fi;
-if ! is_build_script_done extracted; then
- rm_if_exists ${PKG_SUBDIR};
- tar -axf ${PKG_FNAME};
- set_build_script_done extracted -patched;
-fi;
-if ! is_build_script_done patched; then
- patch -d ${PKG_SUBDIR} -p1 \
- < portage/${PKG_SUBDIR}.midipix.patch;
- if [ ${PKG_NO_LIBTOOL_MIDIPIX:-0} -eq 0 ]; then
- cp portage/libtool.midipix ${PKG_SUBDIR}/;
- fi;
- set_build_script_done patched -configured;
-fi;
-if ! is_build_script_done configured; then
- rm_if_exists -m -c ${BUILD_DIR};
- ../${PKG_SUBDIR}/configure \
- ${PKG_CONFIGURE_EXTRA_ARGS} \
- --host=${HOST_NATIVE} \
- --prefix=${PKG_PREFIX:-/} \
- --target=${TARGET};
- set_build_script_done configured -built;
-else
- cd ${BUILD_DIR};
-fi;
-if ! is_build_script_done built; then
- make;
- set_build_script_done configured built -installed1;
-fi;
-if ! is_build_script_done installed1; then
- make DESTDIR=${PREFIX_NATIVE} install;
- set_build_script_done configured installed1 -installed2 -finished;
-fi;
-if [ -n "${PKG_PREFIX_EXTRA}" ]; then
- if ! is_build_script_done installed2; then
- make DESTDIR=${PKG_PREFIX_EXTRA} install;
- set_build_script_done configured installed2 -finished;
- fi;
-elif [ "x${PKG_NAME}" = "xlibelf" ]; then
- if ! is_build_script_done installed2; then
- rm -f lib/libelf.def;
- echo EXPORTS > lib/libelf.def;
- perk -e lib/libelf.so >> lib/libelf.def;
- ${HOST_NATIVE}-dlltool \
- --output-lib lib/libelf.lib.a \
- --dllname libelf.so \
- --input-def lib/libelf.def;
- cp lib/libelf.lib.a ${PREFIX}/lib;
- set_build_script_done configured installed2 -finished;
- fi;
-fi;
-set_build_script_done finished;
-
-# vim:filetype=sh
+pkg.build \ No newline at end of file
diff --git a/102.mpfr.build b/102.mpfr.build
index c9048e09..52bb82e5 120000
--- a/102.mpfr.build
+++ b/102.mpfr.build
@@ -1 +1 @@
-101.gmp.build \ No newline at end of file
+pkg.build \ No newline at end of file
diff --git a/103.mpc.build b/103.mpc.build
index c9048e09..52bb82e5 120000
--- a/103.mpc.build
+++ b/103.mpc.build
@@ -1 +1 @@
-101.gmp.build \ No newline at end of file
+pkg.build \ No newline at end of file
diff --git a/104.libelf.build b/104.libelf.build
index c9048e09..52bb82e5 120000
--- a/104.libelf.build
+++ b/104.libelf.build
@@ -1 +1 @@
-101.gmp.build \ No newline at end of file
+pkg.build \ No newline at end of file
diff --git a/104.libelf.vars b/104.libelf.vars
new file mode 100644
index 00000000..786e691e
--- /dev/null
+++ b/104.libelf.vars
@@ -0,0 +1,15 @@
+pkg_libelf_install_post() {
+ if ! is_build_script_done installed2; then
+ rm -f lib/libelf.def;
+ echo EXPORTS > lib/libelf.def;
+ perk -e lib/libelf.so >> lib/libelf.def;
+ ${HOST_NATIVE}-dlltool \
+ --output-lib lib/libelf.lib.a \
+ --dllname libelf.so \
+ --input-def lib/libelf.def;
+ cp lib/libelf.lib.a ${PREFIX}/lib;
+ set_build_script_done installed2 -finished;
+ fi;
+};
+
+# vim:filetype=sh
diff --git a/105.binutils.build b/105.binutils.build
index c9048e09..52bb82e5 120000
--- a/105.binutils.build
+++ b/105.binutils.build
@@ -1 +1 @@
-101.gmp.build \ No newline at end of file
+pkg.build \ No newline at end of file
diff --git a/200.psxtypes.build b/200.psxtypes.build
index add23676..44d66684 100644..120000
--- a/200.psxtypes.build
+++ b/200.psxtypes.build
@@ -1,14 +1 @@
-# Order: psxtypes pemagine dalist ntapi psxscl ntcon ntctty
-
-parse_with_pkg_name ${2} psxtypes;
-if is_build_script_done finished; then
- exit 212;
-else
- fetch_git ${PKG_SUBDIR} ${PKG_URL};
-fi;
-if ! is_build_script_done installed; then
- make -C ${PKG_SUBDIR} ${MAKEFLAGS} DESTDIR=${PREFIX_NATIVE};
- set_build_script_done installed finished;
-fi;
-
-# vim:filetype=sh
+204.psxscl.build \ No newline at end of file
diff --git a/204.psxscl.build b/204.psxscl.build
index 3e479146..7202d1a7 100644
--- a/204.psxscl.build
+++ b/204.psxscl.build
@@ -8,23 +8,30 @@ else
fetch_git ${PKG_SUBDIR} ${PKG_URL};
set_build_dir ${PKG_SUBDIR} cross;
fi;
-if ! is_build_script_done configured; then
- rm_if_exists -m -c ${BUILD_DIR};
- ../${PKG_SUBDIR}/configure \
- --prefix=${PREFIX_NATIVE} \
- --host=${HOST_NATIVE};
- set_build_script_done configured -built;
+if [ "x${PKG_NAME}" = "xpsxtypes" ]; then
+ if ! is_build_script_done installed; then
+ make -C ${PKG_SUBDIR} ${MAKEFLAGS} DESTDIR=${PREFIX_TARGET};
+ set_build_script_done installed finished;
+ fi;
else
- cd ${BUILD_DIR};
-fi;
-if ! is_build_script_done built; then
- make ${MAKEFLAGS};
- set_build_script_done built -installed;
-fi;
-if ! is_build_script_done installed; then
- make ${MAKEFLAGS} install;
- make ${MAKEFLAGS} DESTDIR=${PREFIX_NATIVE};
- set_build_script_done installed finished;
+ if ! is_build_script_done configured; then
+ rm_if_exists -m -c ${BUILD_DIR};
+ ../${PKG_SUBDIR}/configure \
+ --prefix=${PREFIX_TARGET} \
+ --host=${HOST_NATIVE};
+ set_build_script_done configured -built;
+ else
+ cd ${BUILD_DIR};
+ fi;
+ if ! is_build_script_done built; then
+ make ${MAKEFLAGS};
+ set_build_script_done built -installed;
+ fi;
+ if ! is_build_script_done installed; then
+ make ${MAKEFLAGS} install;
+ make ${MAKEFLAGS} DESTDIR=${PREFIX_TARGET};
+ set_build_script_done installed finished;
+ fi;
fi;
# vim:filetype=sh
diff --git a/300.coreutils.build b/300.coreutils.build
index f222ae03..52bb82e5 100644..120000
--- a/300.coreutils.build
+++ b/300.coreutils.build
@@ -1,69 +1 @@
-parse_with_pkg_name ${2} \
- coreutils diffutils findutils patch \
- gawk bash make grep sed binutils;
-if is_build_script_done finished; then
- exit 212;
-else
- fetch ${PKG_URL} ${PKG_SHA256SUM};
- if [ "x${PKG_NAME}" = "xbinutils" ]\
- && [ "x${3}" = "xhost" ]; then
- _no_config_cache=${_no_destdir:=1};
- _configure_args="--disable-werror --prefix=${PREFIX} --with-sysroot=${PREFIX_TARGET}";
- set_build_dir ${PKG_SUBDIR} cross;
- else
- _no_config_cache=${_no_destdir:=0};
- _configure_args="-C --host=${HOST_NATIVE} --prefix=";
- set_build_dir ${PKG_SUBDIR} native;
- fi;
- _configure_args="${_configure_args}${PKG_CONFIGURE_EXTRA_ARGS:+ ${PKG_CONFIGURE_EXTRA_ARGS}}";
-fi;
-if ! is_build_script_done extracted; then
- rm_if_exists ${PKG_SUBDIR};
- tar -axf ${PKG_FNAME};
- set_build_script_done extracted -patched;
-fi;
-if ! is_build_script_done patched; then
- if [ -n "${PKG_PATCHES_EXTRA}" ]; then
- (rm_if_exists -m -c ${PKG_SUBDIR}-patches-extra;
- wget -c -nd -np -r -R \*.htm\* -R \*.sig ${PKG_PATCHES_EXTRA}
- for _patch_fname in \
- $(find . -type f -not -iname \*.sig | sort); do
- patch -d ../${PKG_SUBDIR} -p0 \
- < ${_patch_fname};
- done;
- for _patch_fname in ${PKG_PATCHES_EXTRA_MANIFEST}; do
- _patch_sha256sum=${2}; shift;
- if ! compare_hash ${_patch_fname} ${_patch_sha256sum}; then
- log_msg fail "Error: hash mismatch for patch file \`${_patch_fname}'.";
- exit 1;
- fi;
- done); wait;
- fi;
- patch -d ${PKG_SUBDIR} -p1 \
- < portage/${PKG_SUBDIR}.midipix.patch;
- set_build_script_done patched -configured;
-fi;
-if ! is_build_script_done configured; then
- rm_if_exists -m -c ${BUILD_DIR};
- [ ${_no_config_cache:-0} -eq 0 ] &&\
- cp ../portage/config.cache .;
- ../${PKG_SUBDIR}/configure \
- ${_configure_args} --target=${TARGET};
- set_build_script_done configured -built;
-else
- cd ${BUILD_DIR};
-fi;
-if ! is_build_script_done built; then
- make ${MAKEFLAGS};
- set_build_script_done built -installed;
-fi;
-if ! is_build_script_done installed; then
- if [ ${_no_destdir:-0} -eq 0 ]; then
- make ${MAKEFLAGS} DESTDIR=${PREFIX_NATIVE} install;
- else
- make ${MAKEFLAGS} install;
- fi;
- set_build_script_done installed finished;
-fi;
-
-# vim:filetype=sh
+pkg.build \ No newline at end of file
diff --git a/301.diffutils.build b/301.diffutils.build
index 5b9b303f..52bb82e5 120000
--- a/301.diffutils.build
+++ b/301.diffutils.build
@@ -1 +1 @@
-300.coreutils.build \ No newline at end of file
+pkg.build \ No newline at end of file
diff --git a/302.findutils.build b/302.findutils.build
index 5b9b303f..52bb82e5 120000
--- a/302.findutils.build
+++ b/302.findutils.build
@@ -1 +1 @@
-300.coreutils.build \ No newline at end of file
+pkg.build \ No newline at end of file
diff --git a/302.patch.build b/302.patch.build
new file mode 120000
index 00000000..52bb82e5
--- /dev/null
+++ b/302.patch.build
@@ -0,0 +1 @@
+pkg.build \ No newline at end of file
diff --git a/303.gawk.build b/303.gawk.build
new file mode 120000
index 00000000..52bb82e5
--- /dev/null
+++ b/303.gawk.build
@@ -0,0 +1 @@
+pkg.build \ No newline at end of file
diff --git a/303.patch.build b/303.patch.build
deleted file mode 120000
index 5b9b303f..00000000
--- a/303.patch.build
+++ /dev/null
@@ -1 +0,0 @@
-300.coreutils.build \ No newline at end of file
diff --git a/304.bash.build b/304.bash.build
new file mode 120000
index 00000000..52bb82e5
--- /dev/null
+++ b/304.bash.build
@@ -0,0 +1 @@
+pkg.build \ No newline at end of file
diff --git a/305.bash.vars b/304.bash.vars
index b1333b3c..b1333b3c 100644
--- a/305.bash.vars
+++ b/304.bash.vars
diff --git a/304.gawk.build b/304.gawk.build
deleted file mode 120000
index 5b9b303f..00000000
--- a/304.gawk.build
+++ /dev/null
@@ -1 +0,0 @@
-300.coreutils.build \ No newline at end of file
diff --git a/305.bash.build b/305.bash.build
deleted file mode 120000
index 5b9b303f..00000000
--- a/305.bash.build
+++ /dev/null
@@ -1 +0,0 @@
-300.coreutils.build \ No newline at end of file
diff --git a/305.make.build b/305.make.build
new file mode 120000
index 00000000..52bb82e5
--- /dev/null
+++ b/305.make.build
@@ -0,0 +1 @@
+pkg.build \ No newline at end of file
diff --git a/307.libz.build b/306.libz.build
index a6f48d59..a6f48d59 100644
--- a/307.libz.build
+++ b/306.libz.build
diff --git a/306.make.build b/306.make.build
deleted file mode 120000
index 5b9b303f..00000000
--- a/306.make.build
+++ /dev/null
@@ -1 +0,0 @@
-300.coreutils.build \ No newline at end of file
diff --git a/307.gzip.build b/307.gzip.build
new file mode 120000
index 00000000..bee571a6
--- /dev/null
+++ b/307.gzip.build
@@ -0,0 +1 @@
+306.libz.build \ No newline at end of file
diff --git a/308.grep.build b/308.grep.build
new file mode 120000
index 00000000..52bb82e5
--- /dev/null
+++ b/308.grep.build
@@ -0,0 +1 @@
+pkg.build \ No newline at end of file
diff --git a/308.gzip.build b/308.gzip.build
deleted file mode 120000
index 84e1ba09..00000000
--- a/308.gzip.build
+++ /dev/null
@@ -1 +0,0 @@
-307.libz.build \ No newline at end of file
diff --git a/309.grep.build b/309.grep.build
deleted file mode 120000
index 5b9b303f..00000000
--- a/309.grep.build
+++ /dev/null
@@ -1 +0,0 @@
-300.coreutils.build \ No newline at end of file
diff --git a/309.sed.build b/309.sed.build
new file mode 120000
index 00000000..52bb82e5
--- /dev/null
+++ b/309.sed.build
@@ -0,0 +1 @@
+pkg.build \ No newline at end of file
diff --git a/310.sed.build b/310.sed.build
deleted file mode 120000
index 5b9b303f..00000000
--- a/310.sed.build
+++ /dev/null
@@ -1 +0,0 @@
-300.coreutils.build \ No newline at end of file
diff --git a/build.subr b/build.subr
index ea487558..82e73b32 100644
--- a/build.subr
+++ b/build.subr
@@ -98,10 +98,11 @@ parse_with_pkg_name() {
if [ "x${PKG_NAME}" = "x${1}" ]; then
_pkg_NAME=$(echo "${PKG_NAME}" | tr a-z A-Z);
for _vname in \
- configure_extra_args no_libtool_midipix \
+ build_type configure_args configure_extra_args \
+ no_config_cache no_libtool_midipix \
patches_extra prefix prefix_extra sha256sum \
url version \
- CC CFLAGS LDFLAGS DESTDIR; do
+ CC CFLAGS DESTDIR LDFLAGS; do
_vNAME=$(echo "${_vname}" | tr a-z A-Z);
if [ -n "${_vval:=$(eval echo \${PKG_${_pkg_NAME}_${_vNAME}})}" ]; then
export PKG_${_vNAME}="${_vval}";
diff --git a/build.vars b/build.vars
index d18e2d3e..faf98ff9 100644
--- a/build.vars
+++ b/build.vars
@@ -37,6 +37,14 @@ TIMESTAMP_FMT="%Y/%m/%d %H:%M:%S";
: ${PKG_BINUTILS_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa};
: ${PKG_BINUTILS_VERSION:=2.24.51};
: ${PKG_BINUTILS_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_VERSION}.tar.bz2};
+: ${PKG_BINUTILS_HOST_BUILD_TYPE:=cross};
+: ${PKG_BINUTILS_HOST_CONFIGURE_ARGS:=--disable-werror --prefix=${PREFIX} --with-sysroot=${PREFIX_TARGET}};
+: ${PKG_BINUTILS_HOST_DESTDIR:=};
+: ${PKG_BINUTILS_HOST_NO_CONFIG_CACHE:=1};
+: ${PKG_BINUTILS_HOST_NO_LIBTOOL_MIDIPIX:=1};
+: ${PKG_BINUTILS_HOST_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa};
+: ${PKG_BINUTILS_HOST_VERSION:=2.24.51};
+: ${PKG_BINUTILS_HOST_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_VERSION}.tar.bz2};
: ${PKG_COREUTILS_SHA256SUM:=ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d};
: ${PKG_COREUTILS_VERSION:=8.23};
: ${PKG_COREUTILS_URL:=https://ftp.gnu.org/gnu/coreutils/coreutils-${PKG_COREUTILS_VERSION}.tar.xz};
diff --git a/pkg.build b/pkg.build
new file mode 100644
index 00000000..2624096a
--- /dev/null
+++ b/pkg.build
@@ -0,0 +1,76 @@
+parse_with_pkg_name ${2} \
+ bash binutils binutils_host coreutils diffutils \
+ findutils gawk gmp grep libelf make mpc mpfr \
+ patch sed;
+if is_build_script_done finished; then
+ exit 212;
+else
+ fetch ${PKG_URL} ${PKG_SHA256SUM};
+ if [ "x${SCRIPT_FNAME%[0-9][0-9]*}" = "x1" ]; then
+ _configure_args="--host=${HOST_NATIVE} --prefix=${PKG_PREFIX:-/}";
+ PKG_NO_CONFIG_CACHE=1;
+ else
+ _configure_args=${PKG_CONFIGURE_ARGS:--C --host=${HOST_NATIVE} --prefix=};
+ fi;
+ : ${DESTDIR:=${PREFIX_NATIVE}};
+ set_build_dir ${PKG_SUBDIR} ${PKG_BUILD_TYPE:-native};
+fi;
+if ! is_build_script_done extracted; then
+ rm_if_exists ${PKG_SUBDIR};
+ tar -axf ${PKG_FNAME};
+ set_build_script_done extracted -patched;
+fi;
+if ! is_build_script_done patched; then
+ if [ -n "${PKG_PATCHES_EXTRA}" ]; then
+ (rm_if_exists -m -c ${PKG_SUBDIR}-patches-extra;
+ wget -c -nd -np -r -R \*.htm\* -R \*.sig ${PKG_PATCHES_EXTRA}
+ for _patch_fname in \
+ $(find . -type f -not -iname \*.sig | sort); do
+ patch -d ../${PKG_SUBDIR} -p0 \
+ < ${_patch_fname};
+ done;
+ for _patch_fname in ${PKG_PATCHES_EXTRA_MANIFEST}; do
+ _patch_sha256sum=${2}; shift;
+ if ! compare_hash ${_patch_fname} ${_patch_sha256sum}; then
+ log_msg fail "Error: hash mismatch for patch file \`${_patch_fname}'.";
+ exit 1;
+ fi;
+ done); wait;
+ fi;
+ patch -d ${PKG_SUBDIR} -p1 \
+ < portage/${PKG_SUBDIR}.midipix.patch;
+ if [ ${PKG_NO_LIBTOOL_MIDIPIX:-0} -eq 0 ]; then
+ cp portage/libtool.midipix ${PKG_SUBDIR}/;
+ fi;
+ set_build_script_done patched -configured;
+fi;
+if ! is_build_script_done configured; then
+ rm_if_exists -m -c ${BUILD_DIR};
+ [ ${PKG_NO_CONFIG_CACHE:-0} -eq 0 ] &&\
+ cp ../portage/config.cache .;
+ ../${PKG_SUBDIR}/configure \
+ ${_configure_args} \
+ --target=${TARGET} \
+ ${PKG_CONFIGURE_EXTRA_ARGS};
+ set_build_script_done configured -built;
+else
+ cd ${BUILD_DIR};
+fi;
+if ! is_build_script_done built; then
+ make ${MAKEFLAGS};
+ set_build_script_done built -installed;
+fi;
+if ! is_build_script_done installed1; then
+ make ${MAKEFLAGS} ${DESTDIR:+DESTDIR=${DESTDIR}} install;
+ set_build_script_done installed1 -installed2 -finished;
+fi;
+if [ -n "${PKG_PREFIX_EXTRA}" ]\
+&& ! is_build_script_done installed2; then
+ make DESTDIR=${PKG_PREFIX_EXTRA} install;
+ set_build_script_done installed2 -finished;
+elif command -v pkg_${PKG_NAME}_install_post >/dev/null; then
+ pkg_${PKG_NAME}_install_post;
+fi;
+set_build_script_done finished;
+
+# vim:filetype=sh