diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/gcc.full.build | 164 | ||||
l--------- | scripts/gcc.libstdc++-v3.build | 1 | ||||
l--------- | scripts/gcc.native.build | 1 | ||||
l--------- | scripts/gcc.runtime.build | 1 | ||||
l--------- | scripts/gcc.stage1.build | 1 | ||||
-rw-r--r-- | scripts/midipix_sh.build | 13 | ||||
-rw-r--r-- | scripts/musl.full.build | 68 | ||||
l--------- | scripts/musl.native.build | 1 | ||||
l--------- | scripts/musl.no-complex.build | 1 | ||||
-rw-r--r-- | scripts/pkg.build | 259 |
10 files changed, 510 insertions, 0 deletions
diff --git a/scripts/gcc.full.build b/scripts/gcc.full.build new file mode 100644 index 00000000..91247e8c --- /dev/null +++ b/scripts/gcc.full.build @@ -0,0 +1,164 @@ +# +# . ./build.vars and set -o errexit -o noglob are assumed. +# + +# Order: stage1, runtime, full, native + +export MAKE="make LIBTOOL=slibtool"; +if [ "${2}" = runtime ]\ +|| [ "${2}" = libstdc++-v3 ]\ +|| [ "${2}" = full ]; then + set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross; + cd ${PKG_BUILD_DIR}; + if [ "${2}" = runtime ]; then + # GCC, compiler runtime. + if ! is_build_script_done build; then + make ${MAKEFLAGS} all-target-libgcc; + set_build_script_done build -install; + fi; + if ! is_build_script_done install; then + make ${MAKEFLAGS} install-target-libgcc; + set_build_script_done install finish; + fi; + elif [ "${2}" = libstdc++-v3 ]; then + # GCC, libstdc++-v3. + if ! is_build_script_done build; then + make ${MAKEFLAGS} all-target-libstdc++-v3; + set_build_script_done build -install; + fi; + if ! is_build_script_done install; then + make ${MAKEFLAGS} install-target-libstdc++-v3; + set_build_script_done install finish; + fi; + elif [ "${2}" = full ]; then + # GCC, everything else. + if ! is_build_script_done build; then + make ${MAKEFLAGS}; + set_build_script_done build -install; + fi; + if ! is_build_script_done install; then + make ${MAKEFLAGS} install; + set_build_script_done install finish; + fi; + fi; +else + if [ "${2}" = stage1 ]; then + # GCC, stage1. + if ! is_build_script_done fetch; then + fetch_git cbb-gcc-${PKG_GCC_VERSION} \ + ${GITROOT}/cbb/cbb-gcc-${PKG_GCC_VERSION}; + set_build_script_done fetch -configure; + fi; + set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross; + export cbb_ldflags_for_target=--sysroot=${PKG_PREFIX} \ + cbb_sysroot_for_libgcc=${PKG_PREFIX} \ + cbb_target=${TARGET} \ + cbb_neutral_libiberty=no \ + cbb_xgcc_for_specs=${WORKDIR}/${PKG_BUILD_DIR}/gcc/xgcc; + GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}"; + elif [ "${2}" = native ]; then + # GCC, native. + set_build_dir cbb-gcc-${PKG_GCC_VERSION} native; + export cbb_ldflags_for_target=--sysroot=${PKG_PREFIX} \ + cbb_sysroot_for_libgcc=${PKG_PREFIX} \ + cbb_target=${TARGET} \ + cbb_xgcc_for_specs=${TARGET}-gcc; + GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}"; + fi; + GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f ${WORKDIR}/cbb-gcc-${PKG_GCC_VERSION}/libc/cbb-musl-pe.h)"; + for __ in CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS CXXFLAGS_FOR_BUILD; do + export "${__}=${GCCFLAGS}"; + done; + for __ in CFLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET; do + export "${__}=${GCCTARGET_FLAGS}"; + done; + for __ in cbb_cflags_for_stage1 cbb_cflags_for_stage2 cbb_cflags_for_stage3 cbb_cflags_for_stage4; do + export "${__}=${CFLAGS_FOR_BUILD}" ; + done; + export CFLAGS CXXFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET; + if ! is_build_script_done configure; then + if [ "${2}" = stage1 ]; then + insecure_mkdir ${PKG_PREFIX}/include; + [ \! -d ${PKG_PREFIX}/usr ] && \ + ln -s -- . ${PKG_PREFIX}/usr; + _configure_args="--prefix=${PREFIX} --with-sysroot=${PKG_PREFIX}"; + elif [ "${2}" = native ]; then + insecure_mkdir ${PKG_PREFIX}/${TARGET}; + if [ \! -d ${PKG_PREFIX}/${TARGET}/usr ]; then + ln -s -- . ${PKG_PREFIX}/${TARGET}/usr; + fi; + if [ "${ARCH}" = nt32 ]; then + _configure_args="--host=i686-nt32-midipix"; + else + _configure_args="--host=x86_64-nt64-midipix"; + fi; + _configure_args="${_configure_args} \ + --prefix=/ \ + --with-elf=${PKG_PREFIX} \ + --with-gmp=${PKG_PREFIX} \ + --with-mpc=${PKG_PREFIX} \ + --with-mpfr=${PKG_PREFIX} \ + --with-sysroot="; + fi; + secure_rm ${PKG_BUILD_DIR}; + insecure_mkdir ${PKG_BUILD_DIR}; + secure_cd ${PKG_BUILD_DIR}; + ../cbb-gcc-${PKG_GCC_VERSION}/configure \ + --disable-bootstrap \ + --disable-libmudflap \ + --disable-multilib \ + --disable-nls \ + --disable-obsolete \ + --disable-sjlj-exceptions \ + --disable-symvers \ + --enable-canonical-system-headers \ + --enable-__cxa_atexit \ + --enable-debug \ + --enable-gnu-indirect-function \ + --enable-gnu-unique-object \ + --enable-initfini-array \ + --enable-languages=c,c++,objc,lto \ + --enable-libstdcxx-debug \ + --enable-lto \ + --enable-multiarch \ + --enable-secureplt \ + --enable-shared \ + --enable-threads=posix \ + --target=${TARGET} \ + --with-fpmath=sse \ + ${_configure_args}; + set_build_script_done configure clean -build; + else + cd ${PKG_BUILD_DIR}; + fi; + if ! is_build_script_done clean; then + make ${MAKEFLAGS} clean; + set_build_script_done clean -build; + fi; + if ! is_build_script_done build; then + if [ "${2}" = stage1 ]; then + make ${MAKEFLAGS} all-gcc; + elif [ "${2}" = native ]; then + make ${MAKEFLAGS} all-gcc; + make ${MAKEFLAGS} all-target-libgcc; + make ${MAKEFLAGS} all-target-libstdc++-v3; + make ${MAKEFLAGS} all; + fi; + set_build_script_done build -install; + fi; + if ! is_build_script_done install; then + if [ "${2}" = stage1 ]; then + make ${MAKEFLAGS} install-gcc; + __="$(uname -s)"; + if [ "${__#*CYGWIN*}" != "${__}" ]; then + ln -s -- ${PREFIX}/libexec/gcc/${TARGET}/${PKG_GCC_VERSION}/liblto_plugin.dll.a \ + ln -s -- ${PREFIX}/libexec/gcc/${TARGET}/${PKG_GCC_VERSION}/liblto_plugin.so; + fi; + elif [ "${2}" = native ]; then + make ${MAKEFLAGS} DESTDIR=${PKG_PREFIX} install; + fi; + set_build_script_done install finish; + fi; +fi; + +# vim:filetype=sh diff --git a/scripts/gcc.libstdc++-v3.build b/scripts/gcc.libstdc++-v3.build new file mode 120000 index 00000000..b809d40d --- /dev/null +++ b/scripts/gcc.libstdc++-v3.build @@ -0,0 +1 @@ +gcc.full.build
\ No newline at end of file diff --git a/scripts/gcc.native.build b/scripts/gcc.native.build new file mode 120000 index 00000000..b809d40d --- /dev/null +++ b/scripts/gcc.native.build @@ -0,0 +1 @@ +gcc.full.build
\ No newline at end of file diff --git a/scripts/gcc.runtime.build b/scripts/gcc.runtime.build new file mode 120000 index 00000000..b809d40d --- /dev/null +++ b/scripts/gcc.runtime.build @@ -0,0 +1 @@ +gcc.full.build
\ No newline at end of file diff --git a/scripts/gcc.stage1.build b/scripts/gcc.stage1.build new file mode 120000 index 00000000..b809d40d --- /dev/null +++ b/scripts/gcc.stage1.build @@ -0,0 +1 @@ +gcc.full.build
\ No newline at end of file diff --git a/scripts/midipix_sh.build b/scripts/midipix_sh.build new file mode 100644 index 00000000..94b98d31 --- /dev/null +++ b/scripts/midipix_sh.build @@ -0,0 +1,13 @@ +# +# . ./build.vars and set -o errexit -o noglob are assumed. +# + +if ! is_build_script_done install; then + (cd ${MIDIPIX_BUILD_PWD}/etc; + tar -cpf - midipix_check.sh midipix.sh README midipix_shortcut.vbs |\ + tar -C ${PREFIX} -xpf -); + chmod +x ${PREFIX}/midipix.sh; + set_build_script_done install finish; +fi; + +# vim:filetype=sh diff --git a/scripts/musl.full.build b/scripts/musl.full.build new file mode 100644 index 00000000..35d1de28 --- /dev/null +++ b/scripts/musl.full.build @@ -0,0 +1,68 @@ +# +# . ./build.vars and set -o errexit -o noglob are assumed. +# + +# Order: no-complex, native + +# Git clone what we need. +fetch_git lazy ${GITROOT}/lazy; + +export lz_arch=${ARCH} lz_cflags_debug=-O2 lz_target=${TARGET}; + +if [ "${2}" = no-complex ]; then + # Musl: build (no-complex) + _install=install_no_complex; + set_build_dir musl-${PKG_MUSL_VERSION}-${2} cross; + if ! is_build_script_done fetch; then + fetch http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz \ + ${PKG_MUSL_SHA256SUM}; + secure_rm mmglue; + fetch_git mmglue ${GITROOT}/mmglue; + set_build_script_done fetch -extract; + fi; + if ! is_build_script_done extract; then + secure_rm musl-${PKG_MUSL_VERSION}; + tar -xf ${DLCACHEDIR}/musl-${PKG_MUSL_VERSION}.tar.gz; + set +o noglob; cp -R -- mmglue/* musl-${PKG_MUSL_VERSION}/; set -o noglob; + set_build_script_done extract -configure; + fi; +elif [ "${2}" = native ]; then + # Musl: build (full) + _install=install; + set_build_dir musl-${PKG_MUSL_VERSION} "${2}"; +elif [ "${2}" = full ]; then + # Musl: build (full) + _install=install; + set_build_dir musl-${PKG_MUSL_VERSION} cross; +fi; +if ! is_build_script_done configure; then + secure_rm ${PKG_BUILD_DIR}; + insecure_mkdir ${PKG_BUILD_DIR}; + secure_cd ${PKG_BUILD_DIR}; + env lz_cflags_cmdline="${PKG_MUSL_CFLAGS_CONFIGURE_EXTRA}" \ + lz_debug="yes" \ + ../lazy/lazy \ + -a ${ARCH} \ + -c gcc \ + -f ${PKG_PREFIX} \ + -n musl \ + -p ../musl-${PKG_MUSL_VERSION} \ + -t ${lz_target} \ + -x config; + set_build_script_done configure clean -build; +else + cd ${PKG_BUILD_DIR}; +fi; +if ! is_build_script_done clean; then + make ${MAKEFLAGS} clean; + set_build_script_done clean -build; +fi; +if ! is_build_script_done build; then + ./lazy -e ${_install} \ + -x build; + [ "${2}" = native ] && \ + ln -sf -- ../lib/libc.so ${PKG_PREFIX}/bin/ldd; + set_build_script_done build finish; +fi; + +# vim:filetype=sh diff --git a/scripts/musl.native.build b/scripts/musl.native.build new file mode 120000 index 00000000..2ed15f0d --- /dev/null +++ b/scripts/musl.native.build @@ -0,0 +1 @@ +musl.full.build
\ No newline at end of file diff --git a/scripts/musl.no-complex.build b/scripts/musl.no-complex.build new file mode 120000 index 00000000..2ed15f0d --- /dev/null +++ b/scripts/musl.no-complex.build @@ -0,0 +1 @@ +musl.full.build
\ No newline at end of file diff --git a/scripts/pkg.build b/scripts/pkg.build new file mode 100644 index 00000000..1a9746b3 --- /dev/null +++ b/scripts/pkg.build @@ -0,0 +1,259 @@ +# +# . ./build.vars and set -o errexit -o noglob are assumed. +# + +parse_with_pkg_name ${1}; +if [ ${PKG_DISABLED:-0} -eq 1 ]; then + exit 0; +elif ! is_build_script_done fetch; then + if test_cmd pkg_${PKG_NAME}_fetch; then + pkg_${PKG_NAME}_fetch; + else + if [ "${PKG_URL_TYPE:-wget}" = wget ]; then + fetch "${PKG_URL}" ${PKG_SHA256SUM}; + else + fetch_git ${PKG_SUBDIR} ${PKG_URL} ${PKG_GIT_BRANCH}; + fi; + fi; + if test_cmd pkg_${PKG_NAME}_fetch_post; then + pkg_${PKG_NAME}_fetch_post; + fi; + set_build_script_done fetch -extract; +fi; +if test_cmd pkg_${PKG_NAME}_finish; then + pkg_${PKG_NAME}_finish; exit 0; +elif [ "${PKG_URL_TYPE:-wget}" = wget ] &&\ +! is_build_script_done extract; then + secure_rm ${PKG_SUBDIR}; + if [ ${PKG_SUBDIR_CREATE:-0} -eq 1 ]; then + insecure_mkdir ${PKG_SUBDIR}; + fi; + if [ "${PKG_FNAME##*.tar.}" = "bz2" ]; then + bunzip2 -d < ${DLCACHEDIR}/${PKG_FNAME} | tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf -; + elif [ "${PKG_FNAME##*.tar.}" = "gz" ]; then + gunzip -d < ${DLCACHEDIR}/${PKG_FNAME} | tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf -; + elif [ "${PKG_FNAME##*.tar.}" = "xz" ]; then + xz -d < ${DLCACHEDIR}/${PKG_FNAME} | tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf -; + elif [ "${PKG_FNAME##*.t}" = "bz2" ]; then + bunzip2 -d < ${DLCACHEDIR}/${PKG_FNAME} | tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf -; + elif [ "${PKG_FNAME##*.t}" = "gz" ]; then + gunzip -d < ${DLCACHEDIR}/${PKG_FNAME} | tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf -; + elif [ "${PKG_FNAME##*.t}" = "xz" ]; then + xz -d < ${DLCACHEDIR}/${PKG_FNAME} | tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf -; + else + tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf ${DLCACHEDIR}/${PKG_FNAME}; + fi; + if test_cmd pkg_${PKG_NAME}_extract_post; then + pkg_${PKG_NAME}_extract_post; + fi; + set_build_script_done extract -build_dir; +fi; +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}" ] &&\ + secure_rm ${PKG_BUILD_DIR}; + insecure_mkdir ${PKG_BUILD_DIR}; + set_build_script_done build_dir -patch; +fi; +if [ -e ${PKG_SUBDIR}/configure -o \ + -e ${PKG_SUBDIR}/configure.ac -o \ + -e ${PKG_SUBDIR}/configure.in -o \ + -e ${PKG_SUBDIR}/config.guess ] \ +&& ! is_build_script_done autoconf; then + find ${PKG_SUBDIR} -name config.sub \ + -exec echo mv -- {} {}.orig \; \ + -exec mv -- {} {}.orig \; \ + -exec echo install -m 0700 ${MIDIPIX_BUILD_PWD}/etc/config.sub {} \; \ + -exec install -m 0700 ${MIDIPIX_BUILD_PWD}/etc/config.sub {} \;; + if [ -e ${PKG_SUBDIR}/configure.ac -a \ + ! -e ${PKG_SUBDIR}/configure ]; then + if [ -x ${PKG_SUBDIR}/autogen.sh ]; then + for __ in ${PKG_SUBDIR}/build-aux ${PKG_SUBDIR}; do + if [ -e ${__} ]; then + echo install -m 0700 \ + ${MIDIPIX_BUILD_PWD}/etc/config.sub \ + ${__}/config.sub; + install -m 0700 \ + ${MIDIPIX_BUILD_PWD}/etc/config.sub \ + ${__}/config.sub; + break; + fi; + done; + (cd ${PKG_SUBDIR} && ./autogen.sh) || exit 1; + else + (cd ${PKG_SUBDIR} && autoconf) || exit 1; + fi; + fi; + for __ in ${PKG_BUILD_DIR} ${PKG_CONFIG_CACHE_EXTRA}; do + echo cp -- ${MIDIPIX_BUILD_PWD}/etc/config.cache ${__}/; + cp -- ${MIDIPIX_BUILD_PWD}/etc/config.cache ${__}/; + done; + set_build_script_done autoconf -patch; +fi; +if ! is_build_script_done patch; then + for __patch_fname in \ + ${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR}.local.patch \ + ${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR}.local@${BUILD_HNAME}.patch \ + ${MIDIPIX_BUILD_PWD}/../${PKG_SUBDIR}.local.patch \ + ${MIDIPIX_BUILD_PWD}/../${PKG_SUBDIR}.local@${BUILD_HNAME}.patch; do + if [ -r "${__patch_fname}" ]; then + patch -b -d ${PKG_SUBDIR} -p1 < ${__patch_fname}; + fi; + done; unset __patch_fname; + if test_cmd pkg_${PKG_NAME}_patch_post; then + pkg_${PKG_NAME}_patch_post; + fi; + set_build_script_done patch -configure; +fi; +PKG_SUBDIR_PATH=${PWD}/${PKG_SUBDIR#/}; +if [ -z "${PKG_CONFIGURE}" ]; then + PKG_CONFIGURE=${PKG_SUBDIR_PATH}/configure; +else + PKG_CONFIGURE=${PWD}/${PKG_CONFIGURE#/}; +fi; +cd ${PKG_BUILD_DIR}; +if [ "${PKG_BUILD_TYPE}" = "host" ]; then + export AR=ar; + export CC=gcc; + export RANLIB=ranlib; +else + export AR=${PKG_TARGET}-ar; + export CC=${PKG_TARGET}-gcc; + export RANLIB=${PKG_TARGET}-ranlib; +fi; +if [ -x ${PKG_CONFIGURE} ]\ +&& ! is_build_script_done configure; then + if test_cmd pkg_${PKG_NAME}_configure_pre; then + pkg_${PKG_NAME}_configure_pre; + fi; + CFLAGS="${PKG_CFLAGS_CONFIGURE}${PKG_CFLAGS_CONFIGURE_EXTRA:+ ${PKG_CFLAGS_CONFIGURE_EXTRA}}"\ + LDFLAGS="${PKG_LDFLAGS_CONFIGURE}${PKG_LDFLAGS_CONFIGURE_EXTRA:+ ${PKG_LDFLAGS_CONFIGURE_EXTRA}}"\ + ${PKG_CONFIGURE} \ + ${PKG_CONFIGURE_ARGS} ${PKG_CONFIGURE_ARGS_EXTRA} ${PKG_CONFIGURE_ARGS_EXTRA_DEBUG}; + set_build_script_done configure clean -build; +else + __no_autoconf=1; + set_build_script_done clean -build; +fi; +if [ ${PKG_NO_CLEAN:-0} -eq 0 ]\ +&& ! is_build_script_done clean; then + make clean; + set_build_script_done clean -build; +fi; +if ! is_build_script_done build; then + if test_cmd pkg_${PKG_NAME}_build; then + pkg_${PKG_NAME}_build; + elif [ -n "${PKG_BUILD_CMDLINE}" ]; then + ${PKG_BUILD_CMDLINE}; + else + if [ "${PKG_SLIBTOOL}" != "default" ]; then + export MAKE="make LIBTOOL=${PKG_SLIBTOOL:-slibtool}"; + fi; + # N.B. We only specify CC= here if the current package does not use GNU + # autoconf as it often abuses it by appending -std={gnu99,...} to it + # instead of amending CFLAGS. + run_cmd_unsplit make \ + ${PKG_MAKEFLAGS_BUILD} \ + ${PKG_MAKEFLAGS_BUILD_EXTRA} \ + AR=${AR} ${__no_autoconf:+CC=${CC}} RANLIB=${RANLIB} \ + "${PKG_CFLAGS_BUILD:+CFLAGS=${PKG_CFLAGS_BUILD}}" \ + "${PKG_CFLAGS_BUILD_EXTRA:+CFLAGS+=${PKG_CFLAGS_BUILD_EXTRA}}" \ + "${PKG_LDFLAGS_BUILD:+LDFLAGS=${PKG_LDFLAGS_BUILD}}" \ + "${PKG_LDFLAGS_BUILD_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_BUILD_EXTRA}}"; + unset __no_autoconf; + fi; + set_build_script_done build -install; +fi; +if ! is_build_script_done install; then + if test_cmd pkg_${PKG_NAME}_install; then + pkg_${PKG_NAME}_install; + else + if [ ${PKG_NO_MAKE_INSTALL:-0} -eq 0 ]; then + run_cmd_unsplit make \ + ${PKG_MAKEFLAGS_INSTALL} \ + ${PKG_MAKEFLAGS_INSTALL_EXTRA} \ + AR=${AR} CC=${CC} RANLIB=${RANLIB} \ + "${PKG_CFLAGS_INSTALL:+CFLAGS=${PKG_CFLAGS_INSTALL}}" \ + "${PKG_CFLAGS_INSTALL_EXTRA:+CFLAGS+=${PKG_CFLAGS_INSTALL_EXTRA}}" \ + "${PKG_LDFLAGS_INSTALL:+LDFLAGS=${PKG_LDFLAGS_INSTALL}}" \ + "${PKG_LDFLAGS_INSTALL_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_INSTALL_EXTRA}}" \ + "${PKG_RANLIB_INSTALL:+RANLIB=${PKG_RANLIB_INSTALL}}" \ + ${PKG_INSTALL_TARGET:=install}; + if [ -n "${PKG_PREFIX_EXTRA}" ]; then + run_cmd_unsplit make \ + ${PKG_MAKEFLAGS_INSTALL} \ + ${PKG_MAKEFLAGS_INSTALL_EXTRA} \ + AR=${AR} CC=${CC} RANLIB=${RANLIB} \ + "${PKG_CFLAGS_INSTALL:+CFLAGS=${PKG_CFLAGS_INSTALL}}" \ + "${PKG_CFLAGS_INSTALL_EXTRA:+CFLAGS+=${PKG_CFLAGS_INSTALL_EXTRA}}" \ + "${PKG_LDFLAGS_INSTALL:+LDFLAGS=${PKG_LDFLAGS_INSTALL}}" \ + "${PKG_LDFLAGS_INSTALL_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_INSTALL_EXTRA}}" \ + "${PKG_RANLIB_INSTALL:+RANLIB=${PKG_RANLIB_INSTALL}}" \ + ${PKG_INSTALL_TARGET_EXTRA:=install} \ + DESTDIR=${PKG_PREFIX_EXTRA}; + fi; + fi; + if test_cmd pkg_${PKG_NAME}_install_post; then + pkg_${PKG_NAME}_install_post; + fi; + fi; + if [ -d ${PKG_PREFIX}/lib ]; then + for __ in $(find ${PKG_PREFIX}/lib -type f -name \*.la); do + secure_rm ${__}; + done; + fi; + if [ -n "${PKG_INSTALL_FILES}" ]; then + (set -- ${PKG_INSTALL_FILES}; + while [ ${#} -gt 0 ]; do + case "${1}" in + @*=*) + __ln_target="${1%=*}"; + __ln_target="${__ln_target#@}"; + __ln_fname="${1#*=}"; + echo ln -sf -- ${__ln_target} ${PKG_PREFIX}/${__ln_fname}; + ln -sf -- ${__ln_target} ${PKG_PREFIX}/${__ln_fname}; + ;; + /=*) + __mkdir_fname="${1#/=}"; + insecure_mkdir ${PKG_PREFIX}/${__mkdir_fname}; + ;; + *) + __file_fname_src="${1%=*}"; + __file_fname_dst="${1#*=}"; + echo cp -pP -- ${__file_fname_src} ${PKG_PREFIX}/${__file_fname_dst}; + cp -pP -- ${__file_fname_src} ${PKG_PREFIX}/${__file_fname_dst}; + ;; + esac; shift; + done); + fi; + if test_cmd perk && test_cmd ${PKG_TARGET}-dlltool; then + for __so_fname in \ + $(find \( -name "*.so" \ + -or -name "*.so.[0-9]" \ + -or -name "*.so.[0-9].[0-9]" \ + -or -name "*.so.[0-9].[0-9].[0-9]" \) -printf '%P\n'); + do + if [ \( -e ${__so_fname%.so}.lib.a \) -o \ + \( ! -e ${PKG_PREFIX}/lib/$(basename ${__so_fname}) \) ]; + then + continue; + else + __so_name="${__so_fname%.so}"; + echo perk -epdlltool ${__so_fname} \> ${__so_fname%.so}.def; + perk -epdlltool ${__so_fname} > ${__so_fname%.so}.def; + echo ${PKG_TARGET}-dlltool -l ${__so_fname%.so}.lib.a \ + -D ${__so_fname} -d ${__so_fname%.so}.def; + ${PKG_TARGET}-dlltool -l ${__so_fname%.so}.lib.a \ + -D ${__so_fname} -d ${__so_fname%.so}.def; + echo cp -- ${__so_fname%.so}.lib.a "${PKG_PREFIX}/lib"; + cp -- ${__so_fname%.so}.lib.a "${PKG_PREFIX}/lib"; + fi; + done; + fi; + set_build_script_done install -finish; +fi; +set_build_script_done finish; + +# vim:filetype=sh |