From 3243be768ad8a601b2636be4dd23dbb6c2d7dd9b Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz (arab, vxp) Date: Jun 23 2016 08:50:09 +0000 Subject: - Adds and integrates pkgconf_host and pkgconf; fixes Irssi and other packages that depend on pkg-config(1) and makes their build variables significantly less hacky (apk_tools, irssi, nano, ncurses, ncursestw ncursesw, and pacman.) pkgconf_host installs a ${TARGET}-pkg-config wrapper script that passes --define-variable=prefix=${PREFIX_NATIVE} when cross-compiling. - Adds -i flag to insert a link to pkg.build for a new build script and automatically rename build scripts with higher consecutive build levels. - Consistently quote [(1) operands correctly wherever necessary. - Reorganise build level 3 script levels: 1) 300-319: library dependencies, ordered by dependencies and alphabetically, 2) 320-389: leaf packages, ordered alphabetically. --- diff --git a/009.pkgconf_host.build b/009.pkgconf_host.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/009.pkgconf_host.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/009.pkgconf_host.vars b/009.pkgconf_host.vars new file mode 100644 index 0000000..8413649 --- /dev/null +++ b/009.pkgconf_host.vars @@ -0,0 +1,19 @@ +# +# . ./build.vars and set -o errexit are assumed. +# + +pkg_pkgconf_host_install_post() { + if [ -e ${PREFIX}/bin/${TARGET}-pkg-config ]; then + rm -f ${PREFIX}/bin/${TARGET}-pkg-config; + fi; + cat > ${PREFIX}/bin/${TARGET}-pkg-config <> ${PREFIX_LVL}/etc/shells; + fi; + if [ ! -d ${PREFIX_LVL}/share/doc/mksh/examples ]; then + mkdir -p ${PREFIX_LVL}/share/doc/mksh/examples; + fi; + tar -cpf - dot.mkshrc |\ + tar -C ${PREFIX_LVL}/share/doc/mksh/examples -xpf -; + if [ ! -d ${PREFIX_LVL}/share/man/man1 ]; then + mkdir -p ${PREFIX_LVL}/share/man/man1; + fi; + tar -cpf - mksh.1 |\ + tar -C ${PREFIX_LVL}/share/man/man1 -xpf -; +}; + +# vim:filetype=sh diff --git a/337.nano.build b/337.nano.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/337.nano.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/338.netcat.build b/338.netcat.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/338.netcat.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/338.netcat.vars b/338.netcat.vars new file mode 100644 index 0000000..e9bd7e1 --- /dev/null +++ b/338.netcat.vars @@ -0,0 +1,10 @@ +# +# . ./build.vars and set -o errexit are assumed. +# + +pkg_netcat_install() { + tar -cpf - nc |\ + tar -C ${PREFIX_LVL}/bin -xpf -; +}; + +# vim:filetype=sh diff --git a/339.openssh.build b/339.openssh.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/339.openssh.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/340.pacman.build b/340.pacman.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/340.pacman.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/341.patch.build b/341.patch.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/341.patch.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/342.perl.build b/342.perl.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/342.perl.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/342.perl.vars b/342.perl.vars new file mode 100644 index 0000000..2360479 --- /dev/null +++ b/342.perl.vars @@ -0,0 +1,24 @@ +# +# . ./build.vars and set -o errexit are assumed. +# + +pkg_perl_extract_post() { + git clone https://github.com/lalbornoz/perl-cross; + for _ppep_fname_src in $(find perl-cross -type f \ + -not -path perl-cross/.git/\* -not -name .gitignore); do + _ppep_fname_dst=perl-${PKG_VERSION}${_ppep_fname_src#perl-cross}; + if [ -f ${_ppep_fname_dst} ]; then + mv ${_ppep_fname_dst} ${_ppep_fname_dst}.orig; + fi; + if [ ! -d "$(dirname ${_ppep_fname_dst})" ]; then + mkdir -p $(dirname ${_ppep_fname_dst}); + fi; + cp ${_ppep_fname_src} ${_ppep_fname_dst}; + done; + for _ppep_cflag in ${PKG_CFLAGS_CONFIGURE}; do + PKG_CONFIGURE_ARGS="${PKG_CONFIGURE_ARGS:+${PKG_CONFIGURE_ARGS} }-A ccflags=${_ppep_cflag}"; + done; + unset _ppep_fname_src _ppep_fname_dst _ppep_cflag; +}; + +# vim:filetype=sh diff --git a/343.python3.build b/343.python3.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/343.python3.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/343.python3.vars b/343.python3.vars new file mode 100644 index 0000000..c987c79 --- /dev/null +++ b/343.python3.vars @@ -0,0 +1,19 @@ +# +# . ./build.vars and set -o errexit are assumed. +# + +pkg_python3_configure_pre() { + (cd ../${PKG_SUBDIR} && autoconf); + (unset BLDSHARED CC CFLAGS CPPFLAGS LDFLAGS; + mv config.cache ../${PKG_SUBDIR}/config.cache; + ../${PKG_SUBDIR}/configure; + make _FIP=Programs/host_freeze_importlib Programs/host_freeze_importlib \ + BUILDPYTHON=hostpython hostpython \ + PGEN=Parser/hostpgen Parser/hostpgen; + make distclean); + mv ../${PKG_SUBDIR}/config.cache .; + sed -i.orig '/^# autoconf/a\ +ac_cv_buggy_getaddrinfo=no' config.cache; +}; + +# vim:filetype=sh diff --git a/344.rsync.build b/344.rsync.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/344.rsync.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/345.sed.build b/345.sed.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/345.sed.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/346.tar.build b/346.tar.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/346.tar.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/347.tcsh.build b/347.tcsh.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/347.tcsh.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/348.util_linux.build b/348.util_linux.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/348.util_linux.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/348.util_linux.vars b/348.util_linux.vars new file mode 100644 index 0000000..20f843c --- /dev/null +++ b/348.util_linux.vars @@ -0,0 +1,11 @@ +# +# . ./build.vars and set -o errexit are assumed. +# + +pkg_util_linux_configure_pre() { + export NCURSESW_CFLAGS="-I${PREFIX_LVL3}/include -I${PREFIX_LVL3}/include/ncursesw"; + export PKG_CONFIG_LIBDIR="${PREFIX_LVL3}/lib/pkgconfig"; + export NCURSESW_LIBS="-L${PREFIX_LVL3}/lib $(env PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR} pkg-config --libs ncursesw)"; +}; + +# vim:filetype=sh diff --git a/349.which.build b/349.which.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/349.which.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/350.ncurses.build b/350.ncurses.build deleted file mode 120000 index 52bb82e..0000000 --- a/350.ncurses.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/350.zsh.build b/350.zsh.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/350.zsh.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/351.ncursestw.build b/351.ncursestw.build deleted file mode 120000 index 52bb82e..0000000 --- a/351.ncursestw.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/352.ncursesw.build b/352.ncursesw.build deleted file mode 120000 index 52bb82e..0000000 --- a/352.ncursesw.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/353.bash.build b/353.bash.build deleted file mode 120000 index 52bb82e..0000000 --- a/353.bash.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/353.bash.vars b/353.bash.vars deleted file mode 100644 index 8ab081a..0000000 --- a/353.bash.vars +++ /dev/null @@ -1,49 +0,0 @@ -# -# . ./build.vars and set -o errexit are assumed. -# - -PKG_BASH_PATCHES_EXTRA_MANIFEST=" -bash43-001 ecb3dff2648667513e31554b3ad054ccd89fce38e33367c9459ac3a285153742 -bash43-002 eee7cd7062ab29a9e4f02924d9c367264dcb8b162703f74ff6eb8f175a91502b -bash43-003 000e6eac50cd9053ce0630db01239dcdead04a2c2c351c47e2b51dac1ac1087d -bash43-004 5ea0a42c6506720d26e6d3c5c358e9a0d49f6f189d69a8ed34d5935964821338 -bash43-005 1ac83044032b9f5f11aeca8a344ae3c524ec2156185d3adbb8ad3e7a165aa3fa -bash43-006 a0648ee72d15e4a90c8b77a5c6b19f8d89e28c1bc881657d22fe26825f040213 -bash43-007 1113e321c59cf6a8648a36245bbe4217cf8acf948d71e67886dad7d486f8f3a3 -bash43-008 9941a98a4987192cc5ce3d45afe879983cad2f0bec96d441a4edd9033767f95e -bash43-009 c0226d6728946b2f53cdebf090bcd1c01627f01fee03295768605caa80bb40a5 -bash43-010 ce05799c0137314c70c7b6ea0477c90e1ac1d52e113344be8e32fa5a55c9f0b7 -bash43-011 7c63402cdbc004a210f6c1c527b63b13d8bb9ec9c5a43d5c464a9010ff6f7f3b -bash43-012 3e1379030b35fbcf314e9e7954538cf4b43be1507142b29efae39eef997b8c12 -bash43-013 bfa8ca5336ab1f5ef988434a4bdedf71604aa8a3659636afa2ce7c7446c42c79 -bash43-014 5a4d6fa2365b6eb725a9d4966248b5edf7630a4aeb3fa8d526b877972658ac13 -bash43-015 13293e8a24e003a44d7fe928c6b1e07b444511bed2d9406407e006df28355e8d -bash43-016 92d60bcf49f61bd7f1ccb9602bead6f2c9946d79dea0e5ec0589bb3bfa5e0773 -bash43-017 1267c25c6b5ba57042a7bb6c569a6de02ffd0d29530489a16666c3b8a23e7780 -bash43-018 7aa8b40a9e973931719d8cc72284a8fb3292b71b522db57a5a79052f021a3d58 -bash43-019 a7a91475228015d676cafa86d2d7aa9c5d2139aa51485b6bbdebfdfbcf0d2d23 -bash43-020 ca5e86d87f178128641fe91f2f094875b8c1eb2de9e0d2e9154f5d5cc0336c98 -bash43-021 41439f06883e6bd11c591d9d5e9ae08afbc2abd4b935e1d244b08100076520a9 -bash43-022 fd4d47bb95c65863f634c4706c65e1e3bae4ee8460c72045c0a0618689061a88 -bash43-023 9ac250c7397a8f53dbc84dfe790d2a418fbf1fe090bcece39b4a5c84a2d300d4 -bash43-024 3b505882a0a6090667d75824fc919524cd44cc3bd89dd08b7c4e622d3f960f6c -bash43-025 1e5186f5c4a619bb134a1177d9e9de879f3bb85d9c5726832b03a762a2499251 -bash43-026 2ecc12201b3ba4273b63af4e9aad2305168cf9babf6d11152796db08724c214d -bash43-027 1eb76ad28561d27f7403ff3c76a36e932928a4b58a01b868d663c165f076dabe -bash43-028 e8b0dbed4724fa7b9bd8ff77d12c7f03da0fbfc5f8251ef5cb8511eb082b469d -bash43-029 4cc4a397fe6bc63ecb97d030a4e44258ef2d4e076d0e90c77782968cc43d6292 -bash43-030 85434f8a2f379d0c49a3ff6d9ffa12c8b157188dd739e556d638217d2a58385b -bash43-031 cd529f59dd0f2fdd49d619fe34691da6f0affedf87cc37cd460a9f3fe812a61d -bash43-032 889357d29a6005b2c3308ca5b6286cb223b5e9c083219e5db3156282dd554f4a -bash43-033 fb2a7787a13fbe027a7335aca6eb3c21cdbd813e9edc221274b6a9d8692eaa16 -bash43-034 f1694f04f110defe1330a851cc2768e7e57ddd2dfdb0e3e350ca0e3c214ff889 -bash43-035 370d85e51780036f2386dc18c5efe996eba8e652fc1973f0f4f2ab55a993c1e3 -bash43-036 ac5f82445b36efdb543dbfae64afed63f586d7574b833e9aa9cd5170bc5fd27c -bash43-037 33f170dd7400ab3418d749c55c6391b1d161ef2de7aced1873451b3a3fca5813 -bash43-038 adbeaa500ca7a82535f0e88d673661963f8a5fcdc7ad63445e68bf5b49786367 -bash43-039 ab94dced2215541097691f60c3eb323cc28ef2549463e6a5334bbcc1e61e74ec -bash43-040 84bb396b9262992ca5424feab6ed3ec39f193ef5c76dfe4a62b551bd8dd9d76b -bash43-041 4ec432966e4198524a7e0cd685fe222e96043769c9613e66742ac475db132c1a -bash43-042 ac219322db2791da87a496ee6e8e5544846494bdaaea2626270c2f73c1044919"; - -# vim:filetype=sh diff --git a/354.dash.build b/354.dash.build deleted file mode 120000 index 52bb82e..0000000 --- a/354.dash.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/355.less.build b/355.less.build deleted file mode 120000 index 52bb82e..0000000 --- a/355.less.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/356.util_linux.build b/356.util_linux.build deleted file mode 120000 index 52bb82e..0000000 --- a/356.util_linux.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/356.util_linux.vars b/356.util_linux.vars deleted file mode 100644 index 20f843c..0000000 --- a/356.util_linux.vars +++ /dev/null @@ -1,11 +0,0 @@ -# -# . ./build.vars and set -o errexit are assumed. -# - -pkg_util_linux_configure_pre() { - export NCURSESW_CFLAGS="-I${PREFIX_LVL3}/include -I${PREFIX_LVL3}/include/ncursesw"; - export PKG_CONFIG_LIBDIR="${PREFIX_LVL3}/lib/pkgconfig"; - export NCURSESW_LIBS="-L${PREFIX_LVL3}/lib $(env PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR} pkg-config --libs ncursesw)"; -}; - -# vim:filetype=sh diff --git a/357.nano.build b/357.nano.build deleted file mode 120000 index 52bb82e..0000000 --- a/357.nano.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/358.hexcurse.build b/358.hexcurse.build deleted file mode 120000 index 52bb82e..0000000 --- a/358.hexcurse.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/359.libffi.build b/359.libffi.build deleted file mode 120000 index 52bb82e..0000000 --- a/359.libffi.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/360.curl.build b/360.curl.build deleted file mode 120000 index 52bb82e..0000000 --- a/360.curl.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/361.zsh.build b/361.zsh.build deleted file mode 120000 index 52bb82e..0000000 --- a/361.zsh.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/362.git.build b/362.git.build deleted file mode 120000 index 52bb82e..0000000 --- a/362.git.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/363.libarchive.build b/363.libarchive.build deleted file mode 120000 index 52bb82e..0000000 --- a/363.libarchive.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/364.pacman.build b/364.pacman.build deleted file mode 120000 index 52bb82e..0000000 --- a/364.pacman.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/365.libfetch.build b/365.libfetch.build deleted file mode 120000 index 52bb82e..0000000 --- a/365.libfetch.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/365.libfetch.vars b/365.libfetch.vars deleted file mode 100644 index b1b9d77..0000000 --- a/365.libfetch.vars +++ /dev/null @@ -1,11 +0,0 @@ -# -# . ./build.vars and set -o errexit are assumed. -# - -pkg_libfetch_extract_post() { - cd ${PKG_SUBDIR} && \ - fetch http://git.alpinelinux.org/cgit/aports/plain/main/libfetch/Makefile && \ - cd ${OLDPWD}; -}; - -# vim:filetype=sh diff --git a/366.apk_tools.build b/366.apk_tools.build deleted file mode 120000 index 52bb82e..0000000 --- a/366.apk_tools.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/367.perl.build b/367.perl.build deleted file mode 120000 index 52bb82e..0000000 --- a/367.perl.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/367.perl.vars b/367.perl.vars deleted file mode 100644 index 6858393..0000000 --- a/367.perl.vars +++ /dev/null @@ -1,24 +0,0 @@ -# -# . ./build.vars and set -o errexit are assumed. -# - -pkg_perl_extract_post() { - git clone https://github.com/lalbornoz/perl-cross; - for _ppep_fname_src in $(find perl-cross -type f \ - -not -path perl-cross/.git/\* -not -name .gitignore); do - _ppep_fname_dst=perl-${PKG_VERSION}${_ppep_fname_src#perl-cross}; - if [ -f ${_ppep_fname_dst} ]; then - mv ${_ppep_fname_dst} ${_ppep_fname_dst}.orig; - fi; - if [ ! -d $(dirname ${_ppep_fname_dst}) ]; then - mkdir -p $(dirname ${_ppep_fname_dst}); - fi; - cp ${_ppep_fname_src} ${_ppep_fname_dst}; - done; - for _ppep_cflag in ${PKG_CFLAGS_CONFIGURE}; do - PKG_CONFIGURE_ARGS="${PKG_CONFIGURE_ARGS:+${PKG_CONFIGURE_ARGS} }-A ccflags=${_ppep_cflag}"; - done; - unset _ppep_fname_src _ppep_fname_dst _ppep_cflag; -}; - -# vim:filetype=sh diff --git a/368.glib.build b/368.glib.build deleted file mode 120000 index 52bb82e..0000000 --- a/368.glib.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/369.irssi.build b/369.irssi.build deleted file mode 120000 index 52bb82e..0000000 --- a/369.irssi.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/370.python3.build b/370.python3.build deleted file mode 120000 index 52bb82e..0000000 --- a/370.python3.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/370.python3.vars b/370.python3.vars deleted file mode 100644 index c987c79..0000000 --- a/370.python3.vars +++ /dev/null @@ -1,19 +0,0 @@ -# -# . ./build.vars and set -o errexit are assumed. -# - -pkg_python3_configure_pre() { - (cd ../${PKG_SUBDIR} && autoconf); - (unset BLDSHARED CC CFLAGS CPPFLAGS LDFLAGS; - mv config.cache ../${PKG_SUBDIR}/config.cache; - ../${PKG_SUBDIR}/configure; - make _FIP=Programs/host_freeze_importlib Programs/host_freeze_importlib \ - BUILDPYTHON=hostpython hostpython \ - PGEN=Parser/hostpgen Parser/hostpgen; - make distclean); - mv ../${PKG_SUBDIR}/config.cache .; - sed -i.orig '/^# autoconf/a\ -ac_cv_buggy_getaddrinfo=no' config.cache; -}; - -# vim:filetype=sh diff --git a/371.mksh.build b/371.mksh.build deleted file mode 120000 index 52bb82e..0000000 --- a/371.mksh.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/371.mksh.vars b/371.mksh.vars deleted file mode 100644 index b7b4582..0000000 --- a/371.mksh.vars +++ /dev/null @@ -1,33 +0,0 @@ -# -# . ./build.vars and set -o errexit are assumed. -# - -pkg_mksh_build() { - env CC="${PKG_CC_BUILD}" \ - CFLAGS="${PKG_CFLAGS_CONFIGURE} ${PKG_CFLAGS_BUILD}" \ - sh Build.sh; -}; - -pkg_mksh_install() { - tar -cpf - mksh |\ - tar -C ${PREFIX_LVL}/bin -xpf -; - if [ ! -f ${PREFIX_LVL}/etc/shells ]; then - mkdir -p ${PREFIX_LVL}/etc; - touch ${PREFIX_LVL}/etc/shells; - fi; - if ! grep -xq "/bin/mksh" ${PREFIX_LVL}/etc/shells; then - echo /bin/mksh >> ${PREFIX_LVL}/etc/shells; - fi; - if [ ! -d ${PREFIX_LVL}/share/doc/mksh/examples ]; then - mkdir -p ${PREFIX_LVL}/share/doc/mksh/examples; - fi; - tar -cpf - dot.mkshrc |\ - tar -C ${PREFIX_LVL}/share/doc/mksh/examples -xpf -; - if [ ! -d ${PREFIX_LVL}/share/man/man1 ]; then - mkdir -p ${PREFIX_LVL}/share/man/man1; - fi; - tar -cpf - mksh.1 |\ - tar -C ${PREFIX_LVL}/share/man/man1 -xpf -; -}; - -# vim:filetype=sh diff --git a/372.tcsh.build b/372.tcsh.build deleted file mode 120000 index 52bb82e..0000000 --- a/372.tcsh.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/373.netcat.build b/373.netcat.build deleted file mode 120000 index 52bb82e..0000000 --- a/373.netcat.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/373.netcat.vars b/373.netcat.vars deleted file mode 100644 index e9bd7e1..0000000 --- a/373.netcat.vars +++ /dev/null @@ -1,10 +0,0 @@ -# -# . ./build.vars and set -o errexit are assumed. -# - -pkg_netcat_install() { - tar -cpf - nc |\ - tar -C ${PREFIX_LVL}/bin -xpf -; -}; - -# vim:filetype=sh diff --git a/374.inetutils.build b/374.inetutils.build deleted file mode 120000 index 52bb82e..0000000 --- a/374.inetutils.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/apk-tools-2.6.6.local.patch b/apk-tools-2.6.6.local.patch index ab7a6af..df03820 100644 --- a/apk-tools-2.6.6.local.patch +++ b/apk-tools-2.6.6.local.patch @@ -16,11 +16,23 @@ } int main(int argc, char **argv) ---- apk-tools-2.6.6/src/Makefile.orig 2016-02-09 15:57:53.000000000 +0100 -+++ apk-tools-2.6.6/src/Makefile 2016-03-09 10:28:09.862286100 +0100 -@@ -1,26 +1,20 @@ +--- apk-tools-2.6.6/Make.rules.orig 2016-02-09 15:57:53.000000000 +0100 ++++ apk-tools-2.6.6/Make.rules 2016-03-09 10:44:12.457459300 +0100 +@@ -70,7 +70,7 @@ + INSTALLDIR := $(INSTALL) -d + + CFLAGS ?= -g -O2 +-CFLAGS_ALL := -Werror -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC ++CFLAGS_ALL := -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC + CFLAGS_ALL += $(CFLAGS) + + LDFLAGS ?= -g +--- apk-tools-2.6.6/src/Makefile.orig 2016-02-09 14:57:53.000000000 +0000 ++++ apk-tools-2.6.6/src/Makefile 2016-06-23 08:14:37.843747529 +0000 +@@ -1,12 +1,12 @@ PKGDEPS := openssl zlib -PKG_CONFIG ?= pkg-config ++PKG_CONFIG ?= $(PKG_TARGET)-pkg-config LUAAPK ?= yes # lua module @@ -32,50 +44,12 @@ LIBAPK := YesPlease shlibs-y += apk.so apk.so-objs := lua-apk.o --CFLAGS_lua-apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\" \ -- $(shell $(PKG_CONFIG) $(LUA_PC) --cflags) -+CFLAGS_lua-apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\" - LUA_LIB-y := $(obj)/apk.so - install-LUA_LIB-y := $(INSTALLDIR) $(DESTDIR)$(LUA_LIBDIR) && \ - $(INSTALL) $(LUA_LIB-y) $(DESTDIR)$(LUA_LIBDIR) - endif - --ifeq ($(shell $(PKG_CONFIG) --print-errors --exists $(PKGDEPS) || echo fail),fail) --$(error Build dependencies are not met) --endif -- - progs-y += apk - apk-objs := apk.o add.o del.o fix.o update.o info.o \ - search.o upgrade.o cache.o ver.o index.o fetch.o \ -@@ -65,10 +59,8 @@ - LDFLAGS_apk += -L$(obj) +@@ -66,7 +66,7 @@ LDFLAGS_apk-test += -L$(obj) --CFLAGS_ALL += $(shell $(PKG_CONFIG) --cflags $(PKGDEPS)) + CFLAGS_ALL += $(shell $(PKG_CONFIG) --cflags $(PKGDEPS)) -LIBS := /usr/lib/libfetch.a \ +LIBS := $(PREFIX)/lib/libfetch.a \ -Wl,--as-needed \ -- $(shell $(PKG_CONFIG) --libs $(PKGDEPS)) \ + $(shell $(PKG_CONFIG) --libs $(PKGDEPS)) \ -Wl,--no-as-needed - - $(obj)/apk: $(LIBAPK-y) ---- apk-tools-2.6.6/Make.rules.orig 2016-02-09 15:57:53.000000000 +0100 -+++ apk-tools-2.6.6/Make.rules 2016-03-09 10:44:12.457459300 +0100 -@@ -70,7 +70,7 @@ - INSTALLDIR := $(INSTALL) -d - - CFLAGS ?= -g -O2 --CFLAGS_ALL := -Werror -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC -+CFLAGS_ALL := -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC - CFLAGS_ALL += $(CFLAGS) - - LDFLAGS ?= -g -@@ -225,7 +225,7 @@ - quiet_cmd_ld = LD $@ - cmd_ld = $(CC) $(ld_flags) -o $@ \ - $(addprefix $(obj)/,$($(@F)-objs)) \ -- $(LIBS) $(LIBS_$(@F)) -+ $(LIBS) $(LIBS_$(@F)) $(LDFLAGS_LIBS) - - $(__progs): override local-target-prereqs=$(addprefix $(obj)/,$($(*F)-objs)) - diff --git a/build.sh b/build.sh index 96556ee..a9565bc 100755 --- a/build.sh +++ b/build.sh @@ -7,6 +7,8 @@ while [ ${#} -gt 0 ]; do case ${1} in -c) ARG_CLEAN=1; ;; +-i) [ -z "${2}" ] && exec cat build.usage ||\ + insert_build_script_link "${2}"; exit $?; ;; -nd) ARG_NO_DOWNLOAD=1; ;; -pt) ARG_PEDANTIC=1; ;; -r) [ -n "${ARG_RESTART_SCRIPT}" ] && exec cat build.usage; @@ -26,11 +28,11 @@ esac; shift; done; [ -f ${HOME}/midipix_build.vars ] && . ${HOME}/midipix_build.vars; [ -f ../midipix_build.vars ] && . ../midipix_build.vars; . ./build.vars; +clear_env_with_except ${CLEAR_ENV_VARS_EXCEPT}; +check_path_vars ${CHECK_PATH_VARS}; check_prereqs ${CHECK_PREREQ_CMDS}; if ! [ -d ${PREFIX} ]; then mkdir ${PREFIX}; fi; -clear_env_with_except ${CLEAR_ENV_VARS_EXCEPT}; -check_path_vars ${CHECK_PATH_VARS}; check_prereqs ${CHECK_PREREQ_CMDS}; {( 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}."; @@ -53,7 +55,7 @@ for BUILD_LVL in 0 1 2 3 ${ARG_TARBALL:+9}; do , "${BUILD_SCRIPT_FNAME}"; then log_msg info "Skipped build script \`${BUILD_SCRIPT_FNAME}' (--build-scripts policy.)"; continue; - elif [ ! -f ${BUILD_SCRIPT_FNAME} ]; then + elif [ ! -f "${BUILD_SCRIPT_FNAME}" ]; then log_msg info "Build script \`${BUILD_SCRIPT_FNAME}' non-existent or not a file."; continue; else @@ -68,6 +70,7 @@ for BUILD_LVL in 0 1 2 3 ${ARG_TARBALL:+9}; do SCRIPT_FNAME=${BUILD_SCRIPT_FNAME}; \ SCRIPT_NAME=${SCRIPT_FNAME%%.build*}; \ export PREFIX_LVL="$(eval echo \${PREFIX_LVL${BUILD_LVL}})"; \ + export PKG_TARGET=${TARGET}; \ export MIDIPIX_BUILD_PWD=$(pwd); cd ${WORKDIR}; \ for SCRIPT_SOURCE in build.subr ${SCRIPT_NAME}.vars \ ${BUILD_SCRIPT_FNAME}; do \ @@ -83,7 +86,7 @@ for BUILD_LVL in 0 1 2 3 ${ARG_TARBALL:+9}; do SCRIPT_NAME=${BUILD_SCRIPT_FNAME%%.build}; SCRIPT_NAME=${SCRIPT_NAME#*.}; SCRIPT_NAME=$(echo "${SCRIPT_NAME}" | tr a-z A-Z); - if [ -z ${PKG_SUBDIR=$(get_var_unsafe PKG_${SCRIPT_NAME}_SUBDIR)} ]; then + if [ -z "${PKG_SUBDIR=$(get_var_unsafe PKG_${SCRIPT_NAME}_SUBDIR)}" ]; then PKG_URL=$(get_var_unsafe PKG_${SCRIPT_NAME}_URL); PKG_FNAME=${PKG_URL##*/}; PKG_SUBDIR=${PKG_FNAME%%.tar*}; diff --git a/build.subr b/build.subr index 66e6ff3..6122212 100644 --- a/build.subr +++ b/build.subr @@ -9,7 +9,7 @@ get_var_dyn() { ${1}; }; get_var_unsafe() { eval echo \${${1}}; }; set_var_dyn() { eval ${1}\(\) \{ echo \"${2}\"\; \}; }; set_var_unsafe() { eval ${1}=\"${2}\"; }; -get_name_without_slash() { while [ "${1%/}" != ${1} ]; do set -- ${1%/}; done; echo ${1}; }; +get_name_without_slash() { while [ "${1%/}" != "${1}" ]; do set -- ${1%/}; done; echo ${1}; }; get_postfix_lrg() { echo "${1##*${2}}"; }; get_prefix_lrg() { echo "${1%%${2}*}"; }; get_postfix() { echo "${1#*${2}}"; }; @@ -65,6 +65,7 @@ export_vars_subst() { }; fetch_git() { + [ -z "${1}" ] && return 1; [ ${ARG_NO_DOWNLOAD:-0} -eq 1 ] && return; rm_if_exists ${1}; [ -d ${1} ] && (cd ${1} && git pull origin main)\ @@ -79,9 +80,70 @@ find_with_no_paths() { unset _fwnp_args _fwnp_not_path; return ${_rc}; }; +insert_build_script_link() { + _ibsl_fname=${1}; + _ibsl_level=${_ibsl_fname%%.*}; + _ibsl_name=${_ibsl_fname#*.}; _ibsl_name=${_ibsl_name%.build}; + if [ -z "${_ibsl_fname}" -o -z "${_ibsl_level}" \ + -o -z "${_ibsl_name}" ] \ + || ! isnumber ${_ibsl_level} \ + || [ ${#_ibsl_level} != 3 ]; then + log_msg failexit "Error: invalid or empty build script filename/level/name."; + return 1; + elif [ -z "$(find -maxdepth 1 -name ${_ibsl_level}.\* -printf '%P\n' -quit)" ]; then + echo ln -s pkg.build ${_ibsl_fname}; + ln -s pkg.build ${_ibsl_fname}; + unset _ibsl_fname _ibsl_level _ibsl_name; + return 0; + else + _ibsl_levels="$(find -maxdepth 1 -name \ + ${_ibsl_level%[0-9][0-9]}\[0-9\]\[0-9\].\* \ + -printf '%P\n' | sort -nk1)"; + fi; + for _ibsl_fname_cur in ${_ibsl_levels}; do + if [ \( ${_ibsl_changed:=0} -eq 0 \) -a \ + \( "${_ibsl_fname_cur%%.*}" -eq ${_ibsl_level} \) ]; then + echo ln -s pkg.build ${_ibsl_fname}; + ln -s pkg.build ${_ibsl_fname}; + _ibsl_changed=1; + fi; + if [ ${_ibsl_changed:=0} -eq 1 ]; then + if [ -z "$(find -maxdepth 1 -name $((${_ibsl_fname_cur%%.*}+1)).\* \ + -printf '%P\n' -quit)" ]; then + _ibsl_last=1; + fi; + echo mv ${_ibsl_fname_cur} \ + $((${_ibsl_fname_cur%%.*}+1)).${_ibsl_fname_cur#*.}; + mv ${_ibsl_fname_cur} \ + $((${_ibsl_fname_cur%%.*}+1)).${_ibsl_fname_cur#*.}; + if [ ${_ibsl_last:-0} -eq 1 ]; then + break; + fi; + fi; + done; + if [ ${_ibsl_changed:=0} -eq 0 ]; then + log_msg failexit "Error: build level ${_ibsl_level} not in \`${_ibsl_levels}'."; + else + unset _ibsl_levels _ibsl_fname_cur _ibsl_changed _ibsl_last; + unset _ibsl_fname _ibsl_level _ibsl_name; + fi; +}; + +isnumber() { + [ -z "${1}" ] && return 1 || _i_num=${1}; + while [ -n "${_i_num}" ]; do + if [ "${_i_num#[0-9]}" = "${_i_num}" ]; then + return 1; + else + _i_num="${_i_num#[0-9]}"; + fi; + done; unset _i_num; return 0; +}; + rm_if_exists() { [ -z "${1#-m}" ] && { _rie_arg_m=1; shift; }; [ -z "${1#-c}" ] && { _rie_arg_c=1; shift; }; + [ -z "${1}" ] && return 1; if [ -d ${1} -o -f ${1} ]; then log_msg warn "Removing directory or file \`${1}'."; if [ ${ARG_PEDANTIC:-0} -eq 1 ]; then @@ -225,7 +287,7 @@ is_build_script_done() { else return 1; # Build fi; - elif [ -f ${WORKDIR}/.${2:-$(get_basename ${SCRIPT_FNAME%.build})}.${1} ]; then + elif [ -f "${WORKDIR}/.${2:-$(get_basename ${SCRIPT_FNAME%.build})}.${1}" ]; then return 0; # Skip else return 1; # Build @@ -287,8 +349,8 @@ match_list() { parse_with_pkg_name() { PKG_LVL=${1}; PKG_NAME=${2}; shift 2; - while [ ${#} -ge 0 ]; do - if [ "${PKG_NAME}" = ${1} ]; then + while [ ${#} -gt 0 ]; do + if [ "${PKG_NAME}" = "${1}" ]; then export_vars_subst PKG_LVL${PKG_LVL}_ PKG_ ${PKG_BUILD_VARS}; export_vars_subst PKG_$(echo ${PKG_NAME} | tr a-z A-Z)_ PKG_ ${PKG_BUILD_VARS}; [ -z "${PKG_URL}" ] && return 1; @@ -306,7 +368,8 @@ parse_with_pkg_name() { fi; unset _pwpn_env_var _pwpn_env_vars; return 0; fi; shift; - done; return 1; + done; + log_msg failexit "Error: package \`${PKG_NAME}' missing in \${PKG_BUILD_NAMES}."; }; run_cmd_unsplit() { @@ -324,7 +387,7 @@ update_build_status() { while [ ${#} -gt 0 ]; do case ${1} in build_start) - if [ -f ${BUILD_STATUS_IN_PROGRESS_FNAME} ]; then + if [ -f "${BUILD_STATUS_IN_PROGRESS_FNAME}" ]; then log_msg failexit "Error: build already in progress."; else touch ${BUILD_STATUS_IN_PROGRESS_FNAME}; @@ -332,7 +395,7 @@ update_build_status() { fi; ;; build_finish) - if [ -f ${BUILD_STATUS_PROGRESS_FNAME} ]; then + if [ -f "${BUILD_STATUS_PROGRESS_FNAME}" ]; then _ubs_bsp_fname=${BUILD_STATUS_PROGRESS_FNAME}; unset BUILD_STATUS_PROGRESS_FNAME; rm -f ${_ubs_bsp_fname}; @@ -347,10 +410,10 @@ update_build_status() { touch ${BUILD_STATUS_TARBALL_PROGRESS_FNAME:=${PREFIX}/TARBALL_STARTED_AT_$(date ${TIMESTAMP_FMT_STATUS_FILES})}; ;; tarball_finish) - [ -f ${BUILD_STATUS_TARBALL_PROGRESS_FNAME} ] &&\ + [ -f "${BUILD_STATUS_TARBALL_PROGRESS_FNAME}" ] &&\ rm -f ${BUILD_STATUS_TARBALL_PROGRESS_FNAME}; ;; finish) - [ -f ${BUILD_STATUS_IN_PROGRESS_FNAME} ] &&\ + [ -f "${BUILD_STATUS_IN_PROGRESS_FNAME}" ] &&\ rm -f ${BUILD_STATUS_IN_PROGRESS_FNAME}; ;; esac; shift; done; diff --git a/build.usage b/build.usage index a4f8cb7..464a831 100644 --- a/build.usage +++ b/build.usage @@ -1,12 +1,16 @@ -usage: ./build.sh [-c] [-nd] [-r ALL|name[:step]] [-h] [-t] +usage: ./build.sh [-c] [-nd] [-r ALL|level.name.build[:step]] [-h] [-t] -c Clean $PREFIX before processing build scripts. + -i level.name.build Insert link to pkg.build for the specified build script. + All consecutive scripts with higher build levels will + be renamed automatically. -nd Don't rm(1) and re-download tarballs when not required. -h Show this screen. -pt Enable pedantic mode. In addition to the warnings emitted whenever a potentially dangerous operation is invoked by the build scripts, manual confirmation will be required. This currently only includes rm_if_exists(). - -r ALL|name[:step] Restart all or the specified build script(s) completely + -r ALL|level.name.build[:step] + Restart all or the specified build script(s) completely or at the optionally specified build step. Currently defined build steps are: fetch extract build_dir patch configure clean build install configure1 configure2 build1 build2 install1 install2. diff --git a/build.vars b/build.vars index 42da9c2..e9cc241 100644 --- a/build.vars +++ b/build.vars @@ -52,7 +52,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${WGET_ARGS:="--no-check-certificate"}; : ${WORKDIR:=${PREFIX}/tmp}; -: ${PKG_BUILD_NAMES:="apk_tools bash binutils binutils_host bzip2 coreutils curl dalist dash diffutils findutils gawk git glib gmp grep gzip hexcurse inetutils irssi less libarchive libelf libfetch libffi libnbcompat libressl libz make mksh mpc mpfr nano ncurses ncursestw ncursesw netcat ntapi ntcon ntctty openssh pacman patch pemagine perl popt psxscl psxstub psxtypes python3 rsync sed slibtool tar tcsh util_linux which xz zsh"}; +: ${PKG_BUILD_NAMES:="apk_tools bash binutils binutils_host bzip2 coreutils curl dalist dash diffutils findutils gawk git glib gmp grep gzip hexcurse inetutils irssi less libarchive libelf libfetch libffi libnbcompat libressl libz make mksh mpc mpfr nano ncurses ncursestw ncursesw netcat ntapi ntcon ntctty openssh pacman patch pemagine perl pkgconf pkgconf_host popt psxscl psxstub psxtypes python3 rsync sed slibtool tar tcsh util_linux which xz zsh"}; : ${PKG_BUILD_VARS:="AR_BUILD AR_CONFIGURE AR_INSTALL AUTOGEN 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 FNAME GIT_ARGS_EXTRA INSTALL_TARGET LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA LDFLAGS_INSTALL_EXTRA LIBFILES_FIX LIBTOOL_MIDIPIX LIBTOOL_MIDIPIX_FIX MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA NO_CLEAN PATCHES_EXTRA_URL PREFIX_EXTRA RANLIB_BUILD RANLIB_INSTALL SHA256SUM SLIBTOOL SUBDIR SUBDIR_CREATE URL URL_FNAME URL_TYPE VERSION"}; : ${PKG_LVL0_CFLAGS_CONFIGURE:=-O0}; : ${PKG_LVL0_CONFIGURE_ARGS:="-C --disable-nls --host=${HOST_NATIVE} --prefix= --target=${TARGET}"}; @@ -81,7 +81,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_APK_TOOLS_AR_INSTALL:=${HOST_NATIVE}-ar}; : ${PKG_APK_TOOLS_MAKEFLAGS_INSTALL_EXTRA:=MANDIR=/share/man DOCDIR=/share/doc/apk}; : ${PKG_APK_TOOLS_BUILD_DIR:=apk-tools-${PKG_APK_TOOLS_VERSION}}; -: ${PKG_APK_TOOLS_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_LVL3}:CROSS_COMPILE=${HOST_NATIVE}-:LUAAPK=:PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig:VERBOSE=1:PREFIX=${PREFIX_LVL3}:LDFLAGS_LIBS=--sysroot=${PREFIX_LVL3} -lcrypto -lssl -lz}; +: ${PKG_APK_TOOLS_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_LVL3}:CROSS_COMPILE=${HOST_NATIVE}-:LUAAPK=:VERBOSE=1:PREFIX=${PREFIX_LVL3}}; : ${PKG_BZIP2_VERSION:=1.0.6}; : ${PKG_BZIP2_SHA256SUM:=a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd}; : ${PKG_BZIP2_URL:=http://www.bzip.org/1.0.6/bzip2-${PKG_BZIP2_VERSION}.tar.gz}; @@ -187,9 +187,6 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${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}; @@ -268,29 +265,27 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_MUSL_SHA256SUM:=720b83c7e276b4b679c0bffe9509340d5f81fd601508e607e708177df0d31c0e}; : ${PKG_MUSL_URL:=http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz}; : ${PKG_MUSL_CFLAGS_CONFIGURE_EXTRA:="-g2 -O0"}; -: ${PKG_NANO_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_LVL3}/include/ncursesw}; -: ${PKG_NANO_ENV_VARS_EXTRA:="NCURSESW_LIBS=-lformw -lmenuw -lncursesw -lpanelw:PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig"}; : ${PKG_NANO_VERSION:=2.5.3}; : ${PKG_NANO_SHA256SUM:=b2b060129b9feff2d4870d803a441178c96531de9aed144ec0b83bd63ccb12ee}; : ${PKG_NANO_URL:=http://www.nano-editor.org/dist/v${PKG_NANO_VERSION%.[0-9]}/nano-${PKG_NANO_VERSION}.tar.gz}; : ${PKG_NCURSES_VERSION:=6.0}; : ${PKG_NCURSES_SHA256SUM:=f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260}; : ${PKG_NCURSES_URL:=https://ftp.gnu.org/gnu/ncurses/ncurses-${PKG_NCURSES_VERSION}.tar.gz}; -: ${PKG_NCURSES_CONFIGURE_ARGS_EXTRA:=--with-pkg-config --with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --disable-widec --with-shared}; +: ${PKG_NCURSES_BUILD_DIR:=ncurses-${PKG_NCURSES_VERSION}-native-${TARGET}}; +: ${PKG_NCURSES_CONFIGURE_ARGS_EXTRA:=--with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --disable-widec --with-shared}; : ${PKG_NCURSES_LIBFILES_FIX:=1}; -: ${PKG_NCURSES_MAKEFLAGS_INSTALL_EXTRA:=PKG_CONFIG_LIBDIR=/lib/pkgconfig}; : ${PKG_NCURSESTW_VERSION:=6.0}; : ${PKG_NCURSESTW_SHA256SUM:=f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260}; -: ${PKG_NCURSESTW_URL:=https://ftp.gnu.org/gnu/ncurses/ncurses-${PKG_NCURSES_VERSION}.tar.gz}; -: ${PKG_NCURSESTW_CONFIGURE_ARGS_EXTRA:=--with-pkg-config --with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --enable-widec --with-shared --with-pthread}; +: ${PKG_NCURSESTW_URL:=https://ftp.gnu.org/gnu/ncurses/ncurses-${PKG_NCURSESTW_VERSION}.tar.gz}; +: ${PKG_NCURSESTW_BUILD_DIR:=ncursestw-${PKG_NCURSESTW_VERSION}-native-${TARGET}}; +: ${PKG_NCURSESTW_CONFIGURE_ARGS_EXTRA:=--with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --enable-widec --with-shared --with-pthread}; : ${PKG_NCURSESTW_LIBFILES_FIX:=1}; -: ${PKG_NCURSESTW_MAKEFLAGS_INSTALL_EXTRA:=PKG_CONFIG_LIBDIR=/lib/pkgconfig}; : ${PKG_NCURSESW_VERSION:=6.0}; : ${PKG_NCURSESW_SHA256SUM:=f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260}; -: ${PKG_NCURSESW_URL:=https://ftp.gnu.org/gnu/ncurses/ncurses-${PKG_NCURSES_VERSION}.tar.gz}; -: ${PKG_NCURSESW_CONFIGURE_ARGS_EXTRA:=--with-pkg-config --with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --enable-widec --with-shared}; +: ${PKG_NCURSESW_URL:=https://ftp.gnu.org/gnu/ncurses/ncurses-${PKG_NCURSESW_VERSION}.tar.gz}; +: ${PKG_NCURSESW_BUILD_DIR:=ncursesw-${PKG_NCURSESW_VERSION}-native-${TARGET}}; +: ${PKG_NCURSESW_CONFIGURE_ARGS_EXTRA:=--with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --enable-widec --with-shared}; : ${PKG_NCURSESW_LIBFILES_FIX:=1}; -: ${PKG_NCURSESW_MAKEFLAGS_INSTALL_EXTRA:=PKG_CONFIG_LIBDIR=/lib/pkgconfig}; : ${PKG_NETCAT_VERSION:=110}; : ${PKG_NETCAT_SHA256SUM:=5b3fda14e972d908896a605293f4634a72e2968278117410e12d8b3faf9a3976}; : ${PKG_NETCAT_URL:=https://dl.packetstormsecurity.net/UNIX/netcat/nc110.tgz}; @@ -307,7 +302,6 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_PACMAN_URL:=https://projects.archlinux.org/pacman.git/snapshot/pacman-${PKG_PACMAN_VERSION}.tar.gz}; : ${PKG_PACMAN_AUTOGEN:=1}; : ${PKG_PACMAN_CONFIGURE_ARGS_EXTRA:=--disable-doc}; -: ${PKG_PACMAN_ENV_VARS_EXTRA:="LIBALPM_LIBS=-lssl -lbz2 -llzma -lz:LIBARCHIVE_CFLAGS=:LIBARCHIVE_LIBS=:LIBSSL_CFLAGS=:LIBSSL_LIBS=:LIBCURL_CFLAGS=:LIBCURL_LIBS=:PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig"}; : ${PKG_PACMAN_MAKEFLAGS_BUILD_EXTRA:=V=99}; : ${PKG_PATCH_VERSION:=2.7}; : ${PKG_PATCH_SHA256SUM:=59c29f56faa0a924827e6a60c6accd6e2900eae5c6aaa922268c717f06a62048}; @@ -318,6 +312,14 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_PERL_CONFIGURE_ARGS:="-A ccflags=-I${PREFIX_LVL3}/include --sysroot=${PREFIX_LVL3} --target=${TARGET}"}; : ${PKG_PERL_ENV_VARS_EXTRA:="TARGET=${TARGET}"}; : ${PKG_PERL_MAKEFLAGS_BUILD:=-j1}; +: ${PKG_PKGCONF_HOST_SHA256SUM:=7ec8b516e655e247f4ba976837cee808134785819ab8f538f652fe919cc6c09f}; +: ${PKG_PKGCONF_HOST_VERSION:=0.9.12}; +: ${PKG_PKGCONF_HOST_URL:=https://github.com/pkgconf/pkgconf/releases/download/pkgconf-${PKG_PKGCONF_HOST_VERSION}/pkgconf-${PKG_PKGCONF_HOST_VERSION}.tar.bz2}; +: ${PKG_PKGCONF_HOST_CONFIGURE_ARGS:="-C --prefix=${PREFIX_NATIVE}"}; +: ${PKG_PKGCONF_HOST_MAKEFLAGS_INSTALL_EXTRA:=prefix=${PREFIX}}; +: ${PKG_PKGCONF_SHA256SUM:=7ec8b516e655e247f4ba976837cee808134785819ab8f538f652fe919cc6c09f}; +: ${PKG_PKGCONF_VERSION:=0.9.12}; +: ${PKG_PKGCONF_URL:=https://github.com/pkgconf/pkgconf/releases/download/pkgconf-${PKG_PKGCONF_VERSION}/pkgconf-${PKG_PKGCONF_VERSION}.tar.bz2}; : ${PKG_PYTHON3_VERSION:=3.5.1}; : ${PKG_PYTHON3_SHA256SUM:=687e067d9f391da645423c7eda8205bae9d35edc0c76ef5218dcbe4cc770d0d7}; : ${PKG_PYTHON3_URL:=https://www.python.org/ftp/python/${PKG_PYTHON3_VERSION}/Python-${PKG_PYTHON3_VERSION}.tgz}; diff --git a/ncurses-6.0.local.patch b/ncurses-6.0.local.patch index 1afa214..0375647 100644 --- a/ncurses-6.0.local.patch +++ b/ncurses-6.0.local.patch @@ -39,3 +39,16 @@ if test "$DFT_LWR_MODEL" = "shared" ; then LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" +--- ncurses-6.0/misc/Makefile.in.orig 2015-08-05 23:15:41.000000000 +0000 ++++ ncurses-6.0/misc/Makefile.in 2016-06-23 08:40:43.767712775 +0000 +@@ -110,8 +110,8 @@ + install.libs :: $(DESTDIR)$(bindir) ncurses-config + $(INSTALL_SCRIPT) ncurses-config $(DESTDIR)$(bindir)/$(NCURSES_CONFIG) + +-@MAKE_PC_FILES@install.libs :: pc-files $(DESTDIR)$(PKG_CONFIG_LIBDIR) +-@MAKE_PC_FILES@ $(SHELL) -c 'for name in *.pc; do $(INSTALL_DATA) $$name $(DESTDIR)$(PKG_CONFIG_LIBDIR)/$$name; done' ++@MAKE_PC_FILES@install.libs :: pc-files $(PKG_CONFIG_LIBDIR) ++@MAKE_PC_FILES@ $(SHELL) -c 'for name in *.pc; do $(INSTALL_DATA) $$name $(PKG_CONFIG_LIBDIR)/$$name; done' + + @MAKE_PC_FILES@sources :: pc-files + @MAKE_PC_FILES@pc-files : diff --git a/pkg.build b/pkg.build index e11af01..163b0c8 100644 --- a/pkg.build +++ b/pkg.build @@ -47,7 +47,7 @@ if [ -z "${PKG_BUILD_DIR}" ]; then set_build_dir ${PKG_SUBDIR} ${PKG_BUILD_TYPE:-native}; fi; if ! is_build_script_done build_dir; then - [ ${PKG_SUBDIR} != ${PKG_BUILD_DIR} ] &&\ + [ "${PKG_SUBDIR}" != "${PKG_BUILD_DIR}" ] &&\ rm_if_exists -m ${PKG_BUILD_DIR}; set_build_script_done build_dir -patch; fi; @@ -62,7 +62,7 @@ if ! is_build_script_done patch; then ${MIDIPIX_BUILD_PWD}/${PKG_SUBDIR}.local@${BUILD_HNAME}.patch \ ${MIDIPIX_BUILD_PWD}/../${PKG_SUBDIR}.local.patch \ ${MIDIPIX_BUILD_PWD}/../${PKG_SUBDIR}.local@${BUILD_HNAME}.patch; do - [ -r ${PATCH_FNAME} ] &&\ + [ -r "${PATCH_FNAME}" ] &&\ patch -b -d ${PKG_SUBDIR} -p1 < ${PATCH_FNAME}; done; unset PATCH_FNAME; if [ -n "${PKG_PATCHES_EXTRA_URL}" ]; then