Radix cross Linux

Radix Linux distribution for embedded systems.

637 Commits   4 Branches   3 Tags
author: Andrey V.Kosteltsev <kx@radix.pro> 2016-10-20 12:35:49 +0000 committer: Andrey V.Kosteltsev <kx@radix.pro> 2016-10-20 12:35:49 +0000 commit: ff16f8ed6a7ebbab3d43cf5b474be7c1c1ba1b62 parent: c10d6630d3ae594a861677982be16fb98a6bd775
Commit Summary:
libs/libgamin/0.1.10 uses BS internal Python2 now
Diffstat:
4 files changed, 80 insertions, 35 deletions
diff --git a/libs/libgamin/0.1.10-x86_32/Makefile b/libs/libgamin/0.1.10-x86_32/Makefile
index 6e8448439..be43d7a6f 100644
--- a/libs/libgamin/0.1.10-x86_32/Makefile
+++ b/libs/libgamin/0.1.10-x86_32/Makefile
@@ -13,6 +13,7 @@ include ../../../build-system/constants.mk
 SOURCE_REQUIRES    = sources/packages/l/gamin
 
 REQUIRES           = libs/libgamin/0.1.10
+REQUIRES          += dev/python2/2.7.11-x86_32
 
 # ======= __END_OF_REQUIRES__ =======
 
@@ -93,6 +94,33 @@ extra_configure_switches += --enable-shared=yes
 extra_configure_switches += --cache-file=$(hw_cache)
 
 
+#
+# Python Configuration:
+#
+PYTHON_MAJOR_VERSION = 2
+
+ifeq ($(PYTHON_MAJOR_VERSION),3)
+PYTHON_VERSION = 3.5
+extra_configure_switches += --with-python=$(PYTHON3)
+
+python_environment  = PYTHON_VERSION=$(PYTHON_VERSION)
+python_environment += PYTHON_INCLUDES=$(TARGET_DEST_DIR)/usr/include/python$(PYTHON_VERSION)m
+python_environment += PYTHON_SITE_PACKAGES=/usr/lib$(MULTILIB_X86_32_SUFFIX)/python$(PYTHON_VERSION)/site-packages
+endif
+
+ifeq ($(PYTHON_MAJOR_VERSION),2)
+PYTHON_VERSION = 2.7
+extra_configure_switches += --with-python=$(PYTHON2)
+
+python_environment  = PYTHON_VERSION=$(PYTHON_VERSION)
+python_environment += PYTHON_INCLUDES=$(TARGET_DEST_DIR)/usr/include/python$(PYTHON_VERSION)
+python_environment += PYTHON_SITE_PACKAGES=/usr/lib$(MULTILIB_X86_32_SUFFIX)/python$(PYTHON_VERSION)/site-packages
+endif
+
+
+CFLAGS += -Wno-address -Wno-unused-variable
+
+
 ####### Dependencies
 
 $(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
@@ -103,7 +131,8 @@ $(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
 $(build_target): $(src_done)
 	@mkdir -p $(build_dir)
 	@cp -a $(hw_cache_in) $(hw_cache)
-	@cd $(build_dir) && $(BUILD_ENVIRONMENT) ../$(src_dir_name)/configure \
+	@cd $(build_dir) && \
+	  $(BUILD_ENVIRONMENT) $(python_environment) ../$(src_dir_name)/configure \
 	  --prefix=/usr               \
 	  --build=$(BUILD)            \
 	  --host=$(TARGET32)          \
diff --git a/libs/libgamin/0.1.10/Makefile b/libs/libgamin/0.1.10/Makefile
index 789bab12a..414f789c6 100644
--- a/libs/libgamin/0.1.10/Makefile
+++ b/libs/libgamin/0.1.10/Makefile
@@ -23,15 +23,7 @@ include ../../../build-system/constants.mk
 
 SOURCE_REQUIRES    = sources/packages/l/gamin
 
-ifeq ($(__USE_BUILT_GCC_LIBS__),yes)
-REQUIRES           = dev/gcc/5.3.0
-else
-ifneq ($(HARDWARE),$(HARDWARE_PC64))
-REQUIRES           = libs/glibc/2.23
-else
-REQUIRES           = libs/glibc/2.23-x86_32
-endif
-endif
+REQUIRES           = dev/python2/2.7.11
 
 # ======= __END_OF_REQUIRES__ =======
 
@@ -113,6 +105,33 @@ extra_configure_switches += --enable-shared=yes
 extra_configure_switches += --cache-file=$(hw_cache)
 
 
+#
+# Python Configuration:
+#
+PYTHON_MAJOR_VERSION = 2
+
+ifeq ($(PYTHON_MAJOR_VERSION),3)
+PYTHON_VERSION = 3.5
+extra_configure_switches += --with-python=$(PYTHON3)
+
+python_environment  = PYTHON_VERSION=$(PYTHON_VERSION)
+python_environment += PYTHON_INCLUDES=$(TARGET_DEST_DIR)/usr/include/python$(PYTHON_VERSION)m
+python_environment += PYTHON_SITE_PACKAGES=/usr/lib$(LIBSUFFIX)/python$(PYTHON_VERSION)/site-packages
+endif
+
+ifeq ($(PYTHON_MAJOR_VERSION),2)
+PYTHON_VERSION = 2.7
+extra_configure_switches += --with-python=$(PYTHON2)
+
+python_environment  = PYTHON_VERSION=$(PYTHON_VERSION)
+python_environment += PYTHON_INCLUDES=$(TARGET_DEST_DIR)/usr/include/python$(PYTHON_VERSION)
+python_environment += PYTHON_SITE_PACKAGES=/usr/lib$(LIBSUFFIX)/python$(PYTHON_VERSION)/site-packages
+endif
+
+
+CFLAGS += -Wno-address -Wno-unused-variable
+
+
 ####### Dependencies
 
 $(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
@@ -124,7 +143,7 @@ $(build_target): $(src_done)
 	@mkdir -p $(build_dir)
 	@cp -a $(hw_cache_in) $(hw_cache)
 	@cd $(build_dir) && \
-	  $(BUILD_ENVIRONMENT) ../$(src_dir_name)/configure \
+	  $(BUILD_ENVIRONMENT) $(python_environment) ../$(src_dir_name)/configure \
 	  --prefix=/usr               \
 	  --build=$(BUILD)            \
 	  --host=$(TARGET)            \
diff --git a/sources/packages/l/gamin/create-0.1.10-patch/gamin-0.1.10-new/configure b/sources/packages/l/gamin/create-0.1.10-patch/gamin-0.1.10-new/configure
index e219f3e15..812e02039 100755
--- a/sources/packages/l/gamin/create-0.1.10-patch/gamin-0.1.10-new/configure
+++ b/sources/packages/l/gamin/create-0.1.10-patch/gamin-0.1.10-new/configure
@@ -23710,9 +23710,6 @@ if test "${with_python+set}" = set; then
 fi
 
 
-PYTHON_VERSION=
-PYTHON_INCLUDES=
-PYTHON_SITE_PACKAGES=
 PYTHON_TESTS=
 pythondir=
 if test "$with_python" != "no" ; then
@@ -23732,7 +23729,7 @@ if test "$with_python" != "no" ; then
 		with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
 	    else
 		# Extract the first word of "python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5", so it can be a program name with args.
-set dummy python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2
+set dummy python python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2
 { echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_path_PYTHON+set}" = set; then
@@ -23776,33 +23773,50 @@ fi
     fi
     if test "$PYTHON" != ""
     then
-        PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[0:3]"`
-	echo Found Python version $PYTHON_VERSION
+	if test "$PYTHON_VERSION" != ""
+	then
+	    PYTHON_VERSION=$PYTHON_VERSION
+	    echo Found Python version $PYTHON_VERSION
+	else
+	    PYTHON_VERSION=`$PYTHON -c "import sys; print (sys.version[0:3])"`
+	    echo Found Python version $PYTHON_VERSION
+	fi
     fi
     if test "$PYTHON_VERSION" != ""
     then
-	if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
-	   -d $with_python/lib/python$PYTHON_VERSION/site-packages
+	if test "$PYTHON_INCLUDES" != ""
 	then
-	    PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
-	    PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
+	    PYTHON_INCLUDES=$PYTHON_INCLUDES
+	    if test "$PYTHON_SITE_PACKAGES" != ""
+	    then
+		PYTHON_SITE_PACKAGES=$PYTHON_SITE_PACKAGES
+	    else
+		PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`
+	    fi
 	else
-	    if test -r $prefix/include/python$PYTHON_VERSION/Python.h
+	    if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
+		    -d $with_python/lib/python$PYTHON_VERSION/site-packages
 	    then
-	        PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
-	        PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
+		PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
+		PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
 	    else
-		if test -r /usr/include/python$PYTHON_VERSION/Python.h
+		if test -r $prefix/include/python$PYTHON_VERSION/Python.h
 		then
-		    PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
-	            PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
+		    PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
+		    PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
 		else
-		    echo could not find python$PYTHON_VERSION/Python.h
+		    if test -r /usr/include/python$PYTHON_VERSION/Python.h
+		    then
+			PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
+			PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
+		    else
+			echo could not find python$PYTHON_VERSION/Python.h
+		    fi
+		fi
+		if test ! -d "$PYTHON_SITE_PACKAGES"
+		then
+			PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`
 		fi
-	    fi
-	    if test ! -d "$PYTHON_SITE_PACKAGES"
-	    then
-		    PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
 	    fi
 	fi
     fi
diff --git a/sources/packages/l/gamin/create-0.1.10-patch/gamin-0.1.10-new/python/gamin.c b/sources/packages/l/gamin/create-0.1.10-patch/gamin-0.1.10-new/python/gamin.c
index e5c6a460f..0696b54b2 100644
--- a/sources/packages/l/gamin/create-0.1.10-patch/gamin-0.1.10-new/python/gamin.c
+++ b/sources/packages/l/gamin/create-0.1.10-patch/gamin-0.1.10-new/python/gamin.c
@@ -6,11 +6,8 @@
  * veillard@redhat.com
  */
 
-#include <limits.h>
-
 #include <Python.h>
 #include <fam.h>
-#include "config.h"
 
 #ifdef GAMIN_DEBUG_API
 int FAMDebug(FAMConnection *fc, const char *filename, FAMRequest * fr,