Permalink
Browse files

Install python sub targets to Python installation directory and then …

…cleanup.
  • Loading branch information...
1 parent 5d0c014 commit a1a5fadf21d28f32d5fb0d10303769d8397f017d @Alexpux Alexpux committed Oct 5, 2013
Showing with 33 additions and 55 deletions.
  1. +3 −2 build
  2. +1 −1 library/subtargets.sh
  3. +16 −15 scripts/3rdparty-post.sh
  4. +1 −1 scripts/gcc-post.sh
  5. +3 −9 scripts/python-2.7.3.sh
  6. +3 −9 scripts/python-2.7.4.sh
  7. +3 −9 scripts/python-2.7.5.sh
  8. +3 −9 scripts/python-3.3.0.sh
View
5 build
@@ -357,6 +357,7 @@ readonly PREREQ_LOGS_DIR=$ROOT_DIR/prerequisites-logs
readonly MINGWPREFIX=/mingw$(func_get_arch_bit ${BUILD_ARCHITECTURE})
readonly PREFIX=${BASE_BUILD_DIR}${MINGWPREFIX}
+ readonly LIBS_DIR=$PREFIX/opt
[[ $USE_MULTILIB == yes ]] && {
readonly PROCESSOR_OPTIMIZATION="--with-arch-32=$PROCESSOR_OPTIMIZATION_ARCH_32 --with-arch-64=$PROCESSOR_OPTIMIZATION_ARCH_64"
@@ -373,10 +374,10 @@ readonly PREREQ_LOGS_DIR=$ROOT_DIR/prerequisites-logs
} || {
readonly BASE_BUILD_DIR=$ROOT_DIR/$BUILD_MODE-${BUILD_ARCHITECTURE}$REV_STRING
readonly PREFIX=$BASE_BUILD_DIR/${BUILD_MODE_VERSION}-${BUILD_ARCHITECTURE}
+ readonly LIBS_DIR=$PREFIX
}
readonly BUILDS_DIR=$BASE_BUILD_DIR/build
-readonly LIBS_DIR=$BASE_BUILD_DIR/libs
readonly LOGS_DIR=$BASE_BUILD_DIR/logs
mkdir -p \
@@ -434,7 +435,7 @@ readonly REVERSE_ARCHITECTURE=$(func_get_reverse_arch $BUILD_ARCHITECTURE)
readonly COMMON_CFLAGS="$BASE_CFLAGS -I$LIBS_DIR/include -I$PREREQ_DIR/${BUILD_ARCHITECTURE}-zlib-$LINK_TYPE_SUFFIX/include -I$PREREQ_DIR/$HOST-$LINK_TYPE_SUFFIX/include"
readonly COMMON_CXXFLAGS="$COMMON_CFLAGS"
readonly COMMON_CPPFLAGS="$BASE_CPPFLAGS"
-readonly COMMON_LDFLAGS="$BASE_LDFLAGS -L$LIBS_DIR/lib -L$PREREQ_DIR/${BUILD_ARCHITECTURE}-zlib-$LINK_TYPE_SUFFIX/lib -L$PREREQ_DIR/$HOST-$LINK_TYPE_SUFFIX/lib -L$PREFIX/opt/lib"
+readonly COMMON_LDFLAGS="$BASE_LDFLAGS -L$LIBS_DIR/lib -L$PREREQ_DIR/${BUILD_ARCHITECTURE}-zlib-$LINK_TYPE_SUFFIX/lib -L$PREREQ_DIR/$HOST-$LINK_TYPE_SUFFIX/lib"
# **************************************************************************
View
@@ -87,11 +87,11 @@ function fun_get_subtargets {
mingw-w64-tools-genpeimg
mingw-w64-tools-widl
${PYTHON_SUBTARGETS[@]}
- 3rdparty-post
gdbinit
gdb
gdb-wrapper
make_git_bat
+ 3rdparty-post
cleanup
licenses
build-info
View
@@ -37,22 +37,23 @@
function python_deps_post {
[[ ! -f $BUILDS_DIR/3rdparty-post.marker ]] && {
- local _dlls=( $(find $LIBS_DIR/bin -type f -name *.dll) )
- [[ ${#_dlls[@]} >0 ]] && {
- [[ $BUILD_MODE == gcc ]] && {
- cp -f ${_dlls[@]} $PREFIX/opt/bin/ >/dev/null 2>&1
- } || {
- cp -f ${_dlls[@]} $PREFIX/bin/ >/dev/null 2>&1
- local _toolchain_path=$(eval "echo \${${BUILD_ARCHITECTURE}_HOST_MINGW_PATH}")
- local _gcc_dll=( $(find $_toolchain_path/bin -type f \
- -name libstdc++*.dll -o \
- -name libgcc*.dll -o \
- -name libwinpthread*.dll) )
- [[ ${#_gcc_dll[@]} >0 ]] && {
- cp -f ${_gcc_dll[@]} $PREFIX/bin/ >/dev/null 2>&1
- }
- }
+
+ local _toolchain_path=$(eval "echo \${${BUILD_ARCHITECTURE}_HOST_MINGW_PATH}")
+ local _gcc_dll=( $(find $_toolchain_path/bin -type f \
+ -name libstdc++*.dll -o \
+ -name libgcc*.dll -o \
+ -name libwinpthread*.dll) )
+ [[ ${#_gcc_dll[@]} >0 ]] && {
+ cp -f ${_gcc_dll[@]} $LIBS_DIR/bin/ >/dev/null 2>&1
}
+
+ rm -rf $LIBS_DIR/include
+ rm -rf $LIBS_DIR/lib/pkgconfig
+ find $LIBS_DIR/lib -maxdepth 1 -type f -name *.a -print0 | xargs rm -f
+ rm -rf $LIBS_DIR/man
+ rm -rf $LIBS_DIR/share/man
+ rm -rf $LIBS_DIR/share/info
+
touch $BUILDS_DIR/3rdparty-post.marker
}
}
View
@@ -116,7 +116,7 @@ function gcc_post_install {
gcc_post_install
echo -n "--> Switching to new compiler..."
-export PATH=$PREFIX/bin:$PREFIX/opt/bin:$LIBS_DIR/bin:$ORIGINAL_PATH
+export PATH=$PREFIX/bin:$LIBS_DIR/bin:$ORIGINAL_PATH
echo " done"
# **************************************************************************
View
@@ -98,20 +98,14 @@ PKG_EXECUTE_AFTER_PATCH=(
popd > /dev/null
}
-[[ -d $PREFIX ]] && {
- pushd $PREFIX > /dev/null
- PREFIXW=`pwd -W`
- popd > /dev/null
-}
-
[[ -d $PREREQ_DIR ]] && {
pushd $PREREQ_DIR > /dev/null
PREREQW_DIR=`pwd -W`
popd > /dev/null
}
LIBFFI_VERSION=$( grep 'PKG_VERSION=' $TOP_DIR/scripts/libffi.sh | sed 's|PKG_VERSION=||' )
-MY_CPPFLAGS="-I$LIBSW_DIR/include -I$LIBSW_DIR/include/ncurses -I$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/include -I$PREFIXW/opt/include"
+MY_CPPFLAGS="-I$LIBSW_DIR/include -I$LIBSW_DIR/include/ncurses -I$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/include"
# Workaround for conftest error on 64-bit builds
export ac_cv_working_tzset=no
@@ -121,7 +115,7 @@ PKG_CONFIGURE_FLAGS=(
--host=$HOST
--build=$BUILD
#
- --prefix=$([[ $BUILD_MODE == gcc ]] && echo $PREFIX/opt || echo $PREFIX)
+ --prefix=$LIBS_DIR
#
--enable-shared
--disable-ipv6
@@ -135,7 +129,7 @@ PKG_CONFIGURE_FLAGS=(
CFLAGS="\"$COMMON_CFLAGS -fwrapv -DNDEBUG -D__USE_MINGW_ANSI_STDIO=1\""
CXXFLAGS="\"$COMMON_CXXFLAGS -fwrapv -DNDEBUG -D__USE_MINGW_ANSI_STDIO=1 $MY_CPPFLAGS\""
CPPFLAGS="\"$COMMON_CPPFLAGS $MY_CPPFLAGS\""
- LDFLAGS="\"$COMMON_LDFLAGS -L$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/lib -L$PREFIXW/opt/lib -L$LIBSW_DIR/lib\""
+ LDFLAGS="\"$COMMON_LDFLAGS -L$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/lib -L$LIBSW_DIR/lib\""
)
#
View
@@ -107,20 +107,14 @@ PKG_EXECUTE_AFTER_PATCH=(
popd > /dev/null
}
-[[ -d $PREFIX ]] && {
- pushd $PREFIX > /dev/null
- PREFIXW=`pwd -W`
- popd > /dev/null
-}
-
[[ -d $PREREQ_DIR ]] && {
pushd $PREREQ_DIR > /dev/null
PREREQW_DIR=`pwd -W`
popd > /dev/null
}
LIBFFI_VERSION=$( grep 'PKG_VERSION=' $TOP_DIR/scripts/libffi.sh | sed 's|PKG_VERSION=||' )
-MY_CPPFLAGS="-I$LIBSW_DIR/include -I$LIBSW_DIR/include/ncurses -I$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/include -I$PREFIXW/opt/include"
+MY_CPPFLAGS="-I$LIBSW_DIR/include -I$LIBSW_DIR/include/ncurses -I$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/include"
# Workaround for conftest error on 64-bit builds
export ac_cv_working_tzset=no
@@ -130,7 +124,7 @@ PKG_CONFIGURE_FLAGS=(
--host=$HOST
--build=$BUILD
#
- --prefix=$([[ $BUILD_MODE == gcc ]] && echo $PREFIX/opt || echo $PREFIX)
+ --prefix=$LIBS_DIR
#
--enable-shared
--disable-ipv6
@@ -144,7 +138,7 @@ PKG_CONFIGURE_FLAGS=(
CFLAGS="\"$COMMON_CFLAGS -fwrapv -DNDEBUG -D__USE_MINGW_ANSI_STDIO=1\""
CXXFLAGS="\"$COMMON_CXXFLAGS -fwrapv -DNDEBUG -D__USE_MINGW_ANSI_STDIO=1 $MY_CPPFLAGS\""
CPPFLAGS="\"$COMMON_CPPFLAGS $MY_CPPFLAGS\""
- LDFLAGS="\"$COMMON_LDFLAGS -L$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/lib -L$PREFIXW/opt/lib -L$LIBSW_DIR/lib\""
+ LDFLAGS="\"$COMMON_LDFLAGS -L$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/lib -L$LIBSW_DIR/lib\""
)
#
View
@@ -109,20 +109,14 @@ PKG_EXECUTE_AFTER_PATCH=(
popd > /dev/null
}
-[[ -d $PREFIX ]] && {
- pushd $PREFIX > /dev/null
- PREFIXW=`pwd -W`
- popd > /dev/null
-}
-
[[ -d $PREREQ_DIR ]] && {
pushd $PREREQ_DIR > /dev/null
PREREQW_DIR=`pwd -W`
popd > /dev/null
}
LIBFFI_VERSION=$( grep 'PKG_VERSION=' $TOP_DIR/scripts/libffi.sh | sed 's|PKG_VERSION=||' )
-MY_CPPFLAGS="-I$LIBSW_DIR/include -I$LIBSW_DIR/include/ncurses -I$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/include -I$PREFIXW/opt/include"
+MY_CPPFLAGS="-I$LIBSW_DIR/include -I$LIBSW_DIR/include/ncurses -I$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/include"
# Workaround for conftest error on 64-bit builds
export ac_cv_working_tzset=no
@@ -132,7 +126,7 @@ PKG_CONFIGURE_FLAGS=(
--host=$HOST
--build=$BUILD
#
- --prefix=$([[ $BUILD_MODE == gcc ]] && echo $PREFIX/opt || echo $PREFIX)
+ --prefix=$LIBS_DIR
#
--enable-shared
--disable-ipv6
@@ -146,7 +140,7 @@ PKG_CONFIGURE_FLAGS=(
CFLAGS="\"$COMMON_CFLAGS -fwrapv -DNDEBUG -D__USE_MINGW_ANSI_STDIO=1\""
CXXFLAGS="\"$COMMON_CXXFLAGS -fwrapv -DNDEBUG -D__USE_MINGW_ANSI_STDIO=1 $MY_CPPFLAGS\""
CPPFLAGS="\"$COMMON_CPPFLAGS $MY_CPPFLAGS\""
- LDFLAGS="\"$COMMON_LDFLAGS -L$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/lib -L$PREFIXW/opt/lib -L$LIBSW_DIR/lib\""
+ LDFLAGS="\"$COMMON_LDFLAGS -L$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/lib -L$LIBSW_DIR/lib\""
)
#
View
@@ -104,20 +104,14 @@ PKG_EXECUTE_AFTER_PATCH=(
popd > /dev/null
}
-[[ -d $PREFIX ]] && {
- pushd $PREFIX > /dev/null
- PREFIXW=`pwd -W`
- popd > /dev/null
-}
-
[[ -d $PREREQ_DIR ]] && {
pushd $PREREQ_DIR > /dev/null
PREREQW_DIR=`pwd -W`
popd > /dev/null
}
LIBFFI_VERSION=$( grep 'PKG_VERSION=' $TOP_DIR/scripts/libffi.sh | sed 's|PKG_VERSION=||' )
-MY_CPPFLAGS="-I$LIBSW_DIR/include -I$LIBSW_DIR/include/ncurses -I$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/include -I$PREFIXW/opt/include"
+MY_CPPFLAGS="-I$LIBSW_DIR/include -I$LIBSW_DIR/include/ncurses -I$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/include"
# Workaround for conftest error on 64-bit builds
export ac_cv_working_tzset=no
@@ -128,7 +122,7 @@ PKG_CONFIGURE_FLAGS=(
--host=$HOST
--build=$BUILD
#
- --prefix=$([[ $BUILD_MODE == gcc ]] && echo $PREFIX/opt || echo $PREFIX)
+ --prefix=$LIBS_DIR
#
--enable-shared
--without-pydebug
@@ -141,7 +135,7 @@ PKG_CONFIGURE_FLAGS=(
CFLAGS="\"$COMMON_CFLAGS -D__USE_MINGW_ANSI_STDIO=1\""
CXXFLAGS="\"$COMMON_CXXFLAGS -D__USE_MINGW_ANSI_STDIO=1 $MY_CPPFLAGS\""
CPPFLAGS="\"$COMMON_CPPFLAGS $MY_CPPFLAGS\""
- LDFLAGS="\"$COMMON_LDFLAGS -L$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/lib -L$PREFIXW/opt/lib -L$LIBSW_DIR/lib\""
+ LDFLAGS="\"$COMMON_LDFLAGS -L$PREREQW_DIR/$BUILD_ARCHITECTURE-zlib-$LINK_TYPE_SUFFIX/lib -L$LIBSW_DIR/lib\""
)
#

0 comments on commit a1a5fad

Please sign in to comment.